CREG to check for \keep
authorEddie Hung <eddie@fpgeh.com>
Thu, 26 Sep 2019 17:32:01 +0000 (10:32 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 26 Sep 2019 17:32:01 +0000 (10:32 -0700)
passes/pmgen/xilinx_dsp_CREG.pmg

index d79abdd4a2ef5f8e33c0b2084193af571ce153b8..a31dc80bff4a830c401d997adf2a31ecf58d60af 100644 (file)
@@ -87,6 +87,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