Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Generate loops

Hardware interview practice

Generate loops

EasySystemVerilogSystemVerilog

For N=3, which hierarchical objects are elaborated?

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 →
Starting point

Question code

for (genvar i = 0; i < N; i++) begin : g
  logic flag;
end
Choose one

Answer choices

  1. A. One runtime array named g.flag[2:0]
  2. B. No objects; generate loops may contain only module instances
  3. C. Only g[2].flag because genvar retains its final value
  4. D. g[0].flag, g[1].flag, and g[2].flag
Continue practicing

Related questions

SystemVerilogPackages→SystemVerilogType parameters→
asic.fyi · Learn silicon end to end.info@asic.fyi