Mailboxes, events, and semaphore in the SystemVerilog

Source: Internet
Author: User
Tags semaphore

The mailboxes, events, and semaphore mechanisms in SystemVerilog are designed to achieve communication in the process, and the three mechanism functions are similar until the three mechanisms are learned. It is now found that in fact three mechanisms include three aspects of communication between processes.


The main function of the mailbox is to allow different processes to pass data and cross class method calls, the advantage of using the mailbox mechanism is that you do not need to introduce a complex hierarchy of references, you can invoke the methods of other objects in one object to process the data, and if the code of the class of the invoked method changes, you do not need to modify the code as a whole.

The function of the event is to realize the synchronization of communication between processes, that is, to cause the blocking and execution of the process through the events, to achieve the handshake between processes, and to avoid errors in the timing of process processing.

The main purpose of semaphore is to make certain resources can only be accessed by a specified number of processes at the same time, avoid two parallel processes to modify some data at the same time, resulting in unknown errors.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.