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

  • 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>, …

  • format (str) –
  • bits (int) –
    • Number of bits in unsigned registers

    • Default 8

Returns:

dict containing all final values in globs.py, used for autograding

Return type:

dict

Indices and tables