From 5482b9a0c600ccefe53fcdde1237a68895cf2204 Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 2 Aug 2021 20:58:45 +0100 Subject: ecp5: Copy REGMODE in PDP mode to both A and B ports Signed-off-by: gatecat --- ecp5/pack.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ecp5') diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 1336c609..d0077375 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -1488,7 +1488,10 @@ class Ecp5Packer rename_param(ci, "CLKRMUX", "CLKRMUX"); rename_param(ci, "CSDECODE_W", "CSDECODE_A"); rename_param(ci, "CSDECODE_R", "CSDECODE_B"); - rename_param(ci, "REGMODE", "REGMODE_B"); + std::string outreg = str_or_default(ci->params, ctx->id("REGMODE"), "NOREG"); + ci->params[ctx->id("REGMODE_A")] = outreg; + ci->params[ctx->id("REGMODE_B")] = outreg; + ci->params.erase(ctx->id("REGMODE")); rename_param(ci, "DATA_WIDTH_R", "DATA_WIDTH_B"); if (ci->ports.count(id_RST)) { autocreate_empty_port(ci, id_RSTA); -- cgit v1.2.3