Skip to content

Commit 83cbcbb

Browse files
committed
equivalent tiles: added documentation
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent ec836cf commit 83cbcbb

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

vpr/src/base/clustered_netlist.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,21 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
126126
//Returns the physical block
127127
t_pb* block_pb(const ClusterBlockId id) const;
128128

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+
*/
130138
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.
133139
t_type_ptr block_type(const ClusterBlockId id, bool get_equivalent_if_set) const;
134140

135141
//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]
136144
int block_eq_type_index(const ClusterBlockId id) const;
137145

138146
//Returns the net of the block attached to the specific pin index
@@ -182,7 +190,8 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi
182190
// t_type_ptr : The type of the CLB
183191
ClusterBlockId create_block(const char *name, t_pb* pb, t_type_ptr type);
184192

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
186195
// blk_id : The block placed in an equivalent tile location
187196
// i_eq_type : The index used to retrieve the equivalent tile from the t_type_ptr structure
188197
// eq_type : The equivalent type associated with this block

0 commit comments

Comments
 (0)