Interview Questions

What is the difference between the following two lines of Verilog code?

Electrical Engineering Technical Interview Questions and Answers


(Continued from previous question...)

4. What is the difference between the following two lines of Verilog code?

What is the difference between the following two lines of Verilog code?
#5 a = b;
a = #5 b;


#5 a = b; Wait five time units before doing the action for "a = b;".
The value assigned to a will be the value of b 5 time units hence.

a = #5 b; The value of b is calculated and stored in an internal temp register.
After five time units, assign this stored value to a.

(Continued on next question...)

Other Interview Questions