Contents

Rocket RISC-V processor - Dot diagrams

Contents

The Rocket Chip is poorly documented. In order to understand the structure of the Scala code, https://github.com/freechipsproject/diagrammer is a tool able to generate Dot diagrams helping to understand what’s inside this processor.

NB: it has been on Debian Bullseye

1
2
3
4
5
6
7
# Prerequisites, dot interactive viewer
sudo apt install xdot
# Cloning the diagram generation tool
git clone https://github.com/freechipsproject/diagrammer
cd diagrammer
git checkout v1.3.3
./diagram.sh -i freechips.rocketchip.system.DefaultConfig.fir --module-name "Rocket" --just-top-level

Note that the *.fir file is available in the Rocket Chip emulator directory. Arguments:

  • -i: input FIR file

  • --module-name: the top level module of the DOT file

  • --just-top-level: generates only a DOT file of the module. You can remove this parameter to get a recursive analysis.

  • Sample DOT file

  • Sample SVG file