This patch fix some statistics that in presence of a resetStats
instruction were not reseted. This bug makes impossible to obtain
reliable network statistics when the simulation doesn't start from tick
zero.
Change-Id: Ibec45f08d95bf0a533d94b70ec960719206ae945
Maintainer: Tushar Krishna <tushar@ece.gatech.edu>
Reviewed-on: https://gem5-review.googlesource.com/3700
Reviewed-by: Jieming Yin <bjm419@gmail.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
return num_functional_writes;
}
+
+void
+CrossbarSwitch::resetStats()
+{
+ m_crossbar_activity = 0;
+}
\ No newline at end of file
inline double get_crossbar_activity() { return m_crossbar_activity; }
uint32_t functionalWrite(Packet *pkt);
+ void resetStats();
private:
int m_num_vcs;
}
}
+void
+NetworkLink::resetStats()
+{
+ for (int i = 0; i < m_vc_load.size(); i++) {
+ m_vc_load[i] = 0;
+ }
+
+ m_link_utilized = 0;
+}
+
NetworkLink *
NetworkLinkParams::create()
{
inline flit* consumeLink() { return linkBuffer->getTopFlit(); }
uint32_t functionalWrite(Packet *);
+ void resetStats();
private:
const int m_id;
m_input_unit[i]->resetStats();
}
}
+
+ m_switch->resetStats();
+ m_sw_alloc->resetStats();
}
void
}
}
}
+
+void
+SwitchAllocator::resetStats()
+{
+ m_input_arbiter_activity = 0;
+ m_output_arbiter_activity = 0;
+}
\ No newline at end of file
return m_output_arbiter_activity;
}
+ void resetStats();
+
private:
int m_num_inports, m_num_outports;
int m_num_vcs, m_vc_per_vnet;