JP2000293394A - Processor with bist function - Google Patents

Processor with bist function

Info

Publication number
JP2000293394A
JP2000293394A JP11097281A JP9728199A JP2000293394A JP 2000293394 A JP2000293394 A JP 2000293394A JP 11097281 A JP11097281 A JP 11097281A JP 9728199 A JP9728199 A JP 9728199A JP 2000293394 A JP2000293394 A JP 2000293394A
Authority
JP
Japan
Prior art keywords
instruction
data
random number
register
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11097281A
Other languages
Japanese (ja)
Inventor
Kazufumi Hikone
和文 彦根
Norinobu Nakao
教伸 中尾
Kazumi Hatakeyama
一実 畠山
Takashi Hotta
多加志 堀田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11097281A priority Critical patent/JP2000293394A/en
Priority to SG200001751A priority patent/SG86385A1/en
Priority to TW089106118A priority patent/TW472189B/en
Priority to MYPI20001397A priority patent/MY132879A/en
Priority to CN00104970A priority patent/CN1118024C/en
Priority to KR1020000017842A priority patent/KR20010006956A/en
Publication of JP2000293394A publication Critical patent/JP2000293394A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/27Built-in tests
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/31701Arrangements for setting the Unit Under Test [UUT] in a test mode
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/3181Functional testing
    • G01R31/31813Test pattern generators
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • G01R31/3181Functional testing
    • G01R31/319Tester hardware, i.e. output processing circuits
    • G01R31/31903Tester hardware, i.e. output processing circuits tester configuration
    • G01R31/31908Tester set-up, e.g. configuring the tester to the device under test [DUT], down loading test patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To test high-speed operation and to test a combination of many instructions by making a random-number instruction generating means generate a test instruction at random according to a test signal which is inputted from outside. SOLUTION: The random-number instruction generating means is composed of an instruction storage means 71 and an instruction selecting means 72 and inputs a test mode signal 133 indicating that a self-test is conducted to an instruction selecting means 72. The instruction selecting means 72 sends information showing which test instruction stored in the instruction storage means 71 is selected as a select signal 73 to the instruction storage means 71 and also outputs the information as an instruction information signal 134. Then the instruction storage means 71 having received the select signal 73 outputs a random test instruction corresponding to the select signal to a line 140. Consequently, high-speed operation can be tested and a combination of many instructions can be tested.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はセルフテスト機能を
組み込んだ論理回路について、高速なテストと高い故障
検出率を達成できる組み込みセルフテスト(BIST)
技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a built-in self-test (BIST) for a logic circuit incorporating a self-test function, which can achieve a high-speed test and a high fault detection rate.
About technology.

【0002】[0002]

【従来の技術】論理回路の故障を検出するテストの方法
としては、あらかじめ作成しておいたテストデータをテ
スト対象の回路に外部から入力して、その出力応答を観
測することによって故障の有無を判別する方法が一般的
に採用されている。しかし、論理回路の大規模化が進む
につれてテストデータ量が多くなり、そのテスト時間も
延び、テストにかかるコストが増大している。そのた
め、論理回路内にテスト回路を組み込み、論理回路が該
テスト回路を使って自己のテストを行うBIST技術を
採用し、テストにかかるコストを削減することが多くな
っている。
2. Description of the Related Art As a test method for detecting a fault in a logic circuit, test data prepared in advance is externally input to a circuit to be tested, and the output response is observed to determine the presence or absence of a fault. A method of determining is generally adopted. However, as the scale of the logic circuit increases, the amount of test data increases, the test time increases, and the cost of the test increases. Therefore, a test circuit is incorporated in a logic circuit, and the logic circuit employs a BIST technique of performing a self-test using the test circuit, thereby reducing the cost for the test.

【0003】従来のBIST技術は、IEEE DESIGN & T
EST OF COMPUTER 誌1993年3月号の第73頁〜第8
2頁、および同誌1993年6月号第69頁〜第77頁
に記載された“A Tutorial on Built−In Self−Test”
において論じられている。BISTは、図2に示すよう
に、テスト制御部とパターン生成器と応答解析器で構成
される。パターン生成器が出力した信号をテスト対象回
路に入力し、その応答信号を応答解析器が取り込み、応
答解析器の状態を観測することによって故障の有無を判
別する。パターン生成器は、大きく2つの種類に分けら
れる。一つは、作成したテストデータやテスト用プログ
ラムをROMなどのメモリに保管しておき、それをテス
ト対象回路に出力する方法である。この方法では、メモ
リにテストデータを保存する必要があり、論理回路内に
保存できる量に制限が生じる。そのため、テストデータ
の対象となった故障については検出することができる
が、それ以外の故障については検出ができなくなる問題
点がある。もう一つの方法は、疑似乱数生成器を用いる
方法である。疑似乱数生成器を用いることで大量の疑似
乱数を出力し、テスト対象回路に入力する。このような
疑似乱数を用いる方法では、テスト対象回路が順序回路
の場合、すべての状態を遷移することが難しいことやテ
スト対象回路が組み合わせ回路の場合でも検出が困難な
部分が生じることがあり、高い故障検出率の達成が難し
い。また、順序回路を組み合わせ回路として扱えるよう
に内部記憶素子にも疑似乱数データを直接設定できるよ
うに付加回路を設ける方法が併せて用いられることが多
いが、付加回路のオーバーヘッドによりテストにおいて
高速な回路動作が困難になったり、回路面積の増大が問
題となる。前記2種類のパターン生成器を組み合わせた
例として、特開平5−120052号公報のものがある。この
方法は、マイクロプロセッサの命令実行機能を用いてテ
ストをおこなう方法で、テスト用プログラムはメモリに
保存しておき、該プログラムが使用するデータを疑似乱
数発生器で生成するものである。テストモード指定信号
が入力されるとセルフテストモードとなり、プログラム
メモリに格納されたテスト用命令を実行する際に、テス
ト対象となる演算器(ALU)に入力するテストデータ
を疑似乱数発生器により生成することと回路内のステー
タスフラグの状態により疑似乱数を正規化する回路を備
えることにより、テスト用命令に対して多くの有効なテ
ストデータを供給することを目的としている。しかし、
この方法においても、テスト用命令をプログラムメモリ
内に保存しているため、テスト可能な命令の組み合わせ
数は限られてしまい、命令の出現順序により動作が異な
るような論理回路部分に対して十分なテストケースを実
行できない場合が生じてしまう。
The conventional BIST technology is based on IEEE DESIGN & T
EST OF COMPUTER, March 1993, pages 73 to 8
"A Tutorial on Built-In Self-Test" described on page 2, page 69 to page 77 of the same magazine, June 1993.
Are discussed in As shown in FIG. 2, the BIST includes a test controller, a pattern generator, and a response analyzer. The signal output from the pattern generator is input to the test target circuit, the response signal is captured by the response analyzer, and the state of the response analyzer is observed to determine the presence or absence of a failure. Pattern generators can be broadly divided into two types. One is a method in which the created test data and the test program are stored in a memory such as a ROM, and are output to a test target circuit. In this method, test data must be stored in a memory, and the amount of test data that can be stored in a logic circuit is limited. For this reason, there is a problem that it is possible to detect a fault that has become the target of the test data, but it is not possible to detect other faults. Another method is to use a pseudo random number generator. By using a pseudo-random number generator, a large amount of pseudo-random numbers are output and input to a test target circuit. In the method using such a pseudo-random number, when the test target circuit is a sequential circuit, it is difficult to make a transition in all states, and even when the test target circuit is a combinational circuit, a part that is difficult to detect may occur. It is difficult to achieve high fault coverage. Also, a method of providing an additional circuit so that pseudo-random data can be directly set in an internal storage element so that a sequential circuit can be treated as a combinational circuit is often used together. Operation becomes difficult and an increase in circuit area becomes a problem. Japanese Patent Application Laid-Open No. 5-120052 discloses an example in which the two types of pattern generators are combined. In this method, a test is performed using an instruction execution function of a microprocessor. A test program is stored in a memory, and data used by the program is generated by a pseudo random number generator. When a test mode designation signal is input, the test mode is set to a self-test mode. When a test instruction stored in a program memory is executed, test data to be input to an arithmetic unit (ALU) to be tested is generated by a pseudo random number generator. And a circuit for normalizing the pseudo-random number according to the status of the status flag in the circuit to supply a large amount of valid test data to the test instruction. But,
Also in this method, since the test instructions are stored in the program memory, the number of combinations of the testable instructions is limited, and it is not sufficient for a logic circuit part whose operation differs depending on the order in which the instructions appear. In some cases, test cases cannot be executed.

【0004】[0004]

【発明が解決しようとする課題】従来例に示したよう
に、テストデータをメモリなどに保存しておくことによ
りセルフテストを行う方法では十分なテストを行うこと
ができないといった問題点があり、また、疑似乱数発生
器だけを使う方法では付加回路のオーバーヘッド(動作
速度低下,面積増大)が問題となる。前記2つの方法を
組み合わせる方法であるプロセッサの命令実行機能を用
いてテストを行う方法においても、テストを行う命令の
組み合わせ数が限られてしまうといった問題がある。B
ISTを用いて、高速なテストと高い故障検出率を実現
するためにはこれらの問題点を解決する必要がある。本
発明の目的は、プロセッサの命令実行機能を用いてテス
トを行う方法において、高速なテストと多くの命令組み
合わせをテストできる手段を提供することにある。
As shown in the conventional example, there is a problem that a sufficient test cannot be performed by a method of performing a self-test by storing test data in a memory or the like. In the method using only the pseudo-random number generator, the overhead of the additional circuit (reduction in operation speed and increase in area) becomes a problem. Even in the method of performing a test using the instruction execution function of the processor, which is a method of combining the above two methods, there is a problem that the number of combinations of instructions to be tested is limited. B
In order to realize a high-speed test and a high failure detection rate using the IST, it is necessary to solve these problems. SUMMARY OF THE INVENTION It is an object of the present invention to provide a method for performing a test using an instruction execution function of a processor, which is capable of testing a high-speed test and many instruction combinations.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に本発明のプロセッサはテスト用命令をランダムに発生
させる機能を有することを特徴とし、これにより高速な
動作のテストと多くの命令の組合せのテストを可能とす
る。
In order to achieve the above object, a processor according to the present invention is characterized in that it has a function of randomly generating test instructions, whereby a high-speed operation test and a combination of many instructions are performed. Test.

【0006】より具体的には、プロセッサが実行すべき
命令を指示するプログラムカウンタと、プログラムカウ
ンタによって指示された命令を格納する命令レジスタ
と、データが格納されるレジスタと、命令レジスタに格
納された命令を読み出し、この読み出した命令に基づい
てレジスタに格納されたデータを読み出し、演算を実行
しレジスタに演算結果であるデータを格納する演算器
と、外部から入力されるテスト信号に基づいてテスト用
命令をランダムに発生させる乱数命令生成手段とを有す
ることにより高速な動作のテストと多くの命令の組合せ
のテストを可能とする。
More specifically, a program counter for indicating an instruction to be executed by the processor, an instruction register for storing the instruction specified by the program counter, a register for storing data, and a program register for storing the instruction. An instruction for reading an instruction, reading data stored in a register based on the read instruction, executing an operation, and storing data as an operation result in the register, and a tester for executing a test based on a test signal input from the outside. Providing random number command generation means for randomly generating commands enables a test of a high-speed operation and a test of a combination of many commands.

【0007】また、プロセッサが実行すべき命令を指示
するプログラムカウンタと、データが格納される複数の
レジスタを有するレジスタファイルと、プログラムカウ
ンタによって指示された命令に基づいてレジスタファイ
ルに格納されたデータを読み出し、演算を実行しレジス
タに演算結果であるデータを格納する演算器と、外部か
ら入力されるテスト信号に基づいて、テスト用命令をラ
ンダムに発生させる乱数命令生成手段と、演算器で演算
を実行するための乱数データを出力する乱数データ出力
手段と、乱数データによる演算結果を格納する応答解析
器とを有することで高速な動作のテストと多くの命令の
組合せのテストを可能とする。
Further, a program counter for designating an instruction to be executed by the processor, a register file having a plurality of registers for storing data, and data stored in the register file based on the instruction designated by the program counter. An arithmetic unit that reads, executes an operation, and stores data as an operation result in a register; random number instruction generation means that randomly generates a test instruction based on a test signal input from the outside; Providing random number data output means for outputting random number data to be executed and a response analyzer for storing an operation result based on the random number data enables a high-speed operation test and a test of a combination of many instructions.

【0008】また、上記目的を達成するためプログラム
又はデータを格納するメモリと、メモリと接続され、メ
モリに記憶されたデータの読み出し又はメモリへデータ
の書き込みを行うプロセッサとを有する情報処理システ
ムであって、プロセッサは、メモリへのアクセスを行う
ためのアドレスを格納するアドレスレジスタと、メモリ
へ格納又はメモリから読み出したデータを格納するデー
タレジスタと、命令に基づいてデータレジスタに格納さ
れたデータを読み出し、演算を実行する演算器と、外部
から入力される信号に基づいて、アドレスレジスタに格
納されたアドレスを格納する応答解析器とを有すること
によって、高速な動作のテストと多くの命令の組合せの
テストを可能とする情報処理システムを実現することが
できる。また、上記目的を達成するため情報処理システ
ムは、プログラム又はデータを格納するメモリと、メモ
リと接続され、メモリに記憶されたデータの読み出し又
はメモリへデータの書き込みを行うプロセッサとを有す
る情報処理システムであって、プロセッサは、実行すべ
き命令を出力する命令レジスタと、データを格納する複
数のレジスタと、メモリへのアクセスを行うためのアド
レスを格納するアドレスレジスタと、メモリへ格納する
ためのデータ又はメモリから読み出したデータを格納す
るデータレジスタと、命令レジスタから出力された命令
に従って、複数のレジスタ又はデータレジスタに格納さ
れたデータの演算を実行する演算器と、外部からの信号
に基づいて、ランダムに命令を発生し、命令レジスタに
格納する命令生成器と、演算器は命令生成器から出力さ
れる命令に従って実行され、データレジスタに格納され
たデータを取り込む応答解析器とを有することによって
高速な動作のテストと多くの命令の組合せのテストを可
能とする情報処理システムを実現することができる。
An information processing system having a memory for storing a program or data for achieving the above object, and a processor connected to the memory for reading data stored in the memory or writing data to the memory. The processor reads the data stored in the data register based on an instruction, an address register storing an address for accessing the memory, a data register storing data stored in or read from the memory, and , An operation unit for executing an operation, and a response analyzer for storing an address stored in an address register based on a signal input from the outside, so that a high-speed operation test and a combination of many instructions can be performed. An information processing system that enables a test can be realized. In order to achieve the above object, an information processing system includes: a memory that stores a program or data; and a processor that is connected to the memory and that reads data stored in the memory or writes data to the memory. The processor comprises: an instruction register for outputting an instruction to be executed; a plurality of registers for storing data; an address register for storing an address for accessing the memory; and data for storing in the memory. Or a data register that stores data read from the memory, and a computing unit that performs an operation on data stored in a plurality of registers or data registers according to an instruction output from the instruction register, based on an external signal, An instruction generator that generates instructions randomly and stores them in an instruction register; A response analyzer that executes according to the instructions output from the instruction generator and captures the data stored in the data register, thereby enabling a high-speed operation test and a test of a combination of many instructions. The system can be realized.

【0009】更に、これらプロセッサの乱数命令生成手
段は、テスト用命令によって発生したテスト命令を命令
レジスタに格納したり、テスト用命令をランダムに発生
させると共に命令に適合したデータをレジスタから出力
するための信号とを出力したり、複数の命令を有し予め
設定された確率に基づいて命令を決定して出力する等の
いずれか、あるいはこれらの組み合わせにより、多くの
命令の組合せのテストを可能にする。
Further, the random number instruction generating means of these processors stores a test instruction generated by the test instruction in an instruction register, or randomly generates a test instruction and outputs data conforming to the instruction from the register. Or a combination of any of these, such as the output of a signal, or the determination of a command based on a predetermined probability having a plurality of commands and outputting the command, or a combination of these. I do.

【0010】また、これらプロセッサの乱数命令生成手
段は、プロセッサが実行する命令を保持する命令保存手
段と、命令保存手段から命令をランダムに選択する命令
選択手段とを有することで、多くの命令の組合せのテス
トを可能とする。
Further, the random number instruction generating means of these processors has an instruction storing means for storing instructions to be executed by the processor and an instruction selecting means for randomly selecting an instruction from the instruction storing means. Enables testing of combinations.

【0011】また、これらプロセッサの乱数命令生成手
段は、実行する命令の一部分または全体を保存する部分
命令保存手段と、部分命令保存手段が保存している部分
命令に対応して、部分命令を実行可能な命令とするため
に欠けている部分を指示する情報を格納する命令補完情
報保存手段と、部分命令保存手段から部分命令と命令補
完情報手段から部分命令に対応する命令補完情報をラン
ダムに選択する命令選択手段と、選択した部分命令と命
令補完情報に基づき乱数データを補ってプロセッサが実
行する命令を作成する命令作成手段とを有することで、
多くの命令の組合せのテストを可能とする。
Further, the random number instruction generation means of these processors executes a partial instruction storage means for storing a part or the entirety of an instruction to be executed, and executes the partial instruction corresponding to the partial instruction stored by the partial instruction storage means. Instruction complement information storage means for storing information designating a missing part in order to be a possible instruction, and random selection of partial instructions from the partial instruction storage means and instruction complement information corresponding to the partial instructions from the instruction complement information means Instruction selecting means, and an instruction creating means for creating an instruction to be executed by the processor by supplementing random number data based on the selected partial instruction and the instruction complement information,
Enables testing of many instruction combinations.

【0012】更に、テストモード信号がセルフテストを
指示する場合には、命令によりデータの出力を指示され
たレジスタファイル内のレジスタに代わって乱数データ
出力手段がデータを出力し、命令によってデータを書く
のを指示されたレジスタファイル内のレジスタに代わっ
て応答解析器がデータを取り込むことにより多くの命令
の組合せのテストを可能とする。
Further, when the test mode signal indicates a self-test, the random number data output means outputs data instead of the register in the register file instructed to output data by the instruction, and writes the data by the instruction. The response analyzer captures data in place of the register in the designated register file to enable testing of many instruction combinations.

【0013】更に、テストモード信号がセルフテストを
指示する場合には、これらプロセッサの応答解析器はプ
ログラムカウンタの出力信号、プロセッサがメモリへア
クセスするアドレス、データレジスタの出力を取り込む
ことで高速な動作のテストが可能となる。
Further, when the test mode signal indicates a self-test, the response analyzer of these processors takes in the output signal of the program counter, the address at which the processor accesses the memory, and the output of the data register to operate at high speed. Can be tested.

【0014】[0014]

【発明の実施の形態】以下、本発明の実施例について述
べる。
Embodiments of the present invention will be described below.

【0015】図1は、本発明の一実施例であるプロセッ
サを含むLSIの構成を示したものである。101はバ
ス111を介してメモリとの信号のやりとりを行うメモ
リインタフェース、102はプログラムカウンタ、10
3は命令キャッシュ、104はプログラムカウンタを制
御するシーケンサ、105は命令レジスタ、106は命
令レジスタの内容をデコードし演算器等を制御するデコ
ーダ、107はデータ格納する32本のレジスタと、乱
数データ出力手段として乱数データ生成器と、応答解析
器としてMISR(多重入力シグネチャレジスタ)を有
するレジスタファイル、108はALU(Arithmetic L
ogical Unit )、109はメモリとデータをやり取りす
るレジスタであるMDR(Memory Data Register)、1
10はメモリインタフェースにアドレスを指示するMA
R(Memory Address Register)、123はセルフテスト
を行うときにランダムに命令を出力する乱数命令生成手
段、125と142と143は乱数データ出力手段であ
る乱数データ生成器、144と126と127と128は
応答解析器として用いるMISR、129と130と1
31と132と141は通常動作時とテスト動作時の信
号の流れを切り替えるセレクタである。また、133は
LSIの外部から印加するセルフテストを行うことを指
示するテストモード信号であり、134は、乱数命令生
成手段123が出力する命令140の内容を示す命令情
報信号である。また、本実施例の乱数データ生成器は、
命令情報信号134を入力し、乱数命令生成手段123
が出力する命令に適合した乱数データを出力するように
乱数データの発生方法を変更する機能を有する。また、
136と137と138と139は、それぞれMISR
144,126,127,128の出力信号であり、プ
ロセッサ外部へ出力される。
FIG. 1 shows the configuration of an LSI including a processor according to an embodiment of the present invention. 101 is a memory interface for exchanging signals with a memory via a bus 111, 102 is a program counter, 10
3 is an instruction cache, 104 is a sequencer that controls a program counter, 105 is an instruction register, 106 is a decoder that decodes the contents of the instruction register and controls an arithmetic unit, etc. 107 is 32 registers for storing data, and random number data output A register file having a random number data generator as a means and a MISR (Multiple Input Signature Register) as a response analyzer, and 108 is an ALU (Arithmetic L
ogical unit), 109 is a register for exchanging data with the memory, MDR (Memory Data Register), 1
10 is an MA for designating an address to the memory interface.
R (Memory Address Register), 123 is a random number command generating means for randomly outputting a command when performing a self-test, 125, 142 and 143 are random number data generators as random number data outputting means, 144, 126, 127 and 128 Is MISR used as a response analyzer, 129, 130 and 1
Reference numerals 31, 132, and 141 are selectors for switching the signal flow between the normal operation and the test operation. Reference numeral 133 denotes a test mode signal for instructing to perform a self-test applied from outside the LSI, and reference numeral 134 denotes an instruction information signal indicating the contents of the instruction 140 output from the random number instruction generation unit 123. Further, the random number data generator according to the present embodiment includes:
The instruction information signal 134 is input, and the random number instruction
Has a function of changing the method of generating random number data so as to output random number data that conforms to the command output by. Also,
136, 137, 138 and 139 are MISR
Output signals of 144, 126, 127, and 128 are output to the outside of the processor.

【0016】図3は、本実施例で述べるプロセッサの命
令の一覧である。基本命令はすべてレジスタ間演算であ
る。分岐命令には、無条件分岐命令BRA,条件付き分
岐命令BRAcc(ccは分岐条件を示す。)、サブルーチ
ンへの分岐命令CALL、サブルーチンからの戻り命令
RTNの4つがある。他に、ロード命令LOAD,スト
ア命令STORがある。また、分岐命令およびロード命
令およびストア命令における指定可能なアドレス空間は
24ビットで表現される。
FIG. 3 is a list of instructions of the processor described in this embodiment. All basic instructions are register-to-register operations. There are four branch instructions: an unconditional branch instruction BRA, a conditional branch instruction BRAcc (cc indicates a branch condition), a branch instruction CALL to a subroutine, and a return instruction RTN from the subroutine. In addition, there are a load instruction LOAD and a store instruction STOR. The address space that can be specified in the branch instruction, the load instruction, and the store instruction is represented by 24 bits.

【0017】図4に命令フォーマットを示す。命令はす
べて32ビットの固定長である。基本命令中、f,S
1,S2,Dフィールドは、それぞれ、演算結果をフラ
グに反映するかどうかを指示するビット、第1ソースレ
ジスタを指示するフィールド、第2ソースレジスタを指
示するフィールドである。また、分岐命令におけるdは
分岐先のアドレスを示す。
FIG. 4 shows an instruction format. All instructions have a fixed length of 32 bits. F, S in the basic instruction
The 1, 1, and 2 fields are a bit for indicating whether or not the operation result is reflected in the flag, a field for indicating the first source register, and a field for indicating the second source register, respectively. Also, d in the branch instruction indicates a branch destination address.

【0018】図5に図4におけるOP(オペコード)部
分の定義を示す詳細な命令フォーマットを示す。基本命
令では第0ビットから第7ビットは全て0であり、分岐
命令では第4ビットから第7ビットが全て0で、第8ビ
ットから第31ビットまでに分岐先アドレスがはいる。
ロード・ストア命令では第16ビットが1で、第0ビッ
トの値によりLOADとSTORが区別される。
FIG. 5 shows a detailed instruction format showing the definition of the OP (opcode) portion in FIG. In the basic instruction, the 0th to 7th bits are all 0. In the branch instruction, the 4th to 7th bits are all 0s, and the 8th to 31st bits contain the branch destination address.
In the load / store instruction, the 16th bit is 1, and the value of the 0th bit distinguishes LOAD and STOR.

【0019】本実施例の通常動作時の処理フローについ
て説明する。通常動作時の基本命令の処理は、まずプロ
グラムカウンタ102で指される命令が、命令キャッシ
ュ103より読み出され、命令レジスタ105にセット
される。また、シーケンサ104は命令信号115,AL
U108よりのフラグ信号116よりプログラムカウンタ1
02を制御する。次にレジスタファイル107より、命
令で示されたレジスタのデータがバス118,119を
通して、ALU108に転送される。次にALU108が演算を行
う。最後に演算された結果が命令で指示されたレジスタ
ファイル107内のレジスタに、バス120を通して格
納される。
The processing flow of this embodiment during normal operation will be described. In the processing of the basic instruction at the time of the normal operation, first, the instruction indicated by the program counter 102 is read from the instruction cache 103 and set in the instruction register 105. The sequencer 104 receives the instruction signal 115, AL
Program counter 1 based on flag signal 116 from U108
02 is controlled. Next, from the register file 107, the data of the register indicated by the instruction is transferred to the ALU 108 via the buses 118 and 119. Next, the ALU 108 performs an operation. The finally calculated result is stored in the register in the register file 107 designated by the instruction via the bus 120.

【0020】分岐命令の処理は、まずプログラムカウン
タ102の示される命令が命令キャッシュより読み出さ
れ、命令レジスタにセットされる。次に、BRAの場
合、命令信号115から分岐先アドレスがシーケンサ1
04へ送られ、バス112を通してプログラムカウンタ
102を制御する。BRAccの場合、命令信号115か
ら分岐先アドレスと、ALU108からのフラグ信号116が
シーケンサ104に送られれ、プログラムカウンタ10
2を制御する。CALLの場合、プログラムカウンタ1
02の内容をレジスタファイル内のレジスタ0へ待避
し、また、命令信号115から分岐先アドレスがシーケ
ンサ104へ送られ、バス112を通してプログラムカ
ウンタ102を制御する。RTNの場合、レジスタファ
イル107内のレジスタ0の内容をプログラムカウンタ
102にセットする。
In the processing of the branch instruction, first, the instruction indicated by the program counter 102 is read from the instruction cache and set in the instruction register. Next, in the case of BRA, the branch destination address is
04 and controls the program counter 102 through the bus 112. In the case of BRAcc, the branch destination address from the instruction signal 115 and the flag signal 116 from the ALU 108 are sent to the sequencer 104, and the program counter 10
2 is controlled. In the case of CALL, the program counter 1
02 is saved in the register 0 in the register file, and a branch destination address is sent from the instruction signal 115 to the sequencer 104 to control the program counter 102 through the bus 112. In the case of RTN, the contents of register 0 in register file 107 are set in program counter 102.

【0021】ロード・ストア命令の処理は、まずプログ
ラムカウンタ102の示される命令が命令キャッシュよ
り読み出され、命令レジスタにセットされる。また、シ
ーケンサ104は命令信号115,ALU108よりのフラグ
信号116よりプログラムカウンタ102を制御する。
次に命令で指示されたレジスタの信号がMAR110に転送さ
れる。また、STORの場合、命令中のS1フィールド
で指示されるレジスタの信号をMDR109に転送する。次
に、STORの場合、MAR110の示すアドレス信号117
とMDR109のデータ信号121をメモリインタフェース1
01に送り、メモリインタフェース101が該当するア
ドレスのメモリにデータを書き込む。LOADの場合、MAR1
10の示すアドレス信号117をメモリインタフェース1
01に送り、メモリインタフェース101から該当する
アドレスのメモリのデータをMDRに受け取り、次にM
DRのデータを命令中のDフィールドで示されるレジス
タに転送する。
In the processing of the load / store instruction, first, the instruction indicated by the program counter 102 is read from the instruction cache and set in the instruction register. The sequencer 104 controls the program counter 102 based on the instruction signal 115 and the flag signal 116 from the ALU 108.
Next, the signal of the register specified by the instruction is transferred to the MAR 110. In the case of STOR, the signal of the register indicated by the S1 field in the instruction is transferred to the MDR 109. Next, in the case of STOR, the address signal 117 indicated by the MAR 110
And data signal 121 of MDR 109 to memory interface 1
01, and the memory interface 101 writes data to the memory at the corresponding address. MAR1 for LOAD
The address signal 117 indicated by 10 is transmitted to the memory interface 1
01, receives the data of the memory at the corresponding address from the memory interface 101 into the MDR,
The data of DR is transferred to the register indicated by the D field in the instruction.

【0022】本実施例のセルフテスト動作時に通常動作
時と異なる動作を説明する。まず、セルフテストを行う
ことを指示するテストモード信号133を外部から印加
する。テストモード信号133に基づいて、セレクタ1
41は、命令キャッシュの出力する命令を命令レジスタ
105へ出力せず、代わりに乱数命令生成手段の出力す
る命令140を命令レジスタ105へ出力する。該テス
トモード信号133に基づいて、セレクタ129はプロ
グラムカウンタ102の信号出力先をMISR126へ切り替
える。また、該テストモード信号133に基づいて、セ
レクタ130はMAR110のアドレス信号117の出力先を
MISR127 へ切り替える。また、該テストモード信号13
3に基づいて、セレクタ131はMDR109のデータ信号1
21の出力先をMISR128 へ切り替える。また、該テスト
モード信号133に基づいて、セレクタ132はメモリ
インタフェースからのデータ信号122をMDR109で転送
せず、代わりに乱数データ生成器125の出力する乱数
データを転送する。また、該テストモード信号133に
基づいて、命令によりデータの出力を指示されたレジス
タファイル107内のレジスタに代わって乱数データ生
成器142,143がデータを出力し、命令によってデ
ータの格納を指示されたレジスタファイル内のレジスタ
に代わってMISR144 がデータを取り込むようになる。
An operation different from the normal operation during the self-test operation of this embodiment will be described. First, a test mode signal 133 instructing to perform a self test is externally applied. Based on the test mode signal 133, the selector 1
Reference numeral 41 does not output the instruction output from the instruction cache to the instruction register 105, but instead outputs the instruction 140 output from the random number instruction generation means to the instruction register 105. Based on the test mode signal 133, the selector 129 switches the signal output destination of the program counter 102 to the MISR 126. Further, based on the test mode signal 133, the selector 130 changes the output destination of the address signal 117 of the MAR 110.
Switch to MISR127. The test mode signal 13
3, the selector 131 outputs the data signal 1 of the MDR 109.
21 is switched to MISR128. Further, based on the test mode signal 133, the selector 132 does not transfer the data signal 122 from the memory interface by the MDR 109, but instead transfers the random number data output from the random number data generator 125. Further, based on the test mode signal 133, the random number data generators 142 and 143 output data instead of the registers in the register file 107 instructed to output data by the instruction, and the instruction to store the data is issued by the instruction. MISR144 takes in the data instead of the register in the register file.

【0023】本実施例のセルフテスト動作時の処理フロ
ーを説明する。まず、乱数命令生成手段123から命令
140が出力され命令レジスタ105に転送される。ま
た、乱数命令生成手段123は、命令140に対応する
命令情報信号134を出力する。次に、命令が基本命令
の場合、シーケンサ104は命令信号115,ALU108よ
りのフラグ信号116よりプログラムカウンタ102を
制御する。次にレジスタファイル107より、命令で示
されたレジスタの信号に代わって乱数データ生成器14
2,143が出力する乱数データがバス118,119
を通して、ALU108に転送される。次にALU108が演算を行
う。最後に演算された結果が命令で指示されたレジスタ
ファイル107内のレジスタに代わってレジスタファイ
ル内のMISRに、バス120を通して取り込まれる。
また、プログラムカウンタ102の出力信号がMISR126
に取り込まれる。
A processing flow at the time of the self-test operation of the present embodiment will be described. First, the instruction 140 is output from the random number instruction generation means 123 and transferred to the instruction register 105. Further, the random number command generation means 123 outputs a command information signal 134 corresponding to the command 140. Next, when the instruction is a basic instruction, the sequencer 104 controls the program counter 102 based on the instruction signal 115 and the flag signal 116 from the ALU 108. Next, from the register file 107, the random number data generator 14 replaces the signal of the register indicated by the instruction.
2 and 143 output random number data on buses 118 and 119.
Through to the ALU 108. Next, the ALU 108 performs an operation. The result of the last operation is taken in via the bus 120 into the MISR in the register file instead of the register in the register file 107 designated by the instruction.
The output signal of the program counter 102 is MISR 126
It is taken in.

【0024】命令が分岐命令の場合は、BRAの場合、
命令信号115から分岐先アドレスがシーケンス104
へ送られ、バス112を通してプログラムカウンタ10
2を制御する。次にプログラムカウンタ102の出力信
号がMISR126 に取り込まれる。BRAccの場合、命令信
号115から分岐先アドレスと、ALU108からのフラグ信
号116がシーケンサ104に送られ、プログラムカウ
ンタ102を制御する。次にプログラムカウンタ102
の出力信号がMISR126 に取り込まれる。CALLの場合、プ
ログラムカウンタ102の内容をレジスタファイル10
7内のレジスタ0へ待避する代わりにレジスタファイル
107内のMISRに取り込まれる。また、命令信号1
15から分岐先アドレスがシーケンサ104へ送られ、
バス112を通してプログラムカウンタ102を制御す
る。次にプログラムカウンタ102の出力信号がMISR12
6 に取り込まれる。RTNの場合、レジスタファイル1
07内のレジスタ0の内容の代わりにレジスタファイル
内の乱数データ生成器の出力する乱数データをプログラ
ムカウンタ102にセットする。次にプログラムカウン
タ102の出力信号がMISR126 に取り込まれる。
If the instruction is a branch instruction, if it is a BRA,
From the instruction signal 115, the branch destination address is
To the program counter 10 via the bus 112
2 is controlled. Next, the output signal of the program counter 102 is taken into the MISR 126. In the case of BRAcc, a branch destination address from the instruction signal 115 and a flag signal 116 from the ALU 108 are sent to the sequencer 104 to control the program counter 102. Next, the program counter 102
Is output to MISR 126. In the case of CALL, the contents of the program counter 102 are stored in the register file 10
Instead of being saved to the register 0 in the register 7, it is taken into the MISR in the register file 107. Command signal 1
From 15, the branch destination address is sent to the sequencer 104,
The program counter 102 is controlled through a bus 112. Next, the output signal of the program counter 102 is changed to MISR12.
Incorporated into 6. Register file 1 for RTN
The random number data output from the random number data generator in the register file is set in the program counter 102 instead of the contents of the register 0 in the register 07. Next, the output signal of the program counter 102 is taken into the MISR 126.

【0025】命令がロード・ストア命令の場合、シーケ
ンサ104は命令信号115,ALU108よりフラグ信号1
16よりプログラムカウンタ102を制御する。次に令
令で指示されたレジスタの信号に代わってレジスタファ
イル107内の乱数データ生成器の出力信号要MAR110に
転送される。また、STORの場合、命令中のS1フィ
ールドで指示されるレジスタの信号に代わってレジスタ
ファイル107内の乱数データ生成器の出力信号をMDR1
09に転送する。次に、STORの場合、MAR110の示すア
ドレス信号117をMISR128 に取り込み、MDR109の出力
データ121をMISR128の取り込む。LOADの場合、M
DR110に示すアドレス信号117をMISR128 に取り込み、次
にメモリインタフェース101の代わりに乱数データ生
成器の出力信号をMDR109に転送し、次にMDR109のデータ
をレジスタファイル内のMISRに取り込む。0 セルフテスト動作では、上記の乱数命令生成手段の命令
信号出力からの一連の動作を繰り返す。また、故障の有
無の判別はセルフテストの途中または終了時にMISR
の出力信号136,137,138,139を観測し、
MISRの出力信号136,137,138,139に
ついてあらかじめ求めておいた故障がない場合のデータ
と比較して不一致となれば故障が存在すると判定する。
判定に用いる該故障のない場合のデータは、本実施例の
LSIについて、論理シミュレータや故障シミュレータ
を用いてセルフテスト動作のシミュレーションを行うこ
とにより求めることができる。
When the instruction is a load / store instruction, the sequencer 104 outputs the flag signal 1 from the instruction signal 115 and the ALU 108.
16 controls the program counter 102. Next, the output signal of the random number data generator in the register file 107 is transferred to the required MAR 110 instead of the signal of the register designated by the instruction. In the case of STOR, the output signal of the random number data generator in the register file 107 is changed to MDR1 instead of the signal of the register indicated by the S1 field in the instruction.
Transfer to 09. Next, in the case of STOR, the address signal 117 indicated by the MAR 110 is taken into the MISR 128, and the output data 121 of the MDR 109 is taken into the MISR 128. For LOAD, M
The address signal 117 indicated by the DR 110 is taken into the MISR 128, the output signal of the random number data generator is transferred to the MDR 109 instead of the memory interface 101, and the data of the MDR 109 is taken into the MISR in the register file. 0 In the self-test operation, a series of operations from the command signal output of the random number command generation means is repeated. The presence or absence of a failure is determined during the self-test or at the end of the MISR.
Observe output signals 136, 137, 138, 139 of
If the output signals 136, 137, 138, and 139 of the MISR are inconsistent with data obtained in advance when there is no failure, it is determined that a failure exists.
The data without the failure used for the determination can be obtained by simulating the self-test operation of the LSI of this embodiment using a logic simulator or a failure simulator.

【0026】以上、本実施例は、命令をランダムに発生
し、命令実行において用いられるデータを乱数データ生
成器で提供し、命令の実行の結果が反映されるレジスタ
とプログラムカウンタとMARとMDRのデータをMI
SRにより取り込み、MISRの出力信号を観測し、あらか
じめ求めておいた故障のない場合のMISRの出力と比
較するという一連の処理を繰り返すことにより、命令実
行結果が正しいか否かのテストを大量の命令についてテ
スト可能な構成となっている。
As described above, in this embodiment, an instruction is randomly generated, data used in the execution of the instruction is provided by a random number data generator, and a register reflecting a result of the execution of the instruction, a program counter, a MAR and an MDR are provided. MI data
By repeating a series of processing of capturing by the SR, observing the MISR output signal, and comparing it with the MISR output in the case where there is no failure determined in advance, a large number of tests are performed to determine whether the instruction execution result is correct. The configuration is such that the instruction can be tested.

【0027】本実施例に示すように、ランダムに命令を
発生させる機能を設けることで、多くの命令の出現順序
の組み合わせでテストが行えるようになる。また、乱数
命令生成手段の出力する命令情報により、実行される命
令に適合した乱数データ作成することができるため、よ
り効率のよいテストが可能となる。
As shown in the present embodiment, by providing a function of randomly generating instructions, a test can be performed in a combination of the order of appearance of many instructions. Further, random number data suitable for a command to be executed can be generated based on the command information output from the random number command generation unit, so that a more efficient test can be performed.

【0028】図6は、乱数命令生成手段の一実施例を示
すものである。乱数命令生成手段は、テストを行う命令
を保存しておく命令保存手段71と命令保存手段で保存
した命令をランダムに選択する命令選択手段72で構成
される。
FIG. 6 shows an embodiment of the random number command generation means. The random number command generation means is composed of a command storage means 71 for storing a command to be tested and a command selection means 72 for randomly selecting a command stored in the command storage means.

【0029】動作は、セルフテストを行うことを指示す
るテストモード信号133が入力されると開始する。ま
ず命令選択手段72が命令保存手段71に保存されたど
の命令を選択するかの情報を選択信号73として命令保
存手段71に送り、また該情報を命令情報信号134と
して出力する。次に選択信号73を受けた命令保存手段
71は、該選択信号に対応する命令を140に出力す
る。
The operation starts when a test mode signal 133 instructing to perform a self test is input. First, the instruction selecting means 72 sends information on which instruction stored in the instruction storing means 71 to select to the instruction storing means 71 as a selection signal 73, and outputs the information as an instruction information signal 134. Next, the instruction storage means 71 having received the selection signal 73 outputs an instruction corresponding to the selection signal to 140.

【0030】実施例の命令保存手段71は、選択信号7
3をアドレス信号として入力するメモリを用いることで
実現できる。図7は該メモリの例を示したものである。
メモリは32ビットごとにアドレスが割り当てられ、セ
ルフテスト動作において発生させる命令を図5の命令形
式に従った32ビットコードとして格納しておく。図8
の例ではアドレス0000には、命令ADD 0,R
(1),R(19),R(4)を意味する32ビットコード0
0000000000000010000011001100100、アドレスnには、
LOAD R(1),R(4)を意味する32ビットコード
10000000000000001000010000000100というようにn個の
命令が格納されている。
The instruction storage means 71 of the embodiment is provided with a selection signal 7
3 can be realized by using a memory that inputs 3 as an address signal. FIG. 7 shows an example of the memory.
An address is assigned to the memory every 32 bits, and an instruction to be generated in the self-test operation is stored as a 32-bit code according to the instruction format of FIG. FIG.
In the example of the address 0000, the instruction ADD 0, R
32-bit code 0 meaning (1), R (19), R (4)
0000000000000010000011001100100, address n:
LOAD 32-bit code meaning R (1), R (4)
The n instructions are stored as 10000000000000001000010000000100.

【0031】また、実施例の命令選択手段72は、疑似
乱数発生器として一般に用いられる線形フィードバック
シフトレジスタ(LFSR)で実現できる。LFSR
は、シフトレジスタの最終段出力をシフトレジスタの初
段のDフリップフロップへフィードバックすると同時に
中間のDフリップフロップへも排他的論理和を用いてフ
ィードバックを行うようにしたものであり、フィードバ
ックの構成の仕方により、全てのビットが0になる場合
を除いた全てのビットパターンを疑似ランダムに発生可
能である。図8は33ビットLFSRの例を示したのも
である。91はDフリップフロップ、900から932
までは33ビット疑似乱数パターン出力信号である。該
LFSRにおいて1つの疑似乱数は、Dフリップフロッ
プ91に対して1回のシフト動作を実行させて変化する
Dフリップフロップ91の信号値を疑似乱数パターン出
力信号900〜932に出力することにより得られる。
複数の疑似乱数パターン出力信号を得るためには、必要
に応じて前記シフト動作を繰り返す。また、LFSRの
初期値が全てのビットが0の場合では疑似乱数を発生し
ないため、LSIの電源が入ったとき、またはテストモ
ード信号がセルフテストモードになったときに、初期値
として、全てのビットの信号値が0となる場合以外の信
号値の組み合わせで初期化されるフリップフロップをD
フリッププロップ91として使用する。
The instruction selecting means 72 of the embodiment can be realized by a linear feedback shift register (LFSR) generally used as a pseudo random number generator. LFSR
Is to feed back the output of the last stage of the shift register to the first stage D flip-flop of the shift register, and at the same time, to provide feedback to the intermediate D flip-flop using exclusive OR. Accordingly, all the bit patterns except for the case where all the bits become 0 can be generated in a pseudo-random manner. FIG. 8 shows an example of a 33-bit LFSR. 91 is a D flip-flop, 900 to 932
Up to this is a 33-bit pseudo random pattern output signal. In the LFSR, one pseudo-random number is obtained by executing one shift operation on the D flip-flop 91 and outputting the signal value of the D flip-flop 91 that changes to the pseudo random number pattern output signals 900 to 932. .
In order to obtain a plurality of pseudo random pattern output signals, the shift operation is repeated as necessary. Since pseudo random numbers are not generated when the initial value of the LFSR is 0 in all bits, all the bits are set as initial values when the power of the LSI is turned on or when the test mode signal is set to the self-test mode. A flip-flop initialized with a combination of signal values other than when the bit signal value becomes 0 is D
Used as a flip prop 91.

【0032】図8の該LFSRから、メモリに格納され
ている命令を指し示すために必要なビット数分の出力信
号を選んでメモリへのアドレス信号として接続し、メモ
リに格納された命令と一対一に対応する該アドレス信号
を乱数命令生成手段が出力する命令の識別に必要な命令
情報信号134として出力することにより、図6の実施
例が構成できる。また、同じ命令をメモリの複数アドレ
スに格納しておくと命令選択手段が該命令を選択する確
率があがることを利用して、乱数命令生成手段が発生す
る命令の発生確率を命令毎に設定しておくことが可能で
ある。
From the LFSR shown in FIG. 8, output signals of the number of bits necessary to indicate an instruction stored in the memory are selected and connected as address signals to the memory, and the one-to-one correspondence with the instruction stored in the memory is selected. Is output as the command information signal 134 necessary for identification of the command output by the random number command generation means, the embodiment of FIG. 6 can be configured. Also, by taking advantage of the fact that storing the same instruction at a plurality of addresses in the memory increases the probability that the instruction selecting means will select the instruction, the random number instruction generating means sets the probability of occurrence of the instruction for each instruction. It is possible to keep.

【0033】図9は、乱数命令生成手段の別の実施例を
示したものである。乱数命令生成手段は、テストを行う
命令の一部分または全体を保存する部分命令保存手段10
02と、該部分命令保存手段が保存している部分命令に対
応して、該部分命令を実行可能な命令とするために欠け
ている部分を指示する情報を保存する命令補完情報保存
手段1003と、部分命令保存手段1002が保存する
部分命令と命令補完情報保存手段が保存する該部分命令
に対応する命令補完情報をランダムに選択する命令選択
手段1001と、該選択した部分命令と命令補完情報に
基づいて乱数データを補ってプロセッサが実行する命令
を作成する命令作成手段で構成される。動作は、セルフ
テストを行うことを指示するテストモード信号133が
入力されると開始する。まず命令選択手段1001が、
命令保存手段1002に保存されたどの部分命令を選択
するかの情報を選択信号1005として部分命令保存手
段1002に送り、同時に、該選択情報に対応する命令
補完情報を選択するために選択信号1005を命令補完
情報保存手段に送る。また、選択信号1005が命令情
報信号134として出力する。次に選択信号1005を
受けた部分命令保存手段1002は、選択信号1005
に対応する部分命令1006を命令作成手段1004に
送る。また、命令補完情報保存手段1003は、該選択
信号1005に対応する命令補完情報1007を命令作成手
段1004に送る。次に命令作成手段1004は、部分
命令1006と命令補完情報1007を受け、部分命令
において補完すべき箇所に乱数データを補充することで
実行可能な命令を作成し、命令140として出力する。
FIG. 9 shows another embodiment of the random number command generation means. The random number command generation means stores a partial command storage means 10 for storing a part or the whole of the command to be tested.
02, an instruction supplementary information storage unit 1003 corresponding to the partial instruction stored by the partial instruction storage unit and storing information designating a missing part to make the partial instruction executable. An instruction selecting means 1001 for randomly selecting a partial instruction stored by the partial instruction storing means 1002 and instruction complementary information corresponding to the partial instruction stored by the instruction complementary information storing means; An instruction creating means for creating an instruction to be executed by the processor by supplementing random number data based on the instruction. The operation starts when a test mode signal 133 instructing to perform a self test is input. First, the instruction selecting means 1001
Information on which partial instruction to be selected stored in the instruction storage means 1002 is selected is sent to the partial instruction storage means 1002 as a selection signal 1005, and at the same time, the selection signal 1005 is selected to select the instruction complementary information corresponding to the selection information. It is sent to the command complement information storage means. The selection signal 1005 is output as the command information signal 134. Next, upon receiving the selection signal 1005, the partial instruction storage means 1002 selects the selection signal 1005
Is sent to the instruction creating means 1004. Further, the instruction complement information storage unit 1003 sends instruction complement information 1007 corresponding to the selection signal 1005 to the instruction creation unit 1004. Next, the instruction creator 1004 receives the partial instruction 1006 and the instruction complement information 1007, creates an executable instruction by supplementing random number data in a part to be complemented in the partial instruction, and outputs the instruction as the instruction 140.

【0034】実施例の部分命令保存手段1002及び命
令補完情報保存手段1003は、選択信号1005をア
ドレス信号として入力するメモリを用いることで実現で
きる。図10は部分命令保存手段を実現するメモリの例
を示したものである。該メモリは32ビットごとにアド
レスが割り当てられ、セルフテストにおいて発生させる
命令を図5の命令形式に従った32ビットコードとして
格納しておく、このとき保存する命令コードのうち、乱
数データにより補充したい箇所のビットを0とする。図
10の例では、アドレス0001には、命令SUB
0,?,?,? を意味する32ビットコード000000000
00000100000000000000000、アドレス0004には、命令B
RA ? を意味する32ビットコード0001000000000000
0000000000000000というようにm個の部分命令が格納さ
れている。ここで、命令の意味における?は、命令コー
ド中に乱数データにより補完するフィールドを示す記号
である。たとえば該アドレス0001の場合は、命令コ
ードのうち第17ビットから第31ビットを乱数で補完
することを意味し、対応するビットを全て0として保存
しておく。図11は命令補完情報保存手段を実現するメ
モリの例を示したものである。該メモリは32ビットご
とにアドレスが割り当てられ、命令補完情報は32ビッ
トで表現される。また、図10のメモリに保存した各部
分命令と各部分命令に対応する命令補完情報が同じアド
レスとなるように格納しておく。命令補完情報の形式
は、部分命令保存手段が保存する部分命令に対応して、
該部分命令中の乱数データにより補完することを示すビ
ットを1として、それ以外のビットを0にすることとす
る。図11の例では、アドレス0001は、図10の部
分命令に対応して、第17ビットから第31ビットが1
で、それ以外のビットが0である32ビットコード0000
0000000000000111111111111111、アドレス0004に
は、分岐命令の分岐先アドレスを示す第8ビットから第
31ビットが1、第0ビットから第7ビットが0である
32ビットコード00000000111111111111111111111111が
格納されている。
The partial instruction storage means 1002 and the instruction complement information storage means 1003 of the embodiment can be realized by using a memory for inputting the selection signal 1005 as an address signal. FIG. 10 shows an example of a memory for realizing the partial instruction storage means. An address is assigned to the memory every 32 bits, and an instruction to be generated in the self-test is stored as a 32-bit code in accordance with the instruction format of FIG. 5. Of the instruction codes stored at this time, it is desired to supplement with random number data. The bit at the location is set to 0. In the example of FIG. 10, the address 0001 contains the instruction SUB
0 ,? ,? ,? 32-bit code 000000000
00000100000000000000000, address 0004 contains instruction B
RA? 32 bit code 0001000000000000
M partial instructions, such as 0000000000000000, are stored. Where in the meaning of the instruction? Is a symbol indicating a field complemented by random number data in the instruction code. For example, in the case of the address 0001, the 17th to 31st bits of the instruction code are complemented with random numbers, and all corresponding bits are stored as 0. FIG. 11 shows an example of a memory for realizing the instruction complement information storage means. The memory is assigned an address every 32 bits, and the instruction complement information is represented by 32 bits. Each partial instruction stored in the memory of FIG. 10 and instruction complement information corresponding to each partial instruction are stored so as to have the same address. The format of the instruction complement information corresponds to the partial instruction stored by the partial instruction storage means,
It is assumed that a bit indicating complementing by random number data in the partial instruction is set to 1 and other bits are set to 0. In the example of FIG. 11, the address 0001 corresponds to the partial instruction of FIG.
And the other bits are 0, a 32-bit code 0000
The 0000000000000111111111111111 and the address 0004 store a 32-bit code 00000000111111111111111111111111 in which the 8th to 31st bits indicating the branch destination address of the branch instruction are 1 and the 0th to 7th bits are 0.

【0035】命令作成手段1004の詳細な実施例を図
12に示す。命令作成手段はセルフテストを行うことを
指示するテストモード信号133が入力されると動作を
開始する32ビットの疑似乱数パターンを発生するLFSR
1301と、2つの32ビットデータを入力して各ビットご
とに論理積を計算し、その結果を出力する32ビットA
ND計算器1302と二つの32ビットデータを入力し
て各ビットごとに論理和を計算し、その結果を出力する
32ビットOR計算器1303で構成される。動作は、
まず、命令補完情報保存手段が出力する命令補完情報1
007とLFSR1301が出力する疑似乱数データのビット毎
の論理積を計算し、補完が必要なビットにのみ乱数デー
タが与えられた32ビットデータを作成する。次に該3
2ビットデータと部分命令保存手段が出力する部分命令
1006のビット毎の論理和を計算し、補完が必要な部
分に乱数データを得て、命令140を出力する。
FIG. 12 shows a detailed embodiment of the instruction creating means 1004. The instruction generating means generates a 32-bit pseudo-random number pattern which starts operation when a test mode signal 133 instructing to perform a self-test is generated.
1301 and a 32-bit A that inputs two 32-bit data, calculates a logical product for each bit, and outputs the result
It comprises an ND calculator 1302 and a 32-bit OR calculator 1303 that inputs two 32-bit data, calculates a logical sum for each bit, and outputs the result. The operation is
First, the instruction complement information 1 output by the instruction complement information storage means
The logical AND for each bit of the pseudo-random number data 007 and the pseudo-random number data output by the LFSR 1301 is calculated, and 32-bit data in which random number data is given only to bits that need to be complemented is created. Next,
The logical sum for each bit of the 2-bit data and the partial instruction 1006 output by the partial instruction storage means is calculated, random number data is obtained in a portion requiring complementation, and the instruction 140 is output.

【0036】命令選択手段1001は、図8に示したL
FSRで実現可能である。該LFSRの出力から、部分命令
を保存するメモリと命令補完情報を保存するメモリの内
容を指し示すために必要なビット数分の出力を選んでア
ドレス信号として接続する。該アドレス信号を受けたメ
モリは、該当するアドレスのデータを部分命令1006と命
令補完情報1007を出力する。また、該アドレス信号
を命令情報信号134として出力すれば、乱数命令生成
手段が出力する命令の識別が可能となる。上記実施例の
構成では、メモリに格納する部分命令の数は、図6の実
施例と同様に2のべき乗で表される数とするのが効率が
よいが、LFSRの出力をメモリ格納してある部分命令
数mに正規化してもよい。また、同じ部分命令をメモリ
の複数アドレスに格納しておくと命令選択手段が該部分
命令を選択する確率があがることを利用して、乱数命令
生成手段が発生する命令の発生確率を部分命令毎に設定
しておくことが可能である。
The instruction selecting means 1001 uses the L shown in FIG.
It can be realized by FSR. From the outputs of the LFSR, outputs for the number of bits required to indicate the contents of the memory for storing the partial instruction and the memory for storing the instruction complement information are selected and connected as an address signal. The memory receiving the address signal outputs the data of the corresponding address as a partial instruction 1006 and instruction complement information 1007. If the address signal is output as the command information signal 134, the command output by the random number command generation means can be identified. In the configuration of the above embodiment, it is efficient that the number of partial instructions stored in the memory is a number represented by a power of 2 as in the embodiment of FIG. 6, but the output of the LFSR is stored in the memory. It may be normalized to a certain partial instruction number m. Also, by taking advantage of the fact that the same partial instruction is stored at a plurality of addresses in the memory, the probability that the instruction selecting means selects the partial instruction increases, the occurrence probability of the instruction generated by the random number instruction generating means is calculated for each partial instruction. Can be set to

【0037】図9の実施例では、命令の一部を乱数デー
タで補うことで命令を作成するため、図6の実施例に比
べてより多様な命令の組み合わせでテストが行うことが
できる。
In the embodiment shown in FIG. 9, since an instruction is created by supplementing a part of the instruction with random number data, a test can be performed with a wider variety of instruction combinations than the embodiment shown in FIG.

【0038】図13は、図1の実施例で用いられる乱数
データ生成器の詳細な実施例を示したものである。乱数
データ生成器は、1401から1403に示される複数
個の32ビット乱数生成器と、該乱数生成器の出力デー
タから一つを選択し、乱数データ1406として出力す
るセレクタ1404と、命令情報信号134を入力し、
該乱数データ生成器が乱数データを出力すべきか否かを
判定し、出力すべき場合は該命令情報信号に対応する乱
数生成器の出力を選択する情報をセレクタに送る機能と
該情報により選択される乱数生成器に対して動作を指示
する信号を出力する機能を有するデコーダ1405で構
成される。また、乱数生成器1401〜1403は、命
令情報134に対応して該命令情報により識別される命
令について想定したテスト項目をテスト可能とするため
に必要なデータ形式に当てはまるデータを出力する。
FIG. 13 shows a detailed embodiment of the random number data generator used in the embodiment of FIG. The random number data generator includes a plurality of 32-bit random number generators 1401 to 1403, a selector 1404 for selecting one from the output data of the random number generator and outputting the selected data as random number data 1406, and a command information signal 134. And enter
The random number data generator determines whether or not to output random number data, and if so, sends information for selecting an output of the random number generator corresponding to the command information signal to the selector, and the information is selected by the information. And a decoder 1405 having a function of outputting a signal for instructing an operation to a random number generator. In addition, the random number generators 1401 to 1403 output data corresponding to a data format necessary for enabling a test item assumed for an instruction identified by the instruction information to be testable, corresponding to the instruction information 134.

【0039】処理フローは、まず乱数命令生成手段12
3から出力される命令情報信号134を入力するとデコー
ダ1405は該乱数データ生成器が乱数データを出力す
べきか否かを判定し、出力すべき場合は命令情報に対応
した乱数データを出力する乱数生成器を指定する信号を
セレクタ1404へ出力し、また該デコーダは命令情報
に対応した乱数データを出力する乱数生成器1401〜
1403の中の1つの乱数生成器に対して乱数データの
出力を指示する。次に指示を受けた乱数生成器は乱数デ
ータをセレクタ1404に出力する。次にセレクタ14
04は、デコーダ1405から指定された乱数生成器の
出力する乱数データを命令情報信号134に適合した乱数
データとして出力する。この実施例の乱数データ生成器
によると、命令情報信号134に対応して該命令情報に
より識別される命令について想定したテスト項目をテス
ト可能とするために必要なデータ形式に当てはまる乱数
データを該命令に適合した乱数データとして出力する。
The processing flow is as follows.
3, the decoder 1405 determines whether or not the random number data generator should output random number data, and if it should, outputs random number data corresponding to the instruction information. And a decoder that outputs a random number data corresponding to the instruction information to the selector 1404.
One random number generator 1403 is instructed to output random number data. Next, the random number generator receiving the instruction outputs the random number data to the selector 1404. Next, the selector 14
04 outputs random number data output from the random number generator designated by the decoder 1405 as random number data suitable for the command information signal 134. According to the random number data generator of this embodiment, random number data corresponding to the data format necessary for enabling a test item assumed for the command identified by the command information in response to the command information signal 134 to be applied to the command Is output as random number data conforming to.

【0040】命令情報信号に適合した乱数データを出力
する該乱数生成器は、LFSRと該LFSRの出力を入
力とする組み合わせ回路を用いて容易に実現できる。た
とえば、ある命令aのテストを行うためのデータとし
て、ビットデータが固定されている部分が必要である場
合は、LFSRの出力をマスクする回路を付加すればよ
い。具体例として、図1の実施例のプロセッサにおける
ロード命令を示す。ロード命令LOAD R(S1),R
(D)は、S1で指示されるレジスタのデータをアドレス
とするメモリ上のデータをDで指示するレジスタに転送
する命令である。該命令において、該アドレスをランダ
ムに変化させて命令を実行するテストを行うために、S
1で指示されるレジスタのデータに代わって乱数データ
生成器が出力するデータを利用する場合、アドレス空間
が24ビットに制限されているため、乱数データ生成器
が出力するデータも24ビットで表現される必要があ
る。このロード命令に適合する乱数データを出力する該
乱数生成器は図18に示す。乱数生成器は、32ビット
の疑似乱数を出力するLFSR1902と8ビット論理積演算を
行う組み合わせ論理回路1903で構成される。
The random number generator that outputs random number data conforming to the command information signal can be easily realized by using an LFSR and a combinational circuit that receives the output of the LFSR as an input. For example, if a portion where bit data is fixed is required as data for testing a certain instruction a, a circuit for masking the output of the LFSR may be added. As a specific example, a load instruction in the processor of the embodiment of FIG. 1 is shown. Load instruction LOAD R (S1), R
(D) is an instruction to transfer data on the memory whose address is the data of the register designated by S1 to the register designated by D. In order to perform a test for executing the instruction by changing the address at random in the instruction,
When the data output by the random number data generator is used instead of the data of the register designated by 1, the data output by the random number data generator is also expressed by 24 bits because the address space is limited to 24 bits. Need to be The random number generator that outputs random number data conforming to the load instruction is shown in FIG. The random number generator includes an LFSR 1902 that outputs a 32-bit pseudo-random number and a combinational logic circuit 1903 that performs an 8-bit AND operation.

【0041】処理フローは、まずデコーダ1405から
送られる動作指示信号1901を入力するとLFSRは
32ビット疑似乱数パターンを出力する。次に該32ビ
ット疑似乱数パターンの上位8ビットの信号が論理積演
算回路1903に送られ、該演算回路1903は8ビッ
トの全てが0である信号と論理積演算を行い、8ビット
全てが0となるデータ1905を出力する。最後にデー
タ1905と32ビット疑似乱数パターンの下位24ビ
ットデータ1904をあわせたデータをロード命令に適
合した32ビットデータ1906として出力する。
In the processing flow, when the operation instruction signal 1901 sent from the decoder 1405 is input, the LFSR outputs a 32-bit pseudo random number pattern. Next, a signal of the upper 8 bits of the 32-bit pseudo-random number pattern is sent to an AND operation circuit 1903, and the operation circuit 1903 performs an AND operation with a signal in which all 8 bits are 0, and all 8 bits are 0. Is output. Finally, data obtained by combining the data 1905 and the lower 24-bit data 1904 of the 32-bit pseudo random number pattern is output as 32-bit data 1906 suitable for the load instruction.

【0042】また、ある命令bについて想定したテスト
項目をテストするために必要なデータ形式を有する命令
bに適合したデータとして、ビット毎に0と1の生起確
率を調節したデータが必要な場合、LFSRの複数ビッ
トの出力の論理和を出力とすれば1の生起確率は上が
り、論理積を出力とすれば0の生起確率が上がることを
利用して組み合わせ回路を設計して乱数生成器を構成で
きる。このほか、命令cに適合したデータとしてビット
パターンの集合が用意されていて、その中からランダム
に選択されたパターンを命令cに適合したデータとして
テストに用いる場合は、ビットパターンを保存したメモ
リとLFSRを用い、LFSRの出力をメモリのデータ
読み出しアドレス生成に使用することで実現できる。
Further, in the case where data in which the occurrence probabilities of 0 and 1 are adjusted for each bit as data conforming to the instruction b having a data format necessary for testing a test item assumed for a certain instruction b is required, Designing a combinational circuit based on the fact that the output probability of 1 is increased if the logical sum of the outputs of a plurality of bits of the LFSR is output, and that the output probability of 0 is increased if the output is the logical product, to construct a random number generator it can. In addition, a set of bit patterns is prepared as data conforming to the instruction c, and when a pattern selected at random from the set is used as the data conforming to the instruction c, a memory storing the bit pattern is used. This can be realized by using the LFSR and using the output of the LFSR to generate a data read address of the memory.

【0043】図1で用いられる乱数データ生成器の別の
実施例を図17に示す。
FIG. 17 shows another embodiment of the random number data generator used in FIG.

【0044】乱数データ生成器は命令情報信号134を
入力し、該乱数データ生成器が乱数データを出力すべき
か否かを判定し、乱数データを出力すべき場合は、LFSR
1807に対して疑似乱数データの出力を指示する信号18
09を送る機能と該命令情報に適合した乱数データを選
択するための情報1808をセレクタ1804に送る機
能とを有するデコーダ1805と、32ビット疑似乱数
データを出力するLFSR1807と、該LFSRの出力した3
2ビットデータを命令情報信号134により識別される
命令に適合した乱数データとなるように変更してセレク
タ1804へ出力する命令適合化手段1801〜180
3と、選択情報1808に基づいて、該命令適合化手段
の出力から、該命令情報に適合した乱数データを選択し
出力するセレクタ1804とで構成される。
The random number data generator receives the command information signal 134, determines whether or not the random number data generator should output random number data. If the random number data should be output, the LFSR
Signal 18 for instructing 1807 to output pseudo random number data
09, a function of sending information 1808 for selecting random number data suitable for the instruction information to the selector 1804, an LFSR 1807 for outputting 32-bit pseudo-random number data,
Instruction adapting means 1801 to 180 for changing 2-bit data to random number data adapted to the instruction identified by the instruction information signal 134 and outputting to the selector 1804
3 and a selector 1804 for selecting and outputting random number data conforming to the instruction information from the output of the instruction adaptation means based on the selection information 1808.

【0045】処理のフローは、まず乱数命令生成手段1
23から出力される命令情報信号134を入力するとデ
コーダ1805は該乱数データ生成器が乱数データを出
力すべきか否かを判定し、乱数データを出力すべき場合
は、命令情報に対応した乱数データを出力する命令適合
化手段を選択する情報1808をセレクタ1804へ出
力し、また該デコーダはLFSR1807に対して疑似乱数デー
タの出力を指示する信号1809を送る。次に指示を受
けたLFSR1807は疑似乱数データを命令適合化手段180
1〜1803へ出力する。命令適合化手段は、該LFS
Rから得た疑似乱数データを命令に適合した疑似乱数デ
ータとなるように変更し、セレクタ1804へ出力す
る。次にセレクタ1804は、選択情報1808に基づ
き、命令適合化手段の出力する疑似乱数データから命令
情報信号134に適合した疑似乱数データを選択し、命
令情報信号134によって識別される命令に適合した乱
数データ1806として出力する。
The processing flow is as follows.
Upon input of the command information signal 134 output from 23, the decoder 1805 determines whether or not the random number data generator should output random number data, and if it should output random number data, it outputs random number data corresponding to the command information. Information 1808 for selecting an instruction adaptation unit to be output is output to the selector 1804, and the decoder sends a signal 1809 to the LFSR 1807 to output pseudo-random number data. Next, the LFSR 1807 receiving the instruction converts the pseudo-random number data into the instruction matching means 180.
1 to 1803. The instruction adaptation means includes the LFS
The pseudo random number data obtained from R is changed to be pseudo random number data suitable for the instruction, and is output to the selector 1804. Next, the selector 1804 selects, based on the selection information 1808, pseudo-random data matched with the instruction information signal 134 from the pseudo-random data output by the instruction adaptation unit, and a random number matched with the instruction identified by the instruction information signal 134. The data is output as data 1806.

【0046】本実施例における命令適合化手段の具体例
として、図1の実施例のプロセッサにおけるロード命令
を示す。ロード命令LOAD R(S1),R(D)は、
S1で指示されるレジスタのデータをアドレスとするメ
モリ上のデータをDで指示するレジスタに転送する命令
である。該命令において、該アドレスをランダムに変化
させて命令を実行するテストを行うために、S1で指示
されるレジスタのデータに代わって乱数データ生成器が
出力するデータを利用する場合、アドレス空間が24ビ
ットに制限されているため、乱数データ生成器が出力す
るデータも24ビットで表現される必要がある。LFSR18
07の出力する疑似乱数データを該ロード命令に適合する
ように変更する命令適合化手段を図19に示す。命令適
合化手段は、8ビット論理積演算を行う組み合わせ論理
回路2001と24ビットの信号を何の変更も加えるそ
のまま出力するスルー回路2002で構成される。
As a specific example of the instruction adapting means in this embodiment, a load instruction in the processor of the embodiment in FIG. 1 is shown. The load instructions LOAD R (S1) and R (D) are
This is an instruction to transfer data on the memory whose address is the data of the register designated by S1 to the register designated by D. In the case of using the data output by the random number data generator in place of the data of the register designated by S1 in order to perform a test for executing the instruction by changing the address at random in the instruction, the address space is 24 bytes. Since the number of bits is limited, the data output from the random number data generator must also be represented by 24 bits. LFSR18
FIG. 19 shows instruction adaptation means for changing the pseudo-random number data output from 07 so as to conform to the load instruction. The instruction adapting means includes a combinational logic circuit 2001 for performing an 8-bit AND operation and a through circuit 2002 for outputting a 24-bit signal as it is without any change.

【0047】図14は、図1の実施例におけるレジスタ
ファイルの詳細な実施例を示すものである。レジスタフ
ァイルは、2つのリードポート、1つの書き込みポート
を持ち、データを保存する32本のレジスタと、テスト
モード信号によって、レジスタの出力信号の代わりに乱
数データ生成器の出力信号に切り替えてデータバスへ出
力する出力セレクタ1500及び1501と、応答解析
器として32ビットデータを取り込むMISR1505と、バス
120から入力されるレジスタへの書き込みデータをテ
ストモード信号によってMISRへ出力する入力切換器
で構成される。通常動作時においては、バス120から
入力される書き込みデータは、命令で指示されるレジス
タへ格納される。また、命令により選択されたレジスタ
のデータは、バス118及びバス119へ出力される。
セルフテスト動作においては、バス120から入力され
る書き込みデータは、入力切換器によりMISR1505へ送ら
れ、該MISRに取り込まれる。また、命令により選択
されたレジスタのデータは、出力セレクタによって切り
替えられ、乱数データ生成器1503と1504の出力
データが代わりにバス118及び119へ出力される。
FIG. 14 shows a detailed embodiment of the register file in the embodiment of FIG. The register file has two read ports, one write port, and 32 registers for storing data. The test mode signal switches the output signal of the register to the output signal of the random number data generator and outputs the data bus. , Output selectors 1500 and 1501, which output 32-bit data as a response analyzer, and an input switch which outputs write data to a register input from the bus 120 to the MISR by a test mode signal. In a normal operation, write data input from the bus 120 is stored in a register specified by an instruction. The data of the register selected by the instruction is output to the bus 118 and the bus 119.
In the self-test operation, write data input from the bus 120 is sent to the MISR 1505 by the input switch, and is taken into the MISR. The data of the register selected by the instruction is switched by the output selector, and the output data of the random number data generators 1503 and 1504 are output to the buses 118 and 119 instead.

【0048】図1の実施例において、テストモード信号
がセルフテストモードを指示する場合に、シーケンサ1
04内の1つ以上の記憶素子に代わって乱数データ出力
手段が信号を出力する構成の実施例を図15に示す。シ
ーケンサは順序回路であり、組み合わせ回路部1601
と(i個)の記憶素子1604から1606で構成され
る。テストモード信号133がセルフテストを指示する
場合は、セレクタ1602及び1603が記憶素子の160
5及び1606の代わりに乱数データ生成器1609の
出力信号1607及び1608を出力する。乱数データ
生成器は図8に示したLFSRの出力から2ビットを接
続すればよい。本実施例では、2つの記憶素子をセレク
タによる切り替えの対象としているが、これに制約され
るわけではなく、一つ以上の記憶素子を対象とする構成
が可能である。本実施例の構成を導入することによっ
て、乱数命令生成生成手段が分岐命令以外を発生した場
合でもプログラムカウンタのデータに多様性を持たせた
テストが可能となる。
In the embodiment of FIG. 1, when the test mode signal indicates the self-test mode, the sequencer 1
FIG. 15 shows an embodiment of a configuration in which the random number data output means outputs a signal instead of one or more storage elements in 04. The sequencer is a sequential circuit, and the combinational circuit unit 1601
And (i) storage elements 1604 to 1606. When the test mode signal 133 indicates a self-test, the selectors 1602 and 1603 set the memory element 160
Instead of 5 and 1606, output signals 1607 and 1608 of the random number data generator 1609 are output. The random number data generator may connect two bits from the output of the LFSR shown in FIG. In the present embodiment, two storage elements are targeted for switching by the selector. However, the present invention is not limited to this, and a configuration targeting one or more storage elements is possible. By introducing the configuration of the present embodiment, even when the random number instruction generation / generation unit generates a command other than a branch instruction, it is possible to perform a test in which the data of the program counter has diversity.

【0049】図16は、図1の実施例中のMISRの構
成を示したものである。MISRは、BIST機能にお
いて応答解析器として一般に用いられており、LFSR
の各ビットに排他的論理和を用いて信号を入力するよう
に構成される。171はDフリップフロップ、1700
から1732はデータ入力信号線で33ビット構成とな
っており、取り込むデータに必要な信号をデータ入力信
号線に接続する。データの取り込みはシフト動作を行う
際に各DFFの出力と取り込むデータの排他的論理和を
各DFFに取り込むことにより行われる。このデータの
取り込みを伴うシフト動作を繰り返し、取り込んだデー
タの圧縮を行う。
FIG. 16 shows the configuration of the MISR in the embodiment of FIG. MISR is generally used as a response analyzer in the BIST function, and LFSR
Is configured to input a signal using exclusive OR for each bit of. 171 is a D flip-flop, 1700
Reference numerals 1732 to 1732 denote data input signal lines each having a 33-bit configuration, and connect signals necessary for data to be captured to the data input signal lines. The data is fetched by taking the exclusive OR of the output of each DFF and the fetched data into each DFF when performing the shift operation. The shift operation accompanying the data fetch is repeated to compress the fetched data.

【0050】本発明によれば、テスト用命令をランダム
に発生させる機能を設けることで、多くの命令の出現順
序の組み合わせでテストが行えるようになる。また、乱
数命令生成手段の出力する命令情報により、実行される
命令に適合した乱数データ作成することができるため、
より効率のよいテストが可能となる。これにより、高い
故障検出率が達成可能となる。また、乱数命令生成手段
や乱数データ出力手段をハードウェアで実現する事によ
り高速なテストが可能となる。
According to the present invention, by providing a function of randomly generating test instructions, a test can be performed in a combination of the order of appearance of many instructions. Also, random number data suitable for the command to be executed can be created by the command information output from the random number command generation means,
More efficient testing becomes possible. As a result, a high failure detection rate can be achieved. In addition, a high-speed test can be performed by realizing the random number instruction generation unit and the random number data output unit by hardware.

【0051】[0051]

【発明の効果】本発明によれば、高い故障検出率を達成
することができると共に、高速なテストが可能となる。
According to the present invention, a high failure detection rate can be achieved and a high-speed test can be performed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施例を示すプロセッサの構成図であ
る。
FIG. 1 is a configuration diagram of a processor showing an embodiment of the present invention.

【図2】BISTの従来技術の構成図である。FIG. 2 is a configuration diagram of a conventional BIST.

【図3】図1のプロセッサの命令を示す図である。FIG. 3 is a diagram showing instructions of the processor of FIG. 1;

【図4】図1のプロセッサの命令形式を示す図である。FIG. 4 is a diagram showing an instruction format of the processor of FIG. 1;

【図5】図1のプロセッサの命令形式の詳細を示す図で
ある。
FIG. 5 is a diagram showing details of an instruction format of the processor of FIG. 1;

【図6】図1における乱数命令生成手段の実施例を示す
構成図である。
FIG. 6 is a configuration diagram showing an embodiment of a random number instruction generation means in FIG. 1;

【図7】図6における命令保存手段を実現するメモリの
内容を示す図である。
FIG. 7 is a diagram showing the contents of a memory that realizes an instruction storage unit in FIG. 6;

【図8】疑似乱数を発生する線形フィードバックシフト
レジスタ(LFSR)の構成図である。
FIG. 8 is a configuration diagram of a linear feedback shift register (LFSR) that generates a pseudo random number.

【図9】図1における乱数命令生成手段の別の実施例を
示す構成図である。
FIG. 9 is a configuration diagram showing another embodiment of the random number instruction generation means in FIG. 1;

【図10】図9における部分命令保存手段を実現するメ
モリの内容を示す図である。
FIG. 10 is a diagram showing the contents of a memory which realizes the partial instruction storage means in FIG. 9;

【図11】図9における命令補完情報保存手段を実現す
るメモリの内容を示す図である。
FIG. 11 is a diagram showing the contents of a memory that implements the instruction complement information storage means in FIG. 9;

【図12】図9における命令作成手段の詳細な実施例を
示す構成図である。
FIG. 12 is a block diagram showing a detailed embodiment of an instruction creating means in FIG. 9;

【図13】図1における乱数データ生成器の実施例を示
す構成図である。
FIG. 13 is a configuration diagram showing an embodiment of a random number data generator in FIG. 1;

【図14】図1におけるレジスタファイルの実施例を示
す構成図である。
FIG. 14 is a configuration diagram showing an embodiment of a register file in FIG. 1;

【図15】本発明におけるシーケンサの実施例を示す構
成図である。
FIG. 15 is a configuration diagram showing an embodiment of a sequencer according to the present invention.

【図16】多重入力シグネチャレジスタ(MISR)の
構成図である。
FIG. 16 is a configuration diagram of a multiple input signature register (MISR).

【図17】図1における乱数データ生成器の別の実施例
を示す構成図である。
FIG. 17 is a configuration diagram showing another embodiment of the random number data generator in FIG. 1;

【図18】図13における乱数生成器の具体例を表す図
である。
FIG. 18 is a diagram illustrating a specific example of a random number generator in FIG.

【図19】図18における命令適合化手段の具体例を示
す図である。
FIG. 19 is a diagram showing a specific example of the instruction adapting means in FIG. 18;

【符号の説明】[Explanation of symbols]

101…メモリインタフェース、102…プログラムカ
ウンタ(PC)、103…命令キャッシュ、104…シー
ケンサ、105…命令レジスタ、106…デコーダ、1
07…レジスタファイル、108…ALU(Arithmetic
Logical Unit)、109…メモリデータレジスタ(MD
R)、110…メモリアドレスレジスタ(MAR)、1
23…乱数命令生成手段、125…乱数データ生成器、
126,127,128…多重入力シグネチャレジスタ
(MISR)、129,130,131,132…セレ
クタ、133…テストモード信号、134…命令情報信
号。
101: memory interface, 102: program counter (PC), 103: instruction cache, 104: sequencer, 105: instruction register, 106: decoder, 1
07: Register file, 108: ALU (Arithmetic
Logical Unit) 109 Memory data register (MD
R), 110 ... memory address register (MAR), 1
23: random number command generation means, 125: random number data generator
126, 127, 128: Multiple input signature register (MISR); 129, 130, 131, 132: Selector; 133: Test mode signal; 134: Command information signal.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 畠山 一実 茨城県日立市大みか町七丁目1番1号 株 式会社日立製作所日立研究所内 (72)発明者 堀田 多加志 茨城県日立市大みか町七丁目1番1号 株 式会社日立製作所日立研究所内 Fターム(参考) 5B048 AA20 CC11 DD01 DD06 DD10 DD15 DD16  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Kazumi Hatakeyama 7-1-1, Omikacho, Hitachi City, Ibaraki Prefecture Within Hitachi Research Laboratory, Hitachi, Ltd. (72) Inventor Takashi Hotta 7, Omikamachi, Hitachi City, Ibaraki Prefecture No. 1-1 F term in Hitachi Research Laboratory, Hitachi, Ltd. F-term (reference) 5B048 AA20 CC11 DD01 DD06 DD10 DD15 DD16

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】実行すべき命令を指示するプログラムカウ
ンタと、 上記プログラムカウンタによって指示された命令を格納
する命令レジスタと、 データが格納されるレジスタと、 上記命令レジスタに格納された命令を読み出し、この読
み出した命令に基づいて上記レジスタに格納されたデー
タを読み出し、演算を実行し上記レジスタに演算結果で
あるデータを格納する演算器と、 外部から入力されるテスト信号に基づいてテスト用命令
をランダムに発生させる乱数命令生成手段とを有するプ
ロセッサ。
1. A program counter for indicating an instruction to be executed, an instruction register for storing an instruction specified by the program counter, a register for storing data, and reading an instruction stored in the instruction register. An arithmetic unit that reads data stored in the register based on the read instruction, executes an operation, and stores data as an operation result in the register, and issues a test instruction based on a test signal input from the outside. A random number instruction generating means for randomly generating the instruction;
【請求項2】請求項1において、上記乱数命令生成手段
は、上記テスト信号に基づいて発生したテスト用命令を
上記命令レジスタに格納するプロセッサ。
2. The processor according to claim 1, wherein said random number instruction generation means stores a test instruction generated based on said test signal in said instruction register.
【請求項3】請求項1において、 上記乱数命令生成手段は、テスト用命令をランダムに発
生させると共に、該命令に適合したデータを上記レジス
タから出力するための信号とを出力するプロセッサ。
3. The processor according to claim 1, wherein said random number instruction generation means generates a test instruction at random and outputs a signal for outputting data adapted to said instruction from said register.
【請求項4】請求項1乃至3において、 上記乱数命令生成手段は、複数の命令を有し、予め設定
された確立に基づいて命令を決定して出力するプロセッ
サ。
4. The processor according to claim 1, wherein said random number command generation means has a plurality of commands, and determines and outputs the command based on a preset probability.
【請求項5】実行すべき命令を指示するプログラムカウ
ンタと、 データが格納される複数のレジスタを有するレジスタフ
ァイルと、 上記プログラムカウンタによって指示された命令に基づ
いて上記レジスタファイルに格納されたデータを読み出
し、演算を実行し上記レジスタに演算結果であるデータ
を格納する演算器と、 外部から入力されるテスト信号に基づいて、 テスト用命令をランダムに発生させる乱数命令生成手段
と、 上記演算器で演算を実行するための乱数データを出力す
る乱数データ出力手段と、 上記乱数データによる演算結果を格納する応答解析器と
を有するプロセッサ。
5. A program counter for designating an instruction to be executed, a register file having a plurality of registers for storing data, and a data stored in the register file based on an instruction designated by the program counter. An arithmetic unit that reads and executes an operation and stores data as an operation result in the register; a random number instruction generation unit that randomly generates a test instruction based on a test signal input from the outside; A processor comprising: random number data output means for outputting random number data for executing a calculation; and a response analyzer for storing a calculation result based on the random number data.
【請求項6】請求項5において、上記応答解析器は上記
テスト信号に基づいて上記プログラムカウンタの出力信
号を取り込むプロセッサ。
6. The processor according to claim 5, wherein said response analyzer captures an output signal of said program counter based on said test signal.
【請求項7】請求項1乃至6のいずれか1項において、 上記乱数命令生成手段は、プロセッサが実行する命令を
保存する命令保存手段と、該命令保存手段から命令をラ
ンダムに選択する命令選択手段とを有するプロセッサ。
7. The instruction storage device according to claim 1, wherein the random number instruction generation unit stores an instruction to be executed by a processor, and an instruction selection unit that randomly selects an instruction from the instruction storage unit. And a processor.
【請求項8】請求項1乃至7のいずれか1項において、
上記乱数命令生成手段は、実行する命令の一部分または
全体を保存する部分命令保存手段と、上記部分命令保存
手段が保存している上記部分命令に対応して、該部分命
令を実行可能な命令とするために欠けている部分を指示
する情報を格納する命令補完情報保存手段と、上記部分
命令保存手段から部分命令と命令補完情報保存手段から
上記部分命令に対応する命令補完情報とをランダムに選
択する命令選択手段と、上記選択した部分命令と命令補
完情報に基づき乱数データを補ってプロセッサが実行す
る命令を作成する命令作成手段とを有するプロセッサ。
8. The method according to claim 1, wherein
The random number command generation unit includes a partial command storage unit that stores a part or the entirety of an instruction to be executed, and a command that can execute the partial command corresponding to the partial command stored by the partial command storage unit. Command information storing means for storing information designating a missing part, and randomly selecting the partial command from the partial command storing means and the command complementary information corresponding to the partial command from the command complementary information storing means. And a command generating means for generating an instruction to be executed by the processor by supplementing random number data based on the selected partial instruction and the instruction complement information.
【請求項9】プログラム又はデータを格納するメモリ
と、 上記メモリと接続され、上記メモリに記憶されたデータ
の読み出し又は上記メモリへデータの書き込みを行うプ
ロセッサとを有する情報処理システムであって、 上記プロセッサは、 実行すべき命令を出力する命令レジスタと、 データを格納する複数のレジスタと、 上記メモリへのアクセスを行うためのアドレスを格納す
るアドレスレジスタと、 上記メモリへ格納するためのデータ又は上記メモリから
読み出したデータを格納するデータレジスタと、 上記命令レジスタから出力された命令に従って、複数の
上記レジスタ又は上記データレジスタに格納されたデー
タの演算を実行する演算器と、 外部からの信号に基づいて、 ランダムに命令を発生し、上記命令レジスタに格納する
命令生成器と、 上記演算器は上記命令生成器から出力される命令に従っ
て実行され、上記データレジスタに格納されたデータを
取り込む応答解析器とを有する情報処理システム。
9. An information processing system comprising: a memory for storing a program or data; and a processor connected to the memory and for reading data stored in the memory or writing data to the memory. The processor includes: an instruction register that outputs an instruction to be executed; a plurality of registers that store data; an address register that stores an address for accessing the memory; and data that is stored in the memory. A data register for storing data read from the memory, an arithmetic unit for performing an arithmetic operation on the data stored in the plurality of registers or the data register according to an instruction output from the instruction register, and Command to randomly generate an instruction and store it in the instruction register. The information processing system comprising a generator, the computing unit is performed in accordance with the instruction output from the instruction generator and a response analyzer captures the data stored in the data register.
JP11097281A 1999-04-05 1999-04-05 Processor with bist function Pending JP2000293394A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP11097281A JP2000293394A (en) 1999-04-05 1999-04-05 Processor with bist function
SG200001751A SG86385A1 (en) 1999-04-05 2000-03-28 Processor with bist function
TW089106118A TW472189B (en) 1999-04-05 2000-03-31 Processor with best function
MYPI20001397A MY132879A (en) 1999-04-05 2000-04-04 Processor with bist function
CN00104970A CN1118024C (en) 1999-04-05 2000-04-05 Processor with built-in self-checking function
KR1020000017842A KR20010006956A (en) 1999-04-05 2000-04-06 Processor with bist function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11097281A JP2000293394A (en) 1999-04-05 1999-04-05 Processor with bist function

Publications (1)

Publication Number Publication Date
JP2000293394A true JP2000293394A (en) 2000-10-20

Family

ID=14188141

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11097281A Pending JP2000293394A (en) 1999-04-05 1999-04-05 Processor with bist function

Country Status (6)

Country Link
JP (1) JP2000293394A (en)
KR (1) KR20010006956A (en)
CN (1) CN1118024C (en)
MY (1) MY132879A (en)
SG (1) SG86385A1 (en)
TW (1) TW472189B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461798B (en) * 2014-11-12 2017-08-18 中国航天科技集团公司第九研究院第七七一研究所 A kind of random number verification method instructed for processor ALU
CN105045696B (en) * 2015-09-02 2018-08-07 中国航空工业集团公司航空动力控制系统研究所 A kind of CPU detection methods

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB8507613D0 (en) * 1985-03-23 1985-05-01 Int Computers Ltd Testing digital integrated circuits
US4903266A (en) * 1988-04-29 1990-02-20 International Business Machines Corporation Memory self-test
JP2806210B2 (en) * 1993-06-15 1998-09-30 富士通株式会社 Microprocessor
DE19911939C2 (en) * 1999-03-17 2001-03-22 Siemens Ag Procedure for the built-in self-test of an electronic circuit

Also Published As

Publication number Publication date
KR20010006956A (en) 2001-01-26
MY132879A (en) 2007-10-31
SG86385A1 (en) 2002-02-19
CN1269546A (en) 2000-10-11
TW472189B (en) 2002-01-11
CN1118024C (en) 2003-08-13

Similar Documents

Publication Publication Date Title
JP4511461B2 (en) Processing action masking in data processing system
JPH05257710A (en) System for giving internal execution parameter and array for verifying instruction to be executed by processor
US5761489A (en) Method and apparatus for scan testing with extended test vector storage in a multi-purpose memory system
US6611909B1 (en) Method and apparatus for dynamically translating program instructions to microcode instructions
US8429380B2 (en) Disabling redundant subfunctional units receiving same input value and outputting same output value for the disabled units in SIMD processor
JP2986104B2 (en) Information processing equipment self-test circuit
US7143271B2 (en) Automatic register backup/restore system and method
US7904288B1 (en) Hardware emulator having a variable input emulation group
US6651201B1 (en) Programmable memory built-in self-test combining microcode and finite state machine self-test
US6092219A (en) Method for use of bus parking states to communicate diagnostic information
EP0772827B1 (en) Pipeline microprocessor test apparatus
US5261116A (en) Programmable, expandable controller with flexible I/O
WO1996037838A9 (en) Pipeline microprocessor test method and apparatus
US6553478B1 (en) Computer memory access
JP2000293394A (en) Processor with bist function
US6311298B1 (en) Mechanism to simplify built-in self test of a control store unit
US5179716A (en) Programmable expandable controller with flexible I/O
JP2806075B2 (en) Microcomputer
US7908465B1 (en) Hardware emulator having a selectable write-back processor unit
US6112316A (en) System for use of bus parking states to communicate diagnostic information
US20020004877A1 (en) Method and system for updating user memory in emulator systems
JP2872117B2 (en) Microprocessor
KR960016401B1 (en) Page selecting circuit of register pages using register page pointer
US8468009B1 (en) Hardware emulation unit having a shadow processor
JPS6031641A (en) One chip microcomputer