Jump to content

using tagged socket


Recommended Posts

Hello all,


i am using tlm socket and declared as following

tlm_utils::simple_initiator_socket_tagged<current_model> initiator_socket[2];


// in construcot

               initiator_socket[0] = new tlm_utils::simple_initiator_socket_tagged<current_model>("socket0");
               initiator_socket[1] = new tlm_utils::simple_initiator_socket_tagged<current_model>("socket1");


error: no match for ‘operator=’ (operand types are ‘tlm_utils::simple_initiator_socket_tagged<current_model<unsigned int, 32u>, 32u, tlm::tlm_base_protocol_types>’ and ‘tlm_utils::simple_initiator_socket_tagged<current_model<unsigned int, 32u>, 32u, tlm::tlm_base_protocol_types>*’)
initiator_socket[0] = new tlm_utils::simple_initiator_socket_tagged<current_model>(txt);


Link to comment
Share on other sites



A) Try not to use arrays of SystemC objects. Most of them cannot be copied or assigned. Use sc_vector instead (Section 8.5 in SystemC LRM IEEE 1666-2011).


B) You have an array of sockets. Each element is a socket object. The return value of 'new' is a pointer to a socket. You cannot assign that pointer to an object.




Link to comment
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.

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