3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-21 06:40:32 +00:00

analogdevices: DSP tweaks

This commit is contained in:
Lofty 2025-10-18 12:10:50 +01:00
parent 059925a56a
commit f1579304a6
2 changed files with 11 additions and 4 deletions

View file

@ -1014,6 +1014,7 @@ endmodule
// DSP
(* abc9_box *)
module RBBDSP (
output [21:0] AO_LOC,
output [21:0] BO_LOC,
@ -1025,9 +1026,9 @@ module RBBDSP (
output [47:0] PO_LOC,
output RST_O,
input [1:0] CI_LOC,
input [1:0] OPCODE,
input [1:0] OPCODE_I,
input [1:0] CI_LOC,
input [1:0] OPCODE,
input [1:0] OPCODE_I,
input [21:0] A,
input [21:0] AI_LOC,
input [21:0] B,
@ -1087,6 +1088,12 @@ parameter REG_SFT = 1'b0;
parameter RST_SEL = 1'b0;
parameter FF_SYNC_RST = 1'b0;
specify
if (!REG_A) (A *> P) = 1000;
if (!REG_B) (B *> P) = 1000;
if (!REG_D[0]) (D *> P) = 1000;
endspecify
// Much of this functionality is TODO.
assign P = $signed(A) * $signed(B);

View file

@ -313,7 +313,7 @@ struct SynthAnalogDevicesPass : public ScriptPass
if (check_label("map_dsp", "(skip if '-nodsp')")) {
if (!nodsp || help_mode) {
run("memory_dff"); // xilinx_dsp will merge registers, reserve memory port registers first
// NB: Xilinx multipliers are signed only
// NB: Analog Devices multipliers are signed only
if (help_mode)
run("techmap -map +/mul2dsp.v -map +/analogdevices/{family}_dsp_map.v {options}");
run("techmap -map +/mul2dsp.v -map +/analogdevices/dsp_map.v -D DSP_A_MAXWIDTH=22 -D DSP_B_MAXWIDTH=22 "