From: Eddie Hung Date: Fri, 23 Aug 2019 20:56:01 +0000 (-0700) Subject: Remove (* init *) entry when consumed into SRL X-Git-Tag: working-ls180~1085^2~42 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d7f4aa0c8841739eb30fa667181475ce22b4187;p=yosys.git Remove (* init *) entry when consumed into SRL --- diff --git a/passes/pmgen/xilinx_srl.cc b/passes/pmgen/xilinx_srl.cc index e21a826df..d446bf47a 100644 --- a/passes/pmgen/xilinx_srl.cc +++ b/passes/pmgen/xilinx_srl.cc @@ -52,7 +52,9 @@ void run_fixed(xilinx_srl_pm &pm) log_assert(Q.wire); auto it = Q.wire->attributes.find(ID(init)); if (it != Q.wire->attributes.end()) { - initval.append(it->second[Q.offset]); + auto &i = it->second[Q.offset]; + initval.append(i); + i = State::Sx; } else initval.append(State::Sx); @@ -118,7 +120,9 @@ void run_variable(xilinx_srl_pm &pm) log_assert(Q.wire); auto it = Q.wire->attributes.find(ID(init)); if (it != Q.wire->attributes.end()) { - initval.append(it->second[Q.offset]); + auto &i = it->second[Q.offset]; + initval.append(i); + i = State::Sx; } else initval.append(State::Sx);