Array of strings?

Discussion in 'VHDL' started by Tricky, Mar 19, 2009.

  1. Tricky

    Tricky Guest

    Im trying to bring in a load of file paths into a testbench via
    generics (I use generics an an area for stuff other users are allowed
    to modify). I really need an array of strings for the file paths
    because I need to match the length to another generic that is an
    array, otherwise the TB should fail.

    Now I know I could easily do this with VHDL 2008 like:

    type str_array_t is array(natural range <>) of string;

    but lets assume for the moment that we cannot use VHDL 2008. am I
    stuck, going to have to use a separate generic for each file path,
    which makes the TB far more verbose because I wont be able to do a
    loop to read in all of the files.

    I thought about using an array of lines, but the problem with pointers
    is that they have to be variables, and I would have to set the paths
    up in a process. Ideally Id like to read the files before time starts.

    Im guessing Im stuck, and this is exactly why they brought
    unconstrained array elements into the language.
    Tricky, Mar 19, 2009
    #1
    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. Venkat
    Replies:
    4
    Views:
    970
    Venkat
    Dec 5, 2003
  2. Kurt Krueckeberg
    Replies:
    2
    Views:
    706
    =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?=
    Nov 17, 2004
  3. Rick

    Comparing strings from within strings

    Rick, Oct 21, 2003, in forum: C Programming
    Replies:
    3
    Views:
    375
    Irrwahn Grausewitz
    Oct 21, 2003
  4. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    755
    Malcolm
    Jun 24, 2006
  5. Amit  Limaye
    Replies:
    4
    Views:
    451
    Phlip
    Apr 10, 2006
Loading...

Share This Page