@@ -38,10 +38,12 @@ static void SetupNocOpts(const t_options& Options,
3838 t_noc_opts* NocOpts);
3939static void SetupServerOpts (const t_options& Options,
4040 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+
4244static void SetupTiming (const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing);
4345static void SetupSwitches (const t_arch& Arch,
44- t_det_routing_arch* RoutingArch,
46+ t_det_routing_arch& RoutingArch,
4547 const std::vector<t_arch_switch_inf>& arch_switches);
4648static void SetupAnalysisOpts (const t_options& Options, t_analysis_opts& analysis_opts);
4749static void SetupPowerOpts (const t_options& Options, t_power_opts* power_opts, t_arch* Arch);
@@ -97,7 +99,7 @@ void SetupVPR(const t_options* options,
9799 t_analysis_opts* analysisOpts,
98100 t_noc_opts* nocOpts,
99101 t_server_opts* serverOpts,
100- t_det_routing_arch* routingArch,
102+ t_det_routing_arch& routingArch,
101103 std::vector<t_lb_type_rr_node>** packerRRGraphs,
102104 std::vector<t_segment_inf>& segments,
103105 t_timing_inf* timing,
@@ -231,9 +233,9 @@ void SetupVPR(const t_options* options,
231233 SetupTiming (*options, timingenabled, timing);
232234 SetupPackerOpts (*options, packerOpts);
233235 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 ;
237239
238240 for (auto has_global_routing : arch->layer_global_routing ) {
239241 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
355357 * from the arch file with the special switches that VPR needs.
356358 */
357359static void SetupSwitches (const t_arch& Arch,
358- t_det_routing_arch* RoutingArch,
360+ t_det_routing_arch& RoutingArch,
359361 const std::vector<t_arch_switch_inf>& arch_switches) {
360362 auto & device_ctx = g_vpr_ctx.mutable_device ();
361363
362364 int switches_to_copy = (int )arch_switches.size ();
363365 int num_arch_switches = (int )arch_switches.size ();
364366
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 );
366368
367369 /* Depends on device_ctx.num_arch_switches */
368- RoutingArch-> delayless_switch = num_arch_switches++;
370+ RoutingArch. delayless_switch = num_arch_switches++;
369371
370372 /* Alloc the list now that we know the final num_arch_switches value */
371373 device_ctx.arch_switch_inf .resize (num_arch_switches);
@@ -377,32 +379,32 @@ static void SetupSwitches(const t_arch& Arch,
377379 }
378380
379381 /* 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" );
392394
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 ];
394396
395- RoutingArch-> global_route_switch = RoutingArch-> delayless_switch ;
397+ RoutingArch. global_route_switch = RoutingArch. delayless_switch ;
396398
397- device_ctx.delayless_switch_idx = RoutingArch-> delayless_switch ;
399+ device_ctx.delayless_switch_idx = RoutingArch. delayless_switch ;
398400
399401 // Warn about non-zero Cout values for the ipin switch, since these values have no effect.
400402 // VPR do not model the R/C's of block internal routing connection.
401403 //
402404 // 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 .) {
404406 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 ());
406408 }
407409}
408410
@@ -412,18 +414,18 @@ static void SetupSwitches(const t_arch& Arch,
412414 * Since checks are already done, this just copies values across
413415 */
414416static 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;
421423 if (!Arch.Segments .empty ()) {
422- RoutingArch-> directionality = Arch.Segments [0 ].directionality ;
424+ RoutingArch. directionality = Arch.Segments [0 ].directionality ;
423425 }
424426
425427 /* copy over the switch block information */
426- RoutingArch-> switchblocks = Arch.switchblocks ;
428+ RoutingArch. switchblocks = Arch.switchblocks ;
427429}
428430
429431static void SetupRouterOpts (const t_options& Options, t_router_opts* RouterOpts) {
0 commit comments