What values are printed by $display and $strobe at t = 0 ? reg a; initial…
What values are printed by $display and $strobe at t = 0 ? reg a; initial begin a = 0; a <= 1; $display("disp: %b", a); $strobe("strb: %b", a); end
- disp: 0, strb: 0
- disp: 1, strb: 1
- disp: 0, strb: 1
- disp: 1, strb: 0
Correct answer
C. disp: 0, strb: 1
Explanation
$display executes immediately in the active region where a is still 0. The non-blocking assignment a <= 1 updates in the NBA region. $strobe evaluates at the end of the time step, observing the final updated value 1 .