Using XSDB to access the PL from the RPU

https://china.xilinx.com/support/answers/66340.html
(Xilinx Answer 66219) covers taking the A53-0 out of reset, and interacting with the design when the XSDB target is set to A53-0. 

In order to use the R5 as an XSDB target and access the PL, the R5 and RPU AMBA need to be taken out of reset.

These instructions also show how to use XSDB to interact with TCM from both the R5 and A53.

解决方案

Execute the following commands in XSDB in order to manually initialize the RPU:

  connect
  targets -set -filter {name =~ "PSU"};
  # Informational. Not necessary just to access the PL from R5 in XSDB
  #   Set R5 reset vectors low (to TCM) and make sure CPUHALT is set to R5
  #   will not fetch upon exiting reset
  mwr 0xFF9A0100 0x00000001;  #RPU:RPU_0_CFG: [2]-VINITHI  [0]-nCPUHALT

  # Informational. Not necessary just to access the PL from R5 in XSDB
  #   Set R5 split mode
  mask_write 0xFF9A0050 0x00000008 0x00000008;   #RPU:RPU_GLBL_CNTL [3]-SLSPLIT
 
  #Take R5-0 and RPU AMBA out of reset
  mask_write 0xFF5E023C 0x00000005 0x00000000;   #CRL_APB:RST_LPD_TOP: [3]-ocm_reset, [2]-rpu_amba_reset, [1]-rpu_r51_reset, [0]-rpu_r50_reset


The following commands can be used to write to an axi_gpio that is located in PL at 0x80010000:

  #Write LEDs from R5-0 on LPD PS-PL port
  targets -set -filter {name =~ "Cortex-R5 #0"};
  mwr -force 0x80010000 0x5

The following commands can be used to write to TCM from the R5:

  #See that TCM is accessible
  # Couldn't disable ECC so write first then read
  targets -set -filter {name =~ "Cortex-R5 #0"};
  mwr 0x00000000 0xface00ff
  puts "TCM   Expect:0xFACE00FF";
  puts "R5-0  Read  :[format 0x%4.4X [mrd -value 0x00000000]]";

The following commands can be used to read TCM from the A53

  #Read TCM from A53-0
  targets -set -filter {name =~ "Cortex-A53 #0"};
  puts "A53-0 Read  :[format 0x%4.4X [mrd -value 0xffe00000]]";

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值