Mesure power consumption on pynq-z2 during DPR

Hello everyone,

We are in last year of engineering school and we are doing a project on pynq-z2 board. In our project we are trying to know if the dynamic reconfiguration allow to save power. In fact, if DPR allows to reduce the scale of the board, it also needs more memory ressources. The memory acces during reconfiguration costs power and we want to know if those are negligible.
We were trying to find a way to mesure the consumption of some components of the board so we first looked to the Vivado’s tools to mesure consumption.
However, it just allows us to mesure the static consumption of the board and can’t mesure the consumption of memory accesses for the reconfiguration.
After we searched on the SCHEMATIC datasheet, we identified different IP that will be interesting to mesure.
The problem is that on the board we can’t identified the differents pins to mesure. Also we didn’t find any datasheet that relate the pins of the IP to the pins on the board. We wanted to know if such datasheet does exist and how would you measure the different consumptions ?

1 Like

You can get a USB power monitor which will give you to the total USB power to the board, or similar for wall power if you are using the power adaptor. E.g. USB Power monitor on Amazon

What “IP” do you want to measure? Do you mean SD card access and DRAM?
I don’t think it will be practical to do this on the Z1.

I think the bitstream should download in a few hundred milliseconds, and less for a partial bitstream (you can check this). Whether this is negligible for you depends on what the rest of the design does and how quickly you intend to switch functions.

Cathal

tanks for your answer,

We thought about using this USB power monitor, but we want to measure the consumption of precise IP.
In fact, we want to measure consumption of the memory access during dpr so we want to have access to the memory consumption. Also, we want to know the consumption of the PS and PL.
We realize that the Z2 is not the right board to measure consumption. Knowing that, we are going to change the board for a ZCU102. We are going to use the PMBUS implemented on this board. However, in order to use this PMBUS we found that we need to create an image for the board. We found different tutorial that explains that we need to download Vitis and Petalinux on a Virtual Machine to generate the image. We want to know if this is the right way to generate the image?

Yes, you would need to generate your own image setting up a Virtual Machine with the Xilinx tools is the recommended way to do this.
Just to let you know, I’m not sure you will be able to make the measurement you are describing at the granularity you need. My guess would be that the power consumption for the memory access during DPR is negligible. Did you try estimate what you think the energy consumption will be?
If you do this work and get measurements it would be interesting to see the results you get.

Cathal

Hello,
No, we didn’t try to estimate it.

We are facing some issues to generate the ZCU102 image.

We set up a Ubuntu 18.04.4 VM with Vitis 2020.2 and Petalinux 2020.2. We set up our environment like it is said PYNQ SD Card image — Python productivity for Zynq (Pynq). We were able to make an image for the Pynq-Z1 to check if everything was setup.

However, we don’t really understand how to create the image for the ZCU102. We tried to use to command make PREBUILT = … BOARDDIR = … but we have the following error :

ptech@ptech-VirtualBox:~/Bureau/Pynq/sdbuild$ make PREBUILT=/home/ptech/Bureau/aarch64.2.7.0_2021_11_17.img BOARDDIR=/home/ptech/Bureau/Board
/opt/qemu/bin/qemu-aarch64-static -version | fgrep 5.2.0
qemu-aarch64 version 5.2.0
vivado -version | fgrep 2020.2
Vivado v2020.2 (64-bit)
vitis -version | fgrep 2020.2
****** Vitis v2020.2 (64-bit)
which petalinux-config
/home/ptech/Petalinux/tools/common/petalinux/bin/petalinux-config
which arm-linux-gnueabihf-gcc
/home/ptech/Xilinx/Vitis/2020.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
which microblaze-xilinx-elf-gcc
/home/ptech/Petalinux/tools/xsct/gnu/microblaze/lin/bin/microblaze-xilinx-elf-gcc
which ct-ng
/opt/crosstool-ng/bin/ct-ng
bash /home/ptech/Bureau/Pynq/sdbuild/scripts/check_env.sh
Checking system for required packages:
bc gperf bison flex texi2html texinfo help2man gawk libtool libtool-bin build-essential automake libglib2.0-dev device-tree-compiler qemu-user-static binfmt-support multistrap git lib32z1 libbz2-1.0 lib32stdc++6 libssl-dev kpartx zerofree u-boot-tools rpm2cpio libsdl1.2-dev rsync python3-pip gcc-multilib libidn11 curl libncurses5-dev lib32ncurses5
[sudo] Mot de passe de ptech :
BSP= BSP_BUILD=/home/ptech/Bureau/Pynq/sdbuild/build/ZCU102/petalinux_bsp BSP_ABS= BSP_PROJECT=xilinx-zcu102-2020.2 /home/ptech/Bureau/Pynq/sdbuild/scripts/create_bsp.sh /home/ptech/Bureau/Board/ZCU102 zynqMP

  • set -e
  • board=/home/ptech/Bureau/Board/ZCU102
  • template=zynqMP
  • ‘[’ -n ‘’ ‘]’
  • cp -rf ‘/home/ptech/Bureau/Board/ZCU102/petalinux_bsp/’ /home/ptech/Bureau/Pynq/sdbuild/build/ZCU102/petalinux_bsp
    cp: impossible d’évaluer '/home/ptech/Bureau/Board/ZCU102/petalinux_bsp/
    ’: Aucun fichier ou dossier de ce type
    Makefile:343: recipe for target ‘/home/ptech/Bureau/Pynq/sdbuild/build/ZCU102/petalinux_bsp/xilinx-zcu102-2020.2.bsp’ failed
    make: *** [/home/ptech/Bureau/Pynq/sdbuild/build/ZCU102/petalinux_bsp/xilinx-zcu102-2020.2.bsp] Error 1

In our ZCU102, we only have a ZCU102.spec file.

ARCH_ZCU102 := aarch64
BSP_ZCU102 :=
STAGE4_PACKAGES_ZCU102 := pynq ethernet sensorconf boot_leds pynq_peripherals

Do we need more files in this folder ? How can we generate these files ?

Hello,
I checked the Z2 schematics.
What about using the J9 jumper which is intended to select from USB and Jack DC ?
You could put a short wire jumper, and use an oscilloscope with a current probe, that way you would have the exact power profile during the whole reconfiguration.

Z2 has less active components than ZCU102, and J9 is a nice way to tap exactly into the power consumption of the Zynq.

Also, you could de-solder the inductors L13 to L16 and solder a beautiful aerial circuit by adding a shunt resistor in series to this inductor to measure each channels.

Mikaël

1 Like