Jump to content

noay

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. could you please send me the relevant link? Thanks
  2. how can I bind simple_initiator_socket_tagged<T,128> to simple_target_socket<T> and vice versa. Thanks
  3. I am looking for a table that summarizes what port binds to what. specifically binding simple_initiator_socket_tagged to simple_target_socket and vice versa. Thanks
  4. What is the correct way to handle transaction data pointer (set_data_ptr). If I free it right after b_transport I get an error since transaction handling isn't completes. Unlike tlm_extension it is not freed once transaction is completed. void rx_thread() { while(1) { uint8_t *buf = new uint8_t[ETH_MAC_PACKET_MAX_LEN]; tlm::tlm_generic_payload* pkt_trans = new tlm::tlm_generic_payload(); pkt_trans->set_command(tlm::TLM_WRITE_COMMAND); pkt_trans->set_data_length(ETH_MAC_PACKET_MAX_LEN); pkt_trans->set_data_ptr((unsigned char *)(buf)); phy2mac->b_transport(*pkt_trans, delay); // Note:not calling "delete [] buf;" here since this data is a part of generic payload now and // shouldn't be destroyed until transaction handling completes! Although b_transport() is // a synchronous call indeed, queue is filled with pointers to original structures rather then to their clones. } }
  5. I used before_end_of_elaboration to bind to a dummy: void before_end_of_elaboration(){ if ( my_initiator_socket.size() == 0 ) { target* dummy = new target("my_initiator_socket_name"); my_initiator_socket.bind(*dummy); } if ( my_target_socket.size() == 0 ) { initator* dummy = new target("my_target_socket_name"); my_target_socket.bind(*dummy); } }
  6. I have a class that has two socket members (target and initator): // input (target) tlm_utils::simple_target_socket<class my_class> m_in; // output (initator) tlm_utils::simple_initiator_socket<class my_class> m_out; I wish to connect only one side each instance (m_in or m_out), how can I connect the other side to a NULL / EMPTY connection? Thanks
  7. I am looking for a way to serialize / de-serialize tlm_generic_payload objects, particularly tlm_generic_payload extensions (TLM 2.0) without using uvm_objects Example of setting the generic payload extension: class my_extension : public tlm::tlm_extension<my_extension>{ ... // class implementation (including copy_from and clone, has operator <<) } tlm_generic_payload* gp = new tlm_generic_payload; trans->set_extension(&my_extension); Desired serialization example (just an example, anything that serializes will do): cout << *trans.get_extension(0);
×