Docsity

Optimizing Performance - Digital Design II | ECE 4514, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Optimizing Performance - Digital Design II | ECE 4514 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 4514

Digital Design II

Spring 2008^ Lecture 19:

Patrick Schaumont

Lecture 19:

Optimizing Performance

A

Tools/Methods

Lecture

Patrick Schaumont

Area-Delay Product

Area (eg. Slices)

Suboptimal

Points

Patrick Schaumont

Delay = Performance

(e.g. cycles)

OptimalPoints

Area-Delay Product

Area (eg. Slices)

Patrick Schaumont

Delay = Performance

(e.g. cycles)

Delay Constraint BestChoice

Optimizing Performance - Overview 

Performance factors of a digital design

^

Latency and Throughput

^

Delay = Clock Period * Cycle Count

What determines the minimum clock period?

Performance Optimizations you can do in Verilog

^

Parallel Computations

Patrick Schaumont

^

Parallel Computations

^

Pipelining

^

Retiming

Summary Optimizing Area & Performance

Delay of a design 

Latency = (cycles from I to O) * (clock period)

^

Example:

-^

System clock frequency = 20MHz ( = 50 ns period)

-^

Each

output

is available 10 clock cycles after a new

input

is provided

^

Latency = 10 * 50 ns = 500 ns

Patrick Schaumont

Digital Synchronous

Design

fCLK

Input

Output 10 cycles

Delay of a design 

Throughput = (cycles between I) * (clock period)

^

Example:

-^

System clock frequency = 20MHz

-^

Each 5 clock cycles a new input is accepted

^

Throughput = 5 * 50 ns = 250 ns

Patrick Schaumont

Digital Synchronous

Design

fCLK

Input

Output

5 cycles

Delay = Cycle Count * Clock Period 

Delay (either latency or throughput) has twocomponents

^

Cycle Count.

This quantity is controlled by the kind of Verilog

that the designer writes

^

Clock Period.

This quantity is determined by the synthesis

tools that map the Verilog into an implementation

Since a designer cannot choose the clock period

Patrick Schaumont

Since a designer cannot choose the clock period directly, the designer will

constrain

it

^

"Tools, I want you to implement this circuit with a clock periodsmaller then 25 ns"

^

The tools will

try

to match this constraint

^

The tools may or may not achieve the desired clock period

^

If the tools cannot achieve the constraint,the tools report a

timing violation

Optimizing the Delay 

Delay = Cycle Count * Clock Period

So to decrease the system delay, we can do twothings:

^

Decrease the cycle count

^

Decrease the clock period

Both options can be influenced by the

Verilog

Designer

Patrick Schaumont

Both options can be influenced by the

Verilog

Designer

We will focus on how to influence the clock period(which seems the least obvious to do)

Let's first consider the factors in a digital design thatdetermine the

minimum

clock period

Minimum Clock Period

Combinational

Logic

CLK

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

A

Patrick Schaumont

A
CLK

Tclk->Q This is the time need for the output of aflip-flop to switch to a new value after

a clock edge has occured

Minimum Clock Period

Combinational

Logic

CLK

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

A^
B

Patrick Schaumont

A
CLK

This is the time need for the logic tocalculate a new output. The delay iscaused by gates as well as wires.

B^

TLogic

+ T

Routing

Minimum Clock Period

Combinational

Logic

CLK

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

A^
B

Patrick Schaumont

A
CLK
B

In this case, the timing of the system is OK,

since the actual T

clk

> T

clk,min

Tclk,min

Tclk

Minimum Clock Period

Combinational

Logic

CLK

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

A^
B

Patrick Schaumont

A
CLK
B

The margin between the actual clock periodand the minimal clock period is called

slack

Tslack

= T

clk

- T

clk,min

Tclk,min

Tclk

Tslack

Minimum Clock Period

Combinational

Logic

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

CLK

Patrick Schaumont

Once the technology is chosen,Tclk->Q and Tsetup are fixed.An example from the Spartan 3Edatasheet is shown on the right.

Minimum Clock Period

Combinational

Logic

Tclk,min

= T

clk->Q

+ T

Logic

+ T

Routing

+ T

Setup

CLK

Patrick Schaumont

However, even after the technology is chosen,the designer can

still

influence T

logic

and T

routing

by making modifications to the Verilog code.Thus, if we want to decrease the minimumclock period, we need to consider these terms.