17 #ifndef _TLM_NW_TLM_NETWORK_SOCKETS_H_
18 #define _TLM_NW_TLM_NETWORK_SOCKETS_H_
20 #include "scc/report.h"
22 #include <sysc/kernel/sc_object.h>
24 #include <tlm_h/tlm_sockets/tlm_initiator_socket.h>
25 #include <tlm_h/tlm_sockets/tlm_target_socket.h>
39 using tlm_phase_type = ::tlm::tlm_phase;
50 template <
typename TYPES = tlm_network_baseprotocol_types>
52 public virtual tlm::tlm_fw_nonblocking_transport_if<typename TYPES::tlm_payload_type>,
53 public virtual tlm::tlm_transport_dbg_if<typename TYPES::tlm_payload_type> {
54 typedef TYPES protocol_types;
57 template <
typename TYPES = tlm_network_baseprotocol_types>
59 typedef TYPES protocol_types;
62 #if SC_VERSION_MAJOR < 3
63 using type_index = sc_core::sc_type_index;
65 using type_index = std::type_index;
69 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
71 :
public tlm_base_initiator_socket<0, tlm_network_fw_transport_if<TYPES>, tlm_network_bw_transport_if<TYPES>, N, POL> {
73 using protocol_types = TYPES;
74 using transaction_type =
typename TYPES::tlm_payload_type;
75 using phase_type =
typename TYPES::tlm_phase_type;
85 virtual const char* kind()
const {
return "tlm_network_initiator_socket"; }
87 virtual type_index get_protocol_types()
const {
return typeid(TYPES); }
91 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
93 :
public ::tlm::tlm_base_target_socket<0, tlm_network_fw_transport_if<TYPES>, tlm_network_bw_transport_if<TYPES>, N, POL> {
95 using protocol_types = TYPES;
96 using transaction_type =
typename TYPES::tlm_payload_type;
97 using phase_type =
typename TYPES::tlm_phase_type;
105 virtual const char* kind()
const {
return "tlm_network_target_socket"; }
107 virtual type_index get_protocol_types()
const {
return typeid(TYPES); }
DECLARE_EXTENDED_PHASE(REQUEST)