Skip to main content

Simulation of SAP (Simple As Possible) computer programs from COMP311 (Computer Organization) @ UNC

Project description

SAPsim

Test badge Code style: black Python

Simulation of SAP (Simple As Possible) computer programs from COMP311 (Computer Organization) @ UNC

Install

Your Python version needs to be 3.9+. Check with python --version or python3 --version, if python doesn't work.

Next, install SAPsim.

pip install SAPsim

If pip doesn't work, try pip3.

Usage

Write a SAP program in the format shown in ex2.csv. See template.csv for a blank template. You may edit the .csv files in Microsoft Excel.

Now, open a Python terminal or file. You'll pass the path to your SAP program as an argument.

from SAPsim import run
run("path/to/your/SAP/program.csv")                 # run at full speed (default)
run("path/to/your/SAP/program.csv", debug=True)     # run in debug (step) mode

Additional settings are described here.

Rules

It's easiest to just mimic the example programs above.

But if you need it, the list of rules for SAP programs is here.

SAP instruction set

SAP instruction set

Documentation

https://SAPsim.readthedocs.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SAPsim-1.0.1.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

SAPsim-1.0.1-py3-none-any.whl (19.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page