aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/abc9_map.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-03-04 13:37:09 -0800
committerGitHub <noreply@github.com>2020-03-04 13:37:09 -0800
commit6eb528277e73a978ace7d6f693215d9ff92f898d (patch)
treef4e882e5504bda5674266fe54a37daab15b92519 /techlibs/xilinx/abc9_map.v
parent0ec971444b0ae226417ac36d408569374269e799 (diff)
parent7b543fdb0cbd45dcf2d3322518cc02a01cc1e43f (diff)
downloadyosys-6eb528277e73a978ace7d6f693215d9ff92f898d.tar.gz
yosys-6eb528277e73a978ace7d6f693215d9ff92f898d.tar.bz2
yosys-6eb528277e73a978ace7d6f693215d9ff92f898d.zip
Merge pull request #1735 from YosysHQ/eddie/abc9_dsp48e1
xilinx: cleanup DSP48E1 handling for abc9
Diffstat (limited to 'techlibs/xilinx/abc9_map.v')
-rw-r--r--techlibs/xilinx/abc9_map.v43
1 files changed, 12 insertions, 31 deletions
diff --git a/techlibs/xilinx/abc9_map.v b/techlibs/xilinx/abc9_map.v
index 53d9a3c9a..81f8a1d42 100644
--- a/techlibs/xilinx/abc9_map.v
+++ b/techlibs/xilinx/abc9_map.v
@@ -771,35 +771,16 @@ module DSP48E1 (
.RSTM(RSTM),
.RSTP(RSTP)
);
-
- generate
- wire [29:0] $A;
- wire [17:0] $B;
- wire [47:0] $C;
- wire [24:0] $D;
-
- if (PREG == 0) begin
- if (MREG == 0 && AREG == 0) assign $A = A;
- else assign $A = 30'bx;
- if (MREG == 0 && BREG == 0) assign $B = B;
- else assign $B = 18'bx;
- if (MREG == 0 && DREG == 0) assign $D = D;
- else assign $D = 25'bx;
-
- if (CREG == 0) assign $C = C;
- else assign $C = 48'bx;
- end
- else begin
- assign $A = 30'bx, $B = 18'bx, $C = 48'bx, $D = 25'bx;
- end
-
- if (USE_MULT == "MULTIPLY" && USE_DPORT == "FALSE")
- $__ABC9_DSP48E1_MULT dsp_comb(.$A($A), .$B($B), .$C($C), .$D($D), .$P($P), .$PCIN(PCIN), .$PCOUT($PCOUT), .P(P), .PCOUT(PCOUT));
- else if (USE_MULT == "MULTIPLY" && USE_DPORT == "TRUE")
- $__ABC9_DSP48E1_MULT_DPORT dsp_comb(.$A($A), .$B($B), .$C($C), .$D($D), .$P($P), .$PCIN(PCIN), .$PCOUT($PCOUT), .P(P), .PCOUT(PCOUT));
- else if (USE_MULT == "NONE" && USE_DPORT == "FALSE")
- $__ABC9_DSP48E1 dsp_comb(.$A($A), .$B($B), .$C($C), .$D($D), .$P($P), .$PCIN(PCIN), .$PCOUT($PCOUT), .P(P), .PCOUT(PCOUT));
- else
- $error("Invalid DSP48E1 configuration");
- endgenerate
+ $__ABC9_DSP48E1 #(
+ .ADREG(ADREG),
+ .AREG(AREG),
+ .BREG(BREG),
+ .CREG(CREG),
+ .DREG(DREG),
+ .MREG(MREG),
+ .PREG(PREG),
+ .USE_DPORT(USE_DPORT),
+ .USE_MULT(USE_MULT)
+ ) dsp_comb (
+ .$A(A), .$B(B), .$C(C), .$D(D), .$P($P), .$PCIN(PCIN), .$PCOUT($PCOUT), .P(P), .PCOUT(PCOUT));
endmodule