Tidy up
authorEddie Hung <eddie@fpgeh.com>
Wed, 10 Apr 2019 16:02:42 +0000 (09:02 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 10 Apr 2019 16:02:42 +0000 (09:02 -0700)
techlibs/xilinx/cells_map.v

index 4f5c7ff180cf34c4d7e701b122b9c84f2ae8889f..ff33cf8ff0fcc92356d2269df76e2a3fc7c39316 100644 (file)
@@ -53,7 +53,7 @@ module \$shiftx (A, B, Y);
       for (i = 0; i < B_WIDTH; i++)
        if (i < num_mux8)
           \$shiftx  #(.A_SIGNED(A_SIGNED), .B_SIGNED(B_SIGNED), .A_WIDTH(a_width0), .B_WIDTH(B_WIDTH-2),        .Y_WIDTH(Y_WIDTH)) fpga_shiftx      (.A(A[(i+1)*a_width0-1:i*a_width0]), .B(B[B_WIDTH-3:0]),          .Y(T[(i+1)*Y_WIDTH-1:i*Y_WIDTH]));
-        else if (i == num_mux8 && A_WIDTH > i*a_width0)
+        else if (i == num_mux8 && a_widthN > 0)
          \$shiftx  #(.A_SIGNED(A_SIGNED), .B_SIGNED(B_SIGNED), .A_WIDTH(a_widthN), .B_WIDTH($clog2(a_widthN)), .Y_WIDTH(Y_WIDTH)) fpga_shiftx_last (.A(A[A_WIDTH-1:i*a_width0]),        .B(B[$clog2(a_widthN)-1:0]), .Y(T[(i+1)*Y_WIDTH-1:i*Y_WIDTH]));
         else
          assign T[(i+1)*Y_WIDTH-1:i*Y_WIDTH] = {Y_WIDTH{1'bx}};