mem-garnet: Initialize unused Credit members
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>
This commit is contained in:
committed by
Srikant Bharadwaj
parent
b9f1c71fe7
commit
6be16d84da
@@ -46,6 +46,11 @@ enum RoutingAlgorithm { TABLE_ = 0, XY_ = 1, CUSTOM_ = 2,
|
||||
|
||||
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;
|
||||
|
||||
@@ -37,11 +37,9 @@
|
||||
// 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_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user