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

move lookup update to start_new_cluster... for consistency #2619

Closed KA7E closed 1 week ago

KA7E commented 1 week ago

When removing a molecule from a cluster or adding a molecule to an existing cluster, the clb-atoms lookup is updated in the helper function responsible for the change. For consistency, I've moved the lookup update to the helper function for creating a new cluster for a molecule.

Description

Moved code that resizes the lookup and adds all molecule atoms to the entry for the new cluster from the top level api function in re_cluster.cpp to the utility function in re_cluster_util.cpp.

Related Issue

Motivation and Context

In the legalizer, it is confusing to sometimes have to update this data structure and sometimes not; always doing it in the helper function is more clear. It does not change the functionality of the re-clustering API.

How Has This Been Tested?

Types of changes

Checklist: