# seeeedn/z80ish architecture

> Architecture diagram of the GitHub repository seeeedn/z80ish, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/seeeedn/z80ish
- Repository: https://github.com/seeeedn/z80ish

## Overview

z80ish is a custom 8-bit CISC processor, described as spiritually descended from the 8080 and Z80. Its principal runtime workflow is to use control and microcode to sequence instruction fetch and execution, operate on registers and data through the ALU, and access memory. The tree identifies the RTL modules, but their source was not excerpted; the internal layering and links below are therefore shown as unverified. Generated simulation excerpts corroborate that the design includes control, microcode, registers, ALU, and memory, but generated artifacts are not part of the product architecture.

Main entry points: [`rtl/cpu.sv`](https://github.com/seeeedn/z80ish/blob/main/rtl/cpu.sv) (CPU Core), [`rtl/control.sv`](https://github.com/seeeedn/z80ish/blob/main/rtl/control.sv) (Control Unit), [`rtl/computer.sv`](https://github.com/seeeedn/z80ish/blob/main/rtl/computer.sv) (Computer), [`rtl/microcode_rom.sv`](https://github.com/seeeedn/z80ish/blob/main/rtl/microcode_rom.sv) (Microcode ROM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_top["Processor Integration"]
  node_computer["Computer<br/>[computer.sv]"]
  node_cpu["CPU Core<br/>[cpu.sv]"]
end

subgraph group_control["Instruction Control"]
  node_control_unit["Control Unit<br/>[control.sv]"]
  node_dispatcher["Dispatcher<br/>[dispatcher.sv]"]
  node_microsequencer["Microsequencer<br/>[microsequencer.sv]"]
  node_microcode_rom["Microcode ROM<br/>[microcode_rom.sv]"]
  node_microcode_pkg["Microcode Definitions<br/>[microcode_pkg.svh]"]
end

subgraph group_execute["Execution Datapath"]
  node_idu["Instruction Decode<br/>[idu.sv]"]
  node_alu["ALU<br/>[alu.sv]"]
end

subgraph group_storage["State and Memory"]
  node_regfile["Register File<br/>[regfile.sv]"]
  node_single_reg["Single Register<br/>[single_reg.sv]"]
  node_memory[("Memory<br/>[memory.sv]")]
end

node_clock_reset(("Clock and Reset"))

node_clock_reset -.->|"provides timing"| node_computer
node_computer -.->|"integrates core"| node_cpu
node_computer -.->|"connects memory"| node_memory
node_cpu -.->|"uses control"| node_control_unit
node_cpu -.->|"decodes instructions"| node_idu
node_cpu -.->|"executes operations"| node_alu
node_cpu -.->|"reads and writes"| node_regfile
node_cpu -.->|"uses registers"| node_single_reg
node_control_unit -.->|"dispatches control"| node_dispatcher
node_control_unit -.->|"sequences steps"| node_microsequencer
node_control_unit -.->|"reads microcode"| node_microcode_rom
node_microcode_rom -.->|"uses definitions"| node_microcode_pkg
node_cpu -.->|"accesses data"| node_memory

click node_computer "https://github.com/seeeedn/z80ish/blob/main/rtl/computer.sv"
click node_cpu "https://github.com/seeeedn/z80ish/blob/main/rtl/cpu.sv"
click node_control_unit "https://github.com/seeeedn/z80ish/blob/main/rtl/control.sv"
click node_dispatcher "https://github.com/seeeedn/z80ish/blob/main/rtl/dispatcher.sv"
click node_microsequencer "https://github.com/seeeedn/z80ish/blob/main/rtl/microsequencer.sv"
click node_microcode_rom "https://github.com/seeeedn/z80ish/blob/main/rtl/microcode_rom.sv"
click node_microcode_pkg "https://github.com/seeeedn/z80ish/blob/main/rtl/microcode_pkg.svh"
click node_idu "https://github.com/seeeedn/z80ish/blob/main/rtl/idu.sv"
click node_alu "https://github.com/seeeedn/z80ish/blob/main/rtl/alu.sv"
click node_regfile "https://github.com/seeeedn/z80ish/blob/main/rtl/regfile.sv"
click node_single_reg "https://github.com/seeeedn/z80ish/blob/main/rtl/single_reg.sv"
click node_memory "https://github.com/seeeedn/z80ish/blob/main/rtl/memory.sv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_computer,node_cpu toneBlue
class node_control_unit,node_dispatcher,node_microsequencer,node_microcode_rom,node_microcode_pkg toneAmber
class node_idu,node_alu toneMint
class node_regfile,node_single_reg,node_memory toneRose
class node_clock_reset toneIndigo
```

## Components

### Processor Integration

- [Computer](https://github.com/seeeedn/z80ish/blob/main/rtl/computer.sv): `rtl/computer.sv`
- [CPU Core](https://github.com/seeeedn/z80ish/blob/main/rtl/cpu.sv): `rtl/cpu.sv`

### Instruction Control

- [Control Unit](https://github.com/seeeedn/z80ish/blob/main/rtl/control.sv): `rtl/control.sv`
- [Dispatcher](https://github.com/seeeedn/z80ish/blob/main/rtl/dispatcher.sv): `rtl/dispatcher.sv`
- [Microsequencer](https://github.com/seeeedn/z80ish/blob/main/rtl/microsequencer.sv): `rtl/microsequencer.sv`
- [Microcode ROM](https://github.com/seeeedn/z80ish/blob/main/rtl/microcode_rom.sv): `rtl/microcode_rom.sv`
- [Microcode Definitions](https://github.com/seeeedn/z80ish/blob/main/rtl/microcode_pkg.svh): `rtl/microcode_pkg.svh`

### Execution Datapath

- [Instruction Decode](https://github.com/seeeedn/z80ish/blob/main/rtl/idu.sv): `rtl/idu.sv`
- [ALU](https://github.com/seeeedn/z80ish/blob/main/rtl/alu.sv): `rtl/alu.sv`

### State and Memory

- [Register File](https://github.com/seeeedn/z80ish/blob/main/rtl/regfile.sv): `rtl/regfile.sv`
- [Single Register](https://github.com/seeeedn/z80ish/blob/main/rtl/single_reg.sv): `rtl/single_reg.sv`
- [Memory](https://github.com/seeeedn/z80ish/blob/main/rtl/memory.sv): `rtl/memory.sv`

### Other components

- **Clock and Reset**

## Connections

- Clock and Reset → Computer: provides timing
- Computer → CPU Core: integrates core
- Computer → Memory: connects memory
- CPU Core → Control Unit: uses control
- CPU Core → Instruction Decode: decodes instructions
- CPU Core → ALU: executes operations
- CPU Core → Register File: reads and writes
- CPU Core → Single Register: uses registers
- Control Unit → Dispatcher: dispatches control
- Control Unit → Microsequencer: sequences steps
- Control Unit → Microcode ROM: reads microcode
- Microcode ROM → Microcode Definitions: uses definitions
- CPU Core → Memory: accesses data
