Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Use checked down-casting in SystemVerilog

Hardware interview practice

Use checked down-casting in SystemVerilog

EasySystemVerilogSystemVerilog

A base-class handle refers to an object whose dynamic type may be derived. Which statement about casting is correct?

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Choose one

Answer choices

  1. A. Every down-cast succeeds at compile time.
  2. B. Virtual methods dispatch only from the handle's declared type.
  3. C. Inheritance prevents polymorphism.
  4. D. Assigning derived to base is an up-cast; recovering derived should use checked `$cast` and can fail for an incompatible dynamic type.
Continue practicing

Related questions

SystemVerilogUse polymorphism through a base handle→
asic.fyi · Learn silicon end to end.info@asic.fyi