jpeeters Posted December 13, 2013 Report Share Posted December 13, 2013 Hi, I encounter a problem when using the sc_spawn primitive. THE SCENARIO is the following: I call sc_spawn each time a new request arrives on my component. Then, the request is handled by its own thread process, which leads to activate an edge in the FSM. The spawned process does not contain an infinite loop and terminate as soon as it finishes processing the request. THE PROBLEM: An unknown exception is thrown when the spawned thread process terminates. The exception comes from sc_core::sc_cor_pkg_qt::abort( ... ) apparently. Could any one help me or give me advice for solving this problem ? Best, Julien. Quote Link to comment Share on other sites More sharing options...
dakupoto Posted December 14, 2013 Report Share Posted December 14, 2013 Hi, I encounter a problem when using the sc_spawn primitive. THE SCENARIO is the following: I call sc_spawn each time a new request arrives on my component. Then, the request is handled by its own thread process, which leads to activate an edge in the FSM. The spawned process does not contain an infinite loop and terminate as soon as it finishes processing the request. THE PROBLEM: An unknown exception is thrown when the spawned thread process terminates. The exception comes from sc_core::sc_cor_pkg_qt::abort( ... ) apparently. Could any one help me or give me advice for solving this problem ? Best, Julien. Hello Sir, Without any details, one can guess at the potential error source. First of all. the SystemC module must use the three built-in macros 1. SC_HAS_PROCESS 2. SC_FORK 3. SC_JOIN Please ensure that these have been used correctly. Secondly, as dynamic processes do not have any corresponding hardware equivalent, and so one has to consider carefully whether using them is necessary. Also, the Linux operating system itself provides 'fork-join' system commands, so why not use them ? Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted December 14, 2013 Report Share Posted December 14, 2013 Julien, in order to give you any reasonable advice to track down the problem, you need to provide additional information about your setup: SystemC version platform, compiler, flags compile/runtime warnings and errors ideally, a code sample to demonstrate the problem An unknown exception is thrown when the spawned thread process terminates. The exception comes from sc_core::sc_cor_pkg_qt::abort( ... ) apparently. Do you still use SystemC 2.2.0? If this is the case, please try to reproduce the problem with 2.3.0. SystemC 2.3.0 should not report "UNKNOWN EXCEPTION" except for exceptions thrown by the user (or third-party libraries) with types not derived from std::exception. This does not happen from within the SystemC library itself. Secondly, sc_core::sc_cor_pkg_qt::abort does not throw any C++ exception on its own. Maybe, there is a destructor throwing from your terminating process? Greetings from Oldenburg, Philipp 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.