Fixed techmap of $gt and $ge with multi-bit outputs
authorClifford Wolf <clifford@clifford.at>
Wed, 6 Nov 2013 21:59:45 +0000 (22:59 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 6 Nov 2013 21:59:45 +0000 (22:59 +0100)
techlibs/common/stdcells.v

index d89b39b8a39c3ed62ca50ee5c60e02d73297d7ae..ca73f5bcd5c01e77dfa8dd9545b37bfe0fa1ec10 100644 (file)
@@ -855,9 +855,15 @@ output [Y_WIDTH-1:0] Y;
 ) ge_via_le (
        .A(B),
        .B(A),
-       .Y(Y)
+       .Y(Y[0])
 );
 
+generate
+       if (Y_WIDTH > 1) begin:V
+               assign Y[Y_WIDTH-1:1] = 0;
+       end
+endgenerate
+
 endmodule
 
 // --------------------------------------------------------
@@ -882,9 +888,15 @@ output [Y_WIDTH-1:0] Y;
 ) gt_via_lt (
        .A(B),
        .B(A),
-       .Y(Y)
+       .Y(Y[0])
 );
 
+generate
+       if (Y_WIDTH > 1) begin:V
+               assign Y[Y_WIDTH-1:1] = 0;
+       end
+endgenerate
+
 endmodule
 
 // --------------------------------------------------------