dgtools

A toolchain for constrained CPUs

https://github.com/aanastasiou/dgtools

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

assembler compiler-principles compilers hardware python simulation
Last synced: 6 months ago · JSON representation

Repository

A toolchain for constrained CPUs

Basic Info
  • Host: GitHub
  • Owner: aanastasiou
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 8.77 MB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
assembler compiler-principles compilers hardware python simulation
Created almost 6 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Changelog License

README.md

dgtools

dgtools is a complete toolkit for developing software for the Digirule series (2A/2U) of hardware by bradsprojects.

Overview

  1. dgasm
  • The assembler, accepts a human readable .asm text file with Digirule ASM and produces:
    1. A .dgb binary file with compiled code ready for simulation by dgsim.py .
    2. A .hex file (in the case of 2U) to be downloaded to the board.
  1. 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.
  1. dgsim
  • The Digirule Virtual Machine, accepts a .dgb binary file and produces:
    1. A human readable HTML (themeable) trace of every state change the CPU goes through at each timestep of execution.
    2. An additional .dgb file that contains the final state of the memory space at the end of program execution.

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:

  1. A Sublime text .dsf ASM plugin,
  2. A console gui (dgui.py) that can handle compilation/simulation in one step
  3. A code formatter (dgform.py), to pretty print source code.
  4. Brainfuck and Super Stack! compilers for the Digirule 2U.

The most common workflow is to:

  1. Use a text editor to write human readable assembly code.
  2. Call dgasm.py to compile the binary
  3. Call dgsim.py to run and debug the binary
  4. (Alternatively, call dgui to perform both of the above in sequence)
  5. Use dginspect.py to check a binary file, get/set values from the virtual machine or key the code in.

Installation

Pre-requisites

  1. Linux
  2. Python >=3.6
  3. virtualenv

Install from PyPi with pip

  • pip install dgtools

Install latest development version

  1. Checkout the dgtools repository
  2. > virtualenv -p python3.8 pyenv
  3. > source pyenv/bin/activate
  4. To start using dgtools:
    • pip install -e ./ (From within the dgtools/ directory that contains the setup.py file)
    • This will make the dgtools scripts callable from any position in the filesystem, as long as the pyenv virtual environment is activated.
  5. 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/.

dgrdo.org

The ASM toolchain along with the brainfuck and Super Stack! compilers is available online at https://www.dgrdo.org. For more information see this introduction on its functionality

Enjoy!

Athanasios Anastasiou

Owner

  • Name: Athanasios Anastasiou
  • Login: aanastasiou
  • Kind: user
  • Location: Cardiff - Wales

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 243
  • Total Committers: 2
  • Avg Commits per committer: 121.5
  • Development Distribution Score (DDS): 0.004
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Athanasios Anastasiou a****u@g****m 242
Athanasios Anastasiou a****u 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 11
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 months
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.91
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 11
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (11)
Top Labels
Issue Labels
Pull Request Labels
dependencies (11)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 47 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 1
pypi.org: dgtools

An assembler and simulation toolchain for the Digirule2 series of hardware.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 47 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 20.3%
Dependent repos count: 21.7%
Average: 23.1%
Forks count: 29.8%
Downloads: 33.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • Babel ==2.9.1
  • Jinja2 ==3.0.3
  • MarkupSafe ==2.0.1
  • Pygments ==2.10.0
  • Sphinx ==4.3.1
  • alabaster ==0.7.12
  • attrs ==21.2.0
  • certifi ==2021.10.8
  • charset-normalizer ==2.0.9
  • click ==8.0.3
  • docutils ==0.17.1
  • idna ==3.3
  • imagesize ==1.3.0
  • iniconfig ==1.1.1
  • intelhex ==2.3.0
  • packaging ==21.3
  • pluggy ==1.0.0
  • py ==1.11.0
  • pyparsing ==3.0.6
  • pytest ==6.2.5
  • pytz ==2021.3
  • requests ==2.26.0
  • snowballstemmer ==2.2.0
  • sphinxcontrib-applehelp ==1.0.2
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.0
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • toml ==0.10.2
  • urllib3 ==1.26.7
  • urwid ==2.1.2
setup.py pypi
  • click *
  • intelhex *
  • pygments *
  • pyparsing *
  • urwid *