cs137 simplifying structure electronic design automation
play

CS137: Simplifying Structure Electronic Design Automation K-LUT - PDF document

CS137: Simplifying Structure Electronic Design Automation K-LUT can implement any K-input function Day 3: September 29, 2005 Clustering (LUT Mapping, Delay) 1 4 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Today


  1. CS137: Simplifying Structure Electronic Design Automation • K-LUT can implement any K-input function Day 3: September 29, 2005 Clustering (LUT Mapping, Delay) 1 4 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Today Cost Function • How do we map to LUTs? • Delay: number of LUTs in critical path – doesn’t say delay in LUTs or in wires • What happens when delay dominates? – does assume uniform interconnect delay • Lessons… – for non-LUTs • Area: number of LUTs – for delay-oriented partitioning – Assumes adequate interconnect to use LUTs 2 5 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon LUT Mapping LUT Mapping • Problem : Map logic netlist to LUTs • NP-Hard in general – minimizing area • Fanout-free -- can solve optimally given – minimizing delay decomposition – (but which one?) • Old problem? • Delay optimal mapping achievable in – Technology mapping? (last week) Polynomial time – Library approach require 2 2K gates in library • Area w/ fanout NP-complete 3 6 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 1

  2. Decomposition Preliminaries • What matters/makes this interesting? – Area / Delay target – Decomposition – Fanout • replication • reconvergent 7 10 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Area vs. Delay Fanout: Replication 8 11 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Decomposition Fanout: Replication 9 12 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 2

  3. Fanout: Reconvergence Delay 13 16 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Dynamic Programming Fanout: Reconvergence • Optimal covering of a logic cone is: – Minimum cost (all possible coverings) • Evaluate costs of each node based on: – cover node – cones covering each fanin to node cover • Evaluate node costs in topological order • Key : are calculating optimal solutions to subproblems – only have to evaluate covering options at each node 14 17 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Monotone Property Flowmap • Does cost function increase • Key Idea : monotonicly as more of the graph is – LUT holds anything with K inputs included? (do all subsets have property) – Use network flow to find cuts • ≡ logic can pack into LUT including – gate count? reconvergence – I/o? • …allows replication • Important? – Optimal depth arise from optimal depth – How far back do we need to search? solution to subproblems 15 18 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 3

  4. Trivial: Height +1 Flowmap • Delay objective: 1 1 1 1 – minimum height, K-feasible cut 1 1 – I.e. cut no more than K edges – start by bounding fanin ≤ K 2 1 1 • Height of node will be: 2 – height of predecessors or 2 – one greater than height of predecessors 3 • Check shorter first 19 22 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Collapse at max height Flowmap • Construct flow problem – sink ← target node being mapped 1 1 1 1 – source ← start set (primary inputs) 2 – flow infinite into start set – flow of one on each link – to see if height same as predecessors 2 • collapse all predecessors of maximum height into sink (single node, cut must be above) • height +1 case is trivially true 20 23 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Collapse not work Example Subgraph (different/larger graph) 1 1 1 1 1 1 1 1 2 2 Target: K=4 2 2 Forced to label height+1 2 21 24 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 4

  5. Reconvergent fanout (different/larger graph) Two 3-cuts 1 1 1 1 1 2 Can label at height 2 25 28 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Flowmap Flowmap • Max-flow Min-cut algorithm to find cut • Min-cut may not be unique • Use augmenting paths to until discover • To minimize area achieving delay max flow > K optimum – find max volume min-cut • O(K|e|) time to discover K-feasible cut • Compute max flow ⇒ find min cut – (or that does not exist) • remove edges consumed by max flow • Depth identification: O(KN|e|) • DFS from source • Compliment set is max volume set 26 29 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Graph Flowmap • Min-cut may not be unique 27 30 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 5

  6. Graph: maxflow (K=3) Flowmap • Covering from labeling is straightforward – process in reverse topological order – allocate identified K-feasible cut to LUT – remove node – postprocess to minimize LUT count • Notes: – replication implicit (covered multiple places) – nodes purely internal to one or more covers may not get their own LUTs 31 34 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Graph: BFS source Flowmap Roundup • Label Reachable – Work from inputs to outputs – Find max label of predecessors – Collapse new node with all predecessors at this label – Can find flow cut ≤ K? • Yes: mark with label (find max-volume cut extent) • No: mark with label+1 • Cover – Work from outputs to inputs – Allocate LUT for identified cluster/cover – Recurse covering selection on inputs to identified LUT 32 35 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Max Volume min-cut Area 33 36 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 6

  7. DF-Map MFFC example • Duplication Free Mapping – can find optimal area under this constraint – (but optimal area may not be duplication free) [Cong+Ding, IEEE TR VLSI Sys. V2n2p137] 37 40 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Maximum Fanout Free Cones MFFC example MFFC: bit more general than trees 38 41 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon MFFC DF-Map • Partition into graph into MFFCs • Follow cone backward • Optimally map each MFFC • end at node that fans out (has output) • In dynamic programming outside the code – for each node • examine each K-feasible cut – note: this is very different than flowmap where only had to examine a single cut • pick cut to minimize cost – 1 + Σ MFFCs for fanins 39 42 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 7

  8. DF-Map Example DF-Map Example Cones? 43 46 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 44 47 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 45 48 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 8

  9. DF-Map Example DF-Map Example Start mapping 1 1 cone 1 ? 1 49 52 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 1 1 1 ? 1 50 53 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 1 ? 1 1 1 1 51 54 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 9

  10. DF-Map Example DF-Map Example Similar 1 1 1 1 to previous 1 1 1 1 1 1 1 1 1 1 3 ? 55 58 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? ? 56 59 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? ? 57 60 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 10

  11. DF-Map Example DF-Map Example 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? 2 ? 61 64 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ? 2 ? 62 65 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 2 2 ? 63 66 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 11

  12. DF-Map Example DF-Map Example 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 3 2 ? 2 ? 67 70 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 2 ? 2 3 68 71 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 2 ? 2 3 ? 69 72 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 12

  13. DF-Map Example DF-Map Example 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 4 2 3 ? 2 3 ? 73 76 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 4 4 2 3 ? 2 3 ? 74 77 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon DF-Map Example DF-Map Example 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 4 4 2 3 ? 2 3 ? 75 78 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend