PYNQ, Partial Reconfiguration, Part 2

1 minute read

This post illustrates what I’ve learned trying to get Partial Reconfiguration(PR) working in PYNQ system. This is a summary of the question I posted in PYNQ forum.

What I’ve found…

  • PYNQ requires .hwh file for both full bitstream and partial bitstreams. .hwh files are generated when doing generate output products in Vivado’s block diagram.
    • As I discussed in the previous post, I am forced to use Vivado block diagram to utilize PR in PYNQ.
  • In Vivado’s block diagram, I can’t set a certain IP directly as a Partition Definition as explained in this tutorial.
    • I need a hierarchical block for the IP to set it as Partition Definition like below.

vadd IP is in hierarchical block(vmodule). PR in the middle shows that it's Partition Definition

  • The problem is that as described in my previous PYNQ tutorial, we use register_map to pass input data to PL. But if you look at the generated .hwh file for vadd IP, there’s no REGISTERS field. When vadd IP is directly connected without Partition Definition, it has REGISTERS in .hwh file as shown below.

REGISTERS in .hwh file when vadd is directly connected with other IPs

  • When we do overlay = Overlay("design_1_wrapper.bit") in Jupyter Notebook, the PYNQ parser parses design_1_wrapper.hwh file and creates ip dictionary that contains all infomation on HW design. Because PYNQ is dependent on .hwh file, if it lacks info regarding registers, we can’t use register_map. You can take a look at source code to check what happens underneath.


  • The first resolution, as suggested in my question in PYNQ forum, is that we can extract REGISTERS data for vadd IP and write our own Python driver. What’s done by parser can be manually done by the user. I don’t know how Vivado generates .hwh file, but I’ve found that component.xml file(that’s generated if I export IP from Vitis IP) seems to contain related data.
  • The second resolution would be modifying .hwh file so that it properly contains REGISTERS. But this approach requires you to fully understand what .hwh file looks like.