ch14.6.htm

来自「介绍asci设计的一本书」· HTM 代码 · 共 310 行

HTM
310
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">

<HTML>

<HEAD>

<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">



<TITLE> 14.6&nbsp;Scan Test</TITLE></HEAD><!--#include file="top.html"--><!--#include file="header.html"-->



<DIV>

<P>[&nbsp;<A HREF="CH14.htm">Chapter&nbsp;start</A>&nbsp;]&nbsp;[&nbsp;<A HREF="CH14.5.htm">Previous&nbsp;page</A>&nbsp;]&nbsp;[&nbsp;<A HREF="CH14.7.htm">Next&nbsp;page</A>&nbsp;]</P><!--#include file="AmazonAsic.html"--><HR></DIV>

<H1 CLASS="Heading1">

<A NAME="pgfId=50305">

 </A>

14.6&nbsp;<A NAME="15991">

 </A>

Scan Test</H1>

<P CLASS="BodyAfterHead">

<A NAME="pgfId=50306">

 </A>

Sequential logic poses a very difficult ATPG problem. Consider the example of a 32-bit counter with a final carry. If the designer included a reset, we have to clock the counter 2<SUP CLASS="Superscript">

32</SUP>

 (approximately 4 <SPAN CLASS="Symbol">

&#165;</SPAN>

 10<SUP CLASS="Superscript">

9</SUP>

) times to check the carry logic. Using a 1 MHz tester clock this requires 4 <SPAN CLASS="Symbol">

&#165;</SPAN>

 10<SUP CLASS="Superscript">

3</SUP>

 seconds, 1 hour, or (at approximately $0.25 per second) $1,000 of tester time. Consider a 16-bit state machine implemented using a one-hot state register with 16 D flip-flops. If the designer did not include a reset we have a very complicated initialization problem. A sequential ATPG algorithm must consider over 2000 states when constructing sequential test vectors. In an <SPAN CLASS="Emphasis">

</SPAN>

<A NAME="marker=82017">

 </A>

ad hoc approach to testing we could construct special reset circuits or create manual test vectors to deal with these special situations, one at a time, as they arise. Instead we can take a <SPAN CLASS="Definition">

structured test </SPAN>

<A NAME="marker=82023">

 </A>

approach (also called <SPAN CLASS="Definition">

design for test</SPAN>

<A NAME="marker=105815">

 </A>

, though this term covers a wider field).</P>

<P CLASS="Body">

<A NAME="pgfId=81805">

 </A>

We can automatically generate test vectors for combinational logic, but ATPG is much harder for sequential logic. Therefore the most common sequential structured test approach converts sequential logic to combinational logic. In full-scan design we replace every sequential element with a scan flip-flop. The result is an internal form of boundary scan and, if we wish, we can use the IEEE 1149.1 TAP to access (and the boundary-scan controller to control) an internal-scan chain.</P>

<P CLASS="Body">

<A NAME="pgfId=82094">

 </A>

<A HREF="CH14.6.htm#33065" CLASS="XRef">

Table&nbsp;14.9</A>

 shows a VHDL model and schematic symbols for a scan flip-flop. There is an area and performance penalty to pay for scan design. The scan MUX adds the delay of a 2:1 MUX to the setup time of the flip-flop; this will directly subtract from the critical path delay. The 2:1 MUX and any separate driver for the scan output also adds approximately 10 percent to the area of the flip-flop (depending on the features present in the original flip-flop). The scan chain must also be routed, and this complicates physical design and adds to the interconnect area. In ASIC design the benefits of eliminating complex sequential ATPG and the addition of observability and controllability usually outweigh these disadvantages.</P>

<TABLE>

<TR>

<TD ROWSPAN="1" COLSPAN="1">

<P CLASS="TableTitle">

<A NAME="pgfId=82038">

 </A>

TABLE&nbsp;14.9&nbsp;<A NAME="33065">

 </A>

Scan flip-flop.</P>

</TD>

</TR>

<TR>

<TD ROWSPAN="1" COLSPAN="1">

<P CLASS="TableFigure">

<A NAME="pgfId=82043">

 </A>

&nbsp;</P>

<DIV>

<IMG SRC="CH14-24.gif">

</DIV>

</TD>

</TR>

<TR>

<TD ROWSPAN="1" COLSPAN="1">

<P CLASS="ComputerFirstLabel">

<A NAME="pgfId=82045">

 </A>

<B CLASS="Keyword">

library</B>

 IEEE; <B CLASS="Keyword">

use</B>

 IEEE.STD_LOGIC_1164.<B CLASS="Keyword">

all</B>

;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82046">

 </A>

<B CLASS="Keyword">

entity</B>

  DFFSCAN <B CLASS="Keyword">

is</B>

</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82047">

 </A>

<B CLASS="Keyword">

generic</B>

 (reset_value : STD_LOGIC := '0');</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82048">

 </A>

<B CLASS="Keyword">

port</B>

 ( 				Q : <B CLASS="Keyword">

out</B>

 STD_LOGIC ; D, CLK, RST : <B CLASS="Keyword">

in</B>

 STD_LOGIC; </P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82049">

 </A>

				SCOUT : <B CLASS="Keyword">

out</B>

 STD_LOGIC; SCIN, SCEN : <B CLASS="Keyword">

in</B>

  STD_LOGIC );</P>

<P CLASS="ComputerLastLabel">

<A NAME="pgfId=82050">

 </A>

<B CLASS="Keyword">

end</B>

 DFFSCAN;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82051">

 </A>

<B CLASS="Keyword">

architecture</B>

 behave <B CLASS="Keyword">

of</B>

 DFFSCAN <B CLASS="Keyword">

is</B>

</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82052">

 </A>

<B CLASS="Keyword">

signal</B>

 RST_IN, CLK_IN , SCEN_IN , SCIN_IN, D_IN : STD_LOGIC ;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82053">

 </A>

<B CLASS="Keyword">

begin</B>

 </P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82054">

 </A>

RST_IN &lt;= to_X01(RST); CLK_IN &lt;= to_X01(CLK);</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82055">

 </A>

SCEN_IN &lt;= to_X01(SCEN); SCIN_IN &lt;= to_X01(SCIN); D_IN &lt;= to_X01(D);</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82056">

 </A>

DFSCAN : <B CLASS="Keyword">

process</B>

 (CLK_IN, RST_IN) <B CLASS="Keyword">

begin</B>

 </P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82057">

 </A>

	<B CLASS="Keyword">

if</B>

 RST_IN = '0' <B CLASS="Keyword">

then</B>

 Q &lt;= reset_value; SCOUT &lt;= reset_value;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82058">

 </A>

	<B CLASS="Keyword">

elsif</B>

 RST_IN = '1' <B CLASS="Keyword">

and</B>

 rising_edge (CLK_IN) <B CLASS="Keyword">

then</B>

</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82059">

 </A>

		<B CLASS="Keyword">

if</B>

 SCEN_IN = '1' <B CLASS="Keyword">

then</B>

 Q &lt;= SCIN_IN; SCOUT &lt;= SCIN_IN; </P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82060">

 </A>

		<B CLASS="Keyword">

end</B>

 <B CLASS="Keyword">

if</B>

;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82061">

 </A>

		<B CLASS="Keyword">

elsif</B>

 SCEN_IN = '0' <B CLASS="Keyword">

then</B>

 Q &lt;= D_IN; SCOUT &lt;= D_IN;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82062">

 </A>

		<B CLASS="Keyword">

else</B>

 Q &lt;= 'X' ; SCOUT &lt;= 'X';</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82063">

 </A>

		<B CLASS="Keyword">

end</B>

 <B CLASS="Keyword">

if</B>

;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82064">

 </A>

	<B CLASS="Keyword">

elsif</B>

 RST_IN = 'X' <B CLASS="Keyword">

or</B>

 CLK_IN = 'X' <B CLASS="Keyword">

or</B>

 SCEN_IN = 'X' <B CLASS="Keyword">

then </B>

Q &lt;= 'X'; SCOUT &lt;= 'X';</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82065">

 </A>

	<B CLASS="Keyword">

end</B>

 <B CLASS="Keyword">

if</B>

;</P>

<P CLASS="ComputerLabel">

<A NAME="pgfId=82066">

 </A>

<B CLASS="Keyword">

end</B>

 <B CLASS="Keyword">

process</B>

 DFSCAN;</P>

<P CLASS="ComputerLastLabel">

<A NAME="pgfId=82067">

 </A>

<B CLASS="Keyword">

end</B>

 behave;</P>

</TD>

</TR>

</TABLE>

<P CLASS="Body">

<A NAME="pgfId=82137">

 </A>

The highly structured nature of full scan allows test software (usually called a <SPAN CLASS="Definition">

test compiler</SPAN>

<A NAME="marker=82138">

 </A>

) to perform automatic <SPAN CLASS="Definition">

scan insertion</SPAN>

<A NAME="marker=82139">

 </A>

<A NAME="marker=82140">

 </A>

. Using scan design we turn the output of each flip-flop into a <SPAN CLASS="Definition">

pseudoprimary input</SPAN>

<A NAME="marker=82147">

 </A>

 and the input to each flip-flop into a <SPAN CLASS="Definition">

pseudoprimary output</SPAN>

<A NAME="marker=82149">

 </A>

. ATPG software can then generate test vectors for the combinational logic between scan flip-flops.</P>

<P CLASS="Body">

<A NAME="pgfId=81941">

 </A>

There are other approaches to scan design. In <A NAME="marker=81940">

 </A>

<SPAN CLASS="Definition">

partial scan</SPAN>

 we replace a subset of the sequential elements with scan flip-flops. We can choose this subset using heuristic procedures to allow the remaining sequential logic to be tested using sequential ATPG techniques. In <A NAME="marker=81942">

 </A>

<SPAN CLASS="Definition">

destructive scan</SPAN>

 we remove the values at the outputs of the flip-flops during the scan process (this is the usual form of scan design). In <A NAME="marker=81944">

 </A>

<SPAN CLASS="Definition">

nondestructive scan</SPAN>

 we keep the flip-flop outputs intact so that we can shift out the scan chain and then resume where we left off. <A NAME="marker=81817">

 </A>

<SPAN CLASS="Definition">

Level-sensitive scan design</SPAN>

 (<A NAME="marker=81818">

 </A>

<SPAN CLASS="Definition">

LSSD</SPAN>

<A NAME="marker=81819">

 </A>

) is a form of scan design developed at IBM that uses separate clock phases to drive scan elements. </P>

<P CLASS="Body">

<A NAME="pgfId=82284">

 </A>

We shall describe scan design, automated scan insertion, and test-program generation with several examples. First, though, we describe another important structured-test technique.</P>

<HR><P>[&nbsp;<A HREF="CH14.htm">Chapter&nbsp;start</A>&nbsp;]&nbsp;[&nbsp;<A HREF="CH14.5.htm">Previous&nbsp;page</A>&nbsp;]&nbsp;[&nbsp;<A HREF="CH14.7.htm">Next&nbsp;page</A>&nbsp;]</P></BODY>



<!--#include file="Copyright.html"--><!--#include file="footer.html"-->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?