Download PowerPC MMU Simulation

Transcript
4.6
Input data to the Simulator
The simulator implemented in this study can be loaded with multiple programs. These
programs are files containing instructions. The structure of the files and the instructions
follow the format of “ELF 32-bit MSB relocatable PowerPC version 1”. To generate these
files one can use a standard GNU-C compiler for PPC, which is instructed to generate an
assembler code file. This assembler file must then be altered to fit the simulator, which is
done by removing initialising code that the compiler automatically appends to the program,
which the simulator doesn’t support. The modified assembler file is then linked with the
GNU-compiler and the last step is to extract the program from the binary file and discard all
of the unnecessary data remaining. The result is a file containing a program without the
unnecessary/unsupported parts that a standard C program includes, such as IO routines,
debugging facilities, etc.
33