Hacker News new | ask | show | jobs
by codezero 1656 days ago
Slightly off topic, but I'm looking forward to FPGA tooling improving to the point where I can build a fantasy personal computer based on dragging and dropping architectural components into a design that compiles to hardware.

I'm definitely too lazy to design from scratch or build by hand, and there's already so much out there designed for FPGAs, so just hoping one day it may be plug and play like the Mister is for entire systems.

6 comments

Quite possibly I misunderstand on what level you mean that, but I think the devil is in the details, and "drag and drop your computer architecture" seems as unrealistic in practice as "drag and drop your application" turned out to be.

Unless you mean "architectural components" at such a high level that you don't mean to define (say) a CPU architecture, but basically just adding "device" soft cores to a common bus (or multiple) and configure their parameters, and where they are mapped in the address space and so on. In which case, that pretty much exists already today!

Quirks aside, you can totally drag, say, soft cores for a CPU, a few 16550A serial ports, video output devices, ethernet controllers, USB controllers--whatever you can think of essentially--into a Vivado block design, attach them to an AXI bus (whose structure you can also define graphically with many bus components to chose from), configure the memory map (or accept the defaults), and have "a computer".

Depending on the nature of your computer it might not even be much work to then get it to boot into Linux through U-Boot, with a device tree generated by the toolkit.

But I can imagine a simpler, "dumbed down" (in a useful way) more dedicated piece of software where this could be possible without knowing much of anything about FPGAs, yeah.

I don’t have anything particular in mind, just excited about hard stuff getting easier and seeing a lot of different hardware components as essentially input/output devices. With the right duct tape, they may be stuck together by someone more clever than I. Totally on the I can imagine side here :)
I used such a program, I think from Altair, in 2000 to design and simulate an 8-bit CPU not all dissimilar from the one in the article as part of an undergrad computer architecture course. It was all drag & drop from a logic gate level. You could build your own components out of gates (or include others). IIRC, we had a module for registers supplied to us, for example.

It was pretty slick. It included a simulator as well. I imagine it probably used verilog or vhdl under the hood (but I wouldn't learn Verilog proper until 3 years after). I think there was functionality to work with an FPGA, but we didn't use it for the class.

It was definitely the sort of project that really got me excited in college and I knew for sure I was on the right track with what I wanted to study.

That's sort of (if you squint a great deal) what you get with Chisel and RISC-V Rocket Chip. It's not drag and drop but you can customize the design to a certain extent just by editing some parameters in a file. It only applies to the cores and close components like the cache and off-chip links. There isn't a good integrated range of open source peripherals.

Old presentation about this: https://riscv.org/wp-content/uploads/2015/01/riscv-rocket-ch... especially slide 6

This would be wonderful - I hacked on a CPU architecture and brought it to an FPGA by manually converting a Logisim [1] schematic to VHDL. It's still terribly buggy.

Maybe it'd be possible to write an integration for the (unmaintained) Logisim to export the schematic to a HDL of some sort to get close.

[1] http://www.cburch.com/logisim/

> Maybe it'd be possible to write an integration for the (unmaintained) Logisim to export the schematic to a HDL of some sort to get close.

No need, Digital (https://github.com/hneemann/Digital) already does this:

> A circuit can be exported to VHDL or Verilog. There is also direct support for the BASYS3 Board and the TinyFPGA BX board. See the documentation for details. The examples folder contains a variant of the example CPU, which runs on a BASYS3 board.

It's not a GUI, but Clash's ideals (aka Haskell's) are exactly what you're looking for. Small, composable components.
that sounds like Quartus Block Design, I used it to program a simple 'dynamic ROM' onto a CPLD once: https://youtu.be/rw7xYkM1-HY?t=219