An assembler and simulation toolchain for the Digirule2 series of hardware.
Project description
dgtools
dgtools is a complete toolkit for developing software for the Digirule
series (2A/2U
) of hardware by bradsprojects.
Overview
-
dgasm
- The assembler, accepts a human readable
.asm
text file with Digirule ASM and produces:- A
.dgb
binary file with compiled code ready for simulation bydgsim.py
. - A
.hex
file (in the case of 2U) to be downloaded to the board.
- A
- The assembler, accepts a human readable
-
dginspect
- The binary file "inspector", accepts a
.dgb
binary file and produces a human readable "dump" of the full 256 byte memory range to stdout. It also allows a user to apply certain modifications to the memory space without re-compiling.
- The binary file "inspector", accepts a
-
dgsim
- The Digirule Virtual Machine, accepts a
.dgb
binary file and produces:- A human readable HTML (themeable) trace of every state change the CPU goes through at each timestep of execution.
- An additional
.dgb
file that contains the final state of the memory space at the end of program execution.
- The Digirule Virtual Machine, accepts a
These tools work together to write, debug and simulate code for the Digirule 2 prior to transfering it to the actual hardware.
dgtools
also includes some "extras", such as a Sublime text .dsf
ASM plugin, a console gui (dgui
) that can handle
compilation/simulation in one step and a code formatter (dgform
).
The most common workflow is to:
- Use a text editor to write human readable assembly code.
- Call
dgasm.py
to compile the binary - Call
dgsim.py
to run and debug the binary - (Alternatively, call
dgui
to perform both of the above in sequence) - Use
dginspect.py
to check a binary file, get/set values from the virtual machine or key the code in.
Installation
Pre-requisites
- Linux
- Python >=3.6
virtualenv
Install from PyPi with pip
pip install dgtools
Install latest development version
- Checkout the dgtools repository
> virtualenv -p python3.8 pyenv
> source pyenv/bin/activate
- To start using
dgtools
:pip install -e ./
(From within thedgtools/
directory that contains thesetup.py
file)- This will make the
dgtools
scripts callable from any position in the filesystem, as long as thepyenv
virtual environment is activated.
- If you are interested in developing
dgtools
further:pip install -r requirements.txt
Where to from here?
dgtools
documentation is up on ReadTheDocs and of course
in doc/
.
Practical examples of how to use dgtools
are available in
this introductory walkthrough.
Once you familiarise yourself with the tools and Digirule's ASM, you might want to move to
the advanced walkthrough or
check out other programming examples
in dg_asm_eamples/
.
Enjoy!
Athanasios Anastasiou
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
Built Distribution
File details
Details for the file dgtools-1.0.3.tar.gz
.
File metadata
- Download URL: dgtools-1.0.3.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef44b280a8837d7bcb128044b96142398548755f90fab564c4b0eb1a7ddb0d4a |
|
MD5 | f782ff52e53713ddce4c9de5e1737ec5 |
|
BLAKE2b-256 | b81eedc26db304350b18d491b26407c594366813965b66acc71c069b23610be4 |
File details
Details for the file dgtools-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: dgtools-1.0.3-py3-none-any.whl
- Upload date:
- Size: 66.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d201e2b36aa595e3c5371e311ab3f507e7d91dc44f95177e9bcb988f431a7c |
|
MD5 | e767c57dfaad355cd1de39f1a6f718fe |
|
BLAKE2b-256 | 659f5df9172a7b482ff6af72842c760af304c6badb17a94a502bbe452656e1b4 |