Dumping the contents of an Integer Array....

K

kwaj

Hi all,

I trying to debug a piece of code which I have written and I would like to
find out the contents of an array. The array is an integer array and I can
view the contents of individual individual elements but would like to view
the entire contents.

I use the ASSERT command to view individual elements but if possible, I
would like to be able to dump the entire contents of an array to a file and
view it accordingly.

Is there away to do this?

cheers

- Kwaj
 
M

Mike Treseler

kwaj said:
I use the ASSERT command to view individual elements but if possible, I
would like to be able to dump the entire contents of an array to a file
and view it accordingly.

Is there away to do this?

Yes.

If you have modelsim, just leaving the
mouse arrow over the array waveform will
pop up a box with all values in it.

If you don't, just add something like this
to your testbench:

report "array of ints";
dump : for i in these_ints'range loop
report integer'image(these_ints(i));
end loop dump;

-- Mike Treseler
 
K

kwaj

I've got model sim...but I am using variables of upto 3000 bits in size. So
might try the other method
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top