aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-10-09 10:55:10 +0100
committerDavid Shah <dave@ds0.me>2019-10-09 10:55:10 +0100
commit9b83e67460ba12f7b48d94253007954e9c50552b (patch)
tree8a1876101f6fb485df3dacde0c70ee6c0a108490 /ecp5
parente9cced57bf210faa4674a78358cb1a94765b34db (diff)
downloadnextpnr-9b83e67460ba12f7b48d94253007954e9c50552b.tar.gz
nextpnr-9b83e67460ba12f7b48d94253007954e9c50552b.tar.bz2
nextpnr-9b83e67460ba12f7b48d94253007954e9c50552b.zip
ecp5: Preparations for new IO bels
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc4
-rw-r--r--ecp5/bitstream.cc7
-rw-r--r--ecp5/constids.inc6
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)