|  | 
 
 发表于 2013-12-8 00:14:43
|
显示全部楼层 
| 
把你的程序改了一下,请参考,在我的modelsim上是可以的 //另存为asdd.v
 module asdd(a,b,c);
 input a,b;
 output c;
 reg c;
 wire t;
 assign t = 1;
 always @(*)
 begin
 if(t)
 c=a&b;
 end
 endmodule
 //另存为text.v
 `timescale 1ns/1ns
 `include "asdd.v"
 module text;
 reg d,f;
 wire g;
 asdd dut (d,f,g);
 initial
 begin
 #100 d=0;
 #100 f=1;
 // #200 $fstop;
 end
 endmodule
 | 
 |