12 ms·
Exploring FPGA Graphics
- kramerger 4y agoAround 10-12 years ago someone with industry experience started a project to create a modern open source GPU from scratch. I believe he even had an sponsor for first round of ASIC production, but was targeting FPGA for the first demos. What happened to that guy?
- anfractuosity 4y agoIs https://hackaday.com/2013/10/11/an-open-source-gpu/ https://hackaday.com/2013/10/11/an-open-source-gpu/ what you mean out of interest, there's a link to a kickstarter, which links to - https://github.com/asicguy/gplgpu https://github.com/asicguy/gplgpu
- kramerger 4y agoYeah, probably the same guy. Any idea how far he got with this?
- boltzmann-brain 4y agoThe code base has 10 commits. Looks like whoever sponsored him got scammed.
- royjacobs 4y agoNot the same guy, but if you're interested in the subject https://github.com/xenowing/xenowing https://github.com/xenowing/xenowing is also worth a look.
- bigfatfrock 4y agoThis is so cool - great work on the writing, teaching, and general clarity. I hope I can find time to play with it. As a pure software guy I'm just mystified and awed by FPGAs and the possibilities of the design.
- ConanRus 4y ago
- WillFlux 4y agoHello, I'm the author of the Project F blog. I've almost finished a complete overhaul of this series: animation and double-buffering are coming in October. I'd be happy to field any questions you have.
- anfractuosity 4y agoNice work :) I think implementing a VGA controller controller seems a lot nicer in Verilog/VHDL than on an MCU. The Ti chip you're using for DVI looks interesting too, not heard of that before. It looks like you're going to use the FPGAs BRAM for double buffering? I started implementing double buffering for led strips in VHDL, but need to get back to finishing the SPI controller for it.
- WillFlux 4y agoThanks :) The TI TFP410 chip is on the 1BitSquared DVI Pmod board: https://docs.icebreaker-fpga.org/hardware/pmod/dvi/ https://docs.icebreaker-fpga.org/hardware/pmod/dvi/ I've also got designs that generate DVI on the FPGA with TMDS encoding (no external IC required). I've never polished or written them up, but you can see an example here: * https://github.com/projf/projf-explore/blob/main/graphics/fpga-graphics/xc7-hd/top_square.sv https://github.com/projf/projf-explore/blob/main/graphics/fp... * https://github.com/projf/projf-explore/blob/main/lib/display/tmds_encoder_dvi.sv https://github.com/projf/projf-explore/blob/main/lib/display... I'm using BRAM for framebuffers as it allows me to focus on the graphics rather than memory controllers and access. BRAM gives you dual ports and true random I/O; DRAM is much more complex.
- nspattak 4y agoJust here to say thanks for this, it looks awesome and is well in my reading list :)
- kleiba 4y agoNice! How about a chapter on ray-tracing?
- 4y ago
- amelius 4y agoWhy are we still generating video signals as if there is a CRT on the other end? E.g. we could save power by only sending parts of the display image that change.
- Sophistifunk 4y agoBecause those systems are orders of magnitude simpler, without all the copy-protection and control-plane "features" in modern display systems.
- ChuckNorris89 4y agoHave you writing an spec compatibile HDMI/DP controller in HDL? It's insanely complex. VGA is a walk in the park that's sane and easy to understand for beginners. You just need to modulate the 3 primary colors between 0-255 for 8 bit color, and two clock signals, and the monitor will display a picture. VGA is also very simple to debug since as long as there's some signal on the color and clock lines, the monitor will display something allowing you visually see what's wrong, while on digital, if some part of the handshake failed, you get no picture on the monitor so there's no way to figure out what's wrong without specialized knowledge and equipment. A CRT is basically it's own oscilloscope of the signals on the VGA cable making development a joy.
- garaetjjte 4y agoDVI is almost literally digitized VGA, with analog signals replaced by differential signalling and symbol encoding to keep it DC-balanced. HDMI extends it by encoding audio and extra metadata (eg. used colorspace) inside blanking intervals (yes, they still use blanking intervals that were originally required for CRT displays). It doesn't do any handshake. Main difficulty is just high clocks required, and necessity to dynamically pick symbols (unless you only use few preselected DC-balanced values). DisplayPort and HDMI 2.1 are different, with packet-based transmission.
- tverbeure 4y ago> It doesn't do any handshake. HDMI 2.0 requires bidirectional communication between source and sink through SCDC registers to set parameters such as scramble_enable, clock ratio, and to read status flags such as clock detection, channel lock status, bit error rates etc.
- WillFlux 4y agoEven if you don’t have an FPGA, you can run these hardware designs on your PC with SDL and Verilator. It’s really simple to set up: https://projectf.io/posts/verilog-sim-verilator-sdl/ https://projectf.io/posts/verilog-sim-verilator-sdl/
- deleted 4y ago[deleted]
- nomel 4y agoThe big disadvantage of not having a real FPGA is that you won't be concious of the very real LUT/gate limits. A simulation will happily allow you to apply all sorts of nice compartmentalizations and abstractions, without making your understand that they will cost significant money if you tried to find an FPGA to fit them into. This was my biggest shock when first working with FPGAs, while naively using a software mentality. Most everything had to be re-written once the simulations were done.
- benrow 4y agoI'm just getting started on my hardware journey by working through the nand2tetris course. This has its own simplified hardware description language which works in the simulator they provide. Looking through the linked site, it's nice to see that the verilog snippets are very similar to the simplified HDL in nand2tetris - almost identical in how pins and parts are composed. I'm looking forward to getting hold of an ice40 board as mentioned (with the SRAM). There's a project out there which implements nand2tetris on ice40, and these seem available at the moment for a reasonable price. So now with this VGA project, that's two reasons to order that nice ice40 board :-)
- drivers99 4y agoI’ve done nand2tetris a couple times (taking good notes the second time) and coincidentally played through nandgame.com for the first time this weekend. I’ve been trying out what people have done with bare metal Forth on a raspberry pi using a frame buffer and using C libraries to get input from a USB keyboard. I don’t really like having such dependencies so I was just thinking I should get out my Arty FPGA with the same VGA module he uses and just make my own computer instead. It’s hard to find stuff that works how I want and is in stock and is actually understandable. This is definitely going to be my next project. It even uses Arty and the VGA module for it which I already happen to have (it only has a few bits for R, G, and B color though so it’s not perfect for images and gradients). There was example code[1] to use with it and it generates an image but I wasn’t sure how to make a frame buffer for it which this tutorial has! I recently reviewed graphics rendering techniques (Computer Graphics from Scratch from No Starch Press) so that fits too. This’ll be fun! [1] https://digilent.com/reference/learn/programmable-logic/tutorials/arty-pmod-vga-demo/start https://digilent.com/reference/learn/programmable-logic/tuto... (They have a different board with HDMI in and out and a framebuffer example to go with it: https://digilent.com/reference/learn/programmable-logic/tutorials/arty-z7-hdmi-demo/start https://digilent.com/reference/learn/programmable-logic/tuto... Also I just ran across someone who did HDMI output directly from the pins of yet another variety of Arty board https://domipheus.com/blog/hdmi-over-pmod-using-the-arty-spartan-7-fpga-board/ https://domipheus.com/blog/hdmi-over-pmod-using-the-arty-spa... On second thought, I’d rather stick with understandable VGA and hooking up a keyboard in a matrix… could use some other microcontroller and interface between the two with fewer pins, just not USB. Or PS/2 keyboard… Ben Eater has a tutorial as always)
- hoytech 4y agoThis is also a really fun resource, especially the Verilog book and the in-browser IDE: https://8bitworkshop.com/ https://8bitworkshop.com/