0% found this document useful (0 votes)
228 views15 pages

How Does Scan Work PDF

The document describes how scan testing works by walking through the process step-by-step. It explains that scan testing involves: 1) Scanning in a test vector to initialize the scan flip-flops; 2) Applying the test vector to the combinational logic by forcing primary inputs; 3) Capturing the outputs of the combinational logic in the scan flip-flops; and 4) Scanning out the response while scanning in the next test vector.

Uploaded by

Rajeev K Nair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views15 pages

How Does Scan Work PDF

The document describes how scan testing works by walking through the process step-by-step. It explains that scan testing involves: 1) Scanning in a test vector to initialize the scan flip-flops; 2) Applying the test vector to the combinational logic by forcing primary inputs; 3) Capturing the outputs of the combinational logic in the scan flip-flops; and 4) Scanning out the response while scanning in the next test vector.

Uploaded by

Rajeev K Nair
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

HowdoesScanWork?

PreparedbyMahmutYilmaz
ScanChainOperationforStuckatTest

DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn

Hereisanexampledesignundertest(DUT).Ihaveshownasinglescanchain(inredcolor)inthecircuit,withScanInandScanOutports.
AssumethatallscanflipflopsarecontrolledbytheScanEnablesignal.

1

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

X
X
X
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

X
X
X
X
X
X
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=1
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn
100101011

Thefirstthingweshoulddoistoputthescanflipflopsintoscanmode.WedothisbyusingtheScanEnablesignal.Inthiscase,forcingScan
Enableto1enablesthescanmode.
Notethatinitiallyallthescanflopsatunknownstate(X).Forindustrialcircuits,therearearchitecturalwaystoinitializeallflipflopstoknown
statesifneeded.However,forthisparticularcase,assumethatallscanflopswereinitiallyatunknownstateX.
Wewanttoscaninthefollowingvector:100101011

2

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
1
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

X
X
X
X
X
X C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=1
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn
100101

Andwestartscanninginthetestvectorwewanttoapply.Inthefigureabove,youseethatthefirst3bitsarescannedin.Weshiftinasinglebit
ateachclockcycle.Usually,thescanshiftfrequencyisveryslow,muchlowerthanthefunctionalfrequencyofthecircuit.Thisfrequencyis
currentlyabout100MHzformostASICcircuits.AMDuses400MHzshiftfrequency,whichisaprettyhighvalueforthatpurpose.Ofcourse,the
higherthetestfrequency,theshorterthetesttime.

3

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn

P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

1
0
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
1
1
1
0
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=0
ScanOut

Atthispoint,wehaveshiftedinthecompletetestvector'100101011'.Wearedonewithshiftingin.WewilldisablescanmodebyforcingScan
Enableto0.
Notethattheshiftedintestvectoriscurrentlyappliedtothecombinationallogicpiecesthataredrivenbyscanflipflops.Itmeansthat2nd,
3rd,and4thcombinationallogicblocksarealreadyforcedtestinputs.

4

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
0
0
1
0
1
0
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1
0
1
1
1
0
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=0
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn

Thenextstepistoforceprimaryinput(PI)valuesandmeasuretheprimaryoutput(PO)values:force_PIandmeasure_PO.
Notethatfromthepreviousstep,theshiftedintestvectorwasalreadyappliedtothecombinationallogicpiecesthataredrivenbyscanflip
flops.Itmeansthat2nd,3rd,and4thcombinationallogicblockswerealreadyforcedtestinputs.Now,thesecombinationallogicblockshave
generatedtheiroutputs.
SinceweforcedvaluestoPI,the1stcombinationalblockalsohasitsoutputsready.Furthermore,theoutputsofthe4thcombinationalblockcan
nowbeobservedfromPOs.Wewillgettheoutputvaluesofcombinationalblock4bymeasuringPOs.
Fortherestofthecombinationalblocks(1,2,and3),weneedtopushtheoutputvaluesintoscanflipflopsandthenshiftthesevaluesout.

5

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1
0
1
0
1
0
0
1
0
0
0
1
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
1
0
0
1
0
1
1
1
0
1
0
0
1
0
1
1
1 C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn

ScanEnable=0
ScanOut

Inordertopushtheoutputvaluesofcombinationalblocks1,2,and3intoscanflipflops,wehavetotogglethesystemclock.Oncewetogglethe
systemclock,allDflipflops(scanflipflops)willcapturethevaluesattheirDinput.
Inthefigureabove,thecaptureeventisshown.

6

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1
0
1
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn
111100111
ScanEnable=1
ScanOut

Now,wearereadytoshiftoutthecapturedcombinationallogicresponses.However,whiledoingthat,wewillalsoshiftinthenexttestvector.
Thenexttestvectoris'111100111'.
NotethatwehavesetScanEnablesignalbackto1toenableshifting.

7

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
1
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1 1
0
1 C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0111
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn
11110
ScanEnable=1
ScanOut

Hereisasnapshotoftheshiftoperation.Asyoucansee,wehaveshiftedout4bitsoftheprevioustestresponse,andatthesametimeshifted
in4bitsofthenewtestvectorinput.Thenewtestvectorbitsareshowninboldredinthefigureabove.

8

HowdoesScanWork? PreparedbyMahmutYilmaz
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
1
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1 1
0
0 C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

011000111
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn

ScanEnable=1
ScanOut

Atthispoint,wehavecompletelyscannedout(shiftedout)thetestresponsefortheprevioustestvector,andalsoscannedin(shiftedin)the
newtestvectorinput.
Theprocesscontinuesinthiswayuntilallthetestvectorsareapplied.
Note:Onpage5,Imentionedforce_PIandmeasure_PO.Actually,forindustrialcircuits,force_PIandmeasure_POisnotdone.Thisisbecause
primaryinputsandoutputsareconnectedtoveryslowpads,andthesepadsarenottestedbystructuraltest.Youmayrealizethatinthiscase
the 1st and 4th combinational blocks cannot be tested: 1st block cannot be tested because we cannot apply inputs to it (force_PI). 4th block
cannot be tested because we cannot check its output (measure_PO). This is usually not a problem because the circuits are surrounded by
wrapperscanflipflops.Thismeansthatthereisactuallynologicbeforethefirstlevelofscanflipflopsorafterthelastlevelofscanflipflops.
So,thecompleteDUTiscoveredbyscanflipflops.
9

HowdoesScanWork? PreparedbyMahmutYilmaz
ScanChainOperationforDelayTest
Scanoperationfordelaytestisverysimilartostuckattest.Themaindifferenceisthatdelaytestneedstwoinputsinsteadofone.Thefirstinput
isalwaysthescannedinvector.Thesecondinputcanbegeneratedintwodifferentways.Eachwayhasitsownname:(1)LaunchonCapture
(LOC)orbroadsidedelaytest,(2)Launchonshift(LOS)orskewedloaddelaytest.NowIwillshowhoweachofthesemethodsworks...
(1)LaunchonCapture(Broadside)
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
1
1
0
1
1
1
0
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=0
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn

Thisisthesamefigurethatisshownonpage5.Assumethatalltheprocessuntilthispointisthesameasstuckattest.Youscannedinthetest
vector, forced the PIs, and they created some output responses for combinational blocks. This is step 1. You have already applied your first
vectorforthedelaytest.Guesswhatisthesecondvector?Thesecondvectorwilltheoutputresponsesofthecombinationalblocks.Eachblock
willgeneratethe2ndtestvectorforthenextstage.Sincethereisnostagebeforethe1stone,youneedapplyforce_PIonemoretime.
10

HowdoesScanWork? PreparedbyMahmutYilmaz
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn

P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

1
1
1
0
1
1
0
1
0
0
0
1
0
0
1
1
1
0
1
1
0
1
0 C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1
1
1
0
1
1
1
0
0
1
0
0
1
1
1
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

DesignUnderTest(DUT)
ScanEnable=0
ScanOut

Of course, in order to push the output responses ofcombinational blocks into scan flipflops, we need to toggle system clock. Once we toggle
thesystemclock(andapplythesecondPIforce),wewillgeneratethesecondtestvectorforthedelaytest,andeachcombinationalcircuitinput
will see an input state transition. The transition on scan flipflop outputs (which are inputs to the next stage combinational block) will be as
follows(startingfromtheclosesttoscaninflop):100101110>010010111
Thesecondinputvectorwillgenerateoutputresponsesjustlikethefirstone.And,youneedtocapturetheseresponsesjustlikewedidbefore,
by toggling the system clock. However, now there is a difference: You have to toggle the system clock at the real operating frequency: This
means that the period between the first clock toggle and second clock toggle should be equal to functional clock period. In this way, you will
capturethedelaytestresponsesatthefunctionalfrequency.

11

HowdoesScanWork? PreparedbyMahmutYilmaz
HereisatimingdiagramoftheLOCprocess(source:MentorGraphicsScanandATPGProcessGuide,August2006):

Asyoucanseeabove,weshiftthe testvectorusingaslowclockfrequency.Then,wesetscanenableto0anddisablescanmode.Inthenext
step, we toggle the clock first time to launch a transition in combinational blocks. After that, we toggle the clock again (at the functional
frequency)tocapturethefinalresponsesofthecombinationalblocks.Thelaunch&captureeventshappenatfunctionalfrequency.Finally,we
shiftedoutthecapturedresponsesusingtheslowclockfrequency.

12

HowdoesScanWork? PreparedbyMahmutYilmaz
(2)LaunchonShift(SkewedLoad)
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1
0
0
0
1
0
1
0
0
0
1
0
1
0
0
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

1
0
1
1
1
1
1
1
0 C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

ScanEnable=1
P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanOut
ScanIn

Thisisthesamefigurethatisshownonpage5and10.So,westartasusual:Assumethatalltheprocessuntilthispointisthesameasstuckat
test. Youscannedin thetestvector,forced thePIs, andthey createdsomeoutputresponsesforcombinationalblocks.ForLOS, wedon't care
abouttheseinitialoutputresponses.Thisisstep1.Youhavealreadyappliedyourfirstvectorforthedelaytest.Sincethereisnostagebefore
the1stone,youneedapplyforce_PIonemoretime.NotethatScanEnablesignalisstillatactivevalue1.Thisisbecausewehavenotyetdone
withshifting.Weneedtoshiftonemoretimetocreatethesecondtestvectorforthedelaytest.

13

HowdoesScanWork? PreparedbyMahmutYilmaz

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

P
r
i
m
a
r
y

O
u
t
p
u
t
s

(
P
O
)

P
r
i
m
a
r
y

I
n
p
u
t
s

(
P
I
)

ScanIn
ScanEnable=1
DesignUnderTest(DUT)
C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

C
o
m
b
i
n
a
t
i
o
n
a
l

L
o
g
i
c

0
0
1
1
0
1
1
1
0
0
1
0
0
0
1
0
0
1
1
1
0
1
1
0
1
0
1
0
0
1
0
1
1
1
0
ScanOut

Notethatasmentionedinthepreviouspage,thefirstvectorofthedelaytestis(startingfromtheclosesttoscaninflop):100101110
Thesecondtestvectorisgeneratedbyshiftingonemoretime,andinsertingonemorebitfromScanIn,2ndvectoris:010010101
Justafteryoushiftthelastbit(andlaunchedatransitionbyapplyingthesecondvector),youhavetoforceScanEnableto0,andalsotogglethe
systemclockatthefunctionalfrequency.Thelasttoggleofthesystemclockwillcapturethedelaytestresponses.Finally,youwillscanoutthe
responsesasusual.

14

HowdoesScanWork? PreparedbyMahmutYilmaz
15

YoucanseethatweneedtohaveaveryfastScanEnablesignalinordertouseLOS.ScanEnableshouldbeabletoswitchfrom1to0withina
veryshorttime.ThisisusuallyadifficultprocessbecauseScanEnableisnotdesignedtooperateathighfrequencies.Duetothisreason,many
industrialdesignsuseLOCinsteadofLOS.(TherearesomedesignsthatuseLOS.ThereareworkaroundstofastScanEnablesignalrequirement,
butIwillnotgointodetailsfornow.)
Asyoucanseeabove,weshiftthetestvectorusingaslowclockfrequencyuntilthelastbit.ThelastshiftedbitcreatestheLaunchevent.Then,
before we toggle the system clock to capture responses, we set scan enable to 0 and disable scan mode. This has to happen very fast since
Launch & Capture event happen at high frequency. In the next step, we toggle the clock again to capture the final responses of the
combinationalblocks.Finally,weshiftedoutthecapturedresponsesusingtheslowclockfrequency.
HereisatimingdiagramoftheLOSprocess(source:MentorGraphicsScanandATPGProcessGuide,August2006):

You might also like