Font Size: a A A

The Research And Development Of MIPS64 's Dynamic Simulator

Posted on:2012-06-20Degree:MasterType:Thesis
Country:ChinaCandidate:S GuoFull Text:PDF
GTID:2178330338492996Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
An instruction set simulator (abbr. ISS) is a kind of software tool which runs on a host machine to simulate the behavior of running an application program on a target machine. Nowadays, instruction set simulator is become a very important part of the embedded system's development. Base on the ways to achieve, instruction set simulator has two types: interpretation simulator and compiled simulator.Compiled simulator's principle is the target machine's instructions can be directly translated into the host machine's instructions which can implement corresponding function, and compiled simulator has two types: the static-compiled and the dynamic compiled, and the dynamic compiled is divided into two modes: unspecial dynamic compiled mode and special dynamic compiled mode. Both of the two modes translate the instructions into high level language's functions, if the instructions's execution conditions are changed, the unspecial dynamic compiled mode has to be retranslated, but the special dynamic compiled mode has a lot of execution conditions so it doesn't to be retranslated.The paper's main works have four parts: The first part is that we achieved every instruction's semantic functions in the MIPS64 set (including MIPS32 set), including arithmetic instructions, branch instructions, load instructions, store instructions and co-processor 0 instructions. Because there was no condition in MIPS instruction set, we combined the instructions with same format together, and wrote their semantic functions. The second part is that we achieved the flow of the specific dynamic compiled technique, and achieved the Fetch-Instruction Function and the Execute Function. The third part is that we improved the specific dynamic compiled technique, we could count the times of the intermediate code are used. With the results, we could optimize the codes are used much times with better method. The fourth part is that we wrote every instruction's test program by the ASM Language and verified the instruction's accuracy, also we ran some common programs to check the ISS's function which was achieved by the specific dynamic compiled technique.The paper gives a new specific dynamic compiled simulation technique based on the pseudo instructions, which basic mentality is that instructions are decoded into intermediate code, and store the intermediate code into Cache, and then the intermediate code can be used directly. Every pseudo instruction is made of a pointer to a semantic function and the necessary arguments from the decoder. The improved method is that if there is a branch instruction occurs, put all the codes between the first instruction and the branch instruction into a vector, and then put the vector into the cache. In this way, compiling progress consumes much time, and the time consuming reduced during decoding progress, so the simulation speed is improved. This technique just need C++ language can be supported by the host platforms. At last, the results of the test programs and the common programs'running situation show that both the MIPS64's ISS base on the specific dynamic compiled technique is simulated correctly, and its function is better than the ISS's base on the unspecific dynamic technique.
Keywords/Search Tags:MIPS Architecture, Pseudo Instruction, Vector, Branch
PDF Full Text Request
Related items