Balakasaiah Posted August 12, 2014 Report Share Posted August 12, 2014 Hi, I am learning SystemC tlms. Can anybody help me with the below issue: -> Initiator Socket declaration is done as: tlm::simple_initiator_socket<Initiator> init_socket; // Initiator is a class name of Initiator -> When i complied a simple program with initiator and target, I got a compilation error as below. ISO C++ forbids declaration of 'simple_initiator_socket' with no type. Quote Link to comment Share on other sites More sharing options...
ralph.goergen Posted August 12, 2014 Report Share Posted August 12, 2014 Hi, The error message says that the compiler does not know the name simple_initiator_socket. Maybe you forgot the include statement for 'simple_initiator_socket'? #include <tlm_utils/simple_initiator_socket.h> Greetings Ralph Quote Link to comment Share on other sites More sharing options...
Balakasaiah Posted August 12, 2014 Author Report Share Posted August 12, 2014 Thanks Ralph, The problem is resolved. Quote Link to comment Share on other sites More sharing options...
Balakasaiah Posted August 12, 2014 Author Report Share Posted August 12, 2014 Hi, One more problem is: It is saying no match function call to 'simple_target_socket<Target, 32u,...>::register_b_transport(Target* const, void (Target::*)(tlm::tlm_generic_payload,sc_core::sc_time&)); The statement i have written is: trg_socket.register_b_transport(this,&Target::b_transport); // Target is a target class name, trg_socket is an instance of the target socket Quote Link to comment Share on other sites More sharing options...
ralph.goergen Posted August 12, 2014 Report Share Posted August 12, 2014 I am not sure what the error is here but I ma wondering about the const in 'register_b_transport(Target* const, void ('. Actually, ,this should be 'register_b_transport(Target* , void ('. Do you call register_b_transport from within a const member function? Quote Link to comment Share on other sites More sharing options...
Balakasaiah Posted August 13, 2014 Author Report Share Posted August 13, 2014 I am calling it from the Constructor of Target class. and the call is as follows: trg_socket.register_b_transport(this, &Target::b_transport); // Target is a target class name, trg_socket is an instance of the target socket Quote Link to comment Share on other sites More sharing options...
Balakasaiah Posted August 13, 2014 Author Report Share Posted August 13, 2014 I have changed the parameter 'tlm::tlm_generic_payload' to 'tlm::tlm_generic_payload &' in the implementation of b_transport method. Now it is working fine. Quote Link to comment Share on other sites More sharing options...
Balakasaiah Posted August 13, 2014 Author Report Share Posted August 13, 2014 In blocking transport calls we are sending delay also. What is the real usage of it.....? Why an initiator is sending the delay instead the target adding it's own delay.....? Quote Link to comment Share on other sites More sharing options...
ralph.goergen Posted August 13, 2014 Report Share Posted August 13, 2014 Actually, the initiator does not send a delay but he OWNs the sc_time object for the delay (as well as he owns the transaction/payload object). This allows loosely timed modeling and quantum keeping. For more information see: http://forums.accellera.org/topic/110-b-transport-interface/ or http://www.doulos.com/knowhow/systemc/tlm2/tutorial__1/ Balakasaiah 1 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.