# raitonsemi/corex_m0 architecture

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

- Interactive diagram: https://gitdiagram.com/raitonsemi/corex_m0
- Repository: https://github.com/raitonsemi/corex_m0

## Overview

COREX_M0 is an ARM Cortex-M0 SoC RTL project. The principal path is processor execution through the AHB system fabric to memory and peripherals, with UART output and VGA display as visible results. RTL filenames indicate these subsystems, but no RTL excerpts were provided and the README only identifies the project; therefore the hardware links below are dashed and unverified. The tree also shows UART, VGA, RAM, and FIFO implementation modules, which are represented as distinct internal components.

Main entry points: [`M0_SOC_RTL/AHBLITE_SYS.v`](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBLITE_SYS.v) (AHB Lite System), [`M0_SOC_RTL/AHBUART.v`](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBUART.v) (AHB UART), [`M0_SOC_RTL/AHBVGASYS.v`](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBVGASYS.v) (AHB VGA System), [`M0_SOC_RTL/CORTEXM0INTEGRATION.v`](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/CORTEXM0INTEGRATION.v) (Cortex-M0 Integration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Processor Core"]
  node_integration["Cortex-M0 Integration"]
  node_core_logic["Core Logic<br/>[cortexm0ds_logic.v]"]
  node_clock["Clock Buffer<br/>[BUFG.v]"]
end

subgraph group_fabric["System Fabric"]
  node_system["AHB Lite System<br/>[AHBLITE_SYS.v]"]
  node_decoder["AHB Decoder<br/>[AHBDCD.v]"]
  node_mux["AHB Mux<br/>[AHBMUX.v]"]
  node_bram["AHB BRAM<br/>[AHB2BRAM.v]"]
  node_ram[("Dual-Port RAM")]
end

subgraph group_peripherals["Peripheral Interfaces"]
  node_printbuf["AHB Print Buffer<br/>[AHBPRINTBUF.v]"]
  node_uart_bus["AHB UART<br/>[AHBUART.v]"]
  node_uart_tx["UART Transmitter<br/>[uart_tx.v]"]
  node_uart_rx["UART Receiver<br/>[uart_rx.v]"]
  node_baud["Baud Generator<br/>[baudgen.v]"]
  node_fifo["FIFO Buffer<br/>[fifo.v]"]
end

subgraph group_display["Display Output"]
  node_vga_system["AHB VGA System<br/>[AHBVGASYS.v]"]
  node_console["VGA Console<br/>[vga_console.v]"]
  node_image["VGA Image<br/>[vga_image.v]"]
  node_font[("Font ROM<br/>[font_rom.v]")]
  node_sync["VGA Sync<br/>[vga_sync.v]"]
  node_counter["Counter<br/>[counter.v]"]
end

node_software(("Firmware"))

node_software -.->|"loads firmware"| node_integration
node_integration -.->|"integrates core"| node_core_logic
node_integration -.->|"connects system"| node_system
node_system -.->|"routes requests"| node_decoder
node_system -.->|"selects responses"| node_mux
node_system -.->|"accesses memory"| node_bram
node_bram -.->|"reads and writes"| node_ram
node_system -.->|"accesses buffer"| node_printbuf
node_system -.->|"accesses UART"| node_uart_bus
node_uart_bus -.->|"transmits data"| node_uart_tx
node_uart_bus -.->|"receives data"| node_uart_rx
node_uart_bus -.->|"sets baud timing"| node_baud
node_uart_bus -.->|"buffers data"| node_fifo
node_system -.->|"accesses display"| node_vga_system
node_vga_system -.->|"drives console"| node_console
node_vga_system -.->|"drives image"| node_image
node_console -.->|"reads glyphs"| node_font
node_vga_system -.->|"generates sync"| node_sync
node_vga_system -.->|"tracks position"| node_counter

click node_integration "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/CORTEXM0INTEGRATION.v"
click node_core_logic "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/cortexm0ds_logic.v"
click node_system "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBLITE_SYS.v"
click node_decoder "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBDCD.v"
click node_mux "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBMUX.v"
click node_bram "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHB2BRAM.v"
click node_ram "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/dual_port_ram_sync.v"
click node_printbuf "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBPRINTBUF.v"
click node_uart_bus "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBUART.v"
click node_uart_tx "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/uart_tx.v"
click node_uart_rx "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/uart_rx.v"
click node_baud "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/baudgen.v"
click node_fifo "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/fifo.v"
click node_vga_system "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBVGASYS.v"
click node_console "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_console.v"
click node_image "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_image.v"
click node_font "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/font_rom.v"
click node_sync "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_sync.v"
click node_counter "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/counter.v"
click node_clock "https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/BUFG.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_integration,node_core_logic,node_clock toneBlue
class node_system,node_decoder,node_mux,node_bram,node_ram toneAmber
class node_printbuf,node_uart_bus,node_uart_tx,node_uart_rx,node_baud,node_fifo toneMint
class node_vga_system,node_console,node_image,node_font,node_sync,node_counter toneRose
class node_software toneIndigo
```

## Components

### Processor Core

- [Cortex-M0 Integration](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/CORTEXM0INTEGRATION.v): `M0_SOC_RTL/CORTEXM0INTEGRATION.v`
- [Core Logic](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/cortexm0ds_logic.v): `M0_SOC_RTL/cortexm0ds_logic.v`
- [Clock Buffer](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/BUFG.v): `M0_SOC_RTL/BUFG.v`

### System Fabric

- [AHB Lite System](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBLITE_SYS.v): `M0_SOC_RTL/AHBLITE_SYS.v`
- [AHB Decoder](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBDCD.v): `M0_SOC_RTL/AHBDCD.v`
- [AHB Mux](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBMUX.v): `M0_SOC_RTL/AHBMUX.v`
- [AHB BRAM](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHB2BRAM.v): `M0_SOC_RTL/AHB2BRAM.v`
- [Dual-Port RAM](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/dual_port_ram_sync.v): `M0_SOC_RTL/dual_port_ram_sync.v`

### Peripheral Interfaces

- [AHB Print Buffer](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBPRINTBUF.v): `M0_SOC_RTL/AHBPRINTBUF.v`
- [AHB UART](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBUART.v): `M0_SOC_RTL/AHBUART.v`
- [UART Transmitter](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/uart_tx.v): `M0_SOC_RTL/uart_tx.v`
- [UART Receiver](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/uart_rx.v): `M0_SOC_RTL/uart_rx.v`
- [Baud Generator](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/baudgen.v): `M0_SOC_RTL/baudgen.v`
- [FIFO Buffer](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/fifo.v): `M0_SOC_RTL/fifo.v`

### Display Output

- [AHB VGA System](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/AHBVGASYS.v): `M0_SOC_RTL/AHBVGASYS.v`
- [VGA Console](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_console.v): `M0_SOC_RTL/vga_console.v`
- [VGA Image](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_image.v): `M0_SOC_RTL/vga_image.v`
- [Font ROM](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/font_rom.v): `M0_SOC_RTL/font_rom.v`
- [VGA Sync](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/vga_sync.v): `M0_SOC_RTL/vga_sync.v`
- [Counter](https://github.com/raitonsemi/corex_m0/blob/main/M0_SOC_RTL/counter.v): `M0_SOC_RTL/counter.v`

### Other components

- **Firmware**

## Connections

- Firmware → Cortex-M0 Integration: loads firmware
- Cortex-M0 Integration → Core Logic: integrates core
- Cortex-M0 Integration → AHB Lite System: connects system
- AHB Lite System → AHB Decoder: routes requests
- AHB Lite System → AHB Mux: selects responses
- AHB Lite System → AHB BRAM: accesses memory
- AHB BRAM → Dual-Port RAM: reads and writes
- AHB Lite System → AHB Print Buffer: accesses buffer
- AHB Lite System → AHB UART: accesses UART
- AHB UART → UART Transmitter: transmits data
- AHB UART → UART Receiver: receives data
- AHB UART → Baud Generator: sets baud timing
- AHB UART → FIFO Buffer: buffers data
- AHB Lite System → AHB VGA System: accesses display
- AHB VGA System → VGA Console: drives console
- AHB VGA System → VGA Image: drives image
- VGA Console → Font ROM: reads glyphs
- AHB VGA System → VGA Sync: generates sync
- AHB VGA System → Counter: tracks position
