Altera_Forum
Honored Contributor
11 years agoRAM/ROM Initialization Using a Generic Definded External Package File.
Greetings All:
I am making an entity which functions as an SPI memory chip. I have previously made several memory blocks initialized using a function within the architecture declaration portion, however my current project is slightly different, so that previously version is not applicable. My SPI entity is instantiated many times, with different initialized values for each. Each instantiation has generics to set the size for the memory, page size, and so forth... however, I haven't figured out how to use a generic to select an external vhd file with a package/function generating the contents of the memory. That's the only part that needs to be defined outside of the entity other than the generics. I thought of using an external file, reading strings, converting to integer (which I haven't done in VHDL yet anyway), however the functions VHDL uses provides the ability to generate the data, a different file would have to create the data externally. Any Suggestions?