--- Quote Start ---
Dear BadOmen,
As I have seen, you have a lot of valuable answers in the topic of Cyclone V SoC Development kit on the Altera Forum and on the rocketboards.org.
I will describe here my achievements and the problems:
-About 3-4 month ago I am working with Cyclone V Soc boards (formerly revA, now rev.C ES board).
FPGA portion usage:
-I have managed to reach and test the DDR3 memory region clearly within FPGA portion by a Nios II soft core, and a video-test works in 1080p. Nios II can reach and test/validate the memory in soft mode.
HPS portion usage:
-I have managed to reach and test the DDR3 memory region within HPS portion: ARM cores can reach and test/validate the memory in HPC mode. I modified the design from Nios II generated SimpleMemoryTEst template to ARM application processor, by using SOCAL-HWLib level of functions.
- Mixed mode usage: based on Golden SW/HW reference I can easily reach different GPIOs via LW HPS2FPGA bridge by using SOCAL-HWLib level of functions.
.
However, I have the following problems with mixed mode memory accesses (I intended to use HWLib level at first):
- How I can reach FPGA's DDR3 memory / internal BRAM from ARM side (when I set HPS2FPGA bridge)?
- How I can reach HPS' DDR3 memory from FPGA/Nios II side (when I set FPGA2HPS bridge)?
- Are there any reference design for such a mixed mode data transfers between HPS and FPGA portions by using DMA and without DMA conrtoller?
Unfortunately, still I cannot get any valuable response about this topic from Altera SRs.
Thank your for your answer in advance.
Best regards,
Zs.V.
--- Quote End ---
When accessing memory in the FPGA from the HPS you do so through the HPS-to-FPGA bridge. In order for those transactions to occur the following must take place:
1) There must be a valid FPGA image already configured in the FPGA fabric
2) The bridge must be supplied with a running clock
3) The bridge must be taken out of reset
4) The bridge must be mapped into the MPU memory space by enabling the appropriate remapping bit in the L3 interconnect GPV (by default that slave is not reachable)
When accessing memory in the HPS from the FPGA fabric you do so through either the FPGA-to-HPS bridge or the FPGA-to-SDRAM interface. In the case of accessing memory through the bridge all that stuff I said previously about the opposite direction still applies. Another thing to watch out for is memory span. The FPGA-to-HPS bridge and FPGA-to-SDRAM interface expose slave interfaces with 32 bits of addressing. Soft IP such as the Nios II processor only have 32-bit addresses so if you connect it to one of the HPS interfaces it will not have address bits for anything else in the system. So I would place the "Address Span Expander" bridge between your FPGA masters and the HPS slave ports which will expose a smaller window into the HPS address range. Another thing that you should do is for any Avalon-MM IP you connect to the HPS make sure you set the slave secruity accordingly. Avalon-MM doesn't support the AXI secruity signals and by default the HPS memories/peripherals are boot secure. So if you leave the default secruity alone in your system then you'll need to make sure those Avalon-MM masters in the FPGA fabric send secure transactions into the HPS. If you right click the column titles in the Qsys view you'll see a new secruity column is selectable, make sure to set the secruity accordingly.
The golden hardware reference design up on rocket boards shows some of what I discussed above but there are no DMAs present in the design. Somewhere on rocket boards there should be a design with a PCIe controller and some DMA engines that you can also take a look at. At a later time there should be more designs that show the type of interactions between the HPS and FPGA fabric that you are looking for so stay tuned for those.