eda (cs286.5b) day 14 routing (pathfind, netflow)

34
EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Post on 21-Dec-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

EDA (CS286.5b)

Day 14

Routing

(Pathfind, netflow)

Page 2: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Today

• Routing– Pathfinder

• graph based

• global routing

• simultaneous global/detail

Page 3: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Global Routing

• Find sequence of channels for all routes– minimizing channel sizes– minimize max channel size– meeting channel capacity limits

Page 4: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

GlobalGraph

• Graph Problem on routes through regions

w

Page 5: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Global/Detail

• With limited switching (e.g. FPGA)– can represent routing graph exactly

Page 6: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Routing in Graph

• Find (shortest/available) path between source and sink– search problem (e.g. BFS, Alpha-Beta)

Page 7: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Easy?

• Finding a path is moderately easy

• What’s hard?– Can I just iterate and pick paths?

Page 8: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Example

s1 s3s2

d2d1 d3

All links capacity 1

sidi

Page 9: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Challenge

• Satisfy all routes simultaneously

• Routes share potential resources

• Greedy/iterative– not know who needs will need which resources– i.e. resource/path choice looks arbitrary– …but earlier decisions limit flexibility for later

• (somewhat like scheduling)

– order affect result

Page 10: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Negotiated Congestion

• Old idea– try once– see where we run into problems– undo problematic/blocking allocation

• rip-up

– use that information to redirect/update costs on subsequent trials

• retry

Page 11: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Negotiated Congestion

• Here– route signals– allow overuse– identify overuse and encourage signals to avoid

• reroute signals based on overuse/past congestion

Page 12: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Basic Algorithm

• Route signals along minimum cost path

• If congestion/overuse– assign higher cost to congested resources

• Repeat until done

Page 13: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Key idea

• Congested paths/resources become expensive• When there is freedom

– future routes, with freedom to avoid, will

• When there is less freedom– have to take routes

• Routes which must use congested resources will, while others will chose uncongested paths

Page 14: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Cost Function (1)

• Cost = base f(#routes using,time)

• Base cost of resource– delay of path– encourage small resource usage

• (minimum length path, if possible)

– minimizing delayminimizing resources

• Congestion– penalizes (over) sharing– increase sharing penalty over time

Page 15: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Example (first order congestion)

s1 s3s2

d2d1 d3

2 3 4 31 1

1

11

44

3

2 Base costs (delays)

1 1 1 Capacity

Page 16: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Example (need for history)

s1 s3s2

d2d1 d3

2 11

2

21

12 Base costs (delays)

1 1 1 Capacity

1

1

Need to redirect uncongested paths; how encourage?

Page 17: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Cost Function (2)

• Cost = (base + history)*f(#resources,time)

• History– avoid paths with history of congestion

Page 18: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Example (need for history)

s1 s3s2

d2d1 d3

2 11

2

21

12 Base costs (delays)

1 1 1 Capacity

1

1

Page 19: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Cost Function (3)

• Cost = e(#routes)

• I.e. cost exponential in overuse

• carefully chosen

• (only reroute overused)

Klein+Stein+Tardos/STOC’90

Page 20: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

What about delay?

• Existing formulation uses delay to reduces resources, but doesn’t directly treat

• Want:– prioritize critical path elements for shorter

delay– allow nodes with slack to take longer paths

Page 21: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Cost Function (Delay)• Cost=

– W(edge)*delay + (1-W(edge))*congest– congest as before

• (base+history)*f(#signals,time)

• W(edge) = D(edge)/Dmax– 1 for critical path– <1 for paths with slack

• Use W(edge) to order routes

• Update each round

Page 22: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Convergence

• Chan+Schlag [FPGA’2000]– cases where doesn’t converge– special case of bipartite graphs

• converge if incremental

• or if prefer uncongested to least history cost

• theory – only reroute overflow– converge in O(|E|) reroutes

Page 23: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Rerouting• Default: reroute everything

• Can get away rerouting only congested nodes– if keep routes in place– history force into new tracks

• causing greedy/uncongested routes to be rerouted

• Effect– maybe more iterations– less time– ? Better convergence

Page 24: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Run Time?

• Route |E| edges

• Each path search O(|Egraph|) worst case

– …generally less

• Iterations?

Page 25: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Runtime Theory

• O((|E|+|Egraph|)| Egraph|log(|Egraph|))

• Roughly:– O(|E|) iterations– Updating flows per iteration

• O(| Egraph|log(|Egraph|))

Page 26: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Search Ordering

• Default: breadth first search for shortest

• Use A*:– estimated costs/path length, prune candidates

earlier– can be more depth first

• (search promising paths as long as know can’t be worse)

Page 27: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Searching

• In general:– greedy/depth first searching

• find a path faster• may be more expensive

– (not least delay, congest cost)

– tradeoff by weighting • estimated delay on remaining path vs. cost to this point• control greediness of router

– More greedy is faster at cost of less optimal paths (wider channels)

• 40% W -> 10x time [Tessier/thesis’98]

Page 28: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Domain Negotiation

• For Conventional FPGAs (and many networks)– path freedom

• bushy in middle

• low on endpoints

Page 29: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Multistage/Benes

[ignore color coding here]

Page 30: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Conventional FPGA Domains

Page 31: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

HSRA Domains

Page 32: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Domain Negotiation

• Path bottlenecks exist at both endpoints• Most critical place for congestion• Most efficient: work search from both ends

– more limiting in A*/Alpha-Beta search– focus on paths with least (no) congestion on

endpoints first– FPGAs -- picking “domain” first– otherwise paths may look equally good up to end

(little pruning)

Page 33: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Summary

• Finding short path easy/well known

• Complication: need to route set of signals– who gets which path?– Arbitrary decisions earlier limit options later

• Idea: iterate/relax using congestion history– update path costs based on congestion– reroute with new costs

• Accommodate delay and congestion

Page 34: EDA (CS286.5b) Day 14 Routing (Pathfind, netflow)

Today’s Big Ideas

• Exploit freedom

• Technique:– network flow– iterative improvement/relaxation– approximation algorithm