@@ -458,7 +458,7 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
458458 vpr_create_device (vpr_setup, arch);
459459 // If packing is not skipped, cluster netlist contain valid information, so
460460 // we can print the resource usage and device utilization
461- if (vpr_setup.PackerOpts .doPacking != STAGE_SKIP ) {
461+ if (vpr_setup.PackerOpts .doPacking != e_stage_action::SKIP ) {
462462 float target_device_utilization = vpr_setup.PackerOpts .target_device_utilization ;
463463 // Print the number of resources in netlist and number of resources available in architecture
464464 print_resource_usage ();
@@ -482,7 +482,7 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
482482 }
483483
484484 { // Analytical Place
485- if (vpr_setup.APOpts .doAP == STAGE_DO ) {
485+ if (vpr_setup.APOpts .doAP == e_stage_action::DO ) {
486486 // Passing flat placement input if provided and not loaded yet.
487487 if (!vpr_setup.FileNameOpts .read_flat_place_file .empty () && !g_vpr_ctx.atom ().flat_placement_info ().valid ) {
488488 g_vpr_ctx.mutable_atom ().mutable_flat_placement_info () = read_flat_placement (vpr_setup.FileNameOpts .read_flat_place_file ,
@@ -641,10 +641,10 @@ bool vpr_pack_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
641641
642642 bool status = true ;
643643
644- if (packer_opts.doPacking == STAGE_SKIP ) {
644+ if (packer_opts.doPacking == e_stage_action::SKIP ) {
645645 // pass
646646 } else {
647- if (packer_opts.doPacking == STAGE_DO ) {
647+ if (packer_opts.doPacking == e_stage_action::DO ) {
648648 // Do the actual packing
649649 status = vpr_pack (vpr_setup, arch);
650650 if (!status) {
@@ -658,7 +658,7 @@ bool vpr_pack_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
658658 // Load the result from the .net file
659659 vpr_load_packing (vpr_setup, arch);
660660 } else {
661- VTR_ASSERT (packer_opts.doPacking == STAGE_LOAD );
661+ VTR_ASSERT (packer_opts.doPacking == e_stage_action::LOAD );
662662
663663 // generate a .net file by legalizing an input flat placement file
664664 if (packer_opts.load_flat_placement ) {
@@ -799,7 +799,7 @@ bool vpr_load_flat_placement(t_vpr_setup& vpr_setup, const t_arch& arch) {
799799 device_ctx.grid .clear ();
800800
801801 // if running placement, use the fix clusters file produced by the legalizer
802- if (vpr_setup.PlacerOpts .doPlacement ) {
802+ if (vpr_setup.PlacerOpts .doPlacement != e_stage_action::SKIP ) {
803803 vpr_setup.PlacerOpts .constraints_file = vpr_setup.FileNameOpts .write_constraints_file ;
804804 }
805805 return true ;
@@ -811,15 +811,15 @@ bool vpr_place_flow(const Netlist<>& net_list,
811811 VTR_LOG (" \n " );
812812 const auto & placer_opts = vpr_setup.PlacerOpts ;
813813 const auto & filename_opts = vpr_setup.FileNameOpts ;
814- if (placer_opts.doPlacement == STAGE_SKIP ) {
814+ if (placer_opts.doPlacement == e_stage_action::SKIP ) {
815815 // pass
816816 } else {
817- if (placer_opts.doPlacement == STAGE_DO ) {
817+ if (placer_opts.doPlacement == e_stage_action::DO ) {
818818 // Do the actual placement
819819 vpr_place (net_list, vpr_setup, arch);
820820
821821 } else {
822- VTR_ASSERT (placer_opts.doPlacement == STAGE_LOAD );
822+ VTR_ASSERT (placer_opts.doPlacement == e_stage_action::LOAD );
823823
824824 // Load a previous placement
825825 vpr_load_placement (vpr_setup, arch.directs );
@@ -943,7 +943,7 @@ RouteStatus vpr_route_flow(const Netlist<>& net_list,
943943 const auto & device_ctx = g_vpr_ctx.device ();
944944 const auto & rr_graph = device_ctx.rr_graph ;
945945
946- if (router_opts.doRouting == STAGE_SKIP ) {
946+ if (router_opts.doRouting == e_stage_action::SKIP ) {
947947 // Assume successful
948948 route_status = RouteStatus (true , -1 );
949949 } else { // Do or load
@@ -975,7 +975,7 @@ RouteStatus vpr_route_flow(const Netlist<>& net_list,
975975 timing_info = make_constant_timing_info (0 );
976976 }
977977
978- if (router_opts.doRouting == STAGE_DO ) {
978+ if (router_opts.doRouting == e_stage_action::DO ) {
979979 // Do the actual routing
980980 if (NO_FIXED_CHANNEL_WIDTH == chan_width) {
981981 // Find minimum channel width
@@ -991,7 +991,7 @@ RouteStatus vpr_route_flow(const Netlist<>& net_list,
991991 filename_opts.RouteFile .c_str (),
992992 is_flat);
993993 } else {
994- VTR_ASSERT (router_opts.doRouting == STAGE_LOAD );
994+ VTR_ASSERT (router_opts.doRouting == e_stage_action::LOAD );
995995 // Load a previous routing
996996 // if the previous load file is generated using flat routing,
997997 // we need to create rr_graph with is_flat flag to add additional
@@ -1312,7 +1312,7 @@ void vpr_free_vpr_data_structures(t_arch& Arch,
13121312void vpr_free_all (t_arch& Arch,
13131313 t_vpr_setup& vpr_setup) {
13141314 free_rr_graph ();
1315- if (vpr_setup.RouterOpts .doRouting ) {
1315+ if (vpr_setup.RouterOpts .doRouting != e_stage_action::SKIP ) {
13161316 free_route_structs ();
13171317 }
13181318 vpr_free_vpr_data_structures (Arch, vpr_setup);
@@ -1414,12 +1414,12 @@ bool vpr_analysis_flow(const Netlist<>& net_list,
14141414 bool is_flat) {
14151415 auto & analysis_opts = vpr_setup.AnalysisOpts ;
14161416
1417- if (analysis_opts.doAnalysis == STAGE_SKIP ) return true ; // Skipped
1417+ if (analysis_opts.doAnalysis == e_stage_action::SKIP ) return true ; // Skipped
14181418
1419- if (analysis_opts.doAnalysis == STAGE_AUTO && !route_status.success ()) return false ; // Not run
1419+ if (analysis_opts.doAnalysis == e_stage_action::SKIP_IF_PRIOR_FAIL && !route_status.success ()) return false ; // Not run
14201420
1421- VTR_ASSERT_MSG (analysis_opts.doAnalysis == STAGE_DO
1422- || (analysis_opts.doAnalysis == STAGE_AUTO && route_status.success ()),
1421+ VTR_ASSERT_MSG (analysis_opts.doAnalysis == e_stage_action::DO
1422+ || (analysis_opts.doAnalysis == e_stage_action::SKIP_IF_PRIOR_FAIL && route_status.success ()),
14231423 " Analysis should run only if forced, or implementation legal" );
14241424
14251425 if (!route_status.success ()) {
0 commit comments