SAPsimļ
Note
The theme Iām using for this site has ads š. Use adblock.
Installation and usageļ
See the GitHub README.
Settingsļ
See the keyword arguments of run().
For example, to run in debug (step) mode, use run(path, debug=True).
- SAPsim.run(prog_path: str, **kwargs) None[source]ļ
Run given .csv program.
- Parameters:
prog_path (
str) ā .csv file in SAPsim format.**kwargs ā See below
- Keyword Arguments:
- debug (
bool) ā Whether to run in debug mode (True) or at full speed (False)
Default is full speed
- debug (
- change (
str) ā Comma-separated list of changes to RAM
Useful for debugging programs (edit a value without changing CSV)
Also useful for autograding programs (overwrite a reserved instruction/data value)
Format: <addr>:<base-10 value>,<addr>:<base-10 value>, ā¦
- change (
- format (
str) ā Table format
Options: https://github.com/astanin/python-tabulate#table-format
- format (
- bits (
int) ā Number of bits in unsigned registers
Default 8
- bits (
- Returns:
dictcontaining all final values in globs.py, used for autograding- Return type:
dict