Abstract:
Digital signal processing apparatus which can be tested by signature analysis is arranged so that a predetermined number of its ROM locations have stored therein pre-selected values whereby the signature analysis is independent of the contents of the remainder of the memory location. Appropriately valued bytes are stored in the N last-record memory location and these bytes establish a predetermined signature for each data pin regardless of firmware changes.

Description:
This is a continuation of application Ser. No. 418,926 filed Oct. 6, 1989 which is a continuation of Ser. No. 07/074,848, filed July 17, 1987 both now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to the testing of electronic digital apparatus. The invention particularly relates to the testing of such apparatus using a technique known as signature analysis. 
     2. Description of the Prior Art 
     In signature analysis bit sequences from an instrument under test are fed to an instrument known as a signature analyzer. Typically the signature analyzer incorporates a linear shift register which is clocked at the same rate as the bit stream under test. The linear shift register is provided with feedback from selected stages of the shift register and the feedback bits are summed in modulo 2 at the input to the shift register. A typical shift register will be 16 bits in length and at the end of a measurement sequence the 16 bits in the register comprise 4 groups in hexadecimal format which represent what is known as a signature. Each group of 4 bits represents an alpha numeric character and the four alpha numeric characters can be displayed on a suitable display device. The group of 4 alpha numeric characters are compared with the known good signature to thereby test the operation of the instrument. This method can be used to test a number of points within the circuit of an instrument. Typically the instrument manual will contain a list of signatures, one for each test point in the instrument, to enable easy checking of signatures expected at various locations. Signature analysis is a known technique which is now well documented in the art. Articles describing the technique can be found in Hewlett Packard Application Note 222-2. 
     Instruments which incorporate a processing capability can have self-test routines for use with a signature analyzer. Read only memory (ROM) associated with the processor is used to hold the software that runs on the processor. Signature analysis which involves data compression to reduce complex serial data stream patterns of a given length at a circuit node to a 4 digit decimal signature referred to above can be used to test such arrangements. The test is carried out by causing the contents of the ROM to appear at each data pin of the ROM. Then between each cycle of the full ROM&#39;s address space the pattern of data appearing at a pin is fed into a signature analyzer. The signature analyzer compresses the data as explained above to generate the hexadecimal signature referred to above. A problem with this technique, however, is that it suffers from the disadvantage that many signatures are dependent upon the contents of the ROM. As such they need updating and distributing each time an update of software or firmware occurs. 
     SUMMARY OF THE INVENTION 
     The present invention is concerned with arrangement which alleviates or overcomes this problem. 
     According to one aspect of the present invention there is provided apparatus having a digital signal processing capability including associated memory and a self-test facility of the type known as signature analysis characterized in that pre-selected locations of the memory have stored therein predetermined bits such that the signature analysis is independent of the contents of the remainder of the memory. The memory may be a read only memory. The pre-selected locations may be the last 16 bytes of the read only memory. 
     Another aspect of the present invention provides a method of arranging a ROM for signature analysis comprising feeding into pre-selected memory locations pre-calculated bytes. This preselected set of memory locations of reserved space is filled with values that force the signature of the remainder of the memory to a fixed value. That is, the value of the normal (or functional) data of the memory as a result of signature analysis on the memory plus the values stored in the reserved space force the signature of the entire memory to a desired predetermined signature. It is therefore possible to control the signature that will be produced by filling the reserved space with appropriate values. The computer program of the present invention computes the appropriate values of the reserved space to achieve this result. The program is run each time a new revision of memory is made thereby allowing the signature of the memory to remain unchanged after a revision. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention will be described now by way of example only with particular reference to the accompanying drawing which is a block schematic diagram illustrating apparatus which can operate in accordance with the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 shows a ROM 10 linked to a signature analyzer which is shown schematically at 11. The ROM is one which is associated with a processor in a processor controlled instrument or device. The signature analyzer is a known device and includes a linear feedback shift register 14. As shown in the drawing the 7th, 9th, 12th and 16th bits of the register are fed b its input and combined by modulo 2 addition in a manner well known in the art. To perform signature analysis on a ROM its memory locations are read in a predetermined order and the resulting bit stream on each data pin is fed in turn into the linear feedback shift register to produce a compressed pattern of bits in the 16 bits of the shift register. These bits comprise 4 groups defining a hexadecimal signature which are used to drive a display 16 for displaying 4 alpha numerical characters which are the signature for the particular pin under test and coupled to the shift register. The displayed signature is compared with the known good signature to evaluate the condition of the ROM. 
     In the present invention the ROM is arranged in such a way that 16 bytes at the end of the ROM are filled with 16 bytes of pre-calculated values whereby the signature of the entire ROM is fixed and predetermined. This means that the signatures are not dependent upon any changes which may occur to the firmware held in the ROM. A once-and-for-all table of signatures can be drawn up. The following illustrates how the 16 bytes can be evaluated. 
     The choice of the best signatures to use can be answered by forming the four hexadecimal numbers of the signature out of the two digits of the IC number in question followed by the two digits of the pin number being tested. 
     A computer program has been written to compute these 16 bytes. Inputs to the program are: 
     (1) A table of wanted signatures 
     (2) The ROM contents except for the last 16 bytes. 
     Outputs from the program are: 
     (3) the last 16 bytes of the ROM contents 
     Once computed, these 16 bytes are appended into the rest of the data bytes prior to programming the ROM. 
     The computer program has two distinct parts: 
     (1) The first part computes a signature for each of the eight data columns of a ROM representing the entire contents less the final 16 bytes. This program mimics the behavior of a signature analyzer--the data bit clocked into the shift register is the modulo-2 addition of the next data bit and the current contents of the 7th, 9th, 12th and 16th bit of the shift register. 
     (2) The output from the first part and the desired signatures are combined by the second part to give the contents of the last 16 bytes. This is achieved by clocking the shift register 16 more times. On the first cycle, the output of the modulo-2 addition is the most significant bit of the desired signature; on the second cycle, the output is the next most significant bit, and so on. 
     The algorithms used are best illustrated by the use of a simplified computer program as follows. For a complete listing of the computer program of the present invention refer to Appendix A of the present application. 
     Consider just a single data column of the ROM (all other columns are treated similarly). 
     
         ______________________________________PART 1 OF COMPUTER PROGRAM______________________________________Let total size of ROM be n bytes.Input:  (n-16) bits of data representing one column of   data bits, held in array rom-data.Output: A 16 bit CRC value made up from the above (n-16)   bits of data, held in variable crc.BEGINcrc :=0FOR i:/=/ to data.sub.-- length docrc :=((rom±data(i)          EOR(bit 7 of crc) EOR(bit 9 of crc) EOR(bit 12 of crc)          EOR(bit 16 of crc)) + (2* crc) MOD 2 16;NEXT i______________________________________PART 2 OF COMPUTER PROGRAM______________________________________Inputs: The variable crc computed in Part 1   The 16 bit variable representing the desired   signature for the data column in question.   Held in variable desired-sig.Output: The 16 bits needed to fill this column of the   16 bytes at the end of the ROM. Held in   variable rom-fill.BEGINFOR i = 1 TO 16rom-fill(i) :=    desired.sub.-- sig[17-i] EOR    (bit 7 of crc) EOR    (bit 9 of crc) EOR    (bit 12 of crc) EOR    (bit 16 of crc)crc := (desired.sub.-- sig[17-i] +(2*crc))MOD 2 16(i) EOR______________________________________ 
    
     The following is an example of how the computer program of the present invention operates. 
     For purposes of illustration the entire ROM is considered to be 36 bytes, much shorter than would normally be the case. Of these 36 bytes, the first 20 bytes contain the normal or functional ROM data, and the final 16 bytes are the reserved bytes for the ROM signature. The computer program takes the first 20 bytes and produces the final 16 bytes. Since all columns of the ROM behave in a similar manner, only one column will be used in this example, column 0. Also, since the signature of each column is to be pre-chosen by the designer to be any signature desired, it is assumed in the present example that the designer has pre-chosen the signature of column 0 to be 1234 (hexidecimal). 
     A variable `desired --  sig` is defined, where desired --  sig : array [1 . . . 16] of integer; 
     This variable is initialized to 1234 (hexidecimal) as follows: 
     
         ______________________________________   desired.sub.-- sig [16] :=0;                (1 hex)   desired.sub.-- sig [15] :=0;   desired.sub.-- sig [14] :=0;   desired.sub.-- sig [13] :=1;   desired.sub.-- sig [12] :=0;                (2 hex)   desired.sub.-- sig [11] :=0;   desired.sub.-- sig [10] :=1;   desired.sub.-- sig [9] :=0;   desired.sub.-- sig [8] :=0;                (3 hex)   desired.sub.-- sig [7] :=0;   desired.sub.-- sig [6] :=1;   desired.sub.-- sig [5] :=1;   desired.sub.-- sig [4] :=0;                (4 hex)   desired.sub.-- sig [3] :=1;   desired.sub.-- sig [2] :=0;   desired.sub.-- sig [1] :=0;______________________________________ 
    
     Another variable `rom --  data` is also defined and used in this example to hold the first 20 bits of data representing column 0 of the ROM. 
     const data  --  length=20; 
     rom 13  data:array[1 . . . data 13  length]of integer 
     In the present example this variable `rom --  data` is given some contents to mimic the real data the ROM would hold in practice. The actual contents have no direct bearing on the algorithm. Suitable random data is chosen as follows: 
     rom --  data[1]:=1; 
     rom --  data[2]:=1; 
     rom --  data[3]:=0; 
     rom --  data[4]:=1; 
     rom --  data[5]:=1; 
     rom --  data[6]:=0; 
     rom --  data[7]:=0; 
     rom --  data[8]:=1; 
     rom --  data[9]:=1; 
     rom --  data[10]:=1; 
     rom --  data[11]:=0; 
     rom --  data[12]:=1; 
     rom --  data[13]:=0; 
     rom --  data[14]:=0; 
     rom --  data[15]:=0; 
     rom --  data[16]:=1; 
     rom --  data[17]:=1; 
     rom --  data[18]:=0; 
     rom --  data[19]:=1; 
     rom --  data[20]:=1; 
     The computer program is split into two parts. The first part takes the rom --  data and produces a number held in a variable `crc`: 
     var crc:integer; The program written in pseudo-code is 
     
         ______________________________________var i :    integer;begincrc : =    0;for i : =  1 to data.sub.-- length docrc : =    ((rom.sub.-- data [i] EOR      (bit 7 of crc) EOR      (bit 9 of crc) EOR      (bit 12 of crc) EOR      (bit 16 of crc)) + (2*crc)) MOD 2 16;end______________________________________ 
    
     In this way, the variable `crc` is determined which is a function of the first 20 bits of column 0 of the ROM contents. The following chart shows the output of this part of the program. 
     
         __________________________________________________________________________Clockcyclesafter    crc (binary)                    crcstart    16 15   14     13       12         11           10             9 8 7 6 5 4 3 2 1 (decimal)                                    rom.sub.-- data__________________________________________________________________________    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   0 1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1   1  1 2  0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1   3  1 3  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0   6  0 4  0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1   13 1 5  0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1   27 1 6  0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0   54 0 7  0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0  108 0 8  0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0  216 1 9  0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0  432 110  0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0  864 111  0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0  1728                                    012  0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0  3456                                    113  0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0  6912                                    014  0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 13824                                    015  0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 27648                                    016  1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 55296                                    117  1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 45057                                    118  0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 24579                                    019  1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 45159                                    120  1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 32782                                    1__________________________________________________________________________ 
    
     The value of `crc` of 32782 (decimal) in this example, is the output of the first part of the computer program. 
     The second part of the computer program uses as its inputs the variable `crc` calculated above and also the variable `desired --sig` . As output, the second part of the program provides the 16 bits needed to fill the final 16 bits of column 0 of the ROM. A variable `rom --  fill` in this example, is defined to hold these 16 bits: 
     rom 13  fill:array[1 . . . 16] of integer; 
     This part of the program written in pseudo-code is: 
     
         ______________________________________beginfor i : = 1 to 16 do beginrom.sub.-- fill [i] : =          (desired.sub.-- sig [17-i]                       EOR          (bit 7 of crc)                       EOR          (bit 9 of crc)                       EOR          (bit 12 of crc)                       EOR          (bit 16 of crc));crc : = (desired.sub.-- sig [17-i] +(2+crc)) MOD 2 16end;end;______________________________________ 
    
     The subscript [17-i], here is used instead of [i] to keep the correct order of the bits within `desired --  sig`. 
     This second part of the program yields the variable `rom --  fill]. The following chart shows the output of this second part of the program. 
     
         __________________________________________________________________________clockcyclesafter    crc (binary)                    crc  desired.sub.--                                         rom.sub.--start    16 15   14     13       12         11           10             9 8 7 6 5 4 3 2 1 (decimal)                                    sig  fil__________________________________________________________________________    1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 327821   0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0   28 0     12   0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0   56 0     03   0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0  112 0     04   0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1  225 1     05   0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0  450 0     16   0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0  900 0     07   0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1  1801                                    1     08   0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0  3602                                    0     19   0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0  7204                                    0     110  0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 14408                                    0     111  0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 28817                                    1     112  1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 57635                                    1     113  1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 49734                                    0     014  1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 33933                                    1     115  0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0  2330                                    0     116  0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0  4660                                    0     0__________________________________________________________________________ 
    
     These values for the 16 elements of `rom --  fil` are appended for the `rom --  data` bits before the entire data elements are programmed into the ROM. 
     The above technique is shown in its entirety below. The entire ROM bits of column 0 are shown after the program of the present invention has been run and it can be seen that the final signature is equal to the signature initially chosen (or 1234 hex in this example). 
     
         __________________________________________________________________________Clockcyclesafter    crc (binary)                    crcstart    16 15   14     13       12         11           10             9 8 7 6 5 4 3 2 1 (decimal)                                    rom.sub.-- data__________________________________________________________________________    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   0 1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1   1  1 2  0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1   3  1 3  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0   6  0 4  0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1   13 1 5  0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1   27 1 6  0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0   54 0 7  0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0  108 0 8  0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0  216 1 9  0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0  432 110  0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0  864 1    rom.sub.-- data11  0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0  1728                                    012  0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0  3456                                    113  0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0  6912                                    014  0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 13824                                    015  0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 27648                                    016  1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 55296                                    117  1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 45057                                    118  0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 24579                                    019  1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 45159                                    120  1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 32782                                    121  0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0   28 122  0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0   56 023  0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0  112 024  0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1  225 025  0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0  450 126  0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0  900 027  0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1  1801                                    028  0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0  3602                                    1    rom.sub.-- fill29  0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0  7204                                    130  0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 14408                                    131  0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 28817                                    132  1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 57635                                    133  1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 49734                                    034  1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 33933                                    135  0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0  2330                                    136  0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0  4660                                    0.BHorizBrace.       .BHorizBrace.               .BHorizBrace.                       .BHorizBrace.1           2       3       4       (hex)__________________________________________________________________________ 
    
     From the last line it will be seen that the required signature of 1234 (hex) is obtained. ##SPC1##