use NEXTPNR_BEL, since BEL is initial placement

This commit is contained in:
Miodrag Milanovic 2019-06-02 18:38:20 +02:00
parent 7c65da417b
commit 82ed1803c7
2 changed files with 6 additions and 1 deletions

View File

@ -350,7 +350,7 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
} else {
for (auto &pair : ctx->cells) {
auto &c = pair.second;
auto bel = c->attrs.find(ctx->id("BEL"));
auto bel = c->attrs.find(ctx->id("NEXTPNR_BEL"));
if (bel!=c->attrs.end())
{
BelId b = ctx->getBelByName(ctx->id(bel->second.c_str()));

View File

@ -102,6 +102,11 @@ void write_constraints(std::ostream &f, Context *ctx, CellInfo *cell, bool first
f << stringf(",\n");
f << stringf(" \"NEXTPNR_CONSTR_CHILDREN\": ");
f << get_string(constr);
if (cell->bel != BelId()) {
f << stringf(",\n");
f << stringf(" \"NEXTPNR_BEL\": ");
f << get_string(ctx->getBelName(cell->bel).c_str(ctx));
}
}