Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with test*bench verilog at models*im

Status
Not open for further replies.

Tom2

Full Member level 5
Joined
Nov 11, 2006
Messages
318
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
3,457
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
 

sv1437

Full Member level 6
Joined
Sep 5, 2008
Messages
350
Helped
103
Reputation
204
Reaction score
99
Trophy points
1,308
Location
US
Activity points
3,110
What is the error when you are compiling the testbench code?
If you are using Xilinx ISE, then there is no need to write the testbench code for testing your code. Just select the modelsim simulator and then you can change the inputs on the fly.
 

Tom2

Full Member level 5
Joined
Nov 11, 2006
Messages
318
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
3,457
I don't use Xilinx but only modelsim.The problem is that, can not generate the signal at the output.
 

devas

Full Member level 2
Joined
Jun 16, 2009
Messages
129
Helped
42
Reputation
84
Reaction score
11
Trophy points
1,298
Activity points
2,004
Hi,

When compiling your code with Modelsim I get 2 errors about signal sel. Remember Verilog is case sensitive! After changing this I do not get any compile error in the part you posted above.

Devas
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top