Skip to content

Commit 7d74268

Browse files
committed
update lecture notes
1 parent b9cd40f commit 7d74268

File tree

2 files changed

+253
-1
lines changed

2 files changed

+253
-1
lines changed

idea/Global Placement.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# Why HPWL is The Root of All Evil? 😈
2+
3+
**Presenter: [Your Name]**
4+
**Date: November 06, 2025**
5+
**Duration: 20 Minutes**
6+
7+
---
8+
9+
## Agenda 📋
10+
- Introduction to Global Placement (2 min)
11+
- HPWL: The Root of All Evil 😈 (2 min)
12+
- Analytical Placement Methods (3 min)
13+
- Enhancing Placement: Partitioning & Maps (2 min)
14+
- Challenges: Congestion & Timing (2 min)
15+
- Advanced Prediction Techniques (3 min)
16+
- Our Solution: Fairness Centric Approach (3 min)
17+
- Max-Min Fairness Explained (2 min)
18+
- Conclusion & Benefits (1 min)
19+
20+
🔍 Total: 20 Minutes
21+
22+
---
23+
24+
## What is Global Placement? 🛠️
25+
Global Placement is a key step in VLSI design where cells are positioned on the chip to optimize performance.
26+
27+
- **Goal**: Minimize wirelength while respecting constraints.
28+
- **Why it matters**: Affects power, performance, and area (PPA).
29+
30+
Emoji: 🔌
31+
32+
```mermaid
33+
graph TD
34+
A[Design Input] --> B[Global Placement]
35+
B --> C[Legalization]
36+
C --> D[Routing]
37+
D --> E[Final Chip]
38+
style B fill:#ffcc00,stroke:#333,stroke-width:2px
39+
```
40+
41+
---
42+
43+
## HPWL: Half-Perimeter Wire Length 📏
44+
HPWL is a common metric to estimate total wirelength.
45+
46+
- **Formula**: For a net with bounding box (x_min, x_max, y_min, y_max):
47+
HPWL = (x_max - x_min) + (y_max - y_min)
48+
- **Minimize Total Wirelength**: Sum of HPWL for all nets.
49+
- **The Root of All Evil** 😈: Poor placement leads to congestion, timing issues, and higher power consumption.
50+
51+
```mermaid
52+
pie title Wirelength Distribution
53+
"Short Wires" : 60
54+
"Medium Wires" : 30
55+
"Long Wires" : 10
56+
```
57+
58+
---
59+
60+
## Analytical Placement Methods 🧮
61+
Analytical methods model placement as an optimization problem.
62+
63+
- **Krylov Subspace Method**: Solves large linear systems efficiently. 🚀
64+
- **Conjugate Gradient Method**: Iterative solver for quadratic minimization. 📈
65+
- **Force Directed Method**: Simulates physical forces to spread cells. ⚡
66+
67+
Pros: Scalable for large designs.
68+
Cons: May ignore discrete nature of placement.
69+
70+
```mermaid
71+
flowchart LR
72+
Start[Optimization Problem] --> Krylov[Krylov Subspace]
73+
Start --> CG[Conjugate Gradient]
74+
Start --> FD[Force Directed]
75+
Krylov --> End[Optimal Placement]
76+
CG --> End
77+
FD --> End
78+
style Krylov fill:#00ff00,stroke:#333
79+
style CG fill:#ff9900,stroke:#333
80+
style FD fill:#3399ff,stroke:#333
81+
```
82+
83+
---
84+
85+
## Enhancing Placement Techniques 🗺️
86+
Beyond basics, incorporate:
87+
88+
- **Partitioning**: Divide the chip into regions for better management. 🧩
89+
- **Congestion Map**: Visualize overcrowded areas to guide adjustments. 📍
90+
- **Density Constraint**: Ensure even cell distribution to avoid hotspots. ⚖️
91+
92+
These help in achieving balanced designs.
93+
94+
```mermaid
95+
graph LR
96+
A[Global Placement] --> B[Partitioning]
97+
A --> C[Congestion Map]
98+
A --> D[Density Constraint]
99+
B --> E[Balanced Layout]
100+
C --> E
101+
D --> E
102+
style E fill:#ff00ff,stroke:#333,stroke-width:4px
103+
```
104+
105+
---
106+
107+
## Challenges: Congestion & Timing Problems ⚠️
108+
Congestion arises from poor wire distribution.
109+
110+
- **Congestion Problem****Timing Problem** (Unpredictable delays). ⏳
111+
- Impacts: Signal integrity, increased power, manufacturing issues.
112+
113+
Emoji: 🚧
114+
115+
```mermaid
116+
sequenceDiagram
117+
participant Placement
118+
participant Congestion
119+
participant Timing
120+
Placement->>Congestion: Overcrowded Wires
121+
Congestion->>Timing: Delays & Unpredictability
122+
Timing-->>Placement: Feedback Loop
123+
rect rgb(255, 0, 0)
124+
note over Congestion,Timing: Critical Bottleneck
125+
end
126+
```
127+
128+
---
129+
130+
## Pre-Routing Timing Prediction 🔮
131+
Predict timing before full routing to iterate faster.
132+
133+
- **Machine Learning Based**: Use models to estimate delays. 🤖
134+
- **Deep Reinforcement Learning (Google)**: AI agents optimize placements. 🧠
135+
- **GPU Acceleration (Nvidia)**: Speed up computations for large chips. ⚡
136+
137+
Enables proactive fixes.
138+
139+
```mermaid
140+
mindmap
141+
root((Timing Prediction))
142+
ML[Machine Learning]
143+
Data-Driven
144+
Accurate Estimates
145+
DRL["Deep RL (Google)"]
146+
Agent-Based
147+
Adaptive Learning
148+
GPU["GPU Accel (Nvidia)"]
149+
Parallel Processing
150+
Fast Simulations
151+
```
152+
153+
---
154+
155+
## Introducing Our Solution: Fairness Centric Global Placement 🌟
156+
Shift focus from average to equity.
157+
158+
- **Core Idea**: Prioritize fairness in wirelength distribution.
159+
- **Why?** Reduces the impact of outliers (long wires causing bottlenecks).
160+
161+
Emoji: ⚖️
162+
163+
```mermaid
164+
graph TD
165+
Traditional[Traditional: Minimize Average WL] -->|Inefficient| Problems[Congestion/Timing]
166+
Fairness[Fairness Centric: Minimize Worst WL] -->|Better| Success[Optimized Chip]
167+
style Fairness fill:#00ccff,stroke:#333
168+
```
169+
170+
---
171+
172+
## Max-Min Fairness Explained 📊
173+
Max-min fairness aims to maximize the minimum resource allocation.
174+
175+
- **In Placement**: Minimize the **worst** (longest) wirelength.
176+
- **Benefits**: Improves overall timing predictability and reduces congestion.
177+
- **Implementation**: Adjust optimization to target max HPWL.
178+
179+
```mermaid
180+
barChart
181+
title Wirelength Fairness Comparison
182+
x-axis Methods
183+
y-axis Wirelength (um)
184+
bar Traditional, 500
185+
bar Fairness, 300
186+
bar Traditional Worst, 1000
187+
bar Fairness Worst, 400
188+
```
189+
190+
---
191+
192+
## Conclusion & Benefits 🎉
193+
Fairness Centric Global Placement addresses key pain points in chip design.
194+
195+
- **Key Takeaways**: Move beyond average metrics; focus on the worst-case.
196+
- **Benefits**: Better timing, less congestion, scalable with ML/GPU.
197+
- **Future Work**: Integrate with more AI techniques.
198+
199+
Thank you! Questions? ❓

net_optim/quickstart.html

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
@luk036 👨‍💻
3232

33-
2025-06-17 📅
33+
2025-11-12 📅
3434

3535
---
3636

@@ -739,6 +739,59 @@
739739

740740
---
741741

742+
### Example
743+
744+
.pull-left[
745+
746+
Original:
747+
748+
.mermaid[
749+
<pre>
750+
graph LR
751+
A(("v1")) -- "TCP - 3" --> B(("v2"))
752+
A -. "2" .-> B
753+
B -- "TCP - 7" --> A
754+
B -. "4" .-> A
755+
</pre>
756+
]
757+
]
758+
.pull-right[
759+
Modified:
760+
761+
.mermaid[
762+
<pre>
763+
graph LR
764+
A(("v1")) -- "TCP - 3" --> C("v3")
765+
A -. "2" .-> C
766+
C -. "0" .-> B(("v2"))
767+
B -- "TCP - 7" --> A
768+
B -. "4" .-> A
769+
</pre>
770+
]
771+
772+
]
773+
774+
---
775+
776+
### DiGraphX Example
777+
778+
```python
779+
TCP: float = 6.5
780+
digraph: Dict[str, Dict[str, float]] = {
781+
"v1": {"v2": TCP - 7, "v3": 2},
782+
"v2": {"v1": 4, "v3": 0},
783+
"v3": {"v1": TCP - 3},
784+
}
785+
dist: Dict[str, float] = {"v1": 0, "v2": 0, "v3": 0}
786+
beta, num_iter, _ = even(digraph, 10, dist)
787+
assert num_iter < 10
788+
assert beta == approx(1.0)
789+
assert dist == {"v1": -27.0, "v2": -28.5, "v3": -29.5}
790+
# v1: 2.5, v2: 1.0, v3: 0.0
791+
```
792+
793+
---
794+
742795
### Remarks (III)
743796

744797
- If there exists a negative cycle, it means that timing cannot be fixed using simply this technique.

0 commit comments

Comments
 (0)