I need to read up a lot on HDMI, USB Video Class and ECP5 SERDES. I think I'll be writing the code in nMigen, because why not.
Pixel formats. Haven't really poked at anything other than RGB565, RGB888 and RGBA8888 (premultiplied and not).. But the various YUV variants give me a headache. Reading list:
- https://docs.microsoft.com/en-us/windows/desktop/medfound/recommended-8-bit-yuv-formats-for-video-rendering#422-formats-16-bits-per-pixel
- https://www.cs.auckland.ac.nz/courses/compsci773s1c/lectures/YuY2.htm
USB Video Class 1.1 (since that's what FT602 supports):
- http://www.cajunbot.com/wiki/images/8/88/USB_Video_Payload_Uncompressed_1.1.pdf
- https://usb.org/sites/default/files/DWG_Smart-Card_USB-ICC_ICCD_rev10.pdf
FT602 resources:
- https://www.ftdichip.com/Products/ICs/FT602.html
- https://www.ftdichip.com/Support/Documents/AppNotes/AN_434_FT602_UVC_Bus_Master_Sample.pdf
- https://www.ftdichip.com/Support/SoftwareExamples/FT602.htm
- https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT602Q%20IC%20Datasheet.pdf
Existing gateware for inspiration:
- Artrix-7-HDMI-processing https://github.com/hamsternz/Artix-7-HDMI-processing
- HDMI2USB https://github.com/timvideos/HDMI2USB-litex-firmware
- netv2 https://github.com/AlphamaxMedia/netv2-fpga
Thoughts related to USB:
- Can it be truly driver-less and work on win/mac/linux?
- Or will we always need the FT602 driver?
- Can we do lossless compression?
- Which color format to choose? YVY2?
- FT602 has an I2C master @ 800KHz, perfect for debugging. No GPIOs though, which makes reset harder.
Things related to the devboard rev1:
- Do all HDMI pins need to be connected to the same bank?
- Do we want/need ESD protection on the HDMI pins like HDMI2USB has?
- Are there any clock inputs that need to be routed to a clock pin?
- What base clock / oscillator to use?
- Need to generate 100MHz to the FT602
- Need to make the SERDES stuff happy. No idea how that works
- Need to connect all the SERDES stuff correctly. Look at other boards that have done this already. TinyFPGA?
- Check voltage needs related to SERDES.
- Power-on-reset - since there are no GPIOs maybe we need to think about this?
- USB-C female, USB-B 3.0 female or USB-B micro 3.0 wide?
PCB routing questions:
- Do the HDMI diff pairs have the same length? The two traces per pair should obviously have same length.
- Anything SEDRES specific?
ECP5-related:
- Will need to use SERDES to deserialize the HDMI signals
- https://www.latticesemi.com/Products/FPGAandCPLD/ECP5
- ECP5 and ECP5-5G SERDES/PCS Usage Guide
- 1080p60 rgb will have a higher pixel clock than the FT601/2 can handle. Will need line buffer.
USB-C
PI5USB30213A