【发布时间】:2016-02-24 15:58:32
【问题描述】:
我正在 Verilog 上编写 32 行乘 32 列乘法。我试图合成代码,但它给出了一个错误,说信号连接到多个驱动程序。下面的代码不完整,但给出了同样的错误。我是 Verilog 的新手,我不知道如何解决这个问题。您能否就如何解决此问题提出建议。我使用的是 Xilinx 14.5 版,FPGA 是 virtex 5。
我正在使用内置乘法器和内置加法器。 代码如下:
module matrixMult(Arow, Bcol,CLK, AxB);
input [1023:0] Arow;
input [1023:0] Bcol;
input CLK;
output [31:0] AxB;
wire [1023:0] Arow;
wire [1023:0] Bcol;
wire [1024:0] ab;
wire [1024:0] AxB;
// multiplication
ip32Mult a1b1(CLK, ab[1023:992], Arow[1023:992],Bcol[1023:992]);
ip32Mult a2b2(CLK, ab[991:960], Arow[991:960],Bcol[992:960]);
// addition // no clock enable
ip32Add ab1( AxB[31:0], ab[1023:992], ab[991:960]);
endmodule
错误:
ERROR:Xst:528 - Multi-source in Unit <matrixMult> on signal <ab<992>>; this signal is connected to multiple drivers.
附加信息: ip32Add 的样子
module ip32Add (
clk, s, a, b
)/* synthesis syn_black_box syn_noprune=1 */;
input clk;
output [31 : 0] s;
input [31 : 0] a;
input [31 : 0] b;
....
ip32Mult 的样子:
module ip32Mult (
clk, p, a, b
)/* synthesis syn_black_box syn_noprune=1 */;
input clk;
output [31 : 0] p;
input [31 : 0] a;
input [31 : 0] b;
...
【问题讨论】:
-
我使用了内置的 ip 乘数。我应该在这里粘贴整个代码吗?挺长的。