Professional Documents
Culture Documents
Dr DC Hendry
All storage elements (that is, flip flops and latches) have a setup and a
hold period.
The setup period is that period of time before the active clock edge during
which the input data to the storage element must be static.
The hold period is that period of time after the active clock edge during
which the input data to the storage element must be static.
Should data change during this period then a setup violation or a hold
violation is said to have occurred.
Should such a violation occur, the data stored by the storage device is
unpredictable. There is also a small probability that the device enters a
metastable state.
Setup Period
1. The setup period is the minimum length of time the data input signal must
remain stable before the active edge of the clock to ensure predictable and
correct functioning of the cell.1
2. Correct functioning of the cell is defined to occur when the delay to a
stable output does not exceed the reference delay (measured with a large
setup time) by more than 10%.1
1 Paraphrase of TSMC databook
Clock Period
3. Measured as the interval between the data signal crossing 50% of Vdd and
the clock signal crossing 50% of Vdd 1
setup
time
The hold period is similarly defined to the setup period but refers to the period
of time after the active clock edge during which the input data must not change.
hold
time
Clock
Input
VHDL Models
library ieee;
use ieee.std logic 1164.all;
entity dlatch is
generic (
tclk2q : time := 0.3 nS;
tsetup : time := 0.25 nS;
thold : time := 0.2 nS);
port (
clk : in std logic;
d : in std logic;
q : out std logic;
q n : out std logic);
end dlatch;
VITAL Standard
1. The generics above could be used (with much effort) to represent real
delays.
2. Real designs have say one million logic gates.
2 Metastable States
Metastable States
1. The VAST majority of setup and hold violations do not cause a metastable
state.
2. A very small number of such violations however can cause the storage
element to display a very long clock to Q delay.
3. Essentially, the storage element is caught half way between logic 0 and
logic 1.
4. Circuit noise will eventually cause the device to go to either logic 0 or
logic 1.
Input Synchronisers
1. External inputs from the outside world have timing unrelated to the clock
signal.
2. Setup and hold violations with metastability simply reflect the uncertainty
on the timing of the input signal.
3. Metastable states are however a possible cause of problems.
4. Synchroniser circuits can be used to reduce the probability of such prob-
lems to an acceptable level.
5. Such circuits do however introduce a delay into the input signal - not
usually a problem.
Input D Q D Q D Q "synchronised"
output
Q Q Q
Clock
3 Clock Period
The minimum clock period for a register to register transfer must allow for:
-
-
tclk2Q -
tmax tsetup
4.
Clock Skew
1. The clock period must now allow for the clock to the register supplying
data being late with respect to the clock of the receiving register by tskew .
-
-
tskew -
tclk2Q -
tmax tsetup
2.
3. The minimum clock period is now:
tclock = tskew + tclk2Q + tmax + tsetup
Hold Violations
1. Can the input signals to the receiving register arrive too early and cause
a hold violation?
2. In the absence of clock skew this is unlikely as tclk2Q is usually much larger
than thold .
3. With clock skew however, this needs to be considered. If the minimum
combinational logic delay is tmin , we require:
tclk2Q + tmin > tskew + thold
- tclk2q + tmin
-
- -
4. tskew + thold
4 Pipelining