mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-22 07:10:35 +00:00
analogdevices: DSP tweaks
This commit is contained in:
parent
059925a56a
commit
f1579304a6
2 changed files with 11 additions and 4 deletions
|
@ -1014,6 +1014,7 @@ endmodule
|
||||||
|
|
||||||
// DSP
|
// DSP
|
||||||
|
|
||||||
|
(* abc9_box *)
|
||||||
module RBBDSP (
|
module RBBDSP (
|
||||||
output [21:0] AO_LOC,
|
output [21:0] AO_LOC,
|
||||||
output [21:0] BO_LOC,
|
output [21:0] BO_LOC,
|
||||||
|
@ -1025,9 +1026,9 @@ module RBBDSP (
|
||||||
output [47:0] PO_LOC,
|
output [47:0] PO_LOC,
|
||||||
output RST_O,
|
output RST_O,
|
||||||
|
|
||||||
input [1:0] CI_LOC,
|
input [1:0] CI_LOC,
|
||||||
input [1:0] OPCODE,
|
input [1:0] OPCODE,
|
||||||
input [1:0] OPCODE_I,
|
input [1:0] OPCODE_I,
|
||||||
input [21:0] A,
|
input [21:0] A,
|
||||||
input [21:0] AI_LOC,
|
input [21:0] AI_LOC,
|
||||||
input [21:0] B,
|
input [21:0] B,
|
||||||
|
@ -1087,6 +1088,12 @@ parameter REG_SFT = 1'b0;
|
||||||
parameter RST_SEL = 1'b0;
|
parameter RST_SEL = 1'b0;
|
||||||
parameter FF_SYNC_RST = 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.
|
// Much of this functionality is TODO.
|
||||||
|
|
||||||
assign P = $signed(A) * $signed(B);
|
assign P = $signed(A) * $signed(B);
|
||||||
|
|
|
@ -313,7 +313,7 @@ struct SynthAnalogDevicesPass : public ScriptPass
|
||||||
if (check_label("map_dsp", "(skip if '-nodsp')")) {
|
if (check_label("map_dsp", "(skip if '-nodsp')")) {
|
||||||
if (!nodsp || help_mode) {
|
if (!nodsp || help_mode) {
|
||||||
run("memory_dff"); // xilinx_dsp will merge registers, reserve memory port registers first
|
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)
|
if (help_mode)
|
||||||
run("techmap -map +/mul2dsp.v -map +/analogdevices/{family}_dsp_map.v {options}");
|
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 "
|
run("techmap -map +/mul2dsp.v -map +/analogdevices/dsp_map.v -D DSP_A_MAXWIDTH=22 -D DSP_B_MAXWIDTH=22 "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue