HDL & Verification

In simulation, a register without reset starts as X. What happens in the real chip?

  1. AAt power-on it becomes either 0 or 1, but which one is not determined
  2. BIt stays stuck at a voltage midway between 0 and 1
  3. CIt is always 0 in the real chip
Show answer and explanation

Answer: A. At power-on it becomes either 0 or 1, but which one is not determined

A real flip-flop settles to a stable 0 or 1 at power-on, but which one varies with the chip, location, temperature and so on and is not determined. The X in simulation represents "unknown which". If that value affects circuit behavior, it must be set by reset. Registers in data paths that are always written before use sometimes omit reset.

  • A. Correct. That is why reset or initialization matters.
  • B. A flip-flop settles to either 0 or 1.
  • C. It is not guaranteed to be 0.
Practice this topic Back to topic

More HDL & Verification questions

  1. In the code above, when sel is X, Verilog simulation selects b for y. Why is this a problem for verification?
  2. Which statement about tri-state descriptions that output Z (high impedance) in an HDL is generally correct?
  3. Which describes a testbench used in HDL verification?
  4. What is the period of the clock generated by the testbench code above (time unit 1 ns)?
  5. In a testbench, changing a design input with a blocking assignment at the same instant as the rising clock edge can cause problems. Which pairs the reason with a fix correctly?