Difference between revisions of "Defining ISAs (as of M5 2.0 beta 3)"

From gem5
Jump to: navigation, search
Line 1: Line 1:
 +
* '''''NOTE: THIS PAGE IS UNDER CONSTRUCTION. HOPE TO FINISH SOON!!!'''''
 +
==Overview==
 
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.  
 
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
 
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:'''
+
== Making M5 Recognize MyISA ==
<pre>
+
 
scons build/ALPHA_SE/m5.debug CPU_MODELS=MY_CPU
+
 
</pre>
+
== MyISA Architecture - src/arch/MyISA/isa_traits.hh ==
If you have dual-core CPU use this to speed-up the compilation:
+
 
<pre>
+
 
scons -j2 build/ALPHA_SE/m5.debug CPU_MODELS=MY_CPU
+
== MyISA Formats & Templates - src/arch/MyISA/formats/*.isa ==
</pre>
 
  
  
'''Create and edit configuration files for your model:'''
+
== MyISA Decoder - src/arch/MyISA/decoder.isa ==
*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:'''
+
'''Now Test Your Decoder:'''
 
<pre>
 
<pre>
build/ALPHA_SE/m5.debug configs/example/se.py --my_cpu --cmd=<bin_path>
+
scons build/MYISA_SE/arch/MyISA/atomic_simple_cpu_exec.cc CPU_MODELS=AtomicSimpleCPU
 
</pre>
 
</pre>

Revision as of 15:02, 17 May 2007

  • NOTE: THIS PAGE IS UNDER CONSTRUCTION. HOPE TO FINISH SOON!!!

Overview

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.

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

Making M5 Recognize MyISA

MyISA Architecture - src/arch/MyISA/isa_traits.hh

MyISA Formats & Templates - src/arch/MyISA/formats/*.isa

MyISA Decoder - src/arch/MyISA/decoder.isa

Now Test Your Decoder:

scons build/MYISA_SE/arch/MyISA/atomic_simple_cpu_exec.cc CPU_MODELS=AtomicSimpleCPU