/* * blocks.h * * Created on: 04.05.2020 * Author: eyck */ #ifndef _SIM_PERFORMANCE_PKT_SWITCH_H_ #define _SIM_PERFORMANCE_PKT_SWITCH_H_ #include "packet.h" #include #include #include #include #include class pkt_switch : sc_core::sc_module { public: enum { NONE = std::numeric_limits::max() }; sc_core::sc_in clk_i{"clk_i"}; sc_core::sc_vector>> tsck{"tsck", 4}; sc_core::sc_vector>> isck{"isck", 4}; pkt_switch(sc_core::sc_module_name const&); virtual ~pkt_switch() = default; private: void clock_cb(); void output_cb(unsigned); tlm::tlm_sync_enum nb_fw(unsigned, tlm::tlm_generic_payload&, tlm::tlm_phase&, sc_core::sc_time&); tlm::tlm_sync_enum nb_bw(unsigned, tlm::tlm_generic_payload&, tlm::tlm_phase&, sc_core::sc_time&); sc_core::sc_vector> in_tx{"in_sig", 4}; sc_core::sc_vector> out_fifo{"out_peq", 4}; std::array last_sel_inp{NONE, NONE, NONE, NONE}; }; #endif /* _SIM_PERFORMANCE_PKT_SWITCH_H_ */