From: Pouya Fotouhi Date: Sun, 20 Jan 2019 00:38:27 +0000 (-0800) Subject: mem-ruby: Fixing Topology X-Git-Tag: v19.0.0.0~1158 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15e497d3f11504f957406feee9797cbf6449fffd;p=gem5.git mem-ruby: Fixing Topology The constructor assumes the number of nodes (i.e. controllers) equal to the number of external nodes. This is a not necessarily valid for all cases (e.g MESI_Three_Level - where L0s are directly connected to L1s). MachineType_base_number(MachineType_NUM) provides the total number of controllers. Signed-off-by: Pouya Fotouhi Change-Id: Id906099dc967ec70aa34dedb0b55351031ff242c Reviewed-on: https://gem5-review.googlesource.com/c/15716 Reviewed-by: Jason Lowe-Power Reviewed-by: Nikos Nikoleris Maintainer: Jason Lowe-Power --- diff --git a/src/mem/ruby/network/Topology.cc b/src/mem/ruby/network/Topology.cc index f7afffd66..6da251e0b 100644 --- a/src/mem/ruby/network/Topology.cc +++ b/src/mem/ruby/network/Topology.cc @@ -51,7 +51,8 @@ const int INFINITE_LATENCY = 10000; // Yes, this is a big hack Topology::Topology(uint32_t num_routers, const vector &ext_links, const vector &int_links) - : m_nodes(ext_links.size()), m_number_of_switches(num_routers), + : m_nodes(MachineType_base_number(MachineType_NUM)), + m_number_of_switches(num_routers), m_ext_link_vector(ext_links), m_int_link_vector(int_links) { // Total nodes/controllers in network