This is very simple educational 8-Bit RISC CPU and computer.
Uses only 16 logic chips, two EEPROM, and one SRAM chip, and one 555 timer.
This is much smaller then other comparable 8-Bit computer designs.
(For comparison, Ben Eater's 8-Bit computer uses about 40 logic chips.)
Uses Harvard architecture, with separate instruction and data memory.
Clock is generated by 555 timer with frequency from 1 Hz to 1000 Hz.
Although schematic will probably allow higher frequency up to 1 Mhz.
Instruction format 16 Bit, with 8 bit opcode, and 8 bit address or data.
Instructions stored in two EEPROM chips.
There is one 256x8 SRAM. Address space is 8 bits (256 bytes).
Actually the RAM and EEPROM chips have 11 bits address, i.e. 2 kbytes;
but the CPU address is only 8 bits (256 bytes).
Each instruction executes in 1 clock. That simplifies control logic.
On positive edge of the clock, instruction executed.
On negative edge of the clock, instruction address is incremented.
ALU instructions: Add and Subtract and clear Accumulator.
One output 8-Bit port, and one input or bidirectional 8-Bit port.
ALU executes instructions Add and Subtract and clear Accumulator.
One Accumulator 8-Bit register A.
Instructions set is very small but allows to execute short programs.
Instructions:
No-op.
Clear Accumulator A. ( zero to A)
Add operand to A and store in A.
Subtract operand from A and store to A.
Store value from A to SRAM at address N.
Input operand from input port and add to A.
Output value A to output port.
Jump conditional when Flag overflow.
Jump unconditional.
Operand of Add or Subtract instructions can be:
immediate value # from instruction EEPROM,
value from SRAM at address N,
value from input port.
value from accumulator A (add to itself).
Notes:
There is no load A
instruction. But one can use ‘Clear’ instruction,
following by
‘Add’ instruction to load value to the A accumulator.
ALU and Accumulator operate on 8 bits. But program can compute
multi-byte arithmetic operation (add or subtract 16 or 32 bit numbers),
in multiple steps.
There is only one conditional Jump instruction and flag carry.
But one can use it to test different conditions.
For example, to test if A register in not zero: Add value hex FF to A.
If flag carry is set then the value in A was not zero.
Input and output 8 bit ports can by connected to devices, like
7-segmend LED display, and keypad, for example.
CPU opcode bit 3 is not affecting execution, only connected to LED.
Used to implement simple Blink irrespective of cpu operation.
In current schematic, direction of the input 8-bit port is fixed.
But, a simple modification can convert port to bi-directional,
by connecting buffer's direction pin with the unused CPU
instruction opcode bit 3.
Updates:
Schematics pdf file, and opcode list are updated.
Logisim model tested.