README.md
Steps to disentanglement
I’m no longer able to use Amaranth — I don’t feel able to depend on something I’m not allowed to contribute to — so I need a way to continue on with my FPGA studies without it. I don’t really view just trying to cobble together Verilog as viable for me right now; I’m rather dependent on having a decent higher-level thing going, and I already feel all the wind sucked out of my sails from having to make any change whatsoever.
I’ve experimented with doing my own HDL using what I learned from working with and on Amaranth (and Yosys, which I’ll happily continue to depend on), but it’s way too much work. After surveying the scene, I’ve chosen Chisel. Scala is not exactly my favourite, and this means really learning it properly, but y’know what? That’s how I felt about Python too, but I still did some cursed stuff with it!
I plan to bootstrap my way out of this hole by creating a small component in Amaranth, workbench it using CXXRTL, then duplicating that component in Chisel, using the same CXXRTL workbench to test it. This way I’m staying connected to “doing useful/measurable stuff” in a way I know. I’m also furthering my own HDL experiments while I go, letting Amaranth and Chisel combine in my head.
Done so far:
- Bring
hdx,rainhdx, and all their dependencies — including Amaranth — up to date.- New
abcrevision. - Amaranth depends on a newer
pdm-backend, which I needed to package since it’s not in nixpkgs. - Had to unbreak rainhdx’s Nix, that last refactor was bad.
- New
- Add basic cxxsim support to
rainhdx. This was mostly pulled from I²C, oh! Big stretch, which I maintain is impeccably named.- There was also the option to pull the Zig–CXXRTL support from sh1107, but the extra toolchain weight doesn’t feel like it helps me move any faster here.
- A basic UART echo, tested with Amaranth’s simulator.
- A clone of the Python simulator with CXXRTL.
- Learn to do a very basic Chisel module with tests and Verilog output.
- Build the Chisel module with CXXRTL and integrate it into the simulator — it’ll be very wrong, but the key is the integration.
- Write a little unbuffered UART pair, test them, integrate. Done.
- Extend the test case to exercise the Amaranth version’s buffers on TX/RX.
WIP/todo:
- Write a FIFO in Chisel and buffer the TX/RX.
- Redo the testbench to have the test unit as a blackboxed instance, rather than it driving everything through lines from the top. Amaranth, then Chisel.