Semaphores in SystemVerilog With Examples
Semaphores in SystemVerilog With Examples
Semaphore is a SystemVerilog built-in class, used for access control to shared resources, & for basic synchronization.
A semaphore is like a bucket with the number of keys. processes using semaphores must first procure a key
from the bucket before they can continue to execute, All other processes must wait until enough keys are returned
to the bucket.
new(); Create a semaphore with a specified number of keys as argument (default: 1 key)