Jump to content

Recommended Posts

Hello All,

 

I am trying to create a generic TLM interface for 2 to 3 modules . In which i am virtually inherting the tlm interface . But i am getting an error . Could you tell me the cause of error.

example

 class A : public sc_module, public my_tlm_interface_fw{

};

 

class B : public sc_module, public my_tlm_interface_forward , public my_tlm_interface_backward{

}

 

class C : public sc_module, public my_tlm_interface_backward{

}

 

and binding

 

C->initiator(B->target)

B->initiator(A->target)

 

 

Error: (E124) sc_export instance not bound to interface at end of construction: export 'i_top.tlm_base_initiator_socket_export_0' (sc_export)
In file: ../../../../src/sysc/communication/sc_export.cpp:135

Share this post


Link to post
Share on other sites

Are you binding the sockets to the classes they're instanced in? You need to bind the sockets so that the exports can export the interfaces of the classes,

 

If you could show more of class A (including the constructor and the socket declaration), that would help,

 

regards

Alan

Share this post


Link to post
Share on other sites

Hi,

here is the decription of class A

class A{

public :

tlm::tlm_target_socket<BUS_WIDTH> target_socket;

void b_transport(tlm::tlm_generic_payload& trans, sc_core::sc_time &t){}

A(sc_module_name name):sc_module(name),target_socket("target_socket"){

target_socket(*this);

}

}

Share this post


Link to post
Share on other sites

In the original message I've realised it's probably referring to class B (as it mentions the initiator socket). So have you bound the export to *this in class B, the class with the initiator socket?

 

regards

Alan

Share this post


Link to post
Share on other sites

Hi Alan,

in class B what actualy i am doing is :

class B : public sc_module, public my_tlm_interface_forward , public my_tlm_interface_backward{

tlm::tlm_target_socket<BUS_WIDTH> target_socket;

tlm::tlm_initiator_socket<BUS_WIDTH> initiator_socket;

E *e;

B(sc_module_name name):sc_module(name),target_socket("target_socket"){

target_socket(*this);

initiator_socket(*this);

e = new E(this); // IN THIS e I AM ALSO utilizing THE BACKWard interface

}

}

Share this post


Link to post
Share on other sites

i_top is the top module where i am biniding my testbench with my systemc model through initiator socket and target socket. Secondly, my model also have top model where i have binded parent child binding and also internal initiator and target socket binding.

Share this post


Link to post
Share on other sites

The error message seems to be saying that you have a tlm_initiator_socket instanced in i_top? From your description in the previous message, that sounds wrong, I thought you were saying that in i_top thee is just an instance of the testbench and the model.

 

Alan

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