Jump to content

2 TLM buses communication


Recommended Posts

Hi All

I am new to systemC and TLM

I need to connect 2 processing systems over TLM bus each system has CPU and dedicated Memory

1. how can I make the 2 PS communicate over TLM?

2. Is it better to make TLM bus 1 for PS1 and TLM bus 2 for PS2, then connect both to a new TLM Bus? How can this be done?

3. I think in another approach to use a single memory and give each processor part in it to load its own elf file there? Is this a good alternative?

 

Regards,

Link to comment
Share on other sites

Assumption: TLM means TLM 2.0

Each system has at least one initiator (presumably the CPU). Initiators cannot talk directly to one another because that would be like saying function f1() can somehow cause function f2() to call f1() and interchange information. It just doesn't work.

However, f1() can deposit data in an agreed upon shared data location, and f2() can then interrogate that memory location. Furthermore, in SystemC, the call of f1() can also invoke an sc_event to wake up the other process from sleep. There is a danger to be aware of depending on how the information is transferred. If the information is exchanged atomically, there is not problem, and this is easy to accomplish in SystemC modeling since it is currently a cooperative multi-tasking environment. However, if your channels simulate timewise transfer of data, then you may need to include a SystemC mutex.

A trivial way of ensuring synchronization would be to simply use an sc_fifo or a tlm_fifo in the target object.

Suggestion: Learn SystemC core concepts before learning TLM-2.0.

Link to comment
Share on other sites

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...