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

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

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);

}

}

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

}

}

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...