ModelSim

Oct 16, 2004 9 Replies

Where are there some really easy point and click tutorials for ModelSIM?


modelsim isn't really that difficult to use... its the VHDL or verilog testbench that's the bugger.

Simon

It comes with quite a good introductory tutorial.

Leon

Yeah. I am gathering that. And it is also difficult to understand where VHDL testbenches "begins" and the other takes over. There is also a waveformer in the Xilinx tool that is somewhat intuitive. I have found some text books that cover simulation testbenches and give a few examples. Very week though in terms of the numbers of examples and the strategy behind the use of the various commands. I still haven't found an example of a bidirectional test bench. I also started searching the web with the words downto and testbench and have found some examples, but these are not what I would call good tutorials.

The design entity becomes an instance in the testbench architecture.

The basic strategy is to wiggle the inputs and watch for expected values on the outputs.

here's one:

formatting link

Good luck.

-- Mike Treseler

Personally, I find a VHDL testbench much easier to write than generating a waveform type stimulus. In VHDL I can write procedures to control a bus interface reading data from a file or provide feedback from one external interface to another. In short, it is a lot like writing any other program since it does not need to be sythesizable.

The *hard* part is knowing what you want it to do!

Rick "rickman" Collins rick.collins@XYarius.com Ignore the reply address. To email me use the above address with the XY removed. Arius - A Signal Processing Solutions Company Specializing in DSP and FPGA design URL http://www.arius.com 4 King Ave 301-682-7772 Voice Frederick, MD 21701-3110 301-682-7666 FAX

IIRC the book "VHDL for Logic Synthesis" by Rushton has a good section on writing VHDL testbenches, talks about file IO and so on.

My preferred approach, when possible/sensible, is to write fairly generic VHDL testbenches that read the stimulus and expected response data from text files, and then drives the unit-under-test from that data. This lets you use other tools to generate the input and output datasets. I've used this to verify implementations of image processing algorithms - prototype the algorithm in matlab, design the hardware, then drive both the matlab and VHDL models with the same input data files, comparing the results.

Rgds,

John

This sounds like a powerful way to really check the video processing. What kind of video processing are you doing? And what do the VHDL models look like?

080605060704040900020308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit

Hi Brad,

Brad Smallridge wrote:

I'm sure it could be more powerful, but it met my needs. I'm not doing a lot of video/image work now, this is from a few years ago when I was investigating some real-time remote sensing / image processing algorithms.

I've attached a sample test bench, maybe it will be useful in showing you the overall structure and file IO. It's not particularly sophisticated, but will give the general idea..

Regards,

John

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required