# mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn architecture

> Architecture diagram of the GitHub repository mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn
- Repository: https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn

## Overview

APIC_A is a tapeout-oriented GF180MCU accelerator that runs a quantized MNIST GAN generator. Its principal workflow converts a checkpoint to INT8 assets, tiles dense layers across a 4×4 DLA, then applies software-defined bias, requantization and activations to produce an image. The documented hardware includes a controller, PE array, SRAM-backed operand buffers, a flip-flop result buffer and a serial host bridge. Verification and physical-design/signoff are important companion branches. RTL paths are not present in the supplied tree, so those nodes use null paths; those relationships rely on the README, not inspected RTL.

Main entry points: [`scripts/ckpt_to_vh.py`](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/ckpt_to_vh.py) (INT8 Quantization), [`scripts/gen_g300_int8_assets.py`](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_g300_int8_assets.py) (GAN Asset Calibration), [`scripts/gen_d3004_vectors.py`](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_d3004_vectors.py) (Golden Vectors), [`librelane/connect_power.py`](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/librelane/connect_power.py) (PDN Ring Connector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_software["Model and Assets"]
  node_checkpoint["FP32 Checkpoint"]
  node_quantize["INT8 Quantization<br/>[ckpt_to_vh.py]"]
  node_memassets["Memory Assets"]
  node_assetgen["GAN Asset Calibration"]
end

subgraph group_compute["Accelerator"]
  node_pipeline["GAN Tiling Orchestrator"]
  node_controller["Transaction Controller"]
  node_pearray["INT8 PE Array"]
  node_abuffers[("A/B SRAM Buffers")]
  node_cbuffer[("C Result Buffer")]
  node_serial["Serial Host Bridge"]
  node_output["Generated Image"]
end

subgraph group_validation["Verification"]
  node_vectors["Golden Vectors"]
  node_rtlverify["Bit-True RTL Checks"]
  node_gatesim["Gate-Level Simulation"]
end

subgraph group_physical["Physical Design"]
  node_physicalflow["RTL-to-GDS Flow"]
  node_srammacros[("GF180 SRAM Macros")]
  node_powerconnect["PDN Ring Connector<br/>[connect_power.py]"]
  node_gds["Signed-Off GDS"]
end

node_engineer(("Model User"))

node_engineer -->|"provides"| node_checkpoint
node_checkpoint -->|"quantizes"| node_quantize
node_quantize -->|"exports weights"| node_memassets
node_engineer -->|"calibrates assets"| node_assetgen
node_assetgen -->|"emits assets"| node_memassets
node_memassets -->|"loads tiles"| node_pipeline
node_pipeline -->|"starts transactions"| node_controller
node_controller -->|"sequences MACs"| node_pearray
node_pipeline -->|"writes operands"| node_abuffers
node_abuffers -->|"supplies operands"| node_pearray
node_pearray -->|"writes accumulators"| node_cbuffer
node_pipeline -->|"reads results"| node_cbuffer
node_pipeline -->|"activates layers"| node_output
node_engineer -->|"sends commands"| node_serial
node_serial -->|"frames commands"| node_pipeline
node_engineer -->|"generates references"| node_vectors
node_vectors -->|"checks outputs"| node_rtlverify
node_pipeline -->|"provides RTL results"| node_rtlverify
node_rtlverify -->|"validates layout netlist"| node_gatesim
node_physicalflow -->|"integrates macros"| node_srammacros
node_physicalflow -->|"uses connector"| node_powerconnect
node_physicalflow -->|"produces layout"| node_gds

click node_quantize "https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/ckpt_to_vh.py"
click node_assetgen "https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_g300_int8_assets.py"
click node_vectors "https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_d3004_vectors.py"
click node_powerconnect "https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/librelane/connect_power.py"

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_checkpoint,node_quantize,node_memassets,node_assetgen,node_engineer toneBlue
class node_pipeline,node_controller,node_pearray,node_abuffers,node_cbuffer,node_serial,node_output toneAmber
class node_vectors,node_rtlverify,node_gatesim toneMint
class node_physicalflow,node_srammacros,node_powerconnect,node_gds toneRose
```

## Components

### Model and Assets

- **FP32 Checkpoint**
- [INT8 Quantization](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/ckpt_to_vh.py): `scripts/ckpt_to_vh.py`
- **Memory Assets**
- [GAN Asset Calibration](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_g300_int8_assets.py): `scripts/gen_g300_int8_assets.py`

### Accelerator

- **GAN Tiling Orchestrator**
- **Transaction Controller**
- **INT8 PE Array**
- **A/B SRAM Buffers**
- **C Result Buffer**
- **Serial Host Bridge**
- **Generated Image**

### Verification

- [Golden Vectors](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/scripts/gen_d3004_vectors.py): `scripts/gen_d3004_vectors.py`
- **Bit-True RTL Checks**
- **Gate-Level Simulation**

### Physical Design

- **RTL-to-GDS Flow**
- **GF180 SRAM Macros**
- [PDN Ring Connector](https://github.com/mpa216/deep-learning-accelerator-dla-engine-from-cnn-to-genai-snn/blob/main/librelane/connect_power.py): `librelane/connect_power.py`
- **Signed-Off GDS**

### Other components

- **Model User**

## Connections

- Model User → FP32 Checkpoint: provides
- FP32 Checkpoint → INT8 Quantization: quantizes
- INT8 Quantization → Memory Assets: exports weights
- Model User → GAN Asset Calibration: calibrates assets
- GAN Asset Calibration → Memory Assets: emits assets
- Memory Assets → GAN Tiling Orchestrator: loads tiles
- GAN Tiling Orchestrator → Transaction Controller: starts transactions
- Transaction Controller → INT8 PE Array: sequences MACs
- GAN Tiling Orchestrator → A/B SRAM Buffers: writes operands
- A/B SRAM Buffers → INT8 PE Array: supplies operands
- INT8 PE Array → C Result Buffer: writes accumulators
- GAN Tiling Orchestrator → C Result Buffer: reads results
- GAN Tiling Orchestrator → Generated Image: activates layers
- Model User → Serial Host Bridge: sends commands
- Serial Host Bridge → GAN Tiling Orchestrator: frames commands
- Model User → Golden Vectors: generates references
- Golden Vectors → Bit-True RTL Checks: checks outputs
- GAN Tiling Orchestrator → Bit-True RTL Checks: provides RTL results
- Bit-True RTL Checks → Gate-Level Simulation: validates layout netlist
- RTL-to-GDS Flow → GF180 SRAM Macros: integrates macros
- RTL-to-GDS Flow → PDN Ring Connector: uses connector
- RTL-to-GDS Flow → Signed-Off GDS: produces layout
