Sei sulla pagina 1di 4

ISSN 2319-8885

Vol.03,Issue.37
November-2014,
Pages:7477-7480
www.ijsetr.com

Huffman Based SOC Test Data Compression


BALDE LAVANYA1, G.PRASAD ACHARYA2
1

PG Scholar, Dept of ECE, Sree Nidhi Institute of Science & Technology, India, Email: lavanyabalde@gmail.com.
2
Associate Professor, Dept of ECE, Sree Nidhi Institute of Science & Technology, India.

Abstract: SoC testing requires large volume of test data as well as more testing time to transmit test data to cores from test
source through TAM (Test Access Mechanism). The large test data and tester memory are the major concerns in terms of cost
and security in testing SoC cores. To overcome the problem of memory and test time, TAM bandwidth should be more. It may
increase hardware overhead. To avoid this, test data has to be compressed. This paper presents compression techniques like
EPRL(Extended Pattern Run Length) coding, Threshold based test data compression and Huffman encoding. The experimental
results shows that the Huffman encoding is optimal and has high compression ratio, requires less memory storage compared to
EPRL and threshold based compression technique. The increased compression efficiency of the Huffman is verified practically.
Keywords: SoC(System-on-Chip), EPRL (Extended Pattern Run Length),Threshold, Huffman.
I. INTRODUCTION
SoCs integrate a wide range of complex functional blocks
into a single die. The functioning of individual functional
block in SoC becomes complex and has high power
dissipations. This may affect the reliability of the entire SoC
and damage the circuit. For testing SoC circuits, large
amount of test data is required. In testing mode, shifting the
test data from memory to cores takes much time. For testing
SoC, huge amount of test data is required. The application
time will increase with increase of test data and large
memory is required to store huge test data for ATE. For this,
coding based test data Compression methods [1]-[8] are
proposed. Compression scheme is a process of encoding data
into smaller size compared to original data. Test data
compression schemes are categorized into fixed to fixed,
fixed to variable, variable to fixed and variable to variable
length coding schemes. If a scheme encodes fixed length
symbols into variable length code words, then it is fixed to
variable length scheme. Among these schemes, variable to
variable length coding schemes are mostly used. The Golomb
codes [2] (frequency directed codes[3]) and variable length
input Huffman compression codes[4] are examples of
variable to variable length coding schemes.
Computing compression ratio for fully specified data is
easy compared to un-specified data. In other words, the data
which contains dont care values(Xs). To specify these dont
care values, MT-filling (maximum transition filling), 0filling, 1-filling, pattern run length coding[5], extended
pattern run length coding[6] are used. The extended pattern
run length(EPRL) coding technique in literature made further
improvements in pattern run length coding(PRL). The rest of
the paper is organized as follows: Section II reviews various
test data compression techniques, Section III describes

Huffman coding and presents experimental results. In Section


IV, comparison of the three compression techniques (EPRL,
Threshold based and Huffman) are presented theoretically,
while section V concludes the paper.
II. PRIOR WORK IN TEST DATA COMPRESSION
A. Extending pattern Run Length Coding
In EPRL technique, the test data is partitioned similar to
PRL coding[3]. The first pattern is used as Reference pattern.
In E-case(equal) and C-case(complementary), 0 and 10
are used to encode next test pattern as shown in Fig.1. An Ncase is indicated by 11. In both E-case and C-case, the
reference pattern is updated, and then a backtracking needs to
be done probably to fill some xs in even all the previously
coded patterns. Then, the reference pattern:
Does not change in the E-case;
Is inverted in the C-case; and
Is XOR-ed with the currently coded pattern in the Ncase to attain a new reference pattern, which is used
to repeat the aforementioned procedure, until all the
patterns in TD are encoded.
Let the test pattern be 1XXXX0011X0X X0011XXXX0
010X0XX0011X00XX01X0111100 and is partitioned into
partitions p1=1XXXX001, p2=1X0XX001, p3=1XXXX001,
p4=0X0XX001, p5=1X00XX01, p6=X0111100. Following
the above procedure shown in Fig 1, encoded pattern for the
considered test pattern is as shown in Table I.
B. Threshold Based Compression Method
Initially, the test vector generated by ATE is divided into
test patterns and each test pattern is divided into blocks. For
example, consider the test vector is T, and it is divided into
test patterns TP1, TP2, TP3 and each test pattern is

Copyright @ 2014 IJSETR. All rights reserved.

BALDE LAVANYA, G.PRASAD ACHARYA


again divided into four blocks B1, B2, B3 and B4 as shown
the next two blocks and is as shown in fig.2. The threshold
in Table 2. In this, the final code word is the combination of
value of TP1 is 0.43, TP2 is 0.43 and TP3 is 0.25. The
average threshold value is 0.37. The value of TP3 lies below
both Code word (C) and Encoded data(E).
average threshold value. Therefore, there is no possibility of
merging in TP3. Then continue the merging process for both
TP1 and TP2 by following procedureas shown in Fig.2. The
test vectors having larger number of unspecified values (Xs)
can be merged resulting in more compression. If the known
values (0 or 1) are more, then the possibility of merging is
less. At certain instances there is no possibility for merging
of sequences. At this situation, for every sequence, a separate
control code has to be generated. As a result, the size of the
compressed sequence is larger than the normal sequence.

Fig1. Pseudo code for EPRL encoding procedure.


TABLE I: Step by step EPRL Encoding

C.Threshold Based Reduced Control code word


Compression
In Table 2, the test pattern(TP3) has more specified bits,
so the compression is not possible. The size of TP3 is 16 and
the compressed data has 24-bits, this is because none of the
blocks is merged. So each block encodes 2-bit control code.
For this reason the compressed code word has 8-bits more
than original data. To overcome this problem, a Special
Control code(SC) 000 is encoded before the original
sequence which indicates none of the blocks are merged. So
the final code word for the uncompressed pattern has a SC
followed by original sequence as shown in Table 3.

Initially threshold value is calculated for each test pattern.


It is calculated as
Threshold

Numberofknownbits NumberofXbits
Numberofknownbits

(1)
Then, calculate the average of thresholds of all test
patterns, compare the average threshold with the remaining
threshold values of test patterns(TP). If any TP threshold lies
below the average threshold, there will be no possible
compression for that test pattern. Then, in remaining test
patterns, adjacent blocks are compared bit- by- bit. After
comparing, the two blocks can be merged, when there is no
transition between the two bits during comparison. The
merged output is then compared with next block, and the
process of merging is going on till any transition occurs. At
last a control code can be encoded which denotes the number
of blocks merged. The control code is the binary
representation of the number of merges. If a transition occurs,
the merging process should stop before the block where the
transition occurs and the corresponding codeword must be
generated [7]. Then a new process of merging is started from

Fig2. Threshold based SOC Test data compression


method.

International Journal of Scientific Engineering and Technology Research


Volume.03, IssueNo.37, November-2014, Pages: 7477-7480

Huffman Based SOC Test Data Compression


frequency of occurrence of 4-bit patterns. For test cubes, the
D. Compression Ratio Calculation
For the calculation of compression ratio, number of bits in
possible compression can be very large. The dont care
test data and number of bits in compressed test data are
bits(Xs) provide flexibility to allow a block to be encoded
considered and CR is calculated based on equation (1).
with more than one possible code word. The shortest possible
code word can be chosen for each block to maximize the
(1)
CR (TD TE) TD
compression.
Where TD is original test data and TE is encoded test data.
TABLE II: Threshold Based Compression Method

Fig3. Example of test set divided into four-bit blocks.

TABLE III: Threshold based Reduced Control word

III. HUFFMAN ENCODING FOR TEST DATA


COMPRESSION
The Huffman compression code is based on statistical
coding, in which variable length code words are used to
represent fixed-length blocks of bits in a data set. For
example, if a data set is divided into four-bit blocks, then
there are
or 16 unique 4-bit blocks. Each of the 4-bit
block, is represented with variable length binary code word.
The code word that occurs most frequently have smaller
number of bits and those that occur least frequently will have
large number of bits, in result the average length of the code
word is minimized. This Huffman code is optimal statistical
code that provides shortest average codeword length among
all uniquely decodable variable length codes. A Huffman
code [8] is obtained by constructing a Huffman tree. The
code word for the binary string corresponding to the leaf is
obtained by the path from the root to each leaf. An example
of constructing a Huffman code can be seen in Table 4 and
Fig 3 and Fig 4. Example of test set divided into four-bit
blocks shown in Fig 3. The frequency of occurrence of each
of the possible blocks is shown in Table 4. Huffman tree for
the code words is shown in Fig 4.
Important property of the Huffman code is that they are
pre-fix free. No code word is a pre-fix of another code word.
This simplifies the decoding process. By identifying the
code-word, that can be replaced with the original 4-bit block.
The amount of compression in this method depends on the

Fig4. Huffman tree for the code shown in Table 4.


TABLE IV: Statistical Coding Based On Symbol
Frequencies For Test Set In Fig. 3

A. Experimental Results
The Huffman compression code is implemented in Clanguage and decompression is implemented in VERILOG
code. The experimental results for Huffman based test data
compression and decompression results are shown in Fig.5
and 6. The compression results indicates that the block which

International Journal of Scientific Engineering and Technology Research


Volume.03, IssueNo.37, November-2014, Pages: 7477-7480

BALDE LAVANYA, G.PRASAD ACHARYA


has more frequency have shorter length code word as shown
code requires less test memory, occupies less space and the
in Fig.5. As Huffman code has the Pre-fix property, no code
cost involved with the hard ware is also less.
word is a pre-fix of another code word. So in Huffman
TABLE V: Comparison Results
Decompression, as each symbol has unique code word, the
decoding process is just replacing the code word with that
pattern. Fig.6 shows the simulation results of Huffman
decompressed output. The simulation results shows that for
the input 00, the decompressed output out[4:1] is 0010.
Similarly, for all the Huffman compressed code words,
decompressed outputs are obtained.
V. CONCLUSION
In this paper, we implemented Huffman code practically
using Verilog and proved that the Huffman code provides
better compression ratio compared to other techniques. Also
it provides advantage in Tester memory required to store test
dataand reduces the time for transferring test data from the
tester to the CUT.

Fig5. Huffman Compressed Data Experimental Result.


IV. COMPARISON OF EPRL, THRESHOLD BASED
AND HUFFMAN CODING
Let the test pattern be 1XXXX001 1X0XX001
1XXXX001 0X0XX001 1X00XX01 X0111100 and is
partitioned into six 8-bit blocks. From the theoretical
calculations, Huffman code has more possible compression
ratio compared to other compression techniques, in result
takes less time for test data transmission from tester to cores
and consumes less tester storage. Their compression ratios
and Memory required by test data are tabulated in Table 5.
As Huffman based compressed

VI. REFERENCES
[1] Usha Mehta, K. S. Dasgupta, N. M. Devashrayee,
Survey of Test Data Compression Techniques Emphasizing
Code Based Schemes, 2009 12th Euromicro Conference on
Digital System Design / Architectures, Methods and Tools.
[2] Xiaoyu Ruan and Rajendra Katti, An Efficient DataIndependent Technique for Compressing Test Vectors in
Systems-on-a-Chip, Proceedings of the 2006 Emerging
VLSI Technologies and Architectures (ISVLSI06), 2006
IEEE.
[3] Maoxiang yi, huaguo liang, lei zhang, and wenfa zhan,
A novel x-ploiting strategy for improving performance of
test data compression, IEEE transactions on very large scale
integration (vlsi) systems, vol. 18, no. 2, february 2010, 324329.
[4] Anshuman Chandra, Anshuman Chandra, System-on-aChip Test-Data Compression and Decompression
Architectures Based on Golomb Codes, IEEE transactions
on computer-aided design of integrated circuits and systems,
VOL. 20, NO. 3, MARCH 2001, 355- 368.
[5] Anshuman Chandra and Krishnendu Chakrabarty,
Frequency-Directed Run-Length (FDR) Codes with
Application to System-on-a-Chip Test Data Compression,
2001 IEEE, 42-47.
[6] Paul T. Gonciari, Bashir M. Al-Hashimi, and Nicola
Nicolici, Variable-Length Input Huffman Coding for
System-on-a-Chip Test, IEEE transactions on computeraided design of integrated circuits and systems, VOL. 22,
NO. 6, JUNE 2003, 783- 796.
[7]Saravanana, R. Vijay Saib, A. Balasubramaniyanc, R.
Silambamuthand, G. Dinesh Babue, E. Deepaf, Efficient
Test Data Compression Achieved by Reduced Control
Code, Procedia Engineering 38 ( 2012 ) 680 684.
[8] Abhijit Jas, Jayabrata Ghosh-Dastidar, Mom-Eng Ng, and
Nur A. Touba, An Efficient Test Vector Compression
cheme Using Selective Huffman Coding, IEEE VOL. 22,
NO. 6, JUNE 2003, 797-806.

Fig6. Huffman Decompressed Data Experimental Result.


International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.37, November-2014, Pages: 7477-7480

Potrebbero piacerti anche