# US 2006/0069966 A1 · Method and system for testing memory using hash algorithm

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2006/0069966 A1
- Document ID: US20060069966A1
- Status: Published application
- Kind: A1
- Application number: 10/951,664
- Filed: 2004-09-29
- Published: 2006-03-30
- Earliest claimed: 2004-09-29
- Inventors: Yen-Fu Liu
- Web page: https://patentgrep.com/patent/US20060069966A1

## CPC

- G11C 29/56004: {Pattern generation}
- G11C 29/10: Test algorithms, e.g. memory scan [MScan] algorithms; Test patterns, e.g. checkerboard patterns
- G11C 29/56: External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
- G01R 31/31703: {Comparison aspects, e.g. signature analysis, comparators (concerning scan tests G01R31/318566; concerning testers G01R31/3193)}
- G11C: STATIC STORES (semiconductor memory devices H10B)
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)

## Abstract

A method for testing a memory is described. The method includes the following steps. First, a test pattern is generated by a hash algorithm. Then, the test pattern is written into the memory. Next, the test pattern is read from the memory. Following that, a signature is generated by the hash algorithm using the test pattern read from the memory. Subsequently, the memory is verified by comparing the signature to a reference signature.

## Claims

### Claim 1

A method for testing a memory, the method comprising:
generating a test pattern by a hash algorithm;
writing the test pattern into the memory;
reading the test pattern from the memory;
generating a signature by the hash algorithm using the test pattern read from the memory; and
verifying the memory by comparing the signature to a reference signature.

### Claim 2 (depends on 1)

The method of claim 1, wherein the hash algorithm comprises a SHA.

### Claim 3 (depends on 2)

The method of claim 2, wherein the hash algorithm is selected from the group consisting of SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.

### Claim 4 (depends on 2)

The method of claim 2, further comprising:
using a ROM to store a plurality of Kt parameters, the Kt parameters being used when performing the hash algorithm, wherein the Kt parameters are defined in FIPS PUB 180-2.

### Claim 5 (depends on 1)

The method of claim 1, wherein the hash algorithm comprises a MD5 algorithm.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
using a message block buffer to store a message block; and
taking the message block as an input to perform the hash algorithm to generate a hash value.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
using a seed as a message block for the hash algorithm;
generating an initial hash value by the hash algorithm; and
writing the initial hash value into the memory.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
using a seed as a message block for the hash algorithm;
generating an initial hash value by the hash algorithm;
expanding the initial value to obtain an expanded initial hash value; and
writing the expanded initial hash value into the memory.

### Claim 9 (depends on 8)

The method of claim 8, wherein the length of the expanded initial hash value is the same as the length of a message block.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
using the expanded initial hash as an input to perform the hash algorithm to generate a second hash value;
expanding the second hash value to equal the length of a message block; and
writing the expanded second hash value into the memory.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
repeatedly generating next hash value by the hash algorithm using the previously expanded hash value;
expanding each generated hash value; and
writing each expanded hash value into the memory until the memory is full.

### Claim 12 (depends on 11)

The method of claim 11, wherein the step of expanding each generated hash value is performed by steps comprising:
inverting the hash value;
concatenating the hash value and the inverted hash value to make an expanded hash with the length equal to the length of a message block.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
if the memory is full, reading the expanded initial hash value from the memory; and
taking the expanded initial hash value read from the memory as an input to perform the hash algorithm to generate next hash value.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
reading each expanded hash value from the memory; and
repeatedly taking each expanded hash value previously read from the memory as an input to perform the hash algorithm to generate next hash value until the last expanded hash value is read from the memory and the last hash value is generated using the last expanded hash value.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
taking the last hash value generated by the hash algorithm as the signature; and
comparing the signature to a reference signature to determine whether any fault occurs in the memory.

### Claim 16

A method for testing a memory, the method comprising:
generating a test pattern by a hash algorithm;
writing the test pattern into the memory;
reading the test pattern from the memory;
generating a first signature by the hash algorithm using the test pattern read from the memory;
verifying the memory by comparing the first signature to a first reference signature;
writing an inverted test pattern into the memory;
reading the inverted test pattern from the memory;
generating a second signature by the hash algorithm using the inverted test pattern read from the memory; and
verifying the memory by comparing the second signature to a second reference signature.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
using a seed as a message block for the hash algorithm;
generating an initial hash value by the hash algorithm;
expanding the initial value to obtain an expanded initial hash value; and
writing the expanded initial hash value into the memory.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
using the expanded initial hash as an input to perform the hash algorithm to generate a second hash value;
expanding the second hash value to equal the length of a message block; and
writing the expanded second hash value into the memory.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
repeatedly generating next hash value by the hash algorithm using the previously expanded hash value; and
expanding each generated hash value; and
writing each expanded hash value into the memory until the memory is full.

### Claim 20 (depends on 19)

The method of claim 19, wherein the step of expanding each generated hash value is performed by steps comprising:
inverting the hash value;
concatenating the hash value and the inverted hash value to make an expanded hash with the length equal to the length of a message block.

### Claim 21 (depends on 20)

The method of claim 20, wherein the inverted test pattern is generated by steps comprising:
reinitializing the hash algorithm using the same seed; and
swapping the positions of the hash value and the inverted hash value in an expanded hash value.

### Claim 22 (depends on 19)

The method of claim 19, further comprising:
if the memory is full, reading the expanded initial hash value from the memory; and
taking the expanded initial hash value read from the memory as an input to perform the hash algorithm to generate next hash value.

### Claim 23 (depends on 22)

The method of claim 22, further comprising:
reading each expanded hash value from the memory; and
repeatedly taking each expanded hash value previously read from the memory as an input to perform the hash algorithm to generate next hash value until the last expanded hash value is read from the memory and the last hash value is generated using the last expanded hash value.

### Claim 24

A test system for testing a memory, the test system comprising:
means for generating a test pattern by a hash algorithm, the test pattern being written into the memory; and
means for generating a signature by the hash algorithm using the test pattern read from the memory;
wherein the signature is used for comparison to a reference signature to determine whether any fault occurs during the write-read operation.

### Claim 25 (depends on 24)

The test system of claim 24, wherein the test system is embedded in a chip containing the memory.

### Claim 26 (depends on 24)

The test system of claim 24, wherein the hash algorithm comprises a SHA.

### Claim 27 (depends on 26)

The test system of claim 26, wherein the hash algorithm is selected from the group consisting of SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.

### Claim 28 (depends on 26)

The test system of claim 26, further comprising:
a ROM for storing a plurality of Kt parameters, the Kt parameters being used when performing the hash algorithm, wherein the Kt parameters are defined in FIPS PUB 180-2.

### Claim 29 (depends on 24)

The test system of claim 24, wherein the hash algorithm comprises a MD5 algorithm.

### Claim 30 (depends on 24)

The test system of claim 24, further comprising a message block buffer for storing a message block, the message block being taken as an input to perform the hash algorithm.

### Claim 31 (depends on 24)

The test system of claim 24, further comprising an adder circuit, wherein (i) the adder circuit performs Σ1(e)+h+Wt+Kt+Ch(e,f,g), (ii) when implementing SHA-256 or SHA-224, Σ1(e)=(e>>>6)ˆ(e>>>11)ˆ(e>>>25) (iii) when implementing SHA-512 or SHA-384, Σ1(e)=(e>>>14)ˆ(e>>>18)ˆ(e>>>41), (iv) Ch(e,f,g)=(e & f)ˆ(˜e & g), and (v) e, h, Wt, Kt, f, and g are parameters defined in FIPS PUB 180-2.

### Claim 32 (depends on 24)

The test system of claim 24, further comprising an adder circuit, wherein (i) the adder circuit performs Σ0(a)+Maj(a,b,c), (ii) when implementing SHA-256 or SHA-224, Σ0(a)=(a>>>2)ˆ(a>>>13)ˆ(a>>>22), (iii) when implementing SHA-512 or SHA-384, Σ0(a)=(a>>>28)ˆ(a>>>34)ˆ(a>>>39), (iv) Maj(a,b,c)=(a & b)ˆ(a & c)ˆ(b & c), and (v) a, b, and c are parameters defined in FIPS PUB 180-2.

### Claim 33 (depends on 24)

The test system of claim 24, further comprising an adder circuit, wherein (i) the adder circuit performs σ1(Wt-2)+Wt-7+σ0(Wt-15)+Wt-16, (ii) when implementing SHA-256 or SHA-224, σ1(Wt-2)=(Wt-2>>>17)ˆ(Wt-2>>>19)ˆ(Wt-2>>10) and σ0(Wt-15)=(Wt-15>>>7)ˆ(Wt-15>>>18)ˆ(Wt-15>>3), (iii) when implementing SHA-512 or SHA-384, σ1(Wt-2)=(Wt-2>>>19) A (Wt-2>>>61)ˆ(Wt-2>>6) and σ0(Wt-15)=(Wt-15>>>1)ˆ(Wt-15>>>8)ˆ(Wt-15>>7), and (iv) Wt-2, Wt-7, Wt-15, and Wt-16 are parameters defined in FIPS PUB 180-2.

### Claim 34 (depends on 33)

The test system of claim 33, further comprising a multiplexer for selecting a Wt value, wherein the Wt value is selected between the output of the adder circuit and Wt0—15, and Wt0—15 is a parameter defined in FIPS PUB 180-2.

### Claim 35 (depends on 24)

The test system of claim 24, further comprising a codec circuit for generating an address for retrieving Kt parameters for performing the hash algorithm, wherein the Kt parameters are defined in FIPS PUB 180-2.
