Continue to Site

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.

to create test bench in vhdl - how ?

Status
Not open for further replies.

rashmi.imhsar

Junior Member level 2
Junior Member level 2
Joined
Mar 13, 2014
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1
Visit site
Activity points
270
How do I create a test bench ? Simulating in model sim and seeing the waveform is what is called a s test bench ??

How different should a test becnh code be from my original vhdl code ?
 

Last edited:

hey,

Both the links are not opening.

And yes :) I am from India. So are you?

- - - Updated - - -

Actually my code works in hardware. i.e I can see the output by the blinking Leds. But when I tried to run the code in Modelsim,the output values become undefined.

What could be the problem?
 

Undefined "U" or more likely "X" propagation. You probably have some uninitialized signal in your UUT that is propagating an X to the outputs. Post the code and we can help you find the problem signal or just use Modelsim to trace the X back through the design.
 

Both the links are not opening.
Well, one link was working :p and the other indeed was not working (the "ml" at the end went for a walk or something). Fixed the one link that didn't work, and left the already working one as is. So you can view those now. :)

Actually my code works in hardware. i.e I can see the output by the blinking Leds. But when I tried to run the code in Modelsim,the output values become undefined.

Sounds like a simulation mismatch. That is usually because in your testbench you have not defined the initial state of registers properly. In real hardware it will work, because there the initial state of registers will typically be set to zero after configuration. For it to work the same in simulation you have to do this initializaton.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top