Xilinx / Kria-PYNQ

PYNQ support and examples for Kria SOMs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base Overlay Vivado Build

pottsm opened this issue · comments

I've re-built the Vivado build for the base overlay (with the same version of Vivado 2020.2.2) and unfortunately, when replacing the load of the base.bit with my re-built version in the mipi_to_displayport notebook, it errors out when initializing the camera saying PCam 5C cannot be initialized. It does work when the base.bit included with Kria-PYNQ is loaded instead.

I compared the hwh files generated with the build from the git repository vs the base.hwh included with repo (located in /usr/local/share/pynq-venv/lib/python3.8/site-packages/kv260) and found a number of differences, so I've come to the conclusion that the base overlay source files included with this repository does not match the files used to build the base.bit.

With that, I have a couple of follow-up questions:

  1. Have you confirmed the base overlay Vivado source files included with the repository can build a bit (and hwh) file that allows running the mipi_to_displayport.ipynb example?
  2. Could you include the Vivado source files used to build the base overlay that was used to build the base.bit included in the repository?

Hi @pottsm,

The files in the repo are the ones we use to generate the base.bit.

Can you clarify what differences you are seeing?

You are mostly likely missing the step to insert the device tree overlay associated to the MIPI camera. https://github.com/Xilinx/Kria-PYNQ/tree/main/kv260/base/dts

Mario

I've attached the diff of the hwh files from the site-packages/kv260 directory and the one from my rebuild.

I also looked into this further and found that when loading the overlay from the rebuild, I don't have all of the I2C devices that are present when loading the included base.bit, as shown in the attached pics.

It looks like the pcam driver uses I2C device 6, hard coded, which is not present in the re-built bit file. I wasn't able to find the pCAM device, using i2cdetect, on the 2 I2C buses present after loading the re-built bit file.

base_diff.txt
base_i2c
base_compare

The I2C device for the MIPI camera is not part of the device tree of the KV260. This is the why the initialization fails. For this reason, you need to insert the device tree overlay after compiling it from this folder https://github.com/Xilinx/Kria-PYNQ/tree/main/kv260/base/dts

If you search next to the base.bit on the board you will find the base.dtbo. If the base name is the same as the bitstream, PYNQ will insert the dtbo automatically.

I generated the dtbo and put in the same directory as my regenerated bit and hwh files and it resolve my issue! Thank you.