File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,17 @@ bool t_logical_block_type::is_empty() const {
230
230
return name == std::string (EMPTY_BLOCK_NAME);
231
231
}
232
232
233
+ bool t_logical_block_type::is_io () const {
234
+ // Iterate over all equivalent tiles and return true if any
235
+ // of them are IO tiles
236
+ for (const auto & tile : equivalent_tiles) {
237
+ if (tile->is_io ()) {
238
+ return true ;
239
+ }
240
+ }
241
+ return false ;
242
+ }
243
+
233
244
const t_port* t_logical_block_type::get_port (std::string_view port_name) const {
234
245
for (int i = 0 ; i < pb_type->num_ports ; i++) {
235
246
auto port = pb_type->ports [i];
Original file line number Diff line number Diff line change @@ -978,6 +978,9 @@ struct t_logical_block_type {
978
978
// Is this t_logical_block_type empty?
979
979
bool is_empty () const ;
980
980
981
+ // Returns true if this logical block type is an IO block
982
+ bool is_io () const ;
983
+
981
984
public:
982
985
/* *
983
986
* @brief Returns the logical block port given the port name and the corresponding logical block type
You can’t perform that action at this time.
0 commit comments