xilinx: Use INV instead of LUT1 when applicable
authorMarcin Kościelnicki <koriakin@0x04.net>
Sun, 24 Nov 2019 13:17:46 +0000 (14:17 +0100)
committerMarcin Kościelnicki <mwk@0x04.net>
Mon, 25 Nov 2019 19:40:39 +0000 (20:40 +0100)
techlibs/xilinx/lut_map.v
tests/arch/xilinx/adffs.ys
tests/arch/xilinx/counter.ys
tests/arch/xilinx/latches.ys
tests/arch/xilinx/logic.ys

index 13d3c32688b37569625c7e9b661168342ea68013..62d501632c905f2827c4c82b0ccf267a2560df7b 100644 (file)
@@ -56,8 +56,12 @@ module \$lut (A, Y);
 
   generate
     if (WIDTH == 1) begin
-      LUT1 #(.INIT(P_LUT)) _TECHMAP_REPLACE_ (.O(Y),
-        .I0(A[0]));
+      if (P_LUT == 2'b01) begin
+        INV _TECHMAP_REPLACE_ (.O(Y), .I(A[0]));
+      end else begin
+        LUT1 #(.INIT(P_LUT)) _TECHMAP_REPLACE_ (.O(Y),
+          .I0(A[0]));
+      end
     end else
     if (WIDTH == 2) begin
       LUT2 #(.INIT(P_LUT)) _TECHMAP_REPLACE_ (.O(Y),
index 12c34415eccd9893226e2c009cba828e24d460e6..e73bfe0b99b77d1399e62b56300ab8991d4d1b56 100644 (file)
@@ -20,9 +20,9 @@ design -load postopt # load the post-opt design (otherwise equiv_opt loads the p
 cd adffn # Constrain all select calls below inside the top module
 select -assert-count 1 t:BUFG
 select -assert-count 1 t:FDCE
-select -assert-count 1 t:LUT1
+select -assert-count 1 t:INV
 
-select -assert-none t:BUFG t:FDCE t:LUT1 %% t:* %D
+select -assert-none t:BUFG t:FDCE t:INV %% t:* %D
 
 
 design -load read
index 57b645d19700ff394dcf7bca7e507e8b7009079b..604acdbfce59483b1ec5b4466552a3469184486c 100644 (file)
@@ -8,7 +8,7 @@ cd top # Constrain all select calls below inside the top module
 
 select -assert-count 1 t:BUFG
 select -assert-count 8 t:FDCE
-select -assert-count 1 t:LUT1
+select -assert-count 1 t:INV
 select -assert-count 7 t:MUXCY
 select -assert-count 8 t:XORCY
-select -assert-none t:BUFG t:FDCE t:LUT1 t:MUXCY t:XORCY %% t:* %D
+select -assert-none t:BUFG t:FDCE t:INV t:MUXCY t:XORCY %% t:* %D
index fe7887e8d7effd18196647a44516809b0c02a602..c87a8e38b1cebc5604688ccd7cd6a4c00d06eb4f 100644 (file)
@@ -18,9 +18,9 @@ equiv_opt -async2sync -assert -map +/xilinx/cells_sim.v synth_xilinx # equivalen
 design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
 cd latchn # Constrain all select calls below inside the top module
 select -assert-count 1 t:LDCE
-select -assert-count 1 t:LUT1
+select -assert-count 1 t:INV
 
-select -assert-none t:LDCE t:LUT1 %% t:* %D
+select -assert-none t:LDCE t:INV %% t:* %D
 
 
 design -load read
index c0f6da3023cc18ce83e65df6cc06c63d56ecdc2e..d5b5c1a3797471275f2385c428050344e5bef91d 100644 (file)
@@ -5,7 +5,7 @@ equiv_opt -assert -map +/xilinx/cells_sim.v synth_xilinx # equivalency check
 design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
 cd top # Constrain all select calls below inside the top module
 
-select -assert-count 1 t:LUT1
+select -assert-count 1 t:INV
 select -assert-count 6 t:LUT2
 select -assert-count 2 t:LUT4
-select -assert-none t:LUT1 t:LUT2 t:LUT4 %% t:* %D
+select -assert-none t:INV t:LUT2 t:LUT4 %% t:* %D