17#ifndef _TLM_NW_TLM_NETWORK_SOCKETS_H_
18#define _TLM_NW_TLM_NETWORK_SOCKETS_H_
20#include "tlm_network_gp.h"
21#include <sysc/kernel/sc_object.h>
22#include <tlm/scc/tlm_mm.h>
24#include <tlm_h/tlm_sockets/tlm_initiator_socket.h>
25#include <tlm_h/tlm_sockets/tlm_target_socket.h>
49 using tlm_phase_type = ::tlm::tlm_phase;
60template <
typename TYPES = tlm_network_baseprotocol_types>
62 public virtual tlm::tlm_fw_nonblocking_transport_if<typename TYPES::tlm_payload_type>,
63 public virtual tlm::tlm_transport_dbg_if<typename TYPES::tlm_payload_type> {
64 typedef TYPES protocol_types;
67template <
typename TYPES = tlm_network_baseprotocol_types>
69 typedef TYPES protocol_types;
72#if SC_VERSION_MAJOR < 3
73using type_index = sc_core::sc_type_index;
75using type_index = std::type_index;
86 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
88:
public tlm_base_initiator_socket<0, tlm_network_fw_transport_if<TYPES>, tlm_network_bw_transport_if<TYPES>, N, POL> {
90 using protocol_types = TYPES;
91 using transaction_type =
typename TYPES::tlm_payload_type;
92 using phase_type =
typename TYPES::tlm_phase_type;
99 using port_type = sc_core::sc_port<fw_interface_type, N, POL>;
100 using export_type = sc_core::sc_export<bw_interface_type>;
124 virtual const char*
kind()
const {
return "tlm_network_initiator_socket"; }
137template <
unsigned PHITWIDTH,
typename CMDENUM,
typename TYPES = tlm_network_baseprotocol_types,
int N = 1,
138 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
140:
public ::tlm::tlm_base_target_socket<0, tlm_network_fw_transport_if<TYPES>, tlm_network_bw_transport_if<TYPES>, N, POL> {
142 using protocol_types = TYPES;
143 using transaction_type =
typename TYPES::tlm_payload_type;
144 using phase_type =
typename TYPES::tlm_phase_type;
166 virtual const char*
kind()
const {
return "tlm_network_target_socket"; }
DECLARE_EXTENDED_PHASE(REQUEST)
Definition of the additional protocol phases.
tlm_network_initiator_socket(const char *name)
Constructor with specified name.
virtual const char * kind() const
tlm_network_initiator_socket()
Constructor with default name.
virtual ~tlm_network_initiator_socket()=default
virtual type_index get_protocol_types() const
A base class for TLM network payloads.
tlm_network_target_socket(const char *name)
Constructor with name.
virtual ~tlm_network_target_socket()=default
tlm_network_target_socket()
Constructor with default name.
virtual const char * kind() const
virtual type_index get_protocol_types() const