This is a 75% implementation (the IO operations of .
and ,
weren't implemented) of the esoteric language Brainfuck as small factor processor.
It works as any "regular" microprocessor would, executing the given ASCII values of each character as an opcode, following this state machine:
With an internal implementation close to the following one:
This circuit has the following pinout: To drive it, you need to have an external address register, as it requests reads/writes data in alternating cycles, some memory organization to support, at the minimum, 256 x 8 of program memory and 256 x 8 of instruction memory (this can be expanded until 1KB memories by also using the pc_ext pins), and a clock, preferably at 20MHz. If you don't want for the program to access instruction memory, the pin instr_addr is only set if the address being requested is for instructions, so you can use that to avoid it.
These are some components that you can use for interfacing with the processor:
# | Input | Output | Bidirectional |
---|---|---|---|
0 | Write | Data_0 | |
1 | Addr | Data_1 | |
2 | Instr_Addr | Data_2 | |
3 | PC_Ext_8 | Data_3 | |
4 | PC_Ext_9 | Data_4 | |
5 | PC_Ext_10 | Data_5 | |
6 | PC_Ext_11 | Data_6 | |
7 | PC_Ext_12 | Data_7 |