machxo2: Tweak A-star parameters for acceptable performance.

This commit is contained in:
William D. Jones 2021-01-30 12:39:57 -05:00 committed by gatecat
parent 447b3a060c
commit e1f72318e0
2 changed files with 26 additions and 3 deletions

View File

@ -365,9 +365,25 @@ const std::vector<GroupId> &Arch::getGroupGroups(GroupId group) const { return g
// --------------------------------------------------------------- // ---------------------------------------------------------------
delay_t Arch::estimateDelay(WireId src, WireId dst) const { return 0; } delay_t Arch::estimateDelay(WireId src, WireId dst) const
{
// Taxicab distance multiplied by pipDelay (0.01) and fake wireDelay (0.01).
// TODO: This function will not work well for entrance to global routing,
// as the entrances are located physically far from the DCCAs.
return (abs(dst.location.x - src.location.x) + abs(dst.location.y - src.location.y)) * (0.01 + 0.01);
}
delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const { return 0; } delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
{
BelId src = net_info->driver.cell->bel;
BelId dst = sink.cell->bel;
NPNR_ASSERT(src != BelId());
NPNR_ASSERT(dst != BelId());
// TODO: Same deal applies here as with estimateDelay.
return (abs(dst.location.x - src.location.x) + abs(dst.location.y - src.location.y)) * (0.01 + 0.01);
}
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; } bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; }

View File

@ -850,7 +850,14 @@ struct Arch : BaseCtx
return wire; return wire;
} }
DelayInfo getPipDelay(PipId pip) const { return DelayInfo(); } DelayInfo getPipDelay(PipId pip) const
{
DelayInfo delay;
delay.delay = 0.01;
return delay;
}
PipRange getPipsDownhill(WireId wire) const PipRange getPipsDownhill(WireId wire) const
{ {