Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is semaphore and where to use in System Verilog?

Status
Not open for further replies.

aswin123

Junior Member level 2
Junior Member level 2
Joined
May 26, 2007
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,441
what is semaphore and where to use in system verilog............suggest me.
 

system verilog

Hi,

semaphore is like a key one who have it can use it.
I will give u example.....if two concurrent threads are using the same variable race condition can persist but if u use semaphore
at one time only one thread can have access to it.

just try to understand the concept of Automatic variable....same way semphores are used.

Manmohan
 

system verilog

Used in verification.
Most famous example is memory read and write operation.
If you are doing memory read and write operation to same address from ur verification env,but the dut can allow only one operation at a time.
So semaphore gives you the keys like a car keys.Many drivers may be there to drive a car ,u got only one key.so get the keys, do ur work,put back the keys so some one can use it..
 

    aswin123

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top