understanding Hex file creation
In my FPGA project I have couple of memory which I plan on using as Configuration memory and general purpose memory. In Platform designer I made my project and I intend to assign them some initial values using "hex" files. While creating a new hex file using quartus , it asks two questions
- word size ?
- number of words.?
Can you help me how to choose these parameters for give memory size?
My memories are lets say 1KBytes and 1MBytes.
for 1KB memory, I want to initialize this memory with 64bit / 8 byte signed integer values, Starting from AAAA_BBBB_CCCC_0000 to AAAA_BBBB_CCCC_007F. (128 long int x 8 =1024 bytes)
Once I move past selecting word size and number of words, I can right click and choose "custom fill cells" to auto fill my memory with desired pattern. However I believe due to mis configuration in word size and number of words its not taking AAAA_BBBB_CCCC_0000 as valid input. I chose some small values and moved on, now during synthesis I got warning code 23413 and 23414 indicating "Memory depth (**bleep**) in the design file differs from memory depth (yyy) in the Memory Initialization File. Path/intel_onchip_memory_1410/synth/d2h_mem.hex" -- setting initial value for remaining addresses to 0."
this means I am not creating hex file properly and cant assign them exact pattern I want to.
furthermore, what if my desired patterns are random and offset specific. for example, initial configuration status of a custom IP? my config space is large and manually editing values in quartus gui is not practical. Is there any python or C example which can show how to generate hex file with desired values for each offset? I have csv file which has offset,value listed for entire configuration space.
please