aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch.cc5
-rw-r--r--ice40/arch.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index fcc9d798..324934d0 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -913,6 +913,11 @@ bool Arch::isGlobalNet(const NetInfo *net) const
return net->driver.cell != nullptr && net->driver.port == id_glb_buf_out;
}
+bool Arch::isIOCell(const CellInfo *cell) const
+{
+ return cell->type == id_sb_io;
+}
+
// Assign arch arg info
void Arch::assignArchInfo()
{
diff --git a/ice40/arch.h b/ice40/arch.h
index 328950df..2b785079 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -794,6 +794,8 @@ struct Arch : BaseCtx
bool isClockPort(const CellInfo *cell, IdString port) const;
// Return true if a port is a net
bool isGlobalNet(const NetInfo *net) const;
+ // Return true if a cell is an IO
+ bool isIOCell(const CellInfo *cell) const;
// -------------------------------------------------