Penn ESE 535 Spring 2015 -- DeHon 1 ESE535: Electronic Design Automation Day 14: March 16, 2015 Routing 2 (Pathfinder)

Slides:



Advertisements
Similar presentations
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
Advertisements

ECE 667 Synthesis and Verification of Digital Circuits
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 22: December 2, 2005 Routing 2 (Pathfinder)
EDA (CS286.5b) Day 10 Scheduling (Intro Branch-and-Bound)
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: February 23, 2011 Routing 2 (Pathfinder)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: March 4, 2008 Placement (Intro, Constructive)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 17: April 2, 2008 Scheduling Introduction.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 4, 2009 FSM Equivalence Checking.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 23, 2008 Covering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
Penn ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 19: April 9, 2008 Routing 1.
EDA (CS286.5b) Day 11 Scheduling (List, Force, Approximation) N.B. no class Thursday (FPGA) …
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 16: March 23, 2009 Covering.
EDA (CS286.5b) Day 14 Routing (Pathfind, netflow).
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 22: April 20, 2009 Routing 2 (Pathfinder)
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 18: March 21, 2007 Interconnect 6: MoT.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 16, 2008 Routing 2 (Pathfinder)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 13, 2008 Retiming.
ECE 506 Reconfigurable Computing Lecture 8 FPGA Placement.
Introduction to Routing. The Routing Problem Apply after placement Input: –Netlist –Timing budget for, typically, critical nets –Locations of blocks and.
Dijkstra’s Algorithm and Heuristic Graph Search David Johnson.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: January 28, 2015 Partitioning (Intro, KLFM)
ESE Spring DeHon 1 ESE534: Computer Organization Day 19: April 7, 2014 Interconnect 5: Meshes.
CALTECH CS137 Winter DeHon 1 CS137: Electronic Design Automation Day 2: January 6, 2006 Spatial Routing.
Solving Hard Instances of FPGA Routing with a Congestion-Optimal Restrained-Norm Path Search Space Keith So School of Computer Science and Engineering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 26, 2015 Covering Work preclass exercise.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 16, 2015 Scheduling Variants and Approaches.
P ROBLEM Write an algorithm that calculates the most efficient route between two points as quickly as possible.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2015 Architecture Synthesis (Provisioning, Allocation)
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2014 Partitioning 2 (spectral, network flow)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 7: February 3, 2002 Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 3, 2015 Routing 1.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: February 27, 2002 Routing 2 (Pathfinder)
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 16, 2011 Placement II (Simulated Annealing)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: January 30, 2013 Partitioning (Intro, KLFM)
Register-Transfer (RT) Synthesis Greg Stitt ECE Department University of Florida.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: February 25, 2015 Placement (Intro, Constructive)
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 21: November 28, 2005 Routing 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: January 31, 2011 Scheduling Variants and Approaches.
BackTracking CS255.
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
Presentation transcript:

Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 14: March 16, 2015 Routing 2 (Pathfinder)

Penn ESE 535 Spring DeHon 2 Today Routing –Pathfinder graph based global routing simultaneous global/detail Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing

Penn ESE 535 Spring DeHon 3 Global Routing Problem: Find sequence of channels for all routes –minimizing channel sizes –minimize max channel size –meeting channel capacity limits

Penn ESE 535 Spring DeHon 4 Global  Graph Graph Problem on routes through regions w

Penn ESE 535 Spring DeHon 5 Global/Detail With limited switching (e.g. FPGA) –can represent routing graph exactly

Penn ESE 535 Spring DeHon 6 Global/Detail

Penn ESE 535 Spring DeHon 7 Routing in Graph Find {shortest,available} path between source and sink –search problem (e.g. BFS, A*)

Penn ESE 535 Spring DeHon 8 Breadth First Search (BFS) Start at source src Put src node in priority queue with cost 0 –Priority queue orders by cost While (not found sink) –Pop least cost node from queue Get: current_node, current_cost –Is this sink?  found –For each outgoing edge from current_node Push destination onto queue with cost current_cost+edge_cost

Search Animation Penn ESE 535 Spring DeHon 9

Search Animation Penn ESE 535 Spring DeHon 10 Not possible to use minimum Manhattan distance route. Why?

Search Animation Penn ESE 535 Spring DeHon 11

Search Animation Penn ESE 535 Spring DeHon 12

Search Animation Penn ESE 535 Spring DeHon 13

Search Animation Penn ESE 535 Spring DeHon 14

Search Animation Penn ESE 535 Spring DeHon 15

Search Animation Penn ESE 535 Spring DeHon 16

Search Animation Penn ESE 535 Spring DeHon 17

Search Animation Penn ESE 535 Spring DeHon 18

Search Animation Penn ESE 535 Spring DeHon 19

Penn ESE 535 Spring DeHon 20 Easy? Finding a path is moderately easy What’s hard? Can I just iterate and pick paths? –Does greedy selection work?

Penn ESE 535 Spring DeHon 21 Example s1s3s2 d2d1d3 All links capacity 1 si disi di

Penn ESE 535 Spring DeHon 22 Challenge Satisfy all routes simultaneously Routes share potential resources Greedy/iterative –not know who will need which resources E.g. consider routing s3->d3 then s2->d2 then s1->d1 –i.e. resource/path choice looks arbitrary –…but earlier decisions limit flexibility for later like scheduling –order effects result s1s3s2 d2d1d3

Penn ESE 535 Spring DeHon 23 Negotiated Congestion 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

Penn ESE 535 Spring DeHon 24 Negotiated Congestion Here –route signals –allow overuse –identify overuse and encourage signals to avoid reroute signals based on overuse/past congestion

Penn ESE 535 Spring DeHon 25 Basic Algorithm Route signals along minimum cost path If congestion/overuse –assign higher cost to congested resources Makes problem a shortest path search Allows us to adapt costs/search to problem Repeat until done

Penn ESE 535 Spring DeHon 26 Key Idea Congested paths/resources become expensive When there is freedom –future routes with freedom to avoid congestion will avoid the congestion When there is less freedom –must take congested routes Routes that must use congested will, others will chose uncongested paths

Penn ESE 535 Spring DeHon 27 Cost Function (1) PathCost=  (link costs) LinkCost = base  f(#routes using, time) Base cost of resource –E.g. delay of resource –Encourage minimum resource usage (minimum length path, if possible) –minimizing delay = minimizing resources Congestion –penalizes (over) sharing –increase sharing penalty over time s1s3s2 d2d1d =8

Penn ESE 535 Spring DeHon 28 Example (first order congestion) Base costs (delays) s1s3s2 d2d1d Capacity What is preferred path for s1  d1, s2  d2, s3  d3? FUTURE: maybe label circles So they can callout.

Penn ESE 535 Spring DeHon 29 Example (first order congestion) s1s3s2 d2d1d Base costs (delays) Capacity All, individual routes prefer middle; create congestion

Penn ESE 535 Spring DeHon 30 Example (first order congestion) s1s3s2 d2d1d Base costs (delays) Capacity If make congestion expensive: e.g. cost(congest)=2 users What happens when reroute s1  d1?

Penn ESE 535 Spring DeHon 31 Example (first order congestion) s1s3s2 d2d1d Base costs (delays) Capacity Reroute, avoid congestion

Penn ESE 535 Spring DeHon 32 Example (need for history) Base costs (delays) Capacity Need to redirect uncongested paths. s1s2 d2d s3 d3 1 s4 d

Penn ESE 535 Spring DeHon 33 Example (need for history) s1s2 d2d s3 d Imagine partially routed. s4 d Where do we route s3  d3? What happens when we reroute?

Penn ESE 535 Spring DeHon 34 Example (need for history) Cannot route s3  d3 s1s2 d2d s3 d Local congestion alone won’t drive in right directions. Both paths equal cost …neither resolves problem. May ping-pong back and forth. (can imagine longer chain like this) s4 d

Penn ESE 535 Spring DeHon 35 Cost Function (2) Cost = (base + history)*f(#resources,time) History –avoid resources with history of congestion –E.g. add 1 to history every time resource is congested

Penn ESE 535 Spring DeHon 36 Example (need for history) S3  d3 and s4  d4 initially ping-pong Builds up congestion history on path 3 and 4 Eventually makes path 3 and 4 more expensive than path 1; …resolves conflict…  Adaptive cost scheme. s1s2 d2d s3 d s4 d How does history help?

Delay Penn ESE 535 Spring DeHon 37

Penn ESE 535 Spring DeHon 38 What about delay? Existing formulation uses delay to reduces resources, but doesn’t directly treat How do we want to optimize delay? Want: –prioritize critical path elements for shorter delay –allow nodes with slack to take longer paths

Penn ESE 535 Spring DeHon 39 Integrate Delay into Cost Function Cost= –(1-W(edge))*delay + W(edge) *congest –congest as before (base+history)*f(#signals,time) W(edge) = Slack(edge)/D max 0 for edge on critical path >0 for paths with slack Use W(edge) to order routes Update critical path and W each round

Penn ESE 535 Spring DeHon 40 Cost Function (Delay) Cost= –(1-W(edge))*delay + W(edge) *congest –congest as before (base+history)*f(#signals,time) W(edge) = Slack(edge)/D max What happens if multiple slack 0 nets contend for edge? W(edge)=Max(minW,Slack(edge)/D max ) –minW > 0

Problem Are nanoseconds and congestion comparable? How normalize/weight so can add together? Penn ESE 535 Spring DeHon 41

VPR If doesn’t uncongest, weight congestion more Cost= (1-W(e))×delay + W(e)×PF (iter) ×congest PF=Pressure Factor Multiplier Eventually congest dominates delay What might go wrong? Penn ESE 535 Spring DeHon 42

VPR Pressure Factor Converges quickly But may “freeze” with higher delay than necessary Netlist Shuffle experiment Penn ESE 535 Spring DeHon 43 [Rubin / FPGA 2011]

VPR Pressure Factor Tuning Penn ESE 535 Spring DeHon 44 [Raphael Rubin 2010] (1-W(e))×delay + W(e)×PF (iter) ×congest

Alternate Delay Approach Believe Pathfinder can resolve congestion Pathfinder has trouble mixing delay and congestion Idea: Turn delay problem into congestion problem –Reject paths that are too long –All signals compete only for resources that will allow them to meet their timing goals Penn ESE 535 Spring DeHon 45

Outlaw Long Paths Issue: Critical path may go through multiple gates –Contain more than one gate  gate path –How allocate slack among paths? Penn ESE 535 Spring DeHon 46 Target 12 Gate 1 Manhattan hop 1

Outlaw Long Paths Issue: Critical path may go through multiple gates –Contain more than one gate  gate path –How allocate slack among paths? Penn ESE 535 Spring DeHon 47 Target 12 Gate 1 Manhattan hop 1

Outlaw Long Paths Issue: Critical path may go through multiple gates –Contain more than one gate  gate path –How allocate slack among paths? Penn ESE 535 Spring DeHon Target 12 Gate 1 Manhattan hop 1 Total Slack?

Slack Budgeting Divide slack among the paths –Slack of 3 –Example: give slack 1 to first link 2 to second Penn ESE 535 Spring DeHon 49 [So / FPGA 2008]

Slack Budgeting Divide slack among the paths Each net now has delay target Reject any path exceeding delay target Reduce to congestion negotiation Penn ESE 535 Spring DeHon 50 [So / FPGA 2008] 5 6

Slack Budgeting Can often find lower delay routes that VPR Takes 10x as long –Mostly in slack budgeting Solution depends on slack budget –Not exploiting full freedom to re-allocate slack among links Penn ESE 535 Spring DeHon 51 [So / FPGA 2008]

Delay Target Routing Similar high-level idea Just set target for Pathfinder cost –Rather than allowing to float Penn ESE 535 Spring DeHon 52

Delay Target Cost= (1-W(edge))*delay + W(edge) *congest W(edge) = Slack(edge)/D target –Previously: denominate was D max Compute Slack based on D target –can be negative W(edge)=Max(minW,Slack(edge)/D target ) –minW > 0 Penn ESE 535 Spring DeHon 53

Delay Target Routing Does allow slack to be used on any of the gate  gate connections on path –…but not being that deliberate/efficient about the allocation Doesn’t require time for slack allocation Penn ESE 535 Spring DeHon 54

Delay Target Routing Penn ESE 535 Spring DeHon 55 [Rubin / FPGA 2011]

Delay Target Routing Less sensitive to initial conditions Penn ESE 535 Spring DeHon 56 [Rubin / FPGA 2011]

Penn ESE 535 Spring DeHon 57 Run Time? Route |E| edges Each path search O(|E graph |) worst case –…generally less Iterations?

Penn ESE 535 Spring DeHon 58 Quality and Runtime Experiment For Synthetic netlists on HSRA –Expect to be worst-case problems Congestion only –Quality = # channels Number of individual route trials limited (measured) as multiple of nets in design –(not measuring work per route trial)

Penn ESE 535 Spring DeHon 59 Quality: fixed runtime

Penn ESE 535 Spring DeHon 60 Quality Target

Penn ESE 535 Spring DeHon 61 Conclusions? Iterations increases with N Quality degrade as we scale?

Penn ESE 535 Spring DeHon 62 Techniques to Accelerate (already in use in data just shown)

Penn ESE 535 Spring DeHon 63 Inefficient? What is inefficient about this search? How might we do better?

Penn ESE 535 Spring DeHon 64 Inefficient? What if we only searched for minimum length paths? How would we do that? Downside?

Recall Search Example Penn ESE 535 Spring DeHon 65 Not possible to use minimum Manhattan distance route.

Only Search Minimum Length Penn ESE 535 Spring DeHon 66

Minimum Search Penn ESE 535 Spring DeHon 67 What is the minimum we need to search (if uncongested)? What would that search look like?

BFS vs. DFS Penn ESE 535 Spring DeHon 68

Penn ESE 535 Spring DeHon 69 Search Ordering Default: breadth first search for shortest –O(total-paths) Alternately: 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)

Penn ESE 535 Spring DeHon 70 BFS  A* Start at source Put src node in priority queue with cost 0 –Priority queue orders by cost –Cost =  (path so far) + min path to dest While (not found sink) –Pop least cost node from queue Get: current_node, current_cost –Is this sink?  found –For each outgoing edge Push destination onto queue with cost current_cost+edge_cost Maybe show a parameter here for tuning how greedy?

Penn ESE 535 Spring DeHon 71 BFS vs. A*

Penn ESE 535 Spring DeHon 72 Single-side, Directed (A*) Only expand search windows as prove necessary to have longer route.

Penn ESE 535 Spring DeHon 73 Search: one-side vs. two-sides One-side vs. Two-sides

Penn ESE 535 Spring DeHon 74 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 reduction [Tessier/thesis’98]

Penn ESE 535 Spring DeHon 75 Searching Use A* like search –Always expanded (deepen) along shortest …as long as can prove no other path will dominate –Uncongested: takes O(path-length) time –Worst-case reduces to breadth-first O(total-paths)

Penn ESE 535 Spring DeHon 76 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 Cost adaptive to route –reroute with new costs Accommodate delay and congestion

Penn ESE 535 Spring DeHon 77 Big Ideas Exploit freedom Technique: –Graph algorithms (BFS, DFS) –Search techniques: A* –Iterative improvement/relaxation –Adaptive cost refinement

Penn ESE 535 Spring DeHon 78 Admin Assignment 4 due Wednesday Reading for Wednesday on web Spring Break next week Reading for Monday after break –On Blackboard