aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-10-22 14:22:00 +0100
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:27 +0000
commit27ecaf3e88730f2e295345342cec864801dbd851 (patch)
tree2e427249cdbf6289cc32d5ad7e415e204261bd98 /nexus/pack.cc
parent4503608c7c81dc04e837bce326deec0c3fcf7caa (diff)
downloadnextpnr-27ecaf3e88730f2e295345342cec864801dbd851.tar.gz
nextpnr-27ecaf3e88730f2e295345342cec864801dbd851.tar.bz2
nextpnr-27ecaf3e88730f2e295345342cec864801dbd851.zip
nexus: EBR FASM generation
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/pack.cc')
-rw-r--r--nexus/pack.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/nexus/pack.cc b/nexus/pack.cc
index fa2c78e8..2cef0687 100644
--- a/nexus/pack.cc
+++ b/nexus/pack.cc
@@ -1047,6 +1047,16 @@ struct NexusPacker
log_info("Packing BRAM...\n");
generic_xform(bram_rules, true);
+
+ int wid = 2;
+ for (auto cell : sorted(ctx->cells)) {
+ CellInfo *ci = cell.second;
+ if (ci->type != id_OXIDE_EBR)
+ continue;
+ if (ci->params.count(id_WID))
+ continue;
+ ci->params[id_WID] = wid++;
+ }
}
explicit NexusPacker(Context *ctx) : ctx(ctx) {}