Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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, user can see/measure the suspend/wake-up time and power. These procedures are for 2020.2 and later releases.

...

  • Open Vitis and start with empty application as shown below

  • Select “create a new hardware platform“ and select petalinux prebuilt XSA file as shown below (uncheck generate boot components option in case of ZynqMP)

    Image RemovedImage Added
  • Select target processor as "psu_cortexr5_0" and give the application name (ex. rpu_app)

  • Click next and leave all options unchanged

    Image RemovedImage Added
  • Click next and select "Empty Application" from the template list

  • Click finish which will show the project window as shown below

  • Now click on "Navigate to BSP" settings and click "Modify BSP settings"

  • Now select the "xilpm" library option as shown below.

    Image RemovedImage Added
  • Select psu_cortexr5_0 and add “-DDEBUG_MODE“ in extra_compiler_flags as shown below and click ok.

    Image RemovedImage Added
  • Right click on "rpu_app" from explorer and select "import sources" option

  • Download rpu_src.tar and extract it to local folder

  • Select the source and target path as shown below and click ok

  • Right click on "rpu_app" from explorer and select "build project"

...

  • Copy apu_script.sh file from /usr/bin/ and run the script as shown below

    Code Block
    root@xilinx-zcu102-2020_2:~# cp /usr/bin/apu_script.sh .
    root@xilinx-zcu102-2020_2:~# ./apu_script.sh

    Note: User can open the script and edit the below parameters as per his convenient before running script
    DelayVal : Amount of delay between 2 power modes (should be between 10 to 255 seconds)
    IterationCnt: Total looping count to measure different APU power states latency (should be between 0 to 5

  • Triggering the script starts the demo and it will switch the transition from one state to next dimer state after specific amount of time (default 30 seconds)

  • User can measure the power readings using power advantage tool between intervals

  • Latency measurement values is shown as per below window

    Code Block
    Request Suspend Latency of Linux in micro seconds: Min: 225031, Max: 225031, Avg: 225031
    FPD OFF Latency in micro seconds: Min: 2799, Max: 2799, Avg: 2799
    FPD ON Latency in micro seconds: Min: 123980, Max: 123980, Avg: 123980
    Wakeup Latency of APU0 in micro seconds: Min: 4204, Max: 4204, Avg: 4204
    Wakeup Latency of Linux in micro seconds: Min: 2442820, Max: 2442820, Avg: 2442820
    Latency Measurement Done
  • Once system reaches to lowest power state, it will starts reverting back to original (normal) power state as shown below

    Code Block
    ******************* RPU Suspended, APU suspended with FPD OFF *******************
    (1 seconds delay)
    XPm_ReleaseNode(21, 0, 0, 0, 0, 0)
    XPm_ClientSuspendFinalize: Disabling RPU L▒RPU0: Running in Split mode
    XPm_RequestNode(21, 1, 0, 2, 0, 0)
    RESUMED
    RtcIrqHandler RTC interrupt received
    Alarm generated.
    *********************** RPU ON, APU suspended with FPD OFF **********************
    XPm_RequestNode(1C, 1, 0, 2, 0, 0)
    XPm_NotifyCb (10, 1, 1)
    *********************** RPU ON, APU suspended with FPD ON ***********************
  • At the end, it will show below completion message (Full log is attached to pre-built images section)

    Code Block
    *********************** APU, RPU full load, PL is OFF **********************
    Delay 30 seconds
    
    Latency to Power ON PL domain
    Powering up PL
    XPm_RequestNode(45, 1, 0, 2, 0, 0)
    *********************** APU, RPU and PL in high power ***************************
    Delay 30 seconds
    
    PL ON Latency in micro seconds: 58751
    Demo application is completed successfully!
  • User can re-trigger the apu_script.sh to re-run the demo again.

Related Links