Jump to content
jpeeters

UNKNOWN EXCEPTION at the end of spawned process

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×