作者:付汉杰,<a href="mailto:hankf@xilinx.com">hankf@xilinx.com</a>,文章转载自:<a id="link_3" href="https://forums.xilinx.com/t5/%E5%B5%8C%E5%85%A5%E5%BC%8F-%E5%B7%A5%E5%8…;
<strong>1. MicroBlaze AXI访问返回DECODE1C</strong>
在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,正常。
<strong>2. OCM映射到高地址</strong>
Zynq-7000的OCM缺省部分映射到0地址,部分映射到0xFFFF0000。如果要把OCM全部映射到高地址,需要配置OCM_CFG寄存器。MicroBlaze不能访问OCM_CFG寄存器,一定要在A9里访问OCM_CFG寄存器。
<pre>
/*
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) );
</pre>
<strong>3. 参考文章</strong>
https://www.xilinx.com/support/answers/71416.html
https://www.xilinx.com/video/soc/zynq-microblaze-iop-ocm-memory-resourc…