10-08-2020 12:08 PM
I took the DDR4 MIG example design targeted to the KCU105 and wrapped up the instantiation of the DDR memory into a module (see attached file, "micron_ddr.v").
The goal is to take an .elf file for a Microblaze and initialize the DDR4 with it, so that the system kicks off and I can simulate the Microblaze with the DDR4.
To do this, Micron provides an example: "mem_file.txt" (also attached).
To get a "flattened" binary for the Microblaze, I used mb-objcopy, then looked at the memory offset for the DDR. So that looks like the data I need, but I'm having trouble formatting it correctly so that it can be used by the DDR4 found on the KCU105 (which contains 4 parts, and is 64-bit wide (4x16))
I'm having some serious difficulty with this. I wrote a small (...ugly) python program just to extract the binary bits, then tried to format them according to the "ROW_COLUMN_BANK" setting of the MIG, but the data is coming out all wrong. I need to essentially split the data among the 4 chips, while giving the correct bg/ba/row/column such that the application interface to the MIG will retrieve the right data.
To test the extraction, I took the DDR4 MIG example design's test bench with the regular application interface, removed the write/read machinery, initialized the DDR with the mem files created with Python, then did a read in simulation. I am WAY off on that first address - I must be doing something goofy, or there's something I don't understand/know.
Thanks for your time, any help is appreciated.