Cyclone V SoC HPS2FPGA AXI Master - How to enable?
Has anyone been able to use the HPS2FPGA AXI Bridge to access an avalon-mm slave in the FPGA fabric. The Cyclone V SoC Kit's Golden Hardware Reference Design (GHRD) connects an on-chip ram to the hps2fpga bridge, but I have not come across any software examples that access this on-chip memory. I am using the Lab1b-HWLibs bare-metal example from Altera's "Developing Software for ARM SoC FPGA" training, as a starting point to create my own bare-metal firmware project. I am trying to add to this project code to access the on-chip ram connected to hps2fpga bridge. From looking at the memory map views in Altera's documentation, I don't think the default MPU memory map allows the MPU to access the hps2fpga bridge. What I also get from the documentation is the hps2fpga bridge is enabled by setting bit 3, in the l3 remap register. I tried using the following lines of code to do this:
uint32_t remap_mask = ALT_L3_REMAP_H2F_SET_MSK; alt_setbits_word(ALT_L3_REMAP_ADDR, remap_mask); I have also tried using the DS-5 Debugger Registers tab to write an 8 (i.e. set bit 3) to the l3 remap register. Neither of these has worked. When I try to access the memory using the 0xC000_0000 offset shown in Altera's documentation, it hangs the MPU. This is true whether I try to access the memory with c-code or use the debugger to read the memory. Any insight is appreciated. Thanks, -kstolp