Verilog - Race Conditions

Race Conditions

The order of execution isn't always guaranteed within Verilog. This can best be illustrated by a classic example. Consider the code snippet below:

initial a = 0; initial b = a; initial begin #1; $display("Value a=%b Value of b=%b",a,b); end

What will be printed out for the values of a and b? Depending on the order of execution of the initial blocks, it could be zero and zero, or alternately zero and some other arbitrary uninitialized value. The $display statement will always execute after both assignment blocks have completed, due to the #1 delay.

Read more about this topic:  Verilog

Famous quotes containing the words race and/or conditions:

    [The Settlement House] must be grounded in a philosophy whose foundation is on the solidarity of the human race, a philosophy which will not waver when the race happens to be represented by a drunken woman or an idiot boy.
    Jane Addams (1860–1935)

    What is Americanism? Every one has a different answer. Some people say it is never to submit to the dictation of a King. Others say Americanism is the pride of liberty and the defence of an insult to the flag with their gore. When some half-developed person tramples on that flag, we should be ready to pour out the blood of the nation, they say. But do we not sit in silence when that flag waves over living conditions which should be an insult to all patriotism?
    Anna Howard Shaw (1847–1919)