Simulizer allows you to write assembly code and run it on a simulated and visualised CPU. It has been designed to improve various features of SPIM.
Final Report (contains a more in depth description)
- A code editor with syntax highlighting for the MIPS language, along with real-time error checking and tooltips.
- Simulation and visualisation of an abstract simplified CPU.
- A window showing the values of the registers as programs are running.
- Interaction with the CPU, e.g. controlling the clock speed, pausing, stepping through execution, etc.
- Helpful messages and animations as the simulation is running to help the user understand how the CPU is operating.
- High-level visualisation of annotated programs, see below.
Package dependencies to run on a 64 bit Debian based GNU/Linux System (eg Ubuntu)
openjdk-8-jre
openjfx
(JavaFX for openJDK-8)libxslt1.1
(usually installed anyway)
Windows
- Java 8 JRE
- also includes JavaFX
Example Algorithm Visualisation:
Example Pipeline Visualisation:
Example CPU Visualisation:
Simulizer uses a JavaScript engine along side the CPU emulation. Javascript code is placed between @{
and }@
delimiters inside MIPS comments. The JavaScript code can access information about the current state of the CPU (eg registers, memory etc) and can be used to:
- signal 'high level' algorithm visualisations (eg integer lists: swapping elements and highlighting elements, tower of Hanoi: disk swapping, bitmap rendering of memory location etc)
- prototype complex code before transcribing to assembly
- debugging tool (very useful for
printf
debugging or conditional breakpoints)
The current data structures/graphics that can be visualised are:
- Lists
- Tower of Hanoi
- Canvas (complete access to a JavaFX canvas)
- can be used to render a bitmap of memory locations
- can be used to draw any shapes
- can be used to create your own high level visualisations from Javascript!
It is possible to use a compiler to generate MIPS output which Simulizer can
consume (with some automatic editing). See work/gcc-mips.sh
for a script
which uses gcc
to cross compile for MIPS (the gcc cross compiler must be
installed manually).
This is how some of the more elaborate examples (eg snake.s
) were created.
Package dependencies to build on a 64 bit Debian based GNU/Linux System (eg Ubuntu)
openjdk-8-jdk
spim
(for compatiability tests)openjfx
(JavaFX for openJDK-8)gradle
(or use gradle plugin with an IDE or thegradlew
wrapper)- add
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar
to the SDK classpath- your placement might be different. try:
find /usr -name 'jfxrt.jar'
- in Intellij IDEA: File > Project Structure > SDKs > 1.8 > Classpath
- your placement might be different. try:
- gradle will handle the rest of the dependencies
Charlie Street | Kelsey McKenna | Matthew Broadway | Michael Oultram | Theo Styles |
Simulizer is released under the GNU General Public License v3.0