tima lab. research reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf ·...

6
ISSN 1292-862 TIMA Lab. Research Reports TIMA Laboratory, 46 avenue Félix Viallet, 38000 Grenoble France

Upload: lamthuy

Post on 30-Aug-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

ISSN 1292-862

TIMA Lab. Research Reports

TIMA Laboratory, 46 avenue Félix Viallet, 38000 Grenoble France

Page 2: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

ON-CHIP TESTING OF LINEAR TIME INVARIANT SYSTEMS USING MAXIMUM-LENGTH SEQUENCES

Libor Rufer, Emmanuel Simeu and Salvador Mir

TIMA Laboratory 46 Av. Félix Viallet

38031 Grenoble FRANCE

Abstract: With the rapid development of system-on-chip (SoC) applications, containing digital and analogue parts, the need for fast and reliable on-chip testing methods has become obvious. We present a method for a fast and accurate broadband determination of the behaviour of analogue and mixed-signal circuits. This technique is based on impulse response (IR) evaluation using pseudo-random Maximum–Length Sequences (MLS). This approach provides a large dynamic range and is thus an optimal solution for measurements in noisy environments and for low-power test signals. We will show the algorithms of the MLS generation and of the impulse response calculation which can be easily implemented on-chip. Copyright © 2003 IFAC Keywords: Test, system-on chip, maximum-length sequence, response measurement.

1. INTRODUCTION

The development of reliable System-on-Chip (SoC) containing mixed-signal systems requires seeking methods for facilitating their test, in particular Built-In Self-Test (BIST) techniques. In the research of cost effective testing of analogue parts, the techniques based on digital signals are often preferred since most of the circuitry in mixed signal systems is digital and most of the test equipment is devoted to them. A number of well-established approaches for the test of analogue functions using digital signals exist. These include impulse response and step response testing as an example.

Knowledge of the system impulse response provides enough information for system functional evaluation as well as for extraction of its parameters. A straightforward way to obtain the impulse response consists in the injection of a very short pulse of high amplitude (ideally close to a Dirac delta function) to a system and in measuring its response. This technique has two drawbacks: first, in the input pulse generation, the amplitude is limited by the range of linearity of the system, and second, the system behaviour that does not correspond to a steady-state regime. The measurement of the input-output cross-correlation function of the system stimulated by a white noise is another way to obtain the impulse response. This procedure fails sometimes due to the

limits in the signal to noise (S/N) ratio. Another source of uncertainty, the stochastic nature of the test signal, needs to be solved by using a certain number of averages. For these reasons efforts have been made during the last decade to reduce the influences of background noise by choosing special test signals which can replace the stochastic properties in a theoretically correct way. As a result of this effort, the technique of a system impulse response measurement based on Maximum-Length Sequences (MLS) has been developed (Rife and Vanderkooy, 1989). MLSs are now well-established test signals in various fields, as in electroacoustic transducer testing or in building acoustics.

Binary MLSs are periodic two-level deterministic sequences of the length N = 2m – 1, where m is an integer denoting the order of the sequence. A simple pseudorandom sequence can be generated by an arrangement of N bits shift register clocked at fixed frequency using an exclusive-OR gate to generate the feedback signal from the nth bit (0<n<m) and the last mth bit of the shift register. If the values of n and m are chosen correctly, the shift register will go through the maximum number of allowable states, N, before repeating itself. It can be shown that the MLS power spectrum is a line spectrum with constant amplitudes in low frequency band whose width can be adjusted by a proper choice of the clock frequency.

Page 3: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

The method is based on the fact that input-output cross-correlation function of a Linear Time Invariant (LTI) system provides the system impulse response when the input signal has a flat frequency spectrum. An estimation of the system impulse response can be obtained by using MLS as an input signal, because its spectrum is flat in frequency band that is defined by the sequence length and by the clock frequency. The basic idea is to apply a MLS to a linear system, sample the resulting response, and then cross-correlate this response with the original sequence. Since the original sequence is a known pseudo-random sequence, there exists an efficient and very fast way to calculate the cross-correlation function, called Fast Hadamard Transform (FHT). A benefit of FHT is that it requires only N log2N operations. Since the MLS is represented by +1 and -1, the FHT consists of additions and subtractions only. For an LTI system, one period of the signal is sufficient for a cross-correlation computation and no averaging is required. The averaging can still be applied to reduce the system noise. Since the sequence is deterministic, it can be repeated precisely. It is therefore possible to increase signal to noise ratio by a synchronous averaging of the response sequence. This procedure reduces the effective background noise level by 3 dB per doubling of the number of averages because the exactly repeated periods of the test signal add up in phase while the background noise is not correlated between the different periods and only its energy is summed.

The use of the MLS-based method can be twofold. Firstly, we can perform a functional evaluation of the measured system based on the impulse response or on the transfer function. Secondly, we can define a system signature based on the impulse response and by checking the measured signature against the expected one we can verify the correctness of a device without measuring the original performance parameters (Pan and Cheng, 1997).

2. MAXIMUM-LENGTH SEQUENCE

Maximum-length sequences (also called pseudo-random sequences, pseudo-noise sequences or m-sequences) are certain binary sequences of the length N = 2m – 1 with m denoting the order of the sequence. These sequences have been known for a long time in areas such as range-finding, scrambling, fault detection, modulation, synchronizing, acoustic measurements, etc. (Rife and Vanderkooy, 1989; Davies, 1966; MacWilliams and Sloane, 1976). Due to their specific properties, they are predestined for special measurement techniques as transfer function or impulse response measurements, where an important gain in speed and in S/N ratio can be obtained.

To construct a MLS of a given length N, we need a primitive polynomial p(x) of a degree m. An example of such a polynomial is given by the following expression

mn0,1xx)x(p nm <<++= (1)

This polynomial specifies a Linear Feedback Shift Register (LFSR) as shown in Fig.1a. The boxes containing z-1 represent a unit-sample delay produced by memory elements or flip-flops. The LFSR is clocked at some fixed frequency fc. The symbol ⊕ designates a modulo 2 sum or exclusive-or operation. If the values of n and m are chosen correctly, the LFSR generates a binary sequence whose maximal length is N = 2m – 1. For certain values of m, more than one feedback loop is required in order to generate a MLS.

The fraction of the analogue form of the typical maximum-length sequence is shown in Fig.1b. The duration Tp of one sequence period is given by the sequence length N and by the clock frequency fc as Tp = N/ fc. When changing the sequence duration by the change of clock frequency, the Nyquist sampling theorem must be satisfied in order to cover the frequency band that is demanded.

m m-1 nn+1 12

outputz-1z-1z-1z-1z-1z-1

a)

Tp = N∆t

∆t=1/ fc

b)

Fig. 1(a) Feedback shift registers corresponding to polynomial xm + xn + 1, and (b) an example of the generated MLS.

There are several important properties of this sequence that should be mentioned. First, it is periodic and deterministic. Second, if the binary states are chosen to be +1 and -1, the autocorrelation function Rxx(k) is as shown in Fig. 2a.

-1/Ν

1 2 3

1

Rxx(k)

k4 N-2 N-1

a)

Power spectrum [dB]

Frequency [Hz]

fc 2fc1/N∆t

b)

Fig. 2. MLS (a) autocorrelation function and (b) schematic power spectrum.

Page 4: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

The value of the autocorrelation function is always equal to 1 for zero shift and drops to -1/N for any other shift, repeating after each period of the sequence. The power spectrum of the MLS that is schematically shown in Fig. 2b is a discrete spectrum whose upper 3 dB roll-off frequency is about 0.45 fc. By adjusting the clock frequency, the broadband signal over a wide frequency range can be generated.

3. IMPULSE RESPONSE MEASUREMENT

The LTI system can be completely specified either by its transfer function or by its impulse response. Both functions can be obtained by MLS-based measurements. The impulse response of the LTI system can be obtained as a result of the cross-correlation between its input and output signals. In the case of the discrete input and output sequences, we obtain the cross-correlation φxy(k), that is related to auto-correlation of the input, φxx(k) by a convolution with the periodic impulse response h(k):

)k(h*)k()k( xxxy φ=φ (2)

An important property of any MLS is that its auto-correlation function is essentially an impulse that can be represented by the Dirac delta function. We can see from the relation (2) that in the case of MLS-based measurements, cross-correlating of the system input and output sequences gives the impulse response. The basic idea of the measurement method is then shown in Fig.3.

MLS Gen. DUTx(k)

Correlatory(k) h(k)

Fig. 3. Block diagram of an MLS - based

measurement. A MLS signal excites a device under the test (DUT). The system impulse response is obtained as a result of the cross-correlation of the input and output sequences. The cross-correlation operation in the case of a discrete sequence is defined by:

∑−

=−=φ

1N

0jxy )j(y)kj(x

N1)k( (3)

The Equation (3) can also be described in terms of matrix multiplication:

YXN1

xy =Φ (4)

Φxy and Y are vectors whose elements are φxy and y from the Equation (3), and the matrix X contains the circularly delayed version of the input sequence x. Since the elements of X are all ±1, only additions and subtractions are required to perform the matrix multiplication. Finding each element of the correlation vector Φxy requires N-1 additions. The total number of additions necessary for the resulting vector is N (N-1). When N is a large number, the

number of operations can be a limiting factor for the measurements. Rapid calculations of the cross-correlation can be based upon the algorithm called Fast Hadamard Transform. The flow graph of FHT is similar to the flow diagram of the Fast Fourier Transform (FFT) and the total number of additions required to evaluate an N-point FHT is N log2N.

4. IMPLEMENTATION OF THE METHOD

The implementation of the MLS-based measuring method can be considered off-chip or on-chip. In the first case, the device under the test is connected with an auxiliary unit that provides the test sequence generation and necessary signal processing. This approach can serve for development purposes and for the extraction of system parameters for example. In the second case, the on-chip approach corresponds to a built-in self-test (BIST) technique for which the necessary operations for the MLS generation and processing are done on chip.

4.1 Off-chip simulation and measurements

In the case of an off-chip measurement, we have considered the scheme shown in Figure 3. The MLS generation and correlation procedures are being executed on a PC equipped with a data acquisition card. Necessary calculations are done in Matlab programming language, the MLS generation and FHT procedures were programmed in C and transformed to MEX-files that are executable in Matlab. The method was first validated on basic structures as filters or similar blocks by means of the Simulink toolbox of Matlab.

We have considered as an example the sixth order Butterworth low-pass filter with the relative cut-off frequency equal to 0.5. For the MLS, we have considered a LFSR of the length m = 6 bits and a sequence of the length N = 26-1 = 63 with a sample rate of 40 kHz. The results of the impulse response calculations are shown in Figure 4. An important advantage of the MLS technique is the ability to separate the signal components from the random noise by just considering a generation of several sequences of length N. This results in a synchronous averaging operation that reduces the background noise level by 3 dB per doubling of the number of averages (see Section 1). We illustrate this in the simulation results in Figure 4 where we have injected a random noise at the system output with the average amplitude that was 14 dB lower than the input MLS. Figure 4(a) shows the simulated impulse response obtained as the average of two output sequences, and Figure 4(b) the impulse response corresponding to the average of 32 sequences. The MLS technique with synchronous averaging allows thus measuring IR components that would be normally buried in the system noise.

Page 5: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6-0.1

-0.05

0

0.05

0.1

0.15

0.2

0.25

Time (ms)

Impu

lse

Res

pons

e

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

0.25

Time (ms)

Impu

lse

Res

pons

e

a) b)

Fig. 4. Simulation results: Impulse response of a Butterworth low-pass filter based on the average of (a) 2 sequences, (b) 32 sequences.

4.2 Implementation on the chip

The on-chip approach leads to a BIST implementation. The use of a MLS as the input signal and the subsequent processing aiming at obtaining the impulse response simplifies the implementation task. The MLS generation based on the LFSR is straightforward and the response processing used in this method is relatively simple because the products that normally need to be done when using white noise for the CCF evaluation are replaced by the sums in the case of the MLS. To obtain a component h(k) of the impulse response, we can proceed, according to the expression (3), as it is shown in Figure 5. Each sample of the sequence y(k) is multiplied by 1 or –1, which is provided by the multiplexer unit (MUX) controlled by the MLS, and the result is added to the sum stored in the accumulator (ACC). The value obtained at the end of the calculation loop is divided by N.

MUXΣ

x(j-k)ACC

h(k)

y(j)

j = 0:N-1

1/N

z-1

-1

1

0

Fig. 5. Block diagram of a simplified correlation cell (SCC).

The first m components of the impulse response (h(k), k = 0 to m-1) can be obtained by following the

scheme shown in Figure 6. Each of these m components corresponds to the output of a simplified correlation cell (SCC) shown in Figure 5.

The input signal of the SCCs is the response of the device under the test to the MLS; the control signal of each cell is taken at different stages of the LFSR generating the MLS.

The simplest on-chip implementation shown above does not give the whole picture of the impulse response but gives only m components. This information can be exploited as a system pattern that can be used for fault detection if compared to the nominal pattern. If a larger number of IR components is demanded, more sophisticated algorithms can be used which would result also in increasing costs.

m m-1 nn+1 1

z-1z-1z-1z-1z-1

A/D

SCC0 SCCm

DUT

SCC1

h0 h1 hm-1

LFSR

Fig. 6. On-chip implementation scheme of the impulse response measurement.

The simulation results of a Butterworth filter of the same type as described in Section 4.1 using a Simulink model of Figure 6 is shown in Figure 7. The length of LFSR used for MLS generation is m = 6. Figure 7(a) shows the first six even components of the impulse response that were obtained by inserting the delay units before one of the inputs of each correlation cell. This part of the impulse response corresponds to the exact values shown in Figure 7(b).

0 10 20 30 40 50 60-0.1

0

0.1

0.2

0.3Impulse Response IR(k)

0 10 20 30 40 50 60-0.1

0

0.1

0.2

0.3

k

a)

b)

Fig. 7. (a) Simulation results and (b) exact values of the impulse response of the tested circuit.

5. CONCLUSIONS

In this paper we have shown a full BIST technique for LTI systems where the input test signal and the device response are, respectively, generated and analyzed on-chip. This technique is compatible with existing self-test functions for stimuli generation. Only a suitable sequence of electrical test pulses

Page 6: TIMA Lab. Research Reportstima.univ-grenoble-alpes.fr/publications/files/rr/otl_169.pdf · primitive polynomial p(x) of a degree m. ... This polynomial specifies a Linear Feedback

(pseudo-random MLS) must be generated in order to analyze the system behaviour on-chip. The test sequence is generated using a LFSR, as is commonly done for testing digital circuits. Since the generated pulse sequence is known, there exists an efficient and fast way to calculate the system impulse response. We have shown the advantages of the method in comparison with the classical approaches, especially in terms of the signal to noise ratio, speed, and implementation feasibility. In particular, we intend to use this method for the test and fault detection of mixed-signal parts of a system-on-chip. Further research is being carried out in order to determine the signatures to be used that take into account the tolerances in process or device parameters.

REFERENCES

Davies, V. D. T. (1966). Generation and properties of maximum-length sequences. Control, June 1966, pp. 302-304.

MacWilliams, F. J. and Sloane, N. J. A. (1976). Pseudo-random sequences and arrays. Proc. of the IEEE, vol. 64, no. 12, pp. 1715-1730.

Pan, C. Y. and Cheng, K. T. (1997). Pseudorandom testing for mixed-signals circuits, IEEE Trans. on Computer-Aided Design of Integrated Circuits and Systems, vol. 16, no. 10, pp. 1173-1185.

Rife, D. D. and Vanderkooy, J. (1989). Transfer-function measurement with maximum-length sequences. J. Audio Eng. Soc., vol. 37, no. 6, pp. 419-444.