Skip to content

Commit 77e24cc

Browse files
committed
misc: Miscellaneous changes to SRNoC Model
DPRINTF output to show layer number. Multiple dynamic ranges, which dictate number of layers. Payload Specific delay had a small bug in it.
1 parent 56b6802 commit 77e24cc

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

configs/supernetwork/SRNoC.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ def calculate_power_and_area(radix):
149149
parser.add_argument(
150150
"--dynamic-range",
151151
type=int,
152-
default=1000,
153-
help="Maximum value for random data generation",
152+
nargs="+",
153+
default=[1000],
154+
help="Maximum value(s) for random data generation. Multiple values create multiple layers.",
154155
)
155-
156156
args = parser.parse_args()
157157

158158
# Ensure that at least one of --maximum-packets or --file-path is provided
@@ -176,11 +176,12 @@ def calculate_power_and_area(radix):
176176

177177
layers = [
178178
Layer(
179-
dynamic_range=args.dynamic_range,
179+
dynamic_range=dr,
180180
data_cells=data_cells,
181181
max_packets=args.maximum_packets,
182182
schedule_path=args.file_path,
183183
)
184+
for dr in args.dynamic_range
184185
]
185186

186187
# Create the SuperNetwork and add the DataCells

src/network/Layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Layer::processPackets(
303303
// Calculate precise delivery time
304304
// within the connection window
305305
// Use the payload value -> RACE LOGIC
306-
payloadSpecificDelay = ((payload + 1) % dynamicRange) *
306+
payloadSpecificDelay = ((payload + 1)) *
307307
(getTimeSlot()) * clockPeriod()/714;
308308

309309
DPRINTF(Layer,

src/network/SuperNetwork.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,19 @@ namespace gem5
6060
assert(params.variability_counting_network >= 0);
6161
assert(params.crosspoint_setup_time >= 0);
6262

63+
int layerIndex = 0;
6364
for (auto layer : params.layers) {
6465
layer->setTimeSlot(calculateTimeSlot(layer->getRadix()));
6566
DPRINTF(SuperNetwork, "Layer %d: time slot = %d\n",
66-
layer->getRadix(), layer->getTimeSlot()
67+
layerIndex, layer->getTimeSlot()
6768
);
68-
layer->setConnectionWindow(Cycles(layer->getDynamicRange() *
69-
timeSlot));
69+
layer->setConnectionWindow(
70+
Cycles(layer->getDynamicRange() * timeSlot));
7071
DPRINTF(SuperNetwork, "Layer %d: connection window = %d\n",
71-
layer->getRadix(), layer->getConnectionWindow()
72+
layerIndex, layer->getConnectionWindow()
7273
);
7374
layer->scheduleNextNetworkEvent(curTick());
75+
layerIndex++;
7476
}
7577
}
7678

0 commit comments

Comments
 (0)