SPARCSIM is an instruction set simulator for SPARC v8 series of processors. One of the main design goals of SPARCSIM was to keep it simple and easy to use. Instead of attractive GUI, it comes with a CLI (Command Line Interface). On one hand, CLI facilitates the use of scripts to feed bulk amount commands at a time; on the other hand it leaves the scope of augmenting it with a GUI and appropriate call-back functions to use it as a graphical simulator also. Capability vs. scalability has always been the most dominating factor from the very beginning.

Below is a screenshot of SPARCSIM displaying memory dump of a memory region.

The simulator accepts a SPARC ELF binary as its input. End user can supply it to the system either on the command line itself while invoking the simulator or after the system is entered. Presently, SPARCSIM offers altogether 28 commands to the user to accomplish various operations. After the ELF binary is loaded,a user can ask for the full disassembly of the source code or disassembly of specific code section. Also, SPARCSIM registers and memory area can be read or written accordingly to tune the environment for the execution of a specific test case on the code contained in ELF. The end user can start the execution from the beginning of the linear memory or somewhere in between. Breakpoints can also be set on demand to pause the execution at specific memory addresses. It enables one to watch the values of memory and registers to have an idea whether execution is going on as intended. Later, simulator can be resumed from the point it was broken at. There are some meta-commands also to make the user’s life a bit easier. There functionalities vary from invoking a shell command to displaying text on-screen. For subtle bugs which are suspected to creep into the code, those can be inspected by command by command stepping facility. At any point of the execution, the environment can be reset without unloading the binary from memory. Essential commands can be passed via command line to get those executed even without entering and exiting the SPARCSIM environment, thereby saving development time. Lastly, it presents a brief list of supported commands to make the developer’s life a bit easier.

I want to thank Michael Riepe, author of LIBELF, an LGPL licensed ELF library, which SPARCSIM immensely uses. His nearly instantaneous guidance in using the library has accelerated the development in many cases.