ankushKumar Posted July 27, 2015 Report Share Posted July 27, 2015 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 Quote Link to comment Share on other sites More sharing options...
apfitch Posted July 29, 2015 Report Share Posted July 29, 2015 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 Quote Link to comment Share on other sites More sharing options...
ankushKumar Posted July 30, 2015 Author Report Share Posted July 30, 2015 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); } } Quote Link to comment Share on other sites More sharing options...
kaiserhaz Posted July 30, 2015 Report Share Posted July 30, 2015 Wouldn't you need to use the bind() method for binding? Not sure about binding ports during construction. Quote Link to comment Share on other sites More sharing options...
apfitch Posted July 30, 2015 Report Share Posted July 30, 2015 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 Quote Link to comment Share on other sites More sharing options...
ankushKumar Posted July 31, 2015 Author Report Share Posted July 31, 2015 Wouldn't you need to use the bind() method for binding? Not sure about binding ports during construction. in Constructor bind() is not required for parent child binding. Quote Link to comment Share on other sites More sharing options...
ankushKumar Posted July 31, 2015 Author Report Share Posted July 31, 2015 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 } } Quote Link to comment Share on other sites More sharing options...
apfitch Posted August 1, 2015 Report Share Posted August 1, 2015 In your original error message, what is i_top? Alan Quote Link to comment Share on other sites More sharing options...
ankushKumar Posted August 3, 2015 Author Report Share Posted August 3, 2015 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. Quote Link to comment Share on other sites More sharing options...
apfitch Posted August 3, 2015 Report Share Posted August 3, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.