Close

Logic simulation

A project log for The simplest 4-bit RISC CPU

In this project, I built a very simple 4 bit RISC CPU. *Sponsored by PCBway

marsianin245Marsianin245 06/04/2023 at 20:280 Comments

Simulated the 4-bit CPU logic in Logicsim simulator to verify the design. Logical model includes all chips, registers and EEPROM memory.
Simulated execution of short programs by the processor. For example, simulated this program

instruction (byte); upper 4 bits: opcode; lower 4 bits data/address

00  -  no-op:   nothing happens

10   -  clears A register;   A: 0

21   - Add 1 to A;               A: 1

24  - Add 4 to A;              A: 5

25  - Add 5 to A;              A: 10

21   - Add 1 to A;               A: 11

40  - Jump conditional to address 0, if flag carry is on;  false

26  - Add 6 to A:              A: 1 and Flag carry 

41   - Jump conditional to address 1, if lag carry is is on; true   Jump executed on address 1


Discussions