add CLI configurability
This commit is contained in:
@@ -12,12 +12,13 @@
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
pkt_sender::pkt_sender(const sc_core::sc_module_name &nm, unsigned dim, unsigned pos_x, unsigned pos_y)
|
||||
pkt_sender::pkt_sender(const sc_core::sc_module_name &nm, unsigned dim, unsigned pos_x, unsigned pos_y, unsigned count)
|
||||
: sc_module(nm)
|
||||
, bw_peq("bw_peq")
|
||||
, fw_peq("fw_peq")
|
||||
, my_pos{pos_x,pos_y}
|
||||
, dim{dim}
|
||||
, count{count}
|
||||
{
|
||||
SCCDEBUG(SCMOD)<<"instantiating sender "<<pos_x<<"/"<<pos_y;
|
||||
SC_HAS_PROCESS(pkt_sender);
|
||||
@@ -52,7 +53,7 @@ void pkt_sender::gen_routing(std::vector<uint8_t> &route_vec) {
|
||||
|
||||
void pkt_sender::run() {
|
||||
wait(clk_i.posedge_event());
|
||||
for(auto i=0U; i<1000; i++){
|
||||
for(auto i=0U; i<count; i++){
|
||||
tlm::tlm_generic_payload* gp = tlm::tlm_mm<>::get().allocate<packet_ext>();
|
||||
gen_routing(gp->get_extension<packet_ext>()->routing);
|
||||
tlm::tlm_phase phase{tlm::BEGIN_REQ};
|
||||
@@ -66,7 +67,6 @@ void pkt_sender::run() {
|
||||
}
|
||||
sc_assert(gp==ret);
|
||||
ret->release();
|
||||
wait(clk_i.posedge_event());
|
||||
}
|
||||
finish_evt.notify(SC_ZERO_TIME);
|
||||
}
|
||||
|
Reference in New Issue
Block a user