Oct 6, 2008 #1 D davidgrm Full Member level 4 Joined Apr 8, 2006 Messages 233 Helped 31 Reputation 62 Reaction score 10 Trophy points 1,298 Activity points 2,727 combinational loop Hi Why would this code cause a combinational loop on Delay? always @(clk) begin if(!CPU_WR || !FPGA_WR) begin Delay <= 2'b10; end else begin Delay <= Delay - 1'b1; end end
combinational loop Hi Why would this code cause a combinational loop on Delay? always @(clk) begin if(!CPU_WR || !FPGA_WR) begin Delay <= 2'b10; end else begin Delay <= Delay - 1'b1; end end
Oct 7, 2008 #2 tkbits Full Member level 5 Joined Dec 4, 2004 Messages 242 Helped 39 Reputation 78 Reaction score 2 Trophy points 1,298 Activity points 2,209 combinational loop in verilog It's not clocked on an edge. So a register is not created. Choose a positive or negative edge for the clock. Without a clock edge, the following is a combinational loop: Delay <= Delay - 1'b1;
combinational loop in verilog It's not clocked on an edge. So a register is not created. Choose a positive or negative edge for the clock. Without a clock edge, the following is a combinational loop: Delay <= Delay - 1'b1;