b16 Processor

Instruction Set

The b16 Processor is a minimalistic stack processor, inspired by [html]Chuck Moore's recent work. The original incarnation is 16 bit, byte addressed. There are 32 instructions, each is 5 bits. Three and a bit (literally!) are packed into a 16 bit word (bundle). The first slot in the bundle can only be a nop or a call.

0 1 2 3 4 5 6 7 Comment
0 nop call jmp ret jz jnz jc jnc destination in rest of instruction
nop exec goto ret gz gnz gc gnc for slot 3
8 xor com and or + +c *+ /-
10 A!+ A@+ R@+ lit Ac!+ Ac@+ Rc@+ litc
A! A@ R@ lit Ac! Ac@ Rc@ litc for slot 1
18 nip drop over dup >r >a r> a

Purpose

The b16 is intented as small microcontroller, and suitable if you need more processing power than a 8051, but less die space (or gate count) and power consumption.

Documentation

You can find more documentation in the [pdf]Forth Tagung 2002 presentation (131k), or the [pdf]English translation (123k). There's also a combined [pdf]presentation from 2005 (360k).

Download

You can download the [tar-bz2]Sources (851k), the [pdf]evaluation board schematics (74k) and the [zip]Gerber data (481k) of the evaluation board.

News

There's now a USB interface (not fully tested, undocumented), minimalistic interrupts (tested, somewhat documented), and a small test bench to integrate all that stuff. I plan to also add an Ethernet MAC, and build a new Cyclone-based board with both USB and Ethernet functionality.


b16-small

The small version of the b16 has an even further reduced instruction set, and fits into half the size.

0 1 2 3 4 5 6 7 Comment
0 nop call jmp ret jz jnz jc jnc destination in rest of instruction
nop exec goto ret gz gnz gc gnc for slot 3
8 xor com and or + +c 2/ c2/
10 !+ @+ @ lit c!+ c@+ c@ litc
!. @. @ lit c!. c@. c@ litc for slot 1
18 nip drop over dup >r nop r> nop

Documentation

You can find more documentation in the [pdf]EuroForth 2004 proceeding (131k).

Download

You can download the [tar-bz2]Sources (143k) here. A more recent version is in the git repository, you can download it as follows from github or gitlab:

git clone https://github.com/forthy42/b16-small.git

git clone https://gitlab.com/forthy42/b16-small.git


Created 14apr2002. Last modified: 26apr2019 by MailBernd Paysan