module ls245(d, a0, a1, a2, a3, b0, b1, b2, b3);
input d;
inout a0;
inout a1;
inout a2;
inout a3;
inout b0;
inout b1;
inout b2;
inout b3;
reg a0,a1,a2,a3,b0,b1,b2,b3;
wire d;
always@(d or a0 or a1 or a2 or a3 or b0 or b1 or b2 or b3)
if(d)
begin
a0=b0;
a1=b1;
a2=b2;
a3=b3;
end
else if(!d)
begin
b0=a0;
b1=a1;
b2=a2;
b3=a3;
end
else
begin
a0=0;
a1=0;
a2=0;
a3=0;
b0=0;
b1=0;
b2=0;
b3=0;
end
endmodule
仿真提示错误
# ** Error: E:/shiyan/18.04/t3/ls245.v(21): (vlog-2110) Illegal reference to net "a0".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(22): (vlog-2110) Illegal reference to net "a1".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(23): (vlog-2110) Illegal reference to net "a2".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(24): (vlog-2110) Illegal reference to net "a3".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(28): (vlog-2110) Illegal reference to net "b0".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(29): (vlog-2110) Illegal reference to net "b1".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(30): (vlog-2110) Illegal reference to net "b2".
#
# ** Error: E:/shiyan/18.04/t3/ls245.v(31): (vlog-2110) Illegal reference to net "b3".
该怎么改? |