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 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1,
58 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
60 :
public tlm_base_initiator_socket<0, tlm_signal_fw_transport_if<SIG, TYPES>, tlm_signal_bw_transport_if<SIG, TYPES>, N, POL> {
61 using tlm_signal_type = SIG;
62 using protocol_types = TYPES;
63 using transaction_type =
typename TYPES::tlm_payload_type;
64 using phase_type =
typename TYPES::tlm_phase_type;
72 virtual const char* kind()
const {
return "tlm_signal_initiator_socket"; }
74 virtual sc_core::sc_type_index get_protocol_types()
const {
return typeid(TYPES); }
77 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1>
80 template <typename SIG = bool, typename TYPES = tlm_signal_baseprotocol_types<SIG>, int N = 1,
81 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
83 :
public ::tlm::tlm_base_target_socket<0, tlm_signal_fw_transport_if<SIG, TYPES>, tlm_signal_bw_transport_if<SIG, TYPES>, N, POL> {
84 using tlm_signal_type = SIG;
85 using protocol_types = TYPES;
86 using transaction_type =
typename TYPES::tlm_payload_type;
87 using phase_type =
typename TYPES::tlm_phase_type;
95 virtual const char* kind()
const {
return "tlm_signal_target_socket"; }
97 virtual sc_core::sc_type_index get_protocol_types()
const {
return typeid(TYPES); }
100 template <
typename SIG =
bool,
typename TYPES = tlm_signal_baseprotocol_types<SIG>,
int N = 1>