Example: --infer-clk-enable
The --infer-clk-enable synthesis option infers the flip-flop clock enable signal from control logic. This option has three effort levels, or you can disable it.
always @(posedge clk) begin
if (e1 | e2) q <= d;
endinfers or (e1,e2) as the CE pin of a flop with d in
the D pin and q in the Q pin.
always @(posedge clk) begin
if (e1) q <= d1;
else (e2) q <= d2;
enddoes not result in an inferred clock enable.
With the effort level 3 option, which is the default, the synthesis tool traces
multiplexer connections to look for a loop back to the Q pin of the flip-flop. If the
tracing is successful, the software extracts the condition pins of the multiplexer path
to form the clock enable signal. So in our complex example previously, the software
infers or (e1, e2) inferred as the clock enable. The level 3 option
reduces the number of LUTs by about 4-5% compared to the level 1 option.