71struct axis_channel :
public sc_core::sc_module,
75 using transaction_type = axis_packet_types::tlm_payload_type;
76 using phase_type = axis_packet_types::tlm_phase_type;
78 axis_pkt_target_socket<> tsck{
"tsck"};
80 axis_pkt_initiator_socket<> isck{
"isck"};
82 cci::cci_param<sc_core::sc_time> channel_delay{
"channel_delay", sc_core::SC_ZERO_TIME,
"delay of the AXIS channel"};
84 axis_channel(sc_core::sc_module_name
const& nm)
85 : sc_core::sc_module(nm) {
90 void b_transport(transaction_type& trans, sc_core::sc_time& t)
override {
92 isck->b_transport(trans, t);
95 tlm::tlm_sync_enum nb_transport_fw(transaction_type& trans, phase_type& phase, sc_core::sc_time& t)
override {
96 SCCTRACE(SCMOD) <<
"Received non-blocking transaction in fw path with phase " << phase.get_name();
97 if(phase == tlm::nw::REQUEST) {
98 phase_type ph = tlm::nw::INDICATION;
99 auto ret = isck->nb_transport_fw(trans, ph, t);
100 if(ph == tlm::nw::RESPONSE)
101 phase = tlm::nw::CONFIRM;
105 phase = tlm::nw::CONFIRM;
106 return tlm::TLM_COMPLETED;
108 return tlm::TLM_ACCEPTED;
111 tlm::tlm_sync_enum nb_transport_bw(transaction_type& trans, phase_type& phase, sc_core::sc_time& t)
override {
112 SCCTRACE(SCMOD) <<
"Received non-blocking transaction in bw path with phase " << phase.get_name();
113 if(phase == tlm::nw::RESPONSE) {
114 phase_type ph = tlm::nw::CONFIRM;
115 return tsck->nb_transport_bw(trans, ph, t);
117 return tlm::TLM_ACCEPTED;
120 unsigned int transport_dbg(transaction_type& trans)
override {
return isck->transport_dbg(trans); }