diff options
author | David Shah <dave@ds0.me> | 2019-09-13 18:24:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-13 18:24:38 +0100 |
commit | 3975424ff544406915a9e995ef14a0b060b30661 (patch) | |
tree | c2f9f614d548d21ff4abd18d7cd92d6decc5d855 /ice40 | |
parent | 927077e03b2e71649a0d691dee8d09bfdf085146 (diff) | |
parent | 9e8976996e576414ac3402b8efa63cd7bd1a89bb (diff) | |
download | nextpnr-3975424ff544406915a9e995ef14a0b060b30661.tar.gz nextpnr-3975424ff544406915a9e995ef14a0b060b30661.tar.bz2 nextpnr-3975424ff544406915a9e995ef14a0b060b30661.zip |
Merge pull request #328 from YosysHQ/dave/timing_iobuf
Move clock constraints across buffers in more cases
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/pack.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc index f411aeee..f5649e64 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -490,6 +490,26 @@ static void pack_io(Context *ctx) sb->type.c_str(ctx), sb->name.c_str(ctx)); if (net != nullptr) { + + if (net->clkconstr != nullptr) { + if (sb->ports.count(id_D_IN_0)) { + NetInfo *din0_net = sb->ports.at(id_D_IN_0).net; + if (din0_net != nullptr && !din0_net->clkconstr) { + // Copy clock constraint from IO pad to input buffer output + din0_net->clkconstr = + std::unique_ptr<ClockConstraint>(new ClockConstraint(*net->clkconstr)); + } + } + if (is_sb_gb_io(ctx, sb) && sb->ports.count(id_GLOBAL_BUFFER_OUTPUT)) { + NetInfo *gb_net = sb->ports.at(id_GLOBAL_BUFFER_OUTPUT).net; + if (gb_net != nullptr && !gb_net->clkconstr) { + // Copy clock constraint from IO pad to global buffer output + gb_net->clkconstr = + std::unique_ptr<ClockConstraint>(new ClockConstraint(*net->clkconstr)); + } + } + } + delete_nets.insert(net->name); sb->ports.at(ctx->id("PACKAGE_PIN")).net = nullptr; } |