# \#fork

**URL:** https://verificationacademy.com/forums/tag/fork/6041.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Develop 5 threads by using threads concept and make sure if any of 3 threads are completed out of 5 threads then kill other 2 threads](https://verificationacademy.com/forums/t/develop-5-threads-by-using-threads-concept-and-make-sure-if-any-of-3-threads-are-completed-out-of-5-threads-then-kill-other-2-threads/49853)

<div class="topic-metadata">

**Author:** [@Surya\_prakash.Kapireddy](https://verificationacademy.com/forums/u/Surya_prakash.Kapireddy)\
**Replies:** 5\
**Last updated:** [March 18, 2025, 4:54pm UTC](https://verificationacademy.com/forums/t/develop-5-threads-by-using-threads-concept-and-make-sure-if-any-of-3-threads-are-completed-out-of-5-threads-then-kill-other-2-threads/49853 "2025-03-18T16:54:24Z")

</div>

develop 5 threads by using threads concept and make sure if any of 3 threads are completed out of 5 threads then kill other 2 threads.

---

## [Fork join\_none abruptly terminates](https://verificationacademy.com/forums/t/fork-join-none-abruptly-terminates/48693)

<div class="topic-metadata">

**Author:** [@cropty](https://verificationacademy.com/forums/u/cropty)\
**Replies:** 6\
**Last updated:** [October 15, 2024, 3:47pm UTC](https://verificationacademy.com/forums/t/fork-join-none-abruptly-terminates/48693 "2024-10-15T15:47:35Z")

</div>

I have a function as below in a child class function void func\_a(); sample\_dut\_signal(0); endfunction function void func\_b(); sample\_dut\_signal(1); endfunction function void sample\_dut\_signal(bit sel); fork …

---

## [Using forever for multiple execution of a task](https://verificationacademy.com/forums/t/using-forever-for-multiple-execution-of-a-task/48028)

<div class="topic-metadata">

**Author:** [@Moein75](https://verificationacademy.com/forums/u/Moein75)\
**Replies:** 5\
**Last updated:** [August 24, 2024, 7:25am UTC](https://verificationacademy.com/forums/t/using-forever-for-multiple-execution-of-a-task/48028 "2024-08-24T07:25:38Z")

</div>

I used forever for multiple execution of a task. I expect the simulation time to increase when I run the simulation because I used forever loop in join-none, but I see that the time stays at zero. I think the simulator s…

---

## [How to restart a fork block after disabling it?](https://verificationacademy.com/forums/t/how-to-restart-a-fork-block-after-disabling-it/41516)

<div class="topic-metadata">

**Author:** [@ArielElliassi](https://verificationacademy.com/forums/u/ArielElliassi)\
**Replies:** 2\
**Last updated:** [April 16, 2023, 9:33am UTC](https://verificationacademy.com/forums/t/how-to-restart-a-fork-block-after-disabling-it/41516 "2023-04-16T09:33:15Z")

</div>

Hello, I have a code in this form: forever begin @(case1, case2) fork begin // first block \<wait 3 clocks\> \<some code\> end begin // second block @(case1) end join\_any disable fork; end …

---

## [Fork in a for loop](https://verificationacademy.com/forums/t/fork-in-a-for-loop/41007)

<div class="topic-metadata">

**Author:** [@Husni\_Mahdi](https://verificationacademy.com/forums/u/Husni_Mahdi)\
**Replies:** 3\
**Last updated:** [November 15, 2022, 12:35pm UTC](https://verificationacademy.com/forums/t/fork-in-a-for-loop/41007 "2022-11-15T12:35:33Z")

</div>

\*\*Consider the code; \*\* module tb; initial begin for (int i = 0; i\<3; i++) begin fork begin automatic int j = i; print(j); …

---

## [Calling fork/join\_none inside task](https://verificationacademy.com/forums/t/calling-fork-join-none-inside-task/37475)

<div class="topic-metadata">

**Author:** [@haykp](https://verificationacademy.com/forums/u/haykp)\
**Replies:** 5\
**Last updated:** [April 22, 2020, 7:25am UTC](https://verificationacademy.com/forums/t/calling-fork-join-none-inside-task/37475 "2020-04-22T07:25:31Z")

</div>

Dear Community, I am calling fork/join\_none inside task but it is not working. This is my code: class myCcixUvmVirtualSequence\_passivePCIeEP extends uvm\_sequence; task initPcieLink(); $display("\\n\[initPcieLink\]…

---

## [Fork statement design, wait for one thread only](https://verificationacademy.com/forums/t/fork-statement-design-wait-for-one-thread-only/34227)

<div class="topic-metadata">

**Author:** [@mikefitzgerald](https://verificationacademy.com/forums/u/mikefitzgerald)\
**Replies:** 4\
**Last updated:** [March 28, 2018, 6:02am UTC](https://verificationacademy.com/forums/t/fork-statement-design-wait-for-one-thread-only/34227 "2018-03-28T06:02:30Z")

</div>

What is best way to build a fork/join\_xx strategy which blocks on one particular task, then un-blocks when that task finishes, ignoring what the others have done. In this example three threads are launched, how can we b…

---

## [My 'forever' inside a 'fork' doesn't act as I expect](https://verificationacademy.com/forums/t/my-forever-inside-a-fork-doesnt-act-as-i-expect/34126)

<div class="topic-metadata">

**Author:** [@ntmccork](https://verificationacademy.com/forums/u/ntmccork)\
**Replies:** 1\
**Last updated:** [February 23, 2018, 10:23pm UTC](https://verificationacademy.com/forums/t/my-forever-inside-a-fork-doesnt-act-as-i-expect/34126 "2018-02-23T22:23:45Z")

</div>

So I communicate with the testbench over a socket in DPI-C, waiting on and receiving data is a blocking call. When the socket returns data, C then calls a setter function in SV, and returns from DPI-C thus unblocking SV …

---

## [How to ensure that specific code will be executed before another?](https://verificationacademy.com/forums/t/how-to-ensure-that-specific-code-will-be-executed-before-another/32894)

<div class="topic-metadata">

**Author:** [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Replies:** 2\
**Last updated:** [February 24, 2017, 8:16am UTC](https://verificationacademy.com/forums/t/how-to-ensure-that-specific-code-will-be-executed-before-another/32894 "2017-02-24T08:16:25Z")

</div>

I have the following code in my monitor: virtual task run\_phase(uvm\_phase phase); fork begin : clock\_c forever begin wait(vif.fact\_log2\_samp != fact\_log2\_samp\_init); for(int counter = 0; cou…
