为什么我设计的程序,仿真时总是出现:
found logic contention at 48.51us on node tri_inout1 found logic contention at 48.51us on node tri_inout2(tri_inout [2:1] 是我定义的inout端口)
到底是什么地方有毛病呢?
我的源程序如下:
module inout_test(we,oe,in,tri_inout,out);
inout[2:1] tri_inout;
output[2:1] out;
input[2:1] in;
input we,oe;
reg[2:1] out_n,in_n;
assign tri_inout=oe?in_n:'bz;
assign out=out_n;
always@(oe or we)
begin
case({oe,we})
2'b01: begin out_n<=tri_inout; in_n<='bz;?? end
2'b10: begin in_n<=in; out_n<='bz; end
default: begin out_n<='bz; in_n<='bz; end
endcase
end
endmodule作者: long 时间: 2003-8-23 10:30