FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6669 Discussions

Creating a Custom Hex File

UserID4331231
New Contributor I
366 Views

I need help on How to create a customized Hex file.

I have a config space of 8K (Memory IP) . for which we have derived the "initial values", these values are not a fixed pattern or sequence. And over time these initial values may change.

With quartus hex file creation tool I can only initialize hex file with simple patterns, and writing 8k values manually is impractical.

I have a csv file established for derived "initial values", and its format is as following

#8 byte offset in Decimal , #value in signed decimal, #comment 

0 , 15,

8 , 39,

16, 158,

24, 59,

.....

Comment column can be ignored, its for readability of the file.

if a offset is not present, it need to assign a default value (lets say 0) . 

I can easily write a script in python or C to read this csv file and dump a file with .hex extension. But i don't know Hex file encodings.

can you help me to find solution where I can generate .hex file with custom values for every offset? 

attaching example.csv for the reference.

 

attaching a csv file for the reference 

0 Kudos
1 Solution
RichardTanSY_Altera
259 Views

I believe this is what you're looking for. The Hexadecimal File (.hex) Definition webpage provides the hex format (its code and definition), which may help you write a script to generate the hex file automatically.

https://www.intel.com/content/www/us/en/programmable/quartushelp/current/index.htm#reference/glossary/def_hexfile.htm


If you're interested, there's also a definition for Memory Initialization File (.mif).

https://www.intel.com/content/www/us/en/programmable/quartushelp/current/index.htm#reference/glossary/def_mif.htm


Regards,

Richard


View solution in original post

0 Kudos
4 Replies
RichardTanSY_Altera
260 Views

I believe this is what you're looking for. The Hexadecimal File (.hex) Definition webpage provides the hex format (its code and definition), which may help you write a script to generate the hex file automatically.

https://www.intel.com/content/www/us/en/programmable/quartushelp/current/index.htm#reference/glossary/def_hexfile.htm


If you're interested, there's also a definition for Memory Initialization File (.mif).

https://www.intel.com/content/www/us/en/programmable/quartushelp/current/index.htm#reference/glossary/def_mif.htm


Regards,

Richard


0 Kudos
RichardTanSY_Altera
142 Views

Hi OP,


Any update on this?

Do you able to resolve the issue?


Regards,

Richard Tan



0 Kudos
RichardTanSY_Altera
89 Views

We noticed that we haven't received a response from you regarding the latest previous question/reply/answer, and will now transitioning your inquiry to our community support. We apologize for any inconvenience this may cause and we appreciate your understanding. 

 

If you have any further questions or concerns, please don't hesitate to reach out. Please login to https://supporttickets.intel.com/s/?language=en_US, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions. 

 

The community users will be able to help you on your follow-up questions. 

 

Thank you for reaching out to us! 

 

Best Regards, 

Richard Tan 


0 Kudos
UserID4331231
New Contributor I
26 Views

can close this topic. I found information what i was looking for on link you provided above. 

I will experiment with it and let you know if i need more help

0 Kudos
Reply