Topics Espresso

advertisement

Topics

■ CAD systems and algorithms (§10)

– Logic synthesis (§10.7)

– Layout synthesis and analysis (§10.4, §10.5)

– Timing analysis (§10.6)

– Simulation (§10.3)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Espresso

■ Well-known two-level logic optimizer.

■ Espresso optimization loop:

– expand;

– make irredundant;

– reduce.

■ Optimization loop is designed to refine cover to reduce its size.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Expand-irredundant-reduce cycle

1 x

2

0 start

1 x

1 expand make irredundant reduce

1

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Multi-level Logic Synthesis

■ Optimize area, delay ... for a logic network

■ Technology-independent optimizations

– Output with generic logic gates (e.g. NAND2)

– Cost estimation

» area: by number of literals

» delay: by path length (level of logic)

■ Technology-dependent optimizations

– Use technology mapping to convert generic logic gates to technology library gates.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Factorization

■ Three steps:

– generate potential common factors and compute literal savings if used;

– choose factors to substitute into network;

– restructure the network to use the new factors.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Algebraic/Boolean division

■ Algebraic division

– f = ab + bc = b(a+c)

– formulate candidate divisor;

– test how it divides into the function;

■ Boolean division

– f = ab + ac + bc = (a + b) (a + c)

– Can’t be obtained by simple algebraic division

– Use don’t cares

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Don’t-cares in Boolean networks

■ In two-level function, don’t-cares are defined at primary output.

■ In Boolean network, structure of network itself introduces don’t-cares.

■ Types of structural don’t-cares :

– satisfiability ;

– observability .

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Don’t-cares in Boolean networks

■ Satisfiability don’t cares (SDC)

– Occur when an intermediate variable value is inconsistent with its function inputs. Since this can’t happen, we don’t care.

■ Observability don’t cares (ODC)

– Occur when an intermediate variable’s value doesn’t affect the network primary outputs.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Example of Boolean division

■ f = ab + ac + bc = ab + c(a+b)

■ Let g = a+b

– Write f in terms of a, b, c, g

– The (a, b, c, g) satisfying g

(a+b) = 1 are SDCs ab /cg 00 01 11 10

00 0 - - 0

01 - 1 1 -

11 - 0 1 -

10 - 0 1 -

Modern VLSI Design 3e: Chapter 10

F = ga+gc = g(a+c)

F = (a+b)(a+c)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Factorization for delay

Remove factors from critical path, add them off critical path: f1 fa f2 late

Modern VLSI Design 3e: Chapter 10 fb late

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Partial collapsing

When delay/area constraint not met, reconstruct the logic network through partial collapsing before

Modern VLSI Design 3e: Chapter 10 after

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Technology mapping

■ Also known as library binding .

■ Rewrites Boolean network in terms of available logic functions.

■ Can optimize for both area and delay.

■ Can be viewed as a pattern matching problem. Tries to find pattern match which minimizes area/delay cost.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Technology mapping procedure

■ Write Boolean network in canonical NAND form.

■ Write each library gate in canonical NAND form. Assign cost to each library gate.

■ If network is a tree, can use dynamic programming to select minimum-cost cover of network by library gates.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Breaking into trees

Not optimal, but reasonable cuts usually work

OK.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Technology mapping example

Modern VLSI Design 3e: Chapter 10 after three levels of matching

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Technology mapping example, cont’d

Modern VLSI Design 3e: Chapter 10 after four levels of matching

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Technology mapping example, cont’d

■ Try to cover tree from primary inputs to primary outputs.

■ Proceed one gate at a time. At the next level, select minimum-cost cover at that point.

■ Propagate all the way to the root of the tree

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Topics

■ CAD systems and algorithms (§10)

– Logic synthesis (§10.7)

– Layout synthesis and analysis (§10.4, §10.5)

– Timing analysis (§10.6)

– Simulation (§10.3)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Layout synthesis

■ Two critical phases of layout design:

– placement of components on the chip;

– routing of wires between components.

■ Placement and routing interact, but separating layout design into phases helps us understand the problem and find good solutions.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Placement metrics

■ Quality metrics for layout:

– area;

– delay.

■ Area and delay determined in part by wiring.

■ How do we judge a placement without wiring?

Estimate wire length without actually performing routing.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Wire length as a quality metric bad placement

Modern VLSI Design 3e: Chapter 10 good placement

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Wire length measures

■ Estimate wire length by distance between components.

■ Possible distance measures:

– Euclidean distance (sqrt(x 2 + y 2 ));

– Manhattan distance (x + y).

■ Multi-point nets must be broken up into trees for good estimates.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Placement techniques

■ Can construct an initial solution, improve an existing solution.

■ Pairwise interchange is a simple improvement metric:

– Interchange a pair, keep the swap if it helps wire length.

– Heuristic determines which two components to swap.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Placement by partitioning

■ Works well for components of fairly uniform size.

■ Partition netlist to minimize total wire length using min-cut criterion.

■ Partitioning may be interpreted as 1-D or 2-

D layout.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Min-cut bisecting partitioning partition 1

Modern VLSI Design 3e: Chapter 10

C

A

1 net

3 nets

B

D partition 2

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Min-cut bisecting partitioning, cont’d

■ Swapping A and B:

– B drags 1 net;

– A drags 3 nets;

– total cut increase: 4 nets.

■ Conclusion: probably not a good swap, but must be compared with other pairs.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Kernighan-Lin algorithm

■ Compute min cut criterion:

– count total net cut change.

■ Algorithm exchanges sets of nodes to perform hill-climbing—finding improvements where no single swap will improve the cut.

■ Recursively subdivide to determine placement detail.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Simulated annealing

■ Powerful but CPU-intensive optimization technique.

■ Analogy to annealing of metals:

– temperature determines probability of a component jumping position;

– probabilistically accept moves.

– start at high temperature, cool to lower temperature to try to reach good placement.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Routing

■ Major phases in routing:

– global routing assigns nets to routing areas;

– detailed routing designs the routing areas.

■ Net ordering is a major problem. Order in whch nets are routed determines quality fo result. Net ordering is a heuristic.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Maze routing

■ Will find shortest path for a single wire, if such a path exists.

■ Two phases:

– Label nodes with distance, radiating from source.

– Use distances to trace from sink to source, choosing a path that always decreases distance to source.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Maze routing example

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Detailed routing

■ Dogleg router breaks net into multiple segments as needed.

■ Try to minimize number of dogleg segments per net to minimize congestion for future nets.

■ One good heuristic—use left-edge criterion on each dogleg segment to fill up the channel.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Rivest-Fiduccia channel router

■ Routes from left to right. Assigns all nets that cross the current column to tracks.

■ Heuristics:

– Make connections to pins.

– Add jogs to put multi-track net into one track.

– Add jogs to reduce distance in multi-track nets.

– Add jogs to move net toward next pin.

– Add tracks when necessary.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

YACR2

■ Tries to minimize number of vias as well as number of tracks.

■ Temporarily satisfies vertical constraints by adding blank space between pins.

■ Eliminates blank space after by adding jogs.

■ May route in both directions on same layer.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Layout analysis

■ Test design rules using Boolean combinations of masks, grow/shrink.

Modern VLSI Design 3e: Chapter 10

M1 and M2 not (M1 or M2)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Scan line algorithm

■ Mark each edge of polygon with direction.

■ Sweep scan line across layout.

■ At each point on scan line, count number of left-hand and right-hand edges to determine what rectangle that point is in.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Scan line algorithm example

Modern VLSI Design 3e: Chapter 10

M1

M2 b a sweep

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Topics

■ CAD systems and algorithms (§10)

– Logic synthesis (§10.7)

– Layout synthesis and analysis (§10.4, §10.5)

– Timing analysis (§10.6)

– Simulation (§10.3)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Timing analysis

■ Unlike simulation, timing analysis is valueindependent —doesn’t require specifying inputs.

■ Simulation can be optimistic—you may not apply worst-case input vector.

■ Timing analysis can be pessimistic, but that is safer than optimistic.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Signal delay example

Must apply worst case to find longest delay:

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Timing analysis procedure

■ Two major steps:

– build graph with elemental delays;

– traverse graph to find longest path.

■ Must model 0-1 and 1-0 delays independently for more accurate total delay.

■ Use value analysis to prune impossible paths.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch circuit example

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch circuit example, cont’d

■ Make assumptions about primary inputs.

■ Primitive path delay : RC delay from power supply or primary input to transistor gate or primary output.

■ Primitive path (p0, p1, p2, p3) delays computed from RC analysis.

■ Each path forms an edge in timing analysis graph.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch circuit example, cont’d

■ Timing analysis graph is analyzed to find worst-case delay through entire circuit.

■ Timing graph structure:

– nodes are sources and sinks of primitive delay paths;

– edges represent primitive delay paths.

■ Use depth-first or breadth-first search to find longest delay path.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Timing analysis pessimism

■ False paths create unexcercisable paths which make delay pessimistic. Can be identified using analysis algorithms.

■ Some transistor configurations only allow current flow in one direction—other direction of current/sigmal flow is a false path.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Current/signal flow analysis

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

False current path example

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

False current path example, cont’d

■ Many paths in barrel shifter cannot be exercised.

■ Driver gates enforce current flow in one direction on data lines, eliminating some paths through the pass transistors.

■ Path analysis which does not take into account feasible current flow will identify infeasible long paths.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Abstract timing model

■ Model elements: input load, output drive, input/output delay.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Topics

■ CAD systems and algorithms (§10)

– Logic synthesis (§10.7)

– Layout synthesis and analysis (§10.4, §10.5)

– Timing analysis (§10.6)

– Simulation (§10.3)

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Event-driven simulation

■ Event-driven simulation is designed for digital circuit characteristics:

– small number of signal values;

– relatively sparse activity over time.

■ Event-driven simulators try to update only those signals which change in order to reduce CPU time requirements.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Event-driven simulator structure

■ An event is a change in a signal value.

■ A timewheel is a queue of events.

■ Simulator traces structure of circuit to determine causality of events—event at input of one gate may cause new event at gate’s output.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Event-driven simulation example

A

B

C logic network

Modern VLSI Design 3e: Chapter 10

D behavior

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Event-driven simulation example, cont’d

■ Events at primary inputs:

– A changes at t=1;

– B changes at t=2.

■ Immediate causality:

– C changes at t=3 when both inputs to NOR are

0.

■ Event propagation:

– D changes at t=4.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Delay models

■ Unit-delay simulators assume that each component has a one-unit delay. Model function but not performance.

■ Variable-delay simulators allow each component to have its own delay. Accuracy of performance estimates from variabledelay simulators depends on how well circuits can be extracted to digital model.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch simulation

■ Special type of event-driven simulation optimized for MOS transistors.

■ Treats transistor as switch. Takes capacitance into account to model charge sharing, etc.

■ Can also be enhanced to model transistor as resistive switch.

Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei Modern VLSI Design 3e: Chapter 10

Switch simulation example

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch simulation example, cont’d

■ Node g may be connected to either power supply, but signals on that node are terminated by gate of transistor.

■ To solve for values of a and b nodes, must first solve for value of g node.

– If g=1, then a=b.

– If g=0, other parts of circuit determine a and b independently.

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Switch simulation and charge sharing

■ Closed transistor connects source and drain nodes. Want to determine voltages of source/drain nodes taking into account capacitance.

■ Capacitance determines node size . Use size of connected nodes to determine new value of nodes.

■ Result may be X (unknown).

Modern VLSI Design 3e: Chapter 10 Copyright

2002 Prentice Hall PTR, Adapted by Yunsi Fei

Download