File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,10 @@ def calculate_power_and_area(radix):
149149parser .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-
156156args = 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
177177layers = [
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
Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments