aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/gatemate
diff options
context:
space:
mode:
authorPatrick Urban <patrick.urban@web.de>2021-09-24 21:53:39 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-11-13 21:53:25 +0100
commitd592bd93b8d7ab457419c35982998b23998e304a (patch)
treecc38adfa5665fc24c5ba0b98563e3b350bdb9dd3 /techlibs/gatemate
parent6825de6343e2b104ccad3d9ae6bf657deb80014e (diff)
downloadyosys-d592bd93b8d7ab457419c35982998b23998e304a.tar.gz
yosys-d592bd93b8d7ab457419c35982998b23998e304a.tar.bz2
yosys-d592bd93b8d7ab457419c35982998b23998e304a.zip
synth_gatemate: Rename multiplier factor parameters
Diffstat (limited to 'techlibs/gatemate')
-rw-r--r--techlibs/gatemate/mul_map.v23
1 files changed, 10 insertions, 13 deletions
diff --git a/techlibs/gatemate/mul_map.v b/techlibs/gatemate/mul_map.v
index 026509c75..c2dd0a9b4 100644
--- a/techlibs/gatemate/mul_map.v
+++ b/techlibs/gatemate/mul_map.v
@@ -17,9 +17,6 @@
*
*/
-`define MAX(a,b) ((a) > (b) ? (a) : (b))
-`define MIN(a,b) ((a) < (b) ? (a) : (b))
-
(* techmap_celltype = "$mul $__mul" *)
module \$__MULMXN (A, B, Y);
@@ -36,27 +33,27 @@ module \$__MULMXN (A, B, Y);
(* force_downto *)
output [Y_WIDTH-1:0] Y;
- localparam A_MAXWIDTH = A_WIDTH + (A_SIGNED ? 0 : 1);
- localparam B_MAXWIDTH = B_WIDTH + (B_SIGNED ? 0 : 1);
+ localparam A_ADJWIDTH = A_WIDTH + (A_SIGNED ? 0 : 1);
+ localparam B_ADJWIDTH = B_WIDTH + (B_SIGNED ? 0 : 1);
generate
if (A_SIGNED) begin: blkA
- wire signed [A_MAXWIDTH-1:0] Aext = $signed(A);
+ wire signed [A_ADJWIDTH-1:0] Aext = $signed(A);
end
else begin: blkA
- wire [A_MAXWIDTH-1:0] Aext = A;
+ wire [A_ADJWIDTH-1:0] Aext = A;
end
if (B_SIGNED) begin: blkB
- wire signed [B_MAXWIDTH-1:0] Bext = $signed(B);
+ wire signed [B_ADJWIDTH-1:0] Bext = $signed(B);
end
else begin: blkB
- wire [B_MAXWIDTH-1:0] Bext = B;
+ wire [B_ADJWIDTH-1:0] Bext = B;
end
if (A_WIDTH >= B_WIDTH) begin
CC_MULT #(
- .A_WIDTH(A_MAXWIDTH),
- .B_WIDTH(B_MAXWIDTH),
+ .A_WIDTH(A_ADJWIDTH),
+ .B_WIDTH(B_ADJWIDTH),
.P_WIDTH(Y_WIDTH),
) _TECHMAP_REPLACE_ (
.A(blkA.Aext),
@@ -66,8 +63,8 @@ module \$__MULMXN (A, B, Y);
end
else begin // swap A,B
CC_MULT #(
- .A_WIDTH(A_MAXWIDTH),
- .B_WIDTH(B_MAXWIDTH),
+ .A_WIDTH(B_ADJWIDTH),
+ .B_WIDTH(A_ADJWIDTH),
.P_WIDTH(Y_WIDTH),
) _TECHMAP_REPLACE_ (
.A(blkB.Bext),