fayz Posted October 31 Report Share Posted October 31 Is it possible to perform operations on sc_signal in top module then connecting to ports? Quote Link to comment Share on other sites More sharing options...
Eyck Posted October 31 Report Share Posted October 31 Connecting a signal to a port can only happen before the simulation starts (before end_of_elaboartion() ). Signal manipulation can only happen during simulation. So the answer is no. fayz 1 Quote Link to comment Share on other sites More sharing options...
David Black Posted October 31 Report Share Posted October 31 However, if you intend to provide an initial value before anyone reads the signal, that can be accomplished during start_of_simulation. SystemC is designed with idea that hardware is fabricated (I.e., constructed or instantiated) and connected (aka port binding) before power is applied (i.e., active simulation starts). Formally, this is broken up into two major phases known as elaboration (i.e., construction and binding) and simulation. You can read about this in the standard (IEEE 1666-2023) sections 4.2 (elaboration) and 4.3 (simulation). You can obtain a free copy of the standard via a download at the end of https://systemc.org/overview/systemc/ . If you are trying to simulate the idea of dynamic connections (e.g., plugging in/out a USB port or cell phones coming within range of a tower), you can accomplish that by fully connecting up all possible USB devices to a custom channel and then managing the state fo that channel (e.g., active or inactive). fayz 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.