add test case focusing on simulation kernel performance
This commit is contained in:
37
tests/sim_performance/pkt_switch.h
Normal file
37
tests/sim_performance/pkt_switch.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* blocks.h
|
||||
*
|
||||
* Created on: 04.05.2020
|
||||
* Author: eyck
|
||||
*/
|
||||
|
||||
#ifndef _SIM_PERFORMANCE_PKT_SWITCH_H_
|
||||
#define _SIM_PERFORMANCE_PKT_SWITCH_H_
|
||||
|
||||
#include <systemc>
|
||||
#include "packet.h"
|
||||
#include <scc/tagged_initiator_mixin.h>
|
||||
#include <scc/tagged_target_mixin.h>
|
||||
#include <scc/sc_owning_signal.h>
|
||||
#include <array>
|
||||
|
||||
|
||||
class pkt_switch : sc_core::sc_module {
|
||||
public:
|
||||
enum {NONE=std::numeric_limits<unsigned>::max()};
|
||||
sc_core::sc_in<bool> clk_i{"clk_i"};
|
||||
sc_core::sc_vector<scc::tagged_target_mixin<tlm::tlm_target_socket<32>>> tsck{"tsck",4};
|
||||
sc_core::sc_vector<scc::tagged_initiator_mixin<tlm::tlm_initiator_socket<32>>> 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<scc::sc_owning_signal<tlm::tlm_generic_payload>> in_tx{"in_sig", 4};
|
||||
sc_core::sc_vector<sc_core::sc_fifo<tlm::tlm_generic_payload*>> out_fifo{"out_peq", 4};
|
||||
std::array<unsigned, 4> last_sel_inp{NONE, NONE, NONE, NONE};
|
||||
};
|
||||
|
||||
#endif /* _SIM_PERFORMANCE_PKT_SWITCH_H_ */
|
Reference in New Issue
Block a user