diff options
| -rw-r--r-- | ecp5/arch.cc | 4 | ||||
| -rw-r--r-- | ecp5/bitstream.cc | 7 | ||||
| -rw-r--r-- | ecp5/constids.inc | 6 | 
3 files changed, 16 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 348f2192..8ce0653c 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -889,6 +889,10 @@ TimingPortClass Arch::getPortTimingClass(const CellInfo *cell, IdString port, in          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 d2a90b86..1d153720 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -1367,6 +1367,13 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex              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 007e952a..1b5486eb 100644 --- a/ecp5/constids.inc +++ b/ecp5/constids.inc @@ -1288,4 +1288,8 @@ X(MULT18X18D_REGS_INPUT)  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)  | 
