# What is the purpose of using "program block" in Systemverilog?

**URL:** <https://verificationacademy.com/forums/t/what-is-the-purpose-of-using-program-block-in-systemverilog/34806>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, program-block\
**Created:** [August 6, 2018, 6:44am UTC](https://verificationacademy.com/forums/t/what-is-the-purpose-of-using-program-block-in-systemverilog/34806 "2018-08-06T06:44:55Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![shahkavish77](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shahkavish77](https://verificationacademy.com/forums/u/shahkavish77)\
**Post date:** [January 4, 2020, 2:34am UTC](https://verificationacademy.com/forums/t/what-is-the-purpose-of-using-program-block-in-systemverilog/34806/4 "2020-01-04T02:34:06Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/what-is-the-purpose-of-using-program-block-in-systemverilog/34806/4):_

Hi Dave,

From SV LRM, 24.4 Eliminating testbench races,  
It is important to understand that simply sampling input signals (or setting nonzero skews on  
clocking block inputs) does not eliminate the potential for races. Proper input sampling only addresses a single clocking block. With multiple clocks, the arbitrary order in which overlapping or simultaneous clocks are processed is still a potential source for races. The program construct addresses this issue by scheduling its execution in the Reactive region, after all design events have been processed, including clocks driven by nonblocking assignments.

Does it mean that Program block is mandatory while dealing with multiple clocks/clocking blocks ?

---

_[View the full topic](https://verificationacademy.com/forums/t/what-is-the-purpose-of-using-program-block-in-systemverilog/34806)._
