Skip to content

Commit 101aa3e

Browse files
acomodikmurray
authored andcommitted
added comments to better explain physical and logical types
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent 20ad802 commit 101aa3e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
* The data structures that store the
1111
*
1212
* Key data types:
13-
* t_logical_block_type: describes a placeable complex logic block,
13+
* t_physical_tile_type: represents the type of a tile in the device grid and describes its physical characteristics (pin locations, area, width, height, etc.)
14+
* t_logical_block_type: represents and describes the type of a clustered block
1415
* pb_type: describes the types of physical blocks within the t_logical_block_type in a hierarchy where the top block is the complex block and the leaf blocks implement one logical block
1516
* pb_graph_node: is a flattened version of pb_type so a pb_type with 10 instances will have 10 pb_graph_nodes representing each instance
1617
*
@@ -573,10 +574,6 @@ typedef const t_logical_block_type* t_logical_block_type_ptr;
573574
* Note that the SB is located to the top-right of the
574575
* grid tile location. [0..width-1][0..height-1]
575576
*
576-
*
577-
* pb_type: Internal subblocks and routing information for this physical block
578-
* pb_graph_head: Head of DAG of pb_types_nodes and their edges
579-
*
580577
* area: Describes how much area this logic block takes, if undefined, use default
581578
* type_timing_inf: timing information unique to this type
582579
* num_drivers: Total number of output drivers supplied

vpr/src/util/vpr_utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,9 @@ bool is_empty_type(t_physical_tile_type_ptr type) {
643643
t_physical_tile_type_ptr physical_tile_type(t_logical_block_type_ptr logical_block_type) {
644644
auto& device_ctx = g_vpr_ctx.device();
645645

646+
/* It is assumed that there is a 1:1 mapping between logical and physical types
647+
* making it possible to use the same index to access the corresponding type
648+
*/
646649
return &device_ctx.physical_tile_types[logical_block_type->index];
647650
}
648651

@@ -657,6 +660,9 @@ t_physical_tile_type_ptr physical_tile_type(ClusterBlockId blk) {
657660
t_logical_block_type_ptr logical_block_type(t_physical_tile_type_ptr physical_tile_type) {
658661
auto& device_ctx = g_vpr_ctx.device();
659662

663+
/* It is assumed that there is a 1:1 mapping between logical and physical types
664+
* making it possible to use the same index to access the corresponding type
665+
*/
660666
return &device_ctx.logical_block_types[physical_tile_type->index];
661667
}
662668

0 commit comments

Comments
 (0)