Zdenek Prikryl

Synchronization in non-blocking transports

1 post in this topic

Hello,

I have two objects. One is a memory, and the second one is a generator. They are connected via a TLM socket. At the same time, both objects have a method that is sensitive on the clock. The method prepares data for write transactions and it should also pick-up data from reading transactions (and vice versa). It should also check the status of the transactions. I'd like to use a TLM socket for data passing instead of a pin-accurate model of memory interfaces. See the picture in the attachments. The issue is a synchronization because there is a clock (one source of events) and PEQ for sockets (second source of events). Is there any recommended/standard solution for this?

For more detailed description of the issue, let's imagine the following scenario.

Clock cycles

  1. a) Generator's clock cycle method issues a write request to the memory (data is not passed yet)
    b) The memory accepts the write request via the forward path, stores it to PEQ.
  2. a) Generator's clock cycle method prepared data and updates the payload for the write request (already in memory's PEQ).
    b) Generator's clock cycle method would like to check the status of the write (so it can mark the write transaction as finished ok or not). The memory should handle the write request in PEQ now and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?).
    c) Generator's clock cycle method issues a read request to the memory.
    d) The memory accepts the read request via the forward path, stores it to PEQ.
  3. a) Generator's clock cycle method would like to check the status of the read request. The memory should handle the read request in PEQ now, update the payload with data, and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?).
    b) If the response is ok, then generator's clock cycle method picks-up data and move on.
  4. ...
     

Any help would be appreciated.

Thanks and best regards.

--
Zdenek

sc_tlm_clk.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now