# yashsharda2/cordic architecture

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

- Interactive diagram: https://gitdiagram.com/yashsharda2/cordic
- Repository: https://github.com/yashsharda2/cordic

## Overview

cordic130 is a hardened Sky130 ASIC implementing a 16-bit, fixed-point sine/cosine accelerator. The principal workflow is an MCU sending an angle over SPI; the target interface feeds the CORDIC engine, and the results are returned across the documented two-word frame. The repository also includes hardened layout and signoff outputs. The RTL excerpts were not provided, so the connections below rely on the README’s chip architecture and protocol descriptions rather than inspected RTL calls.

Main entry points: [`src/spi_target.v`](https://github.com/yashsharda2/cordic/blob/main/src/spi_target.v) (SPI Target), [`src/top.v`](https://github.com/yashsharda2/cordic/blob/main/src/top.v) (Chip Top), [`src/cordic_circular.v`](https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v) (CORDIC Engine), [`results/top.gds`](https://github.com/yashsharda2/cordic/blob/main/results/top.gds) (Hardened Layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["SPI Interface"]
  node_spi["SPI Target<br/>[spi_target.v]"]
end

subgraph group_compute["CORDIC Compute"]
  node_top["Chip Top<br/>[top.v]"]
  node_cordic["CORDIC Engine<br/>[cordic_circular.v]"]
  node_cos["Cosine Result<br/>[cordic_circular.v]"]
  node_sin["Sine Result<br/>[cordic_circular.v]"]
end

subgraph group_deliverables["Hardened Outputs"]
  node_layout["Hardened Layout<br/>[top.gds]"]
  node_signoff["Signoff Reports"]
end

node_host(("Host MCU"))

node_host -->|"sends SPI frame"| node_spi
node_spi -->|"provides angle"| node_top
node_top -->|"starts rotation"| node_cordic
node_cordic -->|"computes cosine"| node_cos
node_cordic -->|"computes sine"| node_sin
node_cos -->|"returns prior frame"| node_spi
node_sin -->|"returns current frame"| node_spi
node_top -.->|"hardened as"| node_layout
node_layout -->|"documented by"| node_signoff

click node_spi "https://github.com/yashsharda2/cordic/blob/main/src/spi_target.v"
click node_top "https://github.com/yashsharda2/cordic/blob/main/src/top.v"
click node_cordic "https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v"
click node_cos "https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v"
click node_sin "https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v"
click node_layout "https://github.com/yashsharda2/cordic/blob/main/results/top.gds"
click node_signoff "https://github.com/yashsharda2/cordic/tree/main/results/signoff"

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_spi toneBlue
class node_top,node_cordic,node_cos,node_sin toneAmber
class node_layout,node_signoff toneMint
class node_host toneIndigo
```

## Components

### SPI Interface

- [SPI Target](https://github.com/yashsharda2/cordic/blob/main/src/spi_target.v): `src/spi_target.v`

### CORDIC Compute

- [Chip Top](https://github.com/yashsharda2/cordic/blob/main/src/top.v): `src/top.v`
- [CORDIC Engine](https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v): `src/cordic_circular.v`
- [Cosine Result](https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v): `src/cordic_circular.v`
- [Sine Result](https://github.com/yashsharda2/cordic/blob/main/src/cordic_circular.v): `src/cordic_circular.v`

### Hardened Outputs

- [Hardened Layout](https://github.com/yashsharda2/cordic/blob/main/results/top.gds): `results/top.gds`
- [Signoff Reports](https://github.com/yashsharda2/cordic/tree/main/results/signoff): `results/signoff`

### Other components

- **Host MCU**

## Connections

- Host MCU → SPI Target: sends SPI frame (evidence: `README.md`)
- SPI Target → Chip Top: provides angle (evidence: `README.md`)
- Chip Top → CORDIC Engine: starts rotation (evidence: `README.md`)
- CORDIC Engine → Cosine Result: computes cosine (evidence: `README.md`)
- CORDIC Engine → Sine Result: computes sine (evidence: `README.md`)
- Cosine Result → SPI Target: returns prior frame (evidence: `README.md`)
- Sine Result → SPI Target: returns current frame (evidence: `README.md`)
- Chip Top → Hardened Layout: hardened as (evidence: `README.md`)
- Hardened Layout → Signoff Reports: documented by (evidence: `README.md`)
