Defining ISAs (as of M5 2.0 beta 3)
From gem5
First, make sure you have basic understanding of the ISA description objects within the M5 framework. A good start is the The M5 ISA description language page.
- Overview
Your new ISA description, MyISA, will need to generate correct instructions for the different CPU models. More specifically, your MyISA description is the primary generator for yoru
Now build your model:
scons build/ALPHA_SE/m5.debug CPU_MODELS=MY_CPU
If you have dual-core CPU use this to speed-up the compilation:
scons -j2 build/ALPHA_SE/m5.debug CPU_MODELS=MY_CPU
Create and edit configuration files for your model:
- m5/configs/test/MyCPUConfig.py: Define a configuration class w/corresponding parameters for your model. Look to 'FullO3Config.py' in the same directory for an example of how to do this.
- m5/configs/test/test.py: Import your model's configuration at the top of the file (i.e. 'import MyCPUConfig') and add in a parser option for your CPU model (e.g. '--my_cpu').
Test your model:
build/ALPHA_SE/m5.debug configs/example/se.py --my_cpu --cmd=<bin_path>