Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating an unconstrained array of string from a file

Status
Not open for further replies.

Mart0024

Technical User
Dec 19, 2006
2
CA
I'm trying to read in an ascii file and store the individual lines in an array of string (Later I will convert the hex Strings into test vectors for my testbench)
but I'm having a problem with resloving the unconstrained array that I want to return from the function.

(From what I gather, 2 dimensional unconstrained arrays are not really implemented well in VHDL. If someone knows how to do this, I'd be very intrested in learning about it.)

Anyway, I wrote a little function to go and read the file and count the line numbers, hoping that I could call use it to constrain my array (ie. array(0 to File_Size(my_file)) of string). But this isn't working out as well as I would have thought.

Can anyone offer some suggestions on how I can resolve this?
or suggest another approach to getting the string lines out for the file.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top