What is the displayed sequence of out ? reg out; initial begin out = 1'b0…
What is the displayed sequence of out ? reg out; initial begin out = 1'b0; #5 force out = 1'b1; #5 out = 1'b0; #5 release out; #5 $finish; end At t = 12 , what is the value of out ?
- 1'b0
- 1'b1
- 1'bx
- 1'bz
Correct answer
B. 1'b1
Explanation
A force statement overrides all procedural assignments. At $t = 10$, the procedural assignment out = 1'b0 is ignored because the force remains active until $t = 15$. Therefore, at $t = 12$, out remains 1'b1 .