This project was done abandoned 2 months ago, and I can't remember everything very well, so the steps here may be wrong.
First, you need to clone QEMU, put judger.c
into tests/plugin
, and compile QEMU. You need to update the paths in Makefile.
Then you can run make all
, then there will be run results in results/
directory.
Finally, you may run python test.py
to find some coefficients.
It runs the code in RISC-V, and counts the number of:
- instructions
- integer division instructions
- floating point instructions
- memory access instructions
It also emulates a 4-way associative L1 cache, and counts the number of cached memory access instructions.
The python code tries to find some coefficients to calculate running time using these numbers.
Test codes comes from https://loj.ac/d/2685, there's no particular license.