system verilog - Systemverilog Mailbox and Queue -


i not able understand, why prefer mailbox on queue inter process communication (eg: communication between driver , scoreboard)?

a mailbox built-in class around queue uses semaphores control access ends of queue. mailbox has fifo element ordering whereas can access head, tail, or middle elements of queue.

you typically use mailbox when there multiple threads reading , writing data , need atomic test-and-set operation of semaphore know when mailbox full or empty. if have 1 process reading , writing queue, there no need use mailbox. if there more 1 thread, mailbox convenient class use.

in uvm, use tlm fifo wrapper around mailbox. tlm connections provide isolating interface don't have know on other side of port. see https://verificationacademy.com/sessions/how-tlm-works


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -