JPH04215152A - Memory write protect controller - Google Patents

Memory write protect controller

Info

Publication number
JPH04215152A
JPH04215152A JP2409892A JP40989290A JPH04215152A JP H04215152 A JPH04215152 A JP H04215152A JP 2409892 A JP2409892 A JP 2409892A JP 40989290 A JP40989290 A JP 40989290A JP H04215152 A JPH04215152 A JP H04215152A
Authority
JP
Japan
Prior art keywords
signal
write
memory
counter
circuit
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
JP2409892A
Other languages
Japanese (ja)
Inventor
Akihiro Wakamatsu
若  松  明  博
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2409892A priority Critical patent/JPH04215152A/en
Publication of JPH04215152A publication Critical patent/JPH04215152A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PURPOSE:To simplify the memory write protect set/release processing for the occurrence of multiple interrupts. CONSTITUTION:An up/down counter 4 which counts up/down synchronously with an input clock signal and a counter control circuit 7 which controls this counter 4 are provided. The counter control circuit 7 controls the counter 4 so that the counter 4 is counted up by a memory write protect set signal and is counted down by a write protect release signal and outputs a write protect signal to set the write protect state at the time of arrival of the counted value at a prescribed value.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、メモリライトプロテク
ト制御装置に係り、詳細にはメモリライトプロテクト機
能付のメモリ制御回路を有する電子機器全般に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory write protection control device, and more particularly to electronic equipment in general having a memory control circuit with a memory write protection function.

【0002】0002

【従来の技術】ライトプロテクト付メモリ制御回路は、
RAMの周辺回路を構成する読出し/書込み制御回路に
メモリチップセレクト信号CS、ライトイネーブル信号
WE、メモリアウトプット信号OEを供給してRAMの
読出し/書込み動作を制御する回路である。
[Prior art] A memory control circuit with write protection is
This circuit supplies a memory chip select signal CS, a write enable signal WE, and a memory output signal OE to a read/write control circuit forming a peripheral circuit of the RAM to control read/write operations of the RAM.

【0003】従来のこの種のメモリライトプロテクト設
定・解除方法を行なうメモリライトプロテクト制御回路
としては、例えば図6に示すようなものがある。図6に
おいて、フリップフロップ回路11はメモリライトプロ
テクト状態を設定・解除するためのもので、フリップフ
ロップ回路11にメモリライトプロテクト設定信号WP
SETが入力されるとライトプロテクト状態になり、メ
モリライトプロテクト解除信号WPRESが入力される
とライトプロテクト解除状態になる。このフリップフロ
ップ回路11の出力はライトプロテクト付メモリ制御回
路12にライトプロテクト状態を示すライトプロテクト
信号WPとして入力され、ライトプロテクト付メモリ制
御回路12はこの信号を基にしてメモリライト時にライ
ト動作を行なうか否かの決定を行なう。
An example of a conventional memory write protect control circuit that performs this type of memory write protect setting/cancellation method is shown in FIG. In FIG. 6, the flip-flop circuit 11 is for setting and canceling the memory write protect state, and the flip-flop circuit 11 is provided with a memory write protect setting signal WP.
When SET is input, the write protection state is entered, and when the memory write protection release signal WPRES is input, the write protection release state is entered. The output of this flip-flop circuit 11 is inputted to the memory control circuit with write protection 12 as a write protection signal WP indicating the write protection state, and the memory control circuit with write protection 12 performs a write operation at the time of memory write based on this signal. A decision is made as to whether or not.

【0004】0004

【発明が解決しようとする課題】ところが、図6に示す
方法ではハード的構成は非常にシンプルであるが、これ
を制御するソフトは複雑になってしまうという問題点が
ある。すなわち、ソフト処理においては割込み制御を多
用しており、それぞれの割込み処理ルーチンはいつどこ
のレベルで発生するか不明であり、現在の状態がライト
プロテクト状態なのかそうでないのかは不明である。そ
こでメモリに現在の状態を示すフラグを設け、そのフラ
グの状態に応じてライトプロテクトを設定したり解除し
たりするようにしているが、このフラグをどのように構
成するかというのも実際には難しい問題である。すなわ
ち、現在自分のルーチンがどこのレベルのルーチンとし
て動いているのかという情報も必要になり、単にライト
プロテクトON/OFFフラグだけでは処理終了後に戻
ったルーチン内で異常を起こす可能性がある。
However, the method shown in FIG. 6 has a problem in that although the hardware configuration is very simple, the software that controls it is complicated. That is, interrupt control is frequently used in software processing, and it is unclear when and at what level each interrupt processing routine will occur, and it is unknown whether the current state is write protected or not. Therefore, a flag is set in the memory to indicate the current state, and write protection is set or canceled depending on the state of the flag. However, how to configure this flag is actually difficult. This is a difficult problem. That is, information as to what level the routine is currently running is also required, and simply setting the write protection ON/OFF flag may cause an abnormality in the routine that returns after processing is completed.

【0005】このように、従来のメモリライトプロテク
ト制御回路はハードは非常にシンプルであるが、ソフト
処理が非常に複雑になるという欠点があった。してみれ
ば、現在のルーチンがどこのレベルの割込み処理ルーチ
ンとして動いていてもメモリライトプロテクト設定・解
除ができるようになれば、ソフト処理を非常に簡単にで
きるようになることは明らかである。
As described above, the conventional memory write protection control circuit has a drawback that although the hardware is very simple, the software processing is very complicated. It is clear that if it were possible to set and release memory write protection no matter what level the current routine is operating as an interrupt processing routine, software processing would be made much easier. .

【0006】本発明の課題は、多重割込み発生時のメモ
リライトプロテクト設定・解除ソフト処理を簡単にでき
るようにすることである。
An object of the present invention is to simplify software processing for setting and canceling memory write protection when multiple interrupts occur.

【0007】[0007]

【課題を解決するための手段】本発明の手段は次の通り
である。(1)カウンタ手段を、メモリの書込み禁止を
設定するメモリライトプロテクト設定信号によりカウン
トアップさせるとともに、ライトプロテクト解除信号に
よりカウントダウンさせ、カウンタ手段のカウント値が
所定値(例えば、0)になったときライトプロテクト状
態となるライトプロテクト信号を出力するカウンタ制御
手段。例えば、メモリの書込み禁止を設定するメモリラ
イトプロテクト設定信号とその解除信号を論理ORして
入力クロック信号として出力するOR回路と、前記メモ
リライトプロテクト設定信号によりカウンタ手段のカウ
ントアップ/カウントダウンを決定するフリップフロッ
プ回路と、カウンタ回路からの出力を論理ANDしてラ
イトプロテクト信号を出力するAND回路とにより構成
される。(2)入力クロック信号に同期してカウントア
ップ又はカウントダウンするカウンタ手段。例えば、前
記フリップフロップ回路からの出力によりカウントアッ
プ又はカウントダウンが決定され、前記OR回路からの
入力クロック信号に同期してカウントアップ又はカウン
トダウンする所定ビット数のカウンタ回路である。 (3)ライトプロテクト信号を含む所定の入力信号に基
づいてメモリアクセスに必要なチップセレクト信号、ア
ウトプットイネーブル信号、ライトイネーブル信号を出
力するとともに、メモリライト時に前記ライトプロテク
ト信号がイネーブル状態であればライト動作を行わない
ように制御するメモリ制御手段。例えば、メモリの周辺
回路を構成する読出し/書込み制御回路にメモリアクセ
スに必要なチップセレクト信号、アウトプットイネーブ
ル信号、ライトイネーブル信号を供給するとともに、メ
モリライト時にライトプロテクト信号がイネーブル状態
であればライト動作を行わないように制御するライトプ
ロテクト付メモリ制御回路である。
Means for Solving the Problems The means of the present invention are as follows. (1) When the counter means is incremented by a memory write protection setting signal that sets write protection to the memory, and counted down by a write protection release signal, and the count value of the counter means reaches a predetermined value (for example, 0). Counter control means that outputs a write protect signal that enters a write protect state. For example, an OR circuit that logically ORs a memory write protect setting signal that sets write protection to the memory and its release signal and outputs the result as an input clock signal, and the memory write protect setting signal determines the count up/count down of the counter means. It is composed of a flip-flop circuit and an AND circuit that logically ANDs the output from the counter circuit and outputs a write protect signal. (2) Counter means that counts up or down in synchronization with the input clock signal. For example, it is a counter circuit of a predetermined number of bits whose count up or count down is determined by the output from the flip-flop circuit and which counts up or down in synchronization with the input clock signal from the OR circuit. (3) Outputs a chip select signal, an output enable signal, and a write enable signal necessary for memory access based on a predetermined input signal including a write protect signal, and if the write protect signal is enabled at the time of memory write. A memory control means that controls not to perform a write operation. For example, in addition to supplying the chip select signal, output enable signal, and write enable signal necessary for memory access to the read/write control circuit that constitutes the peripheral circuit of the memory, if the write protect signal is enabled during memory write, the write This is a memory control circuit with write protection that controls the memory so that it does not operate.

【0008】[0008]

【作用】本発明の手段の作用は次の通りである。カウン
タ手段はカウンタ制御手段によってライトプロテクト設
定信号によりカウントアップ、ライトプロテクト解除信
号によりカウントダウンし、カウント値が所定値(例え
ば、0)になったときライトプロテクト状態になるライ
トプロテクト信号をメモリ制御手段に出力するように制
御される。メモリ制御手段はメモリライト時に前記ライ
トプロテクト信号がイネーブル状態であればライト動作
を行わないように制御する。従って、多重割込み発生時
のメモリライトプロテクト設定・解除ソフト処理が簡単
にできるようになる。
[Operation] The operation of the means of the present invention is as follows. The counter means counts up by the write protect setting signal and counts down by the write protect release signal by the counter control means, and when the count value reaches a predetermined value (for example, 0), a write protect signal is sent to the memory control means. Controlled to output. The memory control means performs control so that the write operation is not performed if the write protect signal is in an enabled state at the time of memory write. Therefore, software processing for setting and canceling memory write protection when multiple interrupts occur can be easily performed.

【0009】[0009]

【実施例】以下、図1〜図5を参照して実施例を説明す
る。
[Embodiment] An embodiment will be described below with reference to FIGS. 1 to 5.

【0010】図1〜図5はメモリライトプロテクト制御
装置の一実施例を示す図である。
FIGS. 1 to 5 are diagrams showing one embodiment of a memory write protection control device.

【0011】先ず、構成を説明する。図1はメモリライ
トプロテクト制御回路の全体構成図である。この図にお
いて、1はメモリライトプロテクト設定・解除を行なう
メモリライトプロテクト制御回路であり、メモリライト
プロテクト制御回路1は、ライトプロテクト設定信号W
PSET及びその解除信号WPRESが入力されNOR
出力を後述する8ビットアップ/ダウンカウンタ4のク
ロック端子CCKに出力する2入力負論理OR回路2と
、ライトプロテクト設定信号WPSETがデータとして
入力され8ビットアップ/ダウンカウンタ4のアップ/
ダウン動作を決定するプリセット機能付フリップフロッ
プ回路3と、クロック信号CCKに同期してカウントア
ップ又はカウントダウン動作をする8ビットアップ/ダ
ウンカウンタ4と、この8ビットアップ/ダウンカウン
タ4からの出力信号を論理ANDし出力信号が全て0の
ときライトプロテクト状態を示すライトプロテクト信号
(WP)を出力する8入力負論理AND回路5と、メモ
リリクエスト信号MREQ、リードライト表示信号R/
W、その他必要な信号が入力され、メモリアクセスに必
要なチップセレクトCS、アウトプットイネーブル信号
OE、ライトイネーブル信号WEを出力するライトプロ
テクト機能付きメモリ制御回路とにより構成されている
First, the configuration will be explained. FIG. 1 is an overall configuration diagram of a memory write protection control circuit. In this figure, 1 is a memory write protect control circuit that sets and cancels memory write protection, and the memory write protect control circuit 1 receives a write protect setting signal W.
PSET and its release signal WPRES are input and NOR
A 2-input negative logic OR circuit 2 outputs the output to a clock terminal CCK of an 8-bit up/down counter 4, which will be described later, and a write protect setting signal WPSET is input as data to the up/down counter of the 8-bit up/down counter 4.
A flip-flop circuit 3 with a preset function that determines the down operation, an 8-bit up/down counter 4 that performs a count-up or count-down operation in synchronization with the clock signal CCK, and an output signal from the 8-bit up/down counter 4. An 8-input negative logic AND circuit 5 outputs a write protect signal (WP) indicating a write protect state when all output signals are 0, a memory request signal MREQ, and a read/write display signal R/
W, and a memory control circuit with a write protect function that receives other necessary signals and outputs a chip select CS necessary for memory access, an output enable signal OE, and a write enable signal WE.

【0012】2入力負論理OR回路2は、ライトプロテ
クト設定信号WPSET、その解除信号WPRESを負
論理ORして、その出力(CCK)を8ビットアップ/
ダウンカウンタ4のクロックとする回路である。
The 2-input negative logic OR circuit 2 performs a negative logic OR on the write protect setting signal WPSET and its release signal WPRES, and outputs the output (CCK) by 8 bits up/down.
This circuit is used as a clock for the down counter 4.

【0013】フリップフロップ回路3は、プリセット機
能付でリセット時には出力信号U/D=“H”となるも
ので、このフリップフロップ回路は8ビットアップ/ダ
ウンカウンタ4のアップ/ダウンを決定するための回路
であり、ライトプロテクト設定信号WPSETがイネー
ブルの時、外部入力クロック信号CLKに同期して“L
”レベル、すなわち、ダウンカウントをカウンタ4に指
示する。また、ライトプロテクト解除信号WPRETが
イネーブルの時は“H”レベルを保持したままなので、
アップカウントをカウンタ4に指示することになる。
The flip-flop circuit 3 has a preset function and output signal U/D becomes "H" at the time of reset. When the write protect setting signal WPSET is enabled, the circuit goes “L” in synchronization with the external input clock signal CLK.
” level, that is, instruct the counter 4 to down count. Also, when the write protect release signal WPRET is enabled, it remains at the “H” level, so
This will instruct the counter 4 to count up.

【0014】8ビットアップ/ダウンカウンタ4は、前
記フリップフロップ回路3の出力に従って、前記2入力
負論理OR回路2からのクロック信号CCKに同期して
カウントアツプ又はカウントダウン動作を行なう。リセ
ット時にはこのカウンタの値は“0”クリアされる。な
お、本実施例ではアップ/ダウン可能なカウンタとして
8ビットカウンタを用いたが、かかるビット数に限定さ
れないことは勿論である。
The 8-bit up/down counter 4 performs a count-up or count-down operation in accordance with the output of the flip-flop circuit 3 in synchronization with the clock signal CCK from the two-input negative logic OR circuit 2. At reset, the value of this counter is cleared to "0". In this embodiment, an 8-bit counter is used as an up/down counter, but it is needless to say that the number of bits is not limited to this.

【0015】8入力負論理AND回路5は、前記8ビッ
トアップ/ダウンカウンタ4の8ビット出力が全て“0
”かどうかを判定するための回路であり、全て“0”の
時ライトプロテクト状態を示すライトプロテクト信号W
Pがイネーブルになる。
In the 8-input negative logic AND circuit 5, all 8-bit outputs of the 8-bit up/down counter 4 are "0".
This is a circuit for determining whether or not the write protection signal W
P is enabled.

【0016】ライトプロテクト機能付メモリ制御回路6
は、メモリリクエスト信号MREQリード/ライト表示
信号R/W及びその他必要な信号から、メモリチップセ
レクト信号CS、メモリアウトプット信号OE、メモリ
ライト信号WEを出力する回路である。また、このメモ
リ制御回路6は、前記8入力負論理AND回路5から出
力されるWP信号により、メモリライト時にライト動作
を行なうかどうか、すなわち、メモリライト時にライト
プロテクト信号WPがイネーブル状態であれば、ライト
動作を行なわないという機能を有している。
Memory control circuit with write protection function 6
is a circuit that outputs a memory chip select signal CS, a memory output signal OE, and a memory write signal WE from a memory request signal MREQ, a read/write display signal R/W, and other necessary signals. In addition, this memory control circuit 6 determines whether or not to perform a write operation at the time of memory write, based on the WP signal output from the 8-input negative logic AND circuit 5, that is, if the write protect signal WP is in an enabled state at the time of memory write. , has the function of not performing a write operation.

【0017】上記2入力負論理OR回路2、フリップフ
ロップ回路3及び8入力負論理AND回路5は全体とし
て8ビットアップ/ダウンカウンタ4を制御するカウン
タ制御回路(カウンタ制御手段)7を構成している。
The 2-input negative logic OR circuit 2, the flip-flop circuit 3, and the 8-input negative logic AND circuit 5 collectively constitute a counter control circuit (counter control means) 7 for controlling the 8-bit up/down counter 4. There is.

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

【0019】図2は現在動いている基本ルーチンがプロ
テクト状態であり、このルーチンから3重の多重インタ
ラプトルーチン(インタラプト1処理ルーチン、インタ
ラプト2処理ルーチン、インタラプト3処理ルーチン)
が動作した場合の処理フローを示している。
In FIG. 2, the currently running basic routine is in a protected state, and from this routine three multiple interrupt routines (interrupt 1 processing routine, interrupt 2 processing routine, interrupt 3 processing routine) are executed.
It shows the processing flow when it operates.

【0020】図2に示すように各ルーチンは現在どの多
重レベルなのかを意識することなく無条件にルーチンの
先頭でプロテクト解除命令、ルーチンの出力でプロテク
ト設定命令を発行するだけでよい。
As shown in FIG. 2, each routine can simply issue a protection release command at the beginning of the routine and a protection setting command at the output of the routine without being aware of the current multiplicity level.

【0021】図3は図2の動作に合わせたプロテクト状
態からのタイミングチャートである。
FIG. 3 is a timing chart from the protected state corresponding to the operation shown in FIG.

【0022】図3に示すように、各ルーチンの先頭で発
行されているプロテクト解除命令により、8ビットアッ
プ/ダウンカウンタ4の値がインクリメントされ、その
値は“0”でないのでプロテクト状態を示すライトプロ
テクト信号WPはディスイネーブル状態、すなわちプロ
テクト解除状態になっている。インタラプトルーチン3
の終了時にプロテクト設定命令が発行されると、アップ
/ダウンカウンタ4の値はデクリメントされるが“0”
ではないのでプロテクト設定は行なわれない。インタラ
プトルーチン3の戻りルーチンであるインタラプトルー
チン2ではプロテクト解除状態で処理を行なっていたの
で、逆にプロテクト設定状態になると問題になっていた
が、本実施例ではインタラプトルーチン2は途中でイン
タラプトルーチン3が動作したことを全く意識する必要
はない。インタラプトルーチン2がインタラプトルーチ
ン1に戻る時も同様である。インタラプトルーチン1が
元の基本ルーチンに戻る時にはカウンタの値が初めて“
0”になるためプロテクト設定命令により初めてプロテ
クト状態になる。基本ルーチンは元もとプロテクト状態
で動作していたため、プロテクト状態になる。
As shown in FIG. 3, the value of the 8-bit up/down counter 4 is incremented by the protection release command issued at the beginning of each routine, and since the value is not "0", a write indicating the protected state is performed. The protect signal WP is in a disabled state, that is, in a protected release state. Interrupt routine 3
When a protect setting command is issued at the end of
Since it is not, protection settings are not performed. Since the interrupt routine 2, which is the return routine of the interrupt routine 3, was processing in the unprotected state, it would have been a problem if the protection had been set, but in this embodiment, the interrupt routine 2 There is no need to be aware that it has worked. The same applies when interrupt routine 2 returns to interrupt routine 1. When interrupt routine 1 returns to the original basic routine, the value of the counter is “
0", it enters the protected state for the first time with a protect setting command. Since the basic routine was originally operating in the protected state, it enters the protected state.

【0023】図4は現在動いている基本ルーチンがノン
プロテクト状態であり、このルーチンからの3重の多重
インタラプトルーチンが動作した場合の処理フローを示
しており、図2と同様の処理動作となっている。
FIG. 4 shows a processing flow when the currently running basic routine is in a non-protected state and three multiplex interrupt routines from this routine run, and the processing operation is similar to that shown in FIG. ing.

【0024】また図5は図4の動作に合わせたタイムチ
ャートである。基本的な動作の流れは前述の図3の通り
であるが、多重割込みから最終的に戻ってきた時の基本
ルーチン上ではノンプロテクト状態になっている。
FIG. 5 is a time chart corresponding to the operation shown in FIG. The basic operation flow is as shown in FIG. 3 above, but the basic routine is in a non-protected state when it finally returns from multiple interrupts.

【0025】以上説明したように、本実施例によればラ
イトプロテクト付メモリ制御回路(メモリライトプロテ
クト設定・解除回路)6にアップカウント/ダウンカウ
ント可能な8ビットアップ/ダウンカウンタ4と、この
カウンタ4を制御するカウンタ制御回路7とを設け、ラ
イトプロテクト設定信号WPSETによりカウントアッ
プ、ライトプロテクト解除信号WPRESによりカウン
トダウンさせ、カウンタ4の値が“0”になった時ライ
トプロテクト状態になるライトプロテクト信号WPを出
力するようにしているので、インタラプト多重処理ルー
チン内で、自分がどのレベルの割込みルーチンかを意識
する必要はなく、ルーチンの先頭と出口で解除・設定を
行なうだけで良くなったため、ソフト処理が簡単に行な
えるようになるという利点がある。従って、ソフトの複
雑さが軽減されるためソフト開発効率が上がる。また、
処理スピード的に厳しいインタラプトルーチンから複雑
な処理フローを省くことができるため、処理スピード的
に有利になる。かかる特徴を有するメモリライトプロテ
クト制御回路をメモリライトプロテクト機能付きのメモ
リを持った電子機器全般に利用して好適である。
As explained above, according to this embodiment, the memory control circuit with write protection (memory write protection setting/cancellation circuit) 6 includes an 8-bit up/down counter 4 capable of up-counting/down-counting, and this counter. A counter control circuit 7 is provided to control the counter 4, and the counter 4 is counted up by the write protect setting signal WPSET and counted down by the write protect release signal WPRES, and when the value of the counter 4 becomes "0", the write protect state is set. Since WP is output, there is no need to be aware of what level of interrupt routine you are in within the interrupt multiprocessing routine, and you only need to clear and set it at the beginning and exit of the routine. This has the advantage that processing can be performed easily. Therefore, the complexity of software is reduced and the efficiency of software development is increased. Also,
Since a complicated processing flow can be omitted from the interrupt routine, which is difficult in terms of processing speed, it is advantageous in terms of processing speed. A memory write protection control circuit having such characteristics is suitable for use in general electronic equipment having a memory with a memory write protection function.

【0026】なお、本実施例ではOR回路として2入力
負論理OR回路(NOR回路)を、またAND回路とし
て8入力負論理AND回路(NAND回路)を用いてい
るが、所定の論理動作をするものであれば上記論理回路
の種類や数、入力端子数には限定されないことは言うま
でもない。
In this embodiment, a 2-input negative logic OR circuit (NOR circuit) is used as the OR circuit, and an 8-input negative logic AND circuit (NAND circuit) is used as the AND circuit. It goes without saying that the type and number of logic circuits and the number of input terminals are not limited as long as the number of input terminals is the same.

【0027】また、本実施例では8ビットカウンタを用
いているが、アップ/ダウン可能なカウンタであれば、
8ビットに限らず、例えば16ビットカウンタであって
もよく、さらにはレジスタ等を組み合わせてカウンタ動
作させるものであってもよい。
Furthermore, although an 8-bit counter is used in this embodiment, any counter that can be up/down may be used.
The counter is not limited to 8 bits, but may be a 16-bit counter, for example, or may be a counter operated by combining registers and the like.

【0028】[0028]

【発明の効果】本発明によれば、メモリ制御手段にカウ
ンタ手段及びその制御手段を設けるようにしているので
、多重割込み発生時のメモリライトプロテクト設定・解
除ソフト処理を大幅に簡略化させることができ、ソフト
の複雑さを軽減してソフト開発効率を上げることができ
、複雑な処理フローを省くことによって、処理スピード
を向上させることができる。
According to the present invention, since the memory control means is provided with a counter means and its control means, it is possible to greatly simplify the memory write protection setting/cancellation software processing when multiple interrupts occur. It is possible to reduce the complexity of software and increase the efficiency of software development, and it is possible to improve processing speed by eliminating complicated processing flows.

【0013】[0013]

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

【図1】メモリライトプロテクト制御装置の全体構成図
である。
FIG. 1 is an overall configuration diagram of a memory write protection control device.

【図2】メモリライトプロテクト制御装置のプロテクト
状態から多重インタラプトルーチンが動作した場合のフ
ローチャートである。
FIG. 2 is a flowchart when a multiple interrupt routine operates from the protected state of the memory write protection control device.

【図3】図2のタイミングチャートである。FIG. 3 is a timing chart of FIG. 2;

【図4】ノンプロテクト状態から多重インタラプトルー
チンかが動作した場合のフローチャートである。
FIG. 4 is a flowchart when a multiple interrupt routine operates from a non-protected state.

【図5】図4のタイミングチャートである。FIG. 5 is a timing chart of FIG. 4;

【図6】従来のメモリライトプロテクト制御回路の構成
図である。
FIG. 6 is a configuration diagram of a conventional memory write protection control circuit.

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

1  メモリライトプロテクト制御回路2  2入力負
論理OR回路 3  プリセット機能付フリップフロップ回路4  8
ビットアップ/ダウンカウンタ5  8入力負論理AN
D回路 6  ライトプロテクト付メモリ制御回路7  カウン
タ制御回路 WPSET  ライトプロテクト設定信号WPRES 
 ライトプロテクト解除信号CCK  入力クロック信
号 WP  ライトプロテクト信号
1 Memory write protection control circuit 2 2-input negative logic OR circuit 3 Flip-flop circuit with preset function 4 8
Bit up/down counter 5 8 input negative logic AN
D circuit 6 Memory control circuit with write protection 7 Counter control circuit WPSET Write protection setting signal WPRES
Write protect release signal CCK Input clock signal WP Write protect signal

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  入力クロック信号に同期してカウント
アップ又はカウントダウンするカウンタ手段と、前記カ
ウンタ手段を、メモリの書込み禁止を設定するメモリラ
イトプロテクト設定信号によりカウントアップさせると
ともに、ライトプロテクト解除信号によりカウントダウ
ンさせ、前記カウンタ手段のカウント値が所定値になっ
たときライトプロテクト状態となるライトプロテクト信
号を出力するカウンタ制御手段と、  前記ライトプロ
テクト信号を含む所定の入力信号に基づいてメモリアク
セスに必要なチップセレクト信号、アウトプットイネー
ブル信号、ライトイネーブル信号を出力するとともに、
メモリライト時に前記ライトプロテクト信号がイネーブ
ル状態であればライト動作を行わないように制御するメ
モリ制御手段と、を具備したことを特徴とするメモリラ
イトプロテクト制御装置。
1. Counter means for counting up or down in synchronization with an input clock signal, and said counter means is made to count up by a memory write protect setting signal that sets write protection to the memory, and counts down by a write protect release signal. counter control means for outputting a write protect signal that enters a write protect state when the count value of the counter means reaches a predetermined value; and a chip necessary for memory access based on a predetermined input signal including the write protect signal. In addition to outputting the select signal, output enable signal, and write enable signal,
A memory write protection control device comprising: memory control means for controlling a write operation so as not to be performed if the write protect signal is in an enabled state at the time of memory write.
【請求項2】  メモリの書込み禁止を設定するメモリ
ライトプロテクト設定信号とその解除信号を論理ORし
て入力クロック信号として出力するOR回路と、  前
記メモリライトプロテクト設定信号によりカウンタ回路
のカウントアップ/カウントダウンを決定するフリップ
フロップ回路と、前記フリップフロップ回路からの出力
によりカウントアップ又はカウントダウンが決定され、
前記OR回路からの入力クロック信号に同期してカウン
トアップ又はカウントダウンするカウンタ回路と、前記
カウンタ回路からの出力を論理ANDしてライトプロテ
クト信号を出力するAND回路と、前記ライトプロテク
ト信号を含む所定の入力信号に基づいてメモリアクセス
に必要なチップセレクト信号、アウトプットイネーブル
信号、ライトイネーブル信号を出力するとともに、メモ
リライト時に前記ライトプロテクト信号がイネーブル状
態であればライト動作を行わないように制御するメモリ
制御回路と、を具備したことを特徴とするメモリライト
プロテクト制御装置。
2. An OR circuit that logically ORs a memory write protect setting signal that sets write protection to the memory and its release signal and outputs the result as an input clock signal, and a counter circuit that counts up/counts down according to the memory write protect setting signal. a flip-flop circuit that determines count-up or count-down based on the output from the flip-flop circuit;
a counter circuit that counts up or counts down in synchronization with the input clock signal from the OR circuit; an AND circuit that logically ANDs the output from the counter circuit to output a write protect signal; A memory that outputs a chip select signal, an output enable signal, and a write enable signal necessary for memory access based on an input signal, and controls so that a write operation is not performed if the write protect signal is enabled at the time of memory write. A memory write protection control device comprising a control circuit.
JP2409892A 1990-12-12 1990-12-12 Memory write protect controller Pending JPH04215152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2409892A JPH04215152A (en) 1990-12-12 1990-12-12 Memory write protect controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2409892A JPH04215152A (en) 1990-12-12 1990-12-12 Memory write protect controller

Publications (1)

Publication Number Publication Date
JPH04215152A true JPH04215152A (en) 1992-08-05

Family

ID=18519152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2409892A Pending JPH04215152A (en) 1990-12-12 1990-12-12 Memory write protect controller

Country Status (1)

Country Link
JP (1) JPH04215152A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005084721A (en) * 2003-09-04 2005-03-31 Renesas Technology Corp Microcomputer
US9148028B2 (en) 2011-11-08 2015-09-29 Kabushiki Kaisha Toyota Jidoshokki Apparatus and method for battery equalization

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005084721A (en) * 2003-09-04 2005-03-31 Renesas Technology Corp Microcomputer
US9148028B2 (en) 2011-11-08 2015-09-29 Kabushiki Kaisha Toyota Jidoshokki Apparatus and method for battery equalization

Similar Documents

Publication Publication Date Title
JPH04215152A (en) Memory write protect controller
JP3652269B2 (en) Signal processing device
JPS58219645A (en) Microcomputer
JPH04369064A (en) Method and device for controlling interruption processing
JP3036590B2 (en) External device control circuit
JPH023217B2 (en)
JP3221904B2 (en) Control register writing device
JPS59123957A (en) Digital signal arithmetic device
JPS6252336B2 (en)
JPS62187954A (en) Bus control system
JPH0876876A (en) Clock supply control circuit of microprocessor
JP3168663B2 (en) Information processing device
JPH0283779A (en) Instruction execution control system for vector processor
JPH06103154A (en) Shared memory controller
JPH0635794A (en) Method and device for controlling timing in computer system
JPH052891A (en) Ram writing circuit with holding function
JPS61136115A (en) Basic clock generating circuit of microcomputer system
JPH03257515A (en) Current consumption control system for information processor
JPS62190953A (en) Control circuit for communication control unit of communication control equipment
JPH0736820A (en) I/o controller
JPH06342043A (en) Semiconductor integrated circuit device and its test method
KR19990032841A (en) Priority processing control device
JPH05120031A (en) Micro computer
JPH05324861A (en) Semiconductor circuit device
JPH0378196A (en) Semiconductor integrated circuit