diff options
| author | gatecat <gatecat@ds0.me> | 2021-03-22 18:31:32 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 18:31:32 +0000 | 
| commit | f6ae068cb205527d63d93e5b3581b85a22f90f34 (patch) | |
| tree | 93704cb3edc4497651e23adfb7d6541eab1bb907 /common/router2.cc | |
| parent | 53ed6979a964f3eaaabc0d97399eec9b4c3347f9 (diff) | |
| parent | e7d81913a48bffd970f7a92acc44eb36d9f996f7 (diff) | |
| download | nextpnr-f6ae068cb205527d63d93e5b3581b85a22f90f34.tar.gz nextpnr-f6ae068cb205527d63d93e5b3581b85a22f90f34.tar.bz2 nextpnr-f6ae068cb205527d63d93e5b3581b85a22f90f34.zip  | |
Merge pull request #632 from litghost/add_check_pip_for_net
Add "checkPipAvailForNet" to Arch API.
Diffstat (limited to 'common/router2.cc')
| -rw-r--r-- | common/router2.cc | 20 | 
1 files changed, 7 insertions, 13 deletions
diff --git a/common/router2.cc b/common/router2.cc index 002a05a3..a233cdc5 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -588,7 +588,7 @@ struct Router2              bool did_something = false;              for (auto uh : ctx->getPipsUphill(flat_wires[cursor].w)) {                  did_something = true; -                if (!ctx->checkPipAvail(uh) && ctx->getBoundPipNet(uh) != net) +                if (!ctx->checkPipAvailForNet(uh, net))                      continue;                  if (cpip != PipId() && cpip != uh)                      continue; // don't allow multiple pips driving a wire with a net @@ -675,18 +675,12 @@ struct Router2  #else                  if (is_bb && !hit_test_pip(ad.bb, ctx->getPipLocation(dh)))                      continue; -                if (!ctx->checkPipAvail(dh)) { -                    NetInfo *bound_net = ctx->getBoundPipNet(dh); -                    if (bound_net != net) { -                        if (bound_net != nullptr) { -                            ROUTE_LOG_DBG("Skipping pip %s because it is bound to net '%s' not net '%s'\n", -                                          ctx->nameOfPip(dh), bound_net->name.c_str(ctx), net->name.c_str(ctx)); -                        } else { -                            ROUTE_LOG_DBG("Skipping pip %s because it is reported not available\n", ctx->nameOfPip(dh)); -                        } - -                        continue; -                    } +                if (!ctx->checkPipAvailForNet(dh, net)) { +                    ROUTE_LOG_DBG("Skipping pip %s because it is bound to net '%s' not net '%s'\n", ctx->nameOfPip(dh), +                                  ctx->getBoundPipNet(dh) != nullptr ? ctx->getBoundPipNet(dh)->name.c_str(ctx) +                                                                     : "<not a net>", +                                  net->name.c_str(ctx)); +                    continue;                  }  #endif                  // Evaluate score of next wire  | 
