Jump to content
Balakasaiah

simple_initiator_socket with no type

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×