作者:付汉杰,hankf@xilinx.com,文章转载自:赛灵思中文社区论坛
1. MicroBlaze AXI访问返回DECODE1C
在ZC702单板上,MicroBlaze通过IC/DC端口连接到PS S_AXI_GP0,MicroBlaze读取OCM,得到值DECODE1C。
DECODE1C is returned by the AXI Interconnect if it doesn't know how to route a requested AXI transaction.
MicroBlaze改为通过DP端口连接到PS S_AXI_GP0,再读取OCM,正常。
2. OCM映射到高地址
Zynq-7000的OCM缺省部分映射到0地址,部分映射到0xFFFF0000。如果要把OCM全部映射到高地址,需要配置OCM_CFG寄存器。MicroBlaze不能访问OCM_CFG寄存器,一定要在A9里访问OCM_CFG寄存器。
/* Register (slcr) OCM_CFG Absolute Address 0xF8000910 */ xil_printf("Original OCM_CFG: 0x%08x\r\n", Xil_In32(0xF8000910) ); Xil_Out32(SLCR_UNLOCK, SLCR_UNLOCK_VAL); Xil_Out32(0xF8000910, 0x1f); Xil_Out32(SLCR_LOCK, SLCR_LOCK_VAL); xil_printf("Updated OCM_CFG: 0x%08x\r\n", Xil_In32(0xF8000910) );
3. 参考文章
https://www.xilinx.com/support/answers/71416.html
https://www.xilinx.com/video/soc/zynq-microblaze-iop-ocm-memory-resource...