The systemverilog semaphore
is really half baked.
I could not find any way to release the semaphores in case of a reset
, something like .flush()
for uvm_tlm_fifo
?
There is also no method to know how many semaphores are locked?
Is there some wrapper available in UVM
something like uvm_event
which extends the basic semaphore functionality?
People suggested me to use mailbox/tlm_fifo for more functionality, but i could not find an alternate to semaphore for allocating more than 1 keyCount
.
If anyone has any suggestions please let me know.
Thanks in advance.
SystemVerilog's semaphore and mailbox are basic built-in classes that you can extend to suit your needs. Semaphores provide the basic key locking and unlocking mechanisms, but it is up to you to manage the keys.
What I meant was you can extend or encapsulate the semaphore to control who has access to the keys and how many keys are in use.