aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-06-29 22:11:00 +0100
committerDavid Shah <dave@ds0.me>2020-06-29 22:11:00 +0100
commitc0901fb972e34d2d16b3ac0074a18542ba1c448d (patch)
tree728ea7c9931b3029a286ccc4dda1ab9e73f6beff /ecp5/pack.cc
parent32e655d0afcc01d7a04aca0f1c5be39140e21335 (diff)
downloadnextpnr-c0901fb972e34d2d16b3ac0074a18542ba1c448d.tar.gz
nextpnr-c0901fb972e34d2d16b3ac0074a18542ba1c448d.tar.bz2
nextpnr-c0901fb972e34d2d16b3ac0074a18542ba1c448d.zip
ecp5: Fix derivation of OSCG timing constraint
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index fb8a95e9..501f55b6 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -2853,10 +2853,14 @@ class Ecp5Packer
while (!changed_nets.empty() && iter < itermax) {
++iter;
std::unordered_set<IdString> changed_cells;
- for (auto net : changed_nets)
+ for (auto net : changed_nets) {
for (auto &user : ctx->nets.at(net)->users)
if (user.port == id_CLKI || user.port == id_ECLKI || user.port == id_CLK0 || user.port == id_CLK1)
changed_cells.insert(user.cell->name);
+ auto &drv = ctx->nets.at(net)->driver;
+ if (iter == 1 && drv.cell != nullptr && drv.port == id_OSC)
+ changed_cells.insert(drv.cell->name);
+ }
changed_nets.clear();
for (auto cell : sorted(changed_cells)) {
CellInfo *ci = ctx->cells.at(cell).get();