Search the Community
Showing results for tags 'sensitive'.
-
I am curious to know, what would happen if we do not specify the sensitivity of a void function inside the constructor. sc_module(my_module){ //port definition void do_void() { // function definition } sc_ctor(my_module){ // some initialization sc_method(do_void) // nothing mentioned in sensitivity } };
-
Hey Everyone, I'm very new to SystemC so this might sound like a pretty trivial question, but I'm not really sure what specifically to look for in order to resolve this issue. I have a simple module with 2 input ports and an SC_THREAD method which is sensitive to these inputs. The function assigned to this SC_THREAD is : void test() { while(true) { wait(); cout<<"received"<<endl; } } In sc_main where I instantiate this module, I attach 2 signals (laneA and laneB) to its 2 input ports and execute the following : sc_start(); laneA.write(testA); laneB.write(testB); My assumption was that the output printed in test() would be called twice (once for each of the writes). Unfortunately, it is only printed once. I'm sure there must be some underlying misunderstanding here, but hopefully it is something trivial. Another clue that I've misunderstood something is that if I print the contents of both the ports within the while(true){} block, both of the values written in sc_main appear. So, what exactly am I missing about the overall flow of execution? Any help would be greatly apprecaited. Thanks in advance! Elliott