timvideos / HDMI2USB-litex-firmware

A version of the HDMI2USB firmware based around LiteX tools produced by @Enjoy-Digital (based on misoc+migen created by @M-Labs)
https://hdmi2usb.tv
BSD 2-Clause "Simplified" License
145 stars 71 forks source link

In built loopback test #432

Open CarlFK opened 6 years ago

CarlFK commented 6 years ago

The board should be able to test itself if an input is hooked to an output. hdmi cable from output0 to input0

H2U 00:26:36>o0 on
Enabling output0
H2U 00:26:42>i0 on
Enabling input0
H2U 00:26:44>x c p 0
Connecting pattern to output0
H2U 00:26:55>test loopback o0 01
test passed.

It can test edid and picture data and maybe more.

mithro commented 6 years ago

This should be pretty easy to do in the softcpu firmware already.

The steps would be;

  1. Add a method for calculating a checksum / CRC across a region of memory.
  2. Add a method for writing the next input frame to a different region of memory.
  3. Calculate checksum / CRC over both regions and compare.

I believe that @cr1901 has already added some checksum / CRC code to the firmware so step (1) might already be done.