Last updated:
0 purchases
asmlib 2.2.0
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 toyasm-ng.py
and toysim-ng.py 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/toyasm-ng.py some_input_file.asm
$ python3 /absolute/pkg_path/toyasm-ng.py 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/toyasm-ng.py some_input_file.asm
$ /absolute/pkg_path/toyasm-ng.py 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.
$ toyasm-ng.py 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., toyasm-ng.py 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 setup.py file can be used.
$ python3 ./setup.py 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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.