aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/pack.cc
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2019-01-18 16:38:40 +0100
committerSylvain Munaut <tnt@246tNt.com>2019-01-19 15:49:21 +0100
commitb274a8f8f0dc9302f14e138bdec73474283f4798 (patch)
treed39b66d92abb8a53a75507d30f5886a7aa9f5357 /ice40/pack.cc
parent7d8b729ff4cd66e8dc7ce51dd7e2666f14d10cd7 (diff)
downloadnextpnr-b274a8f8f0dc9302f14e138bdec73474283f4798.tar.gz
nextpnr-b274a8f8f0dc9302f14e138bdec73474283f4798.tar.bz2
nextpnr-b274a8f8f0dc9302f14e138bdec73474283f4798.zip
ice40/pack: Copy attributes to packed RAM cells
Useful to allow manual placement of SPRAM/EBR using BEL attribute for instance Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r--ice40/pack.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 27387a75..83cf696a 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -265,6 +265,8 @@ static void pack_ram(Context *ctx)
std::unique_ptr<CellInfo> packed =
create_ice_cell(ctx, ctx->id("ICESTORM_RAM"), ci->name.str(ctx) + "_RAM");
packed_cells.insert(ci->name);
+ for (auto attr : ci->attrs)
+ packed->attrs[attr.first] = attr.second;
for (auto param : ci->params)
packed->params[param.first] = param.second;
packed->params[ctx->id("NEG_CLK_W")] =
@@ -991,6 +993,8 @@ static void pack_special(Context *ctx)
std::unique_ptr<CellInfo> packed =
create_ice_cell(ctx, ctx->id("ICESTORM_SPRAM"), ci->name.str(ctx) + "_RAM");
packed_cells.insert(ci->name);
+ for (auto attr : ci->attrs)
+ packed->attrs[attr.first] = attr.second;
for (auto port : ci->ports) {
PortInfo &pi = port.second;
std::string newname = pi.name.str(ctx);