# nxthingbutv0id/cti-8-microprocessor architecture

> Architecture diagram of the GitHub repository nxthingbutv0id/cti-8-microprocessor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nxthingbutv0id/cti-8-microprocessor
- Repository: https://github.com/nxthingbutv0id/cti-8-microprocessor

## Overview

CTI-8 is an 8-bit CISC microprocessor implemented in Verilog, with an accompanying assembler and example program. The principal workflow is assembly source through the assembler into a ROM image, then processor execution with RAM and memory-mapped terminal UART. The README documents the system-level capabilities, but no Verilog excerpts were provided, so internal hardware connections are not asserted.

Main entry points: [`sources/Processor.v`](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Processor.v) (Processor), [`sources/TerminalUART.v`](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/TerminalUART.v) (Terminal UART), [`software/hexmonitor.s`](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/hexmonitor.s) (Assembly source), [`software/assembler.py`](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/assembler.py) (Assembler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_software["Assembly Software"]
  node_assembly["Assembly source<br/>[hexmonitor.s]"]
  node_assembler["Assembler<br/>[assembler.py]"]
  node_romimage["ROM image<br/>[hexmonitor.coe]"]
end

subgraph group_cpu["Processor Core"]
  node_cpu["Processor<br/>[Processor.v]"]
  node_control["Control unit<br/>[ControlUnit.v]"]
  node_alu["ALU<br/>[ALU.v]"]
  node_registers["Registers and flags<br/>[Register.v]"]
end

subgraph group_memory["Memory System"]
  node_rom[("Program ROM<br/>[ProgramROM.v]")]
  node_ram[("RAM<br/>[SystemMemory.v]")]
  node_addressing["Address decoder<br/>[AddressDecoder.v]"]
end

subgraph group_io["Terminal I/O"]
  node_terminal["Terminal<br/>[Terminal.v]"]
  node_terminaluart["Terminal UART<br/>[TerminalUART.v]"]
  node_rxuart["UART receiver<br/>[RXuart.v]"]
  node_txuart["UART transmitter<br/>[TXuart.v]"]
end

node_programmer(("Assembly author"))
node_keyboard(("Keyboard"))

node_programmer -->|"writes"| node_assembly
node_assembly -->|"assembles"| node_assembler
node_assembler -->|"emits image"| node_romimage
node_romimage -.->|"initializes"| node_rom
node_rom -.->|"supplies program"| node_cpu
node_cpu -.->|"uses memory"| node_ram
node_cpu -->|"accesses mapped I/O"| node_terminaluart
node_keyboard -.->|"sends input"| node_terminaluart
node_terminaluart -->|"connects terminal"| node_terminal

click node_assembly "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/hexmonitor.s"
click node_assembler "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/assembler.py"
click node_romimage "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/hexmonitor.coe"
click node_cpu "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Processor.v"
click node_control "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ControlUnit.v"
click node_alu "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ALU.v"
click node_registers "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Register.v"
click node_rom "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ProgramROM.v"
click node_ram "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/SystemMemory.v"
click node_addressing "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/AddressDecoder.v"
click node_terminal "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Terminal.v"
click node_terminaluart "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/TerminalUART.v"
click node_rxuart "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/RXuart.v"
click node_txuart "https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/TXuart.v"

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_assembly,node_assembler,node_romimage toneBlue
class node_cpu,node_control,node_alu,node_registers toneAmber
class node_rom,node_ram,node_addressing toneMint
class node_terminal,node_terminaluart,node_rxuart,node_txuart toneRose
class node_programmer,node_keyboard toneIndigo
```

## Components

### Assembly Software

- [Assembly source](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/hexmonitor.s): `software/hexmonitor.s`
- [Assembler](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/assembler.py): `software/assembler.py`
- [ROM image](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/software/hexmonitor.coe): `software/hexmonitor.coe`

### Processor Core

- [Processor](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Processor.v): `sources/Processor.v`
- [Control unit](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ControlUnit.v): `sources/ControlUnit.v`
- [ALU](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ALU.v): `sources/ALU.v`
- [Registers and flags](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Register.v): `sources/Register.v`

### Memory System

- [Program ROM](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/ProgramROM.v): `sources/ProgramROM.v`
- [RAM](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/SystemMemory.v): `sources/SystemMemory.v`
- [Address decoder](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/AddressDecoder.v): `sources/AddressDecoder.v`

### Terminal I/O

- [Terminal](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/Terminal.v): `sources/Terminal.v`
- [Terminal UART](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/TerminalUART.v): `sources/TerminalUART.v`
- [UART receiver](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/RXuart.v): `sources/RXuart.v`
- [UART transmitter](https://github.com/nxthingbutv0id/cti-8-microprocessor/blob/main/sources/TXuart.v): `sources/TXuart.v`

### Other components

- **Assembly author**
- **Keyboard**

## Connections

- Assembly author → Assembly source: writes (evidence: `README.md`)
- Assembly source → Assembler: assembles (evidence: `README.md`)
- Assembler → ROM image: emits image (evidence: `README.md`)
- ROM image → Program ROM: initializes
- Program ROM → Processor: supplies program
- Processor → RAM: uses memory
- Processor → Terminal UART: accesses mapped I/O (evidence: `README.md`)
- Keyboard → Terminal UART: sends input
- Terminal UART → Terminal: connects terminal (evidence: `README.md`)
