SiGa Posted January 21, 2020 Report Share Posted January 21, 2020 I used sc_spawn a lot for generating processes at runtime. Is there a similar way to spawn a signal? As I understand SystemC, a signal is the data type and the port of a module is a pointer to the datatype. So it should be possible to create them at runtime or not? Why do I need it? I have a given module that has a varying set of ports and I want to attach and connect these ports with signals dynamically. Best regards and thanks in advance, SiGa Quote Link to comment Share on other sites More sharing options...
David Black Posted January 21, 2020 Report Share Posted January 21, 2020 Sc_signals are not data types. Sc_signals are channels, which represent hardware being modeled and are used as mechanisms to transport data between processes. As such, channels are only allowed to be created during the “elaboration phase” that occurs prior to simulation starting up. Also, strictly speaking, sc_port’s are not normal pointers; although, an underlying mechanism uses pointers for efficiencies sake. The operator->() is overloaded on sc_port<IF_TYPE>. You could of course create an sc_vector< sc_signal<T> >, N >, where N was a maximum of the number of signals required and then allocate specific index to each spawned process. SiGa 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.