Testing of Embedded Systems
Testing of Embedded Systems
8
Testing of Embedded
System
Version 2 EE IIT, Kharagpur 1
Lesson
39
Design for Testability
Version 2 EE IIT, Kharagpur 2
Instructional Objectives
After going through this lesson the student would be able to
1. Introduction
The embedded system is an information processing system that consists of hardware and
software components. Nowadays, the number of embedded computing systems in areas such as
telecommunications, automotive electronics, office automation, and military applications are
steadily growing. This market expansion arises from greater memory densities as well as
improvements in embeddable processor cores, intellectual-property modules, and sensing
technologies. At the same time, these improvements have increased the amount of software
needed to manage the hardware components, leading to a higher level of system complexity.
Designers can no longer develop high-performance systems from scratch but must use
sophisticated system modeling tools.
The increased complexity of embedded systems and the reduced access to internal nodes has
made it not only more difficult to diagnose and locate faulty components, but also the functions
of embedded components may be difficult to measure. Creating testable designs is key to
developing complex hardware and/or software systems that function reliably throughout their
operational life. Testability can be defined with respect to a fault. A fault is testable if there
exists a well-specified procedure (e.g., test pattern generation, evaluation, and application) to
expose it, and the procedure is implementable with a reasonable cost using current technologies.
Testability of the fault therefore represents the inverse of the cost in detecting the fault. A circuit
is testable with respect to a fault set when each and every fault in this set is testable.
Design-for-testability techniques improve the controllability and observability of internal nodes,
so that embedded functions can be tested. Two basic properties determine the testability of a
node: 1) controllability, which is a measure of the difficulty of setting internal circuit nodes to 0
or 1 by assigning values to primary inputs (PIs), and 2) observability, which is a measure of the
difficulty of propagating a node’s value to a primary output (PO) [1-3]. A node is said to be
testable if it is easily controlled and observed. For sequential circuits, some have added
predictability, which represents the ability to obtain known output values in response to given
input stimuli. The factors affecting predictability include initializability, races, hazards,
oscillations, etc. DFT techniques include analog test busses and scan methods. Testability can
also be improved with BIST circuitry, where signal generators and analysis circuitry are
implemented on chip [1, 3-4]. Without testability, design flaws may escape detection until a
Things to be followed
Large circuits should be partitioned into smaller sub-circuits to reduce test costs. One of
the most important steps in designing a testable chip is to first partition the chip in an
appropriate way such that for each functional module there is an effective (DFT)
technique to test it. Partitioning must be done at every level of the design process, from
architecture to circuit, whether testing is considered or not. Partitioning can be functional
(according to functional module boundaries) or physical (based on circuit topology).
Partitioning can be done by using multiplexers and/or scan chains.
Test access points must be inserted to enhance controllability & observability of the
circuit. Test points include control points (CPs) and observation points (OPs). The CPs
are active test points, while the OPs are passive ones. There are also test points, which are
both CPs and OPs. Before exercising test through test points that are not PIs and POs, one
should investigate into additional requirements on the test points raised by the use of test
equipments.
Circuits (flip-flops) must be easily initializable to enhance predictability. A power-on
reset mechanism controllable from primary inputs is the most effective and widely used
approach.
Test control must be provided for difficult-to-control signals.
Automatic Test Equipment (ATE) requirements such as pin limitation, tri-stating, timing
resolution, speed, memory depth, driving capability, analog/mixed-signal support,
internal/boundary scan support, etc., should be considered during the design process to
avoid delay of the project and unnecessary investment on the equipments.
Internal oscillators, PLLs and clocks should be disabled during test. To guarantee tester
synchronization, internal oscillator and clock generator circuitry should be isolated
during the test of the functional circuitry. The internal oscillators and clocks should also
be tested separately.
Analog and digital circuits should be kept physically separate. Analog circuit testing is
very much different from digital circuit testing. Testing for analog circuits refers to real
measurement, since analog signals are continuous (as opposed to discrete or logic signals
in digital circuits). They require different test equipments and different test
methodologies. Therefore they should be tested separately.
Things to be avoided
Asynchronous(unclocked) logic feedback in the circuit must be avoided. A feedback in
the combinational logic can give rise to oscillation for certain inputs. Since no clocking is
employed, timing is continuous instead of discrete, which makes tester synchronization
virtually impossible, and therefore only functional test by application board can be used.
The above guidelines are from experienced practitioners. These are not complete or universal. In
fact, there are drawbacks for these methods:
There is a lack of experts and tools.
Test generation is often manual
This method cannot guarantee for high fault coverage.
It may increase design iterations.
This is not suitable for large circuits
Primary Primary
Inputs Outputs
SFF SCANOUT
Combinational
Logic
SFF
SFF
TC
SCANIN
CLK
Fig. 39.1 Scan structure to a design
Fig. 39.1 shows a scan structure connected to design. The scan flip-flips (FFs) must be
interconnected in a particular way. This approach effectively turns the sequential testing problem
into a combinational one and can be fully tested by compact ATPG patterns. Unfortunately, there
are two types of overheads associated with this technique that the designers care about very
much. These are the hardware overhead (including three extra pins, multiplexers for all FFs, and
extra routing area) and performance overhead (including multiplexer delay and FF delay due to
extra load).
SI M FF M FF M FF SO
C
T
DI L1 L2
D Q D Q
SI
T
C
Fig. 39.2 The Shift-Register Modification approach
Fig. 39.2 shows that when the test mode pin T=0, the circuit is in normal operation mode
and when T=1, it is in test mode (or shift-register mode).
The scan flip-flips (FFs) must be interconnected in a particular way. This approach
effectively turns the sequential testing problem into a combinational one and can be fully
tested by compact ATPG patterns.
There are two types of overheads associated with this method. The hardware overhead
due to three extra pins, multiplexers for all FFs, and extra routing area. The performance
overhead includes multiplexer delay and FF delay due to extra load.
DI DO
SO
C1 L2
L1
This approach gives a lower hardware overhead (due to dense layout) and less
performance penalty (due to the removal of the MUX in front of the FF) compared to the
MUX Scan Approach. The real figures however depend on the circuit style and
technology selected, and on the physical implementation.
DI +L1
DI
C L1 +L1
SI
A
C
SI
+L2 B L2 +L2
A
B
LSSD requires that the circuit be LS, so we need LS memory elements as defined above. Figure
39.4 shows an LS polarity-hold latch. The correct change of the latch output (L) is not dependent
on the rise/fall time of C, but only on C being `1' for a period of time greater than or equal to data
propagation and stabilization time. Figure 39.5 shows the polarity-hold shift-register latch (SRL)
used in LSSD as the scan cell.
The scan cell is controlled in the following way:
• Normal mode: A=B=0, C=0 → 1.
• SR (test) mode: C=0, AB=10→ 01 to shift SI through L1 and L2.
Advantages of LSSD
1. Correct operation independent of AC characteristics is guaranteed.
2. FSM is reduced to combinational logic as far as testing is concerned.
3. Hazards and races are eliminated, which simplifies test generation and fault simulation.
Combinational PO
Logic
PI RAM
CK nff bite
TC SCANOUT
SCANIN
Select
Address Address
Log2 nff bites Decoder
CK
TC
SCAN
SE OUT
The difference between this approach and the previous ones is that the state vector can
now be accessed in a random sequence. Since neighboring patterns can be arranged so
that they differ in only a few bits, and only a few response bits need to be observed, the
test application time can be reduced.
In this approach test length is reduced.
This approach provides the ability to `watch' a node in normal operation mode, which is
impossible with previous scan methods.
This is suitable for delay and embedded memory testing.
The major disadvantage of the approach is high hardware overhead due to address
decoder, gates added to SFF, address register, extra pins and routing
The control input HOLD keeps the output steady at previous state of flip-flop.
For HOLD = 0, the latch holds its state and for HOLD = 1, the hold latch becomes
transparent.
For normal mode operation, TC = HOLD =1 and for scan mode, TC = 1 and Hold = 0.
Hardware overhead increases by about 30% due to extra hardware the hold latch.
This approach reduces power dissipation and isolate asynchronous part during scan.
It is suitable for delay test [8].
next SHFF
D
Q
S
SFF
T
Q
CK
HO
Combinational
circuit
CK1
FF
FF
CK2 SCANOUT
SFF
TC
SFF
SCANIN
3. Conclusions
Accessibility to internal nodes in a complex circuitry is becoming a greater problem and thus
it is essential that a designer must consider how the IC will be tested and extra structures will
be incorporated in the design. Scan design has been the backbone of design for testability in
the industry for a long time. Design automation tools are available for scan insertion into a
circuit which then generate test patterns. Overhead increases due to the scan insertion in a
circuit. In ASIC design 10 to 15 % scan overhead is generally accepted.
Review Questions
1. What is Design-for-Testability (DFT)? What are the different kinds of DFT techniques
used for digital circuit testing?
2. What are the things that must be followed for ad-hoc testing? Describe drawbacks of ad-
hoc testing.
3. Describe a full scan structure implemented in a digital design. What are the scan
overheads?
4. Suppose that your chip has 100,000 gates and 2,000 flip-flops. A combinational ATPG
produced 500 vectors to fully test the logic. A single scan-chain design will require about
106 clock cycles for testing. Find the scan test length if 10 scan chains are implemented.
Given that the circuit has 10 PIs and 10 POs, and only one extra pin can be added for test,
how much more gate overhead will be needed for the new design?
5. For a circuit with 100000 gates and 2000 flip-flops connected in a single chain, what will
be the gate overhead for a scan design where scan-hold flip-flops are used?
6. Calculate the syndromes for the carry and sum outputs of a full adder cell. Determine
whether there is any single stuck fault on any input for which one of the outputs is
syndrome-untestable. If there is, suggest an implementation possibly with added inputs,
which makes the cell syndrome-testable.
7. Describe the operation of a level-sensitive scan design implemented in a digital design.
What are design rules to be followed to make the design race-free and hazard-free? What
are the advantages and disadvantages of LSSD?
J
A
B CONE X G
C
D K
CONE Y CONE X
H
E
• CONE X has a structure which can be tested 100% by using the following 4 vectors and
its output is also specified.
• CONE Y has a structure which can be tested 100% by using the following 4 vectors and
its output is also specified.
C D E OUTPUT
0 0 1 0
0 1 0 1
1 0 1 1
1 1 1 0
Derive a smallest test set to test this circuit so that each partition is applied the required 4
test vectors. Also, the XOR gate should be exhaustively tested.
A B C D E F G H J K
0 0 1 1 0
0 1 1 0
1 1 0 1 1
1 0 0 1