Verilog 语法错误
Verilog syntax errors
Near "(": syntax error, unexpected '(', expecting ')'.
我不知道为什么会出错。
//P[0]------------------------------------------
//Y[0], A[0], B[0]
and32bit and_inst0(.Y(s0), .A(MCND), .B(32{MPLR[1]}));
and32bit and_inst1(.Y({s1,LO[0]}), .A(MCND), .B(32{MPLR[0]}));
//(Y[0], w[0], A[0], B[0], CI)
rc_add_32 fa0(.Y({s2,LO[1]}), .CO({s1,co}), .A(s0), .B({s1, LO[0]}), .CI(1'b0));
您的复制运算符有误,即 32{MPLR[1]}
。此运算符的正确语法如下所示:
{n{m}} //Replicate value m, n times
如您所见,需要两个 {}
括号。在您的代码中,它将是 {32{MPLR[1]}}
和 {32{MPLR[0]}}
.
Near "(": syntax error, unexpected '(', expecting ')'.
我不知道为什么会出错。
//P[0]------------------------------------------
//Y[0], A[0], B[0]
and32bit and_inst0(.Y(s0), .A(MCND), .B(32{MPLR[1]}));
and32bit and_inst1(.Y({s1,LO[0]}), .A(MCND), .B(32{MPLR[0]}));
//(Y[0], w[0], A[0], B[0], CI)
rc_add_32 fa0(.Y({s2,LO[1]}), .CO({s1,co}), .A(s0), .B({s1, LO[0]}), .CI(1'b0));
您的复制运算符有误,即 32{MPLR[1]}
。此运算符的正确语法如下所示:
{n{m}} //Replicate value m, n times
如您所见,需要两个 {}
括号。在您的代码中,它将是 {32{MPLR[1]}}
和 {32{MPLR[0]}}
.