Skip to content

Commit 43e33fa

Browse files
committed
[libs][libarch] add is_io_type for logical types
1 parent 58a3522 commit 43e33fa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libs/libarchfpga/src/physical_types_util.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,11 @@ bool is_io_type(t_physical_tile_type_ptr type) {
652652
|| is_output_type(type);
653653
}
654654

655+
bool is_io_type(t_logical_block_type_ptr type) {
656+
auto physical_tile = pick_physical_type(type);
657+
return is_io_type(physical_tile);
658+
}
659+
655660
std::string block_type_pin_index_to_name(t_physical_tile_type_ptr type, int pin_physical_num, bool is_flat) {
656661
int max_ptc = get_tile_pin_max_ptc(type, is_flat);
657662
VTR_ASSERT(pin_physical_num < max_ptc);

libs/libarchfpga/src/physical_types_util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ bool is_output_type(t_physical_tile_type_ptr type);
127127
///@brief Returns true if the given physical tile type can implement either a .input or .output block type
128128
bool is_io_type(t_physical_tile_type_ptr type);
129129

130+
///@brief Returns true if the given logical block type is an IO block
131+
bool is_io_type(t_logical_block_type_ptr type);
132+
130133
/**
131134
* @brief Returns the corresponding physical pin based on the input parameters:
132135
*

0 commit comments

Comments
 (0)