Array of strings?

T

Tricky

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.
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top