Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Verilog Combinational Loop - Help Required

Status
Not open for further replies.

davidgrm

Full Member level 4
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 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;
 
  • Like
Reactions: brxue

    brxue

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top