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?



Share this post

Link to post
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.

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