Large test vectors

S

subin

Guest
Hi,
I am new in the simulation area(testing) of verilog. I have a
DSP module with me and i want to test it with maximum possible
cases...In the begining i started with file read( i mean load the test
vecotors in a test file and read it using the "readmemb" function)...
but i think reading from file to a vector have size limitation... what
should i have to do run millions of test vectors..
reagards
subin
 
On 21 Feb, 07:17, "subin" <subin...@gmail.com> wrote:
Hi,
I am new in the simulation area(testing) of verilog. I have a
DSP module with me and i want to test it with maximum possible
cases...In the begining i started with file read( i mean load the test
vecotors in a test file and read it using the "readmemb" function)...
but i think reading from file to a vector have size limitation... what
should i have to do run millions of test vectors..
reagards
subin
Verilog-2001 adds a number of enhanced file I/O functions which are
applicable in this case. Have a look at section 3.12 of the following
document for a quick summary...

http://www.sutherland-hdl.com/papers/2000-HDLCon-paper_Verilog-2000.pdf

The functions $fopen, $fscanf and $fclose are essentially equivalent
to their C counterparts and will probably suit your purposes.

Mark.
 
subin wrote:
In the begining i started with file read( i mean load the test
vecotors in a test file and read it using the "readmemb" function)...
but i think reading from file to a vector have size limitation... what
should i have to do run millions of test vectors..
The size limitations are not very limiting. The Verilog
standard requires that arrays be allowed to have at
least 2**24 elements. That is 16 million vectors. And
any reasonable implementation will probably allow
more (probably at least 2**30 elements and a Gbyte
of storage). You might start running into system memory
limitations if you are using a small system.

You could extend this by reading in a new set of
vectors when you reach the end of the first set. But
if you are going to add logic like this, you might just
want to read in the vectors one at a time from a file
using $fscanf. Then you only need storage for one
at a time.

You might also consider whether you should break
up your big test with many vectors, into a lot of
smaller tests with fewer vectors each. This makes
it easier to debug when you have a problem. It
also allows you to run your tests in parallel if you
have multiple machines available. And it saves on
total memory. It might be slower on a single machine
if a lot of vectors are required at the start of each test
for initialization.
 

Welcome to EDABoard.com

Sponsor

Back
Top