FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5990 Discussions

initializing ram with hex file

Altera_Forum
Honored Contributor II
1,217 Views

Hi, 

 

I am using 

 

Quartus/DSPBuilder 9.0 

Matlab/Simulink 7.5 (aka R2010a) 

Vista Home 

DE2 Cyclone II kit 

 

I am having trouble initializing RAM with Intel hex files. I warnings like the following: 

 

Critical Warning: Can't read Memory Initialization File or Hexadecimal (Intel-Format) File simpleTest.hex -- setting all initial values to 0 

 

However, I know the application can access this file, since if I deliberately put some bogus data in the file, I get errors (as expected) such as: 

 

Error: Data size does not match the number of bytes at line 4 in Hexadecimal (Intel-Format) File "simpleTest.hex" File: simpleTest.hex Line: 4 

 

If the file was misplaced or innaccessible, I wouldn't get that error. 

 

I have tried local files in the same directory as well as absolute and relative paths to files in other directories. Always get the same warning. I have also tried moving the file to various places (in the same folder as my mdl, subfolders, far away, etc). No luck. 

 

Any suggestions? Thanks.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
266 Views

I think a bad checksum may cause that, but not really sure. Can you try creating a .mif instead of a .hex to see if that acts the same? It seems to be the content as you said --

Altera_Forum
Honored Contributor II
266 Views

I actually don't think it's the content of the file at all. What I was trying to say about bogus data was that if I *deliberately* put in a bad checksum or extra garbage characters, I get an error indicating the data is bad, which indicates that Quartus/DSPBuilder can access the file. 

 

However, when I use a hex file that I know has correct checksums, I get the critical warning about being unable to read the file. So I suspect it's some kind of configuration error or such. 

 

Thanks.
Altera_Forum
Honored Contributor II
266 Views

hi i have an error : 

Error: Generated checksum value does not match the value specified at line 1 in Hexadecimal (Intel-Format) File "Look1.hex" http://www.alteraforum.com/forum/../proweb/misc/progress.gif  

can you help me i change the .hex file for an on-chip memory with result of code matlab i wanted to change the contents of memory with data wich i generated with matalab
Altera_Forum
Honored Contributor II
266 Views

Hi, Sam. I have not used matlab and can only suggest using Quartus do generate the file. 

I have my own program to generate my .hex. I have not done it recently so I'm a bit rusty. 

 

My suggestion is to copy the text that you input to matlab and paste it in the source for Quartus to gen the .hex. 

 

Good luck.
Altera_Forum
Honored Contributor II
266 Views

thks i resoklve the problem i have an error in my own code matlab i fixe it and it is work thanks so much

Altera_Forum
Honored Contributor II
266 Views

hi i resolve this problem by changing my code in mtalab the cheksum in the end is wrong then i correct it with my own code because in my project i put data in ram wich are genereted with matlab chek ur data

Reply