# curry0622/vlsi-physical-design-automation architecture

> Architecture diagram of the GitHub repository curry0622/vlsi-physical-design-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/curry0622/vlsi-physical-design-automation
- Repository: https://github.com/curry0622/vlsi-physical-design-automation

## Overview

##### Project Type and Purpose
- This is a course‐project omnibus repository for “VLSI Physical Design Automation” homeworks 1–5.
- Each homework (HW1..HW5) is an independent command‐line tool or script collection that implements a different P&R, partitioning, floorplanning or legalization algorithm.
- There is no single “monolithic” application; instead you have five standalone pipelines, each with:
- Specification and report (PDF)
- Source code (C++, Python, shell scripts)
- Build artifacts (bin/hwX)
- Input testcases (various file formats)
- Output results (floorplan .floorplan, .def files, .csv, etc.)
- A verifier folder or grading wrapper

##### High‐Level File Structure Analysis
Top level:
- README.md (course overview)
- HW1 … HW5 directories
- .gitignore

Inside each HWn:
- CS6135_HWn_spec.pdf & report.pdf
- HWn/
– src/ (C++ sources, Makefile, judge.sh)
– python/ or scripts/ (for drawing or DEF writers)
– bin/hwX (compiled binary)
– output/ (result files)
– testcases/ (input nets, .cells, .hardblocks, .pl, etc.)
– verifier/ (scripts & executables to check correctness)
- HWn_grading/ (testcases + grading wrapper)

##### Key Insights from README
- HW1 uses an external P&R tool (Cadence Innovus).
- HW2..HW5 implement academic algorithms (FM partitioning, slicing floorplan, legalization, analog P&R) in C++/Python.

##### Detail Checklist
- One block per top‐level directory (HW1…HW5).
- Subblocks: src, bin, testcases, output, verifier.

## Diagram (Mermaid)

```mermaid
flowchart TD
  %% HW1 Pipeline (blue)
  subgraph "HW1 Pipeline" 
    direction TB
    HW1_spec["CS6135_HW1_spec.pdf"]:::hw1
    HW1_report["CS6135_HW1_111062625_report.pdf"]:::hw1
    HW1_src["Innovus Wrapper (main.py)"]:::hw1
    Innovus["Cadence Innovus"]:::ext
    HW1_exec["Run Script"]:::hw1
    HW1_out1["result.csv"]:::hw1
    HW1_out2["test.log"]:::hw1
    HW1_ver["Verifier"]:::hw1
  end

  HW1_spec -->|"specifies"| HW1_src
  HW1_report --> HW1_src
  HW1_src -->|"wraps"| Innovus
  Innovus -->|"outputs"| HW1_out1
  Innovus -->|"logs"| HW1_out2
  HW1_out1 --> HW1_ver
  HW1_out2 --> HW1_ver

  %% HW2 Pipeline (green)
  subgraph "HW2 FM-Partitioning Engine"
    direction TB
    HW2_spec["CS6135_HW2_spec.pdf"]:::hw2
    HW2_report["CS6135_HW2_111062625_report.pdf"]:::hw2
    HW2_src["Source & Build (src/)"]:::hw2
    HW2_bin["Binary (bin/hw2)"]:::hw2
    HW2_test["Testcases (*.cells, *.nets)"]:::hw2
    HW2_exec["Run (judge.sh)"]:::hw2
    HW2_out["Output (p2-*.out)"]:::hw2
    HW2_ver["Verifier (verifier/verify)"]:::hw2
  end

  HW2_spec --> HW2_src
  HW2_report --> HW2_src
  HW2_src -->|"compiles"| HW2_bin
  HW2_test -->|"input"| HW2_bin
  HW2_bin -->|"produces"| HW2_out
  HW2_out --> HW2_ver

  %% HW3 Pipeline (yellow)
  subgraph "HW3 Slicing Floorplanner"
    direction TB
    HW3_spec["CS6135_HW3_spec.pdf"]:::hw3
    HW3_report["CS6135_HW3_111062625_report.pdf"]:::hw3
    HW3_src["Source & Build (src/)"]:::hw3
    HW3_draw["Draw Script (scripts/draw.py)"]:::hw3
    HW3_bin["Binary (bin/hw3)"]:::hw3
    HW3_test["Testcases (*.hardblocks, *.nets, *.pl)"]:::hw3
    HW3_exec["Run (run.sh)"]:::hw3
    HW3_out["Output (*.floorplan)"]:::hw3
    HW3_ver["Verifier (verifier/verifier)"]:::hw3
  end

  HW3_spec --> HW3_src
  HW3_report --> HW3_src
  HW3_src -->|"compiles"| HW3_bin
  HW3_draw --> HW3_bin
  HW3_test -->|"input"| HW3_bin
  HW3_bin --> HW3_out
  HW3_out --> HW3_ver

  %% HW4 Pipeline (orange)
  subgraph "HW4 Legalizer"
    direction TB
    HW4_spec["CS6135_HW4_spec.pdf"]:::hw4
    HW4_report["CS6135_HW4_111062625_report.pdf"]:::hw4
    HW4_src["Source & Build (src/)"]:::hw4
    HW4_bin["Binary (bin/hw4)"]:::hw4
    HW4_test["Testcases (*.aux, .node, .pl, .scl)"]:::hw4
    HW4_exec["Run (judge.sh)"]:::hw4
    HW4_out["Output (*.result)"]:::hw4
    HW4_ver["Verifier (verifier/verify)"]:::hw4
  end

  HW4_spec --> HW4_src
  HW4_report --> HW4_src
  HW4_src -->|"compiles"| HW4_bin
  HW4_test -->|"input"| HW4_bin
  HW4_bin --> HW4_out
  HW4_out --> HW4_ver

  %% HW5 Pipeline (purple)
  subgraph "HW5 Analog P&R & DEF Generator"
    direction TB
    HW5_spec["CS6135_HW5_spec.pdf"]:::hw5
    HW5_report["CS6135_HW5_111062625_report.pdf"]:::hw5
    HW5_src["Source & Build (src/)"]:::hw5
    HW5_py["Python DEF Generator (python/)"]:::hw5
    HW5_bin["Binary (bin/hw5)"]:::hw5
    HW5_exec["Run (judge.sh)"]:::hw5
    HW5_out["Output (*.def)"]:::hw5
    HW5_ver["Verifier (HW5_grading/verifier/verify)"]:::hw5
  end

  HW5_spec --> HW5_src
  HW5_report --> HW5_src
  HW5_src -->|"compiles"| HW5_bin
  HW5_py -->|"writes"| HW5_out
  HW5_bin --> HW5_out
  HW5_out --> HW5_ver

  %% Click Events
  click HW1_spec "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW1/CS6135_HW1_spec.pdf"
  click HW1_report "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW1/CS6135_HW1_111062625_report.pdf"
  click HW1_src "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW1/main.py"
  click HW1_out1 "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW1/result.csv"
  click HW1_out2 "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW1/test.log"

  click HW2_src "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW2/HW2/src/"
  click HW2_bin "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW2/HW2/bin/hw2"
  click HW2_test "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW2/HW2/testcases/"
  click HW2_out "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW2/HW2/output/"

  click HW3_src "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW3/HW3/src/"
  click HW3_draw "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW3/HW3/scripts/draw.py"
  click HW3_bin "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW3/HW3/bin/hw3"
  click HW3_test "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW3/HW3/testcases/"
  click HW3_out "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW3/HW3/output/"

  click HW4_src "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW4/HW4/src/"
  click HW4_bin "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW4/HW4/bin/hw4"
  click HW4_test "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW4/HW4/testcase/"
  click HW4_out "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW4/HW4/output/"

  click HW5_src "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW5/HW5/src/"
  click HW5_py "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW5/HW5/python/write_def.py"
  click HW5_py "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW5/HW5/python/main.py"
  click HW5_py "https://github.com/curry0622/vlsi-physical-design-automation/blob/master/HW5/HW5/python/myObject.py"
  click HW5_bin "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW5/HW5/bin/hw5"
  click HW5_out "https://github.com/curry0622/vlsi-physical-design-automation/tree/master/HW5/HW5/output/"

  %% Styles
  classDef hw1 fill:#D0E8FF,stroke:#005B96,color:#000;
  classDef hw2 fill:#D6F5D6,stroke:#1A7F1A,color:#000;
  classDef hw3 fill:#FFF5A9,stroke:#B38B00,color:#000;
  classDef hw4 fill:#FFDAB9,stroke:#FF7F50,color:#000;
  classDef hw5 fill:#E3D4FF,stroke:#7058A1,color:#000;
  classDef ext fill:#F0F0F0,stroke:#999,color:#000,stroke-dasharray: 5 5;
```
