std_logic_textio library

S

Shannon

I'm planning on using std_logic_textio library for my testbench. I
just want access to the hread / hwrite functions. I don't like doing
non-standard things. Am I making a mistake?

Shannon
 
J

JimLewis

And it's officially supported in the 2008 standard.

Try turning on the VHDL-2008 switch in your simulator.
If hread and hwrite work without the package reference to
std_logic_textio, then these new features has been implemented.
It works in a couple of the simulators I have tried it.

In the 2008 standard, these functions were upgraded (now handle
parameters that are not a multiple of 4 bits for hexadecimal or
3 bits for octal) and were moved to std_logic_1164. The package
std_logic_textio still exists for backward compatibility.
It has aliases to the functions in std_logic_1164 (to allow
selected name references to the package to still work).

If your simulator does not support VHDL-2008 textio yet,
use std_logic_textio, but avoid selected name references
(such as ieee.std_logic_textio.hwrite) to the subprograms in
the package. This way when you have VHDL-2008 support, your
design will work with or without the reference to
std_logic_textio.

Cheers,
Jim

SynthWorks VHDL Training
www.SynthWorks.com
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top