I'm a pretty strong programmer, but I'm very new to hardware design, so apologies if I use strange terminology.
My long-term goal is to write a custom GPU, but I'm starting out with a basic framebuffer to get comfortable with hardware design. Here's a rundown of what I'm expecting to do with my project:
- Receive a frame of pixel data on a bus
- Store frame in a stack on the hardware
- Output frames at the monitor refresh rate
I can figure out #1 and #2, but I've never done anything like #3. I'm thinking the optimal development setup would be to have a virtual display that connects to the output pins of my design (VGA or DVI) and displays it in a window on my computer. I could probably do this with an FPGA and a small LCD, but I'm thinking it will be easier for development (esp. travelling) to have it all simulated.
Is there already a solution for this? If so, what can I search for to get more information about it? If not, what is the usual development setup for something like this?
I'm developing on Linux using Icarus Verilog, so a solution that works with that would be preferred.
Best Answer
An alternative would be to use PLI/VPI to call out to some C code - so rather than doing the top level pin driving, call a system task that stores the pixel in a software frame buffer and renders that to a window.
I've used the same technique for a UART recently - instantiated another uart with the TX + RX crossed over, and when the one in the testbench receives data - feed it to some C code with a system task that writes to a PTY (and vice-versa).
Given that the simulation probably won't run that fast, writing image files or binary data then post-processing might make it more useful.