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

Reply

VHDL - Question: Writing text file based TestBenches vs. Waveform file based simulation.

 
Thread Tools Search this Thread
Old 08-06-2004, 08:24 PM   #1
Default Question: Writing text file based TestBenches vs. Waveform file based simulation.


I just wanted to know if more people are moving toward waveform based
simulations. From my point of view, drawing the actual waveforms to
perform the testing (as you can do in Aldec 6.2) makes life much
easier, especially since Aldec allows you to save the waveform as a
testbench text file. Am I correct in saying that you can't graphically
enter a waveform in ModelSim?

Writing testbench files to seem very tedious and it takes a great deal
of knowledge to write one properly and a lot of time. On the other
hand creating a waveform is quicker and more intuitive.

Just wanted to know what others think about this subject.

BLF


BLF
  Reply With Quote
Old 08-06-2004, 10:31 PM   #2
Jonathan Bromley
 
Posts: n/a
Default Re: Question: Writing text file based TestBenches vs. Waveform file based simulation.
On Fri, 06 Aug 2004 15:24:47 -0400, BLF <> wrote:

>I just wanted to know if more people are moving toward waveform based
>simulations.


I've spent the last few years moving away from them.

>From my point of view, drawing the actual waveforms to
>perform the testing (as you can do in Aldec 6.2) makes life much
>easier, especially since Aldec allows you to save the waveform as a
>testbench text file.


I reckon it's a PITA, but I know some people like it.

> Am I correct in saying that you can't graphically
>enter a waveform in ModelSim?


Yes, as far as I know. Howvere, there are commercially
available tools that will allow you to create waveforms
graphically, and then will automatically generate VHDL
or Verilog testbench code that creates the same
waveforms in simulation; of course, these tools can
be used with any simulator.

>Writing testbench files to seem very tedious and it takes a great deal
>of knowledge to write one properly and a lot of time. On the other
>hand creating a waveform is quicker and more intuitive.


And desperately inflexible. Can you draw for me a test waveform
that...
- is parameterisable for data bus width?
- contains subroutine calls, so that I can do the same
operation over and over again with different values (think
read and write cycles on a bus)?
- can have randomised time delays built-in?
- generates test cycles automatically?
- can automatically predict and check the expected outputs
from the device under test?
All the above, and more, can be done in a VHDL test bench with
no difficulty in principle (although, as usual, in practice
it can get pretty complicated if your device under test is
non-trivial).

I agree that writing VHDL code to generate a simple stream of
pulses can seem tedious at first. But you have the power of
a programming language behind it, which can give you immense
flexibility and gives you lots of payback for your initial
investment in creating a suitable stimulus generator (often
known as a BFM or Bus Functional Model).

Jonathan Bromley


Jonathan Bromley
  Reply With Quote
Old 08-06-2004, 10:50 PM   #3
Kai Harrekilde-Petersen
 
Posts: n/a
Default Re: Question: Writing text file based TestBenches vs. Waveform filebased simulation.
BLF <> writes:

> I just wanted to know if more people are moving toward waveform based
> simulations. From my point of view, drawing the actual waveforms to
> perform the testing (as you can do in Aldec 6.2) makes life much
> easier, especially since Aldec allows you to save the waveform as a
> testbench text file. Am I correct in saying that you can't graphically
> enter a waveform in ModelSim?


Drawing waveforms take a lot of time, is error prone, and is only
feasible (in my mind) with very simple protocols. I'f you're thinking
waveforms, you're thinking too small scale.

Creating hundreds of testcases, totalling maybe a full second of
simulation (with 100-300MHz clocks) can only be done using script
based (and hence, text based) verification.

I can't imagine using waveforms to enter even a single 1518 byte
Ethernet frames, including correct FCS.

Regards,


Kai



Kai Harrekilde-Petersen
  Reply With Quote
Old 08-07-2004, 12:19 AM   #4
Jim Lewis
 
Posts: n/a
Default Re: Question: Writing text file based TestBenches vs. Waveform filebased simulation.
BLF,
Using a VHDL subprogram to encapsulate a
sequence/waveform/transaction will give a great
deal of flexability. Generating the initial code
is usually straight forward and does not require a
graphical entry tool.

This is just a starting point. If you are interested in more,
see my DVCon Paper titled, "Accelerating Verification Through
Pre-Use of System-Level Testbench Components." It is
available at:
http://www.synthworks.com/papers/

If you want to learn more about transaction based subprograms
and models, take our VHDL Testbenches and Verification class:
http://www.synthworks.com/vhdl_testb...rification.htm

Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training private.php?do=newpm&u=
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~

BLF wrote:
> I just wanted to know if more people are moving toward waveform based
> simulations. From my point of view, drawing the actual waveforms to
> perform the testing (as you can do in Aldec 6.2) makes life much
> easier, especially since Aldec allows you to save the waveform as a
> testbench text file. Am I correct in saying that you can't graphically
> enter a waveform in ModelSim?
>
> Writing testbench files to seem very tedious and it takes a great deal
> of knowledge to write one properly and a lot of time. On the other
> hand creating a waveform is quicker and more intuitive.
>
> Just wanted to know what others think about this subject.
>
> BLF



Jim Lewis
  Reply With Quote
Old 08-07-2004, 01:44 AM   #5
Mike Treseler
 
Posts: n/a
Default Re: Question: Writing text file based TestBenches vs. Waveform file based simulation.
BLF <> wrote:

>Writing testbench files to seem very tedious and it takes a great deal
>of knowledge to write one properly and a lot of time. On the other
>hand creating a waveform is quicker and more intuitive.


If you like drawing waves, maybe you
would like a vhdl process like this:

begin -- mk_waves
init;
tic;
tic;
dat_s <= x"42";
toggle(stb_s);
tic;
dat_s <= x"AA";
toggle(stb_s);
tic;
dat_s <= x"00";
tic;
done_s <= true;
tic;
tic;
end process mk_waves;

See the details below.

-- Mike Treseler

------------------------------------------------------
-- vsim waves -do "radix hex; add wave \*;run -all";
library ieee;
use ieee.std_logic_1164.all;

entity waves is
end entity waves;

architecture sim of waves is
-- wires
signal clk_s : std_ulogic;
signal rst_s : std_ulogic;
signal done_s : boolean;
signal dat_s : std_logic_vector(7 downto 0);
signal stb_s : std_ulogic;

begin -- architecture sim
-- "Draw" some waves Fri Aug 6 16:01:26 2004 Mike
mk_waves : process is

procedure tic is
begin
wait until rising_edge(clk_s);
end procedure tic;

procedure toggle (signal arg : inout std_ulogic) is
begin
tic;
arg <= '1';
tic;
arg <= '0';
end procedure toggle;

procedure init is
begin -- procedure good_rsv
dat_s <= x"FF";
stb_s <= '0';
tic;
end procedure init;

begin -- mk_waves
init;
tic;
tic;
dat_s <= x"42";
toggle(stb_s);
tic;
dat_s <= x"AA";
toggle(stb_s);
tic;
dat_s <= x"00";
tic;
done_s <= true;
tic;
tic;
end process mk_waves;

-- clock generation
tb_clk : process is
constant clk_cy : time := 5 ns;
begin
if now < clk_cy then
rst_s <= '1';
clk_s <= '0';
else
rst_s <= '0';
clk_s <= '0';
wait for clk_cy/2;
clk_s <= '1';
end if;
if done_s then wait;
end if;
wait for clk_cy/2;
end process tb_clk;


end architecture sim;



Mike Treseler
  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
SONY DVD RW DW-G120A SOMETIMES FAILS...... atlantic965 DVD Video 0 06-18-2006 10:36 PM
problems backing up dvds Lawrence Traub DVD Video 11 09-27-2005 07:34 PM
Re: Ripping DVDs. Please answer the attached question. - Question.txt Stan Brown DVD Video 19 02-09-2005 11:19 PM
Burn process failed - help! Log file posted for help troubleshooting Michael Mason DVD Video 1 08-16-2004 09:24 PM
Pioneer A05 Problems Bill Stock DVD Video 8 11-28-2003 05:03 AM




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