aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-06-02 18:38:20 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-06-02 18:38:20 +0200
commit82ed1803c726e912730c3053179f179b90c9b694 (patch)
treece90345de05eba6c8b53ebf0c225f9c277fc027c
parent7c65da417b5a222cc68a83e25c60c1f1326473f2 (diff)
downloadnextpnr-82ed1803c726e912730c3053179f179b90c9b694.tar.gz
nextpnr-82ed1803c726e912730c3053179f179b90c9b694.tar.bz2
nextpnr-82ed1803c726e912730c3053179f179b90c9b694.zip
use NEXTPNR_BEL, since BEL is initial placement
-rw-r--r--common/command.cc2
-rw-r--r--json/jsonwrite.cc5
2 files changed, 6 insertions, 1 deletions
diff --git a/common/command.cc b/common/command.cc
index 7d4cd252..d0ef5174 100644
--- a/common/command.cc
+++ b/common/command.cc
@@ -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()));
diff --git a/json/jsonwrite.cc b/json/jsonwrite.cc
index 7143bf93..e62a7d2a 100644
--- a/json/jsonwrite.cc
+++ b/json/jsonwrite.cc
@@ -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));
+ }
}