Forum Discussion
Altera_Forum
Honored Contributor
8 years agoSoc/HPS based on DE10-Nano : how do I program a DPR and/or UART
Hello everyone, I am in a process of porting my application from a MAX10/DE10-Lite/NIOSII environment (https://github.com/pdp11gy/dec-rl02-rl01-disk-emulator) to an SoC/HPC environment base...
Altera_Forum
Honored Contributor
8 years agoI found the problem by myself, I did not care about the axi_master which is necessary for a dual_ported_RAM. Code has to be changed:
# define ALT_AXI_FPGASLVS_OFST (0xC0000000) // axi_master # define HW_FPGA_AXI_SPAN (0x40000000) // Bridge span # define HW_FPGA_AXI_MASK ( HW_FPGA_AXI_SPAN - 1 ) // void *axi_virtual_base; axi_virtual_base = mmap( NULL, HW_FPGA_AXI_SPAN, ( PROT_READ | PROT_WRITE ), MAP_SHARED, fd,ALT_AXI_FPGASLVS_OFST ); // DPR_addr = axi_virtual_base + ( ( unsigned long )( DPR_BASE )); // -> Now, also the memcpy works, see my example: memcpy((void *)(DPR_addr), &RLDRIVE.rl_drive_i[0], 11520); // RAM => DPR memcpy(&RLDRIVE.rl_drive_i[0], (void *)(DPR_addr), 11520); // RAM <= DPR ... I still have the problem, that I can't load my .rbf file