Forum Discussion

UserID4331231's avatar
UserID4331231
Icon for Occasional Contributor rankOccasional Contributor
3 months ago
Solved

Creating a Custom Hex File

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

4 Replies