Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Open-source, configurable HDMI output for FPGAs (github.com/hdl-util)
195 points by purisame on Feb 8, 2020 | hide | past | favorite | 31 comments



Your systemverilog is quite readable and well written. Good work on the library. Always a pleasure to see people using stuff I developed (used to work on Quartus)


Thanks! I was originally writing in Verilog but made the switch after coming across multidimensional packed arrays, which made the audio implementation easier.


Neat!

The other day, I was considering how fast/good(/expensive) an ADC would have to be to capture VGA at say 1600x1200 24-bit @ 70 Hz... around 160 Msps with ~10 bits of resolution on 3 channels at least (RGB; a little lower res for VSYNC and HSYNC). Octopart parametric search says it would cost ~$40 for ADCs alone in small quantities (I don't have chip sampling vendor hookups anymore.). :'( This was going to be for a DIY IP VGA KVM because I was considering how to not spend $400-2000 on an actual new/used Avocent.

VGA is really easy to generate, most FPGA dev kits have a VGA Pong clone or VGA demo... so I can see how having HDMI would be awesome to have video and audio in the 21st century.


The TVP7002 only goes to 60Hz, but it does 1600x1200, is ~$4-$10 from digikey, and here's someone who figured out how to read from it (at very low FPS, far lower than it is capable of) with a microcontroller and (as stated) very little electronics knowledge: https://www.rpg.fi/desaster/blog/vga-framegrabbing-with-tvp7...


Nice! Everything I'd seen before was DVI.

What about HDMI input? What I'm imagining is an HDMI freeze button, to buffer a single frame. Many projectors have that feature built in, but some don't, and I wish I could build it as an external hardware device.


Huh. Why is that useful? (Since some projectors have it built in I imagine there's a use case I'm missing.) Splash screen while you figure out your presentation on your mirror but without the stress of your audience watching you click around?


When projecting song lyrics at church, and the worship leader says: "let's sing the chorus again with 'we' instead of 'me'" and I suddenly have to freeze frame, edit the text, and bring it up as quickly as possible.

I'm sure there are other use cases for a freeze button, and the idea of having it as a separate device is something so obvious to me that I'm surprised it doesn't already exist.


Aha, but the general idea is still "show the current thing while I'm futzing around to make the next thing happen"?


Yep that's the gist. I've also seen some small events using the computer background as the static logo; they can prepare the next deck while freezing the logo up on he screen.


I would live HDMI input also, but for different reasons. I want to process video from HDMI streams.


You maybe interested in litevideo, used by hdmi2usb.tv. https://github.com/enjoy-digital/litevideo


Mike Field has something in VHDL for this: https://github.com/hamsternz/Artix-7-HDMI-processing



I think https://github.com/timvideos/HDMI2USB-numato-opsis-hardware can do that (it's also FPGA based)


Pixel clocks... haven’t thought about those in a looooong time. When my old 14” packard bell monitor world act up i would bust open x11config and taze it with a hilariously overdriven clock.

Probably should be illegal.


There was just a kerfuffle about the HDMI output on the Raspberry Pi being able to jam its own wifi at certain specific resolutions. The dot-clock multiplied by the line encoder landed right in 2.4GHz.


It’s kind of a marvel this doesn’t happen more frequently. The transmitter hack for rpi can jam mobile phones within a short range.


As someone who has read lots of anecdotes (but sorely little actual anecdata) about poking CRTs with out-of-range values and has thus kept well within defined limits for fear of breaking my own stuff... what did this do?


Blitz the screen a bit, nothing particularly satisfying.


This is a cool project! Is there any info available on the utilization numbers for the core? I'm curious how it stacks up against Xilinx's HDMI bloatware.


Here's the usage on my Cyclone 10:

  Info (21057): Implemented 1509 device resources after synthesis - the final resource count might be different
  Info (21058): Implemented 15 input pins
  Info (21059): Implemented 33 output pins
  Info (21060): Implemented 87 bidirectional pins
  Info (21061): Implemented 1240 logic cells
  Info (21064): Implemented 128 RAM segments
  Info (21065): Implemented 2 PLLs
I haven't been focusing on resource usage yet, but I think there's big savings potential in packet_assembler.sv since it's using around 300 cells just for parity computation.


The HDMI entity itself is using less. Here's the resource utilization report by entity from Quartus: https://gist.github.com/sameer/b04f798f3e9f574853ed55aae7b21...


Thanks for this. You should look into getting this into the fusesoc repository, if possible.

https://github.com/olofk/fusesoc


Sounds like a good idea, I'll look into it.


> Dual-licensed under Apache License 2.0 and MIT License.

How does this work? Isn't the Apache license somewhat more restrictive than the MIT license? Why bother with both?


The primary license is Apache, but the user may license under MIT for GPLv2 compatibility.

I've been writing a lot of Rust lately, and started providing both after their big relicensing push: https://github.com/diesel-rs/diesel/issues/82


Isn't the reason they use DVI that it helps avoid the HDMI licencing costs? Not the FPGA implementation, but the adopter licence fee.


From what I've read, you are supposed to become an "HDMI Adopter" to legally sell products that use HDMI. There's a flat annual fee plus a per device royalty fee. Not sure how well enforced it is, since there are over 1,000 terminated adopters: https://hdmi.org/adopter/terminated. I wouldn't be surprised if some of their products are still on Amazon and other places.

The FPGA I'm using has HDMI and was made by Arduino, but they are not an HDMI Adopter: https://store.arduino.cc/usa/mkr-vidor-4000. "Raspberry Pi Trading Ltd" is one though.

There's a parameter to make the output be DVI only if it's a concern, I'll make a note of this in the README.


I know some small projects are having a lot of trouble with this, because using only modules from fully paid-up adopter doesn't exempt you if you ship an end-user product that uses HDMI.

For example, the F18Amk2 project at https://atariage.com/forums/topic/280138-f18a-mk2/ which is implementing a TMS9918A has hit this problem.

I am inclined to agree that enforcement isn't 100%, but wanted to flag this up as it's relevant to your users. Thanks for adding the note!


Brilliant!


I really do have great appreciation for this; why the downvote?

?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: