Jump to content
gurunath.kadam

SC 2.3.3, Visual Studio 2017: Exception thrown

Recommended Posts

I have successful installation of SystemC 2.3.3 on Visual Studio 2017.

All the enclosed examples compile and run successful.

However, when I create a simple example (listed here: https://www.edaplayground.com/x/5UHA, un-comment lines 4 and 5 in testbench.cpp ), it throws an exception.

The exception is thrown at line:

		SC_METHOD(op_DFF);

And the exception thrown is

    // CHECK IF THIS IS AN sc_module-BASED PROCESS AND SIMUALTION HAS STARTED:

    if ( dynamic_cast<sc_module*>(host_p) != 0 && sc_is_running() )
    {
        report_error( SC_ID_MODULE_METHOD_AFTER_START_, "" );
        sc_abort(); // can't recover from here
    }

in file "sc_method_process.cpp".

The example runs okay on the EDA Playground, which I believe uses g++.

Any tips to resolve this on VS2017?

Thank you.

Share this post


Link to post
Share on other sites

@Roman Popov Hi Roman, thanks for the link.

I found the problem -- it was really stupid. I had Debug + x86 selected in VS, but in the properties it was Release + x64. I changed it in the second place as well, which changed the compiler + linker options, and the run time exception was eliminated.

Thanks again.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...