Jump to content

Why call end_of_elaboration in sc_port_base::elaboration_done()


taog

Recommended Posts

Hi all, I'm not familiar with SystemC source code. I'm debugging a segment fault issue inside SystemC.

The call stack is like below:

#0  0x000000000048124e in sc_core::sc_inout<bool>::end_of_elaboration() ()
#1  0x0000000000473d8e in sc_core::sc_port_base::elaboration_done() ()
#2  0x0000000000474ab3 in sc_core::sc_port_registry::elaboration_done() ()
#3  0x00000000004e1e0c in sc_core::sc_simcontext::elaborate() ()
#4  0x00000000004e3d1d in sc_core::sc_simcontext::initialize(bool, bool) ()
#5  0x00000000004e3e04 in sc_core::sc_simcontext::initialize(bool) ()
#6  0x00000000004e3e26 in sc_core::sc_simcontext::simulate(sc_core::sc_time const&) ()
#7  0x00000000004e4022 in sc_core::sc_start(sc_core::sc_time const&, sc_core::sc_starvation_policy) ()

In src/sysc/communication/sc_port.cpp, I found

void
sc_port_base::elaboration_done()
{
    assert( m_bind_info != 0 && m_bind_info->complete );
    delete m_bind_info;
    m_bind_info = 0;

    sc_module* parent = static_cast<sc_module*>( get_parent_object() );
    sc_object::hierarchy_scope scope( parent );
    end_of_elaboration();
}

// called by elaboration_done (does nothing)

void
sc_port_base::end_of_elaboration()
{}

Why we call end_of_elaboration() here and why we come to sc_core::sc_inout<bool>::end_of_elaboration()? Maybe the call stack is not correct.

Link to comment
Share on other sites

  • taog changed the title to Why call end_of_elaboration in sc_port_base::elaboration_done()

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...