EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more...
-
date post
21-Dec-2015 -
Category
Documents
-
view
214 -
download
0
Transcript of EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more...
![Page 1: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/1.jpg)
EDA (CS286.5b)
Day 19
Covering and Retiming
![Page 2: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/2.jpg)
“Final”
• Like Assignment #1– longer– more breadth– focus since assignment #2 – …but ideas are cummulative– open notes, books, etc.
• Make available before 12:01am Mon. 3/13
• Due 11:59pm Wed. 3/15
![Page 3: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/3.jpg)
Previously
• Cover (map) LUTs for minimum delay– day 3– solve optimally
• Retiming for minimum clock period– day 18– solve optimally
• Simultaneous Cover and 1D placement– day 9– optimal area cover for trees
![Page 4: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/4.jpg)
Today
• Solving cover/retime separately not optimal
• Cover+retime
• Review
![Page 5: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/5.jpg)
Example
![Page 6: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/6.jpg)
Example
![Page 7: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/7.jpg)
Example: Retimed
![Page 8: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/8.jpg)
Example: Retimed
Note: only 4 signals here (2 w/ 2 delays each)
![Page 9: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/9.jpg)
Example 2
![Page 10: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/10.jpg)
Example 2
Cycle Bound: 2
![Page 11: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/11.jpg)
Example 2: retimed
![Page 12: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/12.jpg)
Example 2: retimed
Cycle Bound: 1
![Page 13: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/13.jpg)
Basic Observation
• Registers break up circuit, limiting coverage– fragmentation – prevent grouping
![Page 14: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/14.jpg)
Phase Ordering Problem
• General problem we’ve seen before– e.g. placement
• don’t know where connected neighbors will be if unplaced…
– don’t know effect/results of other mapping step
• Here– don’t know delay (what can be packed into LUT) if
retime first– not retime first
• fragmention: forced breaks at bad places
![Page 15: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/15.jpg)
Observation #1
• Retiming flops to input of (fanout free) subgraph is trivial (and always doable)
![Page 16: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/16.jpg)
Observation #1: Consequence
• Can cover ignoring flop placement
• Then retime LUTs to input
![Page 17: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/17.jpg)
Fanout Problem?
Can I use the same trick here?
![Page 18: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/18.jpg)
Fanout Problem?
Cannot retime without replicating.
Replicating increase I/O (so cut size).
![Page 19: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/19.jpg)
Different Replication Problem
![Page 20: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/20.jpg)
Different Replication Problem
![Page 21: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/21.jpg)
Different Replication Problem
Can now retime and cover with single LUT.
![Page 22: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/22.jpg)
Replication
• Once add registers– can’t just grab max flow and get replication
• (compare flowmap)
• Or, can’t just ignore flop placement when have reconvergent fanout through flop
![Page 23: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/23.jpg)
Replication
• Key idea:– represent timing paths in graph– differentiating based on number of registers in
path
– new graph: all paths from node to output have same number of flip-flops
– label nodes ud where d is flip-flops to output
![Page 24: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/24.jpg)
Deal with Replication
• Expanded Graph: – start with target output node– for each input u to current expanded graph
• grab it’s input edge (xu) with weight (w(e))• add node x(d+w(e)) to graph (if necessary)• add edge x(d+w(e)) ud with weight (w(e))
– continue breadth first until have enough• enough for flow cut• at most k*n node depth required
![Page 25: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/25.jpg)
Example
b
c
a
c0
i j
![Page 26: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/26.jpg)
Example
b
c
a
c0
a0 b1
i j
![Page 27: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/27.jpg)
Example
b
c
a
c0
a0 b1
i j
i0 c1 j0
![Page 28: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/28.jpg)
Example
b
c
a
c0
a0 b1
i j
i0 c1 j0
a1 b2
![Page 29: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/29.jpg)
Example 2
e
a c
b d
e0
c0 d0
a1 a0 b0 b1
i1 j1 i0 j0
![Page 30: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/30.jpg)
Expanded Graph
• Expanded graph does not have fanout of different flip-flop depths from the same node.
• Can now cover ignoring flip-flops and trivially retime.
![Page 31: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/31.jpg)
Labeling
• Key idea #1:– compute distances/delay like flowmap
• dynamic programming
• Key idea #2: – count distance from register (like G-1/c graph)
![Page 32: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/32.jpg)
Labeling: Edge Weights
• To target clock period c– use graph G-1/c– paper:
• assign weight -c*w(e)+1
• (same thing scaled by c and negated)
![Page 33: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/33.jpg)
Labeling: Edge Weight Idea
• same idea:– will need register ever c LUT delays– credit with registers as encounter– charge a fraction (1/c) every LUT delay– know net distance at each point– if negative (delays > c*registers)
• cannot distribute to achieve c
– otherwise• labeling tells where to distribute
![Page 34: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/34.jpg)
Labeling: Flow cut
• Label node as before (flowmap)– L(v)=min{l(u)+w(e)|uv}– trivially can be L(v)-1/c == new LUT
• note min vs. max and -1/c vs. +1 due to rescaling to match retiming formulation and G-1/c graph
• in this formulation, a combinational circuit of depth 4 would have L(v)=-4/c
– if can put this and all L(v)’s in one LUT• this can be L(v)
• construct and compute flow cut to test
![Page 35: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/35.jpg)
LUT Map and Retime
• Start with outputs
• Cover with LUT based on cut– move flip-flops to inputs of LUT
• Recursively cover inputs
• Use label to retime– r(v)=l(v)+1/c
![Page 36: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/36.jpg)
Target Clock Period c
• As before (retiming)– binary search to find optimal c
![Page 37: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/37.jpg)
Variations
• Relaxation/Iteration– original computed labels iteratively
• Flow cover– Cong+Wu/ICCAD96 showed can use flowmap-
style min-cut
• Find all k-cuts first– Pan+Liu/FPGA’98
![Page 38: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/38.jpg)
Summary
• Can optimally solve– LUT map for delay– retiming for minimum clock period
• But, solving separately does not give optimal solution to problem
• Account for registers on paths
• Label based on register placement and (flow) cover ignoring registers
• Labeling gives delay,covering, retiming
![Page 39: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/39.jpg)
Today’s Big Ideas
• Exploit freedom
• Cost of decomposition– benefit of composite solution
• Technique:– dynamic programming– network flow
![Page 40: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/40.jpg)
This Class: Decomposition
• Scheduling
• Logic Optimization– sequential, two-level, multi-level
• Covering/gate-mapping
• Retiming
• Partitioning
• Placement
• Routing
![Page 41: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/41.jpg)
This Class: Techniques• Dynamic Programming• Linear Programming (LP, ILP)• Graph Algorithms• Greedy Algorithms• Randomization• Search• Heuristics• Approximation Algorithms• Iterative/Relaxation
![Page 42: EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.](https://reader030.fdocuments.in/reader030/viewer/2022032704/56649d645503460f94a47273/html5/thumbnails/42.jpg)
Spring Quarter
• Primarily Project– select problem– formulate– survey attacks, similar problems, brainstorm– implement– benchmark/analyze
• Few lectures on additional topics– most geared to projects– time to discuss, present project