gowin: Himbaechel. Improve the global router
A small improvement - do not waste time analyzing already processed networks in the previous step (and possibly steps). Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
This commit is contained in:
parent
05ed9308d6
commit
4981ebb698
@ -286,12 +286,14 @@ struct GowinGlobalRouter
|
|||||||
void run(void)
|
void run(void)
|
||||||
{
|
{
|
||||||
log_info("Routing globals...\n");
|
log_info("Routing globals...\n");
|
||||||
|
|
||||||
|
std::vector<IdString> routed_nets;
|
||||||
// buffered nets first
|
// buffered nets first
|
||||||
for (auto &net : ctx->nets) {
|
for (auto &net : ctx->nets) {
|
||||||
NetInfo *ni = net.second.get();
|
NetInfo *ni = net.second.get();
|
||||||
CellInfo *drv = ni->driver.cell;
|
CellInfo *drv = ni->driver.cell;
|
||||||
if (drv == nullptr || ni->users.empty()) {
|
if (drv == nullptr || ni->users.empty()) {
|
||||||
if (ctx->verbose) {
|
if (ctx->debug) {
|
||||||
log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni));
|
log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -301,14 +303,21 @@ struct GowinGlobalRouter
|
|||||||
log_info("route buffered net '%s'\n", ctx->nameOf(ni));
|
log_info("route buffered net '%s'\n", ctx->nameOf(ni));
|
||||||
}
|
}
|
||||||
route_buffered_net(ni);
|
route_buffered_net(ni);
|
||||||
|
routed_nets.push_back(net.first);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto &net : ctx->nets) {
|
for (auto &net : ctx->nets) {
|
||||||
|
if (std::find(routed_nets.begin(), routed_nets.end(), net.first) != routed_nets.end()) {
|
||||||
|
if (ctx->debug) {
|
||||||
|
log_info("skip already routed net:%s\n", net.first.c_str(ctx));
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
NetInfo *ni = net.second.get();
|
NetInfo *ni = net.second.get();
|
||||||
CellInfo *drv = ni->driver.cell;
|
CellInfo *drv = ni->driver.cell;
|
||||||
if (drv == nullptr || ni->users.empty()) {
|
if (drv == nullptr || ni->users.empty()) {
|
||||||
if (ctx->verbose) {
|
if (ctx->debug) {
|
||||||
log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni));
|
log_info("skip empty or driverless net:%s\n", ctx->nameOf(ni));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user