JPS62205429A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPS62205429A
JPS62205429A JP61049712A JP4971286A JPS62205429A JP S62205429 A JPS62205429 A JP S62205429A JP 61049712 A JP61049712 A JP 61049712A JP 4971286 A JP4971286 A JP 4971286A JP S62205429 A JPS62205429 A JP S62205429A
Authority
JP
Japan
Prior art keywords
rom
circuit
ram
address
built
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
JP61049712A
Other languages
Japanese (ja)
Inventor
Hisashi Fujiwara
藤原 久
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 JP61049712A priority Critical patent/JPS62205429A/en
Publication of JPS62205429A publication Critical patent/JPS62205429A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute the free change and the holding of the secret of the contents of a machine instruction executed by an CPU by providing an address control circuit, a logical synthesizing circuit, etc., and changing the value of a built-in RAM. CONSTITUTION:From a program counter 1 to an address control circuit 11, a bus line 16 is provided. Thus, a RAM 4 is individually accessed from an address pointer 2 by the input of a control signal inversion MODIFY through a circuit 11 and accessed from the counter 1 simultaneously with a ROM 3. The ROM 3 and the RAM 4 are connected by bus lines 15, 16 and 18, and through a logical synthesizing circuit 12, the output is logically synthesized. Either of the data read from the ROM 3 by the input of the signal inversion MODIFY or the logical synthesizing result is sent through a changing-over circuit 13 to a data bus 5 and stored into an instruction register 6. Thus, the contents of the machine instruction executed by a CPU can be freely changed and the secret can be held.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータに関し、特に一つのチッ
プを有するマイクロコンピュータに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer, and particularly to a microcomputer having one chip.

〔従来の技術〕[Conventional technology]

従来のROMとRAMを内蔵するマイクロコンピュータ
のブロック図を第4図に示す。従来技術によるマイクロ
コンピュータでは、プログラムカウンタ1により指定さ
れたROM3の記憶データが、データバス5を介して命
令レジスタ6に入力する。また、アドレスポインタ2に
よって指示されたRAM4の内容はデータバス5に出力
される。
FIG. 4 shows a block diagram of a conventional microcomputer incorporating ROM and RAM. In the conventional microcomputer, data stored in the ROM 3 designated by the program counter 1 is input to the instruction register 6 via the data bus 5. Furthermore, the contents of the RAM 4 indicated by the address pointer 2 are output to the data bus 5.

一般に、ROM3にはユーザーが任意に機械語データを
プログラムすることが可能で、マイクロコンピュータの
動作はこのROM3の内容により決定されていた。
Generally, a user can program machine language data arbitrarily into the ROM 3, and the operation of the microcomputer is determined by the contents of the ROM 3.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来のマイクロコンピュータにおいて、内蔵さ
れるROM3に記憶データを製造工程中に決定するマス
クROMを使用した場合、ROM3に記憶された機械語
命令の内容を製造後に変更す的に決定式れてしまうとい
う欠点があった。
In the conventional microcomputer described above, when a mask ROM is used in which the data stored in the built-in ROM 3 is determined during the manufacturing process, it is not possible to change the contents of the machine language instructions stored in the ROM 3 after manufacturing. There was a drawback that it could be stored away.

また、従来のマイクロコンピュータでは、マイクロコン
ピュータの有するテスト機能(内蔵ROMヘリファイ機
能)を利用して、第3者が内蔵ROM3に記憶された機
械語命令を容易に読出すことができた。従って、その秘
密が保持されないという欠点を有していた。
Furthermore, in the conventional microcomputer, a third party could easily read the machine language instructions stored in the built-in ROM 3 by using the test function (built-in ROM helifi function) of the microcomputer. Therefore, it has the disadvantage that its secrecy cannot be maintained.

本発明の目的は、内蔵されるROMの内容が固定されて
いても内蔵される几AMの値を変更することによってC
PUの実行する機械語命令の内容を自由に変更でき、し
かも秘密を保持できるマイクロコンピュータを提供する
ことにある。
An object of the present invention is to change the value of the built-in AM even if the contents of the built-in ROM are fixed.
To provide a microcomputer which can freely change the contents of machine language instructions executed by a PU and can keep secrets.

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

本発明のマイクロコンピュータH1ROMとRAMを内
蔵したマイクロコンビ具−夕において、前記ROM及び
RAMを同時にアクセスする手段と、前記ROMの出力
と前記RAMの出力の論理合成結果を命令として実行す
る手段を有している。
A microcomputer device incorporating a microcomputer H1ROM and a RAM according to the present invention includes means for simultaneously accessing the ROM and RAM, and means for executing a logical synthesis result of the output of the ROM and the output of the RAM as an instruction. are doing.

〔実施例〕〔Example〕

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

第1図は本発明の一実施例のブロック図である。FIG. 1 is a block diagram of one embodiment of the present invention.

第1図に示すように、ROM3とR,AM4とを同時に
アクセスする手段として、本実施例ではアドレス制御回
路+1を新しく設け、プログラムカウンタ1から11,
0M3に接続するバス線15と並列にプログラムカウン
タ1からアドレス制御回路11にもバス線16を設け、
RAM4Hアドレス制御回路11を介し、制御信号MO
DIFYの入力によシアドレスポインタ2から単独にで
も、またプログラムカウンタ1からROM3と同時にア
クセスされるようにした。尚、各種バス線に括弧を付し
て記入した数字はビット数を示す。
As shown in FIG. 1, in this embodiment, a new address control circuit +1 is provided as a means for simultaneously accessing ROM3, R, and AM4, and program counters 1 to 11,
A bus line 16 is also provided from the program counter 1 to the address control circuit 11 in parallel with the bus line 15 connected to 0M3,
Through the RAM4H address control circuit 11, the control signal MO
By inputting DIFY, access can be made from the seat address pointer 2 independently or from the program counter 1 at the same time as the ROM 3. Note that the numbers written in parentheses for each bus line indicate the number of bits.

次に、ROM3とRAM4のそれぞれの出力の論理合成
するために論理合成回路12を設け、 ROM3とRA
M4の両方をバス線で接続し論理合成できるようにした
。論理合成回路として、例えば排他的論理和ゲートを用
いることができる。
Next, a logic synthesis circuit 12 is provided to logically synthesize the respective outputs of ROM3 and RAM4.
Both M4s were connected with a bus line to enable logic synthesis. For example, an exclusive OR gate can be used as the logic synthesis circuit.

次に、論理合成結果を命令として実行する手段として切
換回路13を設け、ROM3と論理合成回路12の両方
にバス線でつなぎ、制御信号MODIFYの入力によf
in、0M3から読出されたデータあるいは論理合成結
果のいずれかがデータバス5に送出されるようにし、そ
れが命令レジスタ6に記憶されるようにした。
Next, a switching circuit 13 is provided as a means for executing the logic synthesis result as a command, and is connected to both the ROM 3 and the logic synthesis circuit 12 by a bus line, and is controlled by inputting a control signal MODIFY.
Either the data read from in, 0M3 or the logic synthesis result is sent to the data bus 5 and stored in the instruction register 6.

新しく設けたアドレス制御回路の詳細回路の一例を第2
図に、切換回路の詳細回路の一例を第3図に示す。
An example of the detailed circuit of the newly installed address control circuit is shown in the second section.
FIG. 3 shows an example of a detailed circuit of the switching circuit.

次に、この実施例の動作について第1図乃至第3図及び
@1表を参照して説明する。
Next, the operation of this embodiment will be explained with reference to FIGS. 1 to 3 and Table 1.

第1表 まず、初期値として、プログラムカウンタ1は容量4に
バイトのROM3のアドレスθ番地を指す。制御端子7
の制御信号MODIFYを“1″とすると、第2図のよ
うに構成されたアドレス制御回路11は、アドレスポイ
ンタ2の値が容t256バイトのR,AM4を指すよう
制御し、第3図のように構成された切換回路13は、プ
ログラムカウンタ1で指定されたROM4の出力をその
ままデータバス5へ送出す制御をする。すなわち、従来
例(第4図)と同様の動作をすることになシ、第1表の
ように、プログラムカウンタ1のアドレスが@000 
’、 @001 am、・・・・・・と増加すると、そ
れに対応するROMaの記憶データ”03”、@A7”
、・・・・・・が命令レジスタ6に取込まれる。ここで
プログラムカウンタ1の値が′″BA3’BA3’番地
き、制御信号MODIFYを@O#にすると、アト、X
制御回路11は、プログラムカウンタ出方の下位4ビツ
トとアドレス生成回路110にょシ生成された上位4ビ
ツトとを合成した8ビツトのアドレスによfiRAM4
を指すよう制御する。本実施例では上位4ビツトとして
16進数でF”を発生す2、)ため、256バイトのR
AM領域のうち″″Fo#〜” FF’番地の16バイ
トが有効となる。従って、第1表のように、プログラム
カウンタ1(、gROM3の“EAB”番地を指し、ア
ドレス制御回路11は、プログラムカウンタ1の下位4
ビツト18”と、アドレス生成回路110の出力である
上位4ビツト“F′との合成アドレスによって、RAM
4のF8”番地を指す。つまシ、ROM3とROM4が
同時にアクセスされたことになる。また、制御信号MO
DIFYが0”のときは、切換回路13は論理合成回路
12の出力をデータバス5に出力するように働くため%
″″EA3’″EA3’番地′″2D’と@Fs”番地
のRAM内容′a01”の排他的論理和”2D”■“0
1”−”2C”が、データバス5を介して命令レジスタ
6へ取込まれる。
Table 1 First, as an initial value, program counter 1 points to address θ of ROM 3 with a capacity of 4 bytes. Control terminal 7
When the control signal MODIFY is set to "1", the address control circuit 11 configured as shown in FIG. The switching circuit 13 configured as shown in FIG. In other words, if the address of program counter 1 is @000 as shown in Table 1, it will not operate in the same way as the conventional example (Fig. 4).
', @001 am, ......, the corresponding ROMa storage data "03", @A7"
, . . . are taken into the instruction register 6. Here, when the value of program counter 1 is at address ``''BA3'BA3' and the control signal MODIFY is set to @O#, at,
The control circuit 11 uses an 8-bit address that is a combination of the lower 4 bits of the program counter output and the upper 4 bits generated by the address generation circuit 110 to write to the fiRAM 4.
control to point to. In this embodiment, F" is generated in hexadecimal as the upper 4 bits2), so the 256-byte R
In the AM area, 16 bytes at address ``Fo#~''FF' are valid. Therefore, as shown in Table 1, the address control circuit 11 Lower 4 of program counter 1
RAM
This means that ROM3 and ROM4 were accessed at the same time. Also, the control signal MO
When DIFY is 0'', the switching circuit 13 works to output the output of the logic synthesis circuit 12 to the data bus 5.
Exclusive OR of ``''EA3''''EA3' address ``2D'' and RAM content ``a01'' at address @Fs''``2D'' ■ ``0
1"-"2C" is taken into the instruction register 6 via the data bus 5.

同様にして、プログラムカウンタ1の値が” EA9”
Similarly, the value of program counter 1 becomes "EA9".
.

′″EAA#、“EAB”と増加すると、アドレス制御
口11の出力、すなわち、内蔵RAM4のアドレスは′
″F9”、″FA”、 @FB”と変化し、命令レジス
タ6にはそれぞれ14n”■105″=“4E#、“A
4#■′68″=@CC″、“69″■′″A1”=@
C8”  が入力する。結果とし7て、制御信号MOD
iFYが@0#である間は、命令レジスタ6にはROM
3の機械語データの内容をRAM4のデータによって修
飾したものが命令として取込まねることになる。
``When EAA# and ``EAB'' increase, the output of the address control port 11, that is, the address of the built-in RAM 4 becomes ``
The commands change to "F9", "FA", and @FB, and the instruction register 6 contains 14n"■105"="4E#" and "A", respectively.
4#■'68''=@CC'', "69"■'''A1''=@
C8" is input. As a result, the control signal MOD
While iFY is @0#, the instruction register 6 contains ROM.
The contents of the machine language data in step 3 modified by the data in RAM 4 cannot be taken in as an instruction.

本実施例では、制御端子7を用い内蔵ROMに記憶され
たプログラムの一部を修飾する方法について説明したが
、この他にも幅広い応用が考えられる。すなわち、アド
レス変換回路で内蔵RAMの任意の領域を修飾用のデー
タを格納する領域として指定してもよいし、常に制御信
号MOD I FYを10#とじて、内蔵ROMの機械
語データをすべて修飾して機械語命令を生成してもよい
。また制御手段としては、外部端子以外にもモードレジ
スタ等を用いる方法がある。
In this embodiment, a method of modifying a part of the program stored in the built-in ROM using the control terminal 7 has been described, but a wide range of other applications are possible. In other words, an arbitrary area of the built-in RAM can be designated as an area for storing modification data using the address conversion circuit, or the control signal MOD I FY can always be set to 10# to modify all the machine language data in the built-in ROM. machine language instructions may be generated. In addition to external terminals, there is also a method of using a mode register or the like as a control means.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、内蔵ROM出力と内蔵
RAM出力の論理合成結果から機械語命令を得ることに
よシ、内蔵ROMの内容が固定されていても、内蔵RA
Mの値を変更することによってCPUの実行する機械語
命令の内容を自由に変更できる効果がある。
As explained above, the present invention provides machine language instructions by obtaining machine language instructions from the logical synthesis results of built-in ROM output and built-in RAM output.
By changing the value of M, the content of machine language instructions executed by the CPU can be freely changed.

ざらに本発明による内蔵ROM出力修飾機能を用いれば
、内蔵ROMベリファイ1幾能を利用して第3者が内蔵
ROMの内容を読出しても、その情報だけではCPUの
実行する機械語命令の内容を知ることができないため、
その秘密を保持できる効果がある。
Roughly speaking, if the built-in ROM output modification function according to the present invention is used, even if a third party reads the contents of the built-in ROM using the built-in ROM verification 1 function, the content of the machine language instruction executed by the CPU cannot be determined from that information alone. Because it is not possible to know
It has the effect of keeping that secret.

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

第1図は本発明の一実施例のブロック図、第2図は第1
図のアドレス制御回路の詳細回路の一例の回路図、算3
図は第1図の切換回路の詳細回路の一例の回路図、第4
図は従来のマイクロコンピュータの一例のブロック図で
ある。 1・・・・・・プログラムカウンタ、2・・・・・・ア
ドレスポインタ、3・・・・・・内&ROM、4・・・
・・・内蔵RAM。 5・・・・・・データバス、6・・・・・・命令レジス
タ、7・・・・・・外部制御端子、11・・・・・・ア
ドレス制御回路、12・・・・・・論理合成回路、13
・・・・・・切換回路、15.16゜17.18・・・
・・・パス線、110・・・・・・RAMの上位アドレ
ス生成回路。 代理人 弁理士  内 原   賢 ¥10 猶2図 た3図
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG. 2 is a block diagram of an embodiment of the present invention.
A circuit diagram of an example of a detailed circuit of the address control circuit shown in Figure 3.
The figure is a circuit diagram of an example of a detailed circuit of the switching circuit in figure 1,
The figure is a block diagram of an example of a conventional microcomputer. 1...Program counter, 2...Address pointer, 3...Inner & ROM, 4...
...Built-in RAM. 5...Data bus, 6...Instruction register, 7...External control terminal, 11...Address control circuit, 12...Logic Synthesis circuit, 13
...Switching circuit, 15.16°17.18...
...Pass line, 110...RAM upper address generation circuit. Agent: Patent Attorney Ken Uchihara ¥10

Claims (1)

【特許請求の範囲】[Claims] ROMとRAMを内蔵したマイクロコンピュータにおい
て、前記ROM及び前記RAMを同時にアクセスする手
段と、前記ROMの出力と前記RAMの出力の論理合成
結果を命令として実行する手段を有することを特徴とす
るマイクロコンピュータ。
A microcomputer having a built-in ROM and a RAM, characterized in that it has means for simultaneously accessing the ROM and the RAM, and means for executing a logical synthesis result of the output of the ROM and the output of the RAM as an instruction. .
JP61049712A 1986-03-06 1986-03-06 Microcomputer Pending JPS62205429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61049712A JPS62205429A (en) 1986-03-06 1986-03-06 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61049712A JPS62205429A (en) 1986-03-06 1986-03-06 Microcomputer

Publications (1)

Publication Number Publication Date
JPS62205429A true JPS62205429A (en) 1987-09-10

Family

ID=12838797

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61049712A Pending JPS62205429A (en) 1986-03-06 1986-03-06 Microcomputer

Country Status (1)

Country Link
JP (1) JPS62205429A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54114944A (en) * 1978-02-15 1979-09-07 Ibm Method of correcting instruction
JPS59188897A (en) * 1983-04-11 1984-10-26 Hitachi Ltd Secret protecting device of data processor
JPS60171537A (en) * 1984-02-15 1985-09-05 Fuji Xerox Co Ltd Microprogram controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54114944A (en) * 1978-02-15 1979-09-07 Ibm Method of correcting instruction
JPS59188897A (en) * 1983-04-11 1984-10-26 Hitachi Ltd Secret protecting device of data processor
JPS60171537A (en) * 1984-02-15 1985-09-05 Fuji Xerox Co Ltd Microprogram controller

Similar Documents

Publication Publication Date Title
JPH0454652A (en) Microcomputer
JPH01263737A (en) Emulation device
US5606715A (en) Flexible reset configuration of a data processing system and method therefor
JPS62205429A (en) Microcomputer
JPH02161544A (en) Single chip microcomputer
JPH0343827A (en) Fuzzy microcomputer
JPH02310786A (en) Microcomputer
KR100357177B1 (en) Device for instruction interpretating of micro computer
KR20000003404A (en) Micro controller for accessing an external memory
JPS58225458A (en) Single-chip microcomputer
JPS638937A (en) Single chip microcomputer
JPH01237843A (en) Microprocessor
JPH053015B2 (en)
JPS6043757A (en) Microcomputer of one chip
JPH0375956A (en) Single chip microcomputer
JPH03263147A (en) Semiconductor integrated circuit device
JPS62156737A (en) 1-chip microcomputer
JPH01205337A (en) Instruction control system
JP2003288316A (en) Microcomputer device, input/output device, and semiconductor device
JPS6376095A (en) Ic card
JPH0215345A (en) Data processor
KR20020059025A (en) Ram access device for adjusting access time optionally
JPS6152517B2 (en)
JPH01188948A (en) Generating device for template matching address
JPH04305745A (en) Register file system