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 /common/sdf.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 'common/sdf.cc')
-rw-r--r-- | common/sdf.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/sdf.cc b/common/sdf.cc index b9606907..5c3d0a5a 100644 --- a/common/sdf.cc +++ b/common/sdf.cc @@ -231,19 +231,19 @@ void Context::writeSDF(std::ostream &out, bool cvc_mode) const wr.program = "nextpnr"; const double delay_scale = 1000; - // Convert from DelayInfo to SDF-friendly RiseFallDelay - auto convert_delay = [&](const DelayInfo &dly) { + // Convert from DelayQuad to SDF-friendly RiseFallDelay + auto convert_delay = [&](const DelayQuad &dly) { RiseFallDelay rf; - rf.rise.min = getDelayNS(dly.minRaiseDelay()) * delay_scale; - rf.rise.typ = getDelayNS((dly.minRaiseDelay() + dly.maxRaiseDelay()) / 2) * delay_scale; // fixme: typ delays? - rf.rise.max = getDelayNS(dly.maxRaiseDelay()) * delay_scale; + rf.rise.min = getDelayNS(dly.minRiseDelay()) * delay_scale; + rf.rise.typ = getDelayNS((dly.minRiseDelay() + dly.maxRiseDelay()) / 2) * delay_scale; // fixme: typ delays? + rf.rise.max = getDelayNS(dly.maxRiseDelay()) * delay_scale; rf.fall.min = getDelayNS(dly.minFallDelay()) * delay_scale; rf.fall.typ = getDelayNS((dly.minFallDelay() + dly.maxFallDelay()) / 2) * delay_scale; // fixme: typ delays? rf.fall.max = getDelayNS(dly.maxFallDelay()) * delay_scale; return rf; }; - auto convert_setuphold = [&](const DelayInfo &setup, const DelayInfo &hold) { + auto convert_setuphold = [&](const DelayPair &setup, const DelayPair &hold) { RiseFallDelay rf; rf.rise.min = getDelayNS(setup.minDelay()) * delay_scale; rf.rise.typ = getDelayNS((setup.minDelay() + setup.maxDelay()) / 2) * delay_scale; // fixme: typ delays? @@ -273,7 +273,7 @@ void Context::writeSDF(std::ostream &out, bool cvc_mode) const continue; if (other.second.type == PORT_OUT) continue; - DelayInfo dly; + DelayQuad dly; if (!getCellDelay(ci, other.first, port.first, dly)) continue; IOPath iop; @@ -323,12 +323,12 @@ void Context::writeSDF(std::ostream &out, bool cvc_mode) const ic.from.port = ni->driver.port.str(this); ic.to.cell = usr.cell->name.str(this); ic.to.port = usr.port.str(this); - // FIXME: min/max routing delay - or at least constructing DelayInfo here - ic.delay = convert_delay(getDelayFromNS(getDelayNS(getNetinfoRouteDelay(ni, usr)))); + // FIXME: min/max routing delay + ic.delay = convert_delay(DelayQuad(getNetinfoRouteDelay(ni, usr))); wr.conn.push_back(ic); } } wr.write(out); } -NEXTPNR_NAMESPACE_END
\ No newline at end of file +NEXTPNR_NAMESPACE_END |