Quick viewing(Text Mode)

(Lec19) Geometric Data Structures for Layouts Copyright Notice

(Lec19) Geometric Data Structures for Layouts Copyright Notice

((Lec19Lec19)) GeometricGeometric DataData StructuresStructures forfor LayoutsLayouts

^ What you know X Some basic ASIC placement (by annealing) X Some basic ASIC routing (global versus detailed, area routing by cost- based maze routing) X Some timing analysis: logical and electrical

^ What you don’ know X Basic representation techniques for handling a lot of geometry X Standard “procedures” supported on these geometric X Pros, comparative features of common geometric structures

© R. Rutenbar 2001 CMU 18-760, Fall01 1

CopyrightCopyright NoticeNotice

© Rob A. Rutenbar 2001 All rights reserved. You may not make copies of this material in any form without my express permission.

© R. Rutenbar 2001 CMU 18-760, Fall01 2

Page 1 WhereWhere AreAre We?We?

^ Geometric data structures for BIG layouts…

M T W Th F Aug 27 28 29 30 31 1 Introduction Sep 3 4 5 6 7 2 Advanced Boolean algebra 10 11 12 13 14 3 JAVA Review 17 18 19 20 21 4 Formal verification 24 25 26 27 28 5 2-Level logic synthesis Oct 1 2 3 4 5 6 Multi-level logic synthesis 8 9 10 11 12 7 Technology mapping 15 16 17 18 19 8 Placement 22 23 24 25 26 9 Routing 29 30 31 1 2 10 Static timing analysis Nov 5 6 7 8 9 11 Electrical timing analysis 12 13 14 15 16 12 Thnxgive 19 20 21 22 23 13 Geometric data structs & apps 26 27 28 29 30 14 Dec 3 4 5 6 7 15 10 11 12 13 14 16 © R. Rutenbar 2001 CMU 18-760, Fall01 3

NominalNominal Deadlines…Deadlines…

Last 760 lecture (probably…

Thnxgive 19 20 21 22 23 13 Revisions: 26 27 28 29 30 14 Dec 3 4 5 6 7 15 Move HW5 and Paper3 to 10 11 12 13 14 16 17 Dec Monday, due 5pm 17 18 19 20 21 Finals Lyz Knight’s office. Proj3 still Due 14 Dec Friday. HW5 6 PPT slide Proj 3 demos paper review

^ …and, this is clearly a bit extreme for the last week of class X Open to suggestions for moving some deadlines BACK some… X …but need to be careful not to mess up people with finals, early travel plans for break, etc

© R. Rutenbar 2001 CMU 18-760, Fall01 4

Page 2 DataData StructuresStructures

^ A large IC layout represents a lot of data X 10M to 100M devices X ~10 to 20 pieces of geometry per device X 0.1 to 1 billion rectangles--easily ^ How do we manage this large collection of data? X Depends on what you want to do with the layout.

Logic gate: Typical ASIC: Module or cell:

1000s of cells. 10s of gates. 100s of rectangles.

© R. Rutenbar 2001 CMU 18-760, Fall01 5

22 BasicBasic KindsKinds ofof “Queries”“Queries” onon thesethese StructuresStructures

A “pick” operation-- A “region query” operation-- Given (x,y), tell me what Given a box, tell me I touch.... everything inside the box

© R. Rutenbar 2001 CMU 18-760, Fall01 6

Page 3 DataData Structures:Structures: QueriesQueries

^ Data queries X Pick: Given an x,y location, tell me what lives there. X Region query: Given a bounding box, tell me what’s inside it.

^ Uses X Checking DRC-type layout interactions X Printing masks. X Extracting electrical circuits from layout. X Searching the neighborhood of a given device or circuit.

^ Note: X No inserting or deleting data is done -- just asking where things are.

© R. Rutenbar 2001 CMU 18-760, Fall01 7

DataData Structures:Structures: LayoutLayout ModificationModification

^ Adding & Deleting geometry X Inserting or removing rectangles from the data collection.

^ Uses X Interactive layout editing: Cadence Virtuoso or MAGIC. X Global and detailed routing. X Local rip-up and reroute. X Placement “legalization” = fine local adjustments.

^ Caveats X With some data structures, it is easy to add new geometry but difficult to delete. X Need to be careful to match structure to the application

© R. Rutenbar 2001 CMU 18-760, Fall01 8

Page 4 DataData Structures:Structures: UsefulUseful ReferencesReferences

^ Survey paper X J. Rosenberg, “Geographical data structures compared: a study of data structures supporting region queries,” IEEE Trans. CAD, CAD-4, 1, Jan. 1985. X Old, but very useful. Actually has code (in a somewhat archaic looking now) for a lot of these data structures.

^ Tile plane paper X J. Ousterhout, “Corner stitching: a data structuring technique for VLSI layout tools,” IEEE Trans. CAD, CAD-3, 1, Jan. 1984. X It’s the underneath the Berkeley MAGIC layout editor X Yeah, the same Ousterhout who developed tcl/tk, and MAGIC.

© R. Rutenbar 2001 CMU 18-760, Fall01 9

DataData Structures:Structures: SurveySurvey ofof TypesTypes

^ X Simple but slow ^ Bins X Straightforward - commonly used ^ Quad Trees X Very widely used ^ k-d Trees X Good complexity but limited ^ Corner Stitched Tile Planes X Good for layout editing, fine-grain local manipulation of shapes

© R. Rutenbar 2001 CMU 18-760, Fall01 10

Page 5 DataData Structures:Structures: LinkedLinked ListsLists

^ OK for grouping small amounts of data X But as soon as you have lots of rectangles & complex queries, this is bad ^ Complexity (assume you have N rectangles) X Time: Z Find O(N) Z Insert O(N) ( O(1) if not sorted ) Z Delete O(N) X Memory: Z O(N) - one link for each data item.

List ptr data data data

obj obj obj . . . NULL prev next prev next NULL prev next

© R. Rutenbar 2001 CMU 18-760, Fall01 11

PracticalPractical Issues:Issues: LinkedLinked ListsLists

^ Lousy complexity, but widely used… X …when you only have a “a few” objects to represent X More sophisticated structures will get presented after this… X …but, they all come with some overhead; nothing is free X If you have a small # of rectangles to handle, a linked list is the right way X Where the breakpoint is between doing it like this (“flat”) and using a smart structure is something you have to determine empirically

© R. Rutenbar 2001 CMU 18-760, Fall01 12

Page 6 DataData Structures:Structures: BinsBins

^ Bin idea X Divide up surface of the chip into rectangular bins (also called buckets) X Inside each bin, you have a linked list of all the rectangles you touch.

Data organized by a 2D array of geometric bins, each of which holds all local rectangles in a linked lists.

© R. Rutenbar 2001 CMU 18-760, Fall01 13

DataData Structure:Structure: BinsBins

^ Queries X Pick: go to the bin with the (x,y) you want, look at all the rectangles X Region query: go to all the bins that touch the region, look at all the rectangles

Pick (x, y) Region query

© R. Rutenbar 2001 CMU 18-760, Fall01 14

Page 7 DataData Structures:Structures: BinsBins

^ How does it really work X Need a pointer to a “rectangle object” from every bin it touches. X May have to walk thru lots of bins to insert/delete a big rectangle X Impacts the granularity of the grid you pick...

Eight bins point to this one object.

© R. Rutenbar 2001 CMU 18-760, Fall01 15

DataData Structures:Structures: BinsBins

^ How big should the bins be? X Let, Ao = average object size and Ab = bin size.

Ao << Ab Ao ≈ Ab Ao >> Ab

#bins / object: 1 4 many...

^ If you have many, small bins... X Memory use is large, insert and delete times are long. X But “pick” operations are really fast (few objects per bin) X Need to be careful to tune bin granularity to problem

© R. Rutenbar 2001 CMU 18-760, Fall01 16

Page 8 DataData Structures:Structures: BinsBins

^ Summary X Good for evenly distributed objects of similar size. ^ Complexity X Time: Z Find O(1) Z Insert O(1) Z Delete O(1) X Memory: Z O(N) - if number of bins is < number of objects - small linked list per bin

X But this assumes a lot of empirical tuning, and is pretty much a best-case estimate. BAD things can happen if your geometry isn’t “evenly distributed”....

© R. Rutenbar 2001 CMU 18-760, Fall01 17

DataData Structures:Structures: QuadQuad TreesTrees

^ Problem with bins: X What if data is not uniformly distributed? X If one small region of the chip is very dense, the search in that region is slow since the bin size is fixed and the linked lists for each bin are long. X We want to divide up space in a more dynamic fashion - only subdivide region where the “action” is.

Few objects in this region.

Lots of detail here.

© R. Rutenbar 2001 CMU 18-760, Fall01 18

Page 9 DataData Structures:Structures: QuadQuad TreesTrees

^ data structure with four children: List of geometry Given a region (called a quad), that hits a bisector line subdivide it into four equal parts:

UL UR

LL LR

UL UR LL LR

Each child is another quad tree. Rules: • If an object overlaps any of these bisector (center) lines in this quad, put it in the list for this quad. • Else if it is totally within a single quadrant, pass the object to the appropriate child tree.

© R. Rutenbar 2001 CMU 18-760, Fall01 19

QuadQuad TreeTree ConstructionConstruction

^ Objects that hit either of the bisector lines… X These cannot be entirely inside the UL, UR, LL, LR regions X So, they go on the ‘bisector list” at the top.

UL UR

LL LR

UL UR LL LR

Each child is another quad tree.

© R. Rutenbar 2001 CMU 18-760, Fall01 20

Page 10 QuadQuad TreeTree ConstructionConstruction

^ Objects that don’t hit either of bisector lines X These live entirely inside one of the UL, UR, LL, LR regions X So, they get passed down to me quad tree for that region X Just repeat this recursion

UL UR LR

UL UR LL LR LL

UL UR LL LR © R. Rutenbar 2001 CMU 18-760, Fall01 21

DataData Structures:Structures: QuadQuad TreeTree ExampleExample

11 1 2

UL LL 9, 10 3 4 7 11 UL LL LR UL LL 5 6 8 1,2 3,4 7 8

9 UL UR

5 6 10

© R. Rutenbar 2001 CMU 18-760, Fall01 22

Page 11 QuadQuad TreeTree Query:Query: PickPick

^ Just walk down the tree... X Going into the region that holds your x,y, till the tree ends X Look at the rectangles you find

11 1 2

UL LL 9, 10 3 4 7 11 UL LL LR UL LL 5 6 8 1,2 3,4 7 8

9 UL UR

5 6 10

© R. Rutenbar 2001 CMU 18-760, Fall01 23

QuadQuad Trees:Trees: RegionRegion QueryQuery

^ Assume your region box hits a bisector X Look on bisector list first for all rectangles there X Then, chop up region box into (at most 4 pieces) and pass 4 new regions down tree, ie, recursively call region query 4 times on child trees

UL UR

LL LR UL UR LL LR

UL UR

LL UR

© R. Rutenbar 2001 CMU 18-760, Fall01 24

Page 12 QuadQuad TreesTrees QueriesQueries

^ Region query Looking for objects near 2.

1 2 11

3 4 7 11 UL

5 6 8 UL LL LR

9 1,2 3,4 7

10 Objects we need to check: 11, 1, 2, 3, 4, 7

© R. Rutenbar 2001 CMU 18-760, Fall01 25

DataData Structures:Structures: QuadQuad TreesTrees

^ Insert and delete

11

Insert Delete UL LL 9, 10 Walk down tree to Remove object find appropriate quad. from the list and Create child if needed. child from tree if UL LL LR UL LL necessary.

1,2 3,4 7 8

UL UR

5 6

© R. Rutenbar 2001 CMU 18-760, Fall01 26

Page 13 DataData Structures:Structures: QuadQuad TreesTrees

^ Lots of variants and parameters X In particular, you can be more clever about bisector list structure ^ How many rectangles per leaf of tree? X One. Called perfect quad tree. Easy search but huge tree. (Not realistic…) X Not less than K. Called an adaptive quad tree. Smaller trees but with longer lists/node. Everybody does something like this now… ^ How small can a quad in tree be? X Not less than area A. We do no quad division if region is too small; use linked list of objects at leaves. Another adaptive sort of a tree. Smaller trees but lists may be long.

^ Use these ideas to tune the tree to the problem

© R. Rutenbar 2001 CMU 18-760, Fall01 27

DataData Structures:Structures: QuadQuad TreesTrees

^ Summary X Good for non-uniformly distributed data. X Not a balanced tree. ^ Complexity: X Time: Z Find O(log N) Z Insert O(log N) Z Delete O(log N) X Memory: Z O(N) - worst case, 4N tree nodes (perfect quad tree)

© R. Rutenbar 2001 CMU 18-760, Fall01 28

Page 14 DataData Structures:Structures: k-dk-d TreesTrees

^ Problems with basic Quad Trees X Quad trees do the right thing in that they cut up the layout area into fine bins only where needed. X However, if there are a few spots of fine detail those areas suffer from the same slow search problems as with bins.

Lots of detail. Lots of geometry. Many linked lists.

© R. Rutenbar 2001 CMU 18-760, Fall01 29

DataData Structures:Structures: k-dk-d TreesTrees

^ k-d tree is multidimensional X k = number of keys used in comparison, hence “k dimensional” X Probably most familiar with 1-d tree:

Only one key. 10

X

5 15

16 3 7 All objects All objects less than X greater than X. ( <= ) ( > ) 4

© R. Rutenbar 2001 CMU 18-760, Fall01 30

Page 15 DataData Structures:Structures: k-dk-d TreesTrees

^ Consider a 2-d tree. X 2 keys in each data item (k1, k2) X This is a decision tree in which you look at a different key at each level of the tree.

Relevant 10, 8 X1,Y1 key is underlined

X2,Y2 X3,Y3 5, 17 15, 2

7, 21 16, 3 3, 4

All objects All objects All objects All objects < X1, < X1, > X1, > X1, 4, 9 < Y2. > Y2. < Y3. > Y3. © R. Rutenbar 2001 CMU 18-760, Fall01 31

DataData Structure:Structure: k-dk-d TreesTrees

^ Key-comparison alternates, repeats down tree X Level 1: look at k1. Level 2: look at k2. Level 3: k1 again. Level 4: k2 X At level n you look at key n mod 2

10, 8

5, 17 15, 2

3, 4 7, 21 16, 3

4, 9

© R. Rutenbar 2001 CMU 18-760, Fall01 32

Page 16 DataData Structures:Structures: k-dk-d TreesTrees

^ We’ll use 4-d trees to organize rectangles: ^ Keys are: X k1 = left edge (x min) X k2 = bottom edge (y min) X k3 = right edge (x max) X k4 = top edge (y max) ^ Tree structure

X Builds a binary tree, but at level i mod 4, we look at key k(i mod 4) to decide which child to pass the rectangle to. ^ New idea X Partitions space in a way that is dynamically dependent on the data. X Each new rectangle inserted in tree defines a new bisector-type cut thru the chip surface.

© R. Rutenbar 2001 CMU 18-760, Fall01 33

Example:Example: BuildingBuilding k-dk-d TreeTree 1-left 2-bottom 3-right

1 2 1 2 1 2

3 4 7 3 4 7 3 4 7 11 11 11

5 6 8 5 6 8 5 6 8

9 9 9

10 10 10

4-top 5-left 6-bottom …

1 2 1 2 1 2

3 4 7 3 4 7 3 4 7 11 11 11

5 6 8 5 6 8 5 6 8

9 9 9

10 10 10

© R. Rutenbar 2001 CMU 18-760, Fall01 34

Page 17 DataData Structures:Structures: k-dk-d TreesTrees

^ Building a 4-d tree: 1 - L

1 2 2 - B

3 - R

3 4 7 4 - T 11 5 - L 7 -L 5 6 8 6 -B 11 -B

9 9 - R 8 -R

10 10 -T

© R. Rutenbar 2001 CMU 18-760, Fall01 35

k-dk-d TreeTree IdeasIdeas

^ Space still chopped up like quad tree X But the partition is not static like a quad tree X It depends on the data X Each new rectangle defines another cut line

^ Pro X You get finer partition where you need it X Cuts adapt to data

^ Con X Cuts depend entirely on the insertion order of the data X If you insert things in a bad order, you can still get lousy partition X Can insert easily, cannot delete easily...

© R. Rutenbar 2001 CMU 18-760, Fall01 36

Page 18 DataData Structures:Structures: k-dk-d TreesTrees

^ Insert and delete 1 - L

2 - B Insert Delete 3 - R Walk down tree and Cannot. Rest of add a child. tree depends on # - T this key! Keep the keys and just mark 5 - L 7 -L object pointer as void. new 6 -B 11 -B Basically, you have to garbage collect 8 -R and rebuild tree 9 - R later 10 -T

© R. Rutenbar 2001 CMU 18-760, Fall01 37

DataData Structures:Structures: k-dk-d TreesTrees

^ Summary X Useful if data is pretty static and you want to mostly do queries X Bad for highly dynamic data (lots of insertions and deletions). ^ Historically X Theoretically hot in the 80s, today not used as much anymore X Recent variants of quadtrees that allow each rectangle to be redundantly stored in several places in the tree do very well here; they’ve basically displaced k-d trees today ^ Complexity X Time: Z Find O(log N) Z Insert O(log N) Z Delete O(log N) X Memory: Z O(N) - exactly one node per object.

© R. Rutenbar 2001 CMU 18-760, Fall01 38

Page 19 DataData Structures:Structures: CornerCorner StitchingStitching

^ Very different alternative X Not a tree or a bin

^ Big ideas X All space, both occupied & empty space, is explicitly represented. X All layout area is tiled with nonoverlapping rectangles: Z object space = object tiles Z empty space = empty tiles X Tiles are stitched together at the corners. ^ New: Canonical representation X Given a layout of objects, there is only one space tile representation X Makes searching & editing easier: you know how things must be organized

© R. Rutenbar 2001 CMU 18-760, Fall01 39

DataData Structures:Structures: CornerCorner StitchingStitching

^ The rules: X 2 tile types: space=empty, solid=“something there” X Maximal horizontal strips: every space tile must be as wide as possible X No space tile can have another space tile to the left or right of it X Each space tile is as tall as it can be without violating above rules.

Solid tile

Empty space tile: as wide as possible, never horiz. adjacent to another empty space tile, as tall as possible.

© R. Rutenbar 2001 CMU 18-760, Fall01 40

Page 20 Aside:Aside: AboutAbout CanonicalCanonical FormForm

^ Tile planes represent empty space in a canonical way X But, as originally presented, they don’t represent “solid” canonically

Legal tile plane Also a legal tile plane; Note only space tiles are same here…

© R. Rutenbar 2001 CMU 18-760, Fall01 41

Aside:Aside: AboutAbout CanonicalCanonical FormForm

^ Actual tiles may depend on order of insertion of solid tiles X In the original version, you “chop up” the new solid tile into pieces that only overlap space tiles in the layout, then insert each of these pieces X This is how Ousterhout does it in the paper…

Insert… inserted ???

Starting tile plane After insertion

© R. Rutenbar 2001 CMU 18-760, Fall01 42

Page 21 Aside:Aside: AboutAbout CanonicalCanonical FormForm

^ Can also insist on canonical form for the solid tiles X Just like space tiles: they are maximally wide, never have same-color tiles at left or right, and after satisfying this, they are maximally tall

X

If solids use same rules Illegal tile plane: as space tiles, only solids not max wide this is legal

© R. Rutenbar 2001 CMU 18-760, Fall01 43

RepairingRepairing ViolationsViolations ofof CanonicalCanonical FormForm

^ Always same pattern: split the bad tiles, re-merge them correctly

X split split X split split Find adjacent split empty space tile X violations and split split tiles.

merged split split split merged split split Merge adjacent empty space tiles for max split split merged height.

© R. Rutenbar 2001 CMU 18-760, Fall01 44

Page 22 CornerCorner StitchedStitched TileTile PlanesPlanes

^ Ideas X Canonical representation for “one layer” of stuff on an IC X Example: metal2, or polysilicon X Just like BDDs: all algorithms that manipulate a tile plane are required to keep it -- at least space tiles -- in canonical form after the processing

^ Manipulations X Insert a new tile X Delete a tile X Point search X Region search

© R. Rutenbar 2001 CMU 18-760, Fall01 45

CornerCorner StitchingStitching TileTile Plane:Plane: ImplementationImplementation

^ Stitches at 2 corners of each tile X Can put stitches at all 4 corners; but only need them at 2 corners Corners are stitched together with pointers:

Only know about other tiles that are near the upper right and lower left corners.

Only know some of your adjacent neighbors directly

© R. Rutenbar 2001 CMU 18-760, Fall01 46

Page 23 TileTile Planes:Planes: PointPoint SearchSearch

^ Point Search X Given x,y X Search horizontally to find a tile the bounds the x coord. Looking for this point. (Bounds means “overlaps”) X Search vertically to find a tile that bounds the y coord. X Repeat till you hit a tile the contains that point

Start here.

© R. Rutenbar 2001 CMU 18-760, Fall01 47

TileTile Planes:Planes: RegionRegion QueryQuery

^ Region search X Ousterhout gives a neat recursive enumeration algorithm

^ Basic idea X Visit tiles in region top to bottom, left to right (sort of...) X Each tile is “owned” by just other tile, which calls the recursive “enumerate” algorithm on that tile. X If your neighbor tile’s lower left corner touches “you”, you “own” that tile and recursively call the enumerate algorithm on that tile X Or, if you and your neighbor tile are both at the bottom of the region, you “own” him and call enumerate on him X Each tile visited many times, but enumerated just once.

© R. Rutenbar 2001 CMU 18-760, Fall01 48

Page 24 Outerhout’sOuterhout’s Algorithm Algorithm

R = region Find all tiles on left edge of the region R for (each of these tiles T on left edge of R) enumerate( tile T)

enumerate( tile T ) { Put tile T on list. If (right edge of T out of region R) return.

Find all tiles touching right side of tile T For (each of these neighbor tiles S) call enumerate( neighbor tile S ) return }

© R. Rutenbar 2001 CMU 18-760, Fall01 49

Ousterhout’sOusterhout’s Example Example

Query region 2 1 6 5

3 4

7

8 10 9 Tiles. This algorithm does not actually care whether a tile is “space” or “solid”

© R. Rutenbar 2001 CMU 18-760, Fall01 50

Page 25 Ousterhout’sOusterhout’s Algorithm Algorithm

^ Find tiles on left side of region R X Find top tile, call it “1” X Call enumerate (tile 1)

1

© R. Rutenbar 2001 CMU 18-760, Fall01 51

Ousterhout’sOusterhout’s Algorithm Algorithm

^ enumerate( tile 1) X you (tile 1) own tile 2. X tile 2 does not own its right neighbor, so quit

2 1

own

In this recursion, a parent tile “owns” an adjacent neighbor tile if the lower-left corner touches parent. If so, parent recursively call enum on this neighbor; process continues

© R. Rutenbar 2001 CMU 18-760, Fall01 52

Page 26 Ousterhout’sOusterhout’s Algorithm Algorithm

^ Back up to tile 1, down to new tile 3 X 3 owns 4. call enumerate(4) Z 4 owns 5. call enumerate(5) z 5 owns 6. call enumerate(6) X 3 owns 7. enumerate(7) X Continue… 2 1 6

5 4 own 3 own own own 7

© R. Rutenbar 2001 CMU 18-760, Fall01 53

Ousterhout’sOusterhout’s Algorithm Algorithm

^ Recursively touches tiles in this order X Can return these tiles to the region query as the relevant ones

2 1 6 5

3 4

7

8 10 9

© R. Rutenbar 2001 CMU 18-760, Fall01 54

Page 27 TileTile PlanePlane QueriesQueries

^ Region search

1 2 1 2

3 4 7 11

5 6 8

Objects Found 9

10

© R. Rutenbar 2001 CMU 18-760, Fall01 55

TileTile Planes:Planes: TileTile InsertionInsertion

^ Insertion is complex; simplest case is solid tile touching only space tiles

New tile split space tiles

Use point search to find the Split space tiles containing the top existing tiles in the location and bottom edges of the new tile. of the new tile.

© R. Rutenbar 2001 CMU 18-760, Fall01 56

Page 28 TileTile InsertionInsertion

^ Insertion

left inside right

Walk the left and right edges, Merge like-space tiles vertically splitting tiles into left, inside, wherever possible. and right tiles as needed. (Stripes tiles show space tiles (Stripes tiles are all the ones that result from this you will touch as you split) vertical merging)

© R. Rutenbar 2001 CMU 18-760, Fall01 57

TileTile DeletionDeletion

^ It is even messier... X Have to find all the appropriate neighbors X Have to merge all the appropriate neighbors to maintain canonical structure of tile plane X See the Ousterhout paper

^ Roughly speaking X You find all the tiles in the region you want to delete X You split ALL the tiles you find on ALL the possible edges of ALL tiles X You then “glue” back together all these little chopped up pieces to reassemble the tile plane

© R. Rutenbar 2001 CMU 18-760, Fall01 58

Page 29 PracticalPractical Usage:Usage: Multi-LayerMulti-Layer TileTile PlanePlane

^ You usually want more than just “solid” and “empty” tiles X Imagine you want in one tile plane all the layers in, say, a FET: poly, diffusion, well, metal1, contact-cut X The way to do this is to “multiply-fracture” the tile plane X Idea is each tile gets a unique “stack” of material types X Can label each tile with a bit vector, bit Bi =1 is layer i is present

This tile has both red layer and striped blue layer in it

© R. Rutenbar 2001 CMU 18-760, Fall01 59

DataData Structures:Structures: CornerCorner StitchedStitched TileTile PlanesPlanes

^ Summary X Easy to do local modifications. X Adapts to sparse and dense layout sections. X Manhattan geometry mainly (you can do 45-degrees using trapezoids). X Can either have parallel tile planes to handle multiple layers, or do “multi-layer tile plane” directly (a more complex implementation) ^ Complexity X Time: Z Find O( sqrt(N) ) Z Insert O( 1 ) Z Delete O( 1 ) Z worst case for all O(N) X Memory: Z O(N) - upper bound on empty space tiles is 3N + 1

© R. Rutenbar 2001 CMU 18-760, Fall01 60

Page 30 SummarySummary

^ Many different structures to handle geometry X Bin: simple, static, nonhierarchical decomposition of space X Quad tree: static hierarchical decomposition of space X k-d tree: dynamic hierarchical decomposition of space X Tile plane: dynamic, local, canonical nontree decomp. of space

^ All support basic operations, with different tradeoffs X Pick: find me objects that touch x,y X Region query: find me all objects that touch this box X Insert: add a new rectangle or polygon to structure X Delete: remove geometry (or a whole region) from structure

© R. Rutenbar 2001 CMU 18-760, Fall01 61

Page 31