4 ms·
One of the most interesting aspects of the VexRiscv is the way it's implemented. The VexRiscv is written with SpinalHDL, a hardware description library in Scala
by tverbeure 6y ago
One of the most interesting aspects of the VexRiscv is the way it's implemented. The VexRiscv is written with SpinalHDL, a hardware description library in Scala. But that's not the main thing: in additional to Verilog and VHDL, there are other ways to write RTL, from Python to Scala to Haskell.
What's really special is that the VexRiscv is constructed from a large number of plugins that split up the design 'horizontally' per feature instead the traditional 'vertical' way that is pipeline-stage oriented.
It makes it possible to implement all aspects of, say, a new instruction in one file, instead of spreading it over many different files.
I've written about that here: https://tomverbeure.github.io/rtl/2018/12/06/The-VexRiscV-CPU-A-New-Way-To-Design.html https://tomverbeure.github.io/rtl/2018/12/06/The-VexRiscV-CP....
- klysm 6y agoThis is somewhat orthogonal to what you are saying, but I’ve wondered for a while if it’s possible to achieve vertical and horizontal abstraction at the same time. When you are working on the actual implementations, horizontal style is clearly preferable, but if you want to change the abstraction, the vertical style is much easier. The limitation of just one being accessible at a time seems to purely be a consequence of the fact that we use the same representation for reading and writing code. Why can’t I switch from vertical to horizontal mode when reading code? Maybe it’s even possible to switch when writing?? With a plug-in like structure you certainly get some benefits but at the same time you can let go of a nice global view - it would be nice to have both.
- tverbeure 6y agoIn a way, the VexRiscv is already implemented in both directions: While stages are specified individually, you can declare those stages to collapse together. The VexRiscv can be specified to be between 2 and 5 stages. In terms of readability, you still have the 5 stages separated out within the same file.
- klysm 6y agoOh, that's really cool. It seems like a nice place in the middle which I didn't really think was possible before.