Altera_Forum
Honored Contributor
10 years agoAccess HPS SDRAM from NIOS II
Hello,
i am new to SOC devices, and i am using QII 15.0 and NIOS II ESD 15.0. Now i am trying to access HPS SDRAM from a NIOS II programm. The HPS is running Linux, and the FPGA has a NIOS II Processor without OS. I added a FPGA to SDRAM Interface (f2h_sdram0, Avalon MM Bidirectional, 32) to the Cyclone V hps and i connected it to a address span extender (Enable slave control port = false). In my NIOS II system.h i have the following entry:# define ALT_MODULE_CLASS_hps_0_bridges hps_bridge_avalon# define HPS_0_BRIDGES_BASE 0x1400000# define HPS_0_BRIDGES_IRQ -1# define HPS_0_BRIDGES_IRQ_INTERRUPT_CONTROLLER_ID -1# define HPS_0_BRIDGES_NAME "/dev/hps_0_bridges"# define HPS_0_BRIDGES_SPAN 4194304# define HPS_0_BRIDGES_TYPE "hps_bridge_avalon"
Now i am tryingt to read from the HPS SDRAM using: data = IORD(HPS_0_BRIDGES_BASE, 1) When NIOS II executes the instruction it gets stalled. A read to other addresses outside the address span extenders range works. Do i have to use any other function to read from HPS sdram / address span extender? Do i have to tell the HPS that there is another device trying to access the memory? Any other ideas, why NIOS II gets stalled when reading from addresses inside the HPS / address span extenders space? Thanks, Patrick