# PYNQ-Z1 HDMI TPG Passthrough Not Working

**URL:** <https://discuss.pynq.io/t/pynq-z1-hdmi-tpg-passthrough-not-working/8572>\
**Category:** Support\
**Created:** [June 25, 2025, 9:02am UTC](https://discuss.pynq.io/t/pynq-z1-hdmi-tpg-passthrough-not-working/8572 "2025-06-25T09:02:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ars\_M](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/ars_m/32/7042_2.png) [@ars\_M](https://discuss.pynq.io/u/ars_M)\
**Post date:** [June 25, 2025, 9:02am UTC](https://discuss.pynq.io/t/pynq-z1-hdmi-tpg-passthrough-not-working/8572/1 "2025-06-25T09:02:08Z")

</div>

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**.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/8dafcf86ef4d5eaa1e8eb1a5e20d2fb3d1854854.png)

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!
