HDL & Verification

What is an advantage of SystemVerilog's logic type?

  1. AIt can be assigned from either assign or always without worrying about the wire/reg distinction (for single-driver signals)
  2. BIt is guaranteed to become a flip-flop
  3. 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.
Practice this topic Back to topic

More HDL & Verification questions

  1. What is the advantage of using SystemVerilog's always_ff and always_comb instead of Verilog's always?
  2. What is the advantage of writing a module with a parameter as above?
  3. What does the generate statement above do?
  4. What is the role of a lint tool in HDL verification?
  5. What is the main purpose of simulating the post-synthesis or post-layout gate-level netlist with delay information?