@@ -126,13 +126,21 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
126
126
// Returns the physical block
127
127
t_pb* block_pb (const ClusterBlockId id) const ;
128
128
129
- // Returns the type of CLB (Logic block, RAM, DSP, etc.). Calls block_type with boolean set to true.
129
+ /*
130
+ * Returns the type of CLB (Logic block, RAM, DSP, etc.). There are two different overloaded block_type functions
131
+ * 1) The first one (without the boolean) is used to retrieve the actual physical type corresponding to the placed
132
+ * block. This function will call the one with the boolean, setting `get_equivalent_if_set` to true.
133
+ * 2) The second one (with the boolean) is used to retrieve the physical or logical type relative to a block.
134
+ * Depending on the value of `get_equivalent_if_set` we will get a different block_type:
135
+ * - True: the function returns the physical placed tile (can be an equivalent tile) of the block;
136
+ * - False: the function returns the logical tile of the block (even if it was placed in an equivalent tile).
137
+ */
130
138
t_type_ptr block_type (const ClusterBlockId id) const ;
131
-
132
- // Returns the type of CLB. If get_equivalent_if_set is true, if the equivalent tile has been chosen it returns it.
133
139
t_type_ptr block_type (const ClusterBlockId id, bool get_equivalent_if_set) const ;
134
140
135
141
// Returns the equivalent type index (if any) of a CLB
142
+ // The index is used to retrieve the equivalent type from the t_type_descriptor structure
143
+ // Example: type->equivalent_tiles[index]
136
144
int block_eq_type_index (const ClusterBlockId id) const ;
137
145
138
146
// Returns the net of the block attached to the specific pin index
@@ -182,7 +190,8 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
182
190
// t_type_ptr : The type of the CLB
183
191
ClusterBlockId create_block (const char *name, t_pb* pb, t_type_ptr type);
184
192
185
- // Add the equivalent block type for a CLB
193
+ // Add the equivalent block type for a CLB. This mutator adds both the equivalent type index and
194
+ // the equivalent type to the corresponding vector_maps
186
195
// blk_id : The block placed in an equivalent tile location
187
196
// i_eq_type : The index used to retrieve the equivalent tile from the t_type_ptr structure
188
197
// eq_type : The equivalent type associated with this block
0 commit comments