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 <pfotouhi@ucdavis.edu>
Change-Id: Id906099dc967ec70aa34dedb0b55351031ff242c
Reviewed-on: https://gem5-review.googlesource.com/c/15716
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Topology::Topology(uint32_t num_routers,
const vector<BasicExtLink *> &ext_links,
const vector<BasicIntLink *> &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