17 #ifndef _TLM_TLM_SIGNAL_SOCKETS_H_
18 #define _TLM_TLM_SIGNAL_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>
27 #include <tlm_core/tlm_2/tlm_sockets/tlm_initiator_socket.h>
28 #include <tlm_core/tlm_2/tlm_sockets/tlm_target_socket.h>
36 template <
typename SIG>
class tlm_signal_gp;
39 using tlm_signal_type = SIG;
41 using tlm_phase_type = ::tlm::tlm_phase;
44 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>>
46 typedef TYPES protocol_types;
48 virtual ::tlm::tlm_sync_enum nb_transport_fw(
typename TYPES::tlm_payload_type&, ::tlm::tlm_phase&, sc_core::sc_time&) = 0;
51 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>>
53 typedef TYPES protocol_types;
54 virtual ::tlm::tlm_sync_enum nb_transport_bw(
typename TYPES::tlm_payload_type&, ::tlm::tlm_phase&, sc_core::sc_time&) = 0;
57 #if SC_VERSION_MAJOR < 3
58 using type_index = sc_core::sc_type_index;
60 using type_index = std::type_index;
63 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1,
64 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
66 :
public tlm_base_initiator_socket<0, tlm_signal_fw_transport_if<SIG, TYPES>, tlm_signal_bw_transport_if<SIG, TYPES>, N, POL> {
67 using tlm_signal_type = SIG;
68 using protocol_types = TYPES;
69 using transaction_type =
typename TYPES::tlm_payload_type;
70 using phase_type =
typename TYPES::tlm_phase_type;
78 virtual const char* kind()
const {
return "tlm_signal_initiator_socket"; }
80 virtual type_index get_protocol_types()
const {
return typeid(TYPES); }
83 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1>
86 template <typename SIG = bool, typename TYPES = tlm_signal_baseprotocol_types<SIG>, int N = 1,
87 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
89 :
public ::tlm::tlm_base_target_socket<0, tlm_signal_fw_transport_if<SIG, TYPES>, tlm_signal_bw_transport_if<SIG, TYPES>, N, POL> {
90 using tlm_signal_type = SIG;
91 using protocol_types = TYPES;
92 using transaction_type =
typename TYPES::tlm_payload_type;
93 using phase_type =
typename TYPES::tlm_phase_type;
101 virtual const char* kind()
const {
return "tlm_signal_target_socket"; }
103 virtual type_index get_protocol_types()
const {
return typeid(TYPES); }
106 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1>