Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nyuichi/chisel-brainfuck
Tiny Brainf**k CPU written in Chisel
https://github.com/nyuichi/chisel-brainfuck
Last synced: 20 days ago
JSON representation
Tiny Brainf**k CPU written in Chisel
- Host: GitHub
- URL: https://github.com/nyuichi/chisel-brainfuck
- Owner: nyuichi
- Created: 2015-05-19T05:01:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-05T22:18:39.000Z (about 9 years ago)
- Last Synced: 2024-10-16T03:48:13.331Z (2 months ago)
- Language: Scala
- Size: 9.77 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chisel-brainfuck
Brainfuck CPU written in Chisel
## ISA
* Two pointers: ip, dp
* 8bit * 32768 register file
* 8bit * 1024 code rom
* An instruction may have one operand (variable-length encoding)Instructions:
* `Inc`
* `Dec`
* `PInc`
* `PDec`
* `Put` (write to output port)
* `Get` (read from input port)
* `Jz addr` (jump to `ip + 1 + addr` if reg(dp) is set to zero)
* `Jmp addr` (always jump to `ip + 1 - addr`)Simple Brainfuck compiler is included in the Tester class (see `compile` method in BrainfuckTests class). You can run your own brainfuck code on the generated cpu simulator by changing the value of `BrainfuckTests#helloworld`.