/* * blocks.h * * Created on: 04.05.2020 * Author: eyck */ #ifndef _SIM_PERFORMANCE_PKT_SENDER_H_ #define _SIM_PERFORMANCE_PKT_SENDER_H_ #include #include "packet.h" #include #include class pkt_sender : sc_core::sc_module { public: sc_core::sc_in clk_i{"clk_i"}; scc::initiator_mixin> isck; scc::target_mixin> tsck; pkt_sender(sc_core::sc_module_name const&, unsigned dim, unsigned pos_x, unsigned pos_y, unsigned count); virtual ~pkt_sender() = default; sc_core::sc_event const& get_finish_event(){return finish_evt;} private: void run(); void gen_routing(std::vector& route_vec); void received(); tlm_utils::peq_with_get bw_peq, fw_peq; tlm::tlm_sync_enum nb_fw(tlm::tlm_generic_payload&, tlm::tlm_phase&, sc_core::sc_time&); tlm::tlm_sync_enum nb_bw(tlm::tlm_generic_payload&, tlm::tlm_phase&, sc_core::sc_time&); sc_core::sc_event finish_evt; std::pair my_pos; const unsigned dim, count; }; #endif /* _SIM_PERFORMANCE_PKT_SENDER_H_ */