verilog-to-routing / vtr-verilog-to-routing

Verilog to Routing -- Open Source CAD Flow for FPGA Research
https://verilogtorouting.org
Other
979 stars 378 forks source link

enable option to force molecule placement on a specified primitive site #2609

Closed KA7E closed 2 weeks ago

KA7E commented 2 weeks ago

Added an optional primitive site parameter; if specified, vpr will either place the molecule on the specified site or fail; if not specified, vpr will select an available, legal site (if possible).

Description

Added optional force_site parameter to pack_mol_in_existing_cluster and start_new_cluster_for_mol; these functions pass the parameter to try_pack_mol, which passes it to get_next_primitive_list. If a force site is passed to get_next_primitive_list, it either places the molecule on this site or else returns failure.

Related Issue

Motivation and Context

This is required for reconstructing clusters from an externally generated flat placement.

How Has This Been Tested?

This has been tested by ingesting and reconstructing VPR-generated flat placement files. This has no impact on QoR (in a previous PR I reported results for this and several other legalizer-related code changes compared to the master branch).

Types of changes

Checklist:

vaughnbetz commented 2 weeks ago

Looks good; will merge when CI is done. Optional: we should eventually move the function level comments from cluster_placement.cpp to cluster_placement.h (better practice, matches newer code). Doesn't have to be done as part of this PR, but moving them all over would be good so if you want to do it now is a fine time.

KA7E commented 2 weeks ago

I have other priorities this week, but I'll put it on my list. CI appears to have finished.

KA7E commented 2 weeks ago

@vaughnbetz would you please merge this?