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 race condition on Async Reset

Status
Not open for further replies.

vipulsinha

Member level 2
Joined
Nov 9, 2005
Messages
44
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Activity points
1,661
verilog async reset

One reason not to use asynchronous resets is that Verilog cannot model
them without a race condition. Typical async reset flop:

always @ (posedge ck or negedge rst) begin
if (!rst) q <= 0;
else q <= d;
end

What happens when rst is Deasserted at the same time as ck is asserted?
Either ck goes high first, and rst is still low, so q gets zero. Or rst
goes high first, and when ck fires, q gets d

Pls comment
 

reset time verilog

In your code rst condition shall prevail because in the "if" clause the first condition is evaluated and if true only that statement will be done.

I'm not very fond on verilog (I use VHDL most of all) but I think it's the same and the always condition only trigger the code under it if it's verified.
 

race condition verilog

Hi,
Even though reset is an asynchronous signal it has to satisfy removal & recovery timing requirements for proper functioning of the flop. The reset signal can be deasserted only after the removal time, otherwise it will result in metastability.
Removal time is the minimum amount of time that an asyn control signal must be stable after the clock active-edge transition,when asyn signal is deasserted
If reset is deasserted at the active edge of the clock, the output of the flop will become unpredictable, it can either latch the data or remain in reset state
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top