Hi,
I am using an Arria 10 ReFLEX Achilles dev kit that includes 2 DDR4 memories. The first DDR4 is used by the HPS and the second one I am trying to access from the HPS as well. To do this, I am using the HPS2FPGA bridge and an address span extender. The address span extender is a window of 512MB with 1 subwindow and the control register for the span extender is connected to the lightweight h2f bridge. I previously posted in SoC Dev Kits I believe and my problem was that the HPS was freezing when I was trying to write to the memory via hps2fpga bridge. I had some other peripherals connected so I have removed those to eliminate some elements that could possibly contribute to my problem. Now after compiling a few times and removing the other elements, it does not freeze when writing. However, my problem now is that when I write values, some values read back are incorrect. I have a little test program that writes X amount of values sequentially, then reads them, changes the window via the lw h2f bridge and writes X values and reads them through all 8 of my defined windows of 512MB. Then, it also does another read afterward that only reads the values and checks if they are the expected values. The values that are wrong seem to be the first 32 bytes. However, in different compiles where I slightly change something (for example, I added an LED that is assigned to the DDR4 calibration success / fail signal) the values that do not change are different. In this particular build, I cannot write the first 32 bytes as mentioned before, but in the past, I have had some compiles where everything seemed to work properly (even with all of my peripherals connected, these are usually just PIOs). However, if I changed something such as adding another PIO, it may or may not work. This problem has been really puzzling for me. I am fairly new to FPGAs and Linux in general and I tried to troubleshoot this issue. Any tips would be helpful.
At first, I thought it was a DDR4 timing problem because I was not meeting the timing requirements set by the ReFLEX reference design project that I based mine off of. Because of this, I changed it to be as simple as possible with only the address span extender and 2 memories connected to the HPS. When doing this, I do not receive a timing requirement not met message, but as mentioned before it still does not work as expected.
Between the freezing and the incorrect values, I cannot figure out what the problem is. As a note, I did not write a kernel module to write to the bridges; I am using mmap() and /dev/mem file descriptor to access the location.
Any tips, push in any direction (pretty lost right now), or help would be greatly appreciated.
Thank you!
I am using an Arria 10 ReFLEX Achilles dev kit that includes 2 DDR4 memories. The first DDR4 is used by the HPS and the second one I am trying to access from the HPS as well. To do this, I am using the HPS2FPGA bridge and an address span extender. The address span extender is a window of 512MB with 1 subwindow and the control register for the span extender is connected to the lightweight h2f bridge. I previously posted in SoC Dev Kits I believe and my problem was that the HPS was freezing when I was trying to write to the memory via hps2fpga bridge. I had some other peripherals connected so I have removed those to eliminate some elements that could possibly contribute to my problem. Now after compiling a few times and removing the other elements, it does not freeze when writing. However, my problem now is that when I write values, some values read back are incorrect. I have a little test program that writes X amount of values sequentially, then reads them, changes the window via the lw h2f bridge and writes X values and reads them through all 8 of my defined windows of 512MB. Then, it also does another read afterward that only reads the values and checks if they are the expected values. The values that are wrong seem to be the first 32 bytes. However, in different compiles where I slightly change something (for example, I added an LED that is assigned to the DDR4 calibration success / fail signal) the values that do not change are different. In this particular build, I cannot write the first 32 bytes as mentioned before, but in the past, I have had some compiles where everything seemed to work properly (even with all of my peripherals connected, these are usually just PIOs). However, if I changed something such as adding another PIO, it may or may not work. This problem has been really puzzling for me. I am fairly new to FPGAs and Linux in general and I tried to troubleshoot this issue. Any tips would be helpful.
At first, I thought it was a DDR4 timing problem because I was not meeting the timing requirements set by the ReFLEX reference design project that I based mine off of. Because of this, I changed it to be as simple as possible with only the address span extender and 2 memories connected to the HPS. When doing this, I do not receive a timing requirement not met message, but as mentioned before it still does not work as expected.
Between the freezing and the incorrect values, I cannot figure out what the problem is. As a note, I did not write a kernel module to write to the bridges; I am using mmap() and /dev/mem file descriptor to access the location.
Any tips, push in any direction (pretty lost right now), or help would be greatly appreciated.
Thank you!