A JavaFX-based educational simulator for a simplified IJVM-like architecture.
The project visualizes key CPU datapath and control signals while executing IJVM assembly programs step-by-step.
- Graphical view of CPU components (ALU, buses, registers, control signals, memory, and cache)
- Step-by-step execution of IJVM instructions
- Program loader for
.txtassembly files - Live views for:
- Program listing
- Stack
- Local variables
- Constant pool
- Register values and control signals
- Cache simulation with selectable eviction policy:
- FIFO
- LRU
- MRU
- Random
- LIP
- Cache metrics (hits, misses, hit rate), throughput, and utilization indicators
The assembler/parser in this project supports:
NOPBIPUSH <byte>ILOAD <index>ISTORE <index>IADDISUBGOTO <offset>IFEQ <offset>IFLT <offset>IF_ICMPEQ <offset>IINC <index> <const>
src/
main/
java/ # Java source files
resources/
images/ # UI assets
styles/ # UI style snippets
examples/ # Sample IJVM programs (.txt)
- Java:
- JDK 8 (includes JavaFX), or
- JDK 11+ with OpenJFX installed and configured
- JavaFX runtime/module setup as needed by your JDK distribution
From the repository root:
javac src/main/java/*.java
java -cp "src/main/java:src/main/resources" GUIIf your JDK requires explicit JavaFX modules, use --module-path and --add-modules javafx.controls,javafx.graphics for both javac and java.
- Launch the app.
- Click Input Code and select a program from
src/examples/(or your own.txtfile in the same format). - Use Step to execute micro-operations/instructions progressively.
- Use Reset to clear processor/memory state.
- Optionally change cache eviction mode from the dropdown.
Example inputs are available in:
src/examples/test1.txtsrc/examples/test2.txtsrc/examples/test3.txtsrc/examples/test4.txtsrc/examples/test5.txt