EmbDev.net

Forum: FPGA, VHDL & Verilog VHDL & string conversion


von Sebastian (Guest)


Rate this post
useful
not useful
Hello embdev-Community.

I'm from Germany, but I'll do my very best in writing clean English ;)

I am developing with VHDL since a few weeks, I love this method to 
design hardware. All this time along I used the Xilinx ISE to create 
testbenches for evaluation.

But today I decided to write my own bench on a linuxbox. This was a 
little difficult, but in the end it worked.

I coded a for loop which iterates an array of pattern and stimulates my 
entity with the desired values. After that it compares the output saved 
in the array with the output of the entity.

If this doesn't match, an error-string is shown.

But I want to tweak this a little bit. It is not really helpful to see, 
that an error occures. It would be great to see, on which index of the 
pattern-array this thing happened.

But I really don't know how to convert the iterator i:
1
for i in pattern'range loop
to a string in my error string.

My actual output is:
1
assert Q_is = patterns(i).Q
2
report "Q doesn't match!" severity error;

But I want something like: "Q doesn't match @ i", where i is replaced by 
it's value.

Since I only coded CPLD-Hardware for synthesizing, I'm absolutely 
unfamiliar with strings a.s.o. in VHDL.

Hope, someone could help.

Greets and best wishes from Germany,
Sebastian

von Matthias G. (mgottke)


Rate this post
useful
not useful
Hallo Sebastian,
so geht's:
1
report integer'image(i) & ": Q doesn't match!" severity error;
Viel Erfolg.

von Sebastian (Guest)


Rate this post
useful
not useful
Herzlichsten Dank, genau das hat mir gefehlt!

Gibt es eine Übersicht solcher Debug und Testing Anweisungen?

Grüße,
Sebastian

von Andreas S. (andreas) (Admin)


Rate this post
useful
not useful
Please write in English in this forum.

von Sebastian (Guest)


Rate this post
useful
not useful
Sorry, I wrote back in the german board, didn't mind that my post will 
appear also in the english.

I asked about a kind of list or summary with the most used debugging- 
and testing-codes in VHDL.

Greets, Sebastian

von Andreas S. (andreas) (Admin)


Rate this post
useful
not useful
There is not much else, just report, image and some file IO functions.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.