JPH0255813B2 - - Google Patents

Info

Publication number
JPH0255813B2
JPH0255813B2 JP60279123A JP27912385A JPH0255813B2 JP H0255813 B2 JPH0255813 B2 JP H0255813B2 JP 60279123 A JP60279123 A JP 60279123A JP 27912385 A JP27912385 A JP 27912385A JP H0255813 B2 JPH0255813 B2 JP H0255813B2
Authority
JP
Japan
Prior art keywords
storage
area
logical
excess
register
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
Application number
JP60279123A
Other languages
Japanese (ja)
Other versions
JPS62139058A (en
Inventor
Hiroshi Nakajima
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP60279123A priority Critical patent/JPS62139058A/en
Publication of JPS62139058A publication Critical patent/JPS62139058A/en
Publication of JPH0255813B2 publication Critical patent/JPH0255813B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、デイジタル計算機のメモリ制御装
置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory control device for a digital computer.

[従来の技術] 従来、大容量の論理記憶空間と、この論理記憶
空間に比較して小容量の物理記憶空間を有するメ
モリ装置において、特定の論理記憶領域に対応す
る物理記憶領域の割当てを、当該論理記憶領域に
アクセスを行つた際に、もし物理記憶が割当てら
れていなければ割当てるという、動的な割当て方
式がしばしば用いられている。
[Prior Art] Conventionally, in a memory device having a large-capacity logical storage space and a small-capacity physical storage space compared to this logical storage space, allocation of a physical storage area corresponding to a specific logical storage area is A dynamic allocation method is often used in which physical storage is allocated if it is not allocated when the logical storage area is accessed.

第7図は従来のメモリ制御装置を示すブロツク
構成図、第8図は、第7図のメモリ制御装置内の
アドレス変換テーブルの1エントリを示す構成図
である。第7図に示すメモリ制御装置は、動的割
当てを行う場合に用いられるもので、ここでは、
説明を簡単にするために、論理アドレスを24ビツ
ト、物理アドレスを20ビツト、物理記憶の割当て
単位を1024ワード、論理アドレスから物理アドレ
スへの変換を1段階のテーブル検索で行うことを
それぞれ仮定しているが、これらの数値及びテー
ブル検索の段数等の方式は、何ら本質的なもので
はない。
FIG. 7 is a block diagram showing a conventional memory control device, and FIG. 8 is a diagram showing one entry of an address translation table in the memory control device shown in FIG. The memory control device shown in FIG. 7 is used when performing dynamic allocation, and here,
To simplify the explanation, we assume that the logical address is 24 bits, the physical address is 20 bits, the physical memory allocation unit is 1024 words, and the conversion from logical address to physical address is performed by a one-step table lookup. However, these numerical values and the method such as the number of stages of table search are not essential at all.

第7図において、論理アドレスは信号線1を介
して演算処理装置(図示しない)などにより供給
され、論理アドレス・レジスタであるLAR2に
供給される。LAR2の上位14ビツト、すなわち
ビツト23〜10は信号線3を介してアドレス変換テ
ーブルであるATT4に供給される。ATT4は
16384個のエントリを持つたテーブルであり、各
エントリは第8図に示すような構成となつてい
る。すなわち、最上位ビツトであるビツト10の
4aは、物理記憶が割当てられているか否かを示
す1ビツトのフラグであり、その値が「0」であ
れば物理記憶が割当てられていないことを、「1」
であれば物理記憶が割当てられていることをそれ
ぞれ示し、第7図に示す信号線5を介して演算処
理装置(図示しない)などへ伝達される。ATT
4の各エントリの下位10ビツト、すなわちビツト
9〜0の4bは、どの物理記憶単位を割当ててい
るかを示す情報を保持するフイールドであり、第
7図に示す信号線6を介して物理アドレス・レジ
スタであるPAR7の上位10ビツト、すなわちビ
ツト19〜10に供給される。LAR2の下位10ビツ
ト、すなわちビツト9〜0は、信号線8を介して
直接PAR7の下位10ビツト、すなわちビツト9
〜0に供給される。そして、PAR7の内容であ
る物理アドレスは、信号線9を介して物理記憶を
構成するメモリ素子(図示しない)などへ伝達さ
れる。
In FIG. 7, a logical address is supplied by an arithmetic processing unit (not shown) or the like via a signal line 1, and is supplied to a logical address register LAR2. The upper 14 bits of LAR2, ie, bits 23 to 10, are supplied via signal line 3 to ATT4, which is an address translation table. ATT4 is
This table has 16,384 entries, and each entry has a structure as shown in FIG. In other words, the most significant bit, bit 10,
4a is a 1-bit flag that indicates whether physical memory is allocated or not. If the value is "0", it indicates that physical memory is not allocated.
If so, this indicates that physical storage has been allocated, and is transmitted to an arithmetic processing unit (not shown) or the like via the signal line 5 shown in FIG. ATT
The lower 10 bits of each entry of 4, that is, bits 9 to 0, 4b, is a field that holds information indicating which physical storage unit is allocated. It is supplied to the upper 10 bits of register PAR7, ie, bits 19-10. The lower 10 bits of LAR2, bits 9 to 0, are directly connected to the lower 10 bits of PAR7, bits 9 through signal line 8.
~0 is supplied. The physical address, which is the content of PAR7, is transmitted via signal line 9 to a memory element (not shown) that constitutes physical storage.

第4図は物理記憶の動的割当て方式を実現する
計算機の演算処理装置の一部を示すブロツク構成
図、第5図は、第4図の計算機におけるマイクロ
命令の一部を示す構成図、第9図は、第7図に示
す従来のメモリ制御装置を備え、第4図及び第5
図に示す演算処理装置及びマイクロ命令を備えた
計算機におけるスタツク処理を行うマイクロプロ
グラムを示すフローチヤートである。
FIG. 4 is a block diagram showing a part of the arithmetic processing unit of the computer that implements the dynamic allocation method of physical memory. 9 is equipped with the conventional memory control device shown in FIG.
2 is a flowchart showing a microprogram that performs stack processing in a computer equipped with the arithmetic processing unit and microinstructions shown in the figure.

次に、上記従来のメモリ制御装置を用いて、物
理記憶の動的割当てを行う方法を、スタツクを有
するマイクロプログラム制御の計算機を例にして
説明する。このような計算機の演算処理装置の一
部は、第4図に示すような構成となつているもの
とする。なお、第4図に示す構成で、第7図と同
一の構成要素には同一の番号を付してある。第4
図に示す10はメモリ装置と演算処理装置と演算
処理装置との間でのデータ転送用のレジスタDで
あり、メモリ装置への書込みデータ及びメモリ装
置からの読出しデータは信号線11を介して伝達
される。12はスタツクの最上部の次のアドレス
を指示するレジスタSPであり、「1」だけ増減す
る機能を備えている。13はループ制御に用いら
れるカウンタであるレジスタCであり、「1」だ
け減少する機能及びその内容が「0」であるか否
かを判定する機能を備えている。14はデータ・
バスであり、各信号線15a,15b,15c又
は15dを介して、レジスタD10、レジスタ
SP12、レジスタC13又は定数「0」のいず
れか1つがデータ・バス14に出力される。ま
た、各信号線1,15a,15b又は15cを介
して、データ・バス14の値を論理アドレス・レ
ジスタLAR2、レジスタD10、レジスタSP1
2又はレジスタC13のいずれかへ格納すること
ができる。
Next, a method for dynamically allocating physical storage using the conventional memory control device described above will be explained using a microprogram-controlled computer having a stack as an example. It is assumed that a part of the arithmetic processing unit of such a computer has a configuration as shown in FIG. In the configuration shown in FIG. 4, the same components as in FIG. 7 are given the same numbers. Fourth
10 shown in the figure is a register D for data transfer between the memory device, the arithmetic processing device, and the arithmetic processing device, and data written to the memory device and data read from the memory device are transmitted via a signal line 11. be done. A register SP 12 indicates the next address at the top of the stack, and has the function of increasing or decreasing by "1". A register C 13 is a counter used for loop control, and has a function of decrementing by "1" and a function of determining whether the contents are "0" or not. 14 is data
The register D10, the register
Any one of SP12, register C13, or constant "0" is output to data bus 14. Also, the value of the data bus 14 is transferred to the logical address register LAR2, register D10, register SP1 via each signal line 1, 15a, 15b or 15c.
2 or register C13.

次に、演算処理装置及びメモリ装置を制御する
マイクロ命令の一部は、第5図に示すような構成
となつているものとする。第5図に示す16aは
メモリ装置の制御を行い、読出し(Read)、書込
み(Write)又は無動作(Nop)を指定する。1
6bはデータ・バス14へ出力するレジスタD1
0、レジスタSP12、レジスタC13又は定数
「0」を指定する。16cはデータ・バス14の
値を格納する論理アドレス・レジスタLAR2、
レジスタD10、レジスタSP12又はレジスタ
C13か、いずれのレジスタへも格納しないこと
(Nop)を指定する。16dはレジスタSP12を
「1」だけ増加する(SP++)、「1」だけ減少す
る(SP−−)又は無動作(Nop)を指定する。
16eはレジスタC13を「1」だけ減少する
(C−−)又は無動作(Nop)を指定する。16
fは分岐条件としてレジスタC13の内容が
「0」であること(C=0)、レジスタC13の内
容が「0」でないこと(C≠0)、アドレス変換
テーブルであるATT4の出力の最上位ビツトが
「1」であること(Allocated)、アドレス変換テ
ーブルであるATT4の出力の最上位ビツトが
「0」であること(Not Allocated)、又は無条件
分岐を行うこと(Nop)を指定する。16gは1
6hで指定されたアドレスへの分岐(Jump)又
はマイクロ命令の命令コードごとに定められたア
ドレスへの分岐(Eop)を指定する。なお、分岐
条件不成立の際は、直後のマイクロ命令を実行す
るものとする。また、レジスタC13の内容判定
は同一マイクロ命令においてレジスタC13の更
新指定があつた場合は更新前の値を用いることと
する。また、メモリ装置のアクセスに用いるアド
レスは、同一命令で論理アドレス・レジスタ
LAR2の更新指定があつた場合は、更新前の値
を用いるものとする。また、レジスタSP12の
データ・バス14への出力は、同一命令でレジス
タSP12の更新指定があつた場合は、更新前の
値を用いるものとする。さらに、アドレス変換テ
ーブルであるATT4の出力の最上位ビツト判定
は、メモリ装置へのアクセスを行つた直後のマイ
クロ命令でのみ有効であるとする。
Next, it is assumed that part of the microinstructions that control the arithmetic processing unit and the memory device have a configuration as shown in FIG. 16a shown in FIG. 5 controls the memory device and specifies read, write, or no operation (Nop). 1
6b is a register D1 that outputs to the data bus 14.
0, register SP12, register C13, or constant "0". 16c is a logical address register LAR2 that stores the value of the data bus 14;
Specifies that the data is not stored in register D10, register SP12, or register C13 (Nop). 16d specifies that the register SP12 should be increased by 1 (SP++), decreased by 1 (SP--), or not operated (Nop).
16e specifies that the register C13 is to be decremented by "1" (C--) or to have no operation (Nop). 16
f is a branch condition that the content of register C13 is "0" (C=0), that the content of register C13 is not "0" (C≠0), and the most significant bit of the output of ATT4, which is an address conversion table. is "1" (Allocated), the most significant bit of the output of the address translation table ATT4 is "0" (Not Allocated), or an unconditional branch is to be performed (Nop). 16g is 1
Specifies a branch (Jump) to the address specified by 6h or a branch (Eop) to an address determined for each instruction code of the microinstruction. Note that when the branch condition is not satisfied, the immediately following microinstruction is executed. Furthermore, when determining the contents of the register C13, if an update instruction for the register C13 is given in the same microinstruction, the value before the update is used. In addition, the address used to access the memory device can be set to a logical address register in the same instruction.
If an update of LAR2 is specified, the value before update shall be used. Furthermore, when the register SP12 is specified to be updated by the same instruction, the output of the register SP12 to the data bus 14 uses the value before the update. Furthermore, it is assumed that the determination of the most significant bit of the output of the address translation table ATT4 is valid only for the microinstruction immediately after accessing the memory device.

上記計算機において、PUSHZ nなるマクロ
命令を実行するためのマイクロプログラムのフロ
ーチヤートを第9図に示している。なお、上記の
マイクロ命令は、スタツクに定数「0」を「n」
で指定された数だけプツシユするものとし、説明
を簡単にするために、「n」は1023を超えない正
整数であるものとする。第9図に示す17はマク
ロ命令の読出し及び命令コードのデコード処理を
行う部分であり、上記マクロ命令PUSHZの処理
を行うマイクロプログラム・ルーチン18へ分岐
するとともに、レジスタD10にマクロ命令
PUSHZのオペランド「n」を格納する。マイク
ロプログラム・ルーチン18は各マイクロ命令に
より構成された18a,18b,18c,18
d,18e及び18fから成る。各18a,18
b,18cは前処理であり、各レジスタC13,
D10及び論理アドレス・レジスタLAR2の初
期設定を行う。各18d,18eはループを構成
し、1回の実行により1つ「0」をスタツクへプ
ツシユする。このループの主たる処理は18dで
行つているが、物理記憶の割当ての有無を知るた
めに18eが必要となつている。18fは1だけ
増え過ぎているレジスタSP12の値を修正する
ための後処理を行う。19は物理記憶の割当て処
理を行う部分である。19aでは割当て処理がマ
イクロプログラムで処理可能か否かを判定してお
り、例えば未使用の物理記憶が存在せず不要な物
理記憶の回収や補助記憶へのスワツプ・アウトが
必要な場合は、マイクロプログラムでは処理不能
と判断する。マイクロプログラムで処理可能な場
合は、19bにおいて未使用の物理記憶を獲得
し、アドレス変換テーブルであるATT4の該当
するエントリに獲得した物理記憶のアドレスを書
込み、さらに、該エントリの最上位ビツトを
「1」にセツトする。その後は18dへ復帰する。
マイクロプログラムで処理不能の場合は、マクロ
命令により構成された所定の処理ルーチンへ割出
す処理を19cで行う。その際、所定の処理ルー
チンを実行後に、マクロ命令PUSHZの処理を中
断した時点より継続して行うために、各レジスタ
D10,C13及び論理アドレス・レジスタ
LAR2の保存や、継続すべきマイクロ命令が1
8dであることを記憶しておく必要がある。
FIG. 9 shows a flowchart of a microprogram for executing the macro instruction PUSHZ n in the above computer. Note that the above microinstruction adds the constant "0" to "n" in the stack.
For the sake of simplicity, it is assumed that "n" is a positive integer not exceeding 1023. Reference numeral 17 shown in FIG. 9 is a part that reads macro instructions and decodes instruction codes, and branches to a microprogram routine 18 that processes the macro instruction PUSHZ, and stores the macro instruction in register D10.
Stores the operand "n" of PUSHZ. The microprogram routine 18 consists of microinstructions 18a, 18b, 18c, and 18.
d, 18e and 18f. Each 18a, 18
b, 18c are preprocessing, and each register C13,
Initialize D10 and logical address register LAR2. Each of 18d and 18e constitutes a loop, and each execution pushes one "0" onto the stack. The main processing of this loop is performed by 18d, but 18e is required to know whether physical storage is allocated or not. 18f performs post-processing to correct the value of register SP12 which has increased by one too much. 19 is a part that performs physical storage allocation processing. 19a determines whether the allocation process can be handled by a microprogram. For example, if there is no unused physical memory and it is necessary to retrieve unnecessary physical memory or swap out to auxiliary memory, the microprogram The program determines that it cannot be processed. If it can be processed by the microprogram, an unused physical memory is acquired in 19b, the address of the acquired physical memory is written in the corresponding entry of the address translation table ATT4, and the most significant bit of the entry is written as " 1”. After that, it returns to 18d.
If the microprogram is unable to process the process, 19c performs processing to index the process to a predetermined processing routine configured by macro instructions. At that time, after executing the predetermined processing routine, each register D10, C13 and the logical address register
There is only one microinstruction to save and continue LAR2.
It is necessary to remember that it is 8d.

[発明が解決しようとする問題点] 上記のような従来のメモリ制御装置を用いて、
物理記憶の動的割当てを行う方法において、マク
ロ命令PUSHZの処理については、3つの問題点
が存在する。第1は、第9図に示す18eで行う
物理記憶の割当ての有無の判定が、同図の18d
で行う主たる処理の他の必要であるために、ルー
プが2つのマイクロ命令で構成されることに起因
する処理時間の増大である。第2は、第9図に示
す19bで行う物理記憶の割当て処理の終了後
に、同図の18dへの復帰が必要であるため、多
くのマクロ命令においても出現するであろう物理
記憶の割当て処理の共通化が困難であることであ
る。ここで、強いて共通化を行うとすれば、各マ
イクロ命令における処理接続点への復帰を行うた
めに、レジスタ等の内部状態の保存が必要とな
り、物理記憶の割当て処理の処理時間が増大す
る。第3は、第9図に示す19cで行う割出し処
理において、マクロ命令の処理の中途に存在する
処理継続点への復帰のために、本来マクロ命令の
処理中の作業レジスタである各レジスタD10,
C13及び論理アドレス・レジスタLAR2の保
存が必要なことであり、一般的な割出しや割込み
を実現する機構の複雑化や処理時間の増大を招く
ことになる。このような問題点は、第9図に示す
18dのように物理記憶の割当ての有無が不明な
論理空間へのアクセスを行う度に、必ず同図の1
8eのような判定が必要であることが原因となつ
ている。
[Problems to be solved by the invention] Using the conventional memory control device as described above,
In the method of dynamically allocating physical storage, there are three problems with the processing of the macro instruction PUSHZ. The first is that the determination of the presence or absence of physical storage allocation performed at 18e shown in FIG.
This is an increase in processing time due to the fact that the loop is composed of two microinstructions, which are required in addition to the main processing performed in the microinstruction. Second, after the physical memory allocation process performed at 19b shown in FIG. 9 is completed, it is necessary to return to 18d in the same figure, so the physical memory allocation process will appear in many macro instructions. It is difficult to standardize the information. If commonization is forced, it will be necessary to save the internal state of registers and the like in order to return to the processing connection point for each microinstruction, which will increase the processing time for physical memory allocation processing. Thirdly, in the indexing process performed at 19c shown in FIG. 9, each register D10, which is originally a working register during macro instruction processing, is used to return to the processing continuation point that exists in the middle of macro instruction processing. ,
It is necessary to save C13 and the logical address register LAR2, which complicates the mechanism for realizing general indexing and interrupts and increases processing time. This kind of problem occurs whenever access is made to a logical space for which it is unclear whether or not physical storage has been allocated, such as 18d shown in Figure 9.
This is due to the need for a judgment like 8e.

この発明は、かかる問題点を解決するためにな
されたもので、物理記憶の割当ての有無の判定頻
度を軽減し、主たる処理を高速に実行可能とする
と共に、物理記憶の割当て処理の共通化と簡素化
を可能とするメモリ制御装置を得ることを目的と
する。
This invention was made to solve these problems, and reduces the frequency of determining whether or not physical memory is to be allocated, making it possible to execute main processing at high speed, and making it possible to standardize the process of allocating physical memory. The object is to obtain a memory control device that can be simplified.

[問題点を解決するための手段] この発明に係わるメモリ制御装置は、スタツク
のように連続した論理記憶空間を順次に消費する
記憶領域に対し、当該記憶領域に対して正常に物
理記憶が割当てられている通常論理領域の他に、
余分に物理記憶が割当てられている超過論理領域
とを付加し、この超過論理領域に対するアクセス
の結果を保証すると同時に、超過論理領域に対す
るアクセスが生じたことを記憶する機構を備えた
ものである。
[Means for Solving the Problems] The memory control device according to the present invention is capable of correctly allocating physical storage to a storage area that sequentially consumes continuous logical storage space, such as a stack. In addition to the normal logical area that is
An excess logical area to which extra physical storage is allocated is added, and a mechanism is provided to guarantee the result of access to this excess logical area and at the same time to store the fact that an access to the excess logical area has occurred.

[作用] この発明のメモリ制御装置においては、物理記
憶の動的割当ては、超過論理領域へのアクセスを
認知することにより行われるが、超過論理領域内
のアクセスが保証されていることと、超過論理領
域へのアクセスが生じたことが記憶されるため、
超過論理領域の大きさを超えないような量の連続
した論理記憶空間の消費に関しては、超過論理領
域へのアクセスの判定を、すべてのアクセス終了
後にただ一度だけ行えば十分である。
[Operation] In the memory control device of the present invention, dynamic allocation of physical storage is performed by recognizing access to the excess logical area. Since the access to the logical area is remembered,
For consumption of contiguous logical storage space in an amount that does not exceed the size of the excess logical area, it is sufficient to determine access to the excess logical area only once after all accesses have been completed.

[実施例] 第1図はこの発明の一実施例であるメモリ制御
装置を示すブロツク構成図、第2図は、第1図の
メモリ制御装置内のアドレス変換テーブルの1エ
ントリを示す構成図である。説明を簡単にするた
めに、上記第7図に示す従来のメモリ制御装置の
例と同様の仮定を用いており、この仮定は何ら本
質的なものではなく、したがつて、この発明の適
用例を限定するものでないことは云うまでもな
い。また、上記第7図に示す従来のメモリ制御装
置のものと同一符号は同一構成要素であるので、
その詳細な説明は省略する。第1図に示す20
は、第7図に示すATT4と同様にアドレス変換
テーブルのATTであるが、その各エントリは第
2図に示すように3つの部分から構成されてい
る。第2図に示す各フラグ20b及びフイールド
20cは、上記第8図のフラグ4a及びフイール
ド4bにそれぞれ相当し、その意味及び他の構成
要素との関係は第8図と同様である。第2図に示
す20aは超過論理領域であるか否かを示す1ビ
ツトのフラグであり、その値が「0」であれば通
常論理領域であることを、「1」であれば超過論
理領域であることをそれぞれ示す。なお、このフ
ラグ20aはフラグ20bが「1」である時、す
なわち物理記憶が割当てられている場合にのみ有
意である。また、フラグ20aは信号線21を介
してフリツプ・フロツプ22への端子Sへ伝達さ
れる。フリツプ・フロツプ22はSRフリツプ・
フロツプ又はそれと同様な機能を有するものであ
り、その各S及びR端子が共に「0」であれば状
態を保持し、S端子が「1」であれば状態を
「1」に、R端子が「1」であれば状態を「0」
にそれぞれ変更する。フリツプ・フロツプ22の
R端子へは信号線23を介して演算処理装置(図
示しない)などからリセツト信号が供給され、フ
リツプ・フロツプ22の状態はQ端子より信号線
24を介して演算処理装置などへ伝達される。
[Embodiment] FIG. 1 is a block configuration diagram showing a memory control device according to an embodiment of the present invention, and FIG. 2 is a configuration diagram showing one entry of an address translation table in the memory control device shown in FIG. be. In order to simplify the explanation, an assumption similar to the example of the conventional memory control device shown in FIG. 7 above is used, and this assumption is not essential in any way. Needless to say, it is not intended to limit. Also, since the same reference numerals as in the conventional memory control device shown in FIG. 7 are the same components,
A detailed explanation thereof will be omitted. 20 shown in Figure 1
is an ATT of the address translation table like ATT4 shown in FIG. 7, but each entry thereof is composed of three parts as shown in FIG. Each flag 20b and field 20c shown in FIG. 2 correspond to the flag 4a and field 4b shown in FIG. 8, respectively, and their meanings and relationships with other components are the same as in FIG. 8. 20a shown in Fig. 2 is a 1-bit flag indicating whether or not the area is an excess logical area. , respectively. Note that this flag 20a is significant only when the flag 20b is "1", that is, when physical storage is allocated. The flag 20a is also transmitted to the terminal S to the flip-flop 22 via the signal line 21. Flip-flop 22 is an SR flip-flop.
It is a flop or something with a similar function, and if the S and R terminals are both "0", it holds the state, and if the S terminal is "1", the state is set to "1", and the R terminal changes the state to "1". If it is “1”, the status is “0”
Change each to A reset signal is supplied to the R terminal of the flip-flop 22 from an arithmetic processing unit (not shown) via a signal line 23, and the state of the flip-flop 22 is supplied to the R terminal of the flip-flop 22 via a signal line 24 from an arithmetic processing unit, etc. transmitted to.

次に、この発明に係わるメモリ制御装置を用い
て、物理記憶の動的割当てを行う方法を、上記従
来例と同様にスタツクを有するマイクロプログラ
ム制御の計算機を例にして説明する。本例におい
て、スタツクに対応する論理記憶領域は第3図に
示す構成になつている。すなわち、第3図に示す
スタツク25の最左端がスタツク・ボトムに対応
し、スタツク25の伸長は左から右へ行われる。
なお、アドレスは左から右へ増加するものとす
る。スタツク25のボトム側の領域25aは通常
論理領域であり、スタツク25の最上部を指示す
るレジスタSP12は通常論理領域25a内のい
ずれかを指示している。超過論理領域25bは、
スタツク25の伸長方向にしたがつて通常論理領
域25aの直後に配置されている。このような構
成は、この発明に係わるメモリ制御装置における
アドレス変換テーブルであるATT20、すなわ
ち第1図に示すATT20において連続したエン
トリをスタツク25の論理記憶領域に対応させ、
その末尾の1ないし複数エントリの最上位ビツ
ト、すなわち、第2図に示すフラグ20aを
「1」とすることにより実現できる。
Next, a method for dynamically allocating physical storage using the memory control device according to the present invention will be explained using a microprogram-controlled computer having a stack as in the prior art example. In this example, the logical storage area corresponding to the stack has the configuration shown in FIG. That is, the leftmost end of the stack 25 shown in FIG. 3 corresponds to the stack bottom, and the stack 25 is expanded from left to right.
Note that the addresses increase from left to right. The area 25a on the bottom side of the stack 25 is a normal logic area, and the register SP12 pointing to the top of the stack 25 points to one of the areas within the normal logic area 25a. The excess logical area 25b is
According to the direction in which the stack 25 extends, it is usually placed immediately after the logical area 25a. Such a configuration makes consecutive entries in the address translation table ATT20 in the memory control device according to the present invention, that is, the ATT20 shown in FIG. 1, correspond to the logical storage area of the stack 25,
This can be realized by setting the most significant bit of one or more entries at the end, that is, the flag 20a shown in FIG. 2, to "1".

次に、本例の計算機における演算処理装置の一
部及びマイクロ命令は、上記従来例と同様に第4
図及び第5図にそれぞれ示したものである。ただ
し、第5図の16fにおけるAllocated及びNot
Allocatedは、従来例においては、第7図に示す
信号線5の値によるものであつたが、本例におい
ては、第1図の信号線24が「0」であれば
Allocated,「1」であればNot Allocatedとそれ
ぞれ定める。なお、演算処理装置やマイクロ命令
はこの発明とは直接の関係はなく、本例によつて
この発明の適用が限定されるものではない。
Next, a part of the arithmetic processing unit and microinstructions in the computer of this example are stored in the fourth
These are shown in FIG. 5 and FIG. 5, respectively. However, Allocated and Not in 16f of Figure 5
In the conventional example, Allocated was determined by the value of the signal line 5 shown in FIG. 7, but in this example, if the signal line 24 in FIG.
Allocated, and if it is "1", it is defined as Not Allocated. Note that the arithmetic processing unit and microinstructions are not directly related to the present invention, and the application of the present invention is not limited to this example.

次に、前述のマクロ命令PUSHZを実行するた
めのマイクロプログラムのフローチヤートを第6
図に示している。第6図の示す部分26は、上記
第9図に示す部分17と同様であるが、マクロ命
令の命令コードによる分岐の際、超過論理領域2
5bへのアクセスの有無を判定し、アクセス事象
を記憶していない時にのみ、命令コードに対応し
たマイクロプログラム・ルーチン27へ分岐す
る。このマイクロプログラム・ルーチン27はマ
クロ命令PUSHZの処理を行うもので、第9図に
示すマイクロプログラム・ルーチン18より18
eが除去されたものと同様である。すなわち、第
6図に示す27a,27b,27c,27d及び
27eは、第9図に示す18a,18b,18
c,18d及び18fと同様である。マクロ命令
PUSHZの処理途中で超過論理領域25bへのア
クセスが行われた場合に、処理終了後に次のマク
ロ命令を26においてデコードする時点で、超過
論理領域25bへのアクセスが発生したことが認
知され、物理記憶の割当て処理を行う部分28へ
分岐する。なお、この場合に、マクロ命令
PUSHZにおけるスタツク25の伸長は1023ワー
ド以下であり、超過論理領域25bは1024ワード
ないしその整数倍の容量があるので、マクロ命令
PUSHZの処理結果は完全に保証される。第6図
に示す28aの判定条件は、第9図に示す19a
と同様である。また、第6図に示す28bでは未
使用の物理記憶を1024ワード単位で1単位ないし
複数単位獲得する。この獲得した物理記憶領域を
スタツクに対応する論理記憶領域に割当てる方法
は2通りある。第1の方法は、超過論理領域25
bに対応するアドレス変換テーブルであるATT
20のエントリの最上位ビツト、すなわち、第2
図のフラグ20aのみを「0」に変更し、引続く
1ないし複数エントリの各ビツト11、10及び9〜
0、すなわち、第2図に示すフラグ20a,20
b及びフイールド20cを「1」,「1」、及び獲
得した物理記憶のアドレスにそれぞれ変更する方
法である。第2の方法は、超過論理領域25bに
対応している物理記憶の内容を獲得した物理記憶
へ複写し、超過論理領域25bに対応するアドレ
ス変換テーブルであるATT20のエントリの各
ビツト11及び9〜0、すなわち、第2図に示すフ
ラグ20a及びフイールド20cを「0」、及び
獲得した物理記憶のアドレスに変更し、引続く1
ないし複数エントリの各ビツト11,10及び9〜
0、すなわち、第2図に示すフラグ20a,20
b及びフイールド20cを「1」,「1」、及び超
過論理領域25bに対応していた物理記憶のアド
レスにそれぞれ変更する方法である。いずれの方
法についても、この発明において適用可能であ
る。物理記憶の割当て終了後に、第1図に示すフ
リツプ・フロツプ22をリセツトし、再び命令フ
エツチ及びデコードを実行する。第6図に示す2
8cにおいては、マクロ命令PUSHZの次に実行
しようとしていた命令のアドレスなど複数のマク
ロ命令間を伝達する情報のみを保存し、所定の処
理ルーチンへ割出す。その際、第1図に示すフリ
ツプ・フロツプ22をリセツトする。
Next, the flowchart of the microprogram for executing the macro instruction PUSHZ mentioned above is shown in the sixth section.
Shown in the figure. The portion 26 shown in FIG. 6 is similar to the portion 17 shown in FIG.
5b is accessed, and only when the access event is not stored, branches to the microprogram routine 27 corresponding to the instruction code. This microprogram routine 27 processes the macro instruction PUSHZ, and the microprogram routines 18 to 18 shown in FIG.
This is the same as with e removed. That is, 27a, 27b, 27c, 27d and 27e shown in FIG. 6 are the same as 18a, 18b, 18 shown in FIG.
c, 18d and 18f. macro instructions
If the excess logical area 25b is accessed during PUSHZ processing, when the next macro instruction is decoded in 26 after the processing is completed, the occurrence of the access to the excess logical area 25b is recognized and the physical The process branches to a part 28 that performs storage allocation processing. In this case, the macro instruction
The expansion of the stack 25 in PUSHZ is 1023 words or less, and the excess logical area 25b has a capacity of 1024 words or an integral multiple thereof, so the macro instruction
PUSHZ processing results are completely guaranteed. The judgment conditions for 28a shown in FIG. 6 are as follows for 19a shown in FIG.
It is similar to Further, in 28b shown in FIG. 6, unused physical memory is acquired in units of one or more units of 1024 words. There are two methods of allocating this acquired physical storage area to the logical storage area corresponding to the stack. The first method is to
ATT, which is the address translation table corresponding to b
The most significant bit of the 20 entries, i.e. the second
Only the flag 20a in the figure is changed to "0", and each bit 11, 10, and 9 to 1 of the following one or more entries is changed to "0".
0, that is, the flags 20a, 20 shown in FIG.
This is a method of changing the fields 20c and 20c to "1", "1", and the acquired physical storage address, respectively. The second method is to copy the contents of the physical memory corresponding to the excess logical area 25b to the acquired physical memory, and copy each bit 11 and 9 to 9 of the entry of the ATT20 which is the address translation table corresponding to the excess logical area 25b. 0, that is, change the flag 20a and field 20c shown in FIG. 2 to "0" and the acquired physical memory address, and then
or bits 11, 10, and 9 of multiple entries
0, that is, the flags 20a, 20 shown in FIG.
In this method, the fields 20c and 20c are respectively changed to "1", "1", and the physical storage address corresponding to the excess logical area 25b. Any method is applicable to this invention. After the physical memory allocation is completed, the flip-flop 22 shown in FIG. 1 is reset, and instruction fetching and decoding are executed again. 2 shown in Figure 6
In step 8c, only information transmitted between a plurality of macro instructions, such as the address of the instruction to be executed next to the macro instruction PUSHZ, is saved and indexed to a predetermined processing routine. At this time, the flip-flop 22 shown in FIG. 1 is reset.

以上述べたように、本例においては上記従来例
に比べて、マクロ命令PUSHZの処理ルーチン内
のループが単一のマイクロ命令で構成されるため
に処理時間が短縮される。また、物理記憶の割当
てがマクロ命令処理の実行後に行われるため、処
理ルーチンの共通化が容易であり、割出し処理に
おいても一般の割出しや割込みと同様の情報のみ
を保存すれば良い。
As described above, in this example, compared to the conventional example, the loop in the processing routine of the macro instruction PUSHZ is composed of a single microinstruction, so that the processing time is reduced. In addition, since physical memory allocation is performed after execution of macro instruction processing, it is easy to standardize processing routines, and even in indexing processing, only the same information as in general indexing and interrupts needs to be saved.

なお、上記実施例においては、スタツク25へ
の複数ワードのプツシユを説明したが、単一ワー
ドのブツシユにおいても条件判定を除去できるこ
とにより、処理時間が短縮される場合があること
は明らかである。
In the above embodiment, the pushing of a plurality of words onto the stack 25 has been described, but it is clear that the processing time can be shortened by eliminating conditional determination even when pushing a single word.

また、上記実施例においては、スタツク25を
例にして説明したが、このスタツク25と同様に
連続的に順次に論理記憶空間を消費するような記
憶領域、例えばヒープなどにも適用できることは
明らかである。
Further, although the above embodiment has been explained using the stack 25 as an example, it is obvious that the application can also be applied to a storage area that consumes logical storage space in a continuous and sequential manner, such as a heap, in the same way as the stack 25. be.

また、上記実施例においては、1つのマクロ命
令の実行完了後に超過論理領域25bへのアクセ
スの有無を判定しているが、何らかの理由によ
り、その処理途中で当該判定を行うマクロ命令の
存在を否定するものではない。さらに、マクロ命
令なる概念が存在しないような計算機において
も、超過論理領域25bへのアクセスの有無の判
定を適宜に挿入することにより、この発明を適用
できることは云うまでもない。
Furthermore, in the above embodiment, the presence or absence of access to the excess logical area 25b is determined after the execution of one macro instruction is completed, but for some reason, the existence of a macro instruction that performs this determination during the processing is denied. It's not something you do. Furthermore, it goes without saying that the present invention can be applied even to a computer that does not have the concept of a macro instruction by appropriately inserting a determination as to whether or not to access the excess logic area 25b.

[発明の効果] この発明は以上説明したように、メモリ制御装
置において、連続的に順次に論理記憶空間を消費
するスタツクようの記憶領域に対し、超過論理領
域を付加し、この超過論理領域内へのアクセスを
保証すると共に、超過論理領域内へのアクセスの
有無を記憶するように構成したので、物理記憶の
割当ての有無の判定頻度を軽減し、主たる処理の
処理時間を増大することなく、物理記憶の動的な
割当て処理を高速に、かつ容易に実現することが
できるという優れた効果を奏するものである。
[Effects of the Invention] As explained above, in a memory control device, the present invention adds an excess logical area to a storage area such as a stack that sequentially consumes logical storage space, and stores data within this excess logical area. Since the configuration is configured to guarantee access to the area and to remember whether or not there is an access to the excess logical area, the frequency of determining whether or not physical storage is allocated can be reduced, and the processing time of the main process can be reduced without increasing the processing time. This provides an excellent effect in that dynamic physical storage allocation processing can be realized quickly and easily.

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

第1図はこの発明の一実施例であるメモリ制御
装置を示すブロツク構成図、第2図は、第1図の
メモリ制御装置内のアドレス変換テーブルの1エ
ントリを示す構成図、第3図は、第1図のメモリ
制御装置におけるスタツクに対応する論理記憶領
域を示す構成図、第4図は物理記憶の動的割当て
方式を実現する計算機の演算処理装置の一部を示
すブロツク構成図、第5図は、第4図の計算機に
おけるマイクロ命令の一部を示す構成図、第6図
は、第4図の計算機におけるスタツク処理を行う
マイクロプログラムを示すフローチヤート、第7
図は従来のメモリ制御装置を示すブロツク構成
図、第8図は、第7図のメモリ制御装置内のアド
レス変換テーブルの1エントリを示す構成図、第
9図は、第7図に示す従来のメモリ制御装置を備
え、第4図及び第5図に示す演算処理装置及びマ
イクロ命令を備えた計算機におけるスタツク処理
を行うマイクロプログラムを示すフローチヤート
である。 図において、1,3,5,6,8,9,11,
15a〜15d,21,23,24……信号線、
2……論理アドレス・レジスタ(LAR)、7……
物理アドレス・レジスタ(PAR)、10……レジ
スタ(D)、12……レジスタSP、13……レジス
タ(C)、20……アドレス変換テーブル(ATT)、
20a,20b……フラグ、20c……フイール
ド、22……フリツプ・フロツプ、25……スタ
ツク、25a……通常論理領域、25b……超過
論理領域、27……マイクロプログラム・ルーチ
ンである。なお、各図中、同一符号は同一、また
は相当部分を示す。
FIG. 1 is a block configuration diagram showing a memory control device as an embodiment of the present invention, FIG. 2 is a configuration diagram showing one entry of an address translation table in the memory control device of FIG. 1, and FIG. , FIG. 4 is a block diagram showing a part of the arithmetic processing unit of a computer that implements the dynamic allocation method of physical storage, and FIG. 5 is a block diagram showing part of the microinstructions in the computer shown in FIG. 4, FIG. 6 is a flowchart showing a microprogram for performing stack processing in the computer shown in FIG. 4, and FIG.
8 is a block configuration diagram showing a conventional memory control device, FIG. 8 is a configuration diagram showing one entry of the address translation table in the memory control device shown in FIG. 7, and FIG. 9 is a block diagram showing a conventional memory control device shown in FIG. 6 is a flowchart showing a microprogram for performing stack processing in a computer equipped with a memory control device and equipped with the arithmetic processing unit and microinstructions shown in FIGS. 4 and 5. FIG. In the figure, 1, 3, 5, 6, 8, 9, 11,
15a to 15d, 21, 23, 24...signal lines,
2...Logical address register (LAR), 7...
Physical address register (PAR), 10...Register (D), 12...Register SP, 13...Register (C), 20...Address translation table (ATT),
20a, 20b...Flag, 20c...Field, 22...Flip-flop, 25...Stack, 25a...Normal logic area, 25b...Excess logic area, 27...Microprogram routine. In each figure, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] 1 連続した論理記憶空間を順次に消費するよう
なスタツクようの記憶領域を単数ないし複数有
し、前記記憶領域に対応する物理記憶を必要に応
じて割当てる方式を有するメモリ装置において、
前記記憶領域の各々について、正常に物理記憶が
割当てられている記憶領域の通常論理領域と、余
分に物理記憶が割当てられている記憶領域の超過
論理領域とを有し、この超過論理領域を前記論理
記憶空間の消費方向にしたがつて前記通常論理領
域の直後に配置し、機械命令の実行中に行われる
前記通常論理領域と前記超過論理領域へのアクセ
スを判別する判別機構と、前記超過論理領域への
アクセスが発生したことを記憶することができる
記憶機構を備え、前記超過論理領域へのアクセス
が発生した際にも命令の実行を中断せず、機械命
令の実行完了後に前記記憶機構によつて超過論理
領域へのアクセスが発生したことを判定した後
に、物理記憶の割当て処理を行うことを特徴とす
るメモリ制御装置。
1. A memory device having one or more stack-like storage areas that sequentially consume continuous logical storage space, and having a method of allocating physical storage corresponding to the storage areas as necessary,
Each of the storage areas has a normal logical area of the storage area to which physical storage is normally allocated, and an excess logical area of the storage area to which extra physical storage is allocated, and this excess logical area is a discrimination mechanism disposed immediately after the normal logical area according to the consumption direction of logical storage space, and for discriminating access to the normal logical area and the excess logical area during execution of a machine instruction, and the excess logic; A storage mechanism capable of storing the occurrence of an access to the area is provided, and the execution of the instruction is not interrupted even when an access to the excess logical area occurs, and the memory is stored in the storage mechanism after the execution of the machine instruction is completed. A memory control device characterized by performing physical storage allocation processing after determining that an access to an excess logical area has occurred.
JP60279123A 1985-12-13 1985-12-13 Memory controller Granted JPS62139058A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60279123A JPS62139058A (en) 1985-12-13 1985-12-13 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60279123A JPS62139058A (en) 1985-12-13 1985-12-13 Memory controller

Publications (2)

Publication Number Publication Date
JPS62139058A JPS62139058A (en) 1987-06-22
JPH0255813B2 true JPH0255813B2 (en) 1990-11-28

Family

ID=17606748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60279123A Granted JPS62139058A (en) 1985-12-13 1985-12-13 Memory controller

Country Status (1)

Country Link
JP (1) JPS62139058A (en)

Also Published As

Publication number Publication date
JPS62139058A (en) 1987-06-22

Similar Documents

Publication Publication Date Title
US5499380A (en) Data processor and read control circuit, write control circuit therefor
US4648034A (en) Busy signal interface between master and slave processors in a computer system
US4839797A (en) Microprocessor compatible with any software represented by different types of instruction formats
EP0248436B1 (en) Method of and apparatus for processing data
US20030226001A1 (en) Data processing system having multiple register contexts and method therefor
US4454580A (en) Program call method and call instruction execution apparatus
JPH0248931B2 (en)
KR100385495B1 (en) Processing system with word alignment branch target
US5125095A (en) System using microprocessor address lines for coprocessor selection within a multi-coprocessor apparatus
US5696957A (en) Integrated circuit comprising a central processing unit for executing a plurality of programs
KR100314484B1 (en) Information processor
US4047245A (en) Indirect memory addressing
US5642523A (en) Microprocessor with variable size register windowing
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
US5491826A (en) Microprocessor having register bank and using a general purpose register as a stack pointer
CA1119307A (en) Microcomputer having separate bit and word accumulators and separate bit and word instruction sets
EP0461631B1 (en) Data storing device having a plurality of registers allotted for one address
JPH0255813B2 (en)
US4408271A (en) Circuit for implementing a digital computer instruction
US20040205701A1 (en) Computer system, virtual machine, runtime representation of object, storage media and program transmission apparatus
US5649229A (en) Pipeline data processor with arithmetic/logic unit capable of performing different kinds of calculations in a pipeline stage
EP0108647A2 (en) Data processing apparatus
EP0114683A2 (en) Arithmetic unit
JPH09505428A (en) Microcontroller with page address mode
KR0164150B1 (en) Exception processing routine deciding method for cisc type microprocessor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term