wire a, c; reg b; always @(*) b = a + c; always @(*) b = !a;代码是否正确?
时间: 2023-05-28 08:07:59 浏览: 135
Verilog中-reg和wire-用法和区别以及always和assign的区别.pdf
不正确。两个always块中都对b进行了赋值,会导致冲突。正确的写法应该是:
wire a, c;
reg b;
always @(*) b = a & c;
always @(*) b = !a;
阅读全文