Altera_Forum
Honored Contributor
18 years agoHowto use large MIF HEX files
I am having problems in creating and simulating HEX files for (here Stratix GX) block RAMs. I am having an output in the format of intel's hex, but with an increased number of columns per line. In fact, I have 32 words (8 bits) to load into a 64k x 32 BRAM:
:20000000F4E40000E9C8F4E4E9C8F4E4E9C8F4E4E9C8F4E4F4E4E9C800000B1C0B1C00000D The special thing about his ram is, that it has a 32bit input and a 64bit putput. I tried to simulate in Modelsim and It runs with Port B (the 32bit-Port), but the modelled output has gaps ! How must this be done then ? Then I tried the MIF-Editor, to create a MIF. I am having this here : WIDTH=32; DEPTH=65536; ADDRESS_RADIX=HEX; DATA_RADIX=HEX; CONTENT BEGIN 00000 : F4E40000; [00001..00004] : E9C8F4E4; 00005 : F4E4E9C8; 00006 : 0000B1C0; 00007 : B1C00000; 00008 : F4E40000; 00009 : 0000F4E4; 0000A : F4E40000; 0000B : 0000F4E4; 0000C : F4E40000; running to 095FE : 6380000E; 095FF : 9C80000E; [09600..0FFFF] : 00000000; END; Since I cannot simulate this in Modelsim, I changed to hex (save as) and found that the result can neither be simulated nor loaded into Quartus. ??? Now, how would a correct HEX file look like - beeing suitable to such a ram ? - This is the definition : ENTITY dpram_64_32 IS PORT ( clock : IN STD_LOGIC ; data : IN STD_LOGIC_VECTOR (31 DOWNTO 0); rdaddress : IN STD_LOGIC_VECTOR (14 DOWNTO 0); wraddress : IN STD_LOGIC_VECTOR (15 DOWNTO 0); wren : IN STD_LOGIC := '1'; q : OUT STD_LOGIC_VECTOR (63 DOWNTO 0) ); END dpram_64_32; Thanks in advace!