diff --git a/src/main.cc b/src/main.cc index 20a1726..c2282a3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -60,13 +60,19 @@ s32 main(s32 _argc, char** _argv) { gSim->setNetwork(network); u32 numInterfaces = network->numInterfaces(); u32 numRouters = network->numRouters(); - u32 routerRadix = network->getRouter(0)->numPorts(); + std::map routerRadices; + for (u32 routerId = 0; routerId < numRouters; routerId++) { + routerRadices[network->getRouter(routerId)->numPorts()] += 1; + } u32 numVcs = network->numVcs(); u64 numComponents = Component::numComponents(); gSim->infoLog.logInfo("Endpoints", std::to_string(numInterfaces)); gSim->infoLog.logInfo("Routers", std::to_string(numRouters)); - gSim->infoLog.logInfo("Router0 Radix", std::to_string(routerRadix)); + for (auto& p : routerRadices) { + gSim->infoLog.logInfo("Router radix " + std::to_string(p.first), + std::to_string(p.second)); + } gSim->infoLog.logInfo("VCs", std::to_string(numVcs)); gSim->infoLog.logInfo("Components", std::to_string(numComponents)); diff --git a/src/network/dragonfly/Network.cc b/src/network/dragonfly/Network.cc index 5a4047c..e9e4217 100644 --- a/src/network/dragonfly/Network.cc +++ b/src/network/dragonfly/Network.cc @@ -310,8 +310,8 @@ u32 Network::numInterfaces() const { Router* Network::getRouter(u32 _id) const { std::vector routerAddress; translateRouterIdToAddress(_id, &routerAddress); - u32 g = routerAddress.at(0); - u32 r = routerAddress.at(1); + u32 g = routerAddress.at(1); + u32 r = routerAddress.at(0); return routers_.at(g).at(r); }