diff --git a/vpr/src/pack/pack.cpp b/vpr/src/pack/pack.cpp index 24936c767a..507dcd3e50 100644 --- a/vpr/src/pack/pack.cpp +++ b/vpr/src/pack/pack.cpp @@ -105,22 +105,6 @@ static e_packer_state get_next_packer_state(e_packer_state current_packer_state, return e_packer_state::SUCCESS; } - // Check if the utilizaion of any block types is over 100% - if (!fits_on_device) { - // The utilization of some block types are too high. Need to increase the - // density of the block types available. - - // Check if we can turn on unrelated cluster and/or balanced block type - // utilization. - if (packer_opts.allow_unrelated_clustering == e_unrelated_clustering::AUTO && packer_opts.balance_block_type_utilization == e_balance_block_type_util::AUTO) { - - // Check if they are not already on. If not, set the next state to turn them on. - if (!using_unrelated_clustering || !using_balanced_block_type_util) { - return e_packer_state::SET_UNRELATED_AND_BALANCED; - } - } - } - // Check if there are overfilled floorplan regions. if (floorplan_regions_overfull) { // If there are overfilled region constraints, try to use attraction @@ -152,6 +136,22 @@ static e_packer_state get_next_packer_state(e_packer_state current_packer_state, } } + // Check if the utilizaion of any block types is over 100% + if (!fits_on_device) { + // The utilization of some block types are too high. Need to increase the + // density of the block types available. + + // Check if we can turn on unrelated cluster and/or balanced block type + // utilization. + if (packer_opts.allow_unrelated_clustering == e_unrelated_clustering::AUTO && packer_opts.balance_block_type_utilization == e_balance_block_type_util::AUTO) { + + // Check if they are not already on. If not, set the next state to turn them on. + if (!using_unrelated_clustering || !using_balanced_block_type_util) { + return e_packer_state::SET_UNRELATED_AND_BALANCED; + } + } + } + // Check if we can increase the target density of the overused block types. // This is a last resort since increasing the target pin density can have // bad affects on quality and routability.