aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/pack.cc
diff options
context:
space:
mode:
authorPepijn de Vos <pepijndevos@gmail.com>2022-07-02 20:44:59 +0200
committerPepijn de Vos <pepijndevos@gmail.com>2022-07-02 20:44:59 +0200
commit6f56ad298c1a94259698cbd487f03efbd68f0342 (patch)
tree097f24e286acf3cc9718fe0a713a381436a520d2 /gowin/pack.cc
parent0641ff47d9c437c02d77363d568b106c4ceae155 (diff)
downloadnextpnr-6f56ad298c1a94259698cbd487f03efbd68f0342.tar.gz
nextpnr-6f56ad298c1a94259698cbd487f03efbd68f0342.tar.bz2
nextpnr-6f56ad298c1a94259698cbd487f03efbd68f0342.zip
use DFF RAM mode
Diffstat (limited to 'gowin/pack.cc')
-rw-r--r--gowin/pack.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gowin/pack.cc b/gowin/pack.cc
index fbd2092f..9f4b54e2 100644
--- a/gowin/pack.cc
+++ b/gowin/pack.cc
@@ -715,6 +715,8 @@ void pack_sram(Context *ctx)
for (int i = 0; i < 4; i++) {
ram_comb[i] = create_generic_cell(ctx, id_SLICE,
ci->name.str(ctx) + "$SRAM_SLICE" + std::to_string(i));
+ ram_comb[i]->params[id_FF_USED] = 1;
+ ram_comb[i]->params[id_FF_TYPE] = std::string("RAM");
sram_to_slice(ctx, ci, ram_comb[i].get(), i);
}
// Create 'block' SLICEs as a placement hint that these cells are mutually exclusive with the RAMW
@@ -722,7 +724,8 @@ void pack_sram(Context *ctx)
for (int i = 0; i < 2; i++) {
ramw_block[i] = create_generic_cell(ctx, id_SLICE,
ci->name.str(ctx) + "$RAMW_BLOCK" + std::to_string(i));
- ramw_block[i]->params[id_FF_TYPE] = std::string("RAMW_BLOCK");
+ ram_comb[i]->params[id_FF_USED] = 1;
+ ramw_block[i]->params[id_FF_TYPE] = std::string("RAM");
}
// Disconnect ports of original cell after packing