Search the Community
Showing results for tags 'process'.
-
Hey, Kahn Process Networks are defined by the usage of unbounded FIFOs with blocking reads and non-blocking writes. I read on several sources that KPN with bounded FIFO size (i.e. blocking read and blocking write) can be implemented with SystemC (e.g. Grötker et al). It seams that the event based scheduler in SystemC behaves different like data-driven scheduler or a demand-driven for KPNs. I simulated the networks of Park's Dissertation shown on page 36 and 42 which should end up in an artificial deadlock (deadlock which occurs because of blocking write). A global artificial deadlock in SystemC would result in no scheduled events, and therefore, the simulation should be stopped. However, even with buffer size 1 for all FIFOs both examples from Park are continuing with execution: Page 63: http://www.edaplayground.com/x/6Mfi Page 42: http://www.edaplayground.com/x/4jLZ Note that edaplayground exits because of to much output. If you want to test it you better download it and run it on your PC. Apparently, the SystemC scheduler finds automatically a schedule for the KPN such that no artificial deadlocks occur. My question: is there an example where I could also see an artificial deadlock in SystemC? Thanks and Regards Matthias
-
Hi All, I am a novice in systemC. I am having some doubts in using SC_METHOD(). I am building a network simulator in systemC. And from each node there are about four channels. I want the four channels to work simultaneously. The four channels get data from a common buffer in receiver and then transmit. So i declared a SC_Module and declared 4 SC_METHOD processes in it corresponding to each channel. SC_MODULE(NoximRouter) { SC_CTOR(NoximRouter) { //Recieving process SC_METHOD(rxProcess_local); sensitive << reset; sensitive << clock.pos(); ////Transmission processes SC_METHOD(txProcess_mode4); sensitive << reset; sensitive << clock.pos(); SC_METHOD(txProcess_mode1); sensitive << reset; sensitive << clock.pos(); SC_METHOD(txProcess_mode2); sensitive << reset; sensitive << clock.pos(); SC_METHOD(txProcess_mode3); sensitive << reset; sensitive << clock.pos(); } }; But when i try printing sth inside all the methods... I can see for a given simulation time only the receiver method and one of the txprocess method is running....i want everythimng to run parallely... 'kindly help me out.
-
Q1) If I use a fork-join_none to spawn a process in a phase, and then that phase ends (b/c objection is dropped), is the process terminated or allowed to complete? I seem to be seeing that the process is terminated (but was expecting that it would be allowed to complete) and wanted to confirm that this is the expected behavior. Q2) Where is this behavior best documented? (Context: I was moving my timeout-timer from main_phase to pre_reset_phase, so that its time begins at time==0. If processes are killed when a phase ends, I suppose I should move it to run_phase to align it with time==0, ..... or start using the heartbeat component, which I have not gotten around to doing yet, but have been thinking a lot about.)
-
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