This code would be in a package for an architecture declaration sections. This is the example usage from altera's documentation: type mem_t is array(0 to 255) of unsigned(7 downto 0) Īttribute ram_init_file of ram : signal is "my_init_file.mif" Ī third way, which I prefer, is to initialize the memory in VHDL code, for example: type rom_t is array(0 to 1023) of signed(15 downto 0) You have to be confident that your code is indeed interpreted as a ROM by altera, otherwise the attribute will be ignored. You can check the IP core user guide for more information.Īnother solution is to use VHDL attributes to initialize the content of your variable. You can use the memory IP cores to create a memory with initial mif content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |