Hi everyone,
I’m working on implementing a HDMI passthrough design with TPG (Test Pattern Generator) on a PYNQ-Z1 board. I used Vivado to build the hardware design (including VDMA and TPG), and then loaded the .bit
and .hwh
files in Jupyter Notebook.
I executed the following Python code in Jupyter:
from pynq import Overlay
from pynq.lib.video import VideoMode
import time
=== 1. Load Overlay ===
overlay = Overlay(“/home/xilinx/jupyter_notebooks/HDMI/hdmi.bit”)
print(“Overlay loaded”)
=== 2. Get IPs ===
vdma = overlay.axi_vdma_0
tpg = overlay.v_tpg_0
=== 3. Set video mode (1080p RGB888) ===
width, height = 1920, 1080
mode = VideoMode(width, height, 24)
=== 4. Configure and start VDMA channels ===
vdma.readchannel.mode = mode # MM2S: VDMA → HDMI Out
vdma.writechannel.mode = mode # S2MM: TPG → VDMA
vdma.readchannel.start()
vdma.writechannel.start()
print(" VDMA channels started")
=== 5. Configure TPG passthrough mode ===
tpg.write(0x10, height) # Active Height
tpg.write(0x18, width) # Active Width
tpg.write(0x20, 0) # Pattern ID = 0 (solid color)
tpg.write(0x28, 0) # Overlay ID
tpg.write(0x40, 0) # Color Format = RGB
tpg.write(0x98, 1) # Enable Input = 1 (passthrough)
tpg.write(0xA0, 0) # Left Boundary
tpg.write(0xA8, width - 1) # Right Boundary
tpg.write(0xB0, 0) # Upper Boundary
tpg.write(0xB8, height - 1) # Lower Boundary
tpg.write(0x00, 0x81) # Control Register: Enable | AutoRestart
print(" TPG configured in passthrough mode")
=== 6. Tie read/write channels ===
vdma.readchannel.tie(vdma.writechannel)
print(" VDMA channels tied")
=== 7. Wait for display ===
time.sleep(0.5)
print(" The screen should now display the TPG output")
However, there’s no output shown on the HDMI display.
My Questions:
- Is my Jupyter code incorrect or missing something?
- Or could there be a problem with my Vivado block design (e.g. port connections, clock domain, VDMA config)?
- Does this HDMI passthrough approach work properly on PYNQ-Z1?
Any suggestions, corrections, or working examples would be really helpful. Thank you in advance!