diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-04 22:29:43 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-04 22:29:43 +0200 |
commit | 528eddcaf797c5da3a75876817b6c4377e4dfd6f (patch) | |
tree | c6aca624b904a1b40f80efb4c6c485523e6696fe | |
parent | d31036825b02f6a08a3dc7e791bbb188e9629781 (diff) | |
download | nextpnr-528eddcaf797c5da3a75876817b6c4377e4dfd6f.tar.gz nextpnr-528eddcaf797c5da3a75876817b6c4377e4dfd6f.tar.bz2 nextpnr-528eddcaf797c5da3a75876817b6c4377e4dfd6f.zip |
Fix bug in ice40 estimateDelay()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | ice40/delay.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ice40/delay.cc b/ice40/delay.cc index 1fa4256e..7c9b3f29 100644 --- a/ice40/delay.cc +++ b/ice40/delay.cc @@ -183,11 +183,13 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const if (dx > 1 || dy > 1) v = (p.model0_offset + p.model0_norm1 * (dx + dy)) / 128; - if (type == WireInfoPOD::WIRE_TYPE_LOCAL) - v += p.delta_local; + if (dx == 0 && dy == 0) { + if (type == WireInfoPOD::WIRE_TYPE_LOCAL) + v += p.delta_local; - if (type == WireInfoPOD::WIRE_TYPE_LUTFF_IN || type == WireInfoPOD::WIRE_TYPE_LUTFF_IN_LUT) - v += (z1 == z2) ? p.delta_lutffin : 1000; + if (type == WireInfoPOD::WIRE_TYPE_LUTFF_IN || type == WireInfoPOD::WIRE_TYPE_LUTFF_IN_LUT) + v += (z1 == z2) ? p.delta_lutffin : 0; + } if (type == WireInfoPOD::WIRE_TYPE_SP4_V || type == WireInfoPOD::WIRE_TYPE_SP4_H) v += p.delta_sp4; |