Validation and Testing

Summary

IPBridge validation spans RTL simulation testbenches (Vivado xsim), software validation scripts, and end-to-end hardware testing. Each RTL module has a dedicated testbench with pass/fail reporting. The test_e2e.sh script orchestrates live hardware validation by capturing RTP multicast output and running protocol analysis. The Phase 1 test plan defines seven test cases covering HDMI input detection, RTP correctness, PTP synchronization, packet loss, and compression ratio.

Current State

  • All six RTL modules have dedicated testbenches with structured pass/fail checks.
  • RTP validation script (validate_rtp.py) checks 9 aspects: packet count, RTP version, payload type, SSRC consistency, MTU compliance, sequence continuity, timestamp consistency, marker bits, and inter-packet jitter.
  • End-to-end test script (test_e2e.sh) automates prerequisite checks, SDP fetch, RTP capture via GStreamer, and validation.
  • Receive pipeline script (receive_pipeline.sh) provides GStreamer-based capture and display modes.
  • Simulation runner (run_sim.tcl) supports batch-mode Vivado simulation with automatic PASS/FAIL detection.
  • Phase 1 test plan documented with 7 test cases (TC-1 through TC-7).

Key Files

Technical Details

RTL Testbench Summary

TestbenchTestsKey Checks
tb_adv7611_rx71080p/720p resolution detection, pixel data passthrough, frame_start pulse
tb_wavelet_compress10Lossy/lossless output production, compression ratio, round-trip PSNR, constant block quality
tb_rtp_packetizer20+Packet count (3000B 3 pkts), Ethernet/IPv4/UDP/RTP headers, marker bit, payload integrity, backpressure
tb_ptp_engine11Free-running ns accuracy (+/-2ns), seconds rollover, absolute set, positive/negative offset, RTP rate (90kHz), frame capture, rollover RTP continuity
tb_eth_10g_wrapper7Link status, 100-byte loopback, SOF/EOF framing, data integrity, backpressure, idle behavior
tb_ipbridge_top13Link status, full pipeline packet output, RTP header validation (EtherType, IP version, UDP protocol, RTP version/PT), streaming status, 1080p resolution detection

All testbenches use a common convention: $display("PASS") or $display("FAIL") followed by $finish. The simulation runner (run_sim.tcl) searches for these markers in the log.

Running Simulations

# Individual testbench
vivado -mode batch -source scripts/run_sim.tcl -tclargs tb_rtp_packetizer
 
# All testbenches (manual iteration)
for tb in tb_adv7611_rx tb_wavelet_compress tb_rtp_packetizer tb_ptp_engine tb_eth_10g_wrapper tb_ipbridge_top; do
    vivado -mode batch -source scripts/run_sim.tcl -tclargs $tb
done

End-to-End Testing (test_e2e.sh)

The script runs on SERVER-PC against a live IPBridge device:

  1. Prerequisites: Checks for GStreamer, Python 3, curl, network interfaces, multicast routing, device reachability (ping).
  2. SDP Fetch: Downloads SDP from http://<device>:8080/api/sdp, extracts multicast address and port.
  3. RTP Capture: Runs receive_pipeline.sh capture to capture packets via GStreamer udpsrc with GDP framing.
  4. RTP Validation: Runs validate_rtp.py on the capture file. Reports PASS/FAIL with detailed check results.

Exit code 0 = all checks passed, 1 = one or more failed.

Phase 1 Test Cases

IDNameMethodAutomated
TC-1HDMI Input DetectionWeb API queryManual
TC-2RTP Stream ProductionGStreamer captureYes (test_e2e.sh)
TC-3RTP Header Correctnessvalidate_rtp.pyYes (test_e2e.sh)
TC-4Packet Timing/Timestampvalidate_rtp.pyYes (test_e2e.sh)
TC-5PTP SynchronizationWeb API queryManual
TC-6Zero Packet Loss (60s)validate_rtp.pyYes (test_e2e.sh -d 60)
TC-7Compression RatioBitrate calculationManual

Known Limitations

  • Custom compression codec prevents decoded image quality validation with standard tools.
  • No NMOS IS-04/IS-05 for device discovery and connection management.
  • SDP is hand-crafted, not auto-generated from stream parameters.
  • Display mode in receive_pipeline.sh is a placeholder (no JPEG XS decoder available).

Sources

  • sim/tb_adv7611_rx.sv
  • sim/tb_wavelet_compress.sv
  • sim/tb_rtp_packetizer.sv
  • sim/tb_ptp_engine.sv
  • sim/tb_eth_10g_wrapper.sv
  • sim/tb_ipbridge_top.sv
  • scripts/validate_rtp.py
  • scripts/test_e2e.sh
  • scripts/receive_pipeline.sh
  • docs/phase1-test-plan.md