JPH05266225A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH05266225A
JPH05266225A JP4090193A JP9019392A JPH05266225A JP H05266225 A JPH05266225 A JP H05266225A JP 4090193 A JP4090193 A JP 4090193A JP 9019392 A JP9019392 A JP 9019392A JP H05266225 A JPH05266225 A JP H05266225A
Authority
JP
Japan
Prior art keywords
rom
built
address
output
instruction
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
JP4090193A
Other languages
Japanese (ja)
Inventor
Masaaki Arioka
雅章 有岡
Shigeo Mizugaki
重生 水垣
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 JP4090193A priority Critical patent/JPH05266225A/en
Publication of JPH05266225A publication Critical patent/JPH05266225A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To prevent the third person from easily taking out contents of an incorporated ROM in a microcomputer provided with the incorporated ROM and another memory. CONSTITUTION:An incorporated ROE read inhibiting part 19 is provided which invalidates data outputted from an incorporated ROM 6 in accordance with the output of a logic gate 18. A read inhibiting logic gate 21 which is opened and closed based on the output of the logic gate 18 is inserted to each data output line 20 of the incorporated ROM 6 to constitute this incorporated ROM read inhibiting part 19, and data outputted from the incorporated ROM 6 is invalidated when the incorporated ROM 6 is accessed by a program stored in the memory other than the incorporated ROM 6.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は内蔵ROMと、それ以外
のメモリを備えたマイクロコンピュータにおける、内蔵
ROMに格納された情報の守秘性に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to confidentiality of information stored in a built-in ROM in a microcomputer provided with a built-in ROM and other memories.

【0002】[0002]

【従来の技術】図4は従来の内蔵ROMと、それ以外の
メモリとを備えたマイクロコンピュータの一例を示すブ
ロック図である。図において、1はマイクロコンピュー
タ、2はマイクロコンピュータ1と外部のデバイス間で
のデータ,アドレス,各種の制御信号の通路となる外部
バス、3は外部バス2を介してアクセス可能な内蔵RO
M以外のメモリとしての外部メモリ、4はCPUコア、
5は外部バス2とデータ,アドレス,各種の制御信号の
やり取りをする入出力部、6はプログラム,データを格
納する内蔵ROM、7は上記内蔵ROM6以外のメモリ
としての内蔵RAM、8はマイクロコンピュータ1内の
各ブロック間のデータ,アドレス,各種の制御信号の通
路となる内部バスである。上記CPUコア4は上記内部
バス8を介して上記各メモリからの命令を読込む命令フ
ェッチ部10と、この命令フェッチ部10で読込まれた
命令をデコードする命令デコード部11と、この命令デ
コード部11で得られた命令の情報によって命令を実行
するための制御信号を生成する制御部12と、この制御
部12の制御信号によって演算等を行い命令を実行する
実行部13と、上記命令フェッチ部10でフェッチする
命令のアドレスを示すプログラムカウンタ14とから成
る。
2. Description of the Related Art FIG. 4 is a block diagram showing an example of a conventional microcomputer having a built-in ROM and a memory other than the above. In the figure, 1 is a microcomputer, 2 is an external bus that serves as a path for data, addresses, and various control signals between the microcomputer 1 and external devices, and 3 is a built-in RO accessible via the external bus 2.
External memory as a memory other than M, 4 is a CPU core,
Reference numeral 5 is an input / output unit for exchanging data, addresses and various control signals with the external bus 2, 6 is a built-in ROM for storing programs and data, 7 is a built-in RAM as a memory other than the built-in ROM 6, and 8 is a microcomputer. It is an internal bus that serves as a path for data, addresses, and various control signals between blocks in one. The CPU core 4 has an instruction fetch unit 10 that reads an instruction from each of the memories via the internal bus 8, an instruction decoding unit 11 that decodes the instruction read by the instruction fetch unit 10, and an instruction decoding unit. A control unit 12 that generates a control signal for executing an instruction based on the information of the instruction obtained in 11, an execution unit 13 that executes an instruction by performing an operation or the like by the control signal of the control unit 12, and the instruction fetch unit. 10 and a program counter 14 which indicates the address of the instruction to be fetched.

【0003】図5は、図4中の制御部12の内部のブロ
ック図である。図において、23は命令デコード部11
から入力される命令の情報によってマイクロROM2
4,マイクロプログラムカウンタ22を制御する制御回
路、22はマイクロROM24のアドレスを示すマイク
ロプログラムカウンタ、24はマイクロコンピュータ1
を構成するハードウェアを制御するための情報をデータ
として記憶しており、読み出された制御情報を制御信号
として出力するマイクロROMである。
FIG. 5 is a block diagram of the inside of the control unit 12 in FIG. In the figure, 23 is an instruction decoding unit 11.
Depending on the command information input from the micro ROM2
4, a control circuit for controlling the micro program counter 22, 22 is a micro program counter indicating the address of the micro ROM 24, and 24 is the microcomputer 1
This is a micro ROM that stores information for controlling the hardware configuring the above as data, and outputs the read control information as a control signal.

【0004】図6は従来の内蔵ROMと、それ以外のメ
モリとを備えたマイクロコンピュータのアドレス空間の
一例を示す概念図である。この例では、全アドレス空
間,64KB(キロバイト)のうち4KBを内蔵ROM
6として、1KBを内蔵RAM7として実装している。
外部メモリ3は残りの59KBまで増設することができ
る。例えば、H’0000(H’XXXXはXXXXが
16進数で表されていることを示す、以下同様)から
H’0FFFまでのアドレスが内蔵ROM6に割り付け
られており、この範囲のアドレスによって内蔵ROM6
にアクセスできる。同様に、内蔵RAM7,外部メモリ
3はそれぞれH’1000からH’13FF、H’14
00からH’FFFF等のアドレスが割り付けられてい
る。以下、内蔵ROM6のアドレスなどと言う場合内蔵
ROM6に割り付けられた任意のアドレスを表す。
FIG. 6 is a conceptual diagram showing an example of an address space of a microcomputer including a conventional built-in ROM and a memory other than that. In this example, 4 KB out of 64 KB (kilobytes) of the entire address space is built-in ROM
6, 1 KB is mounted as the built-in RAM 7.
The external memory 3 can be expanded to the remaining 59 KB. For example, addresses from H'0000 (H'XXXX indicates that XXX is represented in hexadecimal notation, and so on) to H'0FFF are assigned to the built-in ROM 6, and the built-in ROM 6 is assigned according to this range of addresses.
Can access. Similarly, the internal RAM 7 and the external memory 3 are H'1000 to H'13FF and H'14, respectively.
Addresses such as 00 to H'FFFF are assigned. Hereinafter, when the address of the built-in ROM 6 is referred to, it represents an arbitrary address assigned to the built-in ROM 6.

【0005】次に図4を用いて、プログラムが実行され
る動作について説明する。命令フェッチ部10は入出力
部9によって内部バス8,あるいは内部バス8,入出力
部5,外部バス2を介して、プログラムカウンタ14が
示すアドレスに格納されている命令をフェッチする。通
常、ROMを内蔵するマイクロコンピュータでは内蔵R
OM6に命令が格納されるが、内蔵ROM以外のメモリ
としての内蔵RAM7及び外部メモリ3上の命令をフェ
ッチすることも可能である。命令デコード部11はフェ
ッチされた命令をデコードしその結果を制御部12に送
る。制御部12はその情報をもとに命令を実行するため
の制御信号を生成し実行部13に送り、実行部13は命
令を実行する。以上の動作を繰り返すことによりプログ
ラムが実行されていく。
Next, the operation of executing the program will be described with reference to FIG. The instruction fetch unit 10 fetches the instruction stored at the address indicated by the program counter 14 via the internal bus 8, or the internal bus 8, the input / output unit 5, and the external bus 2 by the input / output unit 9. Normally, a microcomputer with a built-in ROM has a built-in R
Although the instruction is stored in the OM 6, it is also possible to fetch the instruction on the internal RAM 7 as a memory other than the internal ROM and the external memory 3. The instruction decoding unit 11 decodes the fetched instruction and sends the result to the control unit 12. The control unit 12 generates a control signal for executing the instruction based on the information and sends it to the execution unit 13, and the execution unit 13 executes the instruction. The program is executed by repeating the above operation.

【0006】次に図4を用いて、第三者が内蔵ROM6
に格納されたプログラムの内容を知ることを目的に内蔵
ROM6の内容を外部に取り出す動作を説明する。まず
内蔵RAM7上に次のような命令を格納する。 LDA[内蔵ROM6のアドレス] STA[外部メモリ3のアドレス] ただし、命令LDA,STAは以下のような機能を持
つ。 LDA:オペランドの示すアドレスに格納されているデ
ータをレジスタに格納する。 STA:レジスタの値をオペランドの示すアドレスに格
納する。 命令フェッチ部10は入出力部9によって内部バス8を
介して、内蔵RAM7に格納されている命令LDA[内
蔵ROM6のアドレス]をフェッチする。実行部13は
この命令をデコード結果から生成された制御信号によっ
て実行する。すなわち、オペランドに示される内蔵RO
M6のアドレスに格納されたデータを入出力部9,内部
バス8を介して実行部13内の図示しないレジスタに格
納する。次に、命令フェッチ部10は入出力部9によっ
て内部バス8を介して、内蔵RAM7に格納されている
命令STA[外部メモリ3のアドレス]をフェッチす
る。実行部13はこの命令をデコード結果から生成され
た制御信号によって実行する。すなわち、レジスタの値
を入出力部9,内部バス8,入出力部5,外部バス2を
介してオペランドに示される外部メモリ3のアドレスに
格納する。以上の動作を命令LDA,STAのオペラン
ドアドレスをインクリメントしながら繰り返すことによ
り内蔵ROM6の内容を全て外部メモリ3上に転送する
ことができる。
Next, referring to FIG. 4, a third party has built-in ROM 6
The operation of taking out the contents of the built-in ROM 6 to the outside for the purpose of knowing the contents of the program stored in will be described. First, the following instructions are stored in the built-in RAM 7. LDA [address of built-in ROM 6] STA [address of external memory 3] However, the instructions LDA and STA have the following functions. LDA: The data stored at the address indicated by the operand is stored in the register. STA: The register value is stored at the address indicated by the operand. The instruction fetch unit 10 fetches the instruction LDA [address of the built-in ROM 6] stored in the built-in RAM 7 via the internal bus 8 by the input / output unit 9. The execution unit 13 executes this instruction by the control signal generated from the decoding result. That is, the built-in RO indicated by the operand
The data stored at the address of M6 is stored in a register (not shown) in the execution unit 13 via the input / output unit 9 and the internal bus 8. Next, the instruction fetch unit 10 fetches the instruction STA [address of the external memory 3] stored in the internal RAM 7 via the internal bus 8 by the input / output unit 9. The execution unit 13 executes this instruction by the control signal generated from the decoding result. That is, the value of the register is stored in the address of the external memory 3 indicated by the operand via the input / output unit 9, the internal bus 8, the input / output unit 5, and the external bus 2. By repeating the above operation while incrementing the operand addresses of the instructions LDA and STA, the entire contents of the internal ROM 6 can be transferred to the external memory 3.

【0007】[0007]

【発明が解決しようとする課題】従来の内蔵ROM6
と、それ以外のメモリとを備えたマイクロコンピュータ
1は以上のように構成されているので、上記内蔵ROM
6以外のメモリに格納されたプログラムによって上記内
蔵ROM6の内容を外部に取り出し、第三者が容易に内
蔵ROM6の内容を知ることができるという問題点があ
った。
Conventional built-in ROM 6
And the other memory, the microcomputer 1 is configured as described above.
There is a problem that the contents of the built-in ROM 6 can be taken out by a program stored in a memory other than 6 and a third person can easily know the contents of the built-in ROM 6.

【0008】本発明は上記のような問題点を解決するた
めになされたもので、内蔵ROMの内容を容易に外部に
取り出すことができないマイクロコンピュータ1Aを得
ることを目的とする。
The present invention has been made to solve the above problems, and an object thereof is to obtain a microcomputer 1A in which the contents of a built-in ROM cannot be easily taken out to the outside.

【0009】[0009]

【課題を解決するための手段】第1の発明に係るマイク
ロコンピュータ1Aは、上記プログラムカウンタ14の
値が上記内蔵ROM6のアドレスでないことを検出する
第1のアドレス比較器15と、アドレスバスに出力され
ている値が上記内蔵ROM6のアドレスであることを検
出する第2のアドレス比較器16と、上記メモリに格納
されたデータをオペランドとしてアクセスするためにア
ドレスを出力していることを示すオペランドアクセス信
号線17と、上記第1,第2のアドレス比較器15,1
6の出力信号と上記オペランドアクセス信号とを入力す
る論理ゲート18と、この論理ゲート18の出力に応じ
て上記内蔵ROM6から出力されるデータを無効化する
内蔵ROM読出し禁止部19とを設け、上記内蔵ROM
以外のメモリに格納されたプログラムによって上記内蔵
ROM6にアクセスしようとした場合、上記内蔵ROM
6から出力されるデータを無効化する。
A microcomputer 1A according to a first invention outputs to a first address comparator 15 for detecting that the value of the program counter 14 is not an address of the internal ROM 6 and an address bus. A second address comparator 16 for detecting that the stored value is the address of the built-in ROM 6, and an operand access indicating that an address is output to access the data stored in the memory as an operand. The signal line 17 and the first and second address comparators 15 and 1
A logic gate 18 for inputting the output signal of 6 and the operand access signal, and a built-in ROM read prohibiting section 19 for invalidating the data output from the built-in ROM 6 according to the output of the logic gate 18 are provided. Built-in ROM
If the built-in ROM 6 is accessed by a program stored in a memory other than
The data output from 6 is invalidated.

【0010】第2の発明に係るマイクロコンピュータ1
Aは、上記内蔵ROM読出し禁止部19を、上記論理ゲ
ートの出力にもとづき開閉される読出し禁止用論理ゲー
ト21を上記内蔵ROM6の各データ出力線20に介挿
して構成する。
Microcomputer 1 according to the second invention
A includes the built-in ROM read prohibiting section 19 in which a read prohibiting logic gate 21 which is opened / closed based on the output of the logic gate is inserted into each data output line 20 of the built-in ROM 6.

【0011】[0011]

【作用】第1の発明に係るマイクロコンピュータ1A
は、上記第1のアドレス比較器15が出力するプログラ
ムカウンタ14の値が内蔵ROM6のアドレスでないこ
とを示す信号と、上記第2のアドレス比較器16が出力
するアドレスバスに出力されている値が内蔵ROM6の
アドレスであることを示す信号と、上記制御部から上記
オペランドアクセス信号線17を介して出力され、メモ
リに格納されたデータをオペランドとしてアクセスする
ためにアドレスを出力していることを示すオペランドア
クセス信号とがすべてオンのとき、これらの信号を入力
する上記論理ゲート18は上記内蔵ROM読出し禁止部
19をオンとする信号を出力する。
Operation: Microcomputer 1A according to the first invention
Is a signal indicating that the value of the program counter 14 output from the first address comparator 15 is not the address of the internal ROM 6 and the value output to the address bus output from the second address comparator 16. A signal indicating that the address is the address of the built-in ROM 6 and that the address is output from the control section through the operand access signal line 17 to access the data stored in the memory as an operand. When all the operand access signals are turned on, the logic gate 18 which inputs these signals outputs a signal which turns on the built-in ROM read prohibiting section 19.

【0012】第2の発明に係るマイクロコンピュータ1
Aは、上記論理ゲート18からオンの出力信号を入力さ
れたとき、上記読出し禁止用論理ゲート21がオンとな
って、上記内蔵ROM6の各データ出力線20に出力さ
れる値に関係なく無効化されたデータのみを上記内部バ
ス8に出力する。
Microcomputer 1 according to the second invention
When a turn-on output signal is input from the logic gate 18, the read-out prohibiting logic gate 21 turns on, and is invalidated regardless of the value output to each data output line 20 of the internal ROM 6. Only the processed data is output to the internal bus 8.

【0013】[0013]

【実施例】本発明に係る内蔵ROMと、それ以外のメモ
リとを備えたマイクロコンピュータ1Aの一実施例を図
1に示す。図において図4と同じものは同一の符号を付
して説明を省略する。図中、15はプログラムカウンタ
14の値が内蔵ROM6のアドレスでないことを検出す
る第1のアドレス比較器、16は内部バス8に出力され
たアドレスが内蔵ROM6のアドレスであることを検出
する第2のアドレス比較器、17はCPUコア4がメモ
リに格納されたデータをオペランドとしてアクセスする
ためにアドレスを出力していることを示すオペランドア
クセス信号線、18は第1のアドレス比較器15,第2
のアドレス比較器16が出力する信号とオペランドアク
セス信号を入力する論理ゲート、19は論理ゲート18
から出力される信号を入力して内蔵ROM6から出力さ
れるデータを無効化する内蔵ROM読出し禁止部であ
る。
FIG. 1 shows an embodiment of a microcomputer 1A having a built-in ROM according to the present invention and a memory other than that. In the figure, the same parts as those in FIG. In the figure, 15 is a first address comparator that detects that the value of the program counter 14 is not the address of the internal ROM 6, and 16 is a second address comparator that detects that the address output to the internal bus 8 is the address of the internal ROM 6. Address comparator, 17 is an operand access signal line indicating that the CPU core 4 outputs an address for accessing the data stored in the memory as an operand, and 18 is the first address comparator 15 and the second address comparator.
, A logic gate for inputting a signal output from the address comparator 16 and an operand access signal, 19 is a logic gate 18
It is a built-in ROM read-out prohibiting section that inputs a signal output from the built-in ROM and invalidates the data output from the built-in ROM 6.

【0014】本発明に係る内蔵ROM読出し禁止部19
の内部の回路図を図2に示す。図において、20はバス
線の本数だけあり、内蔵ROM6がデータを出力するデ
ータ出力線、21は上記各データ出力線20に介挿さ
れ、入力が上記論理ゲート18に接続され、出力がデー
タバスに接続されている読出し禁止用論理ゲートであ
る。
Built-in ROM read prohibiting section 19 according to the present invention
FIG. 2 shows a circuit diagram inside the device. In the figure, 20 is the number of bus lines, a data output line through which the built-in ROM 6 outputs data, 21 is inserted in each of the data output lines 20, the input is connected to the logic gate 18, and the output is the data bus. Is a read-inhibit logic gate connected to.

【0015】図1中の制御部12の内部のブロック図は
図5と同じである。マイクロROM24が出力する制御
信号の中には通常、オペランドをアクセスしていること
を示す信号が存在する。この信号線がオペランドアクセ
ス信号線と接続されている。
The internal block diagram of the control unit 12 in FIG. 1 is the same as that in FIG. Among the control signals output from the micro ROM 24, there is usually a signal indicating that the operand is being accessed. This signal line is connected to the operand access signal line.

【0016】図2を用いて、上記内蔵ROM読出し禁止
部19の動作について説明する。論理ゲート18が
‘0’を出力していると(正論理で記述する、以下も同
様)、読出し禁止用論理ゲート21の出力は、内蔵RO
M6がデータ出力線20に出力した値がそのまま内部バ
ス8に出力される。論理ゲート18が‘1’を出力して
いると読出し禁止用論理ゲート21の出力は内蔵ROM
6がデータ出力線20に出力した値に関わらず‘1’と
なり、内部バス8に出力される内蔵ROM6のデータが
無効化され、読出しが禁止される。
The operation of the built-in ROM read prohibiting section 19 will be described with reference to FIG. When the logic gate 18 outputs "0" (described in positive logic, the same applies to the following), the output of the read inhibit logic gate 21 is the built-in RO.
The value output to the data output line 20 by M6 is output to the internal bus 8 as it is. When the logic gate 18 outputs "1", the read inhibit logic gate 21 outputs the internal ROM.
6 becomes '1' regardless of the value output to the data output line 20, the data of the internal ROM 6 output to the internal bus 8 is invalidated, and reading is prohibited.

【0017】次に図1を用いて、プログラムが内蔵RO
M6に格納される場合の動作について説明する。尚、本
発明に係るマイクロコンピュータ1Aのアドレス空間は
図5に示した従来の一例と同様である。命令フェッチ部
10は入出力部9によって内部バス8を介して、内蔵R
OM6に格納されている命令をフェッチする。命令がフ
ェッチされるときは、CPUコア4がメモリに格納され
たデータをオペランドとしてアクセスするためにアドレ
スを出力しているのではないので、制御部12はオペラ
ンドアクセス信号線17に‘0’を出力する。プログラ
ムカウンタ14の値は内蔵ROM6のアドレスなので第
1のアドレス比較器15は論理ゲート18に対して
‘0’を出力する。内部バス8に出力されるアドレスは
内蔵ROM6のアドレスであるので第2のアドレス比較
器16は‘1’を出力する。その結果、論理ゲート18
は‘0’を出力し内蔵ROM読出し禁止部19は内蔵R
OM6の読出しを可能にする。命令デコード部11はフ
ェッチされた命令をデコードしその結果を制御部12に
送る。制御部12はその情報をもとに命令を実行するた
めの制御信号を生成し実行部13に送る。実行部13が
命令を実行するとき、メモリに格納されたデータをオペ
ランドとしてアクセスすることがありオペランドアクセ
ス信号が‘1’になることがあるが、内蔵ROM6に格
納されているプログラムを実行している限り第1のアド
レス比較器は‘0’を出力するので、内蔵ROM読出し
禁止部19は常に内蔵ROM6の読出しを可能にする。
以上の動作を繰り返すことによりプログラムが実行され
ていく。
Next, referring to FIG. 1, the program has a built-in RO.
The operation when stored in M6 will be described. The address space of the microcomputer 1A according to the present invention is the same as that of the conventional example shown in FIG. The instruction fetch unit 10 has a built-in R via the internal bus 8 by the input / output unit 9.
Fetch the instruction stored in OM6. When the instruction is fetched, the CPU core 4 does not output the address in order to access the data stored in the memory as an operand, so the control unit 12 sets "0" to the operand access signal line 17. Output. Since the value of the program counter 14 is the address of the built-in ROM 6, the first address comparator 15 outputs "0" to the logic gate 18. Since the address output to the internal bus 8 is the address of the built-in ROM 6, the second address comparator 16 outputs "1". As a result, the logic gate 18
Outputs "0" and the built-in ROM read prohibition section 19 has built-in R
Enables reading of OM6. The instruction decoding unit 11 decodes the fetched instruction and sends the result to the control unit 12. The control unit 12 generates a control signal for executing the instruction based on the information and sends it to the execution unit 13. When the execution unit 13 executes an instruction, it may access the data stored in the memory as an operand and the operand access signal may become "1". However, when the program stored in the internal ROM 6 is executed, As long as the first address comparator outputs "0", the built-in ROM read prohibition unit 19 always enables the built-in ROM 6 to be read.
The program is executed by repeating the above operation.

【0018】次に図1を用いて、第三者が従来例に示し
たのと同じ方法で内蔵ROM6の内容を外部に取り出そ
うとする動作について説明する。まず内蔵RAM7上に
次のような命令を格納する。 LDA[内蔵ROM6のアドレス] STA[外部メモリ3のアドレス] 命令LDA,STAは従来例の説明に用いたものと同じ
である。命令フェッチ部10は入出力部9によって内部
バス8を介して、内蔵RAM7に格納されている命令L
DA[内蔵ROM6のアドレス]をフェッチする。命令
がフェッチされるときは、CPUコア4がメモリに格納
されたデータをオペランドとしてアクセスするためにア
ドレスを出力しているのではないので、制御部12はオ
ペランドアクセス信号線17に‘0’を出力する。プロ
グラムカウンタ14の値は内蔵ROM6のアドレスでは
ないので、第1のアドレス比較器15は論理ゲート18
に対して‘1’を出力する。内部バス8に出力されるア
ドレスは内蔵ROM6のアドレスであるので第2のアド
レス比較器16は‘1’を出力する。その結果、論理ゲ
ート18は‘0’を出力し内蔵ROM読出し禁止部19
は内蔵ROM6の読出しを可能にする。実行部13はこ
の命令をデコード結果から生成された制御信号によって
実行する。すなわち、オペランドに示される内蔵ROM
6のアドレスに格納されたデータを入出力部9,内部バ
ス8を介して実行部13内の図示しないレジスタに格納
するという動作を行う。このとき、CPUコア4がメモ
リに格納されたデータをオペランドとしてアクセスする
ためにアドレスを出力するので、制御部12はオペラン
ドアクセス信号線17に‘1’を出力する。プログラム
カウンタ14の値は内蔵ROM6のアドレスではないの
で、第1のアドレス比較器15は論理ゲート18に対し
て‘1’を出力する。内部バス8に出力されるアドレス
は内蔵ROM6のアドレスであるので第2のアドレス比
較器16は‘1’を出力する。その結果、論理ゲート1
8は‘1’を出力し内蔵ROM読出し禁止部19は内蔵
ROM6の読出しを禁止する。よって実行部13内のレ
ジスタに格納される値は内蔵ROM6の値ではなく常に
全ビットが‘1’のデータとなる。次に、命令フェッチ
部10は入出力部9によって内部バス8を介して、内蔵
RAM7に格納されている命令STA[外部メモリ3の
アドレス]をフェッチする。実行部13はこの命令をデ
コード結果から生成された制御信号によって実行する。
すなわち、レジスタの値を入出力部9,内部バス8,入
出力部5,外部バス2を介してオペランドに示される外
部メモリ3のアドレスに格納する。以上の動作を命令L
DA,STAのオペランドをインクリメントしながら繰
り返すことによっても内蔵ROM6の内容を外部メモリ
3上に転送することはできず、外部メモリ3に書き込ま
れるデータは全て全ビットが‘1’のデータとなる。
Next, with reference to FIG. 1, an operation in which a third party tries to take out the contents of the built-in ROM 6 to the outside by the same method as shown in the conventional example will be described. First, the following instructions are stored in the built-in RAM 7. LDA [address of built-in ROM 6] STA [address of external memory 3] Instructions LDA and STA are the same as those used in the description of the conventional example. The instruction fetch unit 10 uses the input / output unit 9 via the internal bus 8 to store the instruction L stored in the internal RAM 7.
Fetch DA [address of built-in ROM 6]. When the instruction is fetched, the CPU core 4 does not output the address in order to access the data stored in the memory as an operand, so the control unit 12 sets "0" to the operand access signal line 17. Output. Since the value of the program counter 14 is not the address of the built-in ROM 6, the first address comparator 15 has the logic gate 18
'1' is output for. Since the address output to the internal bus 8 is the address of the built-in ROM 6, the second address comparator 16 outputs "1". As a result, the logic gate 18 outputs "0" and the built-in ROM read prohibition unit 19
Makes it possible to read the internal ROM 6. The execution unit 13 executes this instruction by the control signal generated from the decoding result. That is, the internal ROM indicated by the operand
The data stored at the address 6 is stored in a register (not shown) in the execution unit 13 via the input / output unit 9 and the internal bus 8. At this time, since the CPU core 4 outputs an address for accessing the data stored in the memory as an operand, the control unit 12 outputs "1" to the operand access signal line 17. Since the value of the program counter 14 is not the address of the built-in ROM 6, the first address comparator 15 outputs "1" to the logic gate 18. Since the address output to the internal bus 8 is the address of the built-in ROM 6, the second address comparator 16 outputs "1". As a result, logic gate 1
8 outputs "1" and the built-in ROM read prohibiting section 19 prohibits reading of the built-in ROM 6. Therefore, the value stored in the register in the execution unit 13 is not the value in the built-in ROM 6 but is always data in which all bits are "1". Next, the instruction fetch unit 10 fetches the instruction STA [address of the external memory 3] stored in the internal RAM 7 via the internal bus 8 by the input / output unit 9. The execution unit 13 executes this instruction by the control signal generated from the decoding result.
That is, the value of the register is stored in the address of the external memory 3 indicated by the operand via the input / output unit 9, the internal bus 8, the input / output unit 5, and the external bus 2. The above operation is command L
The contents of the built-in ROM 6 cannot be transferred to the external memory 3 even by repeating the DA and STA operands while incrementing, and all the data written in the external memory 3 is data with all bits being "1".

【0019】メモリの読出しの可否をプログラムカウン
タ14の値、参照されるアドレスについて表にまとめた
ものを図3に示す。内蔵ROM6以外のメモリとしての
内蔵RAM7及び外部メモリ3に格納されたプログラム
による内蔵ROM6の読出しは禁止される。また、それ
以外の組合せの場合は内蔵ROM6の読出しは可能であ
り、通常のプログラムは支障なく実行される。
FIG. 3 shows a table in which the values of the program counter 14 and the addresses to be read are summarized as to whether or not the memory can be read. Reading of the built-in ROM 6 by a program stored in the built-in RAM 7 as a memory other than the built-in ROM 6 and the external memory 3 is prohibited. In the case of other combinations, the built-in ROM 6 can be read out, and the normal program can be executed without any trouble.

【0020】尚、本実施例においては、内蔵ROM6の
出力値ではなく常に全ビットが‘1’のデータを出力し
てデータを無効化するが、上記読出し禁止用論理ゲート
21をNORゲートで構成する等して、常に全ビットが
‘0’のデータを出力するようにしてもよい。
In the present embodiment, data having all bits of "1" is always output instead of the output value of the built-in ROM 6 to invalidate the data, but the read-inhibit logic gate 21 is constituted by a NOR gate. By doing so, the data in which all the bits are “0” may be always output.

【0021】[0021]

【発明の効果】第1の発明によれば、上記プログラムカ
ウンタの値が上記内蔵ROMのアドレスでないことを検
出する第1のアドレス比較器と、アドレスバスに出力さ
れている値が上記内蔵ROMのアドレスであることを検
出する第2のアドレス比較器と、上記メモリに格納され
たデータをオペランドとしてアクセスするためにアドレ
スを出力していることを示すオペランドアクセス信号線
と、上記第1,第2のアドレス比較器の出力信号と上記
オペランドアクセス信号とを入力する論理ゲートと、こ
の論理ゲートの出力に応じて上記内蔵ROMから出力さ
れるデータを無効化する内蔵ROM読出し禁止部とを設
け、上記内蔵ROM以外のメモリに格納されたプログラ
ムによって上記内蔵ROMにアクセスしようとした場
合、上記内蔵ROMから出力されるデータを無効化する
ので、第三者が内蔵ROMの内容を容易に外部に取り出
すことができず、マイクロコンピュータの守秘性が向上
する。
According to the first invention, the first address comparator detects that the value of the program counter is not the address of the built-in ROM, and the value output to the address bus is stored in the built-in ROM. A second address comparator for detecting an address, an operand access signal line indicating that an address is output to access the data stored in the memory as an operand, and the first and second A logic gate for inputting the output signal of the address comparator and the operand access signal, and a built-in ROM read prohibition unit for invalidating the data output from the built-in ROM according to the output of the logic gate. If you try to access the built-in ROM by a program stored in a memory other than the built-in ROM, Because invalidating the data et output can not third parties taken easily outside the contents of the chip ROM, on confidentiality of the microcomputer is improved.

【0022】第2の発明によれば、上記内蔵ROM読出
し禁止部を、上記論理ゲートの出力にもとづき開閉され
る読出し禁止用論理ゲートを上記内蔵ROMの各データ
出力線に介挿して構成したので、内蔵ROM以外のメモ
リに格納されたプログラムによって内蔵ROMにアクセ
スしようとした場合、内蔵ROMから出力されるデータ
を無効化し、内容の読出しを禁止することが可能とな
り、簡単な回路追加でマイクロコンピュータの守秘性の
向上が図れる。
According to the second aspect of the invention, the built-in ROM read prohibition section is constituted by inserting a read-inhibit logic gate which is opened / closed based on the output of the logic gate, into each data output line of the built-in ROM. When a program stored in a memory other than the built-in ROM tries to access the built-in ROM, the data output from the built-in ROM can be invalidated and the reading of the contents can be prohibited. The confidentiality of can be improved.

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

【図1】本発明に係るマイクロコンピュータ1Aの一実
施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a microcomputer 1A according to the present invention.

【図2】本発明に係る内蔵ROM読出し禁止部の一例を
示す回路図である。
FIG. 2 is a circuit diagram showing an example of a built-in ROM read inhibit unit according to the present invention.

【図3】本発明に係るマイクロコンピュータ1Aのメモ
リの読出しの可否を示す図である。
FIG. 3 is a diagram showing whether or not the memory of the microcomputer 1A according to the present invention can be read.

【図4】従来のマイクロコンピュータ1の一例を示すブ
ロック図である。
FIG. 4 is a block diagram showing an example of a conventional microcomputer 1.

【図5】従来の制御部の一例を示すブロック図である。FIG. 5 is a block diagram showing an example of a conventional control unit.

【図6】従来のマイクロコンピュータ1のアドレス空間
の一例を示す概念図である。
FIG. 6 is a conceptual diagram showing an example of an address space of a conventional microcomputer 1.

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

1,1A マイクロコンピュータ 3 外部メモリ(内蔵ROM以外のメモリ) 6 内蔵ROM 7 内蔵RAM(内蔵ROM以外のメモリ) 8 内部バス 10 命令フェッチ部 11 命令デコード部 12 制御部 13 実行部 14 プログラムカウンタ 15 第1のアドレス比較器 16 第2のアドレス比較器 17 オペランドアクセス信号線 18 論理ゲート 19 内蔵ROM読出し禁止部 20 データ出力線 21 内蔵ROM読出し禁止用論理ゲート 1, 1A Microcomputer 3 External memory (memory other than built-in ROM) 6 Built-in ROM 7 Built-in RAM (memory other than built-in ROM) 8 Internal bus 10 Instruction fetch section 11 Instruction decode section 12 Control section 13 Execution section 14 Program counter 15th 1 address comparator 16 second address comparator 17 operand access signal line 18 logic gate 19 built-in ROM read prohibition unit 20 data output line 21 built-in ROM read prohibition logic gate

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

【手続補正書】[Procedure amendment]

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

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

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

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

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

【補正内容】[Correction content]

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

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

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

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

【補正内容】[Correction content]

【0002】[0002]

【従来の技術】図4は従来の内蔵ROMと、それ以外の
メモリとを備えたマイクロコンピュータの一例を示すブ
ロック図である。図において、1はマイクロコンピュー
タ、2はマイクロコンピュータ1と外部のデバイス間で
のデータ,アドレス,各種の制御信号の通路となる外部
バス、3は外部バス2を介してアクセス可能な内蔵RO
M以外のメモリとしての外部メモリ、4はCPUコア、
5は外部バス2とデータ,アドレス,各種の制御信号の
やり取りをする入出力部、6はプログラム,データを格
納する内蔵ROM、7は上記内蔵ROM6以外のメモリ
としての内蔵RAM、8はマイクロコンピュータ1内の
各ブロック間のデータ,アドレス,各種の制御信号の通
路となる内部バスである。上記CPUコア4は内部バス
8とデータ、アドレス、各種の制御信号のやり取りをす
る入出力部9と、上記内部バス8を介して上記各メモリ
からの命令を読込む命令フェッチ部10と、この命令フ
ェッチ部10で読込まれた命令をデコードする命令デコ
ード部11と、この命令デコード部11で得られた命令
の情報によって命令を実行するための制御信号を生成す
る制御部12と、この制御部12の制御信号によって演
算等を行い命令を実行する実行部13と、上記命令フェ
ッチ部10でフェッチする命令のアドレスを示すプログ
ラムカウンタ14とから成る。
2. Description of the Related Art FIG. 4 is a block diagram showing an example of a conventional microcomputer having a built-in ROM and a memory other than the above. In the figure, 1 is a microcomputer, 2 is an external bus that serves as a path for data, addresses, and various control signals between the microcomputer 1 and external devices, and 3 is a built-in RO accessible via the external bus 2.
External memory as a memory other than M, 4 is a CPU core,
Reference numeral 5 is an input / output unit for exchanging data, addresses and various control signals with the external bus 2, 6 is a built-in ROM for storing programs and data, 7 is a built-in RAM as a memory other than the built-in ROM 6, and 8 is a microcomputer. It is an internal bus that serves as a path for data, addresses, and various control signals between blocks in one. The CPU core 4 is an internal bus
8 to exchange data, address and various control signals
An input / output unit 9, an instruction fetch unit 10 for reading an instruction from each of the memories via the internal bus 8, an instruction decoding unit 11 for decoding the instruction read by the instruction fetch unit 10, and an instruction for this instruction. A control unit 12 that generates a control signal for executing an instruction based on the information of the instruction obtained by the decoding unit 11, an execution unit 13 that executes an operation and the like by the control signal of the control unit 12, and the instruction described above. The program counter 14 indicates the address of the instruction fetched by the fetch unit 10.

【手続補正3】[Procedure 3]

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

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

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

【補正内容】[Correction content]

【0009】[0009]

【課題を解決するための手段】第1の発明に係るマイク
ロコンピュータ1Aは、上記プログラムカウンタ14の
値が上記内蔵ROM6のアドレスでないことを検出する
第1のアドレス比較器15と、アドレスバスに出力され
ている値が上記内蔵ROM6のアドレスであることを検
出する第2のアドレス比較器16と、上記内蔵ROM
と、それ以外の上記メモリに格納されたデータをオペラ
ンドとしてアクセスするためにアドレスを出力している
ことを示すオペランドアクセス信号線17と、上記第
1,第2のアドレス比較器15,16の出力信号と上記
オペランドアクセス信号とを入力する論理ゲート18
と、この論理ゲート18の出力に応じて上記内蔵ROM
6から出力されるデータを無効化する内蔵ROM読出し
禁止部19とを設け、上記内蔵ROM以外のメモリに格
納されたプログラムによって上記内蔵ROM6にアクセ
スしようとした場合、上記内蔵ROM6から出力される
データを無効化する。
A microcomputer 1A according to a first invention outputs to a first address comparator 15 for detecting that the value of the program counter 14 is not an address of the internal ROM 6 and an address bus. A second address comparator 16 for detecting that the stored value is the address of the built-in ROM 6, and the built-in ROM
And an operand access signal line 17 indicating that an address is output to access the other data stored in the memory as an operand, and outputs of the first and second address comparators 15 and 16. Logic gate 18 for inputting a signal and the operand access signal
And the built-in ROM according to the output of the logic gate 18.
When a program stored in a memory other than the built-in ROM is used to access the built-in ROM 6, a data output from the built-in ROM 6 is provided. Invalidate.

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

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

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

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

【補正内容】[Correction content]

【0021】[0021]

【発明の効果】第1の発明によれば、上記プログラムカ
ウンタの値が上記内蔵ROMのアドレスでないことを検
出する第1のアドレス比較器と、アドレスバスに出力さ
れている値が上記内蔵ROMのアドレスであることを検
出する第2のアドレス比較器と、上記内蔵ROMと、そ
れ以外の上記メモリに格納されたデータをオペランドと
してアクセスするためにアドレスを出力していることを
示すオペランドアクセス信号線と、上記第1,第2のア
ドレス比較器の出力信号と上記オペランドアクセス信号
とを入力する論理ゲートと、この論理ゲートの出力に応
じて上記内蔵ROMから出力されるデータを無効化する
内蔵ROM読出し禁止部とを設け、上記内蔵ROM以外
のメモリに格納されたプログラムによって上記内蔵RO
Mにアクセスしようとした場合、上記内蔵ROMから出
力されるデータを無効化するので、第三者が内蔵ROM
の内容を容易に外部に取り出すことができず、マイクロ
コンピュータの守秘性が向上する。
According to the first invention, the first address comparator detects that the value of the program counter is not the address of the built-in ROM, and the value output to the address bus is stored in the built-in ROM. A second address comparator for detecting an address, the built-in ROM, and
An operand access signal line indicating that an address is output to access data other than the above stored in the memory as an operand, output signals of the first and second address comparators, and the operand access signal And a built-in ROM read-out prohibiting unit that invalidates the data output from the built-in ROM according to the output of the logic gate. The program is stored in a memory other than the built-in ROM. Built-in RO
If you try to access M, the data output from the built-in ROM will be invalidated.
The contents of can not be taken out easily, and the confidentiality of the microcomputer is improved.

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

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

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

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

【補正内容】[Correction content]

【図1】 [Figure 1]

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 内蔵ROMと、それ以外のメモリと、内
部バスを介して上記各メモリからの命令を読込む命令フ
ェッチ部と、この命令フェッチ部で読込まれた命令をデ
コードする命令デコード部と、この命令デコード部で得
られた命令の情報によって命令を実行するための制御信
号を生成する制御部と、この制御部の制御信号によって
演算等を行い命令を実行する実行部と、上記命令フェッ
チ部でフェッチする命令のアドレスを示すプログラムカ
ウンタとを備えたマイクロコンピュータにおいて、上記
プログラムカウンタの値が上記内蔵ROMのアドレスで
ないことを検出する第1のアドレス比較器と、アドレス
バスに出力されている値が上記内蔵ROMのアドレスで
あることを検出する第2のアドレス比較器と、上記メモ
リに格納されたデータをオペランドとしてアクセスする
ためにアドレスを出力していることを示すオペランドア
クセス信号線と、上記第1,第2のアドレス比較器の出
力信号と上記オペランドアクセス信号とを入力する論理
ゲートと、この論理ゲートの出力に応じて上記内蔵RO
Mから出力されるデータを無効化する内蔵ROM読出し
禁止部とを設け、上記内蔵ROM以外のメモリに格納さ
れたプログラムによって上記内蔵ROMにアクセスしよ
うとした場合、上記内蔵ROMから出力されるデータを
無効化することを特徴とするマイクロコンピュータ。
1. An internal ROM, a memory other than that, an instruction fetch unit for reading an instruction from each of the memories via an internal bus, and an instruction decoding unit for decoding the instruction read by the instruction fetch unit. , A control unit for generating a control signal for executing an instruction according to the information of the instruction obtained by the instruction decoding unit, an execution unit for executing an instruction by performing an operation or the like by the control signal of the control unit, and the instruction fetch In a microcomputer provided with a program counter indicating an address of an instruction to be fetched by the unit, a first address comparator for detecting that the value of the program counter is not the address of the built-in ROM, and output to the address bus. A second address comparator that detects that the value is the address of the built-in ROM, and the data stored in the memory. An operand access signal line indicating that an address is output to access the data as an operand, a logic gate for inputting the output signals of the first and second address comparators and the operand access signal, and The built-in RO according to the output of the logic gate
A built-in ROM read prohibition unit that invalidates the data output from M is provided, and when the built-in ROM is accessed by a program stored in a memory other than the built-in ROM, the data output from the built-in ROM is A microcomputer characterized by being disabled.
【請求項2】 上記内蔵ROM読出し禁止部は、上記論
理ゲートの出力にもとづき開閉される読出し禁止用論理
ゲートを、上記内蔵ROMの各データ出力線に介挿して
構成されたことを特徴とする請求項第1項記載のマイク
ロコンピュータ。
2. The built-in ROM read prohibition section is configured by inserting a read prohibition logic gate opened and closed based on the output of the logic gate into each data output line of the built-in ROM. The microcomputer according to claim 1.
JP4090193A 1992-03-16 1992-03-16 Microcomputer Pending JPH05266225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4090193A JPH05266225A (en) 1992-03-16 1992-03-16 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4090193A JPH05266225A (en) 1992-03-16 1992-03-16 Microcomputer

Publications (1)

Publication Number Publication Date
JPH05266225A true JPH05266225A (en) 1993-10-15

Family

ID=13991650

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4090193A Pending JPH05266225A (en) 1992-03-16 1992-03-16 Microcomputer

Country Status (1)

Country Link
JP (1) JPH05266225A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08305635A (en) * 1995-05-01 1996-11-22 Nec Corp One-chip cpu
JPH09114743A (en) * 1995-10-16 1997-05-02 Nec Corp Single chip microcomputer
JP2007242029A (en) * 2007-03-26 2007-09-20 Le Tekku:Kk Circuit for preventing program from being decoded in micro-computer chip to control game machine

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08305635A (en) * 1995-05-01 1996-11-22 Nec Corp One-chip cpu
JPH09114743A (en) * 1995-10-16 1997-05-02 Nec Corp Single chip microcomputer
JP2007242029A (en) * 2007-03-26 2007-09-20 Le Tekku:Kk Circuit for preventing program from being decoded in micro-computer chip to control game machine
JP4523613B2 (en) * 2007-03-26 2010-08-11 株式会社エルイーテック Program decoding prevention circuit in microcomputer chip for game machine control

Similar Documents

Publication Publication Date Title
JP2507756B2 (en) Information processing device
US4816991A (en) Virtual machine system with address translation buffer for holding host and plural guest entries
JP3520102B2 (en) Microcomputer
KR940009094B1 (en) Data processing system
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
JPH10228421A (en) Memory access control circuit
JPH07105093A (en) Data processor
US6810471B2 (en) Memory protection method and circuit specifying attributes on access
US5564030A (en) Circuit and method for detecting segment limit errors for code fetches
US5301285A (en) Data processor having two instruction registers connected in cascade and two instruction decoders
JPH05266225A (en) Microcomputer
WO1999024906A1 (en) Data processor and data processing system
EP0144268A2 (en) Method for controlling buffer memory in data processing apparatus
JPH0447349A (en) Data storage device
EP0218335A2 (en) Control store for electronic processor
JPH046025B2 (en)
JPH08305634A (en) Information processing method and device therefor
US5621911A (en) Cache memory with an updatable address storing unit
JP2924575B2 (en) Microprocessor
JPH02148152A (en) Microcomputer
US7606997B1 (en) Method and system for using one or more address bits and an instruction to increase an instruction set
CA1233273A (en) Method for controlling buffer memory in data processing apparatus
EP0423735B1 (en) Microprocessor having parity check function
JPH07271673A (en) Cache memory
JPH08263367A (en) Integrated circuit