# twweeb/vlsi-physical-design-automation architecture

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

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

## Overview

This repository contains four VLSI physical-design assignment programs: min-cut partitioning, fixed-outline floorplanning, global placement, and global routing. The user-facing workflow is to run an assignment on design input and obtain a partition, floorplan, placement, or routing result. Placement has explicit global-placement, legalization, and conditional detail-placement stages; routing runs initial routing, selects a candidate, optionally rip-ups and reroutes, then writes a result. Source excerpts are limited, so links between unsampled internals are omitted rather than inferred.

Main entry points: [`HW4 - Global Placement/submit/src/main.cpp`](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/main.cpp) (Placement Runner), [`HW3 - Fixed-outline Floorplan Design/submit/src/Floorplan.cpp`](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Floorplan.cpp) (Floorplan Search), [`HW5 - Global Routing/submit/src/main.cpp`](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/main.cpp) (Routing Runner), [`HW5 - Global Routing/submit/src/Router.cpp`](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Router.cpp) (Global Router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_partition["Min-cut Partitioning"]
  node_mincut["Min-cut Solver<br/>[main.cpp]"]
end

subgraph group_floorplan["Fixed-outline Floorplan"]
  node_fp_entry["Floorplan Runner<br/>[main.cpp]"]
  node_fp_engine["Floorplan Search<br/>[Floorplan.cpp]"]
  node_fp_parser["Design Parser<br/>[Parser.cpp]"]
  node_fp_tree["B*-tree Packing<br/>[BStree.cpp]"]
  node_fp_contour["Contour Packing<br/>[Contour.cpp]"]
  node_fp_result["Floorplan Output<br/>[Parser.cpp]"]
end

subgraph group_placement["Global Placement"]
  node_place_entry["Placement Runner<br/>[main.cpp]"]
  node_placement_data["Placement Design<br/>[Placement.h]"]
  node_global_place["Global Optimizer<br/>[GlobalPlacer.cpp]"]
  node_objective["Placement Objective"]
  node_legalize["Legalization<br/>[TetrisLegal.h]"]
  node_detail_place["Detail Placement<br/>[DPlace.h]"]
  node_place_result["Placement Files<br/>[main.cpp]"]
end

subgraph group_routing["Global Routing"]
  node_route_entry["Routing Runner<br/>[main.cpp]"]
  node_router["Global Router<br/>[Router.cpp]"]
  node_route_net["Routing Nets<br/>[Net.cpp]"]
  node_route_path["Grid Paths<br/>[Path.cpp]"]
  node_route_result["Route Output<br/>[Router.cpp]"]
end

node_engineer(("EDA User"))

node_engineer -.->|"runs"| node_mincut
node_engineer -.->|"runs"| node_fp_entry
node_engineer -.->|"runs"| node_place_entry
node_engineer -.->|"runs"| node_route_entry
node_fp_entry -->|"starts"| node_fp_engine
node_fp_engine -->|"uses"| node_fp_parser
node_fp_engine -->|"uses"| node_fp_tree
node_fp_engine -->|"uses"| node_fp_contour
node_fp_parser -->|"populates"| node_fp_tree
node_fp_parser -->|"writes"| node_fp_result
node_place_entry -->|"loads design"| node_placement_data
node_place_entry -->|"runs"| node_global_place
node_place_entry -->|"runs"| node_legalize
node_place_entry -->|"runs"| node_detail_place
node_global_place -->|"uses"| node_objective
node_global_place -.->|"updates"| node_placement_data
node_legalize -.->|"updates"| node_placement_data
node_detail_place -.->|"updates"| node_placement_data
node_place_entry -->|"writes"| node_place_result
node_route_entry -->|"runs"| node_router
node_router -->|"uses"| node_route_net
node_router -->|"uses"| node_route_path
node_route_entry -->|"reroutes"| node_router
node_route_entry -->|"writes"| node_route_result

click node_mincut "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW2%20-%20Two-way%20Min-cut%20Partitioning/submit/src/main.cpp"
click node_fp_entry "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/main.cpp"
click node_fp_engine "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Floorplan.cpp"
click node_fp_parser "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Parser.cpp"
click node_fp_tree "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/BStree.cpp"
click node_fp_contour "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Contour.cpp"
click node_fp_result "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Parser.cpp"
click node_place_entry "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/main.cpp"
click node_placement_data "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/Placement.h"
click node_global_place "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/GlobalPlacer.cpp"
click node_objective "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/ExampleFunction.cpp"
click node_legalize "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/TetrisLegal.h"
click node_detail_place "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/DPlace.h"
click node_place_result "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/main.cpp"
click node_route_entry "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/main.cpp"
click node_router "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Router.cpp"
click node_route_net "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Net.cpp"
click node_route_path "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Path.cpp"
click node_route_result "https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Router.cpp"

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_mincut,node_engineer toneBlue
class node_fp_entry,node_fp_engine,node_fp_parser,node_fp_tree,node_fp_contour,node_fp_result toneAmber
class node_place_entry,node_placement_data,node_global_place,node_objective,node_legalize,node_detail_place,node_place_result toneMint
class node_route_entry,node_router,node_route_net,node_route_path,node_route_result toneRose
```

## Components

### Min-cut Partitioning

- [Min-cut Solver](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW2%20-%20Two-way%20Min-cut%20Partitioning/submit/src/main.cpp): `HW2 - Two-way Min-cut Partitioning/submit/src/main.cpp`

### Fixed-outline Floorplan

- [Floorplan Runner](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/main.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/main.cpp`
- [Floorplan Search](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Floorplan.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/Floorplan.cpp`
- [Design Parser](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Parser.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/Parser.cpp`
- [B*-tree Packing](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/BStree.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/BStree.cpp`
- [Contour Packing](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Contour.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/Contour.cpp`
- [Floorplan Output](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW3%20-%20Fixed-outline%20Floorplan%20Design/submit/src/Parser.cpp): `HW3 - Fixed-outline Floorplan Design/submit/src/Parser.cpp`

### Global Placement

- [Placement Runner](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/main.cpp): `HW4 - Global Placement/submit/src/main.cpp`
- [Placement Design](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/Placement.h): `HW4 - Global Placement/submit/include/Placement.h`
- [Global Optimizer](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/GlobalPlacer.cpp): `HW4 - Global Placement/submit/src/GlobalPlacer.cpp`
- [Placement Objective](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/ExampleFunction.cpp): `HW4 - Global Placement/submit/src/ExampleFunction.cpp`
- [Legalization](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/TetrisLegal.h): `HW4 - Global Placement/submit/include/TetrisLegal.h`
- [Detail Placement](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/include/DPlace.h): `HW4 - Global Placement/submit/include/DPlace.h`
- [Placement Files](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW4%20-%20Global%20Placement/submit/src/main.cpp): `HW4 - Global Placement/submit/src/main.cpp`

### Global Routing

- [Routing Runner](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/main.cpp): `HW5 - Global Routing/submit/src/main.cpp`
- [Global Router](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Router.cpp): `HW5 - Global Routing/submit/src/Router.cpp`
- [Routing Nets](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Net.cpp): `HW5 - Global Routing/submit/src/Net.cpp`
- [Grid Paths](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Path.cpp): `HW5 - Global Routing/submit/src/Path.cpp`
- [Route Output](https://github.com/twweeb/vlsi-physical-design-automation/blob/master/HW5%20-%20Global%20Routing/submit/src/Router.cpp): `HW5 - Global Routing/submit/src/Router.cpp`

### Other components

- **EDA User**

## Connections

- EDA User → Min-cut Solver: runs
- EDA User → Floorplan Runner: runs
- EDA User → Placement Runner: runs
- EDA User → Routing Runner: runs
- Floorplan Runner → Floorplan Search: starts (evidence: `HW3 - Fixed-outline Floorplan Design/submit/src/main.cpp`)
- Floorplan Search → Design Parser: uses
- Floorplan Search → B*-tree Packing: uses
- Floorplan Search → Contour Packing: uses
- Design Parser → B*-tree Packing: populates (evidence: `HW3 - Fixed-outline Floorplan Design/submit/src/Parser.cpp`)
- Design Parser → Floorplan Output: writes (evidence: `HW3 - Fixed-outline Floorplan Design/submit/src/Parser.cpp`)
- Placement Runner → Placement Design: loads design (evidence: `HW4 - Global Placement/submit/src/main.cpp`)
- Placement Runner → Global Optimizer: runs (evidence: `HW4 - Global Placement/submit/src/main.cpp`)
- Placement Runner → Legalization: runs (evidence: `HW4 - Global Placement/submit/src/main.cpp`)
- Placement Runner → Detail Placement: runs (evidence: `HW4 - Global Placement/submit/src/main.cpp`)
- Global Optimizer → Placement Objective: uses
- Global Optimizer → Placement Design: updates
- Legalization → Placement Design: updates (evidence: `HW4 - Global Placement/submit/include/TetrisLegal.h`)
- Detail Placement → Placement Design: updates (evidence: `HW4 - Global Placement/submit/include/DPlace.h`)
- Placement Runner → Placement Files: writes (evidence: `HW4 - Global Placement/submit/src/main.cpp`)
- Routing Runner → Global Router: runs (evidence: `HW5 - Global Routing/submit/src/main.cpp`)
- Global Router → Routing Nets: uses
- Global Router → Grid Paths: uses
- Routing Runner → Global Router: reroutes (evidence: `HW5 - Global Routing/submit/src/main.cpp`)
- Routing Runner → Route Output: writes (evidence: `HW5 - Global Routing/submit/src/main.cpp`)
