Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Nested disable fork

Hardware interview practice

Nested disable fork

HardSystemVerilogSystemVerilog

Which print sequence is produced?

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

initial begin
  fork
    begin #2 $display("A"); end
    begin
      fork
        #4 $display("B");
        #6 $display("C");
      join_none
      #3;
      disable fork;
      $display("D");
    end
  join
  $display("E");
end
Choose one

Answer choices

  1. A. A, D, E
  2. B. A, D, B, C, E
  3. C. A, B, C, D, E
  4. D. D, E; A, B, and C are all killed
Continue practicing

Related questions

SystemVerilogInactive, nonblocking assignment (NBA), and postponed regions→SystemVerilogDelayed nonblocking assignments→
asic.fyi · Learn silicon end to end.info@asic.fyi