JPH0236442A - Method for controlling memory - Google Patents

Method for controlling memory

Info

Publication number
JPH0236442A
JPH0236442A JP18636088A JP18636088A JPH0236442A JP H0236442 A JPH0236442 A JP H0236442A JP 18636088 A JP18636088 A JP 18636088A JP 18636088 A JP18636088 A JP 18636088A JP H0236442 A JPH0236442 A JP H0236442A
Authority
JP
Japan
Prior art keywords
memory
microprocessor
data
interruption
interrupt
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.)
Granted
Application number
JP18636088A
Other languages
Japanese (ja)
Other versions
JPH0542019B2 (en
Inventor
Toshiyuki Ito
利之 伊藤
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.)
Seiko Instruments Inc
Original Assignee
Seiko Instruments Inc
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 Seiko Instruments Inc filed Critical Seiko Instruments Inc
Priority to JP18636088A priority Critical patent/JPH0236442A/en
Publication of JPH0236442A publication Critical patent/JPH0236442A/en
Publication of JPH0542019B2 publication Critical patent/JPH0542019B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To attain a data processing at high speed without using an expensive memory control element by controlling a data memory through the use of interruption provided in standard in a micro processor. CONSTITUTION:When the micro processor 1 accesses a final address in a control unit which is previously decided for the memory 3, an interruption type memory control circuit 2 normally accesses the memory 3 and simultaneously generates the interruption 14 to the micro processor 1. The micro processor 1 recognizes interruption in an instruction which executes access, detects the termination in the control unit, prepares a new control unit, decides the content of the instruction by a flag which the interruption type memory control circuit 2 has, executes the processing corresponding to the content and continues the data processing again. Thus, interruption can be generated inexpensively compared to a case when a private memory control element is used, and the high speed processing can be realized.

Description

【発明の詳細な説明】 [産業上の利用分野1 本発明は、マイクロプロセッサを使用してデータ処理を
行なう際のメモリ管理方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application 1] The present invention relates to a memory management method when data processing is performed using a microprocessor.

〔発明の概要〕[Summary of the invention]

本発明は、データ処理を行ない、この処理されたデータ
をメモリにたくねえる処理を行なうマイクロプロセッサ
を用い、データ用メモリの管理を高速に行なうために、
データ用メモリを一定の管理単位に区切ると共に、マイ
クロプロセッサが、前記データを前記データ用メモリに
書き込みあるいは読み出す場合に、割り込み式メモリ管
理回路により前記マイクロプロセッサのアドレスを監視
し、データ用メモリの前記管理単位の最終番地を検出し
、以後のデータ用メモリの書き込み動作を禁止しマイク
ロプロセッサに対して割り込みをかける。この割り込み
をマイクロプロセッサが受け、前記管理単位が終了した
ことを検出し、マイクロプロセッサは、前記割り込みを
受けつけたインストラクションが、書き込みか読み出し
かと、最終番地から何回アクセスしたかを、割り込み式
メモリ管理回路に保持されているフラグにより判定し、
1回のアクセスに対しては新たな管理単位を用意してデ
ータ処理を続け、複数回のアクセスに対しては、新たな
管理単位を用意すると共に新たな管理単位に対して前回
の管理単位をこ^て読みこみを行なった場合には、こλ
た回数分新たな管理単位からデータを読みこみ、書きこ
みの場合には、書き込み禁止を解除し、こ久た回数分新
たな管理単位に対してデータを書きこみ処理をつづける
ようにした。
The present invention utilizes a microprocessor that processes data and stores the processed data in memory, in order to manage data memory at high speed.
The data memory is divided into fixed management units, and when the microprocessor writes or reads data to or from the data memory, an interrupt-type memory management circuit monitors the address of the microprocessor and It detects the final address of the management unit, prohibits future data memory write operations, and issues an interrupt to the microprocessor. When the microprocessor receives this interrupt and detects that the management unit has ended, the microprocessor determines whether the instruction that received the interrupt was a write or read, and how many times it has accessed from the final address. Determined by the flag held in the circuit,
For one access, a new management unit is prepared and data processing continues; for multiple accesses, a new management unit is prepared and the previous management unit is used for the new management unit. If you read this, this λ
Data is read from the new management unit for the number of times that have passed, and in the case of writing, write protection is canceled and data is written to the new management unit for the number of times that have passed and the process continues.

[従来の技術1 従来、メモリの管理は、ソフトウェアにより、管理単位
の判定を行なわれるか、あるいは、専用のメモリ管理素
子又は、マイクロプロセッサに内蔵されたメモリ管理素
子により、マイクロプロセッサのアドレス変換により行
なわれていた。
[Prior art 1] Conventionally, memory management has been performed by software to determine the management unit, or by a dedicated memory management element or a memory management element built into a microprocessor, or by address conversion in the microprocessor. It was being done.

[発明が解決しようとする課題] 従来方法の課題は、専用のメモリ管理素子を使用する方
法においては、マイクロプロセッサを高性能なコンピュ
ータとして使用することを目的としているため、コンピ
ュータとして必要な機能をすべてふくめでいる関係から
、データの管理だけを行ないたいという用途にはコスト
的に非常に高くついていた。又、ソフトウェアでデータ
用メモリの管理を行なう方法は、安価ではあるが、デー
タの処理速度が遅くなっていた。
[Problems to be Solved by the Invention] The problem with conventional methods is that in methods that use a dedicated memory management element, the purpose of using a microprocessor as a high-performance computer is that it does not provide the necessary functions as a computer. Because everything is included, it is extremely expensive for applications that only want to manage data. Furthermore, although the method of managing data memory using software is inexpensive, the data processing speed is slow.

〔課題を解決するための手段1 従来の課題を解決するために、本発明では、高価なメモ
リ管理素子を使用せず、また高速にデータ処理を行なえ
るように、マイクロプロセッサに標準で装備されている
割り込みを使用し、データ用メモリの管理を行なう構成
とした。
[Means for Solving the Problems 1] In order to solve the conventional problems, the present invention does not use expensive memory management elements and is equipped with a microprocessor as standard so that data processing can be performed at high speed. The configuration uses interrupts to manage data memory.

[作用] マイクロプロセッサが、メモリに対して書き込みあるい
は読み出しを行なうと、メモリ管理回路がアドレスの監
視を行ない、管理単位の最終番地を検出すると、前記メ
モリ管理回路がマイクロプロセッサに対し割り込みを発
生する。割り込みを受けたマイクロプロセッサは、前記
管理単位の終了を検出し、新たな管理単位を用意し、メ
モリ管理回路が保持しているフラグにより、前記割り込
みを受けつけたインストラクションの内容を判定し、前
記内容に応じた処理を行ない、データ処理をつづける。
[Operation] When the microprocessor writes or reads from memory, the memory management circuit monitors the address, and when the final address of the management unit is detected, the memory management circuit generates an interrupt to the microprocessor. . The microprocessor that received the interrupt detects the end of the management unit, prepares a new management unit, determines the content of the instruction that received the interrupt based on the flag held by the memory management circuit, and executes the content. Performs processing according to the data and continues data processing.

E実施例] 以下、本発明の一実施例を図面に基づき説明する。E example] Hereinafter, one embodiment of the present invention will be described based on the drawings.

第1図を用いて本発明の詳細な説明する。The present invention will be explained in detail using FIG.

マイクロプロセッサlがメモリ3に対してアクセスを行
なうと、アドレスバス11、バス制御信号13および読
み出し時にはデータバス12が動作し割り込み式メモリ
管理回路2がこれを認識し、あらかじめ決められたメモ
リ3の管理単位の最終番地でなければ、割り込み式メモ
リ管理回路2は、メモリ3に対してチップセレクト17
、リード15またはライト16に信号を発生させ通常の
アクセスが行われる。マイクロプロセッサ1がメモリ3
に対して管理単位の最終番地をアクセスすると、割り込
み式メモリ管理回路2は、メモ’J 3に対して通常の
アクセスをすると同時にマイクロプロセッサ1に対して
割り込み14を発生させる。マイクロプロセッサ1は、
割り込みを前記アクセスを行なっているインストラクシ
ョン中に認識し、前記管理単位の終了を検出し、新たな
管理単位を用意し、割り込み式メモリ管理回路2が有す
る読み出し書き込み区別フラグとアクセス回数区別フラ
グにより前記インストラクションの内容を判定し、内容
に応じた処理を行なった後、再びデータ処理が続けられ
る。
When the microprocessor l accesses the memory 3, the address bus 11, the bus control signal 13, and the data bus 12 operate when reading, and the interrupt type memory management circuit 2 recognizes this and performs a predetermined memory 3 If it is not the final address of the management unit, the interrupt type memory management circuit 2 sends the chip select 17 to the memory 3.
, a signal is generated to read 15 or write 16, and normal access is performed. Microprocessor 1 is memory 3
When the last address of the management unit is accessed, the interrupt type memory management circuit 2 generates an interrupt 14 to the microprocessor 1 at the same time as the normal access to the memo 'J3. Microprocessor 1 is
An interrupt is recognized during the instruction performing the access, the end of the management unit is detected, a new management unit is prepared, and the read/write distinction flag and access count distinction flag of the interrupt type memory management circuit 2 are used to After determining the contents of the instruction and performing processing according to the contents, data processing is continued again.

次に本発明の実施例を第2図、第3図に基づいて具体的
に説明する。第2図は全体のブロック図を表わし、第3
図は、割り込み式メモリ管理回路2を詳細に表わした回
路図である。
Next, an embodiment of the present invention will be specifically described based on FIGS. 2 and 3. Figure 2 shows the overall block diagram, and Figure 3 shows the overall block diagram.
The figure is a circuit diagram showing the interrupt type memory management circuit 2 in detail.

本実施例では、マイクロプロセッサ1は、データバス1
2の幅が16ビツトとし、データ用メモリ3へのアクセ
スは1ワード(16ビツト)単位で行ない、データ用メ
モリ3をアクセスするインストラクションは、アクセス
1回で行なわれる1ワードアクセスまたはアクセス2回
で行なわれる2ワードアクセスとし、メモリの管理単位
として2キロバイトを使用する場合について説明する。
In this embodiment, the microprocessor 1 has a data bus 1
2 is 16 bits wide, data memory 3 is accessed in units of 1 word (16 bits), and instructions for accessing data memory 3 are 1 word access performed in one access, or 1 word access performed in 2 accesses. A case will be described in which 2-word access is performed and 2 kilobytes are used as the memory management unit.

マイクロプロセッサlがデータ用メモリ3に対して書き
込み、あるいは読み出しを行なうと、マイクロプロセッ
サ1のバス制御信号13およびアドレスバス11がアド
レスデコーダ4に人力しアドレスデコーダ4により、デ
ータ用メモリ退択信号(RAMSELECT)23が発
生する0割り込み式メモリ管理回路2は、選択信号23
を受けとり、マイクロプロセッサ1のバス制御信号13
の一部である。バス読み出し書き込み制御信号(R/W
)18とともに、データ用メモリ3に対して、メモリ制
御信号であるC517.RD15WR16を第3図のメ
モリR/Wコントロールブロック2Dより供給する。ま
た割り込み式メモリ管理回路2は、これと同時に、前記
アクセスが、メモリ管理単位の最終番地かどうかを第3
図に示すNANDゲート2Aにより、アドレスバス11
のうち下位のA1〜AIOのアドレス線がすべて1かど
うかをもって判定し、最終番地の場合には、バスサイク
ルの開始にF/F 2 Bに0がラッチされ、前記F/
Fの出力がマイクロプロセッサlへの割り込み(INT
)14となる。同時にF/F2Cには、マイクロプロセ
ッサ1によるアクセスが読み出しか書き込みかの情報が
保持される。バスサイクルの終了時点には、F/F2E
が0となり、メモリ制御信号(WR)1Bが禁止され以
後割り込みクリア信号(INTCLR)20がマイクロ
プロセッサlからあたえられるまで、データ用メモリ3
を書きかえる動作は禁止される。F/F2F、2Gはあ
らかじめ割り込みクリア信号(INTCLR)20があ
たえられ、両方とも1が保持されている。前記最終番地
へのアクセスが1ワードで終了すると、F/F 2 F
には0、F/F2Gには1が保持され、前記最終番地へ
のアクセスが、最終番地からの2ワードで行なわれると
、F/F2Fには0、F/F 2 Gには0が保持され
る。マイクロプロセッサ1は、割り込みを受けつけると
、F/F 2 Bの出力R/Wフラグ19、F/F 2
 Fの出力フラグA24、F/F2Gの出力フラグB2
5をI10ボート5をアドレスデコーダ4を介し、ステ
ータスリード信号(INPORTSEL)21により読
みこみ、割り込みを受けつけたインストラクションサイ
クルの内容を判定する。F/F2B、2F、2Gの内容
が、101の場合には、読み込み処理で、メモリ管理単
位の最終番地で終了したことを示し、読み込み用の新し
い管理単位を用意し、割り込みクリア信号(INTCL
R)20を発行し、再度データ処理を続行する。F/F
2B、2F、2Gの内容が100の場合には、読み込み
処理で、メモリ管理単位の最終番地をこえて1ワード読
みこんだことを示し、読み込み用の新しい管理単位を用
意し、割り込みクリア信号(INTCLR)20を発行
し新しい管理単位の1ワード目を、読み込み用にあらか
じめ設定されているマイクロプロセッサ1の内部レジス
フに読み込み、再度データ処理を続行する。001の場
合には、lotで示した処理が書き込みとしてあつわか
れて処理され、000の場合には001で示した処理が
書き込みとして処理される。
When the microprocessor 1 writes to or reads from the data memory 3, the bus control signal 13 and address bus 11 of the microprocessor 1 are input to the address decoder 4, and the address decoder 4 outputs the data memory withdrawal signal ( RAMSELECT) 23 generates 0 interrupt type memory management circuit 2, select signal 23
and receives the bus control signal 13 of the microprocessor 1.
is part of. Bus read/write control signal (R/W
)18 as well as a memory control signal C517. RD15WR16 are supplied from the memory R/W control block 2D in FIG. At the same time, the interrupt type memory management circuit 2 determines whether or not the access is to the final address of the memory management unit.
The address bus 11 is controlled by the NAND gate 2A shown in the figure.
The determination is made based on whether the lower address lines of A1 to AIO are all 1. If the address is the final address, 0 is latched in F/F 2 B at the start of the bus cycle, and the
The output of F is an interrupt (INT
)14. At the same time, the F/F 2C holds information as to whether the access by the microprocessor 1 is for reading or writing. At the end of the bus cycle, F/F2E
becomes 0, the memory control signal (WR) 1B is disabled, and the data memory 3 is disabled until the interrupt clear signal (INTCLR) 20 is given from the microprocessor l.
Any operation that rewrites the is prohibited. F/Fs 2F and 2G are given an interrupt clear signal (INTCLR) 20 in advance, and both are held at 1. When the access to the final address ends with one word, F/F 2 F
0 is held in F/F2G, 1 is held in F/F2G, and when the last address is accessed with two words from the last address, 0 is held in F/F2F and 0 is held in F/F2G. be done. When the microprocessor 1 receives an interrupt, the output R/W flag 19 of F/F 2 B,
F output flag A24, F/F2G output flag B2
5 is read from the I10 port 5 via the address decoder 4 by the status read signal (INPORTSEL) 21, and the contents of the instruction cycle in which the interrupt has been accepted are determined. If the contents of F/F2B, 2F, and 2G are 101, it indicates that the reading process ended at the last address of the memory management unit, a new management unit for reading is prepared, and an interrupt clear signal (INTCL
R) Issue 20 and continue data processing again. F/F
If the contents of 2B, 2F, and 2G are 100, this indicates that one word has been read beyond the final address of the memory management unit during the reading process, a new management unit is prepared for reading, and an interrupt clear signal ( INTCLR) 20 is issued, the first word of the new management unit is read into the internal register of the microprocessor 1 that has been set in advance for reading, and data processing is resumed. In the case of 001, the process indicated by lot is processed as a write, and in the case of 000, the process indicated by 001 is processed as a write.

本実施例ではデータバスの幅が16ビツトの場合を例に
とり説明を行なったが、他のマイクロプロセッサの場合
についてもほぼ同一の回路で実現でき、また2回以上の
アクセスについてもF/F2F、F/F2Gの数を増や
すことにより容易に実現が可能である。
In this embodiment, the case where the data bus width is 16 bits has been explained as an example, but it can be realized with almost the same circuit in the case of other microprocessors, and the F/F2F, This can be easily realized by increasing the number of F/F2Gs.

[発明の効果] 以上1本発明はデータ用メモリの管理を、非常に少ない
部品で構成できるため、専用のメモリ管理素子等を使う
場合に比べ安価に作成でき、また本発明を使用しないで
ソフトウェアによりメモリ管理を行なうと、管理単位の
境界を判定するため、lデータごとにメモリアドレスの
比較のインストラクションが入る為、非常に遅くなる6
本発明を使用することにより比較のインストラクション
がなくなり、高速処理が実現できるという効果を有する
[Effects of the Invention] As stated above, the present invention can configure data memory management using a very small number of parts, so it can be created at a lower cost than when using a dedicated memory management element, and software can be created without using the present invention. When memory management is performed using , an instruction to compare memory addresses is entered for each data item in order to determine the boundaries of management units, which makes it very slow6.
By using the present invention, there is no comparison instruction, and high-speed processing can be achieved.

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

第1図は、本発明の概略を表わすブロック図。 第2図は、本発明の実施例を表わすブロック図、第3図
は1本発明の実施例を表わす回路図である。 ・マイクロプロセッサ ・割り込み式メモリ管理回路 ・データ用メモリ ・アドレスデコーダ ・I10ボート 以 上 出願人 セイコー電子工業株式会社 代理人 弁理士  林   敬 之 幼子1図 臀20
FIG. 1 is a block diagram showing an outline of the present invention. FIG. 2 is a block diagram showing an embodiment of the present invention, and FIG. 3 is a circuit diagram showing an embodiment of the present invention.・Microprocessor ・Interrupt type memory management circuit ・Data memory ・Address decoder ・I10 boats and above Applicant Seiko Electronics Co., Ltd. Representative Patent attorney Takayuki Hayashi Child 1 Figure Buttocks 20

Claims (1)

【特許請求の範囲】[Claims] データ用のメモリを一定の単位に区切ってメモリ管理を
行なう方法において、マイクロプロセッサが、前記デー
タを前記メモリに書き込みあるいは読み出す場合に、前
記マイクロプロセッサのアドレスを監視し、前記メモリ
の前記管理単位の最終番地を検出し、前記マイクロプロ
セッサに対して割り込みを発生させると同時に、最終番
地アクセス後は、前記メモリへの書き込みを禁止させ、
最終番地へのアクセスが読み込みか書き込みかを区別す
るフラグを保持し、前記割り込みを発生させたインスト
ラクションが、最終番地から何回アクセスを行なったか
を示すフラグを保持することにより、データ用のメモリ
の管理を行なうメモリ管理方法。
In a method for managing memory by dividing data memory into fixed units, when a microprocessor writes or reads data to or from the memory, the address of the microprocessor is monitored, and the memory is divided into fixed units. detecting the final address and generating an interrupt to the microprocessor, and at the same time prohibiting writing to the memory after accessing the final address;
By holding a flag that distinguishes whether the access to the final address is a read or a write, and by holding a flag that indicates how many times the instruction that generated the interrupt has accessed from the final address, the memory for data can be A memory management method for managing.
JP18636088A 1988-07-26 1988-07-26 Method for controlling memory Granted JPH0236442A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18636088A JPH0236442A (en) 1988-07-26 1988-07-26 Method for controlling memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18636088A JPH0236442A (en) 1988-07-26 1988-07-26 Method for controlling memory

Publications (2)

Publication Number Publication Date
JPH0236442A true JPH0236442A (en) 1990-02-06
JPH0542019B2 JPH0542019B2 (en) 1993-06-25

Family

ID=16187010

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18636088A Granted JPH0236442A (en) 1988-07-26 1988-07-26 Method for controlling memory

Country Status (1)

Country Link
JP (1) JPH0236442A (en)

Also Published As

Publication number Publication date
JPH0542019B2 (en) 1993-06-25

Similar Documents

Publication Publication Date Title
JPS5960658A (en) Semiconductor storage device provided with logical function
JPH0236442A (en) Method for controlling memory
JPH0330175B2 (en)
JPS63318651A (en) Memory managing circuit
JPS62168497A (en) Data base processing system for exchange-processing program
JP3019323B2 (en) Direct access to image memory
JP3209521B2 (en) Memory access control method and computer system
JP3037242B2 (en) Pipeline processing circuit
JP2594611B2 (en) DMA transfer control device
JP2574821B2 (en) Direct memory access controller
JPH0447350A (en) Main storage read/response control
JPH0546547A (en) Data processor
JPH086905A (en) Access arbitration circuit for multi-port ram
JP3448962B2 (en) Arithmetic processing unit
JP2928036B2 (en) Logic semiconductor integrated circuit
JP2966038B2 (en) Digital data processing unit arbitration apparatus and method
JPS5922152A (en) Access controlling method of shared memory
JPS5942331B2 (en) Prosetsusasouchinoseigiohoshiki
JPH0258648B2 (en)
JPH03226850A (en) External auxiliary storage controller
JPH02307123A (en) Computer
JPS60243763A (en) Dual port memory control circuit
JPS61198356A (en) Multi-processor system
JPS592297A (en) Projection method of shared memory
JPH0457145A (en) Multiprocessor system

Legal Events

Date Code Title Description
S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees