# sukanyasmeher/sfal-vsd architecture

> Architecture diagram of the GitHub repository sukanyasmeher/sfal-vsd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sukanyasmeher/sfal-vsd
- Repository: https://github.com/sukanyasmeher/sfal-vsd

## Overview

##### Project type and purpose
- This repository “sfal-vsd” is not a web app, but an educational hardware-design tutorial. It walks a user through RTL design in Verilog, open-source synthesis/simulation (Icarus/GTKWave/Yosys), then Synopsys flows (Design Compiler, DFT, STA, ICC2) and finally PVT-corner timing analysis.

##### File structure
- Top-level docs (README.md, tutorials.md, AdvancedPhysicalDesign.md) describe Day-by-Day labs.
- old_sky130_lib holds a legacy copy of the SkyWater 130nm PDK.
- No code folders—source files (Verilog, TCL, SDC) are referenced in the tutorials.
- Assets (images) are embedded in README to illustrate tool outputs.

##### README for technical stack
- Tools: Iverilog, GTKWave (simulation), Yosys (open-source synthesis), Synopsys DC (logic synthesis), DFT compiler, PrimeTime (STA), ICC2 (physical compile).
- PDKs: sky130_fd_sc_hd (multiple PVT libs), AVSD DAC & PLL libraries.
- Workflows: RTL → Synthesis → Gate-Level Simulation → DFT → STA → PVT analyses.

##### Main components
- Verilog RTL (lab source files & testbenches)
- PDK Libraries folder (old_sky130_lib + downloaded .lib files)
- Iverilog → .vcd waveforms → GTKWave
- Yosys + sky130 PDK → synthesized netlist → GLS with primitives and sky130 cells
- Synopsys Design Compiler + SDC constraints → gate-level netlist
- DFT Compiler → scan-enabled netlist → scan chains
- STA (PrimeTime) using timing .db libraries → slack reports
- ICC2 (GUI) for physical database
d. Outputs (rightmost):
- Waveform screenshots (GTKWave, GLS)
- Netlist files (.v, _net.v, _net_sdc.v)
- Reports: QoR, timing (setup/hold), PVT slack graphs
- Lab deliverables (labs Day0–Day14)

##### Relationships & data flow
- Verilog RTL + PDK LIBS feed both open-source and Synopsys flows in parallel.
- Open-source flow is for early validation (Day0–Day3).
- Design Compiler flow takes the same RTL + SDC → netlist → post-synth simu.
- DFT and STA operate on the synthesized netlist, producing test‐patterns and timing analyses.
- ICC2 can import the netlist + DEF for backend placement/routing (Day5–Day6).

##### Architectural patterns & principles
- Linear pipeline: write RTL → simulate → synthesize → verify → analyze → physically compile.
- Modular structure: each lab/day is an independent stage/component.
- Reuse of PDK libs via link_library/read_liberty in DC and read_lib in lc_shell.
- Separation of concerns: open-source PoC vs. production Synopsys flows.

- A footnote listing key commands (read_verilog, synth −top, create_clock, read_sdc, compile_ultra, report_timing).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Documentation
    subgraph "Documentation"
        direction TB
        README["README.md"]:::doc
        TUT["tutorials.md"]:::doc
        ADV["AdvancedPhysicalDesign.md"]:::doc
    end

    %% Source Artifacts
    subgraph "Source Artifacts" 
        direction TB
        RTL["Verilog RTL & Testbenches"]:::source
        TLV["BabySoC Modeling & TLV"]:::source
        PDK["PDK Libraries"]:::datastore
    end

    %% Open-Source Flow
    subgraph "Open-Source Flow"
        direction TB
        IVER["Iverilog"]:::tool
        VCD[".vcd Waveforms"]:::output
        GTK["GTKWave"]:::tool
        YOS["Yosys + sky130 PDK"]:::tool
        SynthNL["Synthesized Netlist"]:::output
        GLS["GLS with Sky130 Cells"]:::output
    end

    %% Proprietary Flow
    subgraph "Proprietary Flow"
        direction TB
        DC["Synopsys DC Shell"]:::tool
        GNet["Gate-Level Netlist"]:::output
        DFT["DFT Compiler"]:::tool
        ScanNL["Scan-Enabled Netlist"]:::output
        STA["PrimeTime (STA)"]:::tool
        Slack["Slack Reports"]:::output
        ICC2["ICC2 GUI"]:::tool
        PhysDB["Physical DB & DEF"]:::output
    end

    %% Deliverables & Reports
    subgraph "Outputs & Deliverables"
        direction TB
        WFS["Waveform Screenshots"]:::output
        NTFILES["Netlist Files"]:::output
        REPS["QoR & Timing & PVT Reports"]:::output
        DELIV["Lab Deliverables (Day0–Day14)"]:::output
    end

    %% Data Flows
    RTL -.-> IVER
    RTL -.-> YOS
    RTL --> DC
    TLV -.-> YOS
    TLV --> DC
    PDK -.-> YOS
    PDK --> DC

    %% Open-Source details
    IVER -->|"read_verilog → compile → dump.vcd"| VCD
    VCD --> GTK
    YOS -->|"synth −top → read_lib"| SynthNL
    SynthNL --> GLS

    %% Proprietary details
    DC -->|"read_verilog & read_sdc → compile_ultra"| GNet
    GNet --> DFT
    DFT --> ScanNL
    GNet --> STA
    STA --> Slack
    GNet --> ICC2
    ICC2 --> PhysDB

    %% Outputs aggregation
    GTK --> WFS
    GLS --> WFS
    SynthNL --> NTFILES
    GNet --> NTFILES
    ScanNL --> NTFILES
    Slack --> REPS
    PhysDB --> REPS
    REPS --> DELIV

    %% Click Events
    click README "https://github.com/sukanyasmeher/sfal-vsd/blob/main/README.md"
    click TUT "https://github.com/sukanyasmeher/sfal-vsd/blob/main/tutorials.md"
    click ADV "https://github.com/sukanyasmeher/sfal-vsd/blob/main/AdvancedPhysicalDesign.md"
    click PDK "https://github.com/sukanyasmeher/sfal-vsd/tree/main/old_sky130_lib/"

    %% Styles
    classDef source fill:#bbf,stroke:#000
    classDef tool fill:#bfb,stroke:#000
    classDef output fill:#fb8,stroke:#000
    classDef datastore fill:#ddf,stroke:#000,stroke-dasharray: 5 5
    classDef doc fill:#eef,stroke:#000,stroke-dasharray: 2 2
```
