This is a static analysis tool for assessing the usage of RV32 instructions/registers in a given target program. Build this tool by running the following command:
$ make toolAfter building, you can launch the tool using the following command:
$ build/rv_histogram [-ar] [target_program_path]The tool includes two optional options:
-a: output the analysis in ascending order (default is descending order)-r: output usage of registers (default is usage of instructions)
Example instructions histogram

To install lolviz, use the following command:
$ pip install lolvizFor macOS users, it might be necessary to install additional dependencies:
$ brew install graphvizBuild the profiling data by executing rv32emu. This can be done as follows:
$ build/rv32emu -p build/[test_program].elfTo analyze the profiling data, run rv_profiler from the project root
(the script reads build/<test_program>.prof):
$ tools/rv_profiler [--start-address ADDR] [--stop-address ADDR] [--graph-ir ADDR] <test_program><test_program> is the basename of the ELF passed to rv32emu -p (for
build/rv32emu -p build/hello.elf, pass hello.elf). Each --*-address
flag takes a hexadecimal address.
