Re:How a CPU works: Bare metal C on my RISC-V toy CPU
by codepoet on Friday January 27, 2023 @12:01AM
(#34542673)
The idea with multi-cycle memory was to create a special challenge for myself. Also I thought about using the same technique would be useful if I later on wanted to have mul / div in hardware, which would take a couple of cycles too.
[ Parent
| on HN ]
Re:How a CPU works: Bare metal C on my RISC-V toy CPU
by carry_bit on Friday January 27, 2023 @12:46AM
(#34542970)
I'm watching this video about TL-Verilog, and the part starting here shows how powerful it is for that kind of thing: https://youtu.be/hQ6HhOBHKy0?t=2048
In short, you can define generic reusable flow constructs like stall and backpressure pipelines. You can then instantiate them and slot in your logic, and signals will be automatically pulled through the different stages and pipelines as needed. The example at this part of the video shows then how adding something can be a two line change when it would be hundreds of lines if you were working at the RTL level: https://youtu.be/hQ6HhOBHKy0?t=2581