HMOD is a simulator implemented in Python that permits the implementation and evaluation of different microarchitecture models with an agile approach to speed up the design exploration space in the first stages of the microarchitecture design.
HMOD relies on the Salabim simulator to manage dependencies and resources to model the different microarchitectures. Salabim can be installed by running pip install salabim. Also, as cache replacement model it uses the Python Cache Hierarchy Simulator that can be installed by running pip install pycachesim
Additionally, you will need the RISC-V toolchain to compile C code and obtain RISC-V assembly. Follow the instructions on the risc-v-examples submodule or use a docker image as indicated below.
Install docker:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Check if Docker daemon is running:
sudo systemctl is-active docker
If not, activate it:
sudo systemctl start docker
For building a Docker image that contains the risc-v tools, you can use the included docker file.
sudo docker build -t hmod_env .
Alternatively, you can download the following docker image from the docker hub.
sudo docker pull docker.io/crojasmrls/hmod_env
When you have the image ready, you can create a new container using this command:
sudo docker run -it --mount src=$(pwd),target=/hmod,type=bind hmod_env
cd hmod
For executing a simulation, it is necessary to run the main file read-pseudocode.py; in this file, you can specify which parameters to use, the simulated time, and the assembly code to run.
- Execute assembly programs
- RISC-V unprivileged ISA subset
- Out-of-order parametrizable pipeline model
- IPC counter
- Konata tracer Support
See AUTHORS.md
Everyone participating in the HMOD project, and in particular in the issue tracker, pull requests, and social media activity, is expected to treat other people with respect and, more generally, to follow the guidelines articulated in the Python Community Code of Conduct.