Search the Community
Showing results for tags 'sc_spawn'.
Hi I am not able to think of the case where we need to create dynamic processes using sc_spwan and cases where simple SC_THREAD/SC_METHOD is not suffice. Can you give me few example cases where I must use sc_spawn during end_of_elaboration or during simulation to create the processes? Thanks in advance Thanks Sumit
Hello All, I need to spawn a large number of threads for my simulation using sc_spwan(). My threads are very small piece of code. When I have 16384 threads the simulation stops by issuing the following message in iteration 5504 of the loop invoking sc_spawn(): Error: (E549) uncaught exception: std::bad_alloc In file: ../../../../src/sysc/kernel/sc_except.cpp:98 I know this happens due to stack size, but I don't know how much memory is used by each thread. Q1) Is there a way to get the size of stack for each thread? Is there a method/function like get_stack_size()? Q2) How can I use set_stack_size() when invoking sc_spawn()? Q3) My simulation is run in CygWin under Windows 7 (32-bit). Does 32-bit the OS impose a limitation to the stack size? In other words, can the problem be fixed using a 64-bit OS? Thank you so much in advance!
Hello, To allow setting static sensitivity of dynamically spawned processes to an or'd list of sc_events, I expected to see a method like: void sc_spawn_options::set_sensitivity(const sc_event_or_list *); but do not see any such. next_trigger and wait however, do accept a reference to sc_event_or_list, so it appears to be inconsistent? For, dynamic sensitivity can use sc_event_or_list, but not static sensitivity.. I suppose we can't use sc_event_or_list to set the static sensitivity of statically spawned threads either (created using SC_THREAD/SC_METHOD) - but that is not my need. Further, there doesn't seem to be any way to retrieve the list of sc_event from an sc_event_or_list (as, say, std::vector<sc_event *>). If that was possible, then I could have called the set_sensitivity(const sc_event *) method repeatedly, for all events in the or'd list. Any help appreciated, thanks.
I am interested in learning whether SystemC supports parallel simulation - that is, utilizing multicore processor or multiprocessor systems to speed up simulations. I see in the SystemC 2.1 Features document the specification of a function sc_spawn. Does this function spawn an new Linux process? Near the end of the Features document, there is mention of thread support based on Posix threads. Does building SystemC with pthreads enabled allow for multi-threaded simulations? If so, is a thread created for each SC_THREAD and SC_METHOD, or is some other approach used? Any help is appreciated. Patrick