A comprehensive computer system simulator for educational purposes, featuring a full-stack implementation from hardware emulation to application execution.
- Complete CPU emulation (NEMU)
- Hardware abstraction layer (Abstract-Machine)
- Simple operating system (Nanos-lite)
- Application framework (Navy-apps)
- Integrated debugging and tracing capabilities
Before setting up this project, you need to install the following dependencies:
# Essential development tools
sudo apt-get install build-essential # Build tools including gcc, make, etc
sudo apt-get install man # Reference manual
sudo apt-get install gcc-doc # GCC documentation
sudo apt-get install gdb # GNU debugger
sudo apt-get install git # Version control system
# Required libraries
sudo apt-get install libreadline-dev # Command line editing library
sudo apt-get install libsdl2-dev # Simple DirectMedia Layer-
Clone the repository:
git clone git@github.com:ETOwang/Full-System-Simulator.git cd Full-System-Simulator -
Initialize the required subprojects:
bash init.sh # Initialize the project -
Source your environment variables:
source ~/.bashrc
NEMU is the hardware emulation component that simulates CPU execution.
cd nemu
make menuconfig # Configure build options
make # Build NEMU
make run # Run NEMU with default settings
make gdb # Debug NEMU with GDBThe abstract machine provides a hardware abstraction layer for applications.
cd abstract-machine
make # Build the abstract machine library
cd am-kernels/tests/cpu-tests # Navigate to test directory
make ARCH=native mainargs=hello-str run # Run a simple testNanos-lite is a simplified operating system running on the abstract machine.
cd nanos-lite
make # Build nanos-lite
make run # Run nanos-lite
make gdb # Debug nanos-liteNavy-apps contains applications that run on the Nanos-lite OS.
cd navy-apps
make # Build all Navy applications
make run # Run Navy applications within NEMU
# Build and run specific application
cd apps/hello
make
make ISA=native run- NEMU: CPU emulator supporting multiple ISAs
- Abstract-Machine: Hardware abstraction layer
- Nanos-lite: Simple operating system
- Navy-apps: Application framework and example applications
If you encounter issues with environment variables, run:
source ~/.bashrcFor compilation errors, ensure all dependencies are properly installed.
This project originated from the programming assignment of the Introduction to Computer Systems (ICS) course in the Department of Computer Science and Technology, Nanjing University.
For the guide of the programming assignment, refer to https://nju-projectn.github.io/ics-pa-gitbook/ics2024/
The following subprojects/components are included: