Jump to content
katang

Sharing modules

Recommended Posts

I want to share some modules; something similar to when HW threads share the same physical core,

but they run different SW threads. My idea is that I need vectors of events and data structures. When using static threads,

I cannot change simply and safely the thread, and actually, I need to repeat the code for the threads., Even if I use dynamic threads,

and can have parameters, the processes must be distinguished and I need several handles. I would need something as

when an item on an event vector sends notification, the shared common code receives the index of the item in the vector.

Quite similar as the different instantiations of an object share the code, but not their data. Is there any mechanism for what I want to do?

 

Share this post


Link to post
Share on other sites

Dynamic threads have sc_process_handle's that can be used to distinguish them from one another. Dynamic processes can also have arguments passed when they launch by value, reference and const reference. So processes are not a problem.

Vectors of sc_event's should be fine (because they are not considered as elaboration time only objects), data structure can be done the same.

Ports and modules on the other hand are somewhat problematic; however, you could allocate sc_vector's of these with a fixed upper limit; however, connectivity must be fixed at elaboration.

You will of course need to manage the configuration information as to how you use these.

I suspect that once you properly define the parameters of your design, it will all be possible.

I suggest you first draw a diagram illustrating what you are attempting to do and describe the application. You certainly cannot have an open-ended "I want it to do everything". So please indicate the bounds and time relevant information. Perhaps provide a UML sequence diagram to give a better idea of the dynamic nature required.

Share this post


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