Show HN: H2 Forth CPU
github.com
github.com
This project is a CPU written in VHDL that executes Forth. It's based on the J1 processor, but with a few new instructions and interrupt handling.
Also included in the project is a VT-100 terminal emulator (emulator is not quite the right word here) written in VHDL, which some of you may find useful. It supports a fairly large subset of the ANSI escape sequence commands.
I originally wrote a smaller compiler for a Forth like language in C, but I've since rewritten the tool chain so the eForth image running on the target is built with a more traditional meta-compiler.
Here's a video https://howerj.github.io/h2/107.mp4 of the project running (I've since added color support to the VT-100).
If you type 'make gui-run' it should build and run the graphical emulator for the device. (or just 'make run' for the command line simulator).
You can play a little game by typing:
1B 20 thru
you-are-dead
:)If that's so, I'd love to translate a couple popular open source fonts. Terminus is my usual default console favorite (mostly because the bitmap x3270 font is not in a friendly format).
Yes. I really do hate the VGA font that much. ;-)
The VGA module on which the VT-100 is built around used that font (I am not sure of its name - I guess "MDA/VGA font" would do). That VGA module came from here: http://www.javiervalcarce.eu/html/vhdl-vga80x40-en.html.
The project actually uses Terminus by default now. That video of the system up and running is quite old, I should make a new one. You can switch between Terminus (8x12, KOI8-R) and VGA Font (Latin-0). There's space for two more fonts in the Block RAM - if you wanted to make a new you're welcome to!
The fonts are in 'https://github.com/howerj/forth-cpu/tree/master/fonts'.
https://news.ycombinator.com/item?id=8860786
Any plans on making a radiation hardened version like the RTX2010? (Some of those are orbiting Mercury and Saturn and landed on Eros!) ;)
http://www.cpushack.com/2013/02/21/charles-moore-forth-stack...
I love the idea of a VHDL VT100 "emulator"!
How hard would it be to make a luxurious Ann Arbor Ambassador?
That link redirects you to an interesting image if you access it from Hacker News! From the manual for that terminal, it seems to support some of the standard ANSI escape sequences, but there would be a lot more work to make it 100% compatible.
I loved those things: 80x60, "square" fonts, long-persistence phosphors, 19,200 baud capable...
I think the main piece of advice is persistence. Doing anything on an FPGA is much harder than doing it on CPU, but as a consequence of that the designs tend to be a lot less complex. It is not only a new language to learn, but it's a new paradigm. VHDL and Verilog might look like programming languages at first glance, but they are not. They are hardware description languages.
Also the vendor supplied tooling sucks.
For the more practical side of things, you can get a cheap development board for less than $50 that will run an open source tool-chain (see http://www.clifford.at/icestorm/), although I do not use them myself. You will want to do your research first.
One final piece of advice.
Do not ignore any warnings about latches.
SystemVerilog added these kind of features much later.
That said: there are a bunch of constructs where Verilog really shines, especially when it comes to bit twiddling.
When you care about open source tool flows, it's no contest: Verilog is far ahead on that front. That's currently the deciding factor for me.
It's not meant for high performance - but it is tiny! The program is limited to 16KiB in size, of which 6708 bytes are used by the eForth interpreter that is running on it. It's a very niche thing.