# divyamgoyal-github/rtl_design architecture

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

- Interactive diagram: https://gitdiagram.com/divyamgoyal-github/rtl_design
- Repository: https://github.com/divyamgoyal-github/rtl_design

## Overview

##### Project type and purpose
- This is a learning‐focused repository documenting a 5-day RTL design and synthesis bootcamp using open-source EDA tools (Icarus Verilog, GTKWave, Yosys) and the Sky130 PDK.
- It’s not a deployable application but a guided record of the end-to-end digital design flow: RTL coding → simulation → synthesis → gate-level verification → optimization.

##### File structure
- Top level:
- Day_1 … Day_5 directories, each containing a README.md (concept explanations + labs) and an assets folder (waveform screenshots, code snippets).
- A root README.md summarizing the entire week’s scope, tools, and outcomes.
- This clearly reflects a sequential pipeline (Day 1 foundations → Day 5 advanced optimizations).
- No “src” or “lib” folders because the focus is on lab code rather than a reusable library.

##### README for additional insights
- The README outlines the typical EDA flow:
1. Write RTL in Verilog
2. Simulate with Icarus Verilog testbenches
3. View waveforms in GTKWave
4. Synthesize with Yosys against Sky130 libraries
5. Perform gate-level simulation (GLS) and debug mismatches
6. Iterate optimizations (timing, area, sequential logic)
- Key technologies: Verilog HDL, Icarus Verilog, GTKWave, Yosys, Sky130 PDK.

##### Details to capture
- Iterative nature: RTL ↔ simulation/verification ↔ synthesis
- Distinct phases: simulation vs synthesis vs gate-level verification
- Tools at each stage plus their inputs/outputs (files, netlists, waveforms)
- Relationship of Sky130 PDK libraries to the synthesis engine

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Project Overview
    subgraph "Project Overview"
        PO["Overview (README.md)"]:::code
    end

    %% Day 1: RTL Coding & Simulation
    subgraph "Day 1: RTL Coding & Simulation"
        D1Readme["README.md"]:::code
        D1Assets["Assets"]:::code
        D1RTL["RTL Code (.v files)"]:::code
        D1TB["Testbench (.v files)"]:::code
        IVeril1["Icarus Verilog"]:::tool
        GTK1["GTKWave"]:::tool
    end

    %% Day 2: Introduction to Synthesis
    subgraph "Day 2: Introduction to Synthesis"
        D2Readme["README.md"]:::code
        D2Assets["Assets"]:::code
        D2RTL["RTL Code"]:::code
        Yosys["Yosys Synthesizer"]:::synth
        SkyLib["Sky130 Libraries"]:::lib
        D2Netlist["Netlist"]:::lib
    end

    %% Day 3: Synthesis Optimization & Timing Constraints
    subgraph "Day 3: Optimization & Timing"
        D3Readme["README.md"]:::code
        D3Assets["Assets"]:::code
        Constraints["Timing Constraints (.sdc)"]:::code
        YosysOpt["Yosys Synthesizer"]:::synth
        OptimNetlist["Optimized Netlist"]:::lib
    end

    %% Day 4: Gate-Level Netlist & Simulation Debugging
    subgraph "Day 4: Gate-Level Simulation"
        D4Readme["README.md"]:::code
        D4Assets["Assets"]:::code
        GLSim["Gate-Level Netlist"]:::lib
        D4TB["GL Testbench"]:::code
        IVeril2["Icarus Verilog (GLS)"]:::tool
        GTK2["GTKWave"]:::tool
    end

    %% Day 5: Advanced RTL & Scalable Design
    subgraph "Day 5: Advanced RTL Constructs"
        D5Readme["README.md"]:::code
        D5Assets["Assets"]:::code
        AdvRTL["Advanced RTL Code"]:::code
        D5Sim["Icarus Verilog"]:::tool
        AdvGTK["GTKWave"]:::tool
    end

    %% Flow Connections
    PO --> D1Readme
    D1Readme --> D1RTL
    D1Assets --> D1RTL
    D1RTL --> IVeril1 --> GTK1
    D1TB --> IVeril1
    GTK1 -->|feedback| D1RTL

    GTK1 --> D2RTL
    D2Readme --> D2RTL
    D2Assets --> D2RTL
    D2RTL --> Yosys
    SkyLib --> Yosys
    Yosys --> D2Netlist

    D2Netlist --> YosysOpt
    D3Readme --> Constraints
    D3Assets --> Constraints
    Constraints --> YosysOpt
    YosysOpt --> OptimNetlist
    OptimNetlist -->|feedback| Constraints

    OptimNetlist --> GLSim
    D4Readme --> GLSim
    D4Assets --> GLSim
    GLSim --> IVeril2 --> GTK2
    D4TB --> IVeril2
    GTK2 -->|feedback| GLSim

    GTK2 --> AdvRTL
    D5Readme --> AdvRTL
    D5Assets --> AdvRTL
    AdvRTL --> D5Sim --> AdvGTK
    AdvGTK -->|feedback| AdvRTL

    %% Click Events
    click PO "https://github.com/divyamgoyal-github/rtl_design/blob/main/README.md"
    click D1Readme "https://github.com/divyamgoyal-github/rtl_design/blob/main/Day_1/README.md"
    click D1Assets "https://github.com/divyamgoyal-github/rtl_design/tree/main/Day_1/assets"
    click D2Readme "https://github.com/divyamgoyal-github/rtl_design/blob/main/Day_2/README.md"
    click D2Assets "https://github.com/divyamgoyal-github/rtl_design/tree/main/Day_2/assets"
    click D3Readme "https://github.com/divyamgoyal-github/rtl_design/blob/main/Day_3/README.md"
    click D3Assets "https://github.com/divyamgoyal-github/rtl_design/tree/main/Day_3/assets"
    click D4Readme "https://github.com/divyamgoyal-github/rtl_design/blob/main/Day_4/README.md"
    click D4Assets "https://github.com/divyamgoyal-github/rtl_design/tree/main/Day_4/assets"
    click D5Readme "https://github.com/divyamgoyal-github/rtl_design/blob/main/Day_5/README.md"
    click D5Assets "https://github.com/divyamgoyal-github/rtl_design/tree/main/Day_5/assets"

    %% Styles
    classDef code fill:#D0E6FF,stroke:#0366d6,color:#0366d6;
    classDef tool fill:#DFF5D8,stroke:#28a745,color:#28a745;
    classDef synth fill:#FFE5B4,stroke:#FF8C00,color:#FF8C00;
    classDef lib fill:#FFF4C1,stroke:#FFD700,color:#B8860B;
```
