From 817ba5a4b9cb0b64b2a1170205a23e7a9107a84b Mon Sep 17 00:00:00 2001 From: David Shah Date: Tue, 19 Feb 2019 14:12:54 +0000 Subject: ecp5: Add DELAYF/DELAYG support Signed-off-by: David Shah --- common/design_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/design_utils.cc') diff --git a/common/design_utils.cc b/common/design_utils.cc index a0b87764..8762f068 100644 --- a/common/design_utils.cc +++ b/common/design_utils.cc @@ -107,6 +107,8 @@ void disconnect_port(const Context *ctx, CellInfo *cell, IdString port_name) return user.cell == cell && user.port == port_name; }), port.net->users.end()); + if (port.net->driver.cell == cell && port.net->driver.port == port_name) + port.net->driver.cell = nullptr; } } -- cgit v1.2.3 From e50ab2106f9342b585377cf20f0b0c09125e3dbc Mon Sep 17 00:00:00 2001 From: David Shah Date: Tue, 19 Feb 2019 15:24:28 +0000 Subject: ecp5: Fixes for litedram Signed-off-by: David Shah --- common/design_utils.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/design_utils.cc') diff --git a/common/design_utils.cc b/common/design_utils.cc index 8762f068..da170030 100644 --- a/common/design_utils.cc +++ b/common/design_utils.cc @@ -27,6 +27,8 @@ NEXTPNR_NAMESPACE_BEGIN void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, IdString rep_name) { + if (!old_cell->ports.count(old_name)) + return; PortInfo &old = old_cell->ports.at(old_name); PortInfo &rep = rep_cell->ports.at(rep_name); NPNR_ASSERT(old.type == rep.type); -- cgit v1.2.3