Hardware interview practice
Inactive, nonblocking assignment (NBA), and postponed regions
What do the two messages print at the rising edge?
Starting point
Question code
logic clk = 0, a = 0, b = 0;
always @(posedge clk) begin
a <= 1;
b <= a;
#0 $display("D %0b %0b", a, b);
$strobe("S %0b %0b", a, b);
end
initial #5 clk = 1;Choose one
Answer choices
- A. D 0 0; S 1 0
- B. D 1 0; S 1 0
- C. D 0 0; S 1 1
- D. Both messages are nondeterministic
