Tidy up, fix undriven

This commit is contained in:
Eddie Hung 2019-09-19 20:04:52 -07:00
parent 8a94ce7aa5
commit 691686f92c
1 changed files with 35 additions and 33 deletions

View File

@ -326,15 +326,14 @@ __CELL__ #(
$error("Invalid DSP48E1 configuration: ADREG enabled but USE_DPORT == \"FALSE\"");
assign pAD = 1'bx;
if (PREG == 0) begin
assign pP = 1'bx;
if (MREG == 1)
\$__ABC_REG rM (.Q(pM));
else
assign pM = 1'bx;
end
else begin
\$__ABC_REG rP (.Q(pP));
assign pP = 1'bx;
end else begin
assign pM = 1'bx;
\$__ABC_REG rP (.Q(pP));
end
if (MREG == 0 && PREG == 0)
@ -370,18 +369,21 @@ __CELL__ #(
else
\$__ABC_REG #(.WIDTH(25)) rD (.I(D), .O(iD), .Q(pD));
if (PREG == 0) begin
if (MREG == 1)
if (MREG == 1) begin
assign pAD = 1'bx;
\$__ABC_REG rM (.Q(pM));
else begin
assign pM = 1'bx;
end else begin
if (ADREG == 1)
\$__ABC_REG rAD (.Q(pAD));
else
assign pAD = 1'bx;
assign pM = 1'bx;
end
end
else
assign pP = 1'bx;
end else begin
assign pAD = 1'bx, pM = 1'bx;
\$__ABC_REG rP (.Q(pP));
end
if (MREG == 0 && PREG == 0)
assign mP = oP, mPCOUT = oPCOUT;
@ -411,15 +413,15 @@ __CELL__ #(
assign iC = C, pC = 1'bx;
else
\$__ABC_REG #(.WIDTH(48)) rC (.I(C), .O(iC), .Q(pC));
if (MREG == 1 && techmap_guard)
$error("Invalid DSP48E1 configuration: MREG enabled but USE_MULT == \"NONE\"");
assign pM = 1'bx;
if (DREG == 1 && techmap_guard)
$error("Invalid DSP48E1 configuration: DREG enabled but USE_DPORT == \"FALSE\"");
assign pD = 1'bx;
if (ADREG == 1 && techmap_guard)
$error("Invalid DSP48E1 configuration: ADREG enabled but USE_DPORT == \"FALSE\"");
assign pAD = 1'bx;
if (MREG == 1 && techmap_guard)
$error("Invalid DSP48E1 configuration: MREG enabled but USE_MULT == \"NONE\"");
assign pM = 1'bx;
if (PREG == 1)
\$__ABC_REG rP (.Q(pP));
else