mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-04-30 21:48:24 +00:00
archapi: Use arbitrary rather than actual placement in predictDelay
This makes predictDelay be based on an arbitrary belpin pair rather than a arc of a net based on cell placement. This way 'what-if' decisions can be evaluated without actually changing placement; potentially useful for parallel placement. A new helper predictArcDelay behaves like the old predictDelay to minimise the impact on existing passes; only arches need be updated. Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
@@ -509,11 +509,12 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
|
||||
return (dx + dy) * args.delayScale + args.delayOffset;
|
||||
}
|
||||
|
||||
delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
|
||||
delay_t Arch::predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdString dst_pin) const
|
||||
{
|
||||
const auto &driver = net_info->driver;
|
||||
auto driver_loc = getBelLocation(driver.cell->bel);
|
||||
auto sink_loc = getBelLocation(sink.cell->bel);
|
||||
NPNR_UNUSED(src_pin);
|
||||
NPNR_UNUSED(dst_pin);
|
||||
auto driver_loc = getBelLocation(src_bel);
|
||||
auto sink_loc = getBelLocation(dst_bel);
|
||||
|
||||
int dx = abs(sink_loc.x - driver_loc.x);
|
||||
int dy = abs(sink_loc.y - driver_loc.y);
|
||||
|
||||
@@ -287,7 +287,7 @@ struct Arch : ArchAPI<ArchRanges>
|
||||
const std::vector<GroupId> &getGroupGroups(GroupId group) const override;
|
||||
|
||||
delay_t estimateDelay(WireId src, WireId dst) const override;
|
||||
delay_t predictDelay(const NetInfo *net_info, const PortRef &sink) const override;
|
||||
delay_t predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdString dst_pin) const override;
|
||||
delay_t getDelayEpsilon() const override { return 0.001; }
|
||||
delay_t getRipupDelayPenalty() const override { return 0.015; }
|
||||
float getDelayNS(delay_t v) const override { return v; }
|
||||
|
||||
Reference in New Issue
Block a user