You are on page 1of 35

# Clock Strategy

## VLSI System Design

Clocked Systems Latch and Flip-flops System timing Clock skew High speed latch design Phase locked loop Dynamic logic Multiple phase clock Clock distribution
NCKUEE-KJLEE

Clocked Systems
Most VLSI systems are a combination of
pipelines and finite state machines(FSM) Pipelined systems
Input D Q Logic D Q ... Logic D Q output

CLK

CLK

## Finite state machine

Comb. Logic

QD CLK or CLKS
VLSI System Design NCKUEE-KJLEE

## Single-phase clock timing waveforms

Cycle Time (Tc) Clock Setup Time (Ts) CLK

D Q

data

## Q Clock-to-Q Delay (Tq)

Ts: setup time -- the time before the clock edge during which the data input (D) has to be stable Th: hold time -- the time after the clock edge during which the data input (D) has to remain stable Tq: clock-to-Q delay -- The delay from the clock edge to the Q output
NCKUEE-KJLEE

D 0 Q 1 s CLK

clk D Q

clk
0 Q D 1 s CLK

D Q

NCKUEE-KJLEE

clk

D QM Q

slave

clk=0

## VLSI System Design

NCKUEE-KJLEE

System timing
(A) Positive-edge triggered
Tc

clock

Register A

Tq

Combinational Logic Td

Ts

Register B
Tq Td Ts

Tc >Tq + Td + Ts

(B) Alternatively, one may use latches as storage elements to save area.

clock

Latch A

Tq

Combinational Logic Td

Ts

Latch B

NCKUEE-KJLEE

## System timing (cont)

(C)
A Latch A Tq Combinational Logic Tda Ts Latch B B Combinational Logic Tdb Latch c

clock

Tc1

Tco

Tc1>Tqa+Tda+Tsb Tsb=Tsc
Tqa
Tda Tsb Tqb Tdb Tsc

Tco>Tqb+Tdb+Tsc

If Tc=Tc1+Tco and Tc1=Tco, Tqa=Tqb, => The limit is Tc = Tda + Tdb + 2(Tq+Ts)

NCKUEE-KJLEE

## Racing due to clock skew

1 REG 1-bit d q Logic Td 2 0 REG 1-bit d q

## 1. If Tc2 > Tc1 + tq1 + td2

M2 may sample a wrong data (current data) Transparency problem

M2

## 2. If Tc1 + tq1 + td2 >Tc (cycle time)

clk Tc1 Td 2 Old Data Tc2 New Data

NCKUEE-KJLEE

C1 L1 C2 L2

1) C2=C1

C2

C1

## C1 C2 Wrong data in L2 2) C1=C2 C1 C2 Correct data

C1 = C2
C2 C1

or

C2 = C1
C1 C2

L1

L2

Comb
Wrong only if Comb.

CLK

Logic

NCKUEE-KJLEE

## To eliminate (reduce) time skew (clock skew)

1.Balanced delay clock driver
clk-in clk

## 2.Use buffers where necessary

clk clk

clk

clk

clk

clk-in

clk

3.Very careful simulation(HSPICE) 4.Very small rise and fall time on the clock-- large buffer for large load 5.Multiple clocking strategies

clk

NCKUEE-KJLEE

## Some Implementations of clocked latches

Use a weak trickle inverter
-ck D ck
small inverter (low-gain, smaller W or large L)

## eliminate a metal connection smaller area

or
D c lk c lk c lk

Transmission-gate latch
Q D

c lk

buffered input
VLSI System Design

NCKUEE-KJLEE

## Typical symbolic layouts for latches

(a)
V

(b)
DD
V

(c)
DD
V

DD

Q D

clk

-clk

SS

clk

-clk

clk

-clk

SS

SS

-clk
D clk clk clk Q clk

-clk

clk D -clk

clk Q

clk D -clk

clk Q

NCKUEE-KJLEE

## logic gate based latches

(a) Level sensitive
D Q
clk

-Q clk
D

D Q

-Q clk

NCKUEE-KJLEE

## Asynchronously settable and resettable F/Fs

-clk -reset Q clk D -clk -clk clk -reset
Q clk D -clk
VLSI System Design

(a)

clk

-clk

clk

-clk

(b)

clk

-clk

clk

clk

-set -clk
NCKUEE-KJLEE

## Dynamic single clock latches

The feedback inverter and transmission gate are eliminated. The latched value is stored on the capacitance of the input to
the inverter (mainly gate capacitance) Clock-to-Q (Tq) is very small need to be very careful to prevent transparency problem. Internal inversion of the clock is often necessary. Dynamic nodes should be always refreshed or clamped to a known state when in stand-by or low-power mode.
clk D -clk -Q
D -clk clk

(a)

(b)

NCKUEE-KJLEE

## Dynamic single clock latches (cont)

clk D
D

clk

-clk Q

clk D -clk

-clk Q clk

-clk
-clk clk

(c)Tristate inverter

(d)master-slave F/F

(e)

NCKUEE-KJLEE

## Refreshing for Dynamic latches

Dynamic storage nodes are
usually a gate capacitance. Assume the leakage current= 1 nA and the storage capacitance = 0.02PF
C V 5 = 0.02 10 12 9 = 100s i 10

## Even if the storage of the

correct state is unimportant, the leakage may cause the storage node to assume a level that causes the inverter to draw significant current.
large current 5V -> 2.5V

NCKUEE-KJLEE

## Phase locked loop (PLL) clock techniques

(1) To synchronize internal and external clocks. (2) To synchronize data transfers between chips. (3) To operate the internal clock at a higher rate.
(1)

## VLSI System Design

NCKUEE-KJLEE

PLL techniques
(2)
bus high speed tristate bus

(3)
chip PLL /4

clock

system clock

NCKUEE-KJLEE

## Block diagram of a PLL circuit

n Ffb Phase Detector reference clock(F ) in
Phase detector: detect the difference between Ffb and Fin.
If Ffb > Fin =>D pulse If Ffb > Fin =>U pulse

## U D Charge pump Filter VCO n*Fin

Charge pump: charge or Discharge a capacitor according to D and U. Filter: filter the capacitor output (smoother). VCO: Change the oscillation frequency depending on the control voltage. (Voltage Control Oscillator)

## VLSI System Design

NCKUEE-KJLEE

Phase Detector
F1
F1 16/8 16/8 16/8 16/8 16/8 UP 16/8

F2
16/8 16/8

16/8

## If F2 falls before F1 => DN=1

VLSI System Design

F2 16/8

16/8 16/8

16/8 16/8 DN

NCKUEE-KJLEE

Charge Pump
40/2 P1 P-REF CHGUP N2 40/2 CHGDN N4 N-REF P-REF P1 40/2

SW0

2/5 2/5

N1

N3 10/2

IN

Bias circuit

NCKUEE-KJLEE

Filter
VCO
in 2/6 4/6
32/1
13stages

out

32/1

32/1

2400/6

2400/6

16/1 16/1
VCO

16/1 16/1

in

out

## VLSI System Design

NCKUEE-KJLEE

Metastability Problem
D clk clk Q Q
clock 4ns delay 2ns Q -Q No Problem data

delay=2.2ns

If the setup or hold time is not satisfied, I.e., D changes at the activation edge of the clock, then the output Q will have a state depending on the timing relation between D and CLK

delay=2.3ns

Output error

NCKUEE-KJLEE

## Metastable state in a pair of inverters

Inv1 A B
To Solve the metastability problem:
Setup time is shorter than the clock-to-Q delays in a synchronization system. For asynchronous input : need a special circuit called synchronizer.

VB

Inv2

## Inv1 metastable point Inv2 VA 5V

0V
VLSI System Design

2.5V

NCKUEE-KJLEE

## Single-phase N-P CMOS dynamic logic

Combine N-P section of domino logic with clocked CMOS (C2MOS) latch as the output stage.
to n-logic blocks to p-logic blocks clk -clk -clk Inputs from -clk stages clk to -clk section to p-logic blocks to n-logic blocks

clk

(b)

p-logic block

C2MOS latch

## n-logic block (a)

VLSI System Design

p-logic C2MOS latch block From n or buffered p-logic n-p CMOS clk logic stage

-clk logic

clk logic

clk -clk 0 1 1 0

NCKUEE-KJLEE

## Design rules for N-P CMOS dynamic logic

Two problems to be solved
1.Each section must be internally race free. 2.When different section are cascaded to from pipelined system, clock skew should not cause a problem.
clk clk

R1: During precharge, logicblocks must be switched off. R2: During evaluation, internal inputs can make only one transition. When a static logic is used in a N-P CMOS dynamic logic, it should be placed after dynamic logic (I.e., one should keep the static logic up to the C2MOS latch. Reason: static logic after creates a glitch at its output.

## VLSI System Design

NCKUEE-KJLEE

R3: There exists in each logic block Reason: at least one dynamic gate that is separated from 1 1 or the previous C2MOS 2 output stage by an even number C MOS of inventions. clk or clk C2MOS R4: The total number of inversions or Domino between two consecutive C2MOS stage is even.
-clk clk clk -clk

clk

clk

OR

## even umber of inversions

VLSI System Design NCKUEE-KJLEE

## Two phase clocking

phi1 phi 2 -phi1 D phi (a) 1

phi1 phi2
-phi2 phi2 DFF1 Q

skewed clokcs

C1

C2

C2

NCKUEE-KJLEE

## Two phase clock generation

Two-phase clock generator 1. Globally distribute two clocks with or without their 1 clk complements. 3. A single global clock and locally generated two-phase clocks

NCKUEE-KJLEE

-phi1 D DEF1
-phi 2
high level =V

-phi 2
D

DD

-V

tn Q DEF1A

Q
(a) phi1 phi 2

phi1
-phi1 D phi1

phi2
-phi 1

p leakers

-phi

2 n

D phi

n 1 phi2

## D (b) phi D 1 phi 2 DEF1B

phi2

DEF2 Both of these dynamic registers have to drive a local storage gate.
VLSI System Design

DEF3

clk (c)

NCKUEE-KJLEE

## Two phase logic

1. Static logic with two phase registers
Logic 1 Logic 2

2. Dynamic logic
-phi1 from phi2 stage -phi1 phi1 n-logic -phi2 -phi2 phi1 n-logic to phi 1 phi2 stage phi2

phi1 phi1

phi1

evaluate phi1 logic precharge phi1 logic latch phi data 2 evaluate phi2 logic precharge phi2 logic latch phi1 data latch phi2 data

phi2

## VLSI System Design

NCKUEE-KJLEE

Four-Phase clock
11 12 nonoverlapping 23 24
clk 1 clk 2 D clk 1 clk 3 n 1 clk 4 clk 3 in v2 clk 3 clk 34 clk 3 clk 1 Q clk 2 clk 3 clk 4
NCKUEE-KJLEE

Slave Latch

Logic

Master Latch

Logic

clk1

clk2

clk3

clk4

## (a) in v1 clk 1 clk 12 D clk 1 (b )

VLSI System Design

Clock distribution
n-bit datapath

## 1. A single large buffer 2. A distributed-clock-tree approach

n-bit datapath n-bit datapath n-bit datapath n-bit datapath n-bit datapath clock n-bit datapath delays have to match between stages n-bit datapath n-bit datapath n-bit datapath n-bit datapath n-bit datapath

NCKUEE-KJLEE

## Trends in clock strategy

For first-time designer, use static logic, single-phase
static registers. For standard cell and gate-array design, single-phase may be the only choice. Two phase clocking make timing design of RAMs, ROMs and PLAs easier. In modern process and circuits, cycle time is the main concern => single phased Processes are extremely dense => single phase

NCKUEE-KJLEE