A small project that combines a simple softcore, an “old-fashioned” compiler, and some kind of primitive disassembler.

dh33ex d7a184ae87 remove trailing whitespaces 10 months ago
compiler d7a184ae87 remove trailing whitespaces 10 months ago
cpu d7a184ae87 remove trailing whitespaces 10 months ago
disasembler d7a184ae87 remove trailing whitespaces 10 months ago
docs c7dd08ce24 add files 10 months ago
examples c7dd08ce24 add files 10 months ago
LICENSE d64e83a71f Initial commit 10 months ago
README.md 4920552c66 update README.md 10 months ago

README.md

uPL0

A small project that combines a simple softcore, an “old-fashioned” compiler, and some kind of primitive disassembler.

uPL0 (micro-programming-language-0)

This language is a modified PL/0 and is designed for use for microcontrollers. The main changes are:

  1. The odd, !, ? operators has been removed.
  2. Added bitwise operators NOT (~), OR (|), AND (&), XOR (^).
  3. Added the MEM data type - a single level pointer.
  4. Nested procedures are not allowed.

The full syntax of the language is in docs/ebnf.txt

Compiler

Contains compiler code in the C language. The compiler is single pass, uses a recursive descending algorithm. There are no optimization mechanisms, even constant folding.

Dissembler

Some kind of disassembler with the linear sweep method.

Architecture

Based on the architecture proposed by Niklaus Wirth in his book Compiler Construction (2017). There are two hardware implementations for OrangeCrab and Tang Nano 9k.

More details are available in docs/risc.txt

Examples

Examples that demonstrate possibilities of language and use of the periphery of soft-core hardware.