Skip to content

Commit c12350d

Browse files
make is_io_type() a member function of t_physical_tile_type
1 parent 10722fb commit c12350d

File tree

5 files changed

+8
-26
lines changed

5 files changed

+8
-26
lines changed

libs/libarchfpga/src/physical_types.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ bool t_physical_tile_type::is_empty() const {
172172
return name == std::string(EMPTY_BLOCK_NAME);
173173
}
174174

175+
bool t_physical_tile_type::is_io_type() const {
176+
return is_input_type || is_output_type;
177+
}
178+
175179
int t_physical_tile_type::find_pin(std::string_view port_name, int pin_index_in_port) const {
176180
int ipin = OPEN;
177181
int port_base_ipin = 0;

libs/libarchfpga/src/physical_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,9 @@ struct t_physical_tile_type {
725725
///@brief Is this t_physical_tile_type an empty type?
726726
bool is_empty() const;
727727

728+
///@brief Returns true if the physical tile type can implement either a .input or .output block type
729+
bool is_io_type() const;
730+
728731
///@brief Returns the relative pin index within a sub tile that corresponds to the pin within the given port and its index in the port
729732
int find_pin(std::string_view port_name, int pin_index_in_port) const;
730733

libs/libarchfpga/src/physical_types_util.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -637,21 +637,6 @@ bool is_pin_conencted_to_layer(t_physical_tile_type_ptr type, int ipin, int from
637637
return false;
638638
}
639639

640-
// TODO: Remove is_input_type / is_output_type / is_io_type as part of
641-
// https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/1193
642-
bool is_input_type(t_physical_tile_type_ptr type) {
643-
return type->is_input_type;
644-
}
645-
646-
bool is_output_type(t_physical_tile_type_ptr type) {
647-
return type->is_output_type;
648-
}
649-
650-
bool is_io_type(t_physical_tile_type_ptr type) {
651-
return is_input_type(type)
652-
|| is_output_type(type);
653-
}
654-
655640
std::string block_type_pin_index_to_name(t_physical_tile_type_ptr type, int pin_physical_num, bool is_flat) {
656641
int max_ptc = get_tile_pin_max_ptc(type, is_flat);
657642
VTR_ASSERT(pin_physical_num < max_ptc);

libs/libarchfpga/src/physical_types_util.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,6 @@ bool is_opin(int ipin, t_physical_tile_type_ptr type);
120120
///@brief Returns true if the specified pin is located at "from_layer" and it is connected to "to_layer"
121121
bool is_pin_conencted_to_layer(t_physical_tile_type_ptr type, int ipin, int from_layer, int to_layer, int num_of_avail_layer);
122122

123-
///@brief Returns true if the given physical tile type can implement a .input block type
124-
bool is_input_type(t_physical_tile_type_ptr type);
125-
///@brief Returns true if the given physical tile type can implement a .output block type
126-
bool is_output_type(t_physical_tile_type_ptr type);
127-
///@brief Returns true if the given physical tile type can implement either a .input or .output block type
128-
bool is_io_type(t_physical_tile_type_ptr type);
129-
130123
/**
131124
* @brief Returns the corresponding physical pin based on the input parameters:
132125
*

vpr/src/util/vpr_utils.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef VPR_UTILS_H
2-
#define VPR_UTILS_H
1+
#pragma once
32

43
#include "arch_util.h"
54
#include "atom_netlist.h"
@@ -362,5 +361,3 @@ class PortPinToBlockPinConverter {
362361
*/
363362
std::vector<std::vector<std::vector<std::vector<int>>>> blk_pin_from_port_pin_;
364363
};
365-
366-
#endif

0 commit comments

Comments
 (0)