Routing 2
Outline– Maze Routing
– Line Probe Routing
– Channel Routing
Goal– Understand maze routing
– Understand line probe routing
Maze Routing
• Place wires and components on grid– grid size = wire width + spacing
– works best if all wire widths and spacings are equal
– grid squares occupied
• Distance metric– each square has 4 neighbors unit cost away
• Search graph– node for each square
– unit-cost edge to 4 neighboring nodes
w+s
1
1 1
1
1 1
1
1
Maze Routing
• Shortest path search (Lee-Moore)– maintain leaf nodes of expansion tree
– at each step add unexplored neighbors to list
» with accumulated cost
– stop when target vertex reached
» backtrace for route
• Guaranteed to find shortest path– large memory requirements - the grid
– long search time - number of vertices marked
– local optimization - only routing one net at a time
16 15 14
16
16 15 1416 1516
13 12 11 10 914 1315 14 8 7
9 813 12 11 1013 12 11
15 14 1016 15 9 8
8 7 6 5 45 4 3
6 5 4 3 27 6 5 2 18 7 1 09 8 2 18 7 3 27 6 5 4 3
3 2 1 23 2 33
3 2 33 2 1 2
3 2 1 0 132 33
3
Algorithm
add source node S into list
costS = 0
for all nodes i on list
if i == destination D
pathcost = costD
break
for j=N,S,E,W neighbors that are not visited and not occupied
add node j to list
costj = costi+1
mark i as visited
remove node i from list
while i != S do
mark i as path
i = min cost N,S,E,W visited neighbor
Maze Routing
• Avoiding blockage– wire at a time => can block wires
• Solutions– rip-up and re-route
» remove wire(s) causing blockage
» route blocked wire
» route ripped up wires
– shove-aside
» add dummy grid lines
» squeeze wire through
A
B
A B
A
B
A B
A
A B
Line Probe Routing
• Gridless - store list of lines and obstructions– sorted lists of vertical and horizontal lines
• Algorithm– from source and destination project 4 horizontal/vertical rays (probes)
– if probes intersect, done - route wires from nodes to intersection
– if probes blocked, choose escape point and send new probes
» a point just past obstruction
E E
E
A
B E
Line Probe Routing
• Advantages– small memory requirements - no grid
» store sorted lists of vertical and horizontal segments
– fast
» binary search of segments for blockage and escape points
» # probes << # grid points
– higher precision coordinates - no grid
• Disadvantages– serial wire at a time - blockages
» similar rip-up and shove-aside approaches to cope
– basic algorithm may not find route when one exists
» need to try more escape points
» degenerates to grid search
Channel Routing
• Channel– terminals on two sides of rectangle are fixed
– horizontal wires on layer1 - trunks, which run in tracks
– vertical wires on layer2 - branches, which run in columns
• Routing Problem– minimize number of tracks used => minimizes channel height
– minimize wire lengths, vias
– all wires routed at same time - better overall optimization
A B A
AB
Atrack
trunkbranch
via
dogleg
Channel Routing
• Left edge algorithm– one trunk per net
– trunks on one layer, branches on other
sort trunks by left edge
scan trunks, put all that fit into first track
allocate new tracks as necessary
repeat scanning until done
add vertical branches– ignores vertical constraints
» can add doglegs later
» may need more tracks
– advantage
» minimum wire length, vias
– not very optimal
» 31 tracks on “Deutsch’s difficult example”
» density is 19 tracks
B A
A
B
B A
A
B
Channel Routing
• Greedy algorithm– route column by column rather than track by track
– scan left-right by column
– at each track apply heuristics to bring new nets to an existing trunk, and move nets between tracks
» greedy - at each column try to minimize tracks and minimize distance to terminals
– can often use exhaustive search
» number of tracks in a column is small - < 100
– good results, but lots of vias
» lots of track to track movement for each net
Algorithm
for each column
for each terminal bring in branch
connect to trunk if it exists
create trunk at first empty track
otherwise create new track
move between tracks using heuristics
collapse nets to fewer trunks with spare branch space
reduce distance between net trunks
move nets towards next terminal
connect multiple trunks for a net at end of channel
B
BA
A
Pattern Channel Routers
• Slide window along channel– recognize patterns of terminals and occupiedGet more
optimal results
– doglegs
• Challenge– developing rule set
Problem:Vertical constraint between A and B.C and D occupy surrounding tracks and columns
Solution:Shift contacts down and to right, doglegs on each layer to reach them
A
B
C
D