From cd8a640989d0819266d2678304951de2a247405d Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 25 Sep 2019 18:21:08 -0700 Subject: [PATCH] Reject if (* init *) present --- passes/pmgen/ice40_dsp.pmg | 3 +++ passes/pmgen/xilinx_dsp.pmg | 3 +++ 2 files changed, 6 insertions(+) diff --git a/passes/pmgen/ice40_dsp.pmg b/passes/pmgen/ice40_dsp.pmg index 9330dd09b..6b6d2b56f 100644 --- a/passes/pmgen/ice40_dsp.pmg +++ b/passes/pmgen/ice40_dsp.pmg @@ -333,6 +333,9 @@ code reject; if (c.wire->get_bool_attribute(\keep)) reject; + Const init = c.wire->attributes.at(\init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; } endcode diff --git a/passes/pmgen/xilinx_dsp.pmg b/passes/pmgen/xilinx_dsp.pmg index e256f7d7e..0a345e88d 100644 --- a/passes/pmgen/xilinx_dsp.pmg +++ b/passes/pmgen/xilinx_dsp.pmg @@ -355,6 +355,9 @@ code reject; if (c.wire->get_bool_attribute(\keep)) reject; + Const init = c.wire->attributes.at(\init, State::Sx); + if (!init.is_fully_undef() && !init.is_fully_zero()) + reject; } endcode