Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0646387B2 - Micro computer - Google Patents
[go: Go Back, main page]

JPH0646387B2 - Micro computer - Google Patents

Micro computer

Info

Publication number
JPH0646387B2
JPH0646387B2 JP62172188A JP17218887A JPH0646387B2 JP H0646387 B2 JPH0646387 B2 JP H0646387B2 JP 62172188 A JP62172188 A JP 62172188A JP 17218887 A JP17218887 A JP 17218887A JP H0646387 B2 JPH0646387 B2 JP H0646387B2
Authority
JP
Japan
Prior art keywords
rom
data
timing
register
program counter
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.)
Expired - Lifetime
Application number
JP62172188A
Other languages
Japanese (ja)
Other versions
JPS6415835A (en
Inventor
修 近藤
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62172188A priority Critical patent/JPH0646387B2/en
Publication of JPS6415835A publication Critical patent/JPS6415835A/en
Publication of JPH0646387B2 publication Critical patent/JPH0646387B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関し、特にリードオン
リーメモリ(以下ROMと略記する)を内蔵したマイク
ロコンピュータに関する。
TECHNICAL FIELD The present invention relates to a microcomputer, and more particularly to a microcomputer having a read-only memory (hereinafter abbreviated as ROM) built therein.

〔従来の技術〕[Conventional technology]

半導体基板上に構成されたROM内蔵のマイクロコンピ
ュータ、所謂シングルチップマイクロコンピュータ(以
下マイコンと略記する)では、プログラムや数値データ
等がROMに記憶されている。ROMの内容はマイコン
の製造工程中のある工程で決定されるもので、記憶内容
の全てが正しいことを製造時に確認する必要がある。こ
のため、従来マイコンのテスト端子を含む外部端子の論
理レベルにより、ROMの内容は容易に外部端子へ読出
せる構成となっている。
In a so-called single-chip microcomputer (hereinafter abbreviated as a microcomputer) having a built-in ROM, which is formed on a semiconductor substrate, programs and numerical data are stored in the ROM. The content of the ROM is determined in a certain process in the manufacturing process of the microcomputer, and it is necessary to confirm that all the stored contents are correct at the time of manufacturing. Therefore, the contents of the ROM can be easily read to the external terminals by the logic level of the external terminals including the test terminals of the conventional microcomputer.

第3図は従来のマイコンの一例の要部を示すブロック図
である。
FIG. 3 is a block diagram showing a main part of an example of a conventional microcomputer.

この図でROMテスト用外部端子3をノンアクティブ
(例えば“ロー”の論理レベル)とした場合、マイコン
は通常使用される動作モードである。CPU2Aのプロ
グラムカウンタ5により、アドレスバス9を介してRO
M1のアドレッシングが行なわれ、命令およびデータが
順次読出されてCPU2Aで処理される。また、必要に
応じて入出力ポート8を介して外部とデータの入出力を
行なう。
In this figure, when the ROM test external terminal 3 is made non-active (for example, a "low" logic level), the microcomputer is in an operation mode normally used. RO via the address bus 9 by the program counter 5 of the CPU 2A
Addressing of M1 is performed, and instructions and data are sequentially read out and processed by CPU 2A. Further, data is input / output to / from the outside through the input / output port 8 as necessary.

次に、ROMテスト用外部端子3をアクティブ(例えば
“ハイ”の論理レベル)とした場合、テスト制御信号4
とCPU2Aの制御回路6AによりROM1の読出しモ
ードとなる。リセット後、CPU2A内のプログラムカ
ウンタ5は+1のインクリメントを行なうと共に、制御
回路6AによりROMの内容が順次1アドレスずつ連続
的にデータバス10へ出力される。ここで、制御回路6A
により入出力ポート8は出力状態であり、ROM1の内
容は順次データバス10、入出力ポート8を介して外部へ
出力され、集積回路用テスター(以下ICテスターと略
記する)により外部で期待データと比較される。
Next, when the ROM test external terminal 3 is made active (for example, a “high” logic level), the test control signal 4
Then, the control circuit 6A of the CPU 2A enters the read mode of the ROM 1. After resetting, the program counter 5 in the CPU 2A increments by 1, and the control circuit 6A successively outputs the contents of the ROM to the data bus 10 one address at a time. Here, the control circuit 6A
Thus, the input / output port 8 is in an output state, the contents of the ROM 1 are sequentially output to the outside via the data bus 10 and the input / output port 8, and the expected data is externally output by an integrated circuit tester (hereinafter abbreviated as IC tester). Be compared.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

近年、ROMを内蔵したマイコンの応用範囲は益々拡大
しており、ICカードのように金銭に関わるデータを扱
う等、機密保持の必要のある応用も増している。そこ
で、マイコンに内蔵されているROMの内容およびデー
タが機密保持上容易に外部へ出力されない構成とすると
共に、製造時のROM読出しテストにも工夫が必要とな
る。
In recent years, the range of applications of microcomputers with built-in ROM has expanded more and more, and applications requiring confidentiality, such as handling data related to money such as IC cards, are also increasing. Therefore, in order to keep confidentiality, the contents and data of the ROM built in the microcomputer are not easily output to the outside, and it is necessary to devise a ROM read test at the time of manufacturing.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のマイコンは、 データバス上のデータをラッチし、算術論理演算ユニッ
トへ出力する第1および第2のレジスタと、 ROMテスト用外部端子を所定の論理レベルとすること
により、第1のタイミングでプログラムカウンタで指定
されたROMの内容をデータバスを介して第1のレジス
タにラッチさせ、第2のタイミングで第1のレジスタの
内容との比較データを外部より入力ポートおよびデータ
バスを介して第2のレジスタへラッチさせ、第3のタイ
ミングで算術論理演算ユニットによる第1と第2のレジ
スタの内容間の演算結果をデータバスおよび出力ポート
を介して外部へ出力させ、さらに第2または第3のいず
れかのタイミングでプログラムカウンタのインクリメン
トを行なわせる制御手段を有する。
The microcomputer of the present invention latches the data on the data bus and outputs the first and second registers for outputting to the arithmetic and logic operation unit and the ROM test external terminal to a predetermined logic level to obtain the first timing. The contents of the ROM designated by the program counter are latched in the first register via the data bus, and the comparison data with the contents of the first register is externally transmitted via the input port and the data bus at the second timing. It is latched in the second register, and at a third timing, the arithmetic result between the contents of the first and second registers by the arithmetic logic operation unit is output to the outside through the data bus and the output port, and the second or the second register is output. It has a control means for causing the program counter to be incremented at any one of the three timings.

〔作用〕[Action]

上述した従来のROM内容を外部へ出力して行なうRO
M読出しテストに対して、本発明はROM内容の期待値
を外部よりマイコン内へ入力し、内部で比較して結果の
みを外部へ出力するものである。
RO that outputs the above-mentioned conventional ROM contents to the outside
For the M read test, the present invention inputs the expected value of the ROM content from the outside into the microcomputer, compares it internally, and outputs only the result to the outside.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明す
る。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明のマイコンの一実施例を示すブロック
図、第2図はその動作を示すタイミング図である。
FIG. 1 is a block diagram showing an embodiment of the microcomputer of the present invention, and FIG. 2 is a timing chart showing its operation.

本実施例のマイコンは、第3図の従来例に、データバス
10上のデータをラッチし、ALU11に出力するレジスタ
12,13と、テスト命令コード発出回路15が付加されて構
成されている。
The microcomputer of this embodiment is similar to the conventional example shown in FIG.
Register that latches data on 10 and outputs to ALU11
12, 13 and a test instruction code issuing circuit 15 are added.

次に、本実施例の動作を説明する。Next, the operation of this embodiment will be described.

ROMテスト用外部端子3をノンアクティブとした場合
は通常使用の動作モードである。CPU2のプログラム
カウンタ5によりROM1のアドレッシングが行なわ
れ、命令コードは命令レジスタ7へ取り込まれた後解読
されて、ROM1、データメモリ16、ポート8等のデー
タがALU11を含むCPU2で順次処理される。必要に
応じてポート8,14を介して外部とデータの入出力を行
なう。
When the ROM test external terminal 3 is made inactive, it is a normal operation mode. The ROM 1 is addressed by the program counter 5 of the CPU 2, the instruction code is fetched into the instruction register 7 and then decoded, and the data of the ROM 1, the data memory 16, the port 8 and the like are sequentially processed by the CPU 2 including the ALU 11. Data is input / output to / from the outside through the ports 8 and 14 as necessary.

次に、ROMテスト用外部端子をアクティブとした場
合、テスト制御信号4と制御回路6により、ROM1の
読出しテストモードとなる。ここで、プログラムカウン
タ5はマスタースレーブフリップフロップ(以下MS−
F/Fと略記する)およびインクリメンタで構成され、
ROMアドレスのインクリメント結果はマスターF/F
へラッチされる。また、データバス10よりのアドレスデ
ータ、およびインクリメント結果のアドレスバス9への
出力はスレーブF/Fへのラッチによってなされる。ま
ず、マイコンのリセットによりプログラムカウンタ5の
MS−F/Fがリセットされた後、第1のタイミングで
アドレスバス9を介してROM1の0番地が指定され、
制御回路6によりROM1の0番地の内容がデータバス
10へ出力される。さらに、このデータバス10のデータは
レジスタ12へラッチされる。第2のタイミングで外部よ
りROM1の0番地の期待値が入出力ポート8、データ
バス10を介してレジスタ13へラッチされると共にプログ
ラムカウンタ5がインクリメント(+1)される。第3
のタイミングではALU11でレジスタ12よりレジスタ13
の内容の減算が行なわれ、結果はデータバス10、ポート
14を介して外部へ出力される。次のタイミングは上記第
1のタイミングと同様であり、プログラムカウンタ5の
マスターF/Fの値(1番地)がスレーブF/Fへラッ
チされると同時にアドレスバス9へ出力され、ROM読
出しモード中、上記第1〜第3のタイミングを1読出し
サイクルとして順次各アドレスの読出しが行なわれる。
第1のタイミングでプログラムカウンタ5のマスターF
/Fの値がスレーブF/Fへラッチされると同時にアド
レスバス9へ出力され、指定されたアドレスのROM内
容がレジスタ12へラッチされる。第2のタイミングで各
アドレスのROM内容の期待値が入出力ポート8より入
力されて、レジスタ13へラッチされると共にプログラム
カウンタ5のインクリメント結果がマスターF/Fにラ
ッチされる。第3のタイミングではALU11においてレ
ジスタ12の内容よりレジスタ13の内容の減算が行なわ
れ、結果はポート14を介して外部へ出力される。
Next, when the external terminal for ROM test is activated, the read control mode of the ROM 1 is set by the test control signal 4 and the control circuit 6. Here, the program counter 5 is a master-slave flip-flop (hereinafter referred to as MS-
(Abbreviated as F / F) and an incrementer,
The ROM address increment result is the master F / F
Is latched to. Further, the address data from the data bus 10 and the output of the increment result to the address bus 9 are made by the latch to the slave F / F. First, after resetting the microcomputer, the MS-F / F of the program counter 5 is reset, and at the first timing, the address 0 of the ROM 1 is designated via the address bus 9.
The contents of address 0 of ROM1 are transferred to the data bus by the control circuit 6.
Output to 10. Further, the data on the data bus 10 is latched in the register 12. At the second timing, the expected value at address 0 of ROM 1 is externally latched to register 13 via input / output port 8 and data bus 10, and program counter 5 is incremented (+1). Third
At the timing of ALU11, register 12 to register 13
Is subtracted and the result is the data bus 10, port
It is output to the outside via 14. The next timing is the same as the above first timing, and the value of the master F / F (1st address) of the program counter 5 is output to the address bus 9 at the same time as being latched by the slave F / F, and in the ROM read mode. , Each of the addresses is sequentially read with the first to third timings as one read cycle.
Master F of the program counter 5 at the first timing
At the same time that the value of / F is latched by the slave F / F, it is output to the address bus 9, and the ROM contents of the designated address are latched in the register 12. At the second timing, the expected value of the ROM content of each address is input from the input / output port 8 and latched in the register 13 and the increment result of the program counter 5 is latched in the master F / F. At the third timing, the contents of register 13 are subtracted from the contents of register 12 in ALU 11, and the result is output to the outside via port 14.

以上のROM読出しテストを繰り返し、あるアドレスの
ROM内容と期待値に不一致があった場合、不一致ビッ
トに“1”が出力される。上記ROM読出しテスト中、
データバス10より命令レジスタ7への命令コードの読込
みは行なわれない。したがって、各タイミングで所要の
動作を行なうための命令コードは、テスト制御信号4と
テスト命令コード発生回路15により発生して命令レジス
タ7へセットされる。この命令コードが制御回路6で解
読され、各ゲートが所要の動作を行なうための制御を行
なう。本実施例ではROM内容と期待値との減算による
比較についてのみ述べたが、排他的論理和等他の演算を
実行しても、期待値を変えることにより比較が可能であ
ることは言うまでもない。また、ALU11による演算結
果を入出力ポート8へ出力するよう制御することも可能
である。また、プログラムカウンタ5のインクリメント
結果を第3のタイミングでマスターF/Fにラッチして
も同様の結果が得られる。
If the ROM contents at a certain address and the expected value do not match after repeating the above ROM read test, "1" is output to the mismatch bit. During the ROM read test,
No instruction code is read from the data bus 10 into the instruction register 7. Therefore, the instruction code for performing the required operation at each timing is generated by the test control signal 4 and the test instruction code generating circuit 15 and set in the instruction register 7. This instruction code is decoded by control circuit 6, and each gate performs control for performing a required operation. In the present embodiment, only the comparison by subtracting the ROM content and the expected value has been described, but it goes without saying that the comparison can be performed by changing the expected value even if another operation such as exclusive OR is executed. It is also possible to control the calculation result by the ALU 11 to be output to the input / output port 8. The same result can be obtained by latching the increment result of the program counter 5 in the master F / F at the third timing.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明は、ROM内容の期待値をI
Cテスタ等を使用して外部よりマイクロコンピュータ内
へ入力し、ROM出力との演算結果のみを外部へ出力す
ることにより、予めROM内容を知った者のみが読出し
テスト可能であり機密保持に大きな効果があり、また本
来マイクロコンピュータが備える機能を有効に利用して
ROM出力と入力データの比較回路等を不要とし、簡単
なテスト回路の追加のみで機密保持に効果的なROM読
出しテストが可能である。
As described above, according to the present invention, the expected value of the ROM contents is I
By using a C tester or the like to input the data into the microcomputer from the outside and outputting only the operation result with the ROM output to the outside, only a person who knows the ROM contents in advance can perform a read test, which is a great effect on confidentiality protection. In addition, by effectively utilizing the functions of the microcomputer, a ROM output / input data comparison circuit etc. is unnecessary, and a ROM read test effective for maintaining confidentiality can be performed only by adding a simple test circuit. .

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

第1図は本発明のマイクロコンピュータの一実施例のブ
ロック図、第2図は第1図のマイクロコンピュータの動
作を示すタイミング図、第3図は従来例のブロック図で
ある。 1……ROM、2……CPU、 3……ROMテスト用外部端子、 4……テスト制御信号、 5……プログラムカウンタ、6……制御回路、 7……命令レジスタ、8……入出力ポート、 9……アドレスバス、10……データバス、 11……算術演算ユニット(ALU)、 12……レジスタ、13……レジスタ、 14……出力ポート、 15……テスト命令コード発生回路、 16……RAM。
FIG. 1 is a block diagram of an embodiment of the microcomputer of the present invention, FIG. 2 is a timing diagram showing the operation of the microcomputer of FIG. 1, and FIG. 3 is a block diagram of a conventional example. 1 ... ROM, 2 ... CPU, 3 ... ROM test external terminal, 4 ... Test control signal, 5 ... Program counter, 6 ... Control circuit, 7 ... Instruction register, 8 ... I / O port , 9 ... Address bus, 10 ... Data bus, 11 ... Arithmetic operation unit (ALU), 12 ... Register, 13 ... Register, 14 ... Output port, 15 ... Test instruction code generation circuit, 16 ... ... RAM.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】命令をストアするROM、このROMのア
ドレスを指定するプログラムカウンタ、前記ROMの指
定されたアドレスから読み出された命令を実行するため
の算術論理演算ユニット、データバスに接続された入力
および出力ポート、ROMテスト用外部端子を含むマイ
クロコンピュータにおいて、前記データバス上のデータ
をラッチし、前記算術論理演算ユニットへ出力する第1
および第2のレジスタと、ROMテスト用外部端子を所
定の論理レベルとすることにより、第1のタイミングで
前記プログラムカウンタで指定され前記ROMから読み
出された内容を前記データバスを介して第1のレジスタ
にラッチさせ、第2のタイミングで前記入力ポートを介
して前記データバス上に転送されたデータを第2のレジ
スタへラッチさせ、第3のタイミングで前記算術論理演
算ユニットにより前記第1と第2のレジスタの内容に対
して演算処理を実行させその結果を前記出力ポートを介
して外部へ出力させ、さらに第2または第3のいずれか
のタイミングで前記プログラムカウンタの内容を更新さ
せる制御回路とを設けたことを特徴とするマイクロコン
ピュータ。
1. A ROM for storing an instruction, a program counter for designating an address of the ROM, an arithmetic and logic unit for executing an instruction read from the designated address of the ROM, and a data bus. A microcomputer including an input / output port and an external terminal for ROM test, which latches data on the data bus and outputs the data to the arithmetic logic operation unit.
By setting the second register and the ROM test external terminal to a predetermined logic level, the contents designated by the program counter and read from the ROM at the first timing are transferred to the first via the data bus. Data is transferred to the second register via the input port at the second timing, and the data is transferred to the second register at the second timing by the arithmetic logic operation unit at the third timing. A control circuit for executing arithmetic processing on the content of the second register, outputting the result to the outside through the output port, and further updating the content of the program counter at either the second or the third timing. And a microcomputer provided with.
JP62172188A 1987-07-10 1987-07-10 Micro computer Expired - Lifetime JPH0646387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62172188A JPH0646387B2 (en) 1987-07-10 1987-07-10 Micro computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62172188A JPH0646387B2 (en) 1987-07-10 1987-07-10 Micro computer

Publications (2)

Publication Number Publication Date
JPS6415835A JPS6415835A (en) 1989-01-19
JPH0646387B2 true JPH0646387B2 (en) 1994-06-15

Family

ID=15937208

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62172188A Expired - Lifetime JPH0646387B2 (en) 1987-07-10 1987-07-10 Micro computer

Country Status (1)

Country Link
JP (1) JPH0646387B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2581018B2 (en) * 1994-09-12 1997-02-12 日本電気株式会社 Data processing device
KR19980081499A (en) 1997-04-17 1998-11-25 모리시다요이치 In-memory data processing device and processing system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5717063A (en) * 1980-07-04 1982-01-28 Mitsubishi Electric Corp Test circuit of microcomputer
JPS5851369A (en) * 1981-09-24 1983-03-26 Nec Corp Microcomputer with test circuit
JPS6167168A (en) * 1984-09-10 1986-04-07 Nec Corp Microcomputer

Also Published As

Publication number Publication date
JPS6415835A (en) 1989-01-19

Similar Documents

Publication Publication Date Title
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
JPS58207152A (en) Test system for pipeline arithmetic device
US5410721A (en) System and method for incrementing a program counter
JPH0442699B2 (en)
US4460972A (en) Single chip microcomputer selectively operable in response to instructions stored on the computer chip or in response to instructions stored external to the chip
JPH05324348A (en) Single chip microcomputer
US4636945A (en) Microprocessor
JPH0646387B2 (en) Micro computer
US4802089A (en) Status flag handling in a digital data processing system
JPS583040A (en) Information processor
JPH053015B2 (en)
JPS6167148A (en) Microcomputer
JPH01121965A (en) Microprocessor
JPS61112248A (en) Easy-to-test logic large-scale integrated circuits
JPS62293348A (en) Microcomputer
JP2693598B2 (en) Program execution controller for digital signal processor
JPH03219379A (en) Microcomputer
JPS62169237A (en) Central processing unit
JPH09179848A (en) Information processor
JPH1011316A (en) Single-chip microcomputer and its test
JPS6227423B2 (en)
JPH02205987A (en) Arithmetic processing system
JPH05100901A (en) Microcomputer
EP0423735A2 (en) Microprocessor having parity check function
JPH081596B2 (en) Microprocessor