Forum Discussion
Altera_Forum
Honored Contributor
14 years agoText file to Flash to VHDL
Hello, I am trying to access the contents of a text file (full of binary data) via an array in VHDL on my Cyclone II device. I would like to output one bit per clock cycle to one of my FPGA pin...
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- If I understand all the contents of the Flash memory get loaded into SRAM upon powerup. Could I then read my file contents from SRAM? --- Quote End --- That's not correct. Not all the content of flash gets loaded into sram, but only what is needed or, more exactly, what is specified in the bootloader. If the text file is included in the Nios application (e.g. in the form of a static const char array, or any other read only data), indeed it will be loaded into sram upon boot and you'll have it available in your code, like a common variable. Otherwise, if the file is simply stored in the flash after fpga configuration and elf file, you need to read it directly from the flash device; but this is quite easy with the HAL driver functions. I don't understand what you mean when you say you want the file to be accessed from vhdl files.