himbaechel: Add getDefaultRouter, default to router2 for gatemate (#1649)

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
myrtle 2026-02-25 16:16:36 +01:00 committed by GitHub
parent 2ecd41e495
commit e953c250a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -287,6 +287,9 @@ bool Arch::route()
set_fast_pip_delays(true);
uarch->preRoute();
std::string router = str_or_default(settings, id("router"), defaultRouter);
if (router == "default") {
router = uarch->getDefaultRouter();
}
bool result;
if (router == "router1") {
result = router1(getCtx(), Router1Cfg(getCtx()));
@ -402,8 +405,8 @@ const std::string Arch::defaultPlacer = "heap";
const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
const std::string Arch::defaultRouter = "default";
const std::vector<std::string> Arch::availableRouters = {"default", "router1", "router2"};
void Arch::set_fast_pip_delays(bool fast_mode)
{

View File

@ -147,6 +147,8 @@ struct HimbaechelAPI
// For custom placer configuration
virtual void configurePlacerHeap(PlacerHeapCfg &cfg) {};
virtual std::string getDefaultRouter() const { return "router1"; };
virtual ~HimbaechelAPI() {};
};

View File

@ -52,6 +52,8 @@ struct GateMateImpl : HimbaechelAPI
void preRoute() override;
void postRoute() override;
virtual std::string getDefaultRouter() const override { return "router2"; };
BoundingBox getRouteBoundingBox(WireId src, WireId dst) const override;
void expandBoundingBox(BoundingBox &bb) const override;
bool checkPipAvail(PipId pip) const override;