diff --git a/src/sst/elements/merlin/hr_router/hr_router.cc b/src/sst/elements/merlin/hr_router/hr_router.cc index ab5d578d7a..971d691f1d 100644 --- a/src/sst/elements/merlin/hr_router/hr_router.cc +++ b/src/sst/elements/merlin/hr_router/hr_router.cc @@ -245,11 +245,28 @@ hr_router::hr_router(ComponentId_t cid, Params& params) : pc_params.insert("oql_track_port", params.find("oql_track_port","false")); pc_params.insert("oql_track_remote", params.find("oql_track_remote","false")); + SubComponentSlotInfo *pc_info = getSubComponentSlotInfo("portcontrol"); + if ( pc_info ) { + int max_slot = pc_info->getMaxPopulatedSlotNumber(); + if ( max_slot > num_ports ) { + merlin_abort.fatal( + CALL_INFO, 1, + "hr_router has %d ports but portcontrol uses slot %d\n", + num_ports, max_slot); + } + } + for ( int i = 0; i < num_ports; i++ ) { in_port_busy[i] = 0; out_port_busy[i] = 0; progress_vcs[i] = -1; + if ( pc_info && pc_info->isPopulated(i) ) { + ports[i] = pc_info->create + (i, ComponentInfo::SHARE_PORTS | ComponentInfo::SHARE_STATS | ComponentInfo::INSERT_STATS, this, id, i, topo); + continue; + } + std::stringstream port_name; port_name << "port"; port_name << i; diff --git a/src/sst/elements/merlin/interfaces/portControl.cc b/src/sst/elements/merlin/interfaces/portControl.cc index 713a5e8c25..fc88c2e106 100644 --- a/src/sst/elements/merlin/interfaces/portControl.cc +++ b/src/sst/elements/merlin/interfaces/portControl.cc @@ -286,7 +286,7 @@ PortControl::PortControl(ComponentId_t cid, Params& params, Router* rif, int rt "bits (b) or bytes (B): %s\n",flit_size.toStringBestSI().c_str()); } if ( flit_size.hasUnits("B") ) { - flit_size *= UnitAlgebra("8b"); + flit_size *= UnitAlgebra("8b/B"); } std::string output_latency_timebase = params.find("output_latency","0ns");