std_logic_textio library

Discussion in 'VHDL' started by Shannon, Jul 10, 2009.

  1. Shannon

    Shannon Guest

    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
     
    Shannon, Jul 10, 2009
    #1
    1. Advertising

  2. Shannon

    JimLewis Guest

    On Jul 10, 9:30 am, Jonathan Bromley <>
    wrote:
    > On Fri, 10 Jul 2009 08:12:27 -0700 (PDT), Shannon wrote:
    > >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?

    >
    > 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
     
    JimLewis, Jul 10, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pedro Claro

    the textio lib and std_logic_textio

    Pedro Claro, Jul 25, 2003, in forum: VHDL
    Replies:
    3
    Views:
    10,793
    Mike Treseler
    Jul 28, 2003
  2. Mythran
    Replies:
    0
    Views:
    2,488
    Mythran
    Aug 24, 2004
  3. Alan Ferrandiz [MCT]
    Replies:
    0
    Views:
    470
    Alan Ferrandiz [MCT]
    Sep 11, 2004
  4. Magne Munkejord
    Replies:
    1
    Views:
    3,772
    Magne Munkejord
    Aug 23, 2006
  5. obaskirt
    Replies:
    0
    Views:
    1,358
    obaskirt
    Sep 20, 2007
Loading...

Share This Page