# US 5,704,033 A · Apparatus and method for testing a program memory for a one-chip microcomputer

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

- Number: US 5,704,033 A
- Document ID: US5704033A
- Status: Granted
- Kind: A
- Application number: 08/540,169
- Filed: 1995-10-06
- Granted: 1997-12-30
- Earliest claimed: 1994-10-07
- Assignees: LG Semicon Co., Ltd.
- Inventors: Young Seung Park
- Web page: https://patentgrep.com/patent/US5704033A

## CPC

- G06F 11/2236: {to test CPU or processors}
- G11C 29/40: using compression techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

In an apparatus of testing a program memory for a one-chip microcomputer which allows the test of program memory mounted within the microcomputer and the test of another function block, thereby reducing test time, and the method therefor, the testing apparatus includes a central processing unit (CPU) for controlling the overall system, an interrupt controller for controlling an interrupt function, a data memory for storing information on data, a peripheral unit connected to a main system for performing input and output functions, a program memory for storing each program information having a predetermined pattern, an address counter for setting address of program memory via an address bus line switched by a first switch, a check-sum calculator for calculating and storing the entire data of the set address of program memory via a data bus line switched by a second switch, a test mode switch for controlling first and second switches, and address counter, and an input/output port for inputting or outputting port outputs of the entire data of check-sum calculator and data of the overall system. Tests for various functional blocks except the program memory are simultaneously performed while performing a test for the program memory. Therefore, the test time and the test cost due to large program memories can be reduced.

## Claims

### Claim 1

An apparatus for testing a program memory of a microcomputer, the microcomputer including a central processing unit, an interrupt controller for controlling an interrupt function, a data memory for storing information and data, a peripheral unit for performing input and output functions, an address bus line, a data bus line, and an input/output port for inputting and outputting data, the apparatus comprising:
a program memory for storing information therein;
address counting means for setting an address of said program memory and incrementing the set address by a predetermined value;
a first switch for selectively connecting said address counting means, said program memory, and the address bus line;
a second switch for selectively connecting said program memory, the data bus line, and check-sum calculator means;
the check-sum calculator means for calculating a check-sum value of data stored in the addresses of said program memory set and incremented by said address counting means;
mode setting means for setting a test mode and enabling said address counting means, said first switch, and said second switch when the test mode is set; and
test means for performing tests on other units of the microcomputer while said check-sum calculator means calculates the check-sum value.

### Claim 2 (depends on 1)

An apparatus of claim 1, wherein the predetermined value is one and said address counting means stops incrementing once a last address of said program memory is detected.

### Claim 3 (depends on 1)

An apparatus of claim 1, wherein said check-sum calculator means outputs the check-sum value through the input/output port, after said test means perform the tests on the other units of the microcomputer.

### Claim 4 (depends on 3)

An apparatus of claim 3, wherein the check-sum value is compared with an expected value to determine whether the microcomputer is in a predetermined condition.

### Claim 5 (depends on 4)

An apparatus of claim 4, wherein based on the comparison result, an analysis test on the addresses of said program memory is performed.

### Claim 6 (depends on 5)

An apparatus of claim 5, wherein the analysis test is a user's option.

### Claim 7 (depends on 1)

An apparatus of claim 1, wherein the check-sum value is compared with an expected value to determine whether the microcomputer is in a predetermined condition, said mode setting means resetting the test mode and said address counting means resetting the address of said program memory, based on the comparison result, so as to perform an analysis test on the addresses of said program memory.

### Claim 8

A method for testing a program memory of a microcomputer, the microcomputer including a central processing unit, an interrupt controller for controlling an interrupt function, a data memory for storing data, a peripheral unit for performing input and output functions, a program memory for storing information therein, an address bus line, a data bus line, and an input/output port for inputting and outputting data, the method comprising the steps of:
setting an address of the program memory and incrementing the set address by a predetermined value, using an address counting circuit;
providing a first switch for selectively connecting the address counting circuit, the program memory, and the address bus line;
providing a second switch for selectively connecting the program memory, the data bus line, and a check-sum calculating circuit;
calculating by using the check-sum calculating circuit a check-sum value of data stored in the addresses of the program memory set and incremented by the address counting circuit;
setting a test mode and enabling the address counting circuit, the first switch, and the second switch when the test mode is set; and
performing tests on other units of the microcomputer during said calculating step.

### Claim 9 (depends on 8)

A method of claim 8, wherein the predetermined value is one, and the address counting circuit stops performing said incrementing step once a last address of the program memory is detected.

### Claim 10 (depends on 8)

A method of claim 8, wherein the check-sum calculating outputs the check-sum value through the input/output port, after said performing step.

### Claim 11 (depends on 10)

A method of claim 10, further comprising the steps of:
comparing the check-sum value with an expected value; and
determining whether the microcomputer is in a predetermined condition based on the comparison result.

### Claim 12 (depends on 11)

A method of claim 11, further comprising the step of:
performing an analysis test on addresses of the program memory based on the comparison result.

### Claim 13 (depends on 12)

A method of claim 12, wherein the analysis test is a user's option.

### Claim 14 (depends on 8)

A method of claim 8, further comprising the steps of:
comparing the check-sum value with an expected value; and
resetting a test mode and an address of the program memory based on the comparison result.

### Claim 15 (depends on 14)

A method of claim 14, further comprising the step of:
performing an analysis test on the addresses of the program memory after said resetting step.

### Claim 16 (depends on 15)

A method of claim 15, wherein said step of performing the analysis test includes the steps of:
sequentially outputting data of the program memory stored in the addresses of the program memory,
comparing the output data with predetermined values, and
detecting defects in the addresses of the program memory based on the comparison result.
