Tom2
Full Member level 5
i wrote the testbench bellow but unfortunately modelsim is not able to succesfull compile.i wonder if anyone can help me about this problem.
module tb_check();
reg in1,in2,Sel;
wire out;
check dut(out,in1,in2,sel); //
initial
begin
in1=1'b1;
in2=1'b0 ;
sel=1'b1 ;
#100;
in1=1'b0;
in2=1'b1 ;
sel=1'b0 ;
#100;
end
initial
begin
$monitor("in1=%b, in2=%b,sel=%b,out=%b, time=%t\n", in1,in2,sel,out, $time);
end
endmodule
module tb_check();
reg in1,in2,Sel;
wire out;
check dut(out,in1,in2,sel); //
initial
begin
in1=1'b1;
in2=1'b0 ;
sel=1'b1 ;
#100;
in1=1'b0;
in2=1'b1 ;
sel=1'b0 ;
#100;
end
initial
begin
$monitor("in1=%b, in2=%b,sel=%b,out=%b, time=%t\n", in1,in2,sel,out, $time);
end
endmodule