Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - about hdl testbench

 
Thread Tools Search this Thread
Old 05-14-2005, 03:51 PM   #1
Default about hdl testbench


Hi, All,
I've written a hdl design, and simulate it now. But I can't find the
way to write a hdl testbench to test the design. I've googled, But I
can't find much material on net. could you give some advice or
recommand some online material on this field so that I can get a
general idea or deep knowledge on it? Thank you!

//Neil



Neil
  Reply With Quote
Old 05-14-2005, 04:32 PM   #2
Ralf Hildebrandt
 
Posts: n/a
Default Re: about hdl testbench
Neil wrote:


> I've written a hdl design, and simulate it now. But I can't find the
> way to write a hdl testbench to test the design.


A testbench is nothing obscure. It is something you use to test your
design. It depends on you how a test should be designed.

Typically a testbench is a VHDL component that instantiates your design
inside plus some additional components you need (e.g. a clock generator).

Inside the testbench component you should generate some signals for your
design. You are free how to do this (components, functions, procedures,
synthesizable or not...). You may use the complete set of VHDL.


> I've googled, But I
> can't find much material on net.


This is because a testbench is always specialized for one design and
everybody writes testbenches a little bit different.



Ralf


Ralf Hildebrandt
  Reply With Quote
Old 05-14-2005, 06:49 PM   #3
Mike Treseler
 
Posts: n/a
Default Re: about hdl testbench
Neil wrote:

> I've written a hdl design, and simulate it now. But I can't find the
> way to write a hdl testbench to test the design.


Step one is to install a vhdl simulator
and run some tutorial examples.

A testbench is a text file.
It includes a null entity and
architecture processes
to wiggle and watch the design instance.

Besides the UUT instance, I normally
use a clock/reset generation process
and a main process to wiggle and watch.

Here's an example
http://tinyurl.com/cv43m

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 05-14-2005, 07:13 PM   #4
Neil
 
Posts: n/a
Default Re: about hdl testbench
Hi, Mike,
Thank you first.
I use Modelsim as my simulator, and now use waveform to simulate. but
it seems not a good way when the design needs a long simulating time
and the input signals are changed both regular and irregular.

Let me read the sample first to get a general idea. thank you again.

//Neil



Neil
  Reply With Quote
Old 05-14-2005, 10:14 PM   #5
Ben Twijnstra
 
Posts: n/a
Default Re: about hdl testbench
Hi Neil,

> I use Modelsim as my simulator, and now use waveform to simulate. but
> it seems not a good way when the design needs a long simulating time
> and the input signals are changed both regular and irregular.
>
> Let me read the sample first to get a general idea. thank you again.


The attached three files might also be of interest. They follow roughly the
same pattern but give you something to chew on. I wrote these on a Linux
box, so you may not be able to open them properly with Notepad, but most
other editors won't have any trouble with them.

I find the use of the txt_util package most useful because you don't need to
rely on ASSERT all the time.

Best regards,


Ben



Ben Twijnstra
  Reply With Quote
Old 05-16-2005, 05:43 PM   #6
Andy Peters
 
Posts: n/a
Default Re: about hdl testbench
Neil wrote:
> Hi, All,
> I've written a hdl design, and simulate it now. But I can't find the
> way to write a hdl testbench to test the design. I've googled, But I
> can't find much material on net. could you give some advice or
> recommand some online material on this field so that I can get a
> general idea or deep knowledge on it? Thank you!


Start here:

http://janick.bergeron.com/wtb/

-a



Andy Peters
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xilinx 7.1 and testbench error boitsas Software 0 01-15-2008 04:14 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46