Forj-join 2

Broadcomm

Problem Description

Implement the task run_parallel_tasks() using SystemVerilog fork-join constructs.

Requirements

Create three parallel processes:

  • Process-1 waits for 10ns and increments p1_cnt.

  • Process-2 waits for 20ns and increments p2_cnt.

  • Process-3 waits for 30ns and increments p3_cnt.

The task must:

  1. Launch all three processes in parallel.

  2. Return immediately after the first process completes.

  3. Terminate all remaining processes.

  4. Increment exit_cnt before exiting.

SystemVerilog

Code Editor Access

Log in to write, run and submit your solution to this interview question. It's free.

Output

Output goes here...