Unit 8: Layout Compaction: Course Contents
Unit 8: Layout Compaction: Course Contents
Course contents
Design rules
Symbolic layout
Constraint-graph compaction
Readings: Chapter 6
Unit 8 1
NTUEE / ntro. EDA
Design Rules
Design rules: Patterns and design
rules are often
restrictions on the mask
expressed in rules.
patterns to increase the
probability of successful
Most common design
rules:
fabrication. minimum-width rules (valid
for a mask pattern of a
specific layer): (a).
minimum-separation rules
(between mask patterns of
the same layer or different
layers): (b), (c).
minimum-overlap rules
(mask patterns in different
layers): (e).
Unit 8 2
NTUEE / ntro. EDA
1
CMOS Inverter Layout Example
p/n diffusion
polysilicon
contact cut
metal
Symbolic layout
Geometric layout
Unit 8 3
NTUEE / ntro. EDA
Symbolic Layout
Geometric (mask) layout: coordinates of the layout
patterns (rectangles) are absolute (or in multiples of ).
Symbolic (topological) layout: only relations between
layout elements (below, left to, etc) are known.
Single symbols are used to represent elements located in
several layers, e.g. transistors, contact cuts.
The length, width or layer of a wire or another layout element
might be left unspecified.
Mask layers not directly related to the functionality of the circuit
do not need to be specified, e.g. n-well, p-well.
The symbolic layout can work with a technology file that
contains all design rule information for the target
technology to produce the geometric layout.
Unit 8 4
NTUEE / ntro. EDA
2
Compaction and Its Applications
A compaction program or compactor generates layout
at the mask level. It attempts to make the layout as
dense as possible.
Applications of compaction:
Area minimization: remove redundant space in layout at
the mask level.
Layout compilation: generate mask-level layout from
symbolic layout.
Redesign: automatically remove design-rule violations.
Rescaling: convert mask-level layout from one
technology to another.
Unit 8 5
NTUEE / ntro. EDA
Aspects of Compaction
Dimension:
1-dimensional (1D) compaction: layout elements
2D compaction is NP-hard.
Unit 8 6
NTUEE / ntro. EDA
3
1D Compaction: X Followed By Y
Each square is 2 * 2 , minimum separation is 1 .
Initially, the layout is 11 * 11 .
After compacting along the x direction, then the y
direction, we have the layout size of 8 * 11 .
Unit 8 7
NTUEE / ntro. EDA
1D Compaction: Y Followed By X
Each square is 2 * 2 , minimum separation is 1 .
Initially, the layout is 11 * 11 .
After compacting along the y direction, then the x
direction, we have the layout size of 11 * 8 .
Unit 8 8
NTUEE / ntro. EDA
4
2D Compaction
Each square is 2 * 2 , minimum separation is 1 .
Initially, the layout is 11 * 11 .
After 2D compaction, the layout size is only 8 * 8 .
Unit 8 9
NTUEE / ntro. EDA
Unit 8 10
NTUEE / ntro. EDA
5
Constraint Graph
The inequalities can be used to construct a constraint
graph G(V, E):
There is a vertex vi for each variable xi.
For each inequality xj xi dij there is an edge (vi, vj) with weight dij .
There is an extra source vertex, v0; it is located at x = 0; all other
vertices are at its right.
If all the inequalities express minimum-distance constraints,
the graph is acyclic (DAG).
The longest path in a constraint graph determines the
layout dimension.
constraint graph
Unit 8 11
NTUEE / ntro. EDA
Maximum-Distance Constraints
Sometimes the distance of layout elements is bounded
by a maximum, e.g., when the user wants a maximum
wire width, maintains a wire connecting to a via, etc.
A maximum distance constraint gives an inequality of the form:
xj xi cij or xi xj -cij
Consequence for the constraint graph: backward edge
(vj, vi) with weight dji = -cij; the graph is not acyclic anymore.
The longest path in a constraint graph determines the
layout dimension.
Unit 8 12
NTUEE / ntro. EDA
6
Longest-Path Algorithm for DAGs
Unit 8 13
NTUEE / ntro. EDA
Unit 8 14
NTUEE / ntro. EDA
7
Longest-Paths In Cyclic Graphs
Constraint-graph compaction with maximum-distance
constraints requires solving the longest-path problem in
cyclic graphs.
Two cases are distinguished:
There are positive cycles: No feasible solution for longest
paths. We shall detect the cycles.
All cycles are negative: Polynomial-time algorithms exist.
Unit 8 15
NTUEE / ntro. EDA
Unit 8 16
NTUEE / ntro. EDA
8
Pseudo Code: The Liao-Wong Algorithm
Unit 8 17
NTUEE / ntro. EDA
x1 < x2 - 3
x3 < x4 - 1
x5 = x4 - 4
Unit 8 18
NTUEE / ntro. EDA
9
The Bellman-Ford Algorithm for Longest Paths
Unit 8 19
NTUEE / ntro. EDA
Unit 8 20
NTUEE / ntro. EDA
10
Longest and Shortest Paths
Longest paths become shortest paths and vice versa
when edge weights are multiplied by 1.
Situation in DAGs: both the longest and shortest path
problems can be solved in linear time.
Situation in cyclic directed graphs:
All weights are positive: shortest-path problem in P
(Dijkstra), no feasible solution for the longest-path
problem.
All weights are negative: longest-path problem in P
(Dijkstra), no feasible solution for the shortest-path
problem.
No positive cycles: longest-path problem is in P.
No negative cycles: shortest-path problem is in P.
Unit 8 21
NTUEE / ntro. EDA
Unit 8 22
NTUEE / ntro. EDA
11
Constraint Generation
The set of constraints should be irredundant and generated
efficiently.
An edge (vi, vj) is redundant if edges (vi, vk) and (vk, vj) exist
and w((vi, vj)) w((vi, vk)) + w((vk, vj)).
The minimum-distance constraints for (A, B) and (B, C) make
that for (A, C) redundant.
Unit 8 23
NTUEE / ntro. EDA
12
Relaxation
Initialize-Single-Source(G, s)
1. for each vertex v V[G] Relax(u, v, w)
2. d[v] ; 1. if d[v] > d[u]+w(u, v)
/* upper bound on the weight of 2. d[v] d[u]+w(u, v);
a shortest path from s to v */ 3. [v] u;
3. [v] NIL; /* predecessor of v */
4. d[s] 0;
d[v] d[u] + w(u, v) after calling Relax(u, v, w).
d[v] (s, v) during the relaxation steps; once d[v] achieves its
lower bound (s, v), it never changes. ((s, v); shortest path
distance from the source s to v.)
Let be a shortest path. If d[u] = (s, u) prior to the
call Relax(u, v, w), then d[v] = (s, v) after the call.
Unit 8 25
NTUEE / ntro. EDA
d[y]=7
d[x]=5 [y]=x
[x]=s
Unit 8 26
NTUEE / ntro. EDA
13
Shortest Path for Directed Acyclic Graphs (DAGs)
DAG-Shortest-Paths(G, w, s)
1. topologically sort the vertices of G;
2. Initialize-Single-Source(G, s);
3. for each vertex u taken in topologically sorted order
4. for each vertex v Adj[u]
5. Relax(u, v, w);
Time complexity: O(V+E) (adjacency-list representation).
Unit 8 27
NTUEE / ntro. EDA
Unit 8 28
NTUEE / ntro. EDA
14
Topological Sort
A topological sort of a directed acyclic graph (DAG) G = (V, E) is a
linear ordering of V s.t. (u, v) E u appears before v.
Topological-Sort(G)
1. call DFS(G) to compute finishing times f[v] for each vertex v
2. as each vertex is finished, insert it onto the front of a linked list
3. return the linked list of vertices
Time complexity: O(V+E) (adjacency list).
Unit 8 29
NTUEE / ntro. EDA
15
DFS Example
16
Example for Bellman-Ford for Shortest Paths
Unit 8 33
NTUEE / ntro. EDA
17