aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-10-18 16:32:55 +0100
committerDavid Shah <dave@ds0.me>2019-10-19 13:01:00 +0100
commita22f86f86192bbd782cc2fd430b2900ddb6740cc (patch)
tree43af43110d3e837fcff3deb2bbbb1e90074f4cc9 /ecp5
parentcf5cbd1153c3ebaf6bcff98f2d936e1663407dff (diff)
downloadnextpnr-a22f86f86192bbd782cc2fd430b2900ddb6740cc.tar.gz
nextpnr-a22f86f86192bbd782cc2fd430b2900ddb6740cc.tar.bz2
nextpnr-a22f86f86192bbd782cc2fd430b2900ddb6740cc.zip
ice40: Preserve top level IO properly
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/cells.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecp5/cells.cc b/ecp5/cells.cc
index b70b412d..9accdd55 100644
--- a/ecp5/cells.cc
+++ b/ecp5/cells.cc
@@ -419,9 +419,9 @@ void nxio_to_tr(Context *ctx, CellInfo *nxio, CellInfo *trio, std::vector<std::u
NetInfo *donet = trio->ports.at(ctx->id("I")).net, *dinet = trio->ports.at(ctx->id("O")).net;
// Rename I/O nets to avoid conflicts
- if (donet != nullptr)
+ if (donet != nullptr && donet->name == nxio->name)
rename_net(ctx, donet, ctx->id(donet->name.str(ctx) + "$TRELLIS_IO_OUT"));
- if (dinet != nullptr)
+ if (dinet != nullptr && dinet->name == nxio->name)
rename_net(ctx, dinet, ctx->id(dinet->name.str(ctx) + "$TRELLIS_IO_IN"));
// Create a new top port net for accurate IO timing analysis and simulation netlists