User guide
11-2
Race Detection
The Dynamic Race Detection Tool
The dynamic race detection tool finds two basic types of race
conditions during simulation:
• read - write race condition
This occurs when a procedural assignment in one always or initial
block, or a continuous assignment assigns a signal’s value to
another signal (read) at the same time that a procedural
assignment in another always or initial block, or another
continuous assignment assigns a new value to that signal (write).
For example:
initial
#5 a = 0; // write operation to signal a
initial
#5 b = a; // read operation of signal a
In this example, at simulation time 5, there is both a read and a
write operation on signal a. When simulation time 5 is over you
do not know if signal b will have the value 0 or the previous value
of signal a.
• write - write race condition
This occurs when a procedural assignment in one always or initial
block, or a continuous assignment assigns a value to a signal
(write) at the same time that a procedural assignment in another
always or initial block, or another continuous assignment assigns
a value to that signal (write). For example:
initial
#5 a = 0; // write operation to signal a
initial
#5 a = 1; // write operation of signal a