|

楼主 |
发表于 2008-4-22 20:50:04
|
显示全部楼层
如果代码改成如下:
module AnalogT(VOUT1,VOUT0);
output VOUT1,VOUT0;
real VOUT1,VOUT0;
assign VOUT1 = 0.5;
assign VOUT0 = 0.8;
endmodule
module TEST;
timeunit 1ns;
reg VSEL;
real VIN1,VIN0;
real VOUT;
AnalogT U1(VIN1,VIN0);
initial #0 VSEL = 0;
always #10 VSEL = ~VSEL;
assign VOUT = (VSEL)? VIN1:VIN0;
endmodule
则可以仿真,而且结果正确(见图片附件) |
|