Simple 8-Bit RISC CPU and computer.
Uses only 20 logic chips, 2 EEPROM, and 1 SRAM chip, and one 555 timer.
This just shows simple RISC CPU made from small number of parts.
Design choices:
Uses Harvard architecture, with separate instruction and data memory.
CPU made from discrete logic chips. Fits on single PCB.
Clock is generated by 555 timer with frequency from 1 Hz to 1000 Hz. Although schematic will probably allow frequency up to 1 Mhz.
Instruction format 16 Bit, with 6-bit opcode, and 10 bit address or 8 bit data.
Instructions stored in two EEPROM chips. Address space is 10 bits ( 1 KB).
Data stored in SRAM ( 1 KB), address is 10 bit.
Each instruction executes in 1 clock. This simplifies control logic.
On positive edge of the clock, instruction executed.
On negative edge of the clock, instruction address is incremented.
One 8-bit accumulator register A.
ALU instructions: Add and Subtract and clear Accumulator.
One output 8-Bit port, and one input or bidirectional 8-Bit port.
Instructions set is very small but allows to execute short programs.
Instruction format is 16 bit.
Instruction consists of 6 bits opcode, and 10 bits address, or 8 bits immediate operand.
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 for 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.
zpekic