Dumping the contents of an Integer Array....

K

kwaj

Guest
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
 
kwaj wrote:

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
 
I've got model sim...but I am using variables of upto 3000 bits in size. So
might try the other method
"Mike Treseler" <not_tres@fluke.com> wrote in message
news:103sfqi722kj89f@corp.supernews.com...
kwaj wrote:

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
 

Welcome to EDABoard.com

Sponsor

Back
Top