@@ -623,50 +623,16 @@ bool vpr_pack_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
623623
624624 // generate a .net file by legalizing an input flat placement file
625625 if (packer_opts.load_flat_placement ) {
626-
627626 // Load and legalizer flat placement file
628627 vpr_load_flat_placement (vpr_setup, arch);
629628
630629 // Load the result from the .net file
631630 vpr_load_packing (vpr_setup, arch);
632-
633631 } else {
634-
635632 // Load a previous packing from the .net file
636633 vpr_load_packing (vpr_setup, arch);
637-
638634 }
639-
640635 }
641-
642- // Load cluster_constraints data structure.
643- load_cluster_constraints ();
644-
645- /* Sanity check the resulting netlist */
646- check_netlist (packer_opts.pack_verbosity );
647-
648- // Independently verify the clusterings to ensure the clustering can be
649- // used for the rest of the VPR flow.
650- // NOTE: This is done here since it must be done after vpr_load_packing
651- // and load_cluster_constraints.
652- // TODO: If load_cluster_constraints was in vpr_load_packing, this could
653- // also be in vpr_load_packing which would make more sense.
654- unsigned num_errors = verify_clustering (g_vpr_ctx);
655- if (num_errors == 0 ) {
656- VTR_LOG (" Completed clustering consistency check successfully.\n " );
657- } else {
658- VPR_ERROR (VPR_ERROR_PACK,
659- " %u errors found while performing clustering consistency "
660- " check. Aborting program.\n " ,
661- num_errors);
662- }
663-
664- /* Output the netlist stats to console and optionally to file. */
665- writeClusteredNetlistStats (vpr_setup.FileNameOpts .write_block_usage );
666-
667- // print the total number of used physical blocks for each
668- // physical block type after finishing the packing stage
669- print_pb_type_count (g_vpr_ctx.clustering ().clb_nlist );
670636 }
671637
672638 return status;
@@ -759,6 +725,31 @@ void vpr_load_packing(t_vpr_setup& vpr_setup, const t_arch& arch) {
759725 std::ofstream ofs (" packing_pin_util.rpt" );
760726 report_packing_pin_usage (ofs, g_vpr_ctx);
761727 }
728+
729+ // Load cluster_constraints data structure.
730+ load_cluster_constraints ();
731+
732+ /* Sanity check the resulting netlist */
733+ check_netlist (vpr_setup.PackerOpts .pack_verbosity );
734+
735+ // Independently verify the clusterings to ensure the clustering can be
736+ // used for the rest of the VPR flow.
737+ unsigned num_errors = verify_clustering (g_vpr_ctx);
738+ if (num_errors == 0 ) {
739+ VTR_LOG (" Completed clustering consistency check successfully.\n " );
740+ } else {
741+ VPR_ERROR (VPR_ERROR_PACK,
742+ " %u errors found while performing clustering consistency "
743+ " check. Aborting program.\n " ,
744+ num_errors);
745+ }
746+
747+ /* Output the netlist stats to console and optionally to file. */
748+ writeClusteredNetlistStats (vpr_setup.FileNameOpts .write_block_usage );
749+
750+ // print the total number of used physical blocks for each
751+ // physical block type after finishing the packing stage
752+ print_pb_type_count (g_vpr_ctx.clustering ().clb_nlist );
762753}
763754
764755bool vpr_load_flat_placement (t_vpr_setup& vpr_setup, const t_arch& arch) {
0 commit comments