mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-12 00:52:05 +00:00
gowin: dsp: Add basic DSP block inferencing for various MULT cells
This commit is contained in:
parent
a80462f27f
commit
5ad9e4cacc
5 changed files with 204 additions and 1 deletions
65
techlibs/gowin/dsp_map.v
Normal file
65
techlibs/gowin/dsp_map.v
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
module \$__MUL9X9 (input [8:0] A, input [8:0] B, output [17:0] Y);
|
||||
parameter A_WIDTH = 9;
|
||||
parameter B_WIDTH = 9;
|
||||
parameter Y_WIDTH = 18;
|
||||
parameter A_SIGNED = 0;
|
||||
parameter B_SIGNED = 0;
|
||||
|
||||
wire [8:0] soa;
|
||||
wire [8:0] sob;
|
||||
|
||||
MULT9X9 _TECHMAP_REPLACE_ (
|
||||
.A(A),
|
||||
.B(B),
|
||||
.SIA(8'b0),
|
||||
.SIB(8'b0),
|
||||
.ASIGN(A_SIGNED),
|
||||
.BSIGN(B_SIGNED),
|
||||
.ASEL(1'b0),
|
||||
.BSEL(1'b0),
|
||||
.SOA(soa),
|
||||
.SOB(sob),
|
||||
.DOUT(Y)
|
||||
);
|
||||
endmodule
|
||||
|
||||
module \$__MUL18X18 (input [17:0] A, input [17:0] B, output [35:0] Y);
|
||||
parameter A_WIDTH = 18;
|
||||
parameter B_WIDTH = 18;
|
||||
parameter Y_WIDTH = 36;
|
||||
parameter A_SIGNED = 0;
|
||||
parameter B_SIGNED = 0;
|
||||
|
||||
wire [17:0] soa;
|
||||
wire [17:0] sob;
|
||||
|
||||
MULT18X18 _TECHMAP_REPLACE_ (
|
||||
.A(A),
|
||||
.B(B),
|
||||
.SIA(18'b0),
|
||||
.SIB(18'b0),
|
||||
.ASIGN(A_SIGNED),
|
||||
.BSIGN(B_SIGNED),
|
||||
.ASEL(1'b0),
|
||||
.BSEL(1'b0),
|
||||
.SOA(soa),
|
||||
.SOB(sob),
|
||||
.DOUT(Y)
|
||||
);
|
||||
endmodule
|
||||
|
||||
module \$__MUL36X36 (input [35:0] A, input [35:0] B, output [72:0] Y);
|
||||
parameter A_WIDTH = 36;
|
||||
parameter B_WIDTH = 36;
|
||||
parameter Y_WIDTH = 72;
|
||||
parameter A_SIGNED = 0;
|
||||
parameter B_SIGNED = 0;
|
||||
|
||||
MULT36X36 _TECHMAP_REPLACE_ (
|
||||
.A(A),
|
||||
.B(B),
|
||||
.ASIGN(A_SIGNED),
|
||||
.BSIGN(B_SIGNED),
|
||||
.DOUT(Y)
|
||||
);
|
||||
endmodule
|
||||
Loading…
Add table
Add a link
Reference in a new issue