using Cyclone IV hard ip and On-chip memory 32B mapped to 0x-0x1F
BAR0 mapped to 0xA1200000-0xA0001F
Reading BAR0 at offset 0 should have access first byte of On-chip memory? Reading 0xff instead of memory content.
Could you share with me your Quartus design? How do you confirm that you are reading the correct addressing? Have you try to use SignalTap to tap the on chip memory IP interface?
From your design, I observed that you are not using the correct clock on the on chip memory. The clock should be from the PCIe Clock output so that the clock is sync between Bar 0 and On Chip Memory.
Please refer to https://fpgacloud.intel.com/devstore/platform/14.0.0/Standard/an-456-pci-express-high-performance-re... for the design example.
I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.