# A New, Fast Pseudo-Random Pattern Generator for Advanced Logic Built-In Self-Test Structures
## 3 Classical Method to Design LBIST Circuits with the STUMPS Architecture
### Example 2  
Figure 11 shows a sequence of test vectors produced by a register of the DT-LFSR type with the D\({}^{1}\)T\({}^{2}\) structure. That register is associated with the primitive polynomial \(p(x)=1+x+x^{3}=1+x\cdot(1+x)^{2}\). Therefore, the respective coefficients are \(n=3\) and \(k=1\). For the example in question, the congruence (3) adopts the following form:  
\[2\times\Phi_{\text{T}}+1\ \equiv\ 0\ (mod\ 7), \tag{4}\]  
Figure 10: The graph for the correlation coefficient for the DT-LFSR with the D\({}^{3}\)T\({}^{17}\) structure—the zoomed-in picture for correlation coefficient range from \(-0.03\) do +0.05, the correlation coefficient was calculated for a test sequence with the length of 10,000 vectors. which indicates that the phase shift introduced by the T-type flip-flops is \(\Phi_{\rm T}=3\). Obviously, the phase shift introduced by D-type flip-flop is \(\Phi_{\rm D}=1\). The magnitude of phase shift between binary sequences produced at the adjacent outputs of the foregoing DT-LFSR register with the D\({}^{1}\)T\({}^{2}\) structure is explained in Figure 11, where arrows indicate corresponding bits in mutually shifted binary sequences. To make the picture more clear, the binary sequence appearing at the Q\({}_{2}\) output is repeated at the left-hand side of the binary sequence produced at the Q\({}_{0}\) output. In addition, the numbering of clock cycles is shown in the leftmost part of the figure for easy calculation of the phase shift. The congruence (3) also enabled calculation of the phase shift \(\Phi_{\rm T}\) for DT-LFSRs with the length exceeding 24 bits and containing a considerable number of T-type flip-flops (more than 80% of the total register length). Results of these calculations are summarized in Table 1, where the overall number of T-type flip-flops within each specific register and the total length of the register are provided in columns 2 and 3 of that table, respectively, column 4 specifies the duration (length) \(\blacksquare\) of the operation cycle for each specific register, and column 5 contains the \(\Phi_{\rm T}\) parameters, i.e., the phase shift between binary sequences appearing at the output and the input of a T-type flip-flop within the DT-LFSR register in question. \begin{table}
\begin{tabular}{c c c c c} \  
Now let us assume that an \(n\)-bit register of the DT-LFSR type contains \(t\) flip-flops of the T type that are deployed in register cells with the numbers \(n-t,\;n-t+1,\ldots,\;n-1\). Let us also denote \(\Phi_{\mathbb{T}_{i,j}}\) as the phase shift between binary sequences produced at the outputs \(i\) and \(j\) of the register in question, where \(i,\;j\{n-t,\;n-t+1,\ldots,\;n-1\}\); i.e., it is a phase shift between binary sequences appearing at outputs of two selected T-type flip-flops within the register. The phase shift \(\Phi_{\mathbb{T}_{i,j}}\) is then  
\[\Phi_{\mathbb{T}_{i,j}}=(i-j)\times\Phi_{\mathbb{T}}mod\;\Omega, \tag{5}\]  
where \(\blacksquare=2^{n}-1\) stands for the aforementioned duration of the operation cycle for the DT-LFSR register. For negative numbers, the operation \(mod\blacksquare\) appearing in (5) is calculated according to the formula \(a<0\)_a mod_\(\Omega\Rightarrow\Omega-(|a|\;mod\;\Omega)\). Please note that the phase shift \(\Phi_{\mathbb{T}_{i,j}}\) is calculated as _modulo_\(\blacksquare\) and thus it can be less than \(\Phi_{\mathbb{T}}\). Therefore, let us define the minimum phase shift--\(\Phi_{\mathbb{T}_{min}}\)--between binary sequences produced by two discretely selected T-type flip-flops of the DT-LFSR registers. Such a minimum phase shift is defined by the following equation:  
\[\Phi_{\mathbb{T}min}=\min_{i,j\in\{n-t,n-t+1,\ldots,n-1\},\;i\
eq j}\bigl{(} \Phi_{\mathbb{T}i,j}\bigr{)} \tag{6}\]  
The minimum phase shift \(\Phi_{\mathbb{T}min}\) for some selected DT-LFSR registers are summarized in column 6 of Table 1. The foregoing deliberations take account of binary sequences merely at outputs of T-type flip-flops since only these flip-flops introduce a phase shift that is different from 1.