diff options
author | gatecat <gatecat@ds0.me> | 2021-05-13 23:46:08 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | e688ee0e89263bc39a0ea10ac552430e41824aa1 (patch) | |
tree | 972186d1e80c09472851b49918d00a0228954a37 /mistral/pack.cc | |
parent | 3313d5267a4e4609d694d15e66040b0829788bb4 (diff) | |
download | nextpnr-e688ee0e89263bc39a0ea10ac552430e41824aa1.tar.gz nextpnr-e688ee0e89263bc39a0ea10ac552430e41824aa1.tar.bz2 nextpnr-e688ee0e89263bc39a0ea10ac552430e41824aa1.zip |
mistral: Debugging carry chain issues
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral/pack.cc')
-rw-r--r-- | mistral/pack.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mistral/pack.cc b/mistral/pack.cc index b86393d7..f8c55cd1 100644 --- a/mistral/pack.cc +++ b/mistral/pack.cc @@ -312,6 +312,24 @@ struct MistralPacker chain.at(i)->cluster = chain.at(0)->name; chain.at(0)->constr_children.push_back(chain.at(i)); } + + if (ctx->debug) { + log_info("Chain: \n"); + for (int i = 0; i < int(chain.size()); i++) { + auto &c = chain.at(i); + log_info(" i=%d cell=%s dy=%d z=%d ci=%s co=%s\n", i, ctx->nameOf(c), c->constr_y, c->constr_z, + ctx->nameOf(get_net_or_empty(c, id_CI)), ctx->nameOf(get_net_or_empty(c, id_CO))); + } + } + } + // Check we reached all the cells in the above pass + for (auto cell : sorted(ctx->cells)) { + CellInfo *ci = cell.second; + if (ci->type != id_MISTRAL_ALUT_ARITH) + continue; + if (ci->cluster == ClusterId()) + log_error("Failed to include arith cell '%s' in any chain (CI=%s)\n", ctx->nameOf(ci), + ctx->nameOf(get_net_or_empty(ci, id_CI))); } } |