24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Simulating Verilog designs UM-133<br />

The tables below show two of the many valid evaluations of these statements. Evaluation<br />

events are denoted by a number where the number is the statement to be evaluated. Update<br />

events are denoted (old->new) where indicates the reg being updated <strong>and</strong><br />

new is the updated value.<br />

Table 1: Evaluation 1<br />

Event being processed Active event queue<br />

q(0 → 1) 1, 2<br />

q(0 → 1)<br />

1 p(0 → 1), 2<br />

p(0 → 1) 3, 2<br />

3 clk(0 → 1), 2<br />

clk(0 → 1) 4, 2<br />

4 2<br />

2 p2(1 → 0)<br />

p2(1 → 0) 3<br />

3 clk(1 → 0)<br />

clk(1 → 0) <br />

Table 2: Evaluation 2<br />

Event being processed Active event queue<br />

q(0 → 1) 1, 2<br />

q(0 → 1)<br />

1 p(0 → 1), 2<br />

2 p2(1 → 0), p(0 → 1)<br />

p(0 → 1) 3, p2(1 → 0)<br />

p2(1 → 0) 3<br />

3 (clk doesn’t change)<br />

Again, both evaluations are valid. However, in Evaluation 1, clk has a glitch on it; in<br />

Evaluation 2, clk doesn’t. This indicates that the design has a zero-delay race condition on<br />

clk.<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!