input A, B, C, D,
output Z
);
- wire [3:0] I;
- wire [3:0] I_pd;
-
- genvar ii;
- generate
- for (ii = 0; ii < 4; ii = ii + 1'b1)
- assign I_pd[ii] = (I[ii] === 1'bz) ? 1'b0 : I[ii];
- endgenerate
-
- assign I = {D, C, B, A};
- assign Z = INIT[I_pd];
+ // This form of LUT propagates as few x's as possible.
+ wire [7:0] s3 = D ? INIT[15:8] : INIT[7:0];
+ wire [3:0] s2 = C ? s3[ 7:4] : s3[3:0];
+ wire [1:0] s1 = B ? s2[ 3:2] : s2[1:0];
+ assign Z = A ? s1[1] : s1[0];
endmodule
module FACADE_FF #(
equiv_opt -assert -map +/machxo2/cells_sim.v synth_machxo2 # equivalency check
design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
cd mux16 # Constrain all select calls below inside the top module
-select -assert-count 12 t:LUT4
+select -assert-count 11 t:LUT4
select -assert-none t:LUT4 t:FACADE_IO %% t:* %D