Jump to content

runtime error :- Fatal: (F4) assertion failed: iface != 0

Recommended Posts

Hi All,

I am new to the SystemC language.

I am working on some SystemC project. Although all modules are compiled without any warning, there is a runtime error as follow. Can anyone help me to find out the reason for below error?

Fatal: (F4) assertion failed: iface != 0
In file: /usr/local/systemc-2.3.3/include/sysc/communication/sc_port.h:553



Share this post

Link to post
Share on other sites

This means that a port is not bound to an interface. A port is just a kind of a forwarder of an interface. So if none is bound nothing can be forwarded. E.g. if you have a sc_in<bool> it forwards the sc_signal_in_if which allows you to read and wait for events. But there needs to be 'something on the other side' which is usually a signal (implementing the sc_signal_in_if) being bound to the socker.

But without further information it is hard to provide more help.

Best regards

Share this post

Link to post
Share on other sites

The issue is likely caused  because you access a port (via -> or for example calling functions like .read()) already inside the module constructor.
You should only access ports after binding has completed, this means from within a SystemC process or in end_of_elaboration()start_of_simulation() callbacks.

Hope that helps,

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