This tutorial explains procedure to measure transition times and respected power values when either PS or PL suspends or wake up. By following below procedure, suspend and wake up time of APU, These procedures are for 2017.1 and later releases. There are some differences for later releases which are indicated when appropriate.
...
Workspace for RPU baremetal: sdk_ws.zip
Vitis workspace for RPU application for v2020.1: vitis-ws-20.1.zip
Petalinux 2020.1 generated images (including rpu_0.elf, boot.bif and BOOT.BIN): linux_images_2020.1.tar.gz
Petalinux 2019.1 generated images (including rpu_0.elf, boot.bif and BOOT.BIN): linux_images_2019.1.tar.gz
Petalinux 2018.3 generated images (including rpu_0.elf, boot.bif and BOOT.BIN): linux_images_2018.3.tar.gz
Petalinux 2018.2 generated images (including rpu_0.elf, boot.bif and BOOT.BIN): linux_images_2018.2.tar.gz
...
Start with an empty RPU application (like the Hello World example here).
Configure the RPU to run from TCM in split mode. (Refer ZU+ Example - PM Hello World#RPU to run from TCM)
Replace the main.c with this file (rpu.c (for 2017.x-2019.1), rpu-2019.2.c (for 2019.2-later))
Build application elf.
...
Create RPU_0 application rpu_0.elf from SDK as described in above section.
Create a new folder and copy pmufw.elf, zynqmp_fsbl.elf, bl31.elf and u-boot.elf from petalinux generated images (present at <plnx-proj-root>/images/linux/). Also copy rpu_0.elf into same folder.
Create boot.bif file in same folder as shown below.
for 2017.x-2019.2
Code Block the_ROM_image: { [fsbl_config] a53_x64 [pmufw_image] pmufw.elf [bootloader,destination_cpu=a53-0] zynqmp_fsbl.elf [bootloader,destination_cpu=r5-0] rpu_0.elf [destination_cpu=a53-0, exception_level=el-3,trustzone] bl31.elf [destination_cpu=a53-0, exception_level=el-2] u-boot.elf }
For 2020.1-later
Code Block the_ROM_image: { [bootloader, destination_cpu=a53-0] fsbl.elf [pmufw_image] pmufw.elf [destination_cpu=r5-0] rpu.elf [destination_cpu=a53-0,exception_level=el-3,trustzone] bl31.elf [destination_cpu=a53-0, load=0x00100000] system.dtb [destination_cpu=a53-0,exception_level=el-2] u-boot.elf }
Create BOOT.BIN file using following command.
Code Block bootgen -arch zynqmp -image boot.bif -w -o BOOT.BIN
Create a boot partition in SD card and copy BOOT.BIN and image.ub file (present at <plnx-proj-root>/images/linux/) to boot partition.
Boot the ZCU102 board in SD boot mode.
Once boot start U-boot prompt will appear on serial. Press Enter again and again to interrupt u-boot till ZynqMP prompt appear. Run below command from u-boot to disable cpuidle.
Code Block ZynqMP > setenv bootargs ${bootargs} cpuidle.off=1
After that start the linux by writing "boot" on the U-boot prompt
...
Start with an empty RPU application (like the Hello World example here).
Configure the RPU to run from TCM in split mode. (Refer ZU+ Example - PM Hello World#RPU to run from TCM)
Replace the main.c with this file (rpu_0_target.c)
Build rpu_0 application elf.
...
Create rpu_0.elf and apu.elf from SDK as described in above section.
Create a new folder and copy pmufw.elf and zynqmp_fsbl.elf from petalinux generated images (present at <plnx-proj-root>/images/linux/). Also copy rpu_0.elf and apu.elf into same folder.
Create boot.bif file in same folder as shown below.
Code Block the_ROM_image: { [fsbl_config] a53_x64 [pmufw_image] pmufw.elf [bootloader,destination_cpu=a53-0] zynqmp_fsbl.elf [destination_cpu=r5-0] rpu_0.elf [destination_cpu=a53-0] apu.elf }
Create BOOT.BIN file using following command.
Code Block bootgen -arch zynqmp -image boot.bif -w -o BOOT.BIN
Create a boot partition in SD card and copy BOOT.BIN to boot partition.
Boot the ZCU102 board in SD boot mode and observe the output on uart console.
APU suspends and resumes RPU and measures its transition time.
...