cmp2lcu: fail if `LUT_WIDTH < 2
authorEddie Hung <eddie@fpgeh.com>
Thu, 6 Feb 2020 16:46:38 +0000 (08:46 -0800)
committerEddie Hung <eddie@fpgeh.com>
Fri, 3 Apr 2020 21:28:22 +0000 (14:28 -0700)
techlibs/common/cmp2lcu.v

index b302d592f22cdf8a12ca5910b3fc1963c1dcb77f..b4fadaaad7bc32365f0cbc0a277f83cce45169c2 100644 (file)
@@ -19,7 +19,7 @@ output [Y_WIDTH-1:0] Y;
 parameter _TECHMAP_CELLTYPE_ = "";
 
 generate
-    if (_TECHMAP_CELLTYPE_ == "")
+    if (_TECHMAP_CELLTYPE_ == "" || `LUT_WIDTH < 2)
         wire _TECHMAP_FAIL_ = 1;
     else if (_TECHMAP_CELLTYPE_ == "$lt") begin
         // Transform $lt into $gt by swapping A and B