HDL & Verification
What is an advantage of SystemVerilog's logic type?
- AIt can be assigned from either assign or always without worrying about the wire/reg distinction (for single-driver signals)
- BIt is guaranteed to become a flip-flop
- CIt cannot hold X or Z, so simulation runs faster
Show answer and explanation
Answer: A. It can be assigned from either assign or always without worrying about the wire/reg distinction (for single-driver signals)
In Verilog, signals assigned in always blocks must be reg and those driven by assign must be wire, so changing usage means editing declarations and invites errors. SystemVerilog's logic can be assigned either way, so it covers most cases on its own. Signals with multiple drivers, such as tri-state buses, still use wire. logic is a four-state type including X and Z.
- A. Correct. Declaration mistakes decrease.
- B. Whether a flip-flop results depends on the coding.
- C. logic is four-state; the two-state type is bit.