IAS has been extensively tested only on the Sparc/Solaris platform. It is compiled with the Sun Workshop C compiler. If you do not have access to this compiler, you can try compiling with
gcc
.If you need to build IAS on a different platform, you should read the IAS Porting Notes.
For more on the build structure and details on the source code, please refer to IAS web pages.
A default SPARC/Solaris binary for the Instruction-accurate simulator (IAS) is supplied with the distribution in
$DSVHOME/bin
.The steps to recompile IAS for your SPARCstation running Solaris are:
- Ensure your environment variables are set. See setting up your environment.
- Change your directory to $DSVHOME
- Type
make ias
. Theias
executable appears in the directory$DSVHOME/bin
if everything builds correctly. (If you see warnings of the form: " warning: typedef redeclared: uint64_t", you can ignore them)
Before you can run a program on IAS or on the RTL model, you must have all picoJava-II trap handlers present in the directory
$DSVHOME/class
. The picoJava-II processor distributions already contain default trap handlers in this directory. Note that these trap handlers are example implementations only, and may have to be substantially modified before being used in a real system.If you need to modify or recompile these handlers, the source code is present in
$PICOJAVAHOME/$PROJECT/design/traps
(for emulation traps) and$PICOJAVAHOME/$PROJECT/design/exception
(for all other traps).The steps to build the trap handlers are:
cd $PICOJAVAHOME/$PROJECT/tools/traps
make
cp class/*.class $DSVHOME/class
cd $PICOJAVAHOME/$PROJECT/tools/exception
make
cp class/*.class $DSVHOME/class
A quick way to check if you built IAS correctly is to run some sample tests. The steps to run the sample tests in IAS are:
To run all the tests in the picoJava verification test suite on ias, you you need to build the tests first.
- Change directory to $PICOJAVAHOME/$PROJECT/sim/test/sample_tests. This directory has 5 precompiled sample tests.
- Select one of the tests, e.g., FADD_000 and change to that directory.
- Type "ias".
- Type "run" at ias prompt "% ".
- The output should be something like:
"IAS: Test PASSED, 3721 instructions, 0 interrupts taken, 0 total traps".
- cd $PICOJAVAHOME/$PROJECT/sim/test/pico_vts
- Type steam -ias .