JPH0540703A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH0540703A
JPH0540703A JP3272343A JP27234391A JPH0540703A JP H0540703 A JPH0540703 A JP H0540703A JP 3272343 A JP3272343 A JP 3272343A JP 27234391 A JP27234391 A JP 27234391A JP H0540703 A JPH0540703 A JP H0540703A
Authority
JP
Japan
Prior art keywords
instruction
data
input
signal
register
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
JP3272343A
Other languages
Japanese (ja)
Inventor
Koji Kawamoto
浩司 川本
Kazuyuki Ishikawa
和幸 石川
Tomoaki Fujiyama
等章 藤山
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3272343A priority Critical patent/JPH0540703A/en
Publication of JPH0540703A publication Critical patent/JPH0540703A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To provide a microprocessor which can self-test an instrustion word in an instruction ROM as the arragement of bits and can test incorporated instruction ROM without the need for giving data for a test from outside. CONSTITUTION:The microprocessor is provided with a data compressor 19 or, furthermore, a register 18 storing the expected value of the output of the data compressor 19 and a comparator circuit 38 outputting a result by comparing the expected value with the output of the data compressor 19. An instruction to input the contents of one or plural instruction words in instruction ROM 11 to the data compressor 19 and to make the data compressor compress it when the data compressor can be used is stored in instruction ROM 11. Furthermore, the microprocessor is provided with a circuit 37 which executes a series of processing inputting the contents of the instruction words in instruction ROM 11 to the data compressor 19 and making the data compressor 19 compress it, and the series of processing outputting a compared result with the expecting value through by using the above-mentioned instruction.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は命令ROM を内蔵したマイ
クロプロセッサに関し、更に詳述すれば、命令ROM 中に
記憶されている命令ワードをビットの並びとしてセルフ
テストして自己診断を行い、更に通常は一般的な命令ワ
ードを特定のモード下においてセルフテストに使用する
ことにより、命令ROM の容量を有効利用し得ることを可
能としたマイクロプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor having a built-in instruction ROM. More specifically, the instruction word stored in the instruction ROM is self-tested as a sequence of bits for self-diagnosis. The present invention relates to a microprocessor capable of effectively utilizing the capacity of an instruction ROM by using a general instruction word for a self test under a specific mode.

【0002】[0002]

【従来の技術】従来のセルフテスト機能を有するマイク
ロプロセッサとして、本願出願人は先に、特開平2-1769
43号公報に開示されているマイクロプロセッサの発明に
おいて、命令ROM 以外のたとえばレジスタ, RAM等の記
憶手段及び演算器等のセルフテスト機能を有するマイク
ロプロセッサを提案している。
2. Description of the Related Art As a conventional microprocessor having a self-test function, the applicant of the present application has previously disclosed Japanese Patent Laid-Open No. 2-1769.
In the invention of the microprocessor disclosed in Japanese Patent Laid-Open No. 43, a microprocessor having a self-test function of a storage means other than the instruction ROM, for example, a register, a RAM, etc., and an arithmetic unit, etc. is proposed.

【0003】以下、従来例としての上述の特開平2-1769
43号公報に開示されている発明であるマイクロプロセッ
サについて、その構成例を示す図5のブロック図を参照
して説明する。
Hereinafter, the above-mentioned Japanese Patent Laid-Open No. 2-1769 as a conventional example.
The microprocessor which is the invention disclosed in Japanese Patent No. 43 will be described with reference to the block diagram of FIG.

【0004】図5において、参照符号1はアドレス演算
部(AAU) であり、詳細は後述するが入力端は後述するP
バス23に、出力端は内蔵データRAM2にそれぞれ接続され
ている。内蔵データRAM2はビット長24, ワード長512(24
ビット×512ワード) の記憶容量を有する2ポートデー
タRAM であり、データ読出しのためのポートを2系統備
えている他、上述のアドレス演算部(AAU)1及び後述する
Dバス24と接続されている。
In FIG. 5, reference numeral 1 is an address computing unit (AAU), the input end of which will be described later, but the input end will be described later.
The output end is connected to the bus 23 and the built-in data RAM2. The internal data RAM2 has a bit length of 24 and a word length of 512 (24
It is a 2-port data RAM having a storage capacity of (bits × 512 words), has two ports for reading data, and is connected to the above-mentioned address arithmetic unit (AAU) 1 and the D bus 24 described later. There is.

【0005】参照符号3は第1の演算部入力レジスタ(R
0), 4は第2の演算部入力レジスタ(R1)であり、内蔵デ
ータRAM2の各データ読出しポートがそれぞれの入力端に
接続されている他、それらの入出力端はDバス24とも接
続されており、更にそれらの出力端は乗算器(FMPL)5及
び演算器(FALU)7 の入力端とも接続されている。乗算器
(FMPL)5 は詳細は後述するが、第1の演算部入力レジス
タ(R0)3及び第2の演算部入力レジスタ(R1)4からの出
力信号を入力して乗算し、乗算器出力レジスタ(MR)6へ
出力する。
Reference numeral 3 is a first arithmetic unit input register (R
0) and 4 are second arithmetic unit input registers (R1), each data read port of the built-in data RAM2 is connected to each input terminal, and those input / output terminals are also connected to the D bus 24. Further, their output terminals are also connected to the input terminals of the multiplier (FMPL) 5 and the arithmetic unit (FALU) 7. Multiplier
(FMPL) 5 will be described in detail later, but the output signals from the first arithmetic unit input register (R0) 3 and the second arithmetic unit input register (R1) 4 are input and multiplied to obtain the multiplier output register ( Output to MR) 6.

【0006】乗算器出力レジスタ(MR)6 は乗算器(FMPL)
5 の乗算結果を保持し、演算器(FALU)7 へ出力する。演
算器(FALU)7 は詳細は後述するが、アキュムレータ(AC
C)8, 第1の演算部入力レジスタ(R0)3, 第2の演算部
入力レジスタ(R1)4及び乗算器出力レジスタ(MR)6から
の出力信号が入力される。アキュムレータ(ACC)8は主と
して演算器(FALU)7による演算結果を保持する他、Dバ
ス24とも接続されている。
The multiplier output register (MR) 6 is a multiplier (FMPL)
Holds the result of multiplication by 5 and outputs it to the computing unit (FALU) 7. The arithmetic unit (FALU) 7 will be described later in detail, but the accumulator (AC
The output signals from C) 8, the first arithmetic unit input register (R0) 3, the second arithmetic unit input register (R1) 4 and the multiplier output register (MR) 6 are input. The accumulator (ACC) 8 mainly holds the calculation result by the arithmetic unit (FALU) 7, and is also connected to the D bus 24.

【0007】参照符号9は8レベルのスタックであり、
プログラムカウンタ(PC)10の値 (プログラムカウンタ
値) を必要に応じて保持する。プログラムカウンタ(PC)
10は、次にフェッチすべき命令の命令メモリ、具体的に
は後述する内蔵命令ROM 11及び内蔵共有RAM(CRAM)12 に
おけるアドレスを順次計数する。このプログラムカウン
タ(PC)10からの出力信号は内蔵命令ROM 11及び内蔵共有
RAM(CRAM)12 に与えられている。
Reference numeral 9 is an 8-level stack,
Holds the value of the program counter (PC) 10 (program counter value) as necessary. Program counter (PC)
Reference numeral 10 sequentially counts addresses in an instruction memory of an instruction to be fetched next, specifically, an internal instruction ROM 11 and an internal shared RAM (CRAM) 12 described later. The output signal from this program counter (PC) 10 is built-in instruction ROM 11 and built-in shared
It is given to RAM (CRAM) 12.

【0008】内蔵命令ROM 11は32ビット×4kワードの容
量であり、プログラムカウンタ(PC)10から与えられるプ
ログラムカウンタ値に対応するアドレスに記憶している
命令ワードを出力する。
The built-in instruction ROM 11 has a capacity of 32 bits × 4 k words, and outputs the instruction word stored in the address corresponding to the program counter value given from the program counter (PC) 10.

【0009】内蔵共有RAM(CRAM)12 は命令とデータとに
共通なメモリであり、32ビット×64ワードの容量を有し
ている。この内蔵共有RAM(CRAM)12 に格納されている値
はデータワードとしても命令ワードとしても使用するこ
とが可能である。
A built-in shared RAM (CRAM) 12 is a memory common to instructions and data and has a capacity of 32 bits × 64 words. The value stored in the internal shared RAM (CRAM) 12 can be used as a data word or an instruction word.

【0010】内蔵共有RAM(CRAM)12 に格納されている値
が命令ワードとして使用される場合は、プログラムカウ
ンタ(PC)10から与えられるプログラムカウンタ値に対応
するアドレスに記憶されている命令ワードが出力される
か、または命令レジスタ(IR)13の値がそのアドレスに記
憶される。
When the value stored in the internal shared RAM (CRAM) 12 is used as an instruction word, the instruction word stored at the address corresponding to the program counter value given from the program counter (PC) 10 is It is output or the value of the instruction register (IR) 13 is stored at that address.

【0011】一方、内蔵共有RAM(CRAM)12 に格納されて
いる値がデータワードとして使用される場合は、アドレ
ス演算部(AAU)1またはアドレス入出力端子34から与えら
れるアドレス値に対応するアドレスに記憶されているデ
ータワードの上位16ビットまたは下位16ビットがIバス
35を通じてデータレジスタ(DR)18またはデータ入出力端
子30へ出力されるか、またはデータレジスタ(DR)18また
はデータ入出力端子30からIバス35を通じてデータワー
ドがそのアドレスの上位16ビットまたは下位16ビットに
記憶される。
On the other hand, when the value stored in the internal shared RAM (CRAM) 12 is used as a data word, the address corresponding to the address value given from the address arithmetic unit (AAU) 1 or the address input / output terminal 34. Upper 16 bits or lower 16 bits of the data word stored in the I bus
35 is output to the data register (DR) 18 or the data input / output terminal 30 through 35, or the data word is output from the data register (DR) 18 or the data input / output terminal 30 through the I bus 35 to the upper 16 bits or the lower 16 bits of the address. Stored in bits.

【0012】この際、上位16ビットかまたは下位16ビッ
トかの区別は後述するUWI(Upper Word of Instruction)
信号出力端子36からの出力信号の論理レベルで区別可能
である他、フラグレジスタ(FR)32の特定ビットに反映さ
れるため、後述する命令セット中のシーケンス命令によ
りプログラムで判定可能である。なお、この UWI信号出
力端子36から出力される UWI信号は、図示されていない
が、内蔵共有RAM(CRAM)12 の制御部で発生される。ま
た、 UWI信号出力端子36及びフラグレジスタ(FR)32の特
定ビットの論理値は内蔵共有RAM(CRAM)12 に対する1回
のアクセスの都度反転する。
At this time, a distinction between upper 16 bits and lower 16 bits is made by a UWI (Upper Word of Instruction) described later.
In addition to being distinguishable by the logical level of the output signal from the signal output terminal 36, since it is reflected in a specific bit of the flag register (FR) 32, it can be determined by a program by a sequence instruction in the instruction set described later. The UWI signal output from the UWI signal output terminal 36 is generated by the control unit of the built-in shared RAM (CRAM) 12, though not shown. Further, the logical values of the specific bits of the UWI signal output terminal 36 and the flag register (FR) 32 are inverted each time the built-in shared RAM (CRAM) 12 is accessed once.

【0013】命令レジスタ(IR)13は、内蔵命令ROM 11又
は内蔵共有RAM(CRAM)12 から読出された次に実行される
べき命令ワードを保持する。命令レジスタ(IR)13からの
出力信号は命令デコーダ14及びPバス23及び内蔵共有RA
M(CRAM)12 へ与えられている。命令デコーダ14は、命令
レジスタ(IR)13が保持している命令ワードをデコード
し、そのデコード結果に基づいてこのマイクロプロセッ
サ各部の動作を制御する。
The instruction register (IR) 13 holds an instruction word to be executed next, which is read from the internal instruction ROM 11 or the internal shared RAM (CRAM) 12. The output signal from the instruction register (IR) 13 is the instruction decoder 14, the P bus 23 and the built-in shared RA.
It is given to M (CRAM) 12. The instruction decoder 14 decodes the instruction word held by the instruction register (IR) 13 and controls the operation of each part of the microprocessor based on the decoding result.

【0014】参照符号15はこのマイクロプロセッサ内部
の動作モードを設定するコントロールレジスタであり、
外部からリセット信号が与えられるた場合にリセット処
理により初期化される。このコントロールレジスタ15は
Pバス23から即値が入力される他、Dバス24を介してデ
ータの入出力が可能である。参照符号16はダイレクトメ
モリアクセスコントローラ(DMA), 17はシリアル I/Oイ
ンタフェイス(SI/O),18はデータレジスタ(DR)である。
また、参照符号19はシグネチャレジスタであり、疑似乱
数発生及びデータ圧縮を行う。
Reference numeral 15 is a control register for setting an operation mode inside the microprocessor.
When a reset signal is given from the outside, it is initialized by the reset process. The control register 15 receives an immediate value from the P bus 23, and can also input / output data via the D bus 24. Reference numeral 16 is a direct memory access controller (DMA), 17 is a serial I / O interface (SI / O), and 18 is a data register (DR).
Further, reference numeral 19 is a signature register, which performs pseudo random number generation and data compression.

【0015】参照符号20は割込みコントローラ, 21はク
ロック/リセット信号発生回路(CLK/RST), 22は外部ク
ロックを分周するクロックプリスケーラ(CPR) である。
参照符号23は命令によりレジスタに即値を入力するPバ
ス、参照符号24は各レジスタ (参照符号3, 4, 8, 15, 1
6, 17, 18, 19, 32)等の間、あるいは内蔵データRAM2及
びプログラムカウンタ(PC)10間でデータの送受を行うD
バス, 25はダイレクトメモリアクセス時にダイレクトメ
モリアクセスコントローラ(DMA)16 により制御されてシ
リアルI/O インタフェイス17と、出力端子30を介して図
示しない外部データメモリとの間でのデータ送受を行う
Sバスである。
Reference numeral 20 is an interrupt controller, 21 is a clock / reset signal generation circuit (CLK / RST), and 22 is a clock prescaler (CPR) for dividing an external clock.
Reference numeral 23 is a P bus for inputting an immediate value to a register by an instruction, and reference numeral 24 is each register (reference numerals 3, 4, 8, 15, 1
6, 17, 18, 19, 32), etc., or between the built-in data RAM 2 and program counter (PC) 10 to send and receive data.
The bus 25 is controlled by the direct memory access controller (DMA) 16 during direct memory access, and performs data transmission / reception between the serial I / O interface 17 and the external data memory (not shown) via the output terminal 30. It's a bus.

【0016】参照符号26は第1割込み信号(INT1)入力端
子,27は第2割込み信号(INT2)入力端子, 28はテストモ
ード設定信号(TEST)入力端子, 29は後述する IIA(Inter
nalInstruction ROM/RAM Access) モード設定信号(IIA)
入力端子、34はマスク不可割込み信号(NMI) 入力端子
である。参照符号30は24ビット長のデータ入出力端子で
あり、前述のデータレジスタ(DR)18, シグネチャレジス
タ19, Dバス24, Sバス25及び後述するIバス35と外部
データメモリ (図示せず) との間でのデータ転送に使用
される。
Reference numeral 26 is a first interrupt signal (INT1) input terminal, 27 is a second interrupt signal (INT2) input terminal, 28 is a test mode setting signal (TEST) input terminal, and 29 is an IIA (Inter) described later.
nalInstruction ROM / RAM Access) Mode setting signal (IIA)
Input terminals, and 34 are non-maskable interrupt signal (NMI) input terminals. Reference numeral 30 is a 24-bit data input / output terminal, which includes the data register (DR) 18, the signature register 19, the D bus 24, the S bus 25, the I bus 35 described later, and an external data memory (not shown). Used for data transfer to and from.

【0017】参照符号31はリセット信号(NRESET)入力端
子であり、このマイクロプロセッサ全体をリセットする
ためのリセット信号(NRESET)の入力に使用される。参照
符号32はフラグレジスタ(FR)であり、演算器(FALU)7 の
演算結果, 各入力端子の論理レベルあるいはこのマイク
ロプロセッサの内部動作モードを示す。このフラグレジ
スタ(FR)32は、上述のリセット信号(NRESET)が入力され
た際のリセット処理により初期化される。
Reference numeral 31 is a reset signal (NRESET) input terminal, which is used to input a reset signal (NRESET) for resetting the entire microprocessor. Reference numeral 32 is a flag register (FR) that indicates the operation result of the operation unit (FALU) 7, the logic level of each input terminal or the internal operation mode of this microprocessor. The flag register (FR) 32 is initialized by the reset process when the above-mentioned reset signal (NRESET) is input.

【0018】参照符号33はクロック信号(CLK) 入力端子
であり、本従来例のマイクロプロセッサはこのクロック
信号入力端子33から入力されるクロック信号(CLK) に同
期して動作する。参照符号34は16ビット長のアドレス入
出力端子であり、図示しない外部データメモリに与えら
れるべきアドレスを出力し、また後述する IIAモードに
おいて内蔵命令ROM 11及び内蔵共有RAM(CRAM)12 のアド
レスを外部から入力して指定する。
Reference numeral 33 is a clock signal (CLK) input terminal, and the microprocessor of this conventional example operates in synchronization with the clock signal (CLK) input from the clock signal input terminal 33. Reference numeral 34 is an address input / output terminal having a 16-bit length, which outputs an address to be given to an external data memory (not shown), and outputs the address of the internal instruction ROM 11 and the internal shared RAM (CRAM) 12 in the IIA mode described later. Input from outside and specify.

【0019】参照符号35は内蔵命令ROM 11または内蔵共
有RAM(CRAM)12 と、データレジスタ(DR)18またはデータ
入出力端子30間でデータを転送する際に使用されるIバ
スであり、16ビットのビット長を有する。参照符号36は
Iバス35により転送されるデータが内蔵命令ROM 11また
は内蔵共有RAM(CRAM)12 の上位16ビットに対するもの
か、あるいは下位16ビットに対するものかを示すUWI(Up
per Word of Instruction)信号出力端子である。
Reference numeral 35 is an I bus used for transferring data between the built-in instruction ROM 11 or the built-in shared RAM (CRAM) 12 and the data register (DR) 18 or the data input / output terminal 30. It has a bit length of bits. Reference numeral 36 indicates UWI (Up) indicating whether the data transferred by the I bus 35 is for the upper 16 bits or the lower 16 bits of the internal instruction ROM 11 or the internal shared RAM (CRAM) 12.
per Word of Instruction) signal output terminal.

【0020】次に、上述の図5に示されている従来のマ
イクロプロセッサの動作について説明する。
Next, the operation of the conventional microprocessor shown in FIG. 5 will be described.

【0021】この従来例のマイクロプロセッサは、命令
ワードのビット長が32ビット、データワードのビット長
が24ビットであり、大きくはアドレス演算部, 演算部,
メモリ部, クロック生成部の各機能ブロックにて構成さ
れている。以下、この従来例のマイクロプロセッサにつ
いてまず各機能ブロックの構成及び動作について順次説
明する。
In this conventional microprocessor, the instruction word has a bit length of 32 bits and the data word has a bit length of 24 bits.
It consists of memory block and clock generator functional blocks. The structure and operation of each functional block of the conventional microprocessor will be sequentially described below.

【0022】アドレス演算部は図5のアドレス演算部(A
AU)1そのものである。このアドレス演算部(AAU)1には所
定の命令により予めアドレスモードが設定されており
(以下、レジデュアル制御と称す)、この設定されたモ
ードに従って内蔵データRAM2,内蔵共有RAM(CRAM)12 あ
るいは図示されていない外部データRAM 等に対するアド
レスを生成する。
The address calculation unit is the address calculation unit (A
AU) 1 itself. The address arithmetic unit (AAU) 1 has an address mode set in advance by a predetermined instruction (hereinafter referred to as residual control). According to the set mode, the internal data RAM 2, the internal shared RAM (CRAM) 12 or An address for an external data RAM (not shown) is generated.

【0023】以下、このアドレス演算部(AAU)1によるア
ドレス生成の動作にについて説明する。レジデュアル制
御に関するレジスタとして、アドレス演算部(AAU)1内に
は内蔵データRAM2に対するアドレス及び内蔵共有RAM(CR
AM)12 あるいは図示されていない外部データRAM に対す
るアドレスの下位9ビットを与えるアドレスレジスタ(A
R0, AR1, AR2),内蔵共有RAM(CRAM)12 あるいは図示され
ていない外部データRAMに対するアドレスの上位7ビッ
トを与えるページレジスタ(PGR),アドレスを生成するた
めの基値を与えるベース値アドレスレジスタ(BA0, BA1,
BA2),アドレスを生成する際の加算値を与えるインクリ
メント値レジスタ(I0, I1, I2), モジュロ値あるいはビ
ットリバース幅を与えるモジュロ値−ビットリバース幅
レジスタ(ML0, ML1, ML2),ループ命令時にベースアドレ
ス値を修飾するためのデルタベース値アドレスレジスタ
(DBA0), ループ命令時にインクリメント値を修飾するた
めのデルタインクリメント値レジスタ(DI0) 等が含まれ
ている。これらの各レジスタは基本的には次に述べるモ
ード命令で値が設定されるが、オペレーション命令によ
る変更も可能なレジスタもある。
The operation of address generation by the address calculation unit (AAU) 1 will be described below. As a register for residual control, the address arithmetic unit (AAU) 1 has an address for the built-in data RAM 2 and a built-in shared RAM (CR
AM) 12 or an address register (A that gives the lower 9 bits of the address to an external data RAM not shown)
R0, AR1, AR2), built-in shared RAM (CRAM) 12 or page register (PGR) that gives the upper 7 bits of the address to an external data RAM (not shown), base value address register that gives the base value for generating the address (BA0, BA1,
BA2), increment value register (I0, I1, I2) that gives the added value when generating the address, modulo value or modulo value that gives the bit reverse width-bit reverse width register (ML0, ML1, ML2), at the time of loop instruction Delta base value address register to qualify the base address value
(DBA0), Delta increment value register (DI0) for modifying the increment value at loop instruction are included. The value of each of these registers is basically set by the mode instruction described below, but there is also a register that can be changed by an operation instruction.

【0024】アドレス演算部(AAU)1はアドレスレジスタ
としてAR0, AR1, AR2 の三つのレジスタを有しており、
それぞれのレジスタは個別のアドレス演算回路により制
御される。そして、内蔵データRAM2の一方のポート0に
対するアドレス及び内蔵共有RAM(CRAM)12 あるいは図示
されていない外部データRAM に対するアドレスの下位9
ビットをアドレスレジスタAR0 またはAR1 により、内蔵
データRAM2の他方のポート1に対するアドレスの指定は
アドレスレジスタAR2 によりそれぞれ行われる。
The address calculation unit (AAU) 1 has three registers AR0, AR1 and AR2 as address registers,
Each register is controlled by an individual address arithmetic circuit. The lower 9 addresses of the address for one port 0 of the built-in data RAM 2 and the built-in shared RAM (CRAM) 12 or the address for the external data RAM not shown.
The bit is designated by the address register AR0 or AR1 and the address for the other port 1 of the built-in data RAM2 is designated by the address register AR2.

【0025】レジスタAR0 に関しては、先に述べたレジ
デュアル制御に関するレジスタの内容に従って、インク
リメント, モジュロ, ビットリバース及びリピートの4
モードによるアドレッシングが可能であり、更にベース
アドレス値, インクリメント値, モジュロ値及びビット
リバース幅をそれぞれ独立に設定することが可能であ
る。
Regarding the register AR0, according to the contents of the register relating to the above-mentioned residual control, it is possible to perform increment, modulo, bit reverse and repeat 4
Addressing by mode is possible, and the base address value, increment value, modulo value, and bit reverse width can be set independently.

【0026】また、レジスタAR1, AR2ではインクリメン
ト, モジュロの2モードによるアドレッシングが可能で
あり、且つレジスタAR0と同様にベースアドレス値, イ
ンクリメント値, モジュロ幅が独立に設定できる。更
に、内蔵データRAM2のポート1については命令ワードに
含まれる即値をアドレスとして用いたダイレクトアドレ
ッシングも可能である。
Further, in the registers AR1 and AR2, addressing in two modes of increment and modulo is possible, and the base address value, increment value, and modulo width can be set independently like the register AR0. Further, for the port 1 of the built-in data RAM2, direct addressing using an immediate value included in the instruction word as an address is also possible.

【0027】次に、演算部の構成について説明する。演
算部は、図5に示されている第1の演算部入力レジスタ
(R0)3及び第2の演算部入力レジスタ(R1)4, 乗算器(F
MPL)5, 乗算器出力レジスタ(MR)6, 演算器(FALU)7及
びアキュムレータ(ACC)8にて構成される。
Next, the structure of the arithmetic unit will be described. The arithmetic unit is the first arithmetic unit input register shown in FIG.
(R0) 3 and second arithmetic unit input register (R1) 4, multiplier (F
It is composed of MPL) 5, multiplier output register (MR) 6, arithmetic unit (FALU) 7 and accumulator (ACC) 8.

【0028】演算部は、演算データの形式としては、仮
数部16ビット,指数部8ビットの24ビット浮動小数点デ
ータと、24ビット固定小数点データと、24ビット論理デ
ータとの3種類のデータに対して31種類の演算を行う。
The operation unit has three types of operation data for 24-bit floating point data of 16-bit mantissa and 8-bit exponent, 24-bit fixed-point data, and 24-bit logical data. Performs 31 types of calculations.

【0029】乗算器(FMPL)5 は第1の演算部入力レジス
タ(R0)3及び第2の演算部入力レジスタ(R1)4へ入力さ
れた値により、命令に関係なく毎マシンサイクルごとに
浮動小数点乗算結果を乗算器出力レジスタ(MR)6 へ出力
している。但し、後述するオペレーション命令の aluフ
ィールドが固定小数点データに対する演算を指定してい
る場合には、第1の演算部入力レジスタ(R0)3及び第2
の演算部入力レジスタ(R1)4の上位または下位の16ビッ
トの乗算結果 (32ビット) の上位又は下位の24ビット
を乗算器出力レジスタ(MR)6 へ出力する。
The multiplier (FMPL) 5 floats every machine cycle regardless of the instruction, depending on the values input to the first arithmetic unit input register (R0) 3 and the second arithmetic unit input register (R1) 4. The decimal point multiplication result is output to the multiplier output register (MR) 6. However, when the alu field of the operation instruction described later specifies an operation for fixed-point data, the first operation unit input register (R0) 3 and the second operation unit input register (R0)
It outputs the upper or lower 24 bits of the upper or lower 16-bit multiplication result (32 bits) of the operation unit input register (R1) 4 to the multiplier output register (MR) 6.

【0030】演算器(FALU)7 では、入力レジスタとし
て、2入力の内の一方の入力であるx入力には第1の演
算部入力レジスタ(R0)3またはアキュムレータ(ACC)8
が、他方の入力であるy入力には第2の演算部入力レジ
スタ(R1)4または乗算器出力レジスタ(MR)6 がそれぞれ
用意されており、オペレーション命令の内容に従って1
マシンサイクルで演算を実行し、演算結果をアキュムレ
ータ(ACC)8へ出力する。
In the arithmetic unit (FALU) 7, the first arithmetic unit input register (R0) 3 or the accumulator (ACC) 8 is used as an input register for the x input which is one of the two inputs.
However, the other input, y input, is provided with the second arithmetic unit input register (R1) 4 or the multiplier output register (MR) 6, respectively.
The calculation is executed in the machine cycle and the calculation result is output to the accumulator (ACC) 8.

【0031】次にメモリ部の概要について述べる。メモ
リ部は、図5に示されている2ポート内蔵データRAM 2,
内蔵命令ROM 11, 内蔵共有RAM(CRAM)12 にて構成され
ている。
Next, an outline of the memory section will be described. The memory unit is a 2-port built-in data RAM 2 shown in FIG.
It consists of built-in instruction ROM 11 and built-in shared RAM (CRAM) 12.

【0032】命令メモリ空間としては、4kワードの領域
が割当てられており、内蔵命令ROM11が組込まれてい
る。データメモリ空間としては、マイクロプロセッサ内
部に512ワードの領域が割当てられており、内蔵データR
AM2が組込まれている。内蔵データRAM2はポート0及び
ポート1を用いた2データ読出し及びいずれかのポート
のみを用いた1データ書込みを1マシンサイクル中に実
行可能である。また、マイクロプロセッサ外部に拡張デ
ータRAM 空間として60kワードの領域が割当てられてい
る。更に、命令メモリとデータメモリとの共有メモリ空
間として4kワードが割当てられており、マイクロプロセ
ッサ内部に64ワードの内蔵共有RAM(CRAM)12 が組込まれ
ている。
An area of 4 k words is allocated as the instruction memory space, and a built-in instruction ROM 11 is incorporated therein. As a data memory space, an area of 512 words is allocated inside the microprocessor.
AM2 is incorporated. The built-in data RAM 2 can execute 2 data read using port 0 and port 1 and 1 data write using only one of the ports in one machine cycle. An area of 60 kwords is allocated as an extended data RAM space outside the microprocessor. Further, 4k words are allocated as a shared memory space between the instruction memory and the data memory, and a built-in shared RAM (CRAM) 12 of 64 words is incorporated in the microprocessor.

【0033】次に、クロック生成部について説明する。
クロック生成部は、図5に示されているクロック/リセ
ット信号発生回路(CLK/RST)21 及びクロックプリスケー
ラ(CPR)22 にて構成されている。このクロック生成部
は、図示しないクロックプリスケール値レジスタに所定
の命令により設定されたクロックプリスケール値に従っ
て外部クロックをクロックプリスケーラ22で分周し、非
重複4相クロックを生成してマイクロプロセッサ各部へ
供給している。
Next, the clock generator will be described.
The clock generation unit is composed of a clock / reset signal generation circuit (CLK / RST) 21 and a clock prescaler (CPR) 22 shown in FIG. The clock generation unit divides the external clock by the clock prescaler 22 according to the clock prescale value set in a clock prescale value register (not shown) by a predetermined instruction, generates a non-overlapping four-phase clock, and sends it to each unit of the microprocessor. We are supplying.

【0034】クロック/リセット信号発生回路(CLK/RS
T)21 は、リセット信号(NRESET)入力端子31から入力さ
れるリセット信号(NRESET)がアクティブに転じた際に通
常はプログラムカウンタ(PC)10を所定の固定アドレスに
リセットする。しかし、リセット信号(NRESET)が非アク
ティブに転じた際に、第1割込み信号入力端子26,第2
割込み信号入力端子27へそれぞれ入力されている第1割
込み信号(INT1)及び第2割込み信号(INT2)がアクティブ
であればデータレジスタ(DR)18の内容をDバス24を介し
てプログラムカウンタ(PC)10へ転送する。この機能を用
いることにより、予めデータレジスタ(DR)18に外部から
任意のデータを書込んでおけば、任意のアドレスからプ
ログラムをスタートさせるリセット処理が可能である。
Clock / reset signal generation circuit (CLK / RS
The T) 21 normally resets the program counter (PC) 10 to a predetermined fixed address when the reset signal (NRESET) input from the reset signal (NRESET) input terminal 31 turns active. However, when the reset signal (NRESET) turns inactive, the first interrupt signal input terminal 26, the second interrupt signal input terminal 26,
If the first interrupt signal (INT1) and the second interrupt signal (INT2) input to the interrupt signal input terminal 27 are active, the contents of the data register (DR) 18 are transferred to the program counter (PC ) Transfer to 10. By using this function, if arbitrary data is externally written in the data register (DR) 18 in advance, a reset process for starting the program from an arbitrary address is possible.

【0035】次に、上述の如く構成されたマイクロプロ
セッサにおける命令フォーマットについて述べる。命令
ワード長は32ビットであり、命令の種類としては大きく
はシーケンス命令グループ, モード命令グループ, オペ
レーション命令グループ及びロード命令グループの4種
類に分類される。
Next, the instruction format in the microprocessor configured as described above will be described. The instruction word length is 32 bits, and the types of instructions are roughly classified into four types: sequence instruction group, mode instruction group, operation instruction group, and load instruction group.

【0036】シーケンス命令グループでは主に分岐に関
する命令が8種類, モード命令グループでは各レジスタ
へのデータ設定を行う命令が7種類, オペレーション命
令グループでは演算に関する命令が7種類, ロード命令
グループでは即値をレジスタへ設定する命令が2種類あ
る。ロード命令グループ以外では、上位5ビット (第27
ビット〜第31ビット) のデコード結果でグループ中の各
命令を判別し、残りの27ビットを以下に示す各フィール
ドに割付けている。
In the sequence instruction group, there are mainly 8 kinds of instructions related to branch, in the mode instruction group there are 7 kinds of instructions for setting data to each register, in the operation instruction group there are 7 kinds of instructions related to operation, and in the load instruction group there are immediate values. There are two types of instructions to set in registers. Except for the load instruction group, the upper 5 bits (27th
Each instruction in the group is identified by the decoding result (bits to 31st bit), and the remaining 27 bits are assigned to each field shown below.

【0037】まずシーケンス命令グループでは、図6〜
図13に示すようにフィールドが割付けられている。
First, in the sequence instruction group, FIG.
The fields are assigned as shown in FIG.

【0038】図6はシーケンス命令のビット配列を示し
ている。第27ビット〜第29ビットは、図7に示す如く、
シーケンス時の種類を指定するフィールドである。第23
ビット〜第26ビットは、図10, 図11, 図12及び図
13に示す如く、ループ時におけるループカウンタの初
期値の変更あるいはアドレッシングの修飾の変更を指定
するフィールドである。第19ビット〜第23ビットは、図
9に示す如く、条件ジャンプのブランチ条件を設定する
フィールドである。第0ビット〜第15ビットは飛先アド
レスを指定するフィールドであり、その内の第4, 第
5,第6ビットは、図8に示す如く、レジスタが保持し
ている内容を飛先アドレスとする間接ジャンプのレジス
タを指定するフィールドでもある。
FIG. 6 shows the bit arrangement of the sequence instruction. The 27th bit to the 29th bit are as shown in FIG.
This is a field that specifies the type of sequence. 23rd
Bits to 26th bit are fields for designating a change in the initial value of the loop counter or a change in the addressing modification at the time of looping, as shown in FIGS. 10, 11, 12, and 13. The 19th to 23rd bits are fields for setting the branch condition of the conditional jump as shown in FIG. The 0th bit to the 15th bit are fields for designating the jump destination address, and the 4th, 5th, and 6th bits of them are the contents held in the register as the jump destination address, as shown in FIG. This field is also used to specify the indirect jump register.

【0039】モード命令グループでは、図14〜図18
に示すようにフィールドが割付けられている。
In the mode instruction group, FIGS.
The fields are assigned as shown in.

【0040】図14はモード命令のビット配列を示して
いる。第27ビット〜第29ビットは、図15に示す如く、
モード命令の種類を指定するフィールドである。この
内、図15にニーモニックにて示されている WINCR命令
は、内蔵命令ROM 11中のこの命令ワードが位置する次の
アドレスからの命令ワードを図15にニーモニックにて
示してある ENDWC命令以外は実行せずに、命令レジスタ
(IR)13を通過させてそのまま内蔵共有RAM(CRAM)12 に順
に書込む命令であり、書込み先の先頭アドレスは図14
のニーモニックwaにて指定されているアドレスと16進数
のF000との和で指定される。またこの命令による処理
は、図15にニーモニックにて示されている ENDWC命
令、即ち WINCR命令の実行を停止させる命令が実行され
るまでは内蔵命令ROM 11及び内蔵共有RAM(CRAM)12 のア
ドレスを共に”1”ずつインクリメントしつつ継続され
る。
FIG. 14 shows the bit arrangement of the mode instruction. The 27th bit to the 29th bit are as shown in FIG.
This is a field for specifying the type of mode command. Of these, the WINCR instruction shown by the mnemonic in FIG. 15 is the WINCR instruction other than the ENDWC instruction shown by the mnemonic in FIG. 15 for the instruction word from the next address where this instruction word is located in the internal instruction ROM 11. Instruction register without executing
It is an instruction to write to the internal shared RAM (CRAM) 12 as it is after passing through the (IR) 13, and the start address of the write destination is shown in Fig. 14.
It is specified by the sum of the address specified by the mnemonic wa and the hexadecimal number F000. In addition, the processing by this instruction is performed by changing the addresses of the internal instruction ROM 11 and the internal shared RAM (CRAM) 12 until the ENDWC instruction shown by the mnemonic in FIG. 15, that is, the instruction to stop the execution of the WINCR instruction is executed. Both are continued while incrementing by "1".

【0041】第26ビットは、図16に示す如く、レジデ
ュアル制御による内蔵データRAM2のポート0に対するア
ドレス指定にレジスタAR0 を用いるかまたはレジスタAR
1 を用いるかを示すフィールドである。
The 26th bit uses the register AR0 for addressing the port 0 of the built-in data RAM2 under the residual control as shown in FIG.
This field indicates whether to use 1.

【0042】第25ビットは、図17に示す如く、図示し
ない外部データRAM または内蔵共有RAM(CRAM)12 のアド
レス指定の下位9ビットにレジスタAR0 を用いるかまた
はレジスタAR1 を用いるかを示すフィールドである。な
お、アドレス指定の上位7ビットはアドレス演算部(AA
U)1中の図示されていないページレジスタ(PGR) により
指定される。
The 25th bit is a field indicating whether to use the register AR0 or the register AR1 for the lower 9 bits of the address designation of an external data RAM or a built-in shared RAM (CRAM) 12, which is not shown, as shown in FIG. is there. The upper 7 bits of the address designation are the address calculation unit (AA
It is specified by a page register (PGR) not shown in U) 1.

【0043】図18に示す如く、第0ビット〜第3ビッ
トはいずれのレジスタに対して値を設定するかを選択す
るフィールドであり、設定される即値は図14に示され
ている第4ビット〜第22ビットで指定される。この内、
コントロールレジスタ15中のCRレジスタの第2及び第3
ビットは後述するオペレーション命令のバス転送のソー
スレジスタとしてアキュムレータ(ACC)8を指定した場合
にオペレーション命令の acoフィールドで指定されたAC
C0, ACC1, ACC2, ACC3レジスタに対して実際にソースレ
ジスタとして用いられるレジスタの選択方法を指定する
ビットである。リセット処理後は、b3−b2=”00”であ
り、 acoフィールドにより指定されるレジスタが用いら
れるが、b3−b2=”01”である場合は acoフィールドに
よる指定+1のレジスタが選択される。この場合具体的
には、ACC0レジスタが指定されるとACC1レジスタがバス
転送のソースレジスタとして用いられ、ACC1レジスタの
指定でACC2レジスタが、ACC2レジスタの指定でACC3レジ
スタが、ACC3レジスタの指定でACC0レジスタがそれぞれ
用いられる。
As shown in FIG. 18, the 0th bit to the 3rd bit are fields for selecting which register the value is set to. The immediate value to be set is the 4th bit shown in FIG. ~ Specified by the 22nd bit. Of this,
The second and third CR registers in the control register 15
The bit is the AC specified in the aco field of the operation instruction when the accumulator (ACC) 8 is specified as the source register for the bus transfer of the operation instruction described later.
These bits specify the method of selecting the register actually used as the source register for the C0, ACC1, ACC2, and ACC3 registers. After the reset processing, b3-b2 = "00" and the register specified by the aco field is used. However, when b3-b2 = "01", the register specified by the aco field + 1 is selected. In this case, specifically, if the ACC0 register is specified, the ACC1 register is used as the source register for the bus transfer.The ACC1 register specifies the ACC2 register, the ACC2 register specifies the ACC3 register, and the ACC3 register specifies the ACC0 register. Each register is used.

【0044】オペレーション命令グループでは、図19
〜図31に示す様にフィールドが割付けられている。
In the operation instruction group, FIG.
The fields are assigned as shown in FIG.

【0045】図19はオペレーション命令のビット配列
を示している。第27ビット〜第29ビットは図20に示す
如く、オペレーション命令の種類を指定するフィールド
である。
FIG. 19 shows the bit arrangement of the operation instruction. The 27th bit to the 29th bit are fields for designating the type of operation instruction, as shown in FIG.

【0046】第26ビットはダイレクトアドレッシングを
行うか否かを示すフィールドであり、ダイレクトアドレ
ッシングが行われる場合は図21に示す如く、Dバス24
を介して行われるデータ転送のソースレジスタとデステ
ィネーションレジスタとが第5ビット〜第7ビットで指
定され、内蔵データRAM2のポート1に対して図19のニ
ーモニックdadispで指定される5ビットが即値アドレス
として指定される。
The 26th bit is a field indicating whether or not direct addressing is performed. When direct addressing is performed, the D bus 24 is used as shown in FIG.
The source register and the destination register of the data transfer performed via are specified by the 5th to 7th bits, and for the port 1 of the internal data RAM2, the 5 bits specified by the mnemonic dadisp in FIG. 19 are immediate addresses. Is specified as.

【0047】第23, 第24, 第25ビットはそれぞれレジス
タAR0, AR1, AR2 をレジデュアル制御により更新するか
否かを示すフィールドである。第22ビットはデータレジ
スタ(DR)18の内容を図示しない外部データRAM または内
蔵共有RAM(CRAM)12 へ書込むか否かを、第21ビットは図
示しない外部データRAM または内蔵共有RAM(CRAM)12 か
らデータレジスタ(DR)18へデータを読込むか否かを制御
するフィールドである。
The 23rd, 24th, and 25th bits are fields indicating whether or not the registers AR0, AR1, and AR2 are updated by residual control, respectively. The 22nd bit indicates whether to write the contents of the data register (DR) 18 to the external data RAM (not shown) or the internal shared RAM (CRAM) 12, and the 21st bit is the external data RAM or internal shared RAM (CRAM) not shown. This field controls whether to read data from 12 to the data register (DR) 18.

【0048】第19, 第20ビットはアドレスレジスタが示
すアドレスに書かれている内蔵データRAM2の内容を第1
の演算部入力レジスタ(R0)3及び第2の演算部入力レジ
スタ(R1)4へ書込むか否かを制御するフィールドであ
る。第17, 第18ビットは演算器(FALU)7 への入力レジス
タを選択するフィールドである。
The 19th and 20th bits indicate the contents of the internal data RAM 2 written at the address indicated by the address register as the first bit.
This is a field for controlling whether or not to write to the arithmetic unit input register (R0) 3 and the second arithmetic unit input register (R1) 4. The 17th and 18th bits are a field for selecting an input register to the arithmetic unit (FALU) 7.

【0049】第12ビット〜第16ビットは、図30及び図
31に示す如く、演算器(FALU)7 の演算を指定するフィ
ールドであり、特にaluフィールドと称する。第10, 第1
1ビットは、図22及び図23に示す如く、演算器(FAL
U)7 の演算結果を入力するアキュムレータを指定するフ
ィールドであると共に、 aluフィールドに後述する NOP
またはデスティネーションレジスタとしてアキュムレー
タ(ACC)8が指定された場合に、Dバス24を介して行われ
るデータ転送のデスティネーションレジスタを更に詳し
く指定するフィールドでもある。
As shown in FIGS. 30 and 31, the 12th to 16th bits are fields for designating the operation of the operation unit (FALU) 7, and are particularly called alu fields. 10th, 1st
As shown in FIG. 22 and FIG. 23, 1 bit corresponds to a computing unit (FAL
(U) It is a field that specifies the accumulator to input the operation result of 7, and the NOP described later in the alu field.
Alternatively, it is also a field for further specifying the destination register of the data transfer performed via the D bus 24 when the accumulator (ACC) 8 is specified as the destination register.

【0050】第8, 第9ビットは、図24及び図25に
示す如く、出力アキュムレータを指定するフィールドで
あると共に、 aluフィールドにNOPまたはソースレジス
タとしてアキュムレータ(ACC)8が指定された場合に、D
バス24を介して行われるデータ転送のソースレジスタを
更に詳しく指定するフィールドでもある。第4ビット〜
第7ビットは、図26及び図27に示す如く、Dバス24
を介して行われるデータ転送のソースレジスタを示すフ
ィールドである。第0ビット〜第3ビットは、図28及
び図29に示す如く、Dバス24を介して行われるデータ
転送のデスティネイションレジスタを指定するフィール
ドである。
As shown in FIGS. 24 and 25, the 8th and 9th bits are a field for designating an output accumulator, and when an accumulator (ACC) 8 is designated as a NOP or a source register in the alu field, D
It is also a field that further specifies the source register of the data transfer performed via the bus 24. 4th bit ~
The 7th bit is the D bus 24 as shown in FIGS.
Is a field indicating the source register of the data transfer performed via. The 0th bit to the 3rd bit are fields for designating the destination register of the data transfer performed via the D bus 24, as shown in FIGS. 28 and 29.

【0051】図30及び図31に示されている aluフィ
ールドについて更に詳しく説明する。なお、演算器(FAL
U)7 への2入力の内、第1の演算部入力レジスタ(R0)3
またはアキュムレータ(ACC)8からの入力をx入力,第2
の演算部入力レジスタ(R1)4または乗算器出力レジスタ
(MR)6 からの入力をy入力とし、アキュムレータ(ACC)8
への出力信号をz出力とする。
The alu field shown in FIGS. 30 and 31 will be described in more detail. In addition, arithmetic unit (FAL
Of the two inputs to U) 7, the first arithmetic unit input register (R0) 3
Or input from accumulator (ACC) 8 is x input, second
Arithmetic unit input register (R1) 4 or multiplier output register
The input from (MR) 6 is the y input, and the accumulator (ACC) 8
Let the output signal to z output be z output.

【0052】NOPは、演算器(FALU)7 では何も演算しな
いという命令であり、x入力,y入力とも演算器(FALU)
7 へは入力されず、従ってz出力も変化しない。INV
は、x入力のデータを浮動小数点データと見なして符号
反転してz出力する命令である。ABSは、x入力のデー
タを浮動小数点データと見なしてその絶対値をz出力す
る命令である。
NOP is an instruction that the arithmetic unit (FALU) 7 does not calculate anything, and both the x input and the y input are arithmetic units (FALU).
It is not input to 7, so the z output does not change. INV
Is an instruction that regards x input data as floating point data and inverts its sign to output z. ABS is an instruction that regards x input data as floating point data and outputs its absolute value as z.

【0053】SGNは、x入力のデータとy入力のデータ
とを浮動小数点データと見なしてxの絶対値にyの符号
(正の数なら1、負の数なら−1)を乗算してz出力す
る命令である。ADDは、x入力のデータとy入力のデー
タとを浮動小数点データと見なして加算し、z出力する
命令である。SUBは、x入力のデータとy入力のデータ
とを浮動小数点データと見なしてxからyを減算し、z
出力する命令である。
SGN regards x input data and y input data as floating point data, and multiplies the absolute value of x by the sign of y (1 is a positive number and -1 is a negative number) and z It is an instruction to output. ADD is an instruction that regards x input data and y input data as floating point data, adds them, and outputs z. SUB regards x input data and y input data as floating point data, subtracts y from x, and z
It is an instruction to output.

【0054】MAXは、x入力のデータとy入力のデータ
とを浮動小数点データと見なして比較し、大きい方をz
出力する命令である。MINは、x入力のデータとy入力
のデータとを浮動小数点データと見なして比較し、小さ
い方をz出力する命令である。THRは、y入力のデータ
をそのままz出力する命令である。
In MAX, the data of x input and the data of y input are regarded as floating point data and compared, and the larger one is z.
It is an instruction to output. MIN is an instruction for comparing the data of x input and the data of y input as floating point data and comparing them, and outputting the smaller one as z. THR is an instruction to output y input data to z as it is.

【0055】XFTは、x入力のデータを固定小数点デー
タと見なしてコントロールレジスタ15に設定されている
モードに従って浮動小数点データに変換し、z出力する
命令である。FXTは、x入力のデータを浮動小数点デー
タと見なしてコントロールレジスタ15に設定されている
モードに従って固定小数点データに変換し、z出力する
命令である。SR1は、x入力のデータを論理データと見
なして1ビット右シフトし、z出力する命令である。
The XFT is an instruction that regards x input data as fixed point data, converts it into floating point data according to the mode set in the control register 15, and outputs z. FXT is an instruction that regards x input data as floating point data, converts it into fixed point data according to the mode set in the control register 15, and outputs z. SR1 is an instruction that regards x input data as logical data, shifts it to the right by 1 bit, and outputs z.

【0056】SL1は、x入力のデータを論理データと見
なして1ビット左シフトし、z出力する命令である。SL
2は、x入力のデータを論理データと見なして2ビット
左シフトし、z出力する命令である。SL4は、x入力の
データを論理データと見なして4ビット左シフトし、z
出力する命令である。
SL1 is an instruction for treating the data of x input as logical data, shifting left by 1 bit, and outputting z. SL
Reference numeral 2 is an instruction which regards x input data as logical data and shifts it to the left by 2 bits and outputs z. SL4 considers the data of x input as logical data and shifts to the left by 4 bits, and z
It is an instruction to output.

【0057】SL8は、x入力のデータを論理データと見
なして8ビット左シフトし、z出力する命令である。こ
れらのSR1, SL1, SL2, SL4, SL8 の各命令では、シフト
インされるデータは総て0である。
SL8 is an instruction that regards x input data as logical data, shifts it 8 bits to the left, and outputs z. In each of the SR1, SL1, SL2, SL4, and SL8 instructions, the data shifted in is 0.

【0058】ANDは、x入力のデータとy入力のデータ
とを論理データと見なして論理積をとり、z出力する命
令である。ORは、x入力のデータとy入力のデータとを
論理データと見なして論理和をとり、z出力する命令で
ある。EORは、x入力のデータとy入力のデータとを論
理データと見なして排他的論理和をとり、z出力する命
令である。
AND is an instruction to regard the x-input data and the y-input data as logical data, perform a logical product, and output z. The OR is an instruction to regard the x-input data and the y-input data as logical data, perform a logical sum, and output z. The EOR is an instruction to regard the x-input data and the y-input data as logical data, perform an exclusive OR, and output z.

【0059】NOTは、x入力のデータを論理データと見
なして論理否定をとり、z出力する命令である。MAD
は、x入力のデータとy入力のデータとの下位16ビット
を固定小数点加算を行ってz出力する命令であるが、入
力データの指数部は無視され、z出力の上位8ビットに
は”0”が出力される。ESBは、x入力のデータとy入
力のデータとの上位8ビットを固定小数点減算を行って
z出力する命令であるが、入力データの仮数部は無視さ
れ、z出力の下位16ビットには16進数の8000が出力され
る。
NOT is an instruction that regards x input data as logical data, performs logical NOT, and outputs z. MAD
Is an instruction that performs fixed point addition of the lower 16 bits of x input data and y input data and outputs z. However, the exponent part of the input data is ignored, and the upper 8 bits of z output are "0". Is output. The ESB is an instruction that performs fixed point subtraction on the upper 8 bits of the x input data and the y input data and outputs z. However, the mantissa part of the input data is ignored, and the lower 16 bits of the z output has 16 bits. The decimal number 8000 is output.

【0060】IMULは、演算器(FALU)7 に対しては何も行
わず、乗算器(FMPL)5 に固定小数点乗算を行わせる命令
である。IADDは、x入力のデータとy入力のデータとを
固定小数点データと見なして加算し、z出力する命令で
ある。ISUBは、x入力のデータとy入力のデータとを固
定小数点データと見なしてxからyを減算し、z出力す
る命令である。
IMUL is an instruction that causes the multiplier (FMPL) 5 to perform fixed-point multiplication without performing anything to the arithmetic unit (FALU) 7. The IADD is an instruction that regards x input data and y input data as fixed point data, adds them, and outputs z. The ISUB is an instruction that regards x input data and y input data as fixed point data, subtracts y from x, and outputs z.

【0061】IADCは、x入力のデータとy入力のデータ
とを固定小数点データと見なしてこの2つの数とフラグ
レジスタ(FR)32内のキャリービットとの加算を行い、z
出力する命令である。ISBBは、x入力のデータとy入力
のデータとを固定小数点データと見なしてx入力データ
からy入力データを減算し、更にフラグレジスタ(FR)32
内のキャリービットの減算を行い、z出力する命令であ
る。
The IADC regards the data of the x input and the data of the y input as fixed point data, performs addition of these two numbers and the carry bit in the flag register (FR) 32, and z
It is an instruction to output. ISBB regards x input data and y input data as fixed-point data, subtracts y input data from x input data, and further, flag register (FR) 32
This is an instruction for subtracting the carry bit in the above and outputting z.

【0062】ASR1は、x入力のデータを固定小数点デー
タと見なして1ビット右シフトを行い、z出力する命令
である。ASR2は、x入力のデータを固定小数点データと
見なして2ビット右シフトを行い、z出力する命令であ
る。
ASR1 is an instruction that regards x input data as fixed point data, shifts it right by 1 bit, and outputs z. ASR2 is an instruction that regards x-input data as fixed-point data, performs 2-bit right shift, and outputs z.

【0063】ASR4は、x入力のデータを固定小数点デー
タと見なして4ビット右シフトを行い、z出力する命令
である。ASR8は、x入力のデータを固定小数点データと
見なして8ビット右シフトを行い、z出力する命令であ
る。これらのASR1, ASR2, ASR4, ASR8の各命令における
シフトインデータはサインビット(x入力の最上位ビッ
ト)である。
The ASR4 is an instruction that regards x input data as fixed point data, performs a 4-bit right shift, and outputs z. ASR8 is an instruction that regards x input data as fixed-point data, performs 8-bit right shift, and outputs z. The shift-in data in each of the ASR1, ASR2, ASR4, and ASR8 instructions is a sign bit (the most significant bit of x input).

【0064】ロード命令グループでは、最上位の3ビッ
ト(第29, 第30, 第31ビット) によりロード命令とロン
グロード命令とに分けられる。また、ロード命令では、
図32〜図37に示す如くフィールドが割付けられてい
る。なお、ロード命令はこの従来例では18ビット即値を
指定することが出来、ロングロード命令はそれよりも長
いビット長である24びとビット即値を指定することが出
来る。
In the load instruction group, the most significant 3 bits (29th, 30th, 31st bits) are used to divide into a load instruction and a long load instruction. Also, in the load instruction,
The fields are assigned as shown in FIGS. It should be noted that the load instruction can specify an immediate value of 18 bits in this conventional example, and the long load instruction can specify an immediate value of 24 bits which is a longer bit length.

【0065】図32はロード命令のビット配列を示して
いる。第28ビットは、図33に示す如く、データレジス
タ(DR)18の内容を図示しない外部データRAM または内蔵
共有RAM(CRAM)12 へ書込むか否かを選択するフィールド
である。第26, 第27ビットは、図34に示す如く、即値
を書込むレジスタがアキュムレータ(ACC)8である場合に
は、アキュムレータ(ACC)8中の図示されていないACC0〜
ACC3のいずれのアキュムレータであるかを指定する他、
フラグレジスタ(FR)32,コントロールレジスタ(CR, SR)1
5, アドレス演算部(AAU)1内の各種レジスタ (アドレス
レジスタ(AR0, AR1, AR2),ベースアドレス値レジスタ(B
A0, BA1, BA2),インクリメント値レジスタ(I0, I1, I
2)) のいずれのレジスタに即値を書込むかを指定するフ
ィールドである。
FIG. 32 shows the bit arrangement of the load instruction. The 28th bit is a field for selecting whether to write the contents of the data register (DR) 18 to an external data RAM (not shown) or a built-in shared RAM (CRAM) 12, as shown in FIG. As shown in FIG. 34, the 26th and 27th bits are ACC0 to ACC0 (not shown) in the accumulator (ACC) 8 when the register for writing an immediate value is the accumulator (ACC) 8.
In addition to specifying which accumulator of ACC3,
Flag register (FR) 32, control register (CR, SR) 1
5, various registers in the address calculation unit (AAU) 1 (address register (AR0, AR1, AR2), base address value register (B
A0, BA1, BA2), increment value register (I0, I1, I
This is a field that specifies in which register of 2)) the immediate value is written.

【0066】第23, 第24, 第25ビットは、図35に示す
如く、レジデュアル制御によるアドレスレジスタ(AR0,
AR1, AR2) の内容を更新するか否かを選択するフィール
ドである。第22ビットは、図36に示す如く、Dバス24
の24ビットの内のMSB(第23ビット) 側の18ビットに即値
を書込むか、またはLSB(第0ビット)側の18ビットに即
値を書込むかを選択するフィールドである。
The 23rd, 24th, and 25th bits are, as shown in FIG. 35, the address register (AR0, AR0,
This is a field for selecting whether to update the contents of (AR1, AR2). The 22nd bit is the D bus 24 as shown in FIG.
This is a field for selecting whether to write an immediate value to 18 bits on the MSB (23rd bit) side of the 24 bits of, or to write an immediate value to 18 bits on the LSB (0th bit) side.

【0067】第4ビット〜第21ビットはレジスタへ書込
む即値を指定するフィールドである。第0ビット〜第3
ビットは、図37に示す如く、即値を書込むレジスタを
指定するフィールドである。
The 4th to 21st bits are a field for designating an immediate value to be written in the register. 0th bit to 3rd
The bit is a field for designating a register for writing an immediate value, as shown in FIG.

【0068】ロングロード命令は、図38及び図39に
示すようにフィールドが割付けられている。図38はロ
ングロード命令のビット配列を示している。第28ビット
はデータレジスタ(DR)18の内容を図示しない外部データ
RAM または内蔵共有RAM(CRAM)12 へ書込むか否かを選択
するフィールドである。第4ビット〜第27ビットは即値
を指定するフィールドである。第0, 第1,第2及び第
3ビットは、図39に示す如く、即値を書込むレジスタ
を指定するフィールドである。
Fields are allocated to the long load instruction as shown in FIGS. 38 and 39. FIG. 38 shows the bit arrangement of the long load instruction. The 28th bit is the external data not shown in the contents of the data register (DR) 18.
This field is used to select whether to write to RAM or built-in shared RAM (CRAM) 12. The 4th bit to the 27th bit are fields for specifying an immediate value. The 0th, 1st, 2nd and 3rd bits are, as shown in FIG. 39, a field for designating a register for writing an immediate value.

【0069】次に、上述の従来のマイクロプロセッサの
動作モードについて説明する。このマイクロプロセッサ
の動作モードとしては通常モードの他に以下のようなテ
ストモードがある。
Next, the operation mode of the above conventional microprocessor will be described. In addition to the normal mode, the operation modes of this microprocessor include the following test modes.

【0070】まず第1は、データ入出力端子30, アドレ
ス入出力端子34, 図示されていない出力端子の出力状態
あるいは出力レベルをマイクロプロセッサの内部動作と
は無関係に設定可能なピンテストモードである。次に第
2は、通常モードでは観測することが困難なDバス24及
びプログラムカウンタ(PC)10の値をデータ入出力端子30
及びアドレス入出力端子34から外部へ出力するPEEPモー
ドである。
First, there is a pin test mode in which the output state or output level of the data input / output terminal 30, the address input / output terminal 34, and an output terminal (not shown) can be set independently of the internal operation of the microprocessor. .. Next, in the second mode, the values of the D bus 24 and program counter (PC) 10 that are difficult to observe in the normal mode are changed to the data input / output terminal 30
And the PEEP mode in which the address input / output terminal 34 outputs to the outside.

【0071】第3は、命令の実行によりデータレジスタ
(DR)18又はシリアルI/O インタフェイス17中の図示しな
いシリアル入力レジスタ(SI0, SI1)をDバス24を用いた
バス転送のソースレジスタとして用いた場合に、これら
の代わりにシグネチャレジスタ19中の図示されていない
疑似乱数発生器をバス転送のソースレジスタとして用い
るか、またはデータレジスタ(DR)18又はシリアルI/O イ
ンタフェイス17中の図示されていないシリアル出力レジ
スタ(SO0, SO1)をDバス24を用いたバス転送のデスティ
ネーションレジスタとして用いた場合に、これらの代わ
りにシグネチャレジスタ19中の図示しないデータ圧縮器
をバス転送のデスティネーションレジスタとして用いる
セルフテストモードである。
Third, by executing the instruction, the data register
(DR) 18 or the serial input register (SI0, SI1) (not shown) in the serial I / O interface 17 is used in the signature register 19 instead of the source register for the bus transfer using the D bus 24. Use a pseudo random number generator (not shown) as a source register for bus transfer, or use a data register (DR) 18 or a serial output register (SO0, SO1) (not shown) in the serial I / O interface 17 as D. When used as a destination register for bus transfer using the bus 24, a self-test mode is used in which a data compressor (not shown) in the signature register 19 is used as a destination register for bus transfer instead.

【0072】第4は、内蔵命令ROM 11あるいは内蔵共有
RAM(CRAM)12 のアドレスをマイクロプロセッサ外部から
アドレス入出力端子34へ入力してデータ入出力端子30か
ら内蔵命令ROM 11あるいは内蔵共有RAM(CRAM)12 の内容
を読出し、あるいはデータ入出力端子13から入力したデ
ータを内蔵命令ROM 11あるいは内蔵共有RAM(CRAM)12へ
書込むことが可能なIIA(Internal Instruction ROM/RAM
Access)モードである。
Fourth, built-in instruction ROM 11 or built-in shared
The address of RAM (CRAM) 12 is input to the address input / output terminal 34 from the outside of the microprocessor and the contents of the internal instruction ROM 11 or internal shared RAM (CRAM) 12 is read from the data input / output terminal 30 or the data input / output terminal 13 IIA (Internal Instruction ROM / RAM) that can write data input from the built-in instruction ROM 11 or built-in shared RAM (CRAM) 12
Access) mode.

【0073】なお、シグネチャレジスタ19中の図示され
ていない疑似乱数発生器及びデータ圧縮器はそれぞれ独
立しており、リセット処理により初期化される。また、
疑似乱数発生器はソースレジスタとしてアクセスされる
都度、新たに乱数を出力し、データ圧縮器はデスティネ
ーションレジスタとしてアクセスされる都度、ソースレ
ジスタから出力されるデータのシグネチャ圧縮を行う。
The pseudo random number generator and the data compressor (not shown) in the signature register 19 are independent of each other and are initialized by the reset process. Also,
The pseudo random number generator outputs a new random number each time it is accessed as a source register, and the data compressor performs signature compression of the data output from the source register each time it is accessed as a destination register.

【0074】また、上述のモードの切換えはTESTモード
設定信号入力端子28と IIAモード設定信号入力端子29と
への入力信号の論理レベルの組合わせにて行われる。次
に、上述の各テストモードの中でセルフテストモードを
使用した演算器(FALU)7 のテスト方法について説明す
る。
The above-mentioned mode switching is performed by combining the logical levels of the input signals to the TEST mode setting signal input terminal 28 and the IIA mode setting signal input terminal 29. Next, a method of testing the arithmetic unit (FALU) 7 using the self-test mode among the above test modes will be described.

【0075】演算器(FALU)7 のテストは、各演算に対し
て種々の入力値で演算を実行し、その結果を調べること
により行われる。また、ある種の演算 (たとえばIADC演
算等) に対してはその前に実行された演算により設定さ
れたフラグレジスタ(FR)32の値を用いることになるた
め、演算実行の履歴が問題になる。そこで、演算器(FAL
U)7 の入力値に疑似乱数発生器から出力された乱数を使
用し、演算結果をデータ圧縮器で圧縮する場合について
考える。
The test of the arithmetic unit (FALU) 7 is performed by executing an arithmetic operation with various input values for each arithmetic operation and examining the result. Also, for certain types of operations (such as IADC operations), the value of the flag register (FR) 32 set by the previously executed operation is used, so the history of operation execution becomes a problem. .. Therefore, the arithmetic unit (FAL
Consider the case where the random number output from the pseudo-random number generator is used for the input value of U) 7 and the calculation result is compressed by the data compressor.

【0076】Dバス24を使用したバス転送のソースレジ
スタとしてたとえばデータレジスタ(DR)18を命令により
指定する都度、新たな疑似乱数データが得られる。この
疑似乱数データを第1の演算部入力レジスタ(R0)3及び
第2の演算部入力レジスタ(R1)4へ転送することにより
演算器(FALU)7 のための種々の演算入力値が得られる。
そして、演算器(FALU)7 による演算結果をデスティネー
ションレジスタとしてたとえばデータレジスタ(DR)18を
指定してDバス24を用いてバス転送すれば、演算結果が
シグネチャ圧縮される。
Each time a data register (DR) 18 is designated by a command as a source register for bus transfer using the D bus 24, new pseudo random number data is obtained. By transferring this pseudo random number data to the first arithmetic unit input register (R0) 3 and the second arithmetic unit input register (R1) 4, various arithmetic input values for the arithmetic unit (FALU) 7 can be obtained. ..
Then, if the operation result of the operation unit (FALU) 7 is designated as the destination register, for example, the data register (DR) 18 is designated and is transferred to the bus using the D bus 24, the operation result is signature-compressed.

【0077】上述のような操作は数個の命令にて実現可
能であり、多重ループを用いると小数の命令で多数の疑
似乱数を利用した演算器のテストを行うことが可能であ
る。テストの実行結果は、テスト終了後の最終結果を、
正常に動作することが確認されているマイクロプロセッ
サが出力する最終シグネチャまたは計算機シミュレーシ
ョンによる最終シグネチャ等と比較することにより、正
常であるか否かの判断が可能である。
The above-mentioned operation can be realized by a few instructions, and by using a multiple loop, it is possible to test an arithmetic unit using a large number of pseudo random numbers with a small number of instructions. The test execution result is the final result after the test is completed.
By comparing with the final signature output by the microprocessor confirmed to operate normally, the final signature by computer simulation, or the like, it is possible to determine whether or not the operation is normal.

【0078】次に、このようなテスト機能を有するマイ
クロプロセッサの演算器(FALU)7 のセルフテストプログ
ラムの一例を図40, 図41, 図42, 図43, 図4
4, 図45及び図46に、その処理手順を示すフローチ
ャートを図47, 図48, 図49図50及び図51に示
す。このセルフテストプログラムは、図47に示す如
く、二重ループを使用することにより、より小数の命令
にて多くのテストが行えるように構成されている。
Next, an example of the self-test program of the arithmetic unit (FALU) 7 of the microprocessor having such a test function will be described with reference to FIGS. 40, 41, 42, 43 and 4.
4, FIG. 45, and FIG. 46 are flowcharts showing the processing procedure in FIGS. 47, 48, 49, and 50. As shown in FIG. 47, this self-test program is configured so that many tests can be performed with a smaller number of instructions by using a double loop.

【0079】図49はモジュール1の処理手順を示すフ
ローチャートである。まず最初に、シグネチャレジスタ
19中の疑似乱数発生器から第1の演算部入力レジスタ(R
0)3及び第2の演算部入力レジスタ(R1)4に疑似乱数を
セットして演算器(FALU)7 に演算を実行させ、その演算
結果をシグネチャレジスタ19中のデータ圧縮器へ転送し
て圧縮を行うと同時に、一演算毎にフラグレジスタ(FR)
32の内容をチェックし、またフラグレジスタ(FR)32の内
容に応じた条件ジャンプのテストも図51に示すモジュ
ール3にて行っている。このモジュールでは、一入力演
算と二入力演算とを組合わせる事によりテストプログラ
ムのステップ数の削減を図っている。
FIG. 49 is a flow chart showing the processing procedure of the module 1. First of all, the signature register
From the pseudo random number generator in 19 to the first arithmetic unit input register (R
0) 3 and the second arithmetic unit input register (R1) 4 is set to a pseudo random number, the arithmetic unit (FALU) 7 is caused to execute the arithmetic operation, and the arithmetic result is transferred to the data compressor in the signature register 19. Simultaneously with compression, flag register (FR) for each operation
The contents of 32 are checked, and the conditional jump test according to the contents of the flag register (FR) 32 is also conducted by the module 3 shown in FIG. In this module, the number of steps in the test program is reduced by combining the one-input operation and the two-input operation.

【0080】図50はモジュール2の処理手順を示すフ
ローチャートである。このモジュール2はモジュール1
の変形であって、フラグレジスタ(FR)32中に格納されて
いる前命令のキャリーを受けて演算を行い、シグネチャ
レジスタ19中のデータ圧縮器へデータを転送するモジュ
ールである。
FIG. 50 is a flow chart showing the processing procedure of the module 2. This module 2 is module 1
Is a module that receives the carry of the previous instruction stored in the flag register (FR) 32, performs an operation, and transfers the data to the data compressor in the signature register 19.

【0081】図47乃至図51のフローチャートに示し
た演算は、図5における演算器(FALU)7 で実行可能な総
ての演算に対して、つまり図19乃至図31に示されて
いるaluフィールドの演算INV, ABS, SGN, ADD, SUB, MA
X, MIN, THR, XFT, FXT, SR1,SL1, SL2, SL4, SL8, AN
D, OR, EOR, NOT, MAD, ESB, IADD, ISUB, IADC, ISBB,
ASR1, ASR2, ASR4, ASR8 を行っている。
The operations shown in the flow charts of FIGS. 47 to 51 are applied to all the operations that can be executed by the operation unit (FALU) 7 in FIG. 5, that is, the alu field shown in FIGS. 19 to 31. Calculation of INV, ABS, SGN, ADD, SUB, MA
X, MIN, THR, XFT, FXT, SR1, SL1, SL2, SL4, SL8, AN
D, OR, EOR, NOT, MAD, ESB, IADD, ISUB, IADC, ISBB,
Performs ASR1, ASR2, ASR4, ASR8.

【0082】これらのモジュールを組合せて一つのプロ
グラムとして表現したものが図40乃至図46に示され
ているプログラムである。このプログラムは約120ワー
ドという少ないワード数で構成されている。
The program shown in FIGS. 40 to 46 is a combination of these modules and is expressed as one program. This program consists of as few as 120 words.

【0083】なお、上述の例では演算部のテストを一例
として説明したが、メモリ部の内の内蔵データRAM2及び
内蔵共有RAM(CRAM)12 のテストは、レジデュアル制御を
用いてアドレスレジスタを順次変更しつつ疑似乱数発生
器が発生する乱数を内蔵データRAM2及び内蔵共有RAM(CR
AM)12 に一旦書込んだ後に読出してデータ圧縮器で圧縮
するプログラムを実行すれば容易に行える。
In the above example, the test of the arithmetic unit has been described as an example. However, in the test of the built-in data RAM 2 and the built-in shared RAM (CRAM) 12 in the memory unit, the address register is sequentially used by using the residual control. While changing the random number generated by the pseudo-random number generator, the built-in data RAM2 and built-in shared RAM (CR
This can be easily done by writing a program in (AM) 12, then reading it out and executing a program to compress it in the data compressor.

【0084】図52は、図40乃至図46に示すセルフ
テストプログラムが図5に示した内蔵命令ROM 11の命令
メモリ空間上にどの様に構成されているかを示す模式図
である。このようなメモリ空間の構成を採ることによ
り、通常モードでは16進数の0000番地をリセット処理の
際のスタートアドレスとするユーザプログラム等が実行
される。しかし、セルフテストを実行する場合には上述
の任意のアドレスからリセットスタート可能なリセット
処理を利用することにより、上述のようなセルフテスト
が実行される。
FIG. 52 is a schematic diagram showing how the self-test programs shown in FIGS. 40 to 46 are arranged in the instruction memory space of the internal instruction ROM 11 shown in FIG. By adopting such a memory space configuration, in the normal mode, the user program or the like having the hexadecimal address 0000 as the start address for the reset process is executed. However, when the self-test is executed, the self-test as described above is executed by utilizing the reset process capable of reset start from the above-mentioned arbitrary address.

【0085】次に、内蔵命令ROM 11のテスト方法につい
て説明する。但し、内蔵命令ROM 11の記憶内容は命令に
より直接扱うことは出来ないので、前述の IIAモードを
使用する。
Next, a method of testing the built-in instruction ROM 11 will be described. However, since the contents stored in the built-in instruction ROM 11 cannot be directly handled by instructions, the IIA mode described above is used.

【0086】IIAモード時には、内蔵命令ROM 11内の読
出したいアドレスをアドレス入力端子34に入力すると、
指定したアドレスに記憶されている命令ワードの内容の
内の下位16ビットまたは上位16ビットがIバス35を通じ
て転送され、データ入出力端子30から出力される。この
出力データが内蔵命令ROM 11の記憶内容の下位16ビット
であるか、または上位16ビットであるかは UWI信号出力
端子36に現れる論理レベルにより区別することが可能で
ある。従って、内蔵命令ROM 11のテスト時にはアドレス
入力端子34から内蔵命令ROM 11のアドレス範囲全体をカ
バーする値をマイクロプロセッサ外部から入力し、デー
タ入出力端子30から順に出力される値を逐一チェックす
る必要がある。
In the IIA mode, when the address to be read in the internal instruction ROM 11 is input to the address input terminal 34,
The lower 16 bits or the upper 16 bits of the contents of the instruction word stored at the designated address are transferred through the I bus 35 and output from the data input / output terminal 30. Whether the output data is the lower 16 bits or the upper 16 bits of the contents stored in the built-in instruction ROM 11 can be distinguished by the logic level appearing at the UWI signal output terminal 36. Therefore, when testing the built-in instruction ROM 11, it is necessary to input a value that covers the entire address range of the built-in instruction ROM 11 from the outside of the microprocessor from the address input terminal 34, and to check the values that are sequentially output from the data input / output terminal 30. There is.

【0087】[0087]

【発明が解決しようとする課題】上述のような従来のマ
イクロプロセッサでは、ユーザが容易に行い得るセルフ
テストでは内蔵命令ROM 11 (4kワード×32ビット、即ち
約13万個の記憶素子) のチェックは行われないため、内
蔵命令ROM 11のテストデータを外部に用意して IIAモー
ドによりチェックする必要がある。このため、テスト用
ジグが複雑化し、またユーザによる受入れテストが煩雑
になる等の問題が生じる。
In the conventional microprocessor as described above, the built-in instruction ROM 11 (4k words × 32 bits, that is, about 130,000 storage elements) is checked by the self-test that can be easily performed by the user. Since it is not performed, it is necessary to prepare the test data of the internal instruction ROM 11 externally and check it in IIA mode. Therefore, the test jig becomes complicated, and the user's acceptance test becomes complicated.

【0088】本発明はこのような事情に鑑みてなされた
ものであり、テスト用のデータを外部から与える必要無
しに内蔵命令ROM のテストが行え、簡易なテストで故障
検出率を向上させたマイクロプロセッサの提供を目的と
する。また、従来のマイクロプロセッサが有している命
令を内蔵ROM のテストを行うための命令として兼用する
ことにより、ソフトウェアの節約も図り得るマイクロプ
ロセッサの提供を目的とする。
The present invention has been made in view of the above circumstances, and a built-in instruction ROM can be tested without the need for externally supplying test data, and a micro test with a fault detection rate improved by a simple test. The purpose is to provide a processor. Another object of the present invention is to provide a microprocessor capable of saving software by also using the instructions of a conventional microprocessor as instructions for testing a built-in ROM.

【0089】[0089]

【課題を解決するための手段】本発明のマイクロプロセ
ッサの第1の発明は、プログラムを構成する複数の命令
が格納された命令ROM と、入力されたデータを圧縮して
出力するデータ圧縮器と、データ圧縮器を使用すること
を可能とする信号を入力するための入力端子とを備え、
前述の信号が入力端子に入力されている場合に、命令RO
M 中の1又は複数の命令ワードの内容をデータ圧縮器に
入力して圧縮させる命令が命令ROM に格納されているマ
イクロプロセッサであって、更に前述の命令を用いて命
令ROM 中の命令ワードの内容をデータ圧縮器に入力して
圧縮させる一連の処理を実行する手段を備えたことを特
徴とする。
According to a first aspect of the present invention, there is provided an instruction ROM in which a plurality of instructions constituting a program are stored, and a data compressor for compressing and outputting input data. , With an input terminal for inputting a signal that allows the use of a data compressor,
If the above signal is input to the input terminal, the instruction RO
A microprocessor in which instructions for inputting the contents of one or more instruction words in M to a data compressor for compression are stored in an instruction ROM, and further using the above-mentioned instructions, the instruction words in the instruction ROM It is characterized by comprising means for executing a series of processing for inputting and compressing contents into a data compressor.

【0090】また本発明のマイクロプロセッサの第2の
発明は、プログラムを構成する複数の命令が格納された
命令ROM と、入力されたデータを圧縮して出力するデー
タ圧縮器と、データ圧縮器を使用することを可能とする
信号を入力するための入力端子と、データ圧縮器からの
出力信号の期待値を記憶する記憶手段と、記憶手段に記
憶された期待値とデータ圧縮器からの出力信号とを比較
し、その結果を出力する比較手段とを備え、前述の信号
が前記入力端子に入力されている場合に、命令ROM 中の
1又は複数の命令ワードの内容をデータ圧縮器に入力し
て圧縮させる命令が命令ROM に格納されているマイクロ
プロセッサであって、更に前述の命令を用いて命令ROM
中の命令ワードの内容をデータ圧縮器に入力して圧縮さ
せ、その期待値との比較手段による比較結果を出力させ
る一連の処理を実行する手段を備えたことを特徴とす
る。
The second aspect of the microprocessor of the present invention is to provide an instruction ROM storing a plurality of instructions forming a program, a data compressor for compressing and outputting input data, and a data compressor. An input terminal for inputting a signal that enables use, storage means for storing an expected value of an output signal from the data compressor, an expected value stored in the storage means and an output signal from the data compressor And a comparison means for outputting the result, and when the above-mentioned signal is inputted to the input terminal, the contents of one or more instruction words in the instruction ROM are inputted to the data compressor. A microprocessor in which instructions to be compressed are stored in an instruction ROM
It is characterized in that it comprises means for executing a series of processes for inputting the contents of the instruction word therein to the data compressor for compression and outputting the result of comparison by the means for comparing with the expected value.

【0091】更に本発明のマイクロプロセッサの第3の
発明は、第1の発明に加えてプログラムを構成する複数
の命令を記憶する命令RAM を備え、前述の信号が前述の
入力端子に入力されていない場合に命令ROM 中の1又は
複数の命令ワードの内容を命令RAM に格納する命令を有
し、この命令が前述の信号が入力端子に入力されている
場合には第1の発明の命令として機能するように構成さ
れていることを特徴とする。
Furthermore, a third invention of the microprocessor of the present invention comprises, in addition to the first invention, an instruction RAM for storing a plurality of instructions constituting a program, and the aforementioned signal is inputted to the aforementioned input terminal. If there is not, it has an instruction to store the contents of one or more instruction words in the instruction ROM into the instruction RAM. If this instruction has the above-mentioned signal input to the input terminal, it is regarded as the instruction of the first invention. It is characterized in that it is configured to function.

【0092】更に本発明のマイクロプロセッサの第4の
発明は、第2の発明に加えてプログラムを構成する複数
の命令を記憶する命令RAM を備え、前述の信号が前述の
入力端子に入力されていない場合に命令ROM 中の1又は
複数の命令ワードの内容を命令RAM に格納する命令を有
し、この命令が前述の信号が入力端子に入力されている
場合には第2の発明の命令として機能するように構成さ
れていることを特徴とする。
Furthermore, a fourth invention of the microprocessor of the present invention comprises, in addition to the second invention, an instruction RAM for storing a plurality of instructions constituting a program, and the above-mentioned signal is inputted to the above-mentioned input terminal. If there is not, it has an instruction to store the contents of one or more instruction words in the instruction ROM in the instruction RAM. If this instruction has the above-mentioned signal input to the input terminal, it is regarded as the instruction of the second invention. It is characterized in that it is configured to function.

【0093】また更に本発明のマイクロプロセッサの第
5の発明は、第1の発明に加えてデータ記憶回路を備
え、前述の信号が前述の入力端子に入力されていない場
合にプログラムで処理するデータを記憶するデータ記憶
回路の1または複数のデータを読出す命令、またはデー
タ記憶回路に1または複数のデータを書込む命令を有
し、この命令が前述の信号が入力端子に入力されている
場合には第1の発明の命令として機能するように構成さ
れていることを特徴とする。
Furthermore, a fifth invention of the microprocessor of the present invention comprises a data storage circuit in addition to the first invention, and data processed by a program when the aforementioned signal is not input to the aforementioned input terminal. In the case where there is an instruction to read one or more data of the data storage circuit for storing the data or an instruction to write one or more data to the data storage circuit, and this instruction is input to the above-mentioned signal at the input terminal. Is configured so as to function as the instruction of the first invention.

【0094】更に本発明のマイクロプロセッサの第6の
発明は、第2の発明に加えてデータ記憶回路を備え、前
述の信号が前述の入力端子に入力されていない場合にプ
ログラムで処理するデータを記憶するデータ記憶回路の
1または複数のデータを読出す命令、またはデータ記憶
回路に1または複数のデータを書込む命令を有し、この
命令が前述の信号が入力端子に入力されている場合には
第2の発明の命令として機能するように構成されている
ことを特徴とする。
Furthermore, a sixth invention of the microprocessor of the present invention comprises a data storage circuit in addition to the second invention, and stores data to be processed by a program when the aforementioned signal is not input to the aforementioned input terminal. When there is an instruction to read one or more data of the data storage circuit to be stored or an instruction to write one or more data to the data storage circuit, and this instruction is applied when the aforementioned signal is input to the input terminal. Is configured to function as the instruction of the second invention.

【0095】[0095]

【作用】本発明のマイクロプロセッサの第1の発明で
は、データ圧縮器が使用可能な場合には、命令ROM に記
憶してある命令を用いた一連の処理が実行され、命令RO
M中の各命令ワードの内容が順次読出されてデータ圧縮
器に入力されて圧縮される。
According to the first aspect of the microprocessor of the present invention, when the data compressor can be used, a series of processes using the instructions stored in the instruction ROM are executed, and the instruction RO
The contents of each instruction word in M are sequentially read and input to the data compressor for compression.

【0096】更に第2の発明では、データ圧縮器で圧縮
された結果とその期待値との比較結果が外部へ出力され
る。
Further, in the second invention, the result of comparison between the result compressed by the data compressor and its expected value is output to the outside.

【0097】第3の発明では、所定の信号が入力端子に
入力されている場合には、命令ROMに予め記憶されてい
る通常のプログラムを構成する命令ワードがRAM に一旦
格納され、このRAM に格納されている命令により第1の
発明と同様に動作する。
In the third aspect of the invention, when a predetermined signal is input to the input terminal, the instruction word which constitutes the normal program previously stored in the instruction ROM is once stored in the RAM, and this RAM is stored in this RAM. The stored instructions operate similarly to the first invention.

【0098】第4の発明では、所定の信号が入力端子に
入力されている場合には、命令ROMに予め記憶されてい
る通常のプログラムを構成する命令ワードがRAM に一旦
格納され、このRAM に格納されている命令により第2の
発明と同様に動作する。
In the fourth aspect of the present invention, when a predetermined signal is input to the input terminal, the instruction word which constitutes the normal program previously stored in the instruction ROM is temporarily stored in the RAM, and this RAM is stored in the RAM. The stored instructions operate similarly to the second invention.

【0099】第5の発明では、所定の信号が入力端子に
入力されている場合には、通常はデータ記憶回路に対し
てデータの入出力を行うために命令ROM に予め記憶され
ている命令ワードがRAM に一旦格納され、このRAMに格
納されている命令により第1の発明と同様に動作する。
In the fifth aspect of the invention, when a predetermined signal is input to the input terminal, normally, the instruction word previously stored in the instruction ROM for inputting / outputting data to / from the data storage circuit. Is temporarily stored in the RAM, and the instruction stored in the RAM causes the same operation as in the first invention.

【0100】第6の発明では、所定の信号が入力端子に
入力されている場合には、通常はデータ記憶回路に対し
てデータの入出力を行うために命令ROM に予め記憶され
ている命令ワードがRAM に一旦格納され、このRAMに格
納されている命令により第2の発明と同様に動作する。
According to the sixth aspect of the invention, when a predetermined signal is input to the input terminal, normally, an instruction word stored in advance in the instruction ROM for inputting / outputting data to / from the data storage circuit. Is temporarily stored in the RAM, and the instruction stored in the RAM operates similarly to the second invention.

【0101】[0101]

【実施例】以下、本発明をその実施例を示す図面に基づ
いて詳述する。なお、本発明の説明に参照する各図にお
いて、前述の従来例の説明で参照した各図と同一の参照
符号は同一又は相当部分を示している。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the drawings showing the embodiments. In each of the drawings referred to in the description of the present invention, the same reference numerals as those in the above-described drawings referred to in the description of the conventional example indicate the same or corresponding portions.

【0102】〔実施例1〕まず、本発明のマイクロプロ
セッサの第1の実施例について説明するが、この第1の
実施例には請求項1乃至4にそれぞれ記載されている第
1乃至第4の発明が含まれる。図1は本発明に係るマイ
クロプロセッサの第1の実施例の構成例を示すブロック
図である。図1において、参照符号1はアドレス演算部
(AAU) であり、詳細は後述するが入力端はPバス23に、
出力端は内蔵データRAM2にそれぞれ接続されている。
[Embodiment 1] First, a first embodiment of the microprocessor of the present invention will be described. In the first embodiment, the first to fourth embodiments described in claims 1 to 4 are described. Inventions are included. 1 is a block diagram showing a configuration example of a first embodiment of a microprocessor according to the present invention. In FIG. 1, reference numeral 1 is an address calculation unit.
(AAU), the input end is P bus 23
The output terminals are connected to the built-in data RAM2, respectively.

【0103】内蔵データRAM2はビット長24, ワード長51
2(24ビット×512ワード) の記憶容量を有する2ポート
データRAM であり、データ読出しのためのポートを2系
統備えている他、上述のアドレス演算部(AAU)1及び後述
するDバス24と接続されている。参照符号3は第1の演
算部入力レジスタ(R0), 4は第2の演算部入力レジスタ
(R1)であり、内蔵データRAM2の各データ読出しポートが
それぞれの入力端に接続されている他、それらの入出力
端はDバス24とも接続されており、更にそれらの出力端
は乗算器(FMPL)5 及び演算器(FALU)7 の入力端とも接続
されている。
The built-in data RAM2 has a bit length of 24 and a word length of 51.
It is a 2-port data RAM with a storage capacity of 2 (24 bits x 512 words), has two ports for reading data, and has the above-mentioned address operation unit (AAU) 1 and the D bus 24 described later. It is connected. Reference numeral 3 is the first arithmetic unit input register (R0), and 4 is the second arithmetic unit input register
(R1), each data read port of the built-in data RAM2 is connected to each input end, the input / output ends are also connected to the D bus 24, and the output end thereof is a multiplier ( It is also connected to the input terminals of FMPL) 5 and arithmetic unit (FALU) 7.

【0104】乗算器(FMPL)5 は詳細は後述するが、第1
の演算部入力レジスタ(R0)3及び第2の演算部入力レジ
スタ(R1)4からの出力信号を入力して乗算し、乗算器出
力レジスタ(MR)6 へ出力する。乗算器出力レジスタ(MR)
6 は乗算器(FMPL)5 の乗算結果を保持し、演算器(FALU)
7 へ出力する。演算器(FALU)7 は詳細は後述するが、ア
キュムレータ(ACC)8, 第1の演算部入力レジスタ(R0)
3, 第2の演算部入力レジスタ(R1)4及び乗算器出力レ
ジスタ(MR)6からの出力信号が入力される。アキュムレ
ータ(ACC)8は主として演算器(FALU)7 の演算結果を保持
する他、Dバス24とも接続されている。
The multiplier (FMPL) 5 will be described in detail later.
The output signals from the arithmetic unit input register (R0) 3 and the second arithmetic unit input register (R1) 4 are input, multiplied, and output to the multiplier output register (MR) 6. Multiplier output register (MR)
6 holds the multiplication result of the multiplier (FMPL) 5, and the arithmetic unit (FALU)
Output to 7. The arithmetic unit (FALU) 7 will be described in detail later, but the accumulator (ACC) 8 and the first arithmetic unit input register (R0)
3, output signals from the second arithmetic unit input register (R1) 4 and the multiplier output register (MR) 6 are input. The accumulator (ACC) 8 mainly holds the arithmetic result of the arithmetic unit (FALU) 7, and is also connected to the D bus 24.

【0105】参照符号9は8レベルのスタックであり、
プログラムカウンタ(PC)10の値 (プログラムカウンタ
値) を必要に応じて保持する。プログラムカウンタ(PC)
10は、次にフェッチすべき命令の命令メモリ、具体的に
は後述する内蔵命令ROM 11及び内蔵共有RAM(CRAM)12 に
おけるアドレスを順次計数する。このプログラムカウン
タ(PC)10からの出力信号は内蔵命令ROM 11及び内蔵共有
RAM(CRAM)12 に与えられている。
Reference numeral 9 is an 8-level stack,
Holds the value of the program counter (PC) 10 (program counter value) as necessary. Program counter (PC)
Reference numeral 10 sequentially counts addresses in an instruction memory of an instruction to be fetched next, specifically, an internal instruction ROM 11 and an internal shared RAM (CRAM) 12 described later. The output signal from this program counter (PC) 10 is built-in instruction ROM 11 and built-in shared
It is given to RAM (CRAM) 12.

【0106】内蔵命令ROM 11は32ビット×4kワードの容
量であり、プログラムカウンタ(PC)10から与えられるプ
ログラムカウンタ値に対応するアドレスに記憶している
命令ワードを出力する。内蔵共有RAM(CRAM)12 は命令と
データとに共通なメモリであり、32ビット×64ワードの
容量を有している。この内蔵共有RAM(CRAM)12 に記憶さ
れている値はデータワードとしても命令ワードとしても
使用することが可能である。
The built-in instruction ROM 11 has a capacity of 32 bits × 4 k words, and outputs the instruction word stored in the address corresponding to the program counter value given from the program counter (PC) 10. A built-in shared RAM (CRAM) 12 is a memory common to instructions and data, and has a capacity of 32 bits × 64 words. The value stored in the internal shared RAM (CRAM) 12 can be used as a data word or an instruction word.

【0107】内蔵共有RAM(CRAM)12 に格納されている値
が命令ワードとして使用される場合は、プログラムカウ
ンタ(PC)10から与えられるプログラムカウンタ値に対応
するアドレスに記憶されている命令ワードが出力される
か、または命令レジスタ(IR)13の値がそのアドレスに記
憶される。
When the value stored in the internal shared RAM (CRAM) 12 is used as the instruction word, the instruction word stored at the address corresponding to the program counter value given from the program counter (PC) 10 is It is output or the value of the instruction register (IR) 13 is stored at that address.

【0108】一方、内蔵共有RAM(CRAM)12 に格納されて
いる値がデータワードとして使用される場合は、アドレ
ス演算部(AAU)1またはアドレス入出力端子34から与えら
れるアドレス値に対応するアドレスに記憶されているデ
ータワードの上位16ビットまたは下位16ビットがIバス
35を通じてデータレジスタ(DR)18またはデータ入出力端
子30へ出力されるか、またはデータレジスタ(DR)18また
はデータ入出力端子30からIバス35を通じてデータワー
ドがそのアドレスの上位16ビットまたは下位16ビットに
記憶される。
On the other hand, when the value stored in the built-in shared RAM (CRAM) 12 is used as a data word, the address corresponding to the address value given from the address arithmetic unit (AAU) 1 or the address input / output terminal 34. Upper 16 bits or lower 16 bits of the data word stored in the I bus
35 is output to the data register (DR) 18 or the data input / output terminal 30 through 35, or the data word is output from the data register (DR) 18 or the data input / output terminal 30 through the I bus 35 to the upper 16 bits or the lower 16 bits of the address. Stored in bits.

【0109】この際、上位16ビットかまたは下位16ビッ
トかの区別は後述するUWI(Upper Word of Instruction)
信号出力端子36からの出力信号の論理レベルで区別可能
である他、フラグレジスタ(FR)32の特定ビットに反映さ
れるため、後述する命令セット中のシーケンス命令によ
りプログラムで判定可能である。なお、この UWI信号出
力端子36から出力される UWI信号は、図示されていない
が、内蔵共有RAM(CRAM)12 の制御部で発生される。ま
た、 UWI信号出力端子36及びフラグレジスタ(FR)32の特
定ビットの論理値は内蔵共有RAM(CRAM)12 に対する1回
のアクセスの都度反転する。
At this time, the distinction between the upper 16 bits and the lower 16 bits is made by UWI (Upper Word of Instruction) described later.
In addition to being distinguishable by the logical level of the output signal from the signal output terminal 36, since it is reflected in a specific bit of the flag register (FR) 32, it can be determined by a program by a sequence instruction in the instruction set described later. The UWI signal output from the UWI signal output terminal 36 is generated by the control unit of the built-in shared RAM (CRAM) 12, though not shown. Further, the logical values of the specific bits of the UWI signal output terminal 36 and the flag register (FR) 32 are inverted each time the built-in shared RAM (CRAM) 12 is accessed once.

【0110】命令レジスタ(IR)13は、内蔵命令ROM 11又
は内蔵共有RAM(CRAM)12 から読出された次に実行される
べき命令ワードを保持する。命令レジスタ(IR)13からの
出力信号は命令デコーダ14,Pバス23及び内蔵共有RAM
(CRAM)12 に与えられる。命令デコーダ14は、命令レジ
スタ(IR)13が保持している命令ワードをデコードし、そ
のデコード結果に基づいてこのマイクロプロセッサ各部
の動作を制御する。
The instruction register (IR) 13 holds the instruction word to be executed next, which is read from the internal instruction ROM 11 or the internal shared RAM (CRAM) 12. The output signal from the instruction register (IR) 13 is the instruction decoder 14, P bus 23 and built-in shared RAM.
(CRAM) 12 is given. The instruction decoder 14 decodes the instruction word held by the instruction register (IR) 13 and controls the operation of each part of the microprocessor based on the decoding result.

【0111】参照符号15はこのマイクロプロセッサ内部
の動作モードを設定するコントロールレジスタであり、
リセット処理により初期化される。このコントロールレ
ジスタ15はPバス23から即値が入力される他、Dバス24
を介したデータの入出力が可能である。参照符号16はダ
イレクトメモリアクセスコントローラ(DMA), 17はシリ
アル I/Oインタフェイス(SI/O), 18はデータレジスタ(D
R)である。参照符号19はシグネチャレジスタであり、疑
似乱数発生及びデータ圧縮を行う。
Reference numeral 15 is a control register for setting the operation mode inside the microprocessor.
It is initialized by the reset process. The control register 15 receives an immediate value from the P bus 23 and also has a D bus 24.
It is possible to input and output data via. Reference numeral 16 is a direct memory access controller (DMA), 17 is a serial I / O interface (SI / O), 18 is a data register (D
R). Reference numeral 19 is a signature register, which performs pseudo random number generation and data compression.

【0112】参照符号20は割込みコントローラ, 21はク
ロック/リセット信号発生回路(CLK/RST), 22はクロッ
クプリスケーラ(CPR) である。参照符号23は命令により
レジスタに即値を入力するPバス、24は各レジスタ (参
照符号3, 4, 8, 15, 16, 17, 18, 19, 32)あるいは内蔵
データRAM2及びプログラムカウンタ(PC)10間でデータの
送受を行うDバス, 25はダイレクトメモリアクセス時に
ダイレクトメモリアクセスコントローラ(DMA)16 により
制御されてシリアルI/O インタフェイス17と図示しない
外部データメモリとの間でのデータ送受を行うSバスで
ある。
Reference numeral 20 is an interrupt controller, 21 is a clock / reset signal generation circuit (CLK / RST), and 22 is a clock prescaler (CPR). Reference numeral 23 is a P bus for inputting an immediate value to a register by an instruction, 24 is each register (reference numerals 3, 4, 8, 15, 16, 17, 18, 19, 32) or built-in data RAM 2 and program counter (PC) The D bus for transmitting and receiving data between 10 and 25 is controlled by the direct memory access controller (DMA) 16 during direct memory access, and transmits and receives data between the serial I / O interface 17 and an external data memory (not shown). It is S bus to do.

【0113】参照符号26は第1割込み信号(INT1)入力端
子,27は第2割込み信号(INT2)入力端子, 28はテストモ
ード設定信号(TEST)入力端子, 29は後述する IIAモード
設定信号(IIA) 入力端子, 40はマスク不可割込み信号(N
MI) 入力端子である。参照符号30は24ビット長のデータ
入出力端子であり、前述のレジスタ18, 19、Dバス24,
Sバス25及び後述するIバス35と外部データメモリ (図
示せず) との間でのデータ転送に使用される。
Reference numeral 26 is a first interrupt signal (INT1) input terminal, 27 is a second interrupt signal (INT2) input terminal, 28 is a test mode setting signal (TEST) input terminal, and 29 is an IIA mode setting signal (to be described later). IIA) Input terminal, 40 is non-maskable interrupt signal (N
MI) Input terminal. Reference numeral 30 is a 24-bit data input / output terminal, and includes the registers 18, 19, D bus 24,
It is used for data transfer between the S bus 25 and I bus 35 described later and an external data memory (not shown).

【0114】参照符号31はリセット信号(NRESET)入力端
子であり、このマイクロプロセッサ全体をリセットする
ためのリセット信号(NRESET)の入力に使用される。参照
符号32はフラグレジスタ(FR)であり、演算器(FALU)7 の
演算結果, 各入力端子の論理レベルあるいはこのマイク
ロプロセッサの内部動作モードを示す。このフラグレジ
スタ(FR)32は上述のリセット信号(NRESET)が入力された
際のリセット処理により初期化される。
Reference numeral 31 is a reset signal (NRESET) input terminal, which is used to input a reset signal (NRESET) for resetting the entire microprocessor. Reference numeral 32 is a flag register (FR) that indicates the operation result of the operation unit (FALU) 7, the logic level of each input terminal or the internal operation mode of this microprocessor. The flag register (FR) 32 is initialized by the reset process when the above-mentioned reset signal (NRESET) is input.

【0115】参照符号33はクロック信号(CLK) 入力端子
であり、本発明のマイクロプロセッサはこのクロック信
号入力端子33から入力されるクロック信号(CLK) に同期
して動作する。参照符号34は16ビット長のアドレス入出
力端子であり、図示しない外部データメモリのアドレス
を出力し、また後述する IIAモードにおいて内蔵命令RO
M 11及び内蔵共有RAM(CRAM)12 のアドレスを外部から入
力して指定する。
Reference numeral 33 is a clock signal (CLK) input terminal, and the microprocessor of the present invention operates in synchronization with the clock signal (CLK) input from the clock signal input terminal 33. Reference numeral 34 is an address input / output terminal having a 16-bit length, which outputs the address of an external data memory (not shown), and the internal instruction RO in the IIA mode described later.
Addresses of M 11 and built-in shared RAM (CRAM) 12 are specified by external input.

【0116】参照符号35は内蔵命令ROM 11または内蔵共
有RAM(CRAM)12 と、データレジスタ(DR)18またはデータ
入出力端子30間でデータを転送する際に使用されるIバ
スであり、16ビットのビット長を有する。参照符号36は
Iバス35により転送されるデータが内蔵命令ROM 11また
は内蔵共有RAM(CRAM)12 の上位16ビットに対するもの
か、あるいは下位16ビットに対するものかを示すUWI(Up
per Word of Instruction)信号出力端子である。
Reference numeral 35 is an I bus used for transferring data between the built-in instruction ROM 11 or the built-in shared RAM (CRAM) 12 and the data register (DR) 18 or the data input / output terminal 30. It has a bit length of bits. Reference numeral 36 indicates UWI (Up) indicating whether the data transferred by the I bus 35 is for the upper 16 bits or the lower 16 bits of the internal instruction ROM 11 or the internal shared RAM (CRAM) 12.
per Word of Instruction) signal output terminal.

【0117】以上の構成は基本的には従来例として前述
した本願出願人による出願に係る特開平2-176943号の発
明と同一である。
The above construction is basically the same as the invention of Japanese Patent Application Laid-Open No. 2-176943 filed by the applicant of the present application as a conventional example.

【0118】本発明のマイクロプロセッサの第1, 第
2, 第3及び第4の発明の構成では上述の特開平2-1769
43号と共通の構成の他に、制御回路37が備えられてい
る。
In the configuration of the first, second, third and fourth inventions of the microprocessor of the present invention, the above-mentioned Japanese Patent Laid-Open No. 2-1769 is used.
In addition to the configuration common to No. 43, a control circuit 37 is provided.

【0119】この制御回路37は、従来例において説明し
た WINCR命令, ENDWC命令がセルフテストモードにより
実行される際に、命令デコーダ14, 内蔵共有RAM(CRAM)1
2,プログラムカウンタ(PC)10及びシグネチャレジスタ19
を制御するために備えられている。このため、制御回路
37には前述のテストモード設定信号入力端子28,IIAモー
ド設定信号入力端子29, リセット信号入力端子31が接続
されている。そして、制御回路37からは内蔵命令ROM テ
スト信号(ROMTEST) がプログラムカウンタ(PC)10, 内蔵
共有RAM(CRAM)12,命令デコーダ14及びシグネチャレジス
タ19に与えられている。また、内蔵命令ROM 11から出力
される命令ワードを命令レジスタ(IR)13を介して受取る
ために内蔵命令ROM 11とも接続されており、更にDバス
24を介して命令ワードをシグネチャレジスタ19に送出す
るためにDバス24とも接続されている。
The control circuit 37 includes an instruction decoder 14 and a built-in shared RAM (CRAM) 1 when the WINCR instruction and ENDWC instruction described in the conventional example are executed in the self test mode.
2, program counter (PC) 10 and signature register 19
It is equipped to control. Therefore, the control circuit
The test mode setting signal input terminal 28, the IIA mode setting signal input terminal 29, and the reset signal input terminal 31 are connected to 37. Then, from the control circuit 37, a built-in instruction ROM test signal (ROMTEST) is given to the program counter (PC) 10, built-in shared RAM (CRAM) 12, instruction decoder 14 and signature register 19. It is also connected to the built-in instruction ROM 11 to receive the instruction word output from the built-in instruction ROM 11 via the instruction register (IR) 13, and further to the D bus.
It is also connected to the D bus 24 for sending the instruction word to the signature register 19 via 24.

【0120】また、参照符号38は比較回路であり、Pバ
ス23及びシグネチャレジスタ19に接続されている他、制
御回路37からは CTRLSIG信号が与えられている。この C
TRLSIG信号は、シグネチャレジスタ19内で圧縮されたデ
ータをHALT命令に予め書込まれているデータと比較して
出力端子39から出力させるための信号である。
Further, reference numeral 38 is a comparison circuit, which is connected to the P bus 23 and the signature register 19 and receives a CTRLSIG signal from the control circuit 37. This C
The TRLSIG signal is a signal for comparing the data compressed in the signature register 19 with the data previously written in the HALT instruction and outputting it from the output terminal 39.

【0121】なお本発明に係るマイクロプロセッサの第
1, 第2, 第3及び第4の発明においては、上述の各構
成部分の内の前述の従来と同一の参照符号を有する各部
分の構成, 動作, 命令フォーマット及び演算器(FALU)7
のセルフテストプログラム等は従来例と全く同一である
ので説明を省略する。
In the first, second, third and fourth inventions of the microprocessor according to the present invention, among the above-mentioned respective constituent parts, the structure of each part having the same reference numeral as the above-mentioned conventional one, Operation, instruction format and operation unit (FALU) 7
Since the self-test program and the like are completely the same as those of the conventional example, the description thereof is omitted.

【0122】図2は、図1に示されたマイクロプロセッ
サの制御回路37の詳細な構成とその周辺部分の構成とを
示すブロック図である。
FIG. 2 is a block diagram showing the detailed structure of the control circuit 37 of the microprocessor shown in FIG. 1 and the structure of its peripheral portion.

【0123】制御回路37は、 XOR回路371, WINCRデコ
ーダ372, ENDWCデコーダ373, 2入力 ANDゲート374, 3
75, 381, 3入力ORゲート376, インバータ377, 378, RS
フリップフロップ379 及びHALTデコーダ380 等にて構成
されている。
The control circuit 37 includes an XOR circuit 371, a WINCR decoder 372, an ENDWC decoder 373, a 2-input AND gate 374, 3
75, 381, 3-input OR gate 376, inverter 377, 378, RS
It is composed of a flip-flop 379, a HALT decoder 380, and the like.

【0124】XOR回路371 は入力端が命令レジスタ(IR)1
3に、出力端がDバス24にそれぞれ接続されており、内
蔵命令ROMテスト信号(ROMTEST) がアクティブである場
合に、命令レジスタ(IR)13からの出力信号の下位24ビッ
ト(b0-b23)と上位24ビット(b8-b31)とのビット差(XOR)
をとり、この結果の24ビット幅の信号をバス転送のソー
スデータとしてDバス24へ出力する。
The input end of the XOR circuit 371 is the instruction register (IR) 1
3, the output terminals are connected to the D bus 24 respectively, and when the built-in instruction ROM test signal (ROMTEST) is active, the lower 24 bits (b0-b23) of the output signal from the instruction register (IR) 13 Difference (XOR) between the upper 24 bits (b8-b31)
The resulting 24-bit width signal is output to the D bus 24 as source data for bus transfer.

【0125】WINCRデコーダ372 は入力端が命令レジス
タ(IR)13に、出力端が ANDゲート375 にそれぞれ接続さ
れており、命令レジスタ(IR)13からの出力信号が WINCR
命令である場合にその ANDゲート375 への出力信号(XWI
NCR)をアクティブにする。ENDWCデコーダ373 は入力端
が命令レジスタ(IR)13に、出力端がORゲート376にそれ
ぞれ接続されており、命令レジスタ(IR)13からの出力信
号が ENDWC命令である場合にそのORゲート376 への出力
信号(XENDWC)をアクティブにする。
The input terminal of the WINCR decoder 372 is connected to the instruction register (IR) 13 and the output terminal thereof is connected to the AND gate 375. The output signal from the instruction register (IR) 13 is WINCR.
If it is an instruction, the output signal (XWI
NCR) to activate. The ENDWC decoder 373 has an input end connected to the instruction register (IR) 13 and an output end connected to the OR gate 376, and when the output signal from the instruction register (IR) 13 is the ENDWC instruction, it is connected to the OR gate 376. Activate the output signal (XENDWC) of.

【0126】ANDゲート374 にはその両入力にテストモ
ード設定信号入力端子28と IIAモード設定信号入力端子
29とがそれぞれ接続されており、両入力信号のビット積
(AND) をとったセルフテストモード信号(XSELF) を AND
ゲート375, 381及びインバータ377 へ出力している。AN
Dゲート375 は ANDゲート374 からの出力信号であるセ
ルフテストモード信号(XSELF) と WINCRデコーダ372 か
らの出力信号であるXWINCR信号とのビット積(AND) をと
ってRSフリップフロップ379 のセット端子Sへ与えてい
る。ANDゲート381 は ANDゲート374 からの出力信号で
あるセルフテストモード信号(XSELF) とHALTデコーダ37
2 からの出力信号である XHALT信号とのビット積(AND)
をとって比較回路38へ CTRLSIG信号を与えている。
The AND gate 374 has a test mode setting signal input terminal 28 and an IIA mode setting signal input terminal for both inputs.
29 are connected to each other, and the bit product of both input signals
AND the self-test mode signal (XSELF)
Outputs to gates 375, 381 and inverter 377. AN
The D gate 375 takes the bit product (AND) of the self test mode signal (XSELF) which is the output signal from the AND gate 374 and the XWINCR signal which is the output signal from the WINCR decoder 372, and sets the terminal S of the RS flip-flop 379. Giving to. The AND gate 381 outputs the self test mode signal (XSELF) output from the AND gate 374 and the HALT decoder 37.
Bit product (AND) with XHALT signal which is output signal from 2
Then, the CTRLSIG signal is given to the comparison circuit 38.

【0127】ORゲート376 の他の2入力には両インバー
タ377, 378からの出力信号が与えられている。インバー
タ377 からの出力信号は ANDゲート374 からの出力信号
であるセルフテストモード信号(XSELF) の反転信号であ
り、インバータ378 からの出力信号はリセット信号入力
端子31から入力されるリセット信号NRESETの反転信号で
ある。そして、ORゲート376 からの出力信号はRSフリッ
プフロップ379 のリセット端子Rに与えられている。
Output signals from both inverters 377 and 378 are applied to the other two inputs of the OR gate 376. The output signal from the inverter 377 is the inverted signal of the self-test mode signal (XSELF) which is the output signal from the AND gate 374, and the output signal from the inverter 378 is the inverted signal of the reset signal NRESET input from the reset signal input terminal 31. It is a signal. The output signal from the OR gate 376 is applied to the reset terminal R of the RS flip-flop 379.

【0128】RSフリップフロップ379 の出力端子Qから
の出力信号が内蔵命令ROM テスト信号(ROMTEST) であ
り、前述の如くプログラムカウンタ(PC)10, 内蔵共有RA
M(CRAM)12,命令デコーダ14及びシグネチャレジスタ19に
与えられている他、 XOR回路371 等の制御回路37の各部
を制御する。
The output signal from the output terminal Q of the RS flip-flop 379 is the built-in instruction ROM test signal (ROMTEST). As described above, the program counter (PC) 10 and built-in shared RA
It is provided to the M (CRAM) 12, the instruction decoder 14, and the signature register 19, and also controls each part of the control circuit 37 such as the XOR circuit 371.

【0129】HALTデコーダ380 は入力端が命令レジスタ
(IR)13に、出力端が ANDゲート381にそれぞれ接続され
ており、命令レジスタ(IR)13の出力信号がHALT命令であ
る場合にその ANDゲート381 への出力信号(XHALT) をア
クティブにする。
The input terminal of the HALT decoder 380 is an instruction register
When the output terminal of (IR) 13 is connected to AND gate 381, and the output signal of instruction register (IR) 13 is HALT instruction, activate the output signal (XHALT) to AND gate 381. ..

【0130】なお、図15にニーモニックにて示されて
いるHALT命令は、図40乃至図46に示されているセル
フテストプログラムの末尾に位置していてセルフテスト
の実行を停止させる命令であり、通常はテストプログラ
ムを停止させるのみである。しかしながら、上述の如く
セルフテストモード信号(XSELF) がアクティブである場
合は ANDゲート381 からの出力信号(CTRLSIG) がアクテ
ィブになるので、比較回路38はシグネチャレジスタ19内
で圧縮されたデータと、命令レジスタ(IR)13からPバス
23を介して比較回路38へ転送されたHALT命令の下位24ビ
ットとを比較し、全ビットが一致したかまたは1ビット
でも不一致であったかを検出して”1”または”0”の
1 ビットの信号を出力端子39から出力する。
The HALT instruction shown by a mnemonic in FIG. 15 is an instruction located at the end of the self-test program shown in FIGS. 40 to 46 and stopping the execution of the self-test. Normally it just stops the test program. However, as described above, when the self-test mode signal (XSELF) is active, the output signal (CTRLSIG) from the AND gate 381 becomes active, so that the comparison circuit 38 compares the data compressed in the signature register 19 with the instruction Register (IR) 13 to P bus
The lower 24 bits of the HALT instruction transferred to the comparison circuit 38 via 23 are compared, and it is detected whether all the bits match or even one bit does not match, and "1" or "0" is detected.
A 1-bit signal is output from output terminal 39.

【0131】このような制御回路37の動作は以下の如く
である。
The operation of the control circuit 37 as described above is as follows.

【0132】リセット信号入力端子31へ入力されている
リセット信号(NRESET)がアクティブになると、インバー
タ378 にて反転されてORゲート376 を通じてRSフリップ
フロップ379 のリセット端子に与えられるので、RSフリ
ップフロップ379 からの出力信号である内蔵命令ROM テ
スト信号(ROMTEST) は非アクティブに固定される。
When the reset signal (NRESET) input to the reset signal input terminal 31 becomes active, it is inverted by the inverter 378 and given to the reset terminal of the RS flip-flop 379 through the OR gate 376. The internal instruction ROM test signal (ROMTEST), which is the output signal from, is fixed to inactive.

【0133】リセット信号(NRESET)が非アクティブにな
り、テストモード設定信号入力端子28及び IIAモード設
定信号入力端子29に与えられているテストモード設定信
号(TEST)及び IIAモード設定信号(IIA) が共にアクティ
ブになると、 ANDゲート374からの出力信号であるセル
フテストモード信号(XSELF) がアクティブになる。この
際、命令レジスタ(IR)13から WINCR命令の命令ワードが
出力されると、 WINCRデコーダ372 がそれをデコードし
てXWINCR信号をアクティブにして ANDゲート375 へ出力
する。これにより、RSフリップフロップ379 のセット端
子SにアクティブなXWINCR信号が与えられてRSフリップ
フロップ379 がセットされ、RSフリップフロップ379 か
らの出力信号である内蔵命令ROM テスト信号(ROMTEST)
がアクティブに固定される。この結果、マイクロプロセ
ッサのモードは内蔵命令ROM 11をテストするためのテス
トモードになる。
The reset signal (NRESET) becomes inactive, and the test mode setting signal (TEST) and IIA mode setting signal (IIA) given to the test mode setting signal input terminal 28 and the IIA mode setting signal input terminal 29 are changed. When both are active, the self-test mode signal (XSELF), which is the output signal from the AND gate 374, becomes active. At this time, when the instruction word of the WINCR instruction is output from the instruction register (IR) 13, the WINCR decoder 372 decodes it and activates the XWINCR signal to output it to the AND gate 375. As a result, the active XWINCR signal is given to the set terminal S of the RS flip-flop 379 to set the RS flip-flop 379, and the internal instruction ROM test signal (ROMTEST) which is the output signal from the RS flip-flop 379.
Is fixed active. As a result, the mode of the microprocessor becomes the test mode for testing the internal instruction ROM 11.

【0134】この後、命令レジスタ(IR)13から ENDWC命
令の命令ワードが出力されると、 ENDWCデコーダ373 が
それをデコードしてXENDWC命令をアクティブにしてORゲ
ート376 へ出力する。これによりRSフリップフロップ37
9 のリセット端子RにアクティブなXENDWCが与えられて
RSフリップフロップ379 がリセットされ、RSフリップフ
ロップ379 からの出力信号である内蔵命令ROM テスト信
号(ROMTEST) が非アクティブに固定される。また、テス
トモード設定信号(TEST)またはIIAモード設定信号(IIA)
のいずれかが非アクティブになってもそれが ANDゲー
ト374,インバータ377 及びORゲート376 を介してRSフリ
ップフロップ379 のリセット端子Rに与えられるので、
内蔵命令ROM テスト信号(ROMTEST)は非アクティブに固
定される。この結果、内蔵命令ROM 11のテストのための
テストモードが解除される。
After that, when the instruction word of the ENDWC instruction is output from the instruction register (IR) 13, the ENDWC decoder 373 decodes it and activates the XENDWC instruction to output it to the OR gate 376. This makes the RS flip-flop 37
Active XENDWC is given to reset terminal R of 9
The RS flip-flop 379 is reset, and the internal instruction ROM test signal (ROMTEST), which is the output signal from the RS flip-flop 379, is fixed to inactive. Also, test mode setting signal (TEST) or IIA mode setting signal (IIA)
Even if any of the above becomes inactive, it is given to the reset terminal R of the RS flip-flop 379 through the AND gate 374, the inverter 377 and the OR gate 376.
The internal instruction ROM test signal (ROMTEST) is fixed to inactive. As a result, the test mode for testing the internal instruction ROM 11 is released.

【0135】次に、内蔵命令ROM テスト信号(ROMTEST)
がアクティブになった場合の制御内容を以下に説明す
る。
Next, the internal instruction ROM test signal (ROMTEST)
The control contents when is activated will be described below.

【0136】プログラムカウンタ(PC)10は内蔵命令ROM
テスト信号(ROMTEST) がアクティブである場合は、現在
のアドレスから各マシンサイクル毎に”1”ずつインク
リメントするが、内蔵命令ROM 11のアドレスの範囲を越
えることはなく、その範囲内で循環する。具体的には、
プログラムカウンタ(PC)10のカウント値が内蔵命令ROM
11の最上位アドレスになるとその次は最下位アドレスに
戻される。
The program counter (PC) 10 is a built-in instruction ROM
When the test signal (ROMTEST) is active, it is incremented by "1" for each machine cycle from the current address, but it does not exceed the address range of the built-in instruction ROM 11 and circulates within that range. In particular,
Program counter (PC) 10 count value is built-in instruction ROM
When the 11th highest address is reached, the next is returned to the lowest address.

【0137】内蔵共有RAM(CRAM)12 は内蔵命令ROM テス
ト信号(ROMTEST) がアクティブである場合は、命令レジ
スタ(IR)13からの出力信号を格納しない。命令デコーダ
14は内蔵命令ROM テスト信号(ROMTEST) がアクティブで
ある場合は、命令レジスタ(IR)13からの出力信号をデコ
ードせず、従って命令を実行することはない。
The internal shared RAM (CRAM) 12 does not store the output signal from the instruction register (IR) 13 when the internal instruction ROM test signal (ROMTEST) is active. Instruction decoder
When the internal instruction ROM test signal (ROMTEST) is active, 14 does not decode the output signal from the instruction register (IR) 13 and therefore does not execute the instruction.

【0138】シグネチャレジスタ19は内蔵命令ROM テス
ト信号(ROMTEST) がアクティブである場合は、Dバス24
を用いたバス転送のデスティネーションとなる。また X
OR回路371 も内蔵命令ROM テスト信号(ROMTEST) がアク
ティブである場合は、前述のような動作を実行する。
The signature register 19 uses the D bus 24 when the internal instruction ROM test signal (ROMTEST) is active.
Will be the destination of the bus transfer using. See also X
The OR circuit 371 also performs the above-described operation when the built-in instruction ROM test signal (ROMTEST) is active.

【0139】従って、内蔵命令ROM 11から出力された命
令ワードは、命令レジスタ(IR)13,XOR回路371,Dバス24
を経由してシグネチャレジスタ19に圧縮され、データ入
出力端子30からマイクロプロセッサ外部へ出力される。
Therefore, the instruction word output from the internal instruction ROM 11 is the instruction register (IR) 13, the XOR circuit 371, and the D bus 24.
It is compressed in the signature register 19 via and is output from the data input / output terminal 30 to the outside of the microprocessor.

【0140】図3は内蔵命令ROM 11をテストするための
プログラム例を示す模式図、図4はその処理手順を示す
フローチャートである。
FIG. 3 is a schematic diagram showing an example of a program for testing the built-in instruction ROM 11, and FIG. 4 is a flow chart showing its processing procedure.

【0141】図3において、ラベル「ROM:」は内蔵命令
ROM 11をテストする際の開始アドレスである。ラベル
「TEST: 」は従来例で示した通常のセルフテストの実行
開始アドレスである。また、内蔵命令ROM 11中の WINCR
命令と ENDCR命令との間がシグネチャ圧縮されるので、
図3に示されているように ENDWC命令を配置すると、内
蔵命令ROM 11中のほとんどの部分、具体的にはENDWC,JP
TEST, WINCR 以外の部分がシグネチャ圧縮される。
In FIG. 3, the label "ROM:" is a built-in instruction.
This is the starting address when testing ROM 11. The label "TEST:" is the execution start address of the normal self-test shown in the conventional example. In addition, WINCR in built-in instruction ROM 11
Since the signature is compressed between the instruction and the ENDCR instruction,
When the ENDWC instruction is placed as shown in Figure 3, most of the internal instruction ROM 11, specifically ENDWC, JP
Signature compression is applied to all parts except TEST and WINCR.

【0142】図4のフローチャートのステップS1におい
て、任意アドレスからプログラムの実行を開始するリセ
ット処理を用いて内蔵命令ROM 11内の WINCR命令が記述
されているアドレス(ROM:)へリセットスタートする。
In step S1 of the flow chart of FIG. 4, a reset process for starting program execution from an arbitrary address is used to reset and start to the address (ROM :) in the built-in instruction ROM 11 where the WINCR instruction is described.

【0143】ステップS2において、マイクロプロセッサ
の動作モードがセルフテストモードに設定され、内蔵命
令ROM 11中の命令ワードの内容をシグネチャレジスタ19
に圧縮するテストが開始される。
In step S2, the operation mode of the microprocessor is set to the self-test mode, and the contents of the instruction word in the internal instruction ROM 11 are changed to the signature register 19
The compression test is started.

【0144】ステップS3において、 ENDWC命令により内
蔵命令ROM 11中の命令ワードの内容を圧縮するテストを
それが終了される条件になるまで継続して実行する。こ
の際、プログラムカウンタ(PC)10は内蔵命令ROM 11のア
ドレスの範囲を循環して”1”ずつインクリメントす
る。
In step S3, the test for compressing the contents of the instruction word in the internal instruction ROM 11 is continuously executed by the ENDWC instruction until the condition is reached. At this time, the program counter (PC) 10 circulates in the address range of the internal instruction ROM 11 and increments by "1".

【0145】ステップS4において、従来例で使用された
内蔵命令ROM11以外のセルフテストを実行するエントリ
アドレス(TEST:) へ制御が移される。
At step S4, control is transferred to an entry address (TEST :) other than the built-in instruction ROM 11 used in the conventional example, which executes a self test.

【0146】ステップS5においては、従来例と同様のセ
ルフテストが実行される。
In step S5, the same self test as in the conventional example is executed.

【0147】マイクロプロセッサの動作モードがセルフ
テストモードに設定されている場合、HALT命令がHALTデ
コーダ380 でデコードされると、前述の如く比較回路38
に与えられている CTRLSIG信号がアクティブになる。こ
の場合、HALT命令の下位24ビットにはシグネチャレジス
タ19によるデータ圧縮結果との比較対象とされるデータ
が書込まれており、このデータがPバス23を通じて比較
回路38へ送られるので、比較回路38はシグネチャレジス
タ19内で圧縮されたデータと比較してその比較結果を出
力端子39から出力する。
When the HALT instruction is decoded by the HALT decoder 380 when the operation mode of the microprocessor is set to the self-test mode, the comparison circuit 38 is operated as described above.
The CTRL SIG signal given to is activated. In this case, in the lower 24 bits of the HALT instruction, the data to be compared with the data compression result by the signature register 19 is written, and this data is sent to the comparison circuit 38 through the P bus 23. 38 compares the data compressed in the signature register 19 and outputs the comparison result from the output terminal 39.

【0148】〔実施例2〕次に、本発明のマイクロプロ
セッサの第2の実施例について説明するが、この第1の
実施例には請求項5及び6にそれぞれ記載されている第
5及び第6の発明が含まれる。以下、本発明のマイクロ
プロセッサの第2の実施例について、その構成例を示す
図53のブロック図を参照して説明する。本発明の第2
の実施例の構成は、基本的には前述の図1に示されてい
る第1の実施例の構成と同様であるが、以下に説明する
部分のみが異なる。即ち、本発明のマイクロプロセッサ
の第2の実施例では、前述の第1の実施例の制御回路37
とは構成が異なる図54にその構成を示す如き制御回路
41が備えられている。そして、これに伴って制御回路41
周辺の部分の若干の構成も異なっている。具体的には以
下の如くである。
[Embodiment 2] Next, a second embodiment of the microprocessor of the present invention will be described. In the first embodiment, the fifth and fifth embodiments described in claims 5 and 6 respectively are described. Six inventions are included. The second embodiment of the microprocessor of the present invention will be described below with reference to the block diagram of FIG. Second of the present invention
The configuration of this embodiment is basically the same as the configuration of the first embodiment shown in FIG. 1 described above, but only the portions described below are different. That is, in the second embodiment of the microprocessor of the present invention, the control circuit 37 of the first embodiment described above is used.
A control circuit having a configuration different from that shown in FIG.
41 are equipped. Then, along with this, the control circuit 41
The configuration of the peripheral part is also slightly different. Specifically, it is as follows.

【0149】制御回路41は、命令による外部データRAM
(図示せず) に対するデータの読み書きがセルフテスト
モードにより実行される際に、アドレス演算部(AAU)1,
内蔵命令ROM 11及びデータレジスタ(DR)18を制御するた
めに備えられている。このため、制御回路41には第1の
実施例の構成において備えられている制御回路37と同様
に、テストモード設定信号入力端子28, IIAモード設定
信号入力端子29及びリセット信号入力端子31が接続され
ている。そして、制御回路41からは、内蔵命令ROM テス
ト信号(ROMTEST) がアドレス演算部(AAU)1, 内蔵命令RO
M 11及びデータレジスタ(DR)18に与えられている。ま
た、内蔵命令ROM 11から出力される命令ワードを命令レ
ジスタ(IR)13を介して受取るために、制御回路41は命令
レジスタ(IR)13とも接続されている。
The control circuit 41 is an external data RAM according to an instruction.
When data is read from or written to (not shown) in the self-test mode, the address operation unit (AAU) 1,
It is provided to control the built-in instruction ROM 11 and the data register (DR) 18. Therefore, the control circuit 41 is connected to the test mode setting signal input terminal 28, the IIA mode setting signal input terminal 29, and the reset signal input terminal 31 as in the control circuit 37 provided in the configuration of the first embodiment. Has been done. Then, from the control circuit 41, the built-in instruction ROM test signal (ROMTEST) outputs the address operation unit (AAU) 1, the built-in instruction RO.
It is provided to M 11 and the data register (DR) 18. The control circuit 41 is also connected to the instruction register (IR) 13 in order to receive the instruction word output from the internal instruction ROM 11 via the instruction register (IR) 13.

【0150】なお本発明に係るマイクロプロセッサの第
2の実施例においては、上述の各構成部分の内の前述の
従来及び第1の実施例の構成と同一の参照符号を有する
各部分の構成, 動作, 命令フォーマット及び演算器(FAL
U)7 のセルフテストプログラム等の内、以下に説明する
セルフテストモード時の動作以外は同一であるので、説
明を省略する。
In the second embodiment of the microprocessor according to the present invention, among the above-mentioned respective constituent parts, the structure of each part having the same reference numeral as the structure of the above-mentioned conventional and first embodiments, Operation, instruction format and operation unit (FAL
The description of the U) 7 self-test program is omitted because it is the same except for the operation in the self-test mode described below.

【0151】マイクロプロセッサの動作モードの内、セ
ルフテストモードにおいては、命令の実行によりシリア
ルI/O インタフェイス17中の図示されていないシリアル
入力レジスタ(SIO, SI1)をDバス24を用いたバス転送後
のソースレジスタとして用いた場合に、これらの代わり
にシグネチャレジスタ19中の図示されていない疑似乱数
発生器をバス転送のソースレジスタとして用いることが
出来る。また、シリアルI/O インタフェイス17中の図示
されていないシリアル出力レジスタ(SOO, SO1)をDバス
24を用いたバス転送後のデスティネーションレジスタと
して用いた場合に、これらの代わりにシグネチャレジス
タ19中の図示されていないデータ圧縮器をバス転送のデ
スティネーションレジスタとして用いることが出来る。
In the self-test mode of the microprocessor operating modes, the serial input register (SIO, SI1) (not shown) in the serial I / O interface 17 is executed by the execution of an instruction by using the D bus 24. When used as a source register after transfer, a pseudo random number generator (not shown) in the signature register 19 can be used as a source register for bus transfer instead of these. In addition, the serial output registers (SOO, SO1) (not shown) in the serial I / O interface 17 are connected to the D bus.
When used as the destination register after the bus transfer using 24, the data compressor (not shown) in the signature register 19 can be used as the destination register for the bus transfer instead of these.

【0152】図54は、図53に示されたマイクロプロ
セッサの制御回路41の詳細な構成とその周辺部分の構成
とを示すブロック図である。
FIG. 54 is a block diagram showing the detailed structure of the control circuit 41 of the microprocessor shown in FIG. 53 and the structure of its peripheral portion.

【0153】制御回路41は、2入力 ANDゲート411, 41
2, 2入力ORゲート413, インバータ414, 415, RSフリ
ップフロップ416 及びHALTデコーダ417 等にて構成され
ている。
The control circuit 41 has a 2-input AND gate 411, 41.
It is composed of a 2- and 2-input OR gate 413, inverters 414 and 415, an RS flip-flop 416, a HALT decoder 417 and the like.

【0154】ANDゲート411 にはその両入力にテストモ
ード設定信号入力端子28と IIAモード設定信号入力端子
29とがそれぞれ接続されており、両入力信号のビット積
(AND) をとったセルフテストモード信号(XSELF) を AND
ゲート412,インバータ414 及びRSフリップフロップ416
のセット端子Sへ与えている。ANDゲート412 は ANDゲ
ート411 からの出力信号であるセルフテストモード信号
(XSELF) とHALTデコーダ417 からの出力信号である XHA
LT信号とのビット積(AND) をとった CTRLSIG信号を比較
回路38へ与えている。
AND gate 411 has a test mode setting signal input terminal 28 and an IIA mode setting signal input terminal for both inputs.
29 are connected to each other, and the bit product of both input signals
AND the self-test mode signal (XSELF)
Gate 412, inverter 414 and RS flip-flop 416
To the set terminal S of. AND gate 412 is the self test mode signal that is the output signal from AND gate 411.
(XSELF) and XHA which is the output signal from HALT decoder 417
The CTRLSIG signal, which is the bit product (AND) with the LT signal, is given to the comparison circuit 38.

【0155】ORゲート413 の両入力には両インバータ41
4,415からの出力信号が与えられている。インバータ414
からの出力信号は ANDゲート411 からの出力信号であ
るセルフテストモード信号(XSELF) の反転信号であり、
インバータ415 からの出力信号はリセット信号入力端子
31から入力されるリセット信号NRESETの反転信号であ
る。そして、ORゲート413 からの出力信号はRSフリップ
フロップ416 のリセット端子Rに与えられている。
Both inverters 41 are connected to both inputs of the OR gate 413.
Output signal from 4,415 is given. Inverter 414
The output signal from is the inverted signal of the self-test mode signal (XSELF) which is the output signal from AND gate 411.
The output signal from the inverter 415 is the reset signal input terminal.
It is an inverted signal of the reset signal NRESET input from 31. The output signal from the OR gate 413 is given to the reset terminal R of the RS flip-flop 416.

【0156】RSフリップフロップ416 の出力端子Qから
の出力信号が内蔵命令ROM テスト信号(ROMTEST) であ
り、前述の如くアドレス演算部(AAU)1, プログラムカウ
ンタ(PC)10, 内蔵命令ROM 11, 内蔵共有RAM(CRAM)12 及
びデータレジスタ(DR)18に与えられている。
The output signal from the output terminal Q of the RS flip-flop 416 is the built-in instruction ROM test signal (ROMTEST), and as described above, the address operation unit (AAU) 1, the program counter (PC) 10, the built-in instruction ROM 11, It is provided to the built-in shared RAM (CRAM) 12 and the data register (DR) 18.

【0157】HALTデコーダ417 は入力端が命令レジスタ
(IR)13に、出力端が ANDゲート412にそれぞれ接続され
ており、命令レジスタ(IR)13からの出力信号がHALT命令
である場合にその ANDゲート412 への出力信号(XHALT)
をアクティブにする。
The input terminal of the HALT decoder 417 is the instruction register
If the output terminal of (IR) 13 is connected to AND gate 412 and the output signal from instruction register (IR) 13 is HALT instruction, the output signal to AND gate 412 (XHALT)
To activate.

【0158】なお、図15にニーモニックにて示されて
いるHALT命令は、図55乃至図62に示されているセル
フテストプログラムの末尾に位置していてセルフテスト
の実行を停止させる命令であり、通常はテストプログラ
ムを停止させるのみである。しかしながら、上述の如く
セルフテストモード信号(XSELF) がアクティブである場
合は ANDゲート412 からの出力信号(CTRLSIG) がアクテ
ィブになるので、比較回路38はシグネチャレジスタ19内
で圧縮されたデータと、命令レジスタ(IR)13からPバス
23を介して比較回路38へ転送されたHALT命令の下位24ビ
ットとを比較し、全ビットが一致したかまたは1ビット
でも不一致であったかを検出して”1”または”0”の
1ビットの信号を出力端子39から出力する。
The HALT instruction shown by the mnemonic in FIG. 15 is an instruction located at the end of the self-test program shown in FIGS. 55 to 62 and stopping the execution of the self-test. Normally it just stops the test program. However, as described above, when the self-test mode signal (XSELF) is active, the output signal (CTRLSIG) from the AND gate 412 becomes active, so that the comparison circuit 38 compares the compressed data in the signature register 19 with the instruction Register (IR) 13 to P bus
The lower 24 bits of the HALT instruction transferred to the comparison circuit 38 via 23 are compared, and it is detected whether all the bits match or even 1 bit does not match, and 1 bit of "1" or "0" is detected. The signal is output from the output terminal 39.

【0159】このような制御回路41の動作は以下の如く
である。
The operation of the control circuit 41 as described above is as follows.

【0160】リセット信号入力端子31へ入力されている
リセット信号(NRESET)がアクティブになると、インバー
タ415 にて反転されてORゲート413 を通じてRSフリップ
フロップ416 のリセット端子に与えられるので、RSフリ
ップフロップ416 からの出力信号である内蔵命令ROM テ
スト信号(ROMTEST) は非アクティブに固定される。
When the reset signal (NRESET) input to the reset signal input terminal 31 becomes active, it is inverted by the inverter 415 and given to the reset terminal of the RS flip-flop 416 through the OR gate 413. The internal instruction ROM test signal (ROMTEST), which is the output signal from, is fixed to inactive.

【0161】リセット信号(NRESET)が非アクティブにな
り、テストモード設定信号入力端子28及び IIAモード設
定信号入力端子29に与えられているテストモード設定信
号(TEST)及び IIAモード設定信号(IIA) が共にアクティ
ブになると、 ANDゲート411からの出力信号であるセル
フテストモード信号(XSELF) がアクティブになる。これ
により、RSフリップフロップ416 がセットされ、RSフリ
ップフロップ416 からの出力信号である内蔵命令ROM テ
スト信号(ROMTEST) がアクティブに固定される。この結
果、セルフテストモードでは常にマイクロプロセッサの
モードは内蔵命令ROM 11をテストするためのテストモー
ドになる。
The reset signal (NRESET) becomes inactive, and the test mode setting signal (TEST) and IIA mode setting signal (IIA) given to the test mode setting signal input terminal 28 and the IIA mode setting signal input terminal 29 are changed. When both are active, the self-test mode signal (XSELF), which is the output signal from the AND gate 411, becomes active. As a result, the RS flip-flop 416 is set, and the internal instruction ROM test signal (ROMTEST), which is the output signal from the RS flip-flop 416, is fixed to active. As a result, in the self-test mode, the microprocessor mode is always the test mode for testing the built-in instruction ROM 11.

【0162】この後、テストモード設定信号(TEST)また
は IIAモード設定信号(IIA) のいずれかが非アクティブ
になるとそれがANDゲート411,インバータ414 及びORゲ
ート413 を介してRSフリップフロップ416 のリセット端
子Rに与えられる。これにより、内蔵命令ROM テスト信
号(ROMTEST) は非アクティブに固定される。この結果、
内蔵命令ROM 11のテストのためのテストモード及びセル
フテストモードが解除される。
After that, when either the test mode setting signal (TEST) or the IIA mode setting signal (IIA) becomes inactive, it resets the RS flip-flop 416 via the AND gate 411, the inverter 414 and the OR gate 413. It is given to the terminal R. As a result, the internal instruction ROM test signal (ROMTEST) is fixed to inactive. As a result,
The test mode for testing the internal instruction ROM 11 and the self-test mode are released.

【0163】次に、内蔵命令ROM テスト信号(ROMTEST)
がアクティブになった場合の制御内容を以下に説明す
る。
Next, the internal instruction ROM test signal (ROMTEST)
The control contents when is activated will be described below.

【0164】アドレス演算部(AAU)1は内蔵命令ROM テス
ト信号(ROMTEST) がアクティブである場合は、外部デー
タRAM(図示せず) からデータレジスタ(DR)18に対する読
込み命令が実行されると、アドレス演算部(AAU)1から与
えられるアドレス値が内蔵命令ROM 11のアドレスの範囲
内であれば、アドレス値に対する内蔵命令ROM 11の命令
ワードの上位16ビットまたは下位16ビットをIバス35を
通じてデータレジスタ(DR)18に読込む。
When the internal instruction ROM test signal (ROMTEST) is active, the address operation unit (AAU) 1 executes a read instruction to the data register (DR) 18 from the external data RAM (not shown). If the address value given by the address calculation unit (AAU) 1 is within the address range of the internal instruction ROM 11, the upper 16 bits or the lower 16 bits of the instruction word of the internal instruction ROM 11 corresponding to the address value Read to register (DR) 18.

【0165】この際、上位16ビットであるか下位16ビッ
トであるかの区別はUWI(Upper Wordof Instruction)信
号出力端子36からの出力信号の論理レベルで区別するこ
とが可能である他、フラグレジスタ(FR)32の特定のビッ
トに反映されるので、後述する命令セット中のシーケン
ス命令によりプログラムで判定可能である。また、 UWI
信号出力端子36及びフラグレジスタ(FR)32の特定ビット
の論理値は内蔵命令ROM 11に対する1回のアクセスの都
度反転する。
At this time, the upper 16 bits or the lower 16 bits can be distinguished by the logical level of the output signal from the UWI (Upper Word of Instruction) signal output terminal 36 and the flag register. Since it is reflected in a specific bit of (FR) 32, it can be determined by a program by a sequence instruction in an instruction set described later. Also UWI
The logic values of the specific bits of the signal output terminal 36 and the flag register (FR) 32 are inverted each time the internal instruction ROM 11 is accessed once.

【0166】図67は内蔵命令ROM 11をテストするため
のプログラム例を示す模式図、図68はその処理手順を
示すフローチャートである。
FIG. 67 is a schematic diagram showing an example of a program for testing the internal instruction ROM 11, and FIG. 68 is a flow chart showing its processing procedure.

【0167】図67において、ラベル「ROM:」は内蔵命
令ROM 11をテストする際の開始アドレスである。ラベル
「ROM2: 」は内蔵命令ROM 11においてページレジスタ(P
GR)で指定した先頭アドレスから512 ワードをテストす
るサブルーチンの開始アドレスである。また、ラベル
「TEST」は従来例で示した通常のセルフテストの実行開
始アドレスである。
In FIG. 67, the label "ROM:" is the start address when the built-in instruction ROM 11 is tested. The label "ROM2:" is the page register (P
It is the start address of the subroutine that tests 512 words from the start address specified by GR). The label "TEST" is the execution start address of the normal self-test shown in the conventional example.

【0168】図68のフローチャートのステップS11に
おいて、任意アドレスからプログラムの実行を開始する
リセット処理により内蔵命令ROM 11内の WINCR命令が記
述されているアドレス(ROM:)へリセットスタートする。
In step S11 of the flowchart shown in FIG. 68, a reset process is started from an arbitrary address to reset and start to the address (ROM :) in the built-in instruction ROM 11 where the WINCR instruction is described.

【0169】ステップS12において、マイクロプロセッ
サの動作モードがセルフテストモードに設定され、内蔵
命令ROM 11中の命令ワードの内容をシグネチャレジスタ
19に圧縮するテストが開始される。
At step S12, the operation mode of the microprocessor is set to the self-test mode, and the contents of the instruction word in the internal instruction ROM 11 are set in the signature register.
The test to compress to 19 is started.

【0170】ステップS13において、内蔵命令ROM 11中
のページーレジスタ(PGR) で指定された先頭アドレスか
ら 512ワード分の命令ワードの内容を圧縮するサブルー
チンが8回コールされ、合計4096ワードの内蔵命令ROM
11全ての命令ワードを圧縮するテストが行われる。
In step S13, the subroutine for compressing the contents of the instruction word of 512 words from the start address specified by the page register (PGR) in the internal instruction ROM 11 is called 8 times, and the internal instruction ROM of 4096 words in total is called.
11 A test is performed that compresses all instruction words.

【0171】ステップS14において、従来例で使用され
た内蔵命令ROM 11以外のセルフテストを実行するエント
リアドレス(TEST:) へ制御が移される。
In step S14, control is transferred to an entry address (TEST :) other than the built-in instruction ROM 11 used in the conventional example, which executes a self test.

【0172】ステップS15においては、従来例と同様の
セルフテストが実行される。この場合のセルフテストプ
ログラムの一例が図55乃至図62の模式図に、またそ
の処理手順が図47乃至図51のフローチャートにそれ
ぞれ示されている。これらの各図に示されている従来例
と本発明の第2の実施例との差異は、バス転送でデータ
レジスタ(DR)18を指定している部分をシリアルI/O イン
タフェイス17中の図示されていないシリアル入力レジス
タ(SI0, SI1)またはシリアル出力レジスタ(SO0, SO1)の
指定に変更している点であり、セルフテストモードでの
動作は同一であるので、説明は省略する。
In step S15, the same self test as in the conventional example is executed. An example of the self-test program in this case is shown in the schematic diagrams of FIGS. 55 to 62, and its processing procedure is shown in the flowcharts of FIGS. 47 to 51. The difference between the conventional example shown in each of these figures and the second embodiment of the present invention is that the portion designating the data register (DR) 18 in the bus transfer is included in the serial I / O interface 17. The specification is changed to the serial input register (SI0, SI1) or the serial output register (SO0, SO1) not shown, and the operation in the self-test mode is the same, so the description is omitted.

【0173】マイクロプロセッサの動作モードがセルフ
テストモードに設定されている場合、HALT命令がHALTデ
コーダ417 でデコードされると、前述の如く比較回路38
に与えられている CTRLSIG信号がアクティブになる。こ
の場合、HALT命令の下位24ビットにはシグネチャレジス
タ19によるデータ圧縮結果との比較対象とされるデータ
が書込まれており、このデータがPバス23を通じて比較
回路38へ送られるので、比較回路38はシグネチャレジス
タ19内で圧縮されたデータと比較してその比較結果を出
力端子39から出力する。
When the HALT instruction is decoded by the HALT decoder 417 when the operation mode of the microprocessor is set to the self-test mode, the comparison circuit 38 is operated as described above.
The CTRL SIG signal given to is activated. In this case, in the lower 24 bits of the HALT instruction, the data to be compared with the data compression result by the signature register 19 is written, and this data is sent to the comparison circuit 38 through the P bus 23. 38 compares the data compressed in the signature register 19 and outputs the comparison result from the output terminal 39.

【0174】[0174]

【発明の効果】以上に詳述した如く本発明によれば、簡
単な構成の制御回路と、数ワードのプログラムとにより
マイクロプロセッサの内蔵命令ROM のセルフテストが実
行出来、マイクロプロセッサの故障検出率が向上し、ユ
ーザ側での受入れテストが簡単に行えるようになる等、
優れた効果を奏する。
As described in detail above, according to the present invention, the self-test of the built-in instruction ROM of the microprocessor can be executed by the control circuit having a simple structure and the program of several words, and the failure detection rate of the microprocessor can be executed. Is improved and the acceptance test on the user side can be easily performed.
It has an excellent effect.

【0175】更に本発明のマイクロプロセッサの第1の
発明では、データ圧縮器が使用可能な場合には、命令RO
M に記憶してある命令を用いた一連の処理が実行され、
命令ROM 中の各命令ワードの内容が順次読出されてデー
タ圧縮器に入力されて圧縮される。従って、マイクロプ
ロセッサの内蔵命令ROM のセルフテストが容易に実行可
能になる。
Further, in the first invention of the microprocessor of the present invention, when the data compressor can be used, the instruction RO
A series of processing using the instructions stored in M is executed,
The contents of each instruction word in the instruction ROM are sequentially read and input to the data compressor for compression. Therefore, the self-test of the built-in instruction ROM of the microprocessor can be easily executed.

【0176】第2の発明では、データ圧縮器で圧縮され
た結果とその期待値との比較結果が外部へ出力される。
従って、テスト結果が迅速に判明する。
In the second invention, the result of comparison between the result compressed by the data compressor and its expected value is output to the outside.
Therefore, the test result is quickly found.

【0177】第3の発明では、所定の信号が入力端子に
入力されている場合には、命令ROMに予め記憶されてい
る通常のプログラムを構成する命令ワードがRAM に一旦
格納され、このRAM に格納されている命令により第1の
発明と同様に動作する。従って、セルフテストのために
命令ROM の容量を使用する必要がない。
According to the third aspect of the invention, when a predetermined signal is input to the input terminal, the instruction word which constitutes the normal program previously stored in the instruction ROM is once stored in the RAM, and this RAM is stored in the RAM. The stored instructions operate similarly to the first invention. Therefore, it is not necessary to use the capacity of the instruction ROM for the self test.

【0178】第4の発明では、所定の信号が入力端子に
入力されている場合には、命令ROMに予め記憶されてい
る通常のプログラムを構成する命令ワードがRAM に一旦
格納され、このRAM に格納されている命令により第2の
発明と同様に動作する。従って、セルフテストのために
命令ROM の容量を使用する必要がない。
According to the fourth aspect of the invention, when a predetermined signal is input to the input terminal, the instruction word which constitutes the normal program previously stored in the instruction ROM is temporarily stored in the RAM, and this RAM is stored in the RAM. The stored instructions operate similarly to the second invention. Therefore, it is not necessary to use the capacity of the instruction ROM for the self test.

【0179】第5の発明では、所定の信号が入力端子に
入力されている場合には、通常はデータ記憶回路に対し
てデータの入出力を行うために命令ROM に予め記憶され
ている命令ワードがRAM に一旦格納され、このRAMに格
納されている命令により第1の発明と同様に動作する。
従って、セルフテストのために命令ROM の容量を使用す
る必要がない。
In the fifth invention, when a predetermined signal is input to the input terminal, normally, the instruction word stored in advance in the instruction ROM for inputting / outputting data to / from the data storage circuit. Is temporarily stored in the RAM, and the instruction stored in the RAM causes the same operation as in the first invention.
Therefore, it is not necessary to use the capacity of the instruction ROM for the self test.

【0180】第6の発明では、所定の信号が入力端子に
入力されている場合には、通常はデータ記憶回路に対し
てデータの入出力を行うために命令ROM に予め記憶され
ている命令ワードがRAM に一旦格納され、このRAMに格
納されている命令により第2の発明と同様に動作する。
従って、セルフテストのために命令ROM の容量を使用す
る必要がない。
According to the sixth aspect of the invention, when a predetermined signal is input to the input terminal, normally, an instruction word stored in advance in the instruction ROM for inputting / outputting data to / from the data storage circuit. Is temporarily stored in the RAM, and the instruction stored in the RAM operates similarly to the second invention.
Therefore, it is not necessary to use the capacity of the instruction ROM for the self test.

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

【図1】本発明に係るマイクロプロセッサの第1, 第
2, 第3及び第4の発明の構成例を示す第1の実施例の
ブロック図である。
FIG. 1 is a block diagram of a first embodiment showing a configuration example of first, second, third and fourth inventions of a microprocessor according to the present invention.

【図2】図1のマイクロプロセッサの制御回路の詳細な
構成及びその周辺の構成を示すブロック図である。
FIG. 2 is a block diagram showing a detailed configuration of a control circuit of the microprocessor of FIG. 1 and its peripheral configuration.

【図3】内蔵命令ROM をテストするためのプログラム例
を示す模式図である。
FIG. 3 is a schematic diagram showing an example of a program for testing a built-in instruction ROM.

【図4】図3のプログラム例の処理手順を示すフローチ
ャートである。
4 is a flowchart showing a processing procedure of the program example of FIG.

【図5】セルフテスト機能を有する従来のマイクロプロ
セッサの一構成例を示すブロック図である。
FIG. 5 is a block diagram showing a configuration example of a conventional microprocessor having a self-test function.

【図6】従来及び本発明のマイクロプロセッサのシーケ
ンス命令グループのフィールドの割付けを示す模式図で
ある。
FIG. 6 is a schematic diagram showing field allocation of sequence instruction groups of conventional and present microprocessors.

【図7】従来及び本発明のマイクロプロセッサのシーケ
ンス命令グループのフィールドの割付けを示す模式図で
ある。
FIG. 7 is a schematic diagram showing field allocation of sequence instruction groups of conventional and inventive microprocessors.

【図8】従来及び本発明のマイクロプロセッサのシーケ
ンス命令グループのフィールドの割付けを示す模式図。
FIG. 8 is a schematic diagram showing field allocation of a sequence instruction group of a conventional microprocessor and a microprocessor of the present invention.

【図9】従来及び本発明のマイクロプロセッサのシーケ
ンス命令グループのフィールドの割付けを示す模式図で
ある。
FIG. 9 is a schematic diagram showing field allocation of sequence instruction groups of conventional and present microprocessors.

【図10】従来及び本発明のマイクロプロセッサのシー
ケンス命令グループのフィールドの割付けを示す模式図
である。
FIG. 10 is a schematic diagram showing field allocation of sequence instruction groups of conventional and present microprocessors.

【図11】従来及び本発明のマイクロプロセッサのシー
ケンス命令グループのフィールドの割付けを示す模式図
である。
FIG. 11 is a schematic diagram showing field allocation of sequence instruction groups of conventional and present microprocessors.

【図12】従来及び本発明のマイクロプロセッサのシー
ケンス命令グループのフィールドの割付けを示す模式図
である。
FIG. 12 is a schematic diagram showing field allocation of sequence instruction groups of a conventional microprocessor and the present invention.

【図13】従来及び本発明のマイクロプロセッサのシー
ケンス命令グループのフィールドの割付けを示す模式図
である。
FIG. 13 is a schematic diagram showing field allocation of sequence instruction groups of the conventional microprocessor and the present invention.

【図14】従来及び本発明のマイクロプロセッサのモー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 14 is a schematic diagram showing field allocation of mode instruction groups of a conventional microprocessor and the present invention.

【図15】従来及び本発明のマイクロプロセッサのモー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 15 is a schematic diagram showing field allocation of mode instruction groups of conventional and present microprocessors.

【図16】従来及び本発明のマイクロプロセッサのモー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 16 is a schematic diagram showing field allocation of mode instruction groups of the conventional microprocessor and the present invention.

【図17】従来及び本発明のマイクロプロセッサのモー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 17 is a schematic diagram showing field allocation of mode instruction groups of the conventional microprocessor and the present invention.

【図18】従来及び本発明のマイクロプロセッサのモー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 18 is a schematic diagram showing field allocation of mode instruction groups of the conventional microprocessor and the present invention.

【図19】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 19 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図20】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 20 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図21】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 21 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図22】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 22 is a schematic diagram showing field allocation of an operation instruction group of a conventional microprocessor and the present invention.

【図23】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 23 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図24】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 24 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図25】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 25 is a schematic diagram showing field allocation of operation instruction groups of the conventional microprocessor and the present invention.

【図26】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 26 is a schematic diagram showing field allocation of operation instruction groups of conventional microprocessors and the present invention.

【図27】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 27 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図28】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 28 is a schematic diagram showing field allocation of operation instruction groups of conventional microprocessors and the present invention.

【図29】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 29 is a schematic diagram showing field allocation of operation instruction groups of a conventional microprocessor and the present invention.

【図30】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 30 is a schematic diagram showing field allocation of an operation instruction group of a conventional microprocessor and a microprocessor of the present invention.

【図31】従来及び本発明のマイクロプロセッサのオペ
レーション命令グループのフィールドの割付けを示す模
式図である。
FIG. 31 is a schematic diagram showing the allocation of fields of operation instruction groups of the conventional microprocessor and the present invention.

【図32】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 32 is a schematic diagram showing field assignment of load instruction groups of conventional and present microprocessors.

【図33】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 33 is a schematic diagram showing field allocation of load instruction groups of conventional microprocessors and the present invention.

【図34】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 34 is a schematic diagram showing field allocation of load instruction groups of conventional microprocessors and the present invention.

【図35】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 35 is a schematic diagram showing field allocation of load instruction groups of conventional microprocessors and the present invention.

【図36】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 36 is a schematic diagram showing field allocation of load instruction groups of conventional microprocessors and the present invention.

【図37】従来及び本発明のマイクロプロセッサのロー
ド命令グループのフィールドの割付けを示す模式図であ
る。
FIG. 37 is a schematic diagram showing field allocation of load instruction groups of conventional and inventive microprocessors.

【図38】従来及び本発明のマイクロプロセッサのロン
グロード命令グループのフィールドの割付けを示す模式
図である。
FIG. 38 is a schematic diagram showing field allocation of a long load instruction group of a conventional microprocessor and the present invention.

【図39】従来及び本発明のマイクロプロセッサのロン
グロード命令グループのフィールドの割付けを示す模式
図である。
FIG. 39 is a schematic diagram showing field allocation of a long load instruction group of a conventional microprocessor and the present invention.

【図40】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 40 is a first of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図41】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 41 is a first microprocessor of the related art and the present invention;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図42】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 42 is a first microprocessor of the prior art and the present invention;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図43】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 43 is a first of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図44】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 44 is a first of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図45】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 45 is a first of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図46】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 46 is a first of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図47】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
[FIG. 47] A first conventional and inventive microprocessor
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図48】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 48 is a first conventional and conventional microprocessor;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図49】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 49 is a first microprocessor of the prior art and the present invention;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図50】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 50 is a first microprocessor of the prior art and the present invention;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図51】従来及び本発明のマイクロプロセッサの第1
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 51 is a first conventional and inventive microprocessor;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図52】図40乃至図46に示すセルフテストプログ
ラムが図5に示した内蔵命令ROMのメモリ空間上にどの
様に構成されているかを示す模式図である。
52 is a schematic diagram showing how the self-test program shown in FIGS. 40 to 46 is configured in the memory space of the internal instruction ROM shown in FIG. 5. FIG.

【図53】本発明に係るマイクロプロセッサの第5及び
第6の発明の構成例を示す第2の実施例のブロック図で
ある。
FIG. 53 is a block diagram of a second embodiment showing a configuration example of the fifth and sixth inventions of the microprocessor according to the present invention.

【図54】図53のマイクロプロセッサの制御回路の詳
細な構成及びその周辺の構成を示すブロック図である。
54 is a block diagram showing a detailed configuration of a control circuit of the microprocessor of FIG. 53 and its peripheral configuration.

【図55】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 55 is a second conventional microprocessor and the present microprocessor.
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図56】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 56 shows a second conventional microprocessor and the present microprocessor.
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図57】従来及び本発明のマイクロプロセッサの第2
の実施例の発明の演算器のセルフテストプログラムの一
例を示す模式図である。
FIG. 57 is a second example of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for an arithmetic unit according to the embodiment of the invention.

【図58】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 58 shows a second conventional microprocessor and the second microprocessor of the present invention.
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図59】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 59 is a second example of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図60】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 60 is a second conventional microprocessor and the present microprocessor.
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図61】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 61 is a second of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図62】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの一例を示
す模式図である。
FIG. 62 is a second example of the conventional and inventive microprocessors;
FIG. 6 is a schematic diagram showing an example of a self-test program for a computing unit of the embodiment.

【図63】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 63 is a second conventional and conventional microprocessor;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図64】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 64 is a second of the conventional and inventive microprocessors;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図65】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 65 is a second conventional and present microprocessor;
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図66】従来及び本発明のマイクロプロセッサの第2
の実施例の演算器のセルフテストプログラムの処理手順
を示すフローチャートである。
FIG. 66 is a second conventional microprocessor and the present microprocessor.
5 is a flowchart showing a processing procedure of a self-test program of the arithmetic unit of the embodiment.

【図67】本発明のマイクロプロセッサの第2の実施例
の内蔵命令ROM をテストするためのプログラム例を示す
模式図である。
FIG. 67 is a schematic diagram showing an example of a program for testing the built-in instruction ROM of the second embodiment of the microprocessor of the present invention.

【図68】図67のプログラム例の処理手順を示すフロ
ーチャートである。
68 is a flowchart showing the processing procedure of the program example of FIG. 67. FIG.

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

11 内蔵命令ROM 12 内蔵共有RAM(CRAM) 18 データレジスタ(DR) 19 シグネチャレジスタ 28 TESTモード設定信号入力端子 31 リセット信号入力端子 37 制御回路 38 比較回路 41 制御回路 11 Built-in instruction ROM 12 Built-in shared RAM (CRAM) 18 Data register (DR) 19 Signature register 28 TEST Mode setting signal input terminal 31 Reset signal input terminal 37 Control circuit 38 Comparison circuit 41 Control circuit

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成4年3月16日[Submission date] March 16, 1992

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項5[Name of item to be corrected] Claim 5

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項6[Name of item to be corrected] Claim 6

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0023[Name of item to be corrected] 0023

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0023】以下、このアドレス演算部(AAU)1によるア
ドレス生成の動作にについて説明する。レジデュアル制
御に関するレジスタとして、アドレス演算部(AAU)1内に
は内蔵データRAM2に対するアドレス及び内蔵共有RAM(CR
AM)12 あるいは図示されていない外部データRAM に対す
るアドレスの下位9ビットを与えるアドレスレジスタ(A
R0, AR1, AR2),内蔵共有RAM(CRAM)12 あるいは図示され
ていない外部データRAMに対するアドレスの上位7ビッ
トを与えるページレジスタ(PGR),アドレスを生成するた
めの基値を与えるベースアドレス値レジスタ(BA0, BA1,
BA2),アドレスを生成する際の加算値を与えるインクリ
メント値レジスタ(I0, I1, I2), モジュロ値あるいはビ
ットリバース幅を与えるモジュロ値−ビットリバース幅
レジスタ(ML0, ML1, ML2),ループ命令時にベースアドレ
ス値を修飾するためのデルタベースアドレス値レジスタ
(DBA0), ループ命令時にインクリメント値を修飾するた
めのデルタインクリメント値レジスタ(DI0) 等が含まれ
ている。これらの各レジスタは基本的には次に述べるモ
ード命令で値が設定されるが、オペレーション命令によ
る変更も可能なレジスタもある。
The operation of address generation by the address calculation unit (AAU) 1 will be described below. As a register for residual control, the address arithmetic unit (AAU) 1 has an address for the built-in data RAM 2 and a built-in shared RAM (CR
AM) 12 or an address register (A that gives the lower 9 bits of the address to an external data RAM not shown)
R0, AR1, AR2), built-in shared RAM (CRAM) 12 or a page register (PGR) that gives the upper 7 bits of the address to an external data RAM (not shown), a base address value register that gives the base value for generating the address (BA0, BA1,
BA2), increment value register (I0, I1, I2) that gives the added value when generating the address, modulo value or modulo value that gives the bit reverse width-bit reverse width register (ML0, ML1, ML2), at the time of loop instruction Delta base address value register to qualify base address value
(DBA0), Delta increment value register (DI0) for modifying the increment value at loop instruction are included. The value of each of these registers is basically set by the mode instruction described below, but there is also a register that can be changed by an operation instruction.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0091[Correction target item name] 0091

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0091】更に本発明のマイクロプロセッサの第3の
発明は、第1の発明に加えてプログラムを構成する複数
の命令を記憶する命令RAM を備え、前述の信号が前述の
入力端子に入力されていない場合に命令ROM 中の1又は
複数の命令ワードの内容を命令RAM に格納する命令を有
し、前述の信号が入力端子に入力されている場合には、
この命令の命令ROM中の1又は複数の命令ワードの内容
を読出す機能を用いてこの命令が第1の発明の命令とし
て機能するように構成されていることを特徴とする。
Furthermore, a third invention of the microprocessor of the present invention comprises, in addition to the first invention, an instruction RAM for storing a plurality of instructions constituting a program, and the aforementioned signal is inputted to the aforementioned input terminal. If there is no instruction, the contents of one or more instruction words in the instruction ROM are stored in the instruction RAM, and if the aforementioned signal is input to the input terminal ,
Contents of one or more instruction words in the instruction ROM for this instruction
This command is configured to function as the command of the first invention by using the function of reading out.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0092[Correction target item name] 0092

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0092】更に本発明のマイクロプロセッサの第4の
発明は、第2の発明に加えてプログラムを構成する複数
の命令を記憶する命令RAM を備え、前述の信号が前述の
入力端子に入力されていない場合に命令ROM 中の1又は
複数の命令ワードの内容を命令RAM に格納する命令を有
し、前述の信号が入力されている場合にはこの命令の命
令ROM 中の1又複数の命令ワードの内容を読出す機能を
用いてこの命令が第2の発明の命令として機能するよう
に構成されていることを特徴とする。
Further, a fourth invention of the microprocessor of the present invention comprises, in addition to the second invention, an instruction RAM for storing a plurality of instructions constituting a program, and the above-mentioned signal is inputted to the above-mentioned input terminal. comprising instructions stored in the instruction RAM case to one or more of the contents of the instruction word in the instruction ROM no life of this instruction if the above signal is input
Function to read the contents of one or more instruction words in the instruction ROM
It is characterized in that the instruction is used to function as the instruction of the second invention.

【手続補正6】[Procedure Amendment 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0093[Correction target item name] 0093

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0093】また更に本発明のマイクロプロセッサの第
5の発明は、第1の発明に加えてデータ記憶回路を備
え、前述の信号が前述の入力端子に入力されていない場
合にプログラムで処理するデータを記憶するデータ記憶
回路の1または複数のデータを読出す命令、またはデー
タ記憶回路に1または複数のデータを書込む命令を有
し、前述の信号が入力されている場合にはこれらの命令
の1または複数のデータを読出す機能、または1または
複数のデータを書込む機能を用いてこれらの命令が第1
の発明の命令として機能するように構成されていること
を特徴とする。
Furthermore, a fifth invention of the microprocessor of the present invention comprises a data storage circuit in addition to the first invention, and data processed by a program when the aforementioned signal is not input to the aforementioned input terminal. Has an instruction to read one or more data from the data storage circuit or an instruction to write one or more data to the data storage circuit, and these instructions when the above-mentioned signal is input.
Function to read one or more data of, or
These instructions are the first to use the ability to write multiple data .
It is configured so as to function as an instruction of the invention.

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0094[Correction target item name] 0094

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0094】更に本発明のマイクロプロセッサの第6の
発明は、第2の発明に加えてデータ記憶回路を備え、前
述の信号が前述の入力端子に入力されていない場合にプ
ログラムで処理するデータを記憶するデータ記憶回路の
1または複数のデータを読出す命令、またはデータ記憶
回路に1または複数のデータを書込む命令を有し、前述
の信号が入力されている場合にはこれらの命令の1また
は複数のデータを読出す機能、または1または複数のデ
ータを書込む機能を用いてこれらの命令が第2の発明の
命令として機能するように構成されていることを特徴と
する。
Further, a sixth invention of the microprocessor of the present invention comprises a data storage circuit in addition to the second invention, and stores data to be processed by a program when the above-mentioned signal is not inputted to the above-mentioned input terminal. It has a writing instruction one or more data reading instruction or data storage circuit, one or more data storage to the data storage circuit, the aforementioned
If one of these commands is input,
Is a function to read multiple data, or one or more data.
It is characterized in that these instructions are configured to function as the instructions of the second invention by using the function of writing the data.

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0097[Correction target item name] 0097

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0097】第3の発明では、所定の信号が入力端子に
入力されている場合には、命令ROMの1又は複数の命令
ワードの内容を読出す機能を有する命令により第1の発
明と同様に動作する。
In the third invention, when a predetermined signal is input to the input terminal, one or more instructions in the instruction ROM
An instruction having a function of reading the content of a word operates in the same manner as in the first aspect of the invention.

【手続補正9】[Procedure Amendment 9]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0098[Correction target item name] 0098

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0098】第4の発明では、所定の信号が入力端子に
入力されている場合には、命令ROM の1又は複数の命令
ワードの内容を読出す機能を有する命令により第2の発
明と同様に動作する。
In the fourth invention, when a predetermined signal is input to the input terminal, one or a plurality of instructions in the instruction ROM
The instruction having the function of reading the contents of the word operates in the same manner as the second invention.

【手続補正10】[Procedure Amendment 10]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0099[Correction target item name] 0099

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0099】第5の発明では、所定の信号が入力端子に
入力されている場合には、1または複数のデータを読出
す機能、または1または複数のデータを書込む機能を有
する命令により第1の発明と同様に動作する。
In the fifth invention, when a predetermined signal is input to the input terminal, one or a plurality of data are read out.
Function, or the function to write one or more data
The instruction operates to operate similarly to the first invention.

【手続補正11】[Procedure Amendment 11]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0100[Correction target item name] 0100

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0100】第6の発明では、所定の信号が入力端子に
入力されている場合には、1または複数のデータを読出
す機能、または1または複数のデータを書込む機能を有
する命令により第2の発明と同様に動作する。
In the sixth invention, when a predetermined signal is input to the input terminal, one or a plurality of data are read out.
Function, or the function to write one or more data
By the instruction to perform , the same operation as in the second invention is performed.

【手続補正12】[Procedure Amendment 12]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0168[Name of item to be corrected] 0168

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0168】図68のフローチャートのステップS11に
おいて、任意アドレスからプログラムの実行を開始する
リセット処理により内蔵命令ROM 11内のアドレス(ROM:)
へリセットスタートする。
In step S11 of the flow chart of FIG. 68 , the address (ROM :) in the internal instruction ROM 11 is reset by the reset process which starts the execution of the program from an arbitrary address.
Reset to start.

【手続補正13】[Procedure Amendment 13]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0177[Correction target item name] 0177

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0177】第3の発明では、所定の信号が入力端子に
入力されている場合には、前述の信号が前述の入力端子
に入力されていない場合に命令ROM 中の1又は複数の命
令ワードの内容を命令RAM に格納する命令が有する命令
ROM 中の1又は複数の命令ワードの内容を読出す機能
より第1の発明と同様に動作する。従って、セルフテス
トのために新たに付加する回路が少なくて済む。
In the third invention, when a predetermined signal is input to the input terminal, the above-mentioned signal is the above-mentioned input terminal.
If one or more instructions in the instruction ROM are not input to
Command that stores the contents of the command word in the command RAM
The function of reading the contents of one or more instruction words in the ROM operates in the same manner as in the first invention. Therefore, self-test
Therefore, the number of circuits to be newly added is small.

【手続補正14】[Procedure Amendment 14]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0178[Correction target item name] 0178

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0178】第4の発明では、所定の信号が入力端子に
入力されている場合には、前述の信号が前述の入力端子
に入力されていない場合に命令ROM 中の1又は複数の命
令ワードの内容を命令RAM に格納する命令が有する命令
ROM 中の1又は複数の命令ワードの内容を読出す機能
より第2の発明と同様に動作する。従って、セルフテス
トのために新たに付加する回路が少なくて済む。
In the fourth invention, when a predetermined signal is input to the input terminal, the above-mentioned signal is the above-mentioned input terminal.
If one or more instructions in the instruction ROM are not input to
Command that stores the contents of the command word in the command RAM
The function of reading the contents of one or more instruction words in the ROM operates similarly to the second invention. Therefore, self-test
Therefore, the number of circuits to be newly added is small.

【手続補正15】[Procedure Amendment 15]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0179[Correction target item name] 0179

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0179】第5の発明では、所定の信号が入力端子に
入力されている場合には、前述の信号が前述の入力端子
に入力されていない場合にプログラムで処理するデータ
を記憶するデータ記憶回路の1または複数のデータを読
出す命令、またはデータ記憶回路に1または複数のデー
タを書込む命令が有する1または複数のデータを読出す
機能、または1または複数のデータを書込む機能により
第1の発明と同様に動作する。従って、セルフテストの
ために新たに付加する回路が少なくて済む。
In the fifth invention, when the predetermined signal is inputted to the input terminal, the above-mentioned signal becomes the above-mentioned input terminal.
Data to be processed by the program if it is not entered in
Read one or more data in a data storage circuit that stores
The instruction to issue or one or more data in the data storage circuit.
Read one or more data that the instruction to write the data has
The function or the function of writing one or more data operates in the same manner as in the first aspect of the invention. Therefore, the self-test
Therefore, the number of newly added circuits can be reduced.

【手続補正16】[Procedure 16]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0180[Correction target item name] 0180

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0180】第6の発明では、所定の信号が入力端子に
入力されている場合には、前述の信号が前述の入力端子
に入力されていない場合にプログラムで処理するデータ
を記憶するデータ記憶回路の1または複数のデータを読
出す命令、またはデータ記憶回路に1または複数のデー
タを書込む命令が有する1または複数のデータを読出す
機能、または1または複数のデータを書込む機能により
第2の発明と同様に動作する。従って、セルフテストの
ために新たに付加する回路が少なくて済む。
In the sixth invention, when a predetermined signal is input to the input terminal, the above-mentioned signal is the above-mentioned input terminal.
Data to be processed by the program if it is not entered in
Read one or more data in a data storage circuit that stores
The instruction to issue or one or more data in the data storage circuit.
Read one or more data that the instruction to write the data has
With the function or the function of writing one or more data , the same operation as in the second invention is performed. Therefore, the self-test
Therefore, the number of newly added circuits can be reduced.

【手続補正17】[Procedure Amendment 17]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図15[Correction target item name] Fig. 15

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図15】 FIG. 15

【手続補正18】[Procedure 18]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図25[Name of item to be corrected] Fig. 25

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図25】 FIG. 25

【手続補正19】[Procedure Amendment 19]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図45[Correction target item name] Fig. 45

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図45】 FIG. 45

【手続補正20】[Procedure amendment 20]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図60[Correction target item name] Fig. 60

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図60】 FIG. 60

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 プログラムを構成する複数の命令が格納
された命令ROM と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させる命令を前記命令ROM に格
納してあるマイクロプロセッサであって、 前記命令を用いて前記命令ROM 中の命令ワードの内容を
前記データ圧縮器に入力して圧縮させる一連の処理を実
行する手段を備えたことを特徴とするマイクロプロセッ
サ。
1. An instruction ROM that stores a plurality of instructions that form a program, a data compressor that compresses and outputs input data, and a signal that enables the use of the data compressor. An input terminal for performing inputting, and when the signal is input to the input terminal, an instruction to input and compress the contents of one or more instruction words in the instruction ROM to the data compressor A microprocessor stored in an instruction ROM, comprising means for executing a series of processing for inputting and compressing the contents of an instruction word in the instruction ROM into the data compressor using the instruction. Characteristic microprocessor.
【請求項2】 プログラムを構成する複数の命令が格納
された命令ROM と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子と 、前記データ圧縮器の出力の期待値を記憶する記憶手段
と、 該記憶手段に記憶された期待値と前記データ圧縮器の出
力とを比較し、その結果を出力する比較手段とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させる命令を前記命令ROM に格
納してあるマイクロプロセッサであって、 前記命令を用いて前記命令ROM 中の命令ワードの内容を
前記データ圧縮器に入力して圧縮させ、その期待値との
前記比較手段による比較結果を出力させる一連の処理を
実行する手段を備えたことを特徴とするマイクロプロセ
ッサ。
2. An instruction ROM in which a plurality of instructions forming a program are stored, a data compressor for compressing and outputting input data, and a signal enabling the use of the data compressor. An input terminal for storing the expected value of the output of the data compressor, a comparison means for comparing the expected value stored in the storage means with the output of the data compressor, and outputting the result. Means for storing, in the instruction ROM, an instruction for inputting and compressing the contents of one or more instruction words in the instruction ROM to the data compressor when the signal is input to the input terminal. The microprocessor is configured to input the contents of the instruction word in the instruction ROM to the data compressor for compression by using the instruction, and output the comparison result by the comparison means with the expected value. Microprocessor, characterized in that it comprises means for executing a process of communicating.
【請求項3】 プログラムを構成する複数の命令が格納
された命令ROM と、 プログラムを構成する複数の命令を記憶する命令RAM
と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させ、前記信号が前記入力端子
に入力されていない場合に、前記命令ROM 中の1又は複
数の命令ワードの内容を前記命令RAM に記憶させる命令
を前記命令ROM に格納してあるマイクロプロセッサであ
って、 前記信号が前記入力端子に入力されている場合に、前記
命令を用いて前記命令ROM 中の命令ワードの内容を前記
データ圧縮器に入力して圧縮させる一連の処理を実行す
る手段を備えたことを特徴とするマイクロプロセッサ。
3. An instruction ROM storing a plurality of instructions forming a program, and an instruction RAM storing a plurality of instructions forming a program.
A data compressor that compresses and outputs input data, and an input terminal for inputting a signal that enables the use of the data compressor, the signal being input to the input terminal. , The contents of one or more instruction words in the instruction ROM are input to the data compressor to be compressed, and if the signal is not input to the input terminal, Or, a microprocessor in which an instruction for storing the contents of a plurality of instruction words in the instruction RAM is stored in the instruction ROM, wherein when the signal is input to the input terminal, A microprocessor comprising means for executing a series of processes for inputting and compressing the contents of an instruction word in an instruction ROM into the data compressor.
【請求項4】 プログラムを構成する複数の命令が格納
された命令ROM と、 プログラムを構成する複数の命令を記憶する命令RAM
と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子と、 前記データ圧縮器の出力の期待値を記憶する記憶手段
と、 該記憶手段に記憶された期待値と前記データ圧縮器の出
力とを比較し、その結果を出力する比較手段とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させ、前記信号が前記入力端子
に入力されていない場合に、前記命令ROM 中の1又は複
数の命令ワードの内容を前記命令RAM に記憶させる命令
を前記命令ROM に格納してあるマイクロプロセッサであ
って、 前記信号が前記入力端子に入力されている場合に、前記
命令を用いて前記命令ROM 中の命令ワードの内容を前記
データ圧縮器に入力して圧縮させ、その期待値との前記
比較手段による比較結果を出力させる一連の処理を実行
する手段を備えたことを特徴とするマイクロプロセッ
サ。
4. An instruction ROM in which a plurality of instructions forming a program are stored, and an instruction RAM in which a plurality of instructions forming a program are stored.
A data compressor that compresses and outputs input data; an input terminal for inputting a signal that enables the data compressor to be used; and an expected value of the output of the data compressor. And a comparison means for comparing the expected value stored in the storage means with the output of the data compressor and outputting the result, when the signal is input to the input terminal. , The content of one or more instruction words in the instruction ROM is input to the data compressor for compression, and when the signal is not input to the input terminal, one or more instructions in the instruction ROM A microprocessor in which an instruction for storing the content of a word in the instruction RAM is stored in the instruction ROM, wherein when the signal is input to the input terminal, the instruction is used to store in the instruction ROM. Instruction The contents of the de is compressed is input to the data compressor, a microprocessor, characterized in that it comprises means for executing the series of processes to output the comparison result by the comparison means and its expected value.
【請求項5】 プログラムを構成する複数の命令が格納
された命令ROM と、 前記プログラムにより処理されるデータを記憶するデー
タ記憶回路と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させ、前記信号が前記入力端子
に入力されていない場合に、前記データ記憶回路中の1
又は複数の命令を読出し、又は前記データ記憶回路に1
又は複数の命令を書込む命令を前記命令ROM に格納して
あるマイクロプロセッサであって、 前記信号が前記入力端子に入力されている場合に、前記
命令を用いて前記命令ROM 中の命令ワードの内容を前記
データ圧縮器に入力して圧縮させる一連の処理を実行す
る手段を備えたことを特徴とするマイクロプロセッサ。
5. An instruction ROM in which a plurality of instructions constituting a program are stored, a data storage circuit for storing data processed by the program, a data compressor for compressing and outputting input data, An input terminal for inputting a signal that enables the use of the data compressor, wherein when the signal is input to the input terminal, one or more instruction words in the instruction ROM When the content is input to the data compressor for compression and the signal is not input to the input terminal, 1 in the data storage circuit is input.
Alternatively, a plurality of instructions may be read, or 1 may be stored in the data storage circuit.
Alternatively, a microprocessor storing an instruction for writing a plurality of instructions in the instruction ROM, wherein when the signal is input to the input terminal, the instruction is used to write an instruction word in the instruction ROM. A microprocessor comprising means for executing a series of processing for inputting and compressing contents into the data compressor.
【請求項6】 プログラムを構成する複数の命令が格納
された命令ROM と、 前記プログラムにより処理されるデータを記憶するデー
タ記憶回路と、 入力されたデータを圧縮して出力するデータ圧縮器と、 該データ圧縮器を使用することを可能とする信号を入力
するための入力端子と、 前記データ圧縮器の出力の期待値を記憶する記憶手段
と、 該記憶手段に記憶された期待値と前記データ圧縮器の出
力とを比較し、その結果を出力する比較手段とを備え、 前記信号が前記入力端子に入力されている場合に、前記
命令ROM 中の1又は複数の命令ワードの内容を前記デー
タ圧縮器に入力して圧縮させ、前記信号が前記入力端子
に入力されていない場合に、前記データ記憶回路中の1
又は複数の命令を読出し、又は前記データ記憶回路に1
又は複数の命令を書込む命令を前記命令ROM に格納して
あるマイクロプロセッサであって、 前記信号が前記入力端子に入力されている場合に、前記
命令を用いて前記命令ROM 中の命令ワードの内容を前記
データ圧縮器に入力して圧縮させ、その期待値との前記
比較手段による比較結果を出力させる一連の処理を実行
する手段を備えたことを特徴とするマイクロプロセッ
サ。
6. An instruction ROM in which a plurality of instructions forming a program are stored, a data storage circuit for storing data processed by the program, a data compressor for compressing and outputting input data, An input terminal for inputting a signal that enables the use of the data compressor, storage means for storing an expected value of the output of the data compressor, and the expected value and the data stored in the storage means. A comparator for comparing the output of the compressor and outputting the result, and when the signal is input to the input terminal, the contents of one or more instruction words in the instruction ROM are stored in the data. When the signal is input to the compressor for compression and the signal is not input to the input terminal, 1 in the data storage circuit is input.
Alternatively, a plurality of instructions may be read, or 1 may be stored in the data storage circuit.
Alternatively, a microprocessor storing an instruction for writing a plurality of instructions in the instruction ROM, wherein when the signal is input to the input terminal, the instruction is used to write an instruction word in the instruction ROM. A microprocessor comprising means for executing a series of processes for inputting contents into the data compressor for compression and outputting a result of comparison with the expected value by the comparing means.
JP3272343A 1991-01-16 1991-10-21 Microprocessor Pending JPH0540703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3272343A JPH0540703A (en) 1991-01-16 1991-10-21 Microprocessor

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP327591 1991-01-16
JP3-3275 1991-01-16
JP3272343A JPH0540703A (en) 1991-01-16 1991-10-21 Microprocessor

Publications (1)

Publication Number Publication Date
JPH0540703A true JPH0540703A (en) 1993-02-19

Family

ID=26336819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3272343A Pending JPH0540703A (en) 1991-01-16 1991-10-21 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0540703A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5426631A (en) * 1977-07-29 1979-02-28 Omron Tateisi Electronics Co Inspection system of rom
JPH01114957A (en) * 1987-10-29 1989-05-08 Nec Corp Information processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5426631A (en) * 1977-07-29 1979-02-28 Omron Tateisi Electronics Co Inspection system of rom
JPH01114957A (en) * 1987-10-29 1989-05-08 Nec Corp Information processor

Similar Documents

Publication Publication Date Title
US4367524A (en) Microinstruction execution unit for use in a microprocessor
US5226149A (en) Self-testing microprocessor with microinstruction substitution
US4403284A (en) Microprocessor which detects leading 1 bit of instruction to obtain microcode entry point address
US4463421A (en) Serial/parallel input/output bus for microprocessor system
US4038643A (en) Microprogramming control system
KR100563220B1 (en) Recirculating register file
US4694391A (en) Compressed control decoder for microprocessor system
EP1267256A2 (en) Conditional execution of instructions with multiple destinations
KR20010043772A (en) Mixed vector/scalar register file
GB2059124A (en) Data processing system
JPS61248135A (en) Pipeline type processor and control thereof
JP2000148695A (en) Geometric processing processor and floating point power calculating device and data output controller
US5475852A (en) Microprocessor implementing single-step or sequential microcode execution while in test mode
EP1012735A1 (en) Eight-bit microcontroller having a risc architecture
US4159520A (en) Memory address control device with extender bus
US4402043A (en) Microprocessor with compressed control ROM
US5938759A (en) Processor instruction control mechanism capable of decoding register instructions and immediate instructions with simple configuration
US5210864A (en) Pipelined microprocessor with instruction execution control unit which receives instructions from separate path in test mode for testing instruction execution pipeline
US5386534A (en) Data processing system for generating symmetrical range of addresses of instructing-address-value with the use of inverting sign value
JPH0540703A (en) Microprocessor
JP2000207210A (en) Microprocessor
JP2000039995A (en) Flexible accumulate register file to be used in high performance microprocessor
JPH02186485A (en) Microcomputer apparatus
US4866608A (en) Microprocessor with improved execution of instructions
JPH07168713A (en) Digital signal processor