# ebube-ic/systolic-tensor-core-verilog architecture

> Architecture diagram of the GitHub repository ebube-ic/systolic-tensor-core-verilog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ebube-ic/systolic-tensor-core-verilog
- Repository: https://github.com/ebube-ic/systolic-tensor-core-verilog

## Overview

This repository implements a parameterized systolic matrix-multiplication accelerator with an AXI4-Lite host interface. The principal workflow is: a host stages matrices and configuration, dispatches execution, the core computes and post-processes results, then the host reads packed output rows. The graph follows relationships documented in the README; no RTL excerpts were available, so implementation-level wiring beyond those descriptions is not asserted. The package node represents documented shared types, dimensions, and register macros.

Main entry points: [`rtl/sv/tensor_core_axi.sv`](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_axi.sv) (AXI4-Lite Slave), [`rtl/sv/tensor_core_top.sv`](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_top.sv) (Core Integration), [`rtl/sv/systolic_grid.sv`](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/systolic_grid.sv) (Systolic Grid), [`rtl/sv/ping_pong_buffer.sv`](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/ping_pong_buffer.sv) (Ping-Pong Banks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host_bus["Host and Bus"]
  node_axi["AXI4-Lite Slave<br/>[tensor_core_axi.sv]"]
  node_registers["Mapped Registers<br/>[tensor_core_axi.sv]"]
end

subgraph group_staging_control["Staging and Control"]
  node_banks[("Ping-Pong Banks")]
  node_sequencer["Execution FSM<br/>[tensor_ctrl_fsm.sv]"]
  node_engine["Core Integration<br/>[tensor_core_top.sv]"]
  node_shared_defs["Shared Definitions<br/>[tensor_pkg.sv]"]
end

subgraph group_compute_mesh["Systolic Compute"]
  node_input_skew["Input Skew<br/>[skew_buffer.sv]"]
  node_mesh["Systolic Grid<br/>[systolic_grid.sv]"]
  node_pe["Multiply-Accumulate PE<br/>[pe.sv]"]
end

subgraph group_result_path["Result Processing"]
  node_output_deskew["Output Deskew<br/>[deskew_buffer.sv]"]
  node_quant["Quantize and ReLU<br/>[quant_relu.sv]"]
end

node_cpu(("Host CPU"))

node_cpu -->|"transacts with"| node_axi
node_axi -->|"decodes transactions"| node_registers
node_axi -->|"stages matrices"| node_banks
node_axi -->|"dispatches execution"| node_sequencer
node_axi -->|"reads status and results"| node_registers
node_banks -->|"stages compute data"| node_engine
node_sequencer -->|"sequences execution"| node_engine
node_engine -->|"feeds matrix streams"| node_input_skew
node_input_skew -->|"aligns inputs"| node_mesh
node_mesh -->|"uses processing elements"| node_pe
node_mesh -->|"produces staggered results"| node_output_deskew
node_output_deskew -->|"realigns results"| node_quant
node_quant -->|"post-processes outputs"| node_engine
node_engine -->|"latches results for readback"| node_axi

click node_axi "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_axi.sv"
click node_registers "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_axi.sv"
click node_banks "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/ping_pong_buffer.sv"
click node_sequencer "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_ctrl_fsm.sv"
click node_engine "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_top.sv"
click node_shared_defs "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_pkg.sv"
click node_input_skew "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/skew_buffer.sv"
click node_mesh "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/systolic_grid.sv"
click node_pe "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/pe.sv"
click node_output_deskew "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/deskew_buffer.sv"
click node_quant "https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/quant_relu.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_axi,node_registers toneBlue
class node_banks,node_sequencer,node_engine,node_shared_defs toneAmber
class node_input_skew,node_mesh,node_pe toneMint
class node_output_deskew,node_quant toneRose
class node_cpu toneIndigo
```

## Components

### Host and Bus

- [AXI4-Lite Slave](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_axi.sv): `rtl/sv/tensor_core_axi.sv`
- [Mapped Registers](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_axi.sv): `rtl/sv/tensor_core_axi.sv`

### Staging and Control

- [Ping-Pong Banks](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/ping_pong_buffer.sv): `rtl/sv/ping_pong_buffer.sv`
- [Execution FSM](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_ctrl_fsm.sv): `rtl/sv/tensor_ctrl_fsm.sv`
- [Core Integration](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_core_top.sv): `rtl/sv/tensor_core_top.sv`
- [Shared Definitions](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/tensor_pkg.sv): `rtl/sv/tensor_pkg.sv`

### Systolic Compute

- [Input Skew](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/skew_buffer.sv): `rtl/sv/skew_buffer.sv`
- [Systolic Grid](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/systolic_grid.sv): `rtl/sv/systolic_grid.sv`
- [Multiply-Accumulate PE](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/pe.sv): `rtl/sv/pe.sv`

### Result Processing

- [Output Deskew](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/deskew_buffer.sv): `rtl/sv/deskew_buffer.sv`
- [Quantize and ReLU](https://github.com/ebube-ic/systolic-tensor-core-verilog/blob/main/rtl/sv/quant_relu.sv): `rtl/sv/quant_relu.sv`

### Other components

- **Host CPU**

## Connections

- Host CPU → AXI4-Lite Slave: transacts with (evidence: `README.md`)
- AXI4-Lite Slave → Mapped Registers: decodes transactions (evidence: `README.md`)
- AXI4-Lite Slave → Ping-Pong Banks: stages matrices (evidence: `README.md`)
- AXI4-Lite Slave → Execution FSM: dispatches execution (evidence: `README.md`)
- AXI4-Lite Slave → Mapped Registers: reads status and results (evidence: `README.md`)
- Ping-Pong Banks → Core Integration: stages compute data (evidence: `README.md`)
- Execution FSM → Core Integration: sequences execution (evidence: `README.md`)
- Core Integration → Input Skew: feeds matrix streams (evidence: `README.md`)
- Input Skew → Systolic Grid: aligns inputs (evidence: `README.md`)
- Systolic Grid → Multiply-Accumulate PE: uses processing elements (evidence: `README.md`)
- Systolic Grid → Output Deskew: produces staggered results (evidence: `README.md`)
- Output Deskew → Quantize and ReLU: realigns results (evidence: `README.md`)
- Quantize and ReLU → Core Integration: post-processes outputs (evidence: `README.md`)
- Core Integration → AXI4-Lite Slave: latches results for readback (evidence: `README.md`)
