# Event Synchronization Issue in SystemVerilog D Flip-Flop (DFF) Testbench

**URL:** <https://verificationacademy.com/forums/t/event-synchronization-issue-in-systemverilog-d-flip-flop-dff-testbench/49534>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, event-trigger\
**Created:** [February 2, 2025, 11:19am UTC](https://verificationacademy.com/forums/t/event-synchronization-issue-in-systemverilog-d-flip-flop-dff-testbench/49534 "2025-02-02T11:19:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [February 3, 2025, 6:45pm UTC](https://verificationacademy.com/forums/t/event-synchronization-issue-in-systemverilog-d-flip-flop-dff-testbench/49534/4 "2025-02-03T18:45:20Z")

</div>

If all of your run methods have a definitive termination, then the simple fork join construct works. But in most testbenches the driver and monitor processes run indefinitely. So it’s only when some of the processes finish that you want to end the test. You can do that using a semaphore as described [here](https://verificationacademy.com/forums/t/resume-simulation-when-any-2-threads-out-of-3-get-completed-within-fork-join-any/32572/2).

The UVM has objection and barrier classes that help you out when to know the test is done.

---

_[View the full topic](https://verificationacademy.com/forums/t/event-synchronization-issue-in-systemverilog-d-flip-flop-dff-testbench/49534)._
