+ All Categories
Home > Documents > CS137: Electronic Design Automation

CS137: Electronic Design Automation

Date post: 07-Jan-2016
Category:
Upload: jirair
View: 23 times
Download: 1 times
Share this document with a friend
Description:
CS137: Electronic Design Automation. Day 12: October 28, 2005 Covering and Retiming. Previously. Cover (map) LUTs for minimum delay solve optimally Retiming for minimum clock period solve optimally. Today. Solving cover/retime separately not optimal Cover+retime. Example. Example. - PowerPoint PPT Presentation
39
CALTECH CS137 Fall2005 -- DeHon 1 CS137: Electronic Design Automation Day 12: October 28, 2005 Covering and Retiming
Transcript
Page 1: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 1

CS137:Electronic Design Automation

Day 12: October 28, 2005

Covering and Retiming

Page 2: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 2

Previously

• Cover (map) LUTs for minimum delay– solve optimally

• Retiming for minimum clock period– solve optimally

Page 3: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 3

Today

• Solving cover/retime separately not optimal

• Cover+retime

Page 4: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 4

Example

Page 5: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 5

Example

Page 6: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 6

Example: Retimed

Page 7: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 7

Example: Retimed

Note: only 4 signals here (2 w/ 2 delays each)

Page 8: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 8

Example 2

Page 9: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 9

Example 2

Cycle Bound: 2

Page 10: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 10

Example 2: retimed

Page 11: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 11

Example 2: retimed

Cycle Bound: 1

Page 12: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 12

Basic Observation

• Registers break up circuit, limiting coverage– fragmentation – prevent grouping

Page 13: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 13

Phase Ordering Problem• General problem

– don’t know effect/results of other mapping step

– Will see this many places

• Here– don’t know delay (what can be packed into

LUT) if retime first– If we do not retime first

• fragmention: forced breaks at bad places

Page 14: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 14

Observation #1

• Retiming flops to input of (fanout free) subgraph is trivial (and always doable)

Page 15: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 15

Observation #1: Consequence

• Can cover ignoring flop placement

• Then retime flops to input

Page 16: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 16

Fanout Problem?

Can I use the same trick here?

Page 17: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 17

Fanout Problem?

Cannot retime without replicating.

Replicating increases I/O (so cut size).

Page 18: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 18

Different Replication Problem

Page 19: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 19

Different Replication Problem

Page 20: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 20

Different Replication Problem

Can now retime and cover with single LUT.

Page 21: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 21

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 22: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 22

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 23: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 23

Deal with Replication

• Expanded Graph: – start with target output node– for each input u to current expanded graph

• grab its 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 |E|=kn node depth required

Page 24: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 24

Example

b

c

a

c0

i j

Page 25: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 25

Example

b

c

a

c0

a0 b1

i j

Page 26: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 26

Example

b

c

a

c0

a0 b1

i j

i0 c1 j0

Page 27: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 27

Example

b

c

a

c0

a0 b1

i j

i0 c1 j0

a1 b2

Page 28: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 28

Example 2

e

a c

b d

e0

c0 d0

a1 a0 b0 b1

i1 j1 i0 j0

Page 29: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 29

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 30: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 30

Labeling

• Key idea #1:– compute distances/delay like flowmap

• dynamic programming

• Key idea #2: – count distance from register

• like G-1/c graph

Page 31: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 31

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 32: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 32

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 33: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 33

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

• Correspond to flowmap case: L(v)+1

• 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 34: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 34

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 35: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 35

Target Clock Period c

• As before (retiming)– binary search to find optimal c

Page 36: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 36

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 37: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 37

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 38: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 38

Admin

• Assignment 3A due today– Anyone looked at SAT programming?

• Class meets all next week (MWF)– Monday reading online– Wed. reading (hardcopy handout)– Fri. reading in email last night

Page 39: CS137: Electronic Design Automation

CALTECH CS137 Fall2005 -- DeHon 39

Today’s Big Ideas

• Exploit freedom

• Cost of decomposition– benefit of composite solution

• Technique:– dynamic programming– network flow


Recommended