Cavatools runs your application on a virtual machine, presenting a user-mode Linux system call interface to the application binary. The application with extended RISC-V instructions appear to be running in a Linux process with the same file system and network environment as the virtual machine. It seems to be in the same current working directory, was invoked with the same shell variables environment, and all the system call functions work as if the application was running natively on a Linux machine with the extended instruction set.
Cavatools encourages a different architecture evaluation methodology. Instead of studying the behavior of a small number, e.g. few billions, of instruction execution in great detail, the evaluation is decomposed into a number of simpler simulations and studies carried out on trillions of instructions execution in the same amount of time.
The cavatools system consists of an instruction set emulator caveat, a pipeline simulator pipesim, and a real-time non-intrusive performance viewer called erised. Caveat interprets a RISC-V binary and creates an in-memory instruction execution trace in shared memory, which is consumed on-the-fly by pipesim in a second Linux process running in parallel. Pipesim counts how many times each (static) instruction in the program is executed and total number of simulation cycles associated with that program counter. The frequency and cycle counters are in a shared memory segment which can be read non-intrusively by erised running in yet another Linux process. Erised displays execution frequency of different parts of the program using colors in real time, with zoom and pan capabilities to examine details and a window showing assembly listing with frequency and CPI (cycles per instruction) for each instruction.