【发布时间】:2021-10-15 20:49:39
【问题描述】:
在编写以下宏时,我收到编译错误:
`define TEST1(out, in, sel) \ \
integer i; \ \
always_comb begin \ \
out = $bits(1'b0); \\
for(i=0; i<=$bits(sel); i=i+1) \\
out = out | ({$bits(out){sel[i]}} & in[i]); \\
end ;
错误消息:
near "[": syntax error, unexpected '[', expecting ',' or '}'.
【问题讨论】: