A Verilog module with a time unit of 1 ns contains
assign #5 y = a & b;
Input b is held at 1 throughout. Input a is 0 until 10 ns, is 1 from 10 ns to 13 ns, and is 0 after 13 ns. The output y has been 0 since 5 ns. What does y do between 10 ns and 30 ns?
y stays 0, because the 3 ns pulse on a is shorter than the 5 ns delay and is filtered out.
y is unknown from 15 ns to 18 ns, because the pulse is too short for the output to resolve.
y is 1 from 15 ns to 20 ns, because once it rises it must stay high for a full delay.
y is 1 from 15 ns to 18 ns, because the pulse on a reappears on y 5 ns later.
Unlock full course notes by signing up
Latch inferred from an incomplete combinational block
A designer intends the following Verilog block to be combinational logic. The signal y is declared as a reg.
a) What hardware does a synthesis tool infer for y, and why?
b) Rewrite the block so that y is purely combinational, equals d when en is 1, and equals 0 when en is 0.
Score masked simulation checks with unknown outputs
A self-checking simulation compares a controller's four-bit response with an expected response. A comparison mask selects which bit positions the checker inspects: 1 means compare, and 0 means ignore. All strings run from bit 3 on the left to bit 0 on the right.
The symbol X may appear in the observed response. An X in a checked position counts as one mismatch. An ignored position contributes no mismatch, regardless of its value. A test passes only when its mismatch count is zero.
Complete the table with exact integer mismatch counts and the words Pass or Fail. Each checked bit contributes at most one mismatch.
Blocking assignments in reverse order in a clocked block
Consider this Verilog block, in which r0, r1 and r2 are 1-bit registers:
Just before a rising edge of clk, the signals are settled at din = 1, r0 = 0, r1 = 1 and r2 = 0. No other block assigns or reads these registers. What are the register values after this single rising edge?
Assess a proposed optimization using a timing report
A digital controller's implementation tool reports the following two register-to-register paths. Both use the same clock and must complete within one clock period. For this simplified setup analysis, clock skew is zero.
The reported delay DDD includes the launching register's output delay, logic delay, and routing delay. The reserve RRR combines the receiving register's setup time and clock uncertainty. The setup slack is the remaining time after both contributions are deducted from the clock period TTT: