Jump to content

Recommended Posts

Hi guys

I'm working on a simulation system that the connection between components changes during the execution of the system.

First time I'm facing this issue and not quite sure if I can change module to module connections during run-time and dynamically.

Any thoughts how I can do this in SystemC?

Thanks

Link to post
Share on other sites

Thanks a lot. I hope there was a way to avoid hacky solutions.

I know SystemC is heavily used for modeling SoCs (where things are pretty much fixed by design) but this is a real network-related use case which I could happily use SystemC to model.

Link to post
Share on other sites

There are several ways to approach this. A custom channel would be another approach, where the channel determined connectivity internally.

I would also say that these approaches would not be considered "hacky". SystemC is intentionally built on C++ [see note] to allow you more freedom in modeling. Synthesis tools are a bit more picky, but for modeling there are many approaches. Usually, it helps to provide block diagrams describing what you are modeling and where the connectivity needs to be dynamic. From that we can make a number of suggestions.

A hack approach would involve modifying the SystemC source code itself directly. That I would strongly discourage. You may look at it and even copy ideas from it, but don't use a modified SystemC source except experimentally when proposing changes via a git branch (and you probably need to be a committee member).

Note: The best modeling teams develop strong C++ proficiency (i.e., go beyond the basics of C and really learn a solid breadth of coding techniques in C++ using the full standard library).

Link to post
Share on other sites
On 1/4/2021 at 7:04 PM, David Black said:

There are several ways to approach this. A custom channel would be another approach, where the channel determined connectivity internally.

I would also say that these approaches would not be considered "hacky". SystemC is intentionally built on C++ [see note] to allow you more freedom in modeling. Synthesis tools are a bit more picky, but for modeling there are many approaches. Usually, it helps to provide block diagrams describing what you are modeling and where the connectivity needs to be dynamic. From that we can make a number of suggestions.

A hack approach would involve modifying the SystemC source code itself directly. That I would strongly discourage. You may look at it and even copy ideas from it, but don't use a modified SystemC source except experimentally when proposing changes via a git branch (and you probably need to be a committee member).

Note: The best modeling teams develop strong C++ proficiency (i.e., go beyond the basics of C and really learn a solid breadth of coding techniques in C++ using the full standard library).

Thanks a lot David. Having been developing SystemC models for years, I cherish your insight.

I have attached a sample of design I'm trying to model. Tasks T_A communicate with tasks T_B over a communication channel (depicted as FIFOs). The connections between T_A and T_Bs are changing. Communication Manager (depicted) manages how the connections should be changing.

I can pull in the communication channels (FIFOs with added features) into the implementation of T_A or T_Bs but it's not a good representative of the actual system. I was hoping to keep them as separate entities (keep all connections within Communication Manager and free the tasks from having the knowledge of whom they need to connect to) and connect/reconnect using ports/exports or TLM sockets.

I can certainly do C++ modeling and use SystemC for handling events/timing as well. 

Any techniques/ideas you have is very much appreciated.

Sample Model.pdf

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