Guest
hello,
can anyone tell me how to read from / write to a 2D array from a file?
can anyone tell me how to read from / write to a 2D array from a file?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
at a time.hello,
can anyone tell me how to read from / write to a 2D array from a file?
By writing your own procedure that reads from / writes to each element one
i am not able to access the elements, every type of assignment i makeBy writing your own procedure that reads from / writes to each element one
at a time.
KJ
How can anyone possibly help you from this non-description?i am not able to access the elements, every type of assignment i make
i get an error
when i ran the following code, it assigns 1 to each and every elementHow can anyone possibly help you from this non-description?
*I* can access the elements of a 2-D array, and do so routinely.
There is no fundamental problem. Show us a code fragment and
we'll try to help with YOUR problem.
A few guesses...
- you're using the wrong kind of double-subscript:
depending on how you defined the array, you may need
to use subscripts like (row,column) or (row)(column)
- the array is a signal, and you are trying to pass
elements of it to the READ procedures; those
procedures expect variables
Without seeing your code and the error message, these
can only be guesses.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.brom...@MYCOMPANY.comhttp://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
hello,
No.is bit_vector(0 to 7)not equivalent to character?
I could write a function to make such a conversion.if i define the file as a file of characters, why am i not able to get
data into a bit_vector?
Hihello,
when i ran the following code, it assigns 1 to each and every element
in the array tout.
instead of write(my_file,'1'), suppose i have defined an array of
bit_vector(0 to 7) if i give write(my_file,x"04") it gives fatal error
in XST
no i wasnt synthesising it, i was simulating using xilinx simulator,Hi
So you are tring to *synthesize* this ? No wonder it doesn't work, I
don't know of *any* synthesis tool that supports file access.
Nicolas