Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Fork-join_any

Hardware interview practice

Fork-join_any

EasyVerification UtilitiesSystemVerilog

Which output and completion time are 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 →
Starting point

Question code

initial begin
  fork
    #2 $display("A");
    #5 $display("B");
    #7 $display("C");
  join_any
  $display("after %0t", $time);
  disable fork;
end
Choose one

Answer choices

  1. A. A, then after 2; B and C are terminated
  2. B. A, B, C, then after 7
  3. C. after 0; all branches are terminated before printing
  4. D. A, then after 2, followed by B and C
Continue practicing

Related questions

Verification UtilitiesFork-join_none→Verification UtilitiesWait fork→
asic.fyi · Learn silicon end to end.info@asic.fyi