diff options
author | gatecat <gatecat@ds0.me> | 2021-02-20 10:51:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 10:51:57 +0000 |
commit | 6672f17d0a546054412c3ecad29a5414ffdcd971 (patch) | |
tree | e0976dd397edf50fe89b5108751c5fb3a7ace896 /ice40/pack.cc | |
parent | 130c5cc76882c2f07836b97040e6bc1d93e4efe9 (diff) | |
parent | e571c707b50a601787590b9752205336ee1c3f6d (diff) | |
download | nextpnr-6672f17d0a546054412c3ecad29a5414ffdcd971.tar.gz nextpnr-6672f17d0a546054412c3ecad29a5414ffdcd971.tar.bz2 nextpnr-6672f17d0a546054412c3ecad29a5414ffdcd971.zip |
Merge pull request #592 from YosysHQ/gatecat/rework-delay
Replace DelayInfo with DelayPair and DelayQuad
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r-- | ice40/pack.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc index 18bc90aa..51138a22 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -1085,17 +1085,17 @@ void set_period(Context *ctx, CellInfo *ci, IdString port, delay_t period) if (to == nullptr) return; if (to->clkconstr != nullptr) { - if (!equals_epsilon(to->clkconstr->period.delay, period)) + if (!equals_epsilon(to->clkconstr->period.maxDelay(), period)) log_warning(" Overriding derived constraint of %.1f MHz on net %s with user-specified constraint of " "%.1f MHz.\n", - MHz(ctx, to->clkconstr->period.delay), to->name.c_str(ctx), MHz(ctx, period)); + MHz(ctx, to->clkconstr->period.maxDelay()), to->name.c_str(ctx), MHz(ctx, period)); return; } to->clkconstr = std::unique_ptr<ClockConstraint>(new ClockConstraint()); - to->clkconstr->low.delay = period / 2; - to->clkconstr->high.delay = period / 2; - to->clkconstr->period.delay = period; - log_info(" Derived frequency constraint of %.1f MHz for net %s\n", MHz(ctx, to->clkconstr->period.delay), + to->clkconstr->low = DelayPair(period / 2); + to->clkconstr->high = DelayPair(period / 2); + to->clkconstr->period = DelayPair(period); + log_info(" Derived frequency constraint of %.1f MHz for net %s\n", MHz(ctx, to->clkconstr->period.maxDelay()), to->name.c_str(ctx)); }; bool get_period(Context *ctx, CellInfo *ci, IdString port, delay_t &period) @@ -1105,7 +1105,7 @@ bool get_period(Context *ctx, CellInfo *ci, IdString port, delay_t &period) NetInfo *from = ci->ports.at(port).net; if (from == nullptr || from->clkconstr == nullptr) return false; - period = from->clkconstr->period.delay; + period = from->clkconstr->period.maxDelay(); return true; }; |