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

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