@@ -119,21 +119,15 @@ class Metrics
119119 float macro_area_ = 0.0 ;
120120};
121121
122- // In this hierarchical autoclustering part,
123- // we convert the original gate-level netlist into a cluster-level netlist
124122class Cluster
125123{
126124 public:
127- // constructors
128- Cluster (int cluster_id, utl::Logger* logger); // cluster name can be updated
125+ Cluster (int cluster_id, utl::Logger* logger);
129126 Cluster (int cluster_id, const std::string& cluster_name, utl::Logger* logger);
130127
131- // cluster id can not be changed
132128 int getId () const ;
133- // cluster name can be updated
134129 const std::string& getName () const ;
135130 void setName (const std::string& name);
136- // cluster type (default type = MixedCluster)
137131 void setClusterType (const ClusterType& cluster_type);
138132 ClusterType getClusterType () const ;
139133 std::string getClusterTypeString () const ;
@@ -155,7 +149,7 @@ class Cluster
155149 void clearLeafStdCells ();
156150 void clearLeafMacros ();
157151 void clearHardMacros ();
158- void copyInstances (const Cluster& cluster); // only based on cluster type
152+ void copyInstances (const Cluster& cluster);
159153
160154 bool isIOCluster () const ;
161155 bool isClusterOfUnconstrainedIOPins () const ;
@@ -208,7 +202,7 @@ class Cluster
208202 Cluster* getParent () const ;
209203 const UniqueClusterVector& getChildren () const ;
210204
211- bool isLeaf () const ; // if the cluster is a leaf cluster
205+ bool isLeaf () const ;
212206 std::string getIsLeafString () const ;
213207 bool attemptMerge (Cluster* incomer, bool & incomer_deleted);
214208
@@ -220,10 +214,6 @@ class Cluster
220214 std::map<int , float > getConnection () const ;
221215 bool isSameConnSignature (const Cluster& cluster, float net_threshold);
222216 bool hasMacroConnectionWith (const Cluster& cluster, float net_threshold);
223- // Get closely-connected cluster if such cluster exists
224- // For example, if a small cluster A is closely connected to a
225- // well-formed cluster B, (there are also other well-formed clusters
226- // C, D), A is only connected to B and A has no connection with C, D
227217 int getCloseCluster (const std::vector<int >& candidate_clusters,
228218 float net_threshold);
229219
@@ -243,57 +233,31 @@ class Cluster
243233 const TilingList& getTilings () const ;
244234
245235 private:
246- // Private Variables
247- int id_ = -1 ; // cluster id (a valid cluster id should be nonnegative)
248- std::string name_; // cluster name
249- ClusterType type_ = MixedCluster; // cluster type
250-
251- // Instances in the cluster
252- // the logical module included in the cluster
253- // dbModule is a object representing logical module in the OpenDB
236+ int id_{-1 };
237+ std::string name_;
238+ ClusterType type_{MixedCluster};
239+ Metrics metrics_;
254240 std::vector<odb::dbModule*> db_modules_;
255- // the std cell instances in the cluster (leaf std cell instances)
256241 std::vector<odb::dbInst*> leaf_std_cells_;
257- // the macros in the cluster (leaf macros)
258242 std::vector<odb::dbInst*> leaf_macros_;
259- // all the macros in the cluster
260243 std::vector<HardMacro*> hard_macros_;
261244
262245 bool is_cluster_of_unplaced_io_pins_{false };
263246 bool is_cluster_of_unconstrained_io_pins_{false };
264247 bool is_io_pad_cluster_{false };
265248 bool is_io_bundle_{false };
266-
267249 bool is_array_of_interconnected_macros_ = false ;
268250 bool is_fixed_macro_{false };
269251
270- // Each cluster uses metrics to store its statistics
271- Metrics metrics_;
272-
273- // Each cluster cooresponding to a SoftMacro in the placement engine
274- // which will concludes the information about real pos, width, height, area
275252 std::unique_ptr<SoftMacro> soft_macro_;
276-
277- // Each cluster is a node in the physical hierarchy tree
278- // Thus we need to define related to parent and children pointers
279- Cluster* parent_ = nullptr ; // parent of current cluster
280- UniqueClusterVector children_;
281-
282253 TilingList tilings_;
283254
284- // To support grouping small clusters based connection signature,
285- // we define connection_map_
286- // Here we do not differentiate the input and output connections
287- std::map<int , float > connection_map_; // cluster_id, number of connections
255+ Cluster* parent_{nullptr };
256+ UniqueClusterVector children_;
288257
289- // store the virtual connection between children
290- // the virtual connection is used to tie the std cell part and the
291- // corresponding macro part together
292- std::vector<std::pair<int , int >> virtual_connections_;
258+ std::map<int , float > connection_map_; // id -> connection weight
259+ std::vector<std::pair<int , int >> virtual_connections_; // id -> id
293260
294- // pin access for each bundled connection
295- std::map<int , std::pair<Boundary, float >> pin_access_map_;
296- std::map<Boundary, std::map<Boundary, float >> boundary_connection_map_;
297261 utl::Logger* logger_;
298262};
299263
@@ -360,10 +324,6 @@ class HardMacro
360324
361325 // Orientation support
362326 odb::dbOrientType getOrientation () const ;
363- // We do not allow rotation of macros
364- // This may violate the direction of metal layers
365- // flip about X or Y axis
366- void flip (bool flip_horizontal);
367327
368328 // Interfaces with OpenDB
369329 odb::dbInst* getInst () const ;
0 commit comments