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 had to be reg and those driven by assign had to be wire, so changing usage meant editing declarations and invited 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.