diff options
Diffstat (limited to 'fpga_interchange/site_router.cc')
-rw-r--r-- | fpga_interchange/site_router.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fpga_interchange/site_router.cc b/fpga_interchange/site_router.cc index f8cc2208..e9b3f61f 100644 --- a/fpga_interchange/site_router.cc +++ b/fpga_interchange/site_router.cc @@ -157,6 +157,7 @@ struct SiteExpansionLoop NPNR_ASSERT((*parent)->wire.type == SiteWire::SITE_WIRE); NPNR_ASSERT(node->can_leave_site()); node->mark_left_site(); + node->mark_left_site_after_entering(); } else if (wire.type == SiteWire::SITE_PORT_SOURCE) { // This is a backward walk, so this is considered entering // the site. @@ -171,6 +172,7 @@ struct SiteExpansionLoop // the site. NPNR_ASSERT(node->can_leave_site()); node->mark_left_site(); + node->mark_left_site_after_entering(); } else { NPNR_ASSERT((*parent)->wire.type == SiteWire::SITE_PORT_SOURCE); NPNR_ASSERT(node->can_enter_site()); @@ -243,7 +245,7 @@ struct SiteExpansionLoop if (!parent_node->can_leave_site()) { // This path has already left the site once, don't leave it again! if (verbose_site_router(ctx)) { - log_info("Pip %s is not a valid for this path because it has already left the site\n", + log_info("%s is not a valid PIP for this path because it has already left the site\n", ctx->nameOfPip(pip)); } continue; @@ -256,7 +258,7 @@ struct SiteExpansionLoop // don't enter it again! if (verbose_site_router(ctx)) { log_info( - "Pip %s is not a valid for this path because it has already entered the site\n", + "%s is not a valid PIP for this path because it has already entered the site\n", ctx->nameOfPip(pip)); } continue; @@ -274,6 +276,16 @@ struct SiteExpansionLoop } auto node = new_node(wire, pip, &parent_node); + + if (!node->is_valid_node()) { + if (verbose_site_router(ctx)) { + log_info( + "%s is not a valid PIP for this path because it has left the site after entering it.\n", + ctx->nameOfPip(pip)); + } + continue; + } + if (targets.count(wire)) { completed_routes.push_back(node.get_index()); max_depth = std::max(max_depth, node->depth); |