Skip to main content

Tooling package for the computer architecture course at Graz University of Technology.

Project description

Tooling package for the computer architecture course (aka Rechnerorganisation) at Graz University of Technology.

This package provides utilities and tooling for working with textual and binary assembly variants. In more detail, we provide comparable simple implementations of standard tools (e.g., assemblers, instruction set simulators) that are required for experimenting with self-written processors. Given that the tools are used for teaching, the focus of the package is correctness and extensibility. As instruction set architecture, Princeton’s TOY, incl. various extensions, and a subset of the RISC-V RV32I are currently supported.

Quick and Dirty Usage of the Tools

For fast experimentation, executable entry points for the most important tools like and are provided next to this README. Subsequently, it is possible to directly use these applications like in one of the following examples:

$ python3 ./relative/pkg_path/ some_input_file.asm
$ python3 /absolute/pkg_path/ some_input_file.asm

Given that the entry points are marked as executable (i.e., chmod +x ...) and have a proper shebang, on unix-like systems, also direct execution is possible:

$ ./relative/pkg_path/ some_input_file.asm
$ /absolute/pkg_path/ some_input_file.asm

Finally, when the root directory of this package is part of the PATH (e.g., export PATH=/absolute/pkg_path:$PATH) environment variable, execution of the tools simply by name is working too.

$ some_input_file.asm

Proper Installation and Usage of the Package

asmlib is a proper python package and can also be installed via the standard package manager (e.g., pip3 install --user /absolute/pkg_path). Note that, when development on to the package is planned, installing the package as editable by adding the -e command line flag is recommended. Additionally, virtual environments (e.g., python3 -m venv _venv && source_venv/bin/activate) can be used too.

Either way, this automatically installs the entry points into the correct directories and the tools can directly be used on the command line (i.e., some_input_file.asm).

Building the Sphinx Documentation

When Sphinx is installed (i.e., pip3 install sphinx sphinx-autodoc-typehints), the HTML API documentation for this package can be built via the following sphinx-build invocation:

$ sphinx-build doc doc/_build/html

Alternatively, the sphinx command on the file can be used.

$ python3 ./ sphinx

Either way, the API documentation gets automatically generated by executing sphinx-apidoc first. The resulting HTML output can be found in the doc/_build/html directory.

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

asmlib-2.2.0.tar.gz (40.6 kB view hashes)

Uploaded source

Built Distribution

asmlib-2.2.0-py3-none-any.whl (62.7 kB view hashes)

Uploaded py3

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