Add new Arch::getBelIOB(BelId) function
diff --git a/docs/archapi.md b/docs/archapi.md
index 3c93886..78b2053 100644
--- a/docs/archapi.md
+++ b/docs/archapi.md
@@ -115,6 +115,10 @@
 
 Returns true if the given bel is a global buffer. A global buffer does not "pull in" other cells it drives to be close to the location of the global buffer.
 
+### bool getBelIOB(BelId bel) const
+
+Returns true if the given bel is a IO block.
+
 ### uint32\_t getBelChecksum(BelId bel) const
 
 Return a (preferably unique) number that represents this bel. This is used in design state checksum calculations.
diff --git a/ecp5/arch.h b/ecp5/arch.h
index a68673f..131e06b 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -539,6 +539,7 @@
     BelRange getBelsByTile(int x, int y) const;
 
     bool getBelGlobalBuf(BelId bel) const { return getBelType(bel) == id_DCCA; }
+    bool getBelIOB(BelId bel) const { return chip_info->bel_data[bel.index].type == ID_TRELLIS_IO; }
 
     bool checkBelAvail(BelId bel) const
     {
diff --git a/generic/arch.cc b/generic/arch.cc
index 77417d2..7065cc3 100644
--- a/generic/arch.cc
+++ b/generic/arch.cc
@@ -224,6 +224,7 @@
 const std::vector<BelId> &Arch::getBelsByTile(int x, int y) const { return bels_by_tile.at(x).at(y); }
 
 bool Arch::getBelGlobalBuf(BelId bel) const { return bels.at(bel).gb; }
+bool Arch::getBelIOB(BelId bel) const { return /* TODO */ false; }
 
 uint32_t Arch::getBelChecksum(BelId bel) const
 {
diff --git a/generic/arch.h b/generic/arch.h
index dc4258c..de1fca2 100644
--- a/generic/arch.h
+++ b/generic/arch.h
@@ -150,6 +150,7 @@
     BelId getBelByLocation(Loc loc) const;
     const std::vector<BelId> &getBelsByTile(int x, int y) const;
     bool getBelGlobalBuf(BelId bel) const;
+    bool getBelIOB(BelId bel) const;
     uint32_t getBelChecksum(BelId bel) const;
     void bindBel(BelId bel, CellInfo *cell, PlaceStrength strength);
     void unbindBel(BelId bel);
diff --git a/ice40/arch.h b/ice40/arch.h
index 2dd6b06..a74528a 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -513,6 +513,7 @@
     BelRange getBelsByTile(int x, int y) const;
 
     bool getBelGlobalBuf(BelId bel) const { return chip_info->bel_data[bel.index].type == ID_SB_GB; }
+    bool getBelIOB(BelId bel) const { return chip_info->bel_data[bel.index].type == ID_SB_IO; }
 
     IdString getBelType(BelId bel) const
     {