If I understand correctly, the ooo comparator accesses ‘shared variables’ received_data and rcv_count from 2 processes.
I would have expected some mechanism like a semaphore to avoid concurrent access to these variables to be present?
In reply to NiLu:
Yes, ideally there should be a semaphore to guard against simultaneous access/modification. In practice, code rarely gets interrupted in the middle of a method except at a blocking statement. But that’s no excuse.
In reply to dave_59:
Hi Dave,
Is the need for a semaphore true, for “Comparing Transactions Assuming In-Order Arrival” where we have the write_before and write_after functions trying to access the function proc_m_data?
Thanks
In reply to UVM_beginner:
No. You do not need an semaphore.