ecp5: Preparations for new IO bels

Signed-off-by: David Shah <dave@ds0.me>
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 348f219..8ce0653 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -889,6 +889,10 @@
         if (cell->ports.at(port).name == id_STOP)
             return TMG_ENDPOINT;
         return (cell->ports.at(port).type == PORT_OUT) ? TMG_COMB_OUTPUT : TMG_COMB_INPUT;
+    } else if (cell->type == id_ECLKBRIDGECS) {
+        if (cell->ports.at(port).name == id_SEL)
+            return TMG_ENDPOINT;
+        return (cell->ports.at(port).type == PORT_OUT) ? TMG_COMB_OUTPUT : TMG_COMB_INPUT;
     } else {
         log_error("cell type '%s' is unsupported (instantiated as '%s')\n", cell->type.c_str(this),
                   cell->name.c_str(this));
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc
index d2a90b8..1d15372 100644
--- a/ecp5/bitstream.cc
+++ b/ecp5/bitstream.cc
@@ -1367,6 +1367,13 @@
             std::string tile = ctx->getTileByType(std::string("ECLK_") + (r ? "R" : "L"));
             if (get_net_or_empty(ci, id_STOP) != nullptr)
                 cc.tiles[tile].add_enum(eclksync + ".MODE", "ECLKSYNCB");
+        } else if (ci->type == id_ECLKBRIDGECS) {
+            Loc loc = ctx->getBelLocation(ci->bel);
+            bool r = loc.x > 5;
+            std::string eclkb = ctx->locInfo(bel)->bel_data[bel.index].name.get();
+            std::string tile = ctx->getTileByType(std::string("ECLK_") + (r ? "R" : "L"));
+            if (get_net_or_empty(ci, id_STOP) != nullptr)
+                cc.tiles[tile].add_enum(eclkb + ".MODE", "ECLKBRIDGECS");
         } else if (ci->type == id_DDRDLL) {
             Loc loc = ctx->getBelLocation(ci->bel);
             bool u = loc.y<15, r = loc.x> 15;
diff --git a/ecp5/constids.inc b/ecp5/constids.inc
index 007e952..1b5486e 100644
--- a/ecp5/constids.inc
+++ b/ecp5/constids.inc
@@ -1288,4 +1288,8 @@
 X(MULT18X18D_REGS_NONE)
 X(MULT18X18D_REGS_OUTPUT)
 X(MULT18X18D_REGS_PIPELINE)
-X(P)
\ No newline at end of file
+X(P)
+
+X(ECLKBRIDGECS)
+X(SEL)
+X(ECSOUT)