From b05cb86291c837e739962080378d68da123f0009 Mon Sep 17 00:00:00 2001 From: YRabbit Date: Mon, 29 Jan 2024 09:40:34 +1000 Subject: [PATCH] gowin: Himbaechel. Global router BUGFIX. Ignore networks without users. Signed-off-by: YRabbit --- himbaechel/uarch/gowin/globals.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/himbaechel/uarch/gowin/globals.cc b/himbaechel/uarch/gowin/globals.cc index 229f2908df..b13d4386b8 100644 --- a/himbaechel/uarch/gowin/globals.cc +++ b/himbaechel/uarch/gowin/globals.cc @@ -186,9 +186,6 @@ struct GowinGlobalRouter break; } } - if (!routed) { - ctx->unbindWire(src); - } return routed; } @@ -280,7 +277,10 @@ struct GowinGlobalRouter for (auto &net : ctx->nets) { NetInfo *ni = net.second.get(); CellInfo *drv = ni->driver.cell; - if (drv == nullptr) { + if (drv == nullptr || ni->users.empty()) { + if (ctx->verbose) { + log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni)); + } continue; } if (driver_is_buf(ni->driver)) { @@ -294,7 +294,10 @@ struct GowinGlobalRouter for (auto &net : ctx->nets) { NetInfo *ni = net.second.get(); CellInfo *drv = ni->driver.cell; - if (drv == nullptr) { + if (drv == nullptr || ni->users.empty()) { + if (ctx->verbose) { + log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni)); + } continue; } if (driver_is_clksrc(ni->driver)) {