@@ -38,10 +38,12 @@ static void SetupNocOpts(const t_options& Options,
38
38
t_noc_opts* NocOpts);
39
39
static void SetupServerOpts (const t_options& Options,
40
40
t_server_opts* ServerOpts);
41
- static void SetupRoutingArch (const t_arch& Arch, t_det_routing_arch* RoutingArch);
41
+
42
+ static void SetupRoutingArch (const t_arch& Arch, t_det_routing_arch& RoutingArch);
43
+
42
44
static void SetupTiming (const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing);
43
45
static void SetupSwitches (const t_arch& Arch,
44
- t_det_routing_arch* RoutingArch,
46
+ t_det_routing_arch& RoutingArch,
45
47
const std::vector<t_arch_switch_inf>& arch_switches);
46
48
static void SetupAnalysisOpts (const t_options& Options, t_analysis_opts& analysis_opts);
47
49
static void SetupPowerOpts (const t_options& Options, t_power_opts* power_opts, t_arch* Arch);
@@ -97,7 +99,7 @@ void SetupVPR(const t_options* options,
97
99
t_analysis_opts* analysisOpts,
98
100
t_noc_opts* nocOpts,
99
101
t_server_opts* serverOpts,
100
- t_det_routing_arch* routingArch,
102
+ t_det_routing_arch& routingArch,
101
103
std::vector<t_lb_type_rr_node>** packerRRGraphs,
102
104
std::vector<t_segment_inf>& segments,
103
105
t_timing_inf* timing,
@@ -231,9 +233,9 @@ void SetupVPR(const t_options* options,
231
233
SetupTiming (*options, timingenabled, timing);
232
234
SetupPackerOpts (*options, packerOpts);
233
235
SetupAPOpts (*options, *apOpts);
234
- routingArch-> write_rr_graph_filename = options->write_rr_graph_file ;
235
- routingArch-> read_rr_graph_filename = options->read_rr_graph_file ;
236
- routingArch-> read_rr_edge_override_filename = options->read_rr_edge_override_file ;
236
+ routingArch. write_rr_graph_filename = options->write_rr_graph_file ;
237
+ routingArch. read_rr_graph_filename = options->read_rr_graph_file ;
238
+ routingArch. read_rr_edge_override_filename = options->read_rr_edge_override_file ;
237
239
238
240
for (auto has_global_routing : arch->layer_global_routing ) {
239
241
device_ctx.inter_cluster_prog_routing_resources .emplace_back (has_global_routing);
@@ -355,17 +357,17 @@ static void SetupTiming(const t_options& Options, const bool TimingEnabled, t_ti
355
357
* from the arch file with the special switches that VPR needs.
356
358
*/
357
359
static void SetupSwitches (const t_arch& Arch,
358
- t_det_routing_arch* RoutingArch,
360
+ t_det_routing_arch& RoutingArch,
359
361
const std::vector<t_arch_switch_inf>& arch_switches) {
360
362
auto & device_ctx = g_vpr_ctx.mutable_device ();
361
363
362
364
int switches_to_copy = (int )arch_switches.size ();
363
365
int num_arch_switches = (int )arch_switches.size ();
364
366
365
- find_ipin_cblock_switch_index (Arch, RoutingArch-> wire_to_arch_ipin_switch , RoutingArch-> wire_to_arch_ipin_switch_between_dice );
367
+ find_ipin_cblock_switch_index (Arch, RoutingArch. wire_to_arch_ipin_switch , RoutingArch. wire_to_arch_ipin_switch_between_dice );
366
368
367
369
/* Depends on device_ctx.num_arch_switches */
368
- RoutingArch-> delayless_switch = num_arch_switches++;
370
+ RoutingArch. delayless_switch = num_arch_switches++;
369
371
370
372
/* Alloc the list now that we know the final num_arch_switches value */
371
373
device_ctx.arch_switch_inf .resize (num_arch_switches);
@@ -377,32 +379,32 @@ static void SetupSwitches(const t_arch& Arch,
377
379
}
378
380
379
381
/* Delayless switch for connecting sinks and sources with their pins. */
380
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].set_type (SwitchType::MUX);
381
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].name = std::string (VPR_DELAYLESS_SWITCH_NAME);
382
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].R = 0 .;
383
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].Cin = 0 .;
384
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].Cout = 0 .;
385
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].set_Tdel (t_arch_switch_inf::UNDEFINED_FANIN, 0 .);
386
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].power_buffer_type = POWER_BUFFER_TYPE_NONE;
387
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].mux_trans_size = 0 .;
388
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].buf_size_type = BufferSize::ABSOLUTE;
389
- device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].buf_size = 0 .;
390
- VTR_ASSERT_MSG (device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].buffered (), " Delayless switch expected to be buffered (isolating)" );
391
- VTR_ASSERT_MSG (device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ].configurable (), " Delayless switch expected to be configurable" );
382
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].set_type (SwitchType::MUX);
383
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].name = std::string (VPR_DELAYLESS_SWITCH_NAME);
384
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].R = 0 .;
385
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].Cin = 0 .;
386
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].Cout = 0 .;
387
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].set_Tdel (t_arch_switch_inf::UNDEFINED_FANIN, 0 .);
388
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].power_buffer_type = POWER_BUFFER_TYPE_NONE;
389
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].mux_trans_size = 0 .;
390
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].buf_size_type = BufferSize::ABSOLUTE;
391
+ device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].buf_size = 0 .;
392
+ VTR_ASSERT_MSG (device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].buffered (), " Delayless switch expected to be buffered (isolating)" );
393
+ VTR_ASSERT_MSG (device_ctx.arch_switch_inf [RoutingArch. delayless_switch ].configurable (), " Delayless switch expected to be configurable" );
392
394
393
- device_ctx.all_sw_inf [RoutingArch-> delayless_switch ] = device_ctx.arch_switch_inf [RoutingArch-> delayless_switch ];
395
+ device_ctx.all_sw_inf [RoutingArch. delayless_switch ] = device_ctx.arch_switch_inf [RoutingArch. delayless_switch ];
394
396
395
- RoutingArch-> global_route_switch = RoutingArch-> delayless_switch ;
397
+ RoutingArch. global_route_switch = RoutingArch. delayless_switch ;
396
398
397
- device_ctx.delayless_switch_idx = RoutingArch-> delayless_switch ;
399
+ device_ctx.delayless_switch_idx = RoutingArch. delayless_switch ;
398
400
399
401
// Warn about non-zero Cout values for the ipin switch, since these values have no effect.
400
402
// VPR do not model the R/C's of block internal routing connection.
401
403
//
402
404
// Note that we don't warn about the R value as it may be used to size the buffer (if buf_size_type is AUTO)
403
- if (device_ctx.arch_switch_inf [RoutingArch-> wire_to_arch_ipin_switch ].Cout != 0 .) {
405
+ if (device_ctx.arch_switch_inf [RoutingArch. wire_to_arch_ipin_switch ].Cout != 0 .) {
404
406
VTR_LOG_WARN (" Non-zero switch output capacitance (%g) has no effect when switch '%s' is used for connection block inputs\n " ,
405
- device_ctx.arch_switch_inf [RoutingArch-> wire_to_arch_ipin_switch ].Cout , Arch.ipin_cblock_switch_name [0 ].c_str ());
407
+ device_ctx.arch_switch_inf [RoutingArch. wire_to_arch_ipin_switch ].Cout , Arch.ipin_cblock_switch_name [0 ].c_str ());
406
408
}
407
409
}
408
410
@@ -412,18 +414,18 @@ static void SetupSwitches(const t_arch& Arch,
412
414
* Since checks are already done, this just copies values across
413
415
*/
414
416
static void SetupRoutingArch (const t_arch& Arch,
415
- t_det_routing_arch* RoutingArch) {
416
- RoutingArch-> switch_block_type = Arch.SBType ;
417
- RoutingArch-> R_minW_nmos = Arch.R_minW_nmos ;
418
- RoutingArch-> R_minW_pmos = Arch.R_minW_pmos ;
419
- RoutingArch-> Fs = Arch.Fs ;
420
- RoutingArch-> directionality = BI_DIRECTIONAL;
417
+ t_det_routing_arch& RoutingArch) {
418
+ RoutingArch. switch_block_type = Arch.SBType ;
419
+ RoutingArch. R_minW_nmos = Arch.R_minW_nmos ;
420
+ RoutingArch. R_minW_pmos = Arch.R_minW_pmos ;
421
+ RoutingArch. Fs = Arch.Fs ;
422
+ RoutingArch. directionality = BI_DIRECTIONAL;
421
423
if (!Arch.Segments .empty ()) {
422
- RoutingArch-> directionality = Arch.Segments [0 ].directionality ;
424
+ RoutingArch. directionality = Arch.Segments [0 ].directionality ;
423
425
}
424
426
425
427
/* copy over the switch block information */
426
- RoutingArch-> switchblocks = Arch.switchblocks ;
428
+ RoutingArch. switchblocks = Arch.switchblocks ;
427
429
}
428
430
429
431
static void SetupRouterOpts (const t_options& Options, t_router_opts* RouterOpts) {
0 commit comments