An open-source cross platform nanoPOWER ISA functional simulator.
-
CLI Mode: run:
launchers/cli.py -m operation mode -i input file -o output file
input and output files are optional -
GUI Mode: Compile the script:
generate_windows_exec.py
run the command:
python3 generate_windows_exec.py build
or Run gui.py
- Argparse (CLI framework for Python)
- cx_Freeze (executable generation)
- Tkiner (GUI Development)
- Please check out documentation.md
- clone the repo
git clone [email protected]:god-s-perfect-idiot/POWER-sim.git
- install dependency packages
pip install argparse csx_Freeze tk
- generate executable package on windows if needed (Optional)
python3 generate_windows_exec.py build
-
Launch modes:
- Run /build/gui.exe file for executing POWERSim
- run gui.py for gui mode
python3 launchers/gui.py
- run cli.py for cli mode
python3 launchers/cli.py -m [MODE] -i? [input] -o? [output]
- argparse
- Tkinter
- cx_Freeze
POWERsim has two different launch modes for accessing the application.
- The GUI mode launches an interactive session where the user can switch between assembly and processor modes. The interactive console provides compiled binary results and the memory devies and symtabs will be viewable as well.
GUI:
- The CLI mode is exclusive to an execution mode and is capable of executing or assembling instructions. It can also accept an input and output file.
An example use case is as follows:
POWERsim has two launch options: A GUI mode and a CLI mode. Both have their own different usages and interfaces.
Launch CLI mode using the following command:
cd launchers
python3 cli.py -m [OPERATION MODE] -i [INPUT FILE] -o [OUTPUT FILE]
- Here, -m accepts two values.
The two operation modes are Assembler mode and Processor Mode.
Assembles instructions and returns the binary value of the instruction
Processes instruction. Assembles first and then executes the instruction.
- The usage of -i is to provide an input file.
Any file of the type .s that contains input instructions can be assembled/ processed.
- The usage of -o is to provide an output file.
The response of the execution is stored there in the output file.
Launch GUI using the Python script or generated windows exectuable.
# script
cd launchers/
python3 gui.py
#generated exe
python3 generate_windows_exec.py build
# file is in /build
GUI Mode has the following sections:
Assemble or process the given instruction and print the response in the console
Switch between assembly and process modes
Show the contents of the Symbol Table and the Memory
Button to toggle between either devices
Display content of the register.
For detailed per-method documentation, please refer to documentation.md
POWERsim currently supports a reduced instruction set of POWER ISA compiled and titled nanoPOWERISA. It also, only supports 16 memory bits. This shall be expanded upon in future updates.
We acknowledge contributions from Samar Musthafa, Mathew Joseph Kayyalackakom and Adithya Gopakumar during the development of the project. Our guides, Prof. Mohammad Siyad B and Prof. Basavaraj Talavar also played significant roles during the ideation and subsequent development reviews of the project.
We welcome all types of contributions, either code fixes, new features or doc improvements. For commits please follow conventional commits convention. All code must pass lint rules before it can be merged into main.