Lecture06 - High-Level Digital Design Automation
Lecture06 - High-Level Digital Design Automation
Analysis of Algorithms
Announcements
1
Review: LUT Mapping
A B Cin Cout S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
2
Agenda
3
[3B2-14] mdt2010030062.3d 4/5/010 16:1 Page 68
Place and
ExtTool SimTool STA Synthesis EC Formal
route
Fast F. Lang.,
Nonlinear Continuous Discrete Combinatorial Logic and
linear automata and
solvers optimization optimization algorithms semantics
solvers concurrency
subject matter are lost to other disciplines. The work- engineering change, and formal verification. The
Analysis of Algorithms
▸ Need a systematic way to compare two algorithms
– Execution time is typically the most common criterion used
– Space (memory) usage is also important in most cases
– But difficult to compare in practice since these algorithms
may be implemented on different machines, use different
languages, etc.
– Plus, execution time is usually input-dependent
5
Big-O Notation
6
Big-O Notation (cont.)
8
Exponential Growth
▸ Consider a 1 GHz processor (1 ns per clock cycle)
running 2N operations (assuming each op requires one cycle)
N 2N 1ns x 2N
10 103 1 us
20 106 1 ms
30 109 1s
40 1012 16.7 mins
50 1015 11.6 years
60 1018 31.7 years
70 1021 31710 years
9
NP-Complete
10
How to Identify an NP-Complete Problem
§ I can’t find an efficient § I can’t find an efficient
algorithm, I guess I’m just algorithm, but neither can all
too dumb. these famous people.
12
Types of Algorithms
13
Various Algorithm Design Techniques
14
Broader Classification of Algorithms
▸ Combinatorial algorithms
– Graph algorithms
…
▸ Computational mathematics
– Optimization algorithms
Topics touched on in 6775
– Numerical algorithms
…
▸ Computational science
– Bioinformatics
– Linguistics
– Statistics
…
▸ Digital logic
– Boolean minimization
…
▸ Information theory & signal processing
…
▸ Machine learning and statistical classification
Many more
[source: en.wikipedia.org/wiki/List_of_algorithms]
15
Graph Definition
▸ Formal definition:
– G = (V, E), V = {v1, v2, ..., vn}, E = {e1, e2, ..., em}
• V : set of vertices (nodes), E : set of edges (arcs)
– Undirected graph: an edge {u, v} also implies {v, u}
– Directed graph: each edge (u, v) has a direction
16
Simple Graph
b a
a
f
b
c
e g
d c
17
Graph Connectivity
▸ Paths
– A path is a sequence of edges connecting two vertices
– A simple path never goes through any vertex more than once
▸ Connectivity
– A graph is connected if there is a path between any two vertices
– Any subgraph that is connected can be referred to as a
connected component
– A directed graph is strongly connected if there is always a
directed path between vertices
18
Trees and DAGs
19
Examples
Tree
a
b c d
e f g h i j k
e e
20
Graph Traversal
b BFS order:
aà?
d
c
21
Topological Sort
b
a b d c
c d
22
Application in EDA: Static Timing Analysis
23
STA: An Example
a d f
Output pins
Input pins
b e h
24
STA: Arrival Times
▸ Assumptions
– All inputs arrive at time 0
– All gate delays = 1ns (d = 1); all wire delays = 0
▸ Questions: Arrival time (AT) of each gate output?
Minimum clock period?
ATf = maxkÎpred(f){ATk} + df
0 1 2 3
a d f 3
0
4
g 4
1
0 b e h 5
2 5
0 1
c
0
0 1 2
3
a d f 5
0
4
g 5
1
0 b e
2 h 5
5
3 4
c
3
Gates are visited in a reverse topological order 26
STA: Slacks
27
STA: Use of Slacks
▸ Assumptions:
– All inputs arrive at time 0
– All gate delays = 1ns, wire delay = 0
– Clock period = 5ns
▸ Question: What is the maximum slowdown of each gate
without violating timing?
Slacki = RTi – ATi
0-0=0 1-1=0 2-2=0
3-3=0
5-3=2
0-0=0
4-4=0
5-4=1
1-1=0
0-0=0 5-5=0
2-2=0
5-5=0
3-0=3
3-0=3 4-1=3
28
Next Lecture
29
Acknowledgements
30