JPH06103478B2 - Micro computer - Google Patents
Micro computerInfo
- Publication number
- JPH06103478B2 JPH06103478B2 JP61079731A JP7973186A JPH06103478B2 JP H06103478 B2 JPH06103478 B2 JP H06103478B2 JP 61079731 A JP61079731 A JP 61079731A JP 7973186 A JP7973186 A JP 7973186A JP H06103478 B2 JPH06103478 B2 JP H06103478B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- mode
- external memory
- memory
- internal rom
- 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
Links
Landscapes
- Executing Machine-Instructions (AREA)
- Microcomputers (AREA)
- Advance Control (AREA)
- Storage Device Security (AREA)
Description
【発明の詳細な説明】 産業上の利用分野 本発明は、マイクロコンピュータ、詳しくは、内部メモ
リの読み出しを禁止する回路に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer, and more particularly to a circuit that prohibits reading of internal memory.
従来の技術 シングルチップ・マイクロコンピュータの応用分野の拡
大に伴ない、命令プログラムのステップ数が増大する傾
向がある。そのため、同一チップに集積する命令等を格
納するための読出し専用メモリ(ROM)の容量が増大し
てきた。しかしながら同一チップに集積できるROMの容
量には限度がある。従来より、チップ内部のROM容量で
は不足する場合に備えて、チップ外部にメモリを拡張で
きるようにしたシングルチップ・マイクロコンピュータ
がある。チップ外部にメモリを拡張する方策としては、
概念的に大きく分けて2種類ある。第2図および第3図
は、各拡張メモリの配設に関する二つの概念を対比して
示す概略図である。それぞれの図は、全アドレス空間が
64Kバイトで、内部ROMの容量が8Kバイトの場合を示し、
図中1は内部ROM領域であり、2,3は外部メモリの領域で
ある。第2図のものでは、内部ROM1に割り当てられたア
ドレス領域[4]も外部メモリ3に拡張し、内部ROMは
使用しないで、全て外部メモリで動作可能なものであ
る。第3図のものは、内部ROM1に割り当てられたアドレ
ス領域[4]は外部に拡張せずに、内部ROM1、外部メモ
リ2をともに使用して動作するものである。2. Description of the Related Art With the expansion of application fields of single-chip microcomputers, the number of steps of instruction programs tends to increase. Therefore, the capacity of a read-only memory (ROM) for storing instructions and the like to be integrated on the same chip has increased. However, the capacity of ROM that can be integrated on the same chip is limited. 2. Description of the Related Art Conventionally, there is a single-chip microcomputer capable of expanding a memory outside the chip in case the ROM capacity inside the chip is insufficient. As a way to expand the memory outside the chip,
Conceptually, there are two types. FIG. 2 and FIG. 3 are schematic diagrams showing two concepts related to the arrangement of each expansion memory in comparison. Each figure shows the total address space
64K bytes, the capacity of the internal ROM is 8K bytes,
In the figure, 1 is an internal ROM area, and 2 and 3 are external memory areas. In FIG. 2, the address area [4] assigned to the internal ROM 1 is also expanded to the external memory 3, and the internal ROM is not used, and all can be operated by the external memory. In FIG. 3, the address area [4] assigned to the internal ROM 1 is operated by using both the internal ROM 1 and the external memory 2 without expanding it to the outside.
近年、プログラムの無断複製が問題になり、プログラム
開発者は複製されないように対策する必要にせまられて
いる。しかし、前述第2図のように、命令等を格納する
メモリが全て外部に拡張されている場合は、簡単にプロ
グラムの内容を知ることができるため、要となるプログ
ラムは内部ROMに格納し、外部メモリに格納されたプロ
グラムだけでは、全体を知ることができないようにされ
ることがある。しかし、前述第3図では、内部ROM1と外
部メモリ2とが連続した領域にあり、その使用上の区別
がないため、テーブル・ルックアップ機能等の命令を用
いて容易に内部ROMの内容を知ることができる。そこ
で、動作にあたっては、シングルチップ・マイクロコン
ピュータ本来の内部ROMのみを使用して動作する第1の
モードと、前記第2図のように、拡張した外部メモリの
みを使用して動作する第2のモードとを切り換えなが
ら、内部ROMに格納されたプログラムと、外部メモリに
格納されたプログラムとをともに使用する手法がとられ
ることがある。この手法では、拡張した外部メモリを使
用して動作している時は、内部ROMのアクセスができな
いため、内部ROMの内容を外部から与えた命令で知るこ
とは困難である。In recent years, unauthorized duplication of programs has become a problem, and program developers are required to take measures to prevent duplication. However, as shown in FIG. 2 above, when all the memory for storing instructions and the like is expanded to the outside, the contents of the program can be easily known, so the necessary programs are stored in the internal ROM, Sometimes the entire program cannot be known only by the program stored in the external memory. However, in FIG. 3 described above, the internal ROM 1 and the external memory 2 are in a continuous area, and there is no distinction in their use. be able to. Therefore, in the operation, the first mode in which the single-chip microcomputer originally operates using only the internal ROM, and the second mode in which only the extended external memory operates as shown in FIG. A method of using both the program stored in the internal ROM and the program stored in the external memory while switching between modes may be used. With this method, it is difficult to know the contents of the internal ROM by an externally given instruction because the internal ROM cannot be accessed when operating using the extended external memory.
マイクロコンピュータの動作速度を向上させるために、
一般に命令の先読みが行なわれ、専用のバッファにたく
わえる手法がとられることがある。In order to improve the operating speed of the microcomputer,
In general, instructions are prefetched, and a method of storing them in a dedicated buffer may be used.
第4図に前記手法を用いたマイクロコンピュータのブロ
ック図を示す。1は内部ROM、2は外部メモリ、4はマ
ルチプレクサ、5は命令先読みバッファ、6は命令デコ
ーダ、7はモード切換え制御回路である。FIG. 4 shows a block diagram of a microcomputer using the above method. Reference numeral 1 is an internal ROM, 2 is an external memory, 4 is a multiplexer, 5 is an instruction prefetch buffer, 6 is an instruction decoder, and 7 is a mode switching control circuit.
発明が解決しようとする問題点 このような手法を用いたマイクロコンピュータでは、前
述の内部ROMのみを使用して動作する第1のモードと、
外部メモリのみを使用して動作する第2のモードを切り
換えて動作させる手法を用いても、第2のモードから第
1のモードに切り換えた時点ですでに、外部メモリ2か
ら先読みされた命令が、命令先読みバッファ5にたくわ
えられ、内部ROM1のみを使用して動作する第1のモード
に変化した後でも先読みバッファ内の命令が有効になっ
ている。そのためテーブル・ルックアップ機能等の命令
を利用すれば、内部ROMの内容を読み出すことが可能に
なる。Problems to be Solved by the Invention In a microcomputer using such a method, a first mode in which only the internal ROM described above is used for operation, and
Even if the method of switching and operating the second mode using only the external memory is used, at the time of switching from the second mode to the first mode, the instruction prefetched from the external memory 2 has already been read. The instruction in the prefetch buffer is valid even after it is stored in the instruction prefetch buffer 5 and changed to the first mode in which only the internal ROM 1 is used for operation. Therefore, it is possible to read the contents of the internal ROM by using an instruction such as a table lookup function.
本発明では前述の問題点を解決し、内部ROMの内容を外
部からの命令で読み出すことができないマイクロコンピ
ュータを提供することを目的としている。An object of the present invention is to solve the above-mentioned problems and to provide a microcomputer in which the contents of the internal ROM cannot be read by an external command.
問題点を解決するための手段 本発明は、前述の問題点を解決するために、内部メモリ
を使用して動作する第1のモードと、外部メモリを使用
して動作する第2のモードを切換え可能とする手段およ
び前記内部メモリまたは前記外部メモリに格納された命
令を先読みするためのバッファをそなえるとともに、前
記外部メモリを使用する第2のモードから、前記内部メ
モリを使用する第1のモードに切り換えた場合に、前記
バッファに特定の命令コードを設定する機能をそなえた
マイクロコンピュータである。Means for Solving the Problems In order to solve the above-mentioned problems, the present invention switches between a first mode operating using an internal memory and a second mode operating using an external memory. A second mode in which the external memory is used, and a first mode in which the internal memory is used are provided with a enabling unit and a buffer for prefetching instructions stored in the internal memory or the external memory. It is a microcomputer having a function of setting a specific instruction code in the buffer when switched.
作用 本発明によると、外部からの命令で内部メモリをアクセ
スすることが不可能になるため、内部メモリの命令内容
を知ることのできないマイクロコンピュータを実現する
ことができる。Effect According to the present invention, it becomes impossible to access the internal memory by an external instruction, so that it is possible to realize a microcomputer in which the instruction content of the internal memory cannot be known.
実施例 第1図に本発明の一実施例のブロック図を示す。Embodiment FIG. 1 shows a block diagram of an embodiment of the present invention.
第1図において、モード切換え制御回路7には、たとえ
ば入力端子の状態や制御フラグの状態等によって、内部
ROM1のみを使用して動作するモードと、外部に拡張した
外部メモリ2のみを使用して動作するモードとを切り換
える機能を有する。外部に拡張したメモリのみを使用し
て動作するモードの場合は、第2図に示すように、内部
ROM1のアドレス領域も外部に拡張され、内部ROM1はアク
セスされない。In FIG. 1, the mode switching control circuit 7 has an internal function depending on, for example, the state of the input terminal and the state of the control flag.
It has a function of switching between a mode operating using only the ROM 1 and a mode operating using only the external memory 2 extended to the outside. In the case of a mode in which only externally expanded memory is used for operation, as shown in FIG.
The address area of ROM1 is also expanded to the outside, and internal ROM1 is not accessed.
まず、内部ROM1のみを使用して動作するモードについて
説明する。First, the mode that operates using only the internal ROM 1 will be described.
この場合、マルチプレクサ4は内部ROM1を選択してい
る。命令の実行に先立って内部ROM1から命令コードが読
み出され、命令先読みバッファ5にたくわえられる。命
令実行時には、あらかじめ先読みされた命令コードが、
順次命令先読みバッファ5から読み出され、命令デコー
ダ6で命令コードの解読が行なわれ、マイクロコンピュ
ータ各部に制御信号が送られる。In this case, the multiplexer 4 selects the internal ROM 1. Prior to the execution of the instruction, the instruction code is read from the internal ROM 1 and stored in the instruction prefetch buffer 5. When the instruction is executed, the pre-read instruction code is
The instructions are sequentially read from the instruction prefetch buffer 5, the instruction decoder 6 decodes the instruction code, and a control signal is sent to each part of the microcomputer.
外部メモリ2のみを使用して動作するモードの時は、マ
ルチプレクサ4は外部メモリ2を選択している。この場
合も、前述の場合と同様に、命令実行に先立って命令先
読みバッファ5に、外部メモリ2から読み出された命令
コードがたくわえられている。In the mode in which only the external memory 2 is used for operation, the multiplexer 4 selects the external memory 2. Also in this case, as in the case described above, the instruction code read from the external memory 2 is stored in the instruction prefetch buffer 5 prior to the execution of the instruction.
ここで、外部メモリ2のみを使用して動作するモードか
ら、内部ROM1のみを使用して動作するモードに変化した
ことをモード切換え制御回路7が検出すると、切換え制
御信号線8にマルチプレクサ4の切換え制御信号を出
し、マルチプレクサ4を外部メモリ2側から、内部ROM1
側へ切り換える。また、命令先読みバッファ5に対し
て、命令設定制御信号線9を通じて、たとえば、NOP命
令等の特定の命令を設定する制御信号を出す。命令設定
制御信号線9の信号により、全ての命令先読みバッファ
5の内容がNOP命令等の特定の命令コードに設定され、
命令に先立って外部メモリ2から先読みされ、命令先読
みバッファ5にたくわえられていた命令コードが無効と
なる。Here, when the mode switching control circuit 7 detects that the mode in which only the external memory 2 is used is changed to the mode in which only the internal ROM 1 is used, the multiplexer 4 is switched to the switching control signal line 8. Sends a control signal to drive the multiplexer 4 from the external memory 2 side to the internal ROM 1
Switch to the side. Further, a control signal for setting a specific instruction such as NOP instruction is output to the instruction prefetch buffer 5 through the instruction setting control signal line 9. By the signal of the instruction setting control signal line 9, the contents of all the instruction prefetch buffers 5 are set to a specific instruction code such as NOP instruction,
The instruction code that has been prefetched from the external memory 2 prior to the instruction and stored in the instruction prefetch buffer 5 becomes invalid.
発明の効果 以上のように本発明によれば、内部ROMをアクセスでき
る時には、外部から入力された命令コードが無効となる
ため、外部から命令を入力して内部ROMの内容を読み出
すことができず、内部ROMに格納されたプログラムの保
護ができる。As described above, according to the present invention, when the internal ROM can be accessed, the instruction code input from the outside becomes invalid, so that the instruction cannot be input from the outside to read the contents of the internal ROM. , The program stored in the internal ROM can be protected.
第1図は本発明の一実施例を示すブロック図、第2図,
第3図はチップ外部にメモリを拡張する場合の概念図、
第4図は従来例のブロック図である。 1……内部ROM、2……外部メモリ、3……内部ROMと同
じアドレス空間の外部メモリ、4……マルチプレクサ、
5……命令先読みバッファ、6……命令デコーダ、7…
…モード切換え制御回路、8……切換制御信号線、9…
…命令設定制御信号線。FIG. 1 is a block diagram showing an embodiment of the present invention, FIG.
FIG. 3 is a conceptual diagram when the memory is expanded outside the chip,
FIG. 4 is a block diagram of a conventional example. 1 ... internal ROM, 2 ... external memory, 3 ... external memory having the same address space as internal ROM, 4 ... multiplexer,
5 ... Instruction prefetch buffer, 6 ... Instruction decoder, 7 ...
... Mode switching control circuit, 8 ... Switching control signal line, 9 ...
... Command setting control signal line.
Claims (1)
ドと、外部メモリを使用して動作する第2のモードとを
切換え可能とする手段および前記内部メモリまたは前記
外部メモリに格納された命令を先読みするためのバッフ
ァをそなえるとともに、外部メモリを使用する第2のモ
ードから、内部メモリを使用する第1のモードに切り換
えた場合に、前記バッファに特定の命令コードを設定す
る機能を備えたマイクロコンピュータ。1. Means for switching between a first mode operating using an internal memory and a second mode operating using an external memory, and the means stored in the internal memory or the external memory. It has a buffer for prefetching instructions, and has a function of setting a specific instruction code in the buffer when switching from the second mode using the external memory to the first mode using the internal memory. Microcomputer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61079731A JPH06103478B2 (en) | 1986-04-07 | 1986-04-07 | Micro computer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61079731A JPH06103478B2 (en) | 1986-04-07 | 1986-04-07 | Micro computer |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS62236034A JPS62236034A (en) | 1987-10-16 |
JPH06103478B2 true JPH06103478B2 (en) | 1994-12-14 |
Family
ID=13698351
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61079731A Expired - Lifetime JPH06103478B2 (en) | 1986-04-07 | 1986-04-07 | Micro computer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH06103478B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002244757A (en) * | 2001-02-19 | 2002-08-30 | Sony Corp | Semiconductor circuit |
SG143064A1 (en) | 2001-02-16 | 2008-06-27 | Sony Corp | Data processing method and its apparatus |
JP5637968B2 (en) * | 2011-10-31 | 2014-12-10 | 京セラドキュメントソリューションズ株式会社 | Arithmetic processing device and arithmetic processing system |
-
1986
- 1986-04-07 JP JP61079731A patent/JPH06103478B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPS62236034A (en) | 1987-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5247639A (en) | Microprocessor having cache bypass signal terminal | |
US4937738A (en) | Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction | |
JP3226055B2 (en) | Information processing device | |
US6851036B1 (en) | Method and apparatus for controlling external devices through address translation buffer | |
JPH06103478B2 (en) | Micro computer | |
JPH0695875A (en) | Memory access method for microcomputer | |
EP0864983A2 (en) | Computer system including memory adress management circuit for protecting memory from illegal writing | |
JP3462245B2 (en) | Central processing unit | |
US6425047B1 (en) | Process containing address decoders suited to improvements in clock speed | |
JPH06103479B2 (en) | Micro computer | |
JP2597409B2 (en) | Microcomputer | |
JPH05257815A (en) | Central processing unit | |
JP3104621B2 (en) | Semiconductor integrated circuit device | |
JP2731618B2 (en) | emulator | |
JP3190945B2 (en) | Micro program control circuit | |
KR100488536B1 (en) | Microprocessor control circuit | |
JPH05298086A (en) | Information processor | |
JPH06139084A (en) | Information processor | |
JPS60105048A (en) | Microprogram control method | |
JPH036758A (en) | Microprocessor | |
JPH05334189A (en) | Data storage device | |
JPH04369723A (en) | Micro program controller | |
JPH08161222A (en) | Processor and method for creating program thereof | |
JPH05334074A (en) | Microprocessor | |
JPH0333931A (en) | data processor |