Jump to content

Recommended Posts

Posted

I want to synchronize between monitor and driver. If a number of read requests are put. The driver should not do other transactions until all the read transactions are complete. I check for the read data in monitors.

Can i use a semaphore in both the monitor and the driver processes to hold the driver from issuing any other transaction till the monitor informs all the read data was received. How can I use this?

Or, is there any other way doing this synchronization?

Thanks,

Sandip

Posted

A crude way would be to have a variable indicating the number of pending_reads in a "common" place (say in a package) and access ti both from monitor and driver. One could use uvm_config_db to keep it more scalable/reusable maybe - but I am not sure if these are good "architectural" level solutions, your problem may better be solved via better re-arch, though it can't be done via forums/email.

HTH

Ajeetha, CVC

www.cvcblr.com/blog

Posted

If you just using SV, you can use semaphore. Put a key in it when driver send a read trans, and get a key out when monitor recieve a read data. Then, whenever need issue a write transfer, the driver need check whether there is still key in the semaphore (use try_get task).

Posted

hi,

it depends what you mean with "synchronize".

- the monitor should work without the driver being present (in passive mode you just observe)

- the driver and the monitor should always observe the very same interface

- so all the driver can do is to utilize events from the monitor (since driver and monitor look at the same wires they should generate the same events - this is therefore a small shortcut)

depending upon your infrastructure you can use a semaphore, an objection + all_dropped/wait_for*, or you could eventually use a normal fork/join. you could also instantiate 4 single threaded drivers which ensures to have at max 4 items running. or you fork 4 independent get_next_item+drive threads...

/uwe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...