用CPLD对信号做2次取反,却编译不过。如下:
module demo2(k,exain);
input exain;
reg exa;
output k;
not n1(exa,exain);
not m1(k,exa);
endmodule
为什么编译不过啊?
output or inout port "<gate output>" must be connected to a structural net expression
共5条
1/1 1 跳转至页
verilog怎么编译不过啊?

2楼
只要把“reg exa;”去掉或改成“wire exa;”,就可以了。
因为你使用的是门级描述,门与门之间的只能是wire,而不能是reg,这与RTL级描述是不同的。

共5条
1/1 1 跳转至页