aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-10-19 13:31:21 +0100
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:27 +0000
commitcbf99d5e5390d8439722e0172067b687be5ac060 (patch)
tree89f2a8095bf7b0c9f578e8d3caceb6201a98b513 /common
parentdfd6b6e39e56a2c2b10b051b9b54926e120f319e (diff)
downloadnextpnr-cbf99d5e5390d8439722e0172067b687be5ac060.tar.gz
nextpnr-cbf99d5e5390d8439722e0172067b687be5ac060.tar.bz2
nextpnr-cbf99d5e5390d8439722e0172067b687be5ac060.zip
nexus: LUTRAM support
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common')
-rw-r--r--common/design_utils.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/design_utils.cc b/common/design_utils.cc
index dd866758..9478afb2 100644
--- a/common/design_utils.cc
+++ b/common/design_utils.cc
@@ -30,6 +30,13 @@ void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, IdS
if (!old_cell->ports.count(old_name))
return;
PortInfo &old = old_cell->ports.at(old_name);
+
+ // Create port on the replacement cell if it doesn't already exist
+ if (!rep_cell->ports.count(rep_name)) {
+ rep_cell->ports[rep_name].name = rep_name;
+ rep_cell->ports[rep_name].type = old.type;
+ }
+
PortInfo &rep = rep_cell->ports.at(rep_name);
NPNR_ASSERT(old.type == rep.type);