The Credit class doesn't initialize a number of its unused base class
fields. This leads to non-determanistic traces when printing flits that
are Credits. This patch initializes all unused fields to 0.
Change-Id: Ib73c652c71a10be57b24c0d6e1ac22eafa421e11
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32598
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
struct RouteInfo
{
+ RouteInfo()
+ : vnet(0), src_ni(0), src_router(0), dest_ni(0), dest_router(0),
+ hops_traversed(0)
+ {}
+
// destination format for table-based routing
int vnet;
NetDest net_dest;
// and m_is_free_signal (whether VC is free or not)
Credit::Credit(int vc, bool is_free_signal, Tick curTime)
+ : flit(0, vc, 0, RouteInfo(), 0, nullptr, 0, 0, curTime)
{
- m_id = 0;
- m_vc = vc;
m_is_free_signal = is_free_signal;
- m_time = curTime;
m_type = CREDIT_;
}