JPS62242239A - Data transfer system - Google Patents

Data transfer system

Info

Publication number
JPS62242239A
JPS62242239A JP61085465A JP8546586A JPS62242239A JP S62242239 A JPS62242239 A JP S62242239A JP 61085465 A JP61085465 A JP 61085465A JP 8546586 A JP8546586 A JP 8546586A JP S62242239 A JPS62242239 A JP S62242239A
Authority
JP
Japan
Prior art keywords
stack
logical
physical
block
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.)
Pending
Application number
JP61085465A
Other languages
Japanese (ja)
Inventor
Hideo Miyake
英雄 三宅
Akio Shinagawa
明雄 品川
Masanobu Yuhara
雅信 湯原
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61085465A priority Critical patent/JPS62242239A/en
Publication of JPS62242239A publication Critical patent/JPS62242239A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten time for transfer at the time of swap-out at the time of transferring data from physical stack to logical stack by transferring only data of entry for which data are rewritten out of physical stack entry to logical stack. CONSTITUTION:A change flag memory 2 that indicates whether data are rewritten or not is provided corresponding to each entry of physical stack 1. A transfer circuit 5 transfers data of one block or less of logical stack at the time of transfer from the logical stack on a main memory 6 to the physical stack 1, that is, swap-in. At the time of transfer from the physical stack 1 to logical stack, that is, swap-out, only stack entry rewritten by information of entry of the change flag memory 2 out of data of one block or less of the physical stack are written in corresponding logical stack entry on the main memory 6. Thus, time for data transfer from the physical stack to logical stack can be shortened.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術 (第9図) 発明が解決しようとする問題点 問題点を解決するための手段 (第1図)作用 実施例 (第2図〜第8図) 発明の効果 〔)既要〕 本発明は仮想スタック制御を行うデータ処理システムに
おいて、物理スタックから論理スタックにデータを転送
するとき、物理スタックエントリ中、データが書き換え
られたエントリのみ論理スタックにデータ転送すること
により、スワップ・アウト時の転送時間を短縮したもの
である。
[Detailed description of the invention] [Table of contents] Overview Industrial field of application Prior art (Figure 9) Problems to be solved by the invention Means for solving the problems (Figure 1) Working examples (Figure 1) (Figures 2 to 8) Effects of the Invention [) Already Required] The present invention provides a data processing system that performs virtual stack control, when data is transferred from a physical stack to a logical stack, when data is rewritten during physical stack entry. By transferring data only for entries to the logical stack, the transfer time during swap-out is shortened.

〔産業上の利用分野〕[Industrial application field]

本発明はデータ転送方式に係り、特に中央処理装置CP
U、メモリ制御装置M SCおよび主記憶装置MSU等
によって構成されるデータ処理システムにおいて、中央
処理装置のハードウェア・スタック(物理スタック)と
、主記憶装置上の論理スタックにより仮想スタック制御
を行う際の、物理スタックと論理スタック間のデータ転
送方式に関するものである。
The present invention relates to a data transfer system, and particularly to a central processing unit CP.
U, memory control unit M In a data processing system composed of SC, main storage unit MSU, etc., when performing virtual stack control using the hardware stack (physical stack) of the central processing unit and the logical stack on the main storage unit. This relates to a data transfer method between a physical stack and a logical stack.

〔従来の技術〕[Conventional technology]

仮想スタック方式では、第9図に示す如く、主記憶装置
上に論理スタックを設け、中央処理装置内にハードウェ
ア・スタックつまり物理スタックを設け、データ処理に
際してはこの物理スタック上のデータを使用し、物理ス
タック上に必要なスタックが存在しないとき、この物理
スタック上のデータを論理スタックに戻し、論理スタッ
クから必要なデータを物理スタック上に移動させる。な
お第9図の例は、説明の簡略化のため物理スタックのブ
ロック数が1の場合であるが、通常物理スタックは複数
のブロックにより構成されている。
In the virtual stack method, as shown in Figure 9, a logical stack is provided on the main storage device, a hardware stack, that is, a physical stack is provided in the central processing unit, and data on this physical stack is used during data processing. , When the required stack does not exist on the physical stack, the data on this physical stack is returned to the logical stack, and the necessary data is moved from the logical stack onto the physical stack. Note that although the example in FIG. 9 is a case in which the number of blocks in the physical stack is one to simplify the explanation, the physical stack is usually configured with a plurality of blocks.

そして論理スタックは、全て同じ大きさのブロックにn
分割され(一般にn=2””)、また論理スタックの1
ブロックの大きさは物理スタックの1ブロックと等しい
And the logical stack is divided into blocks of the same size.
(generally n=2"") and one of the logical stacks
The size of the block is equal to one block of the physical stack.

論理スタック領域は論理スタックの先頭である0番地か
らブロックnの最大アドレスmaxまでが使用され、こ
のうち論理スタックの有効データはO番地からスタック
・トップ・ポインタの指示するエントリまでであって、
領域としてはブロック0−n−2とブロックn、 −1
の領域A(スタック・トップを含むブロックの先頭エン
トリからスタック・トップ・ポインタの指すエントリま
で)である。また前記論理スタ・ツク領域のうち、ブロ
ックn−1の領域B(スタック・トップ・ポインタ+1
の指示するエントリからスタック・トップを含むブロン
ク内最大アドレスを持つエントリまで)とブロックnは
無効なデータ領域である。
The logical stack area is used from address 0, which is the head of the logical stack, to the maximum address max of block n, and the valid data of the logical stack is from address O to the entry pointed to by the stack top pointer,
The areas are block 0-n-2 and block n, -1
area A (from the first entry of the block containing the stack top to the entry pointed to by the stack top pointer). Furthermore, in the logical stack area, area B (stack top pointer +1
(from the entry indicated by n to the entry with the highest address in the block including the top of the stack) and block n are invalid data areas.

したがって論理スタックと物理反タック間を1ブロック
単位で転送を行う必要のある領域は、ブロックO−n 
−2とブロックn−1の領域Aである。
Therefore, the area where it is necessary to transfer between the logical stack and the physical anti-tack in block units is the block O-n
-2 and area A of block n-1.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来では、ブロック0〜n−2は論理スタックと物理ス
タックとの間を1ブロック単位で転送し、ブロックn−
1については前記スタック間を領域へのみ転送していた
Conventionally, blocks 0 to n-2 are transferred between the logical stack and the physical stack in block units;
Regarding No. 1, the transfer between the stacks was performed only to the area.

ところで、この領域へのうち物理スタックにおいて書き
換えられていないデータは論理スタック上に存在してい
るので転送する必要性が存在しないにもかかわらず、書
き換えられたものも書き換えられないものも前記領域A
のデータを全部物理スタックから論理スタックに転送し
ていたため、このデータの転送時間が長くなるという問
題点があった。
Incidentally, although there is no need to transfer data to this area that has not been rewritten in the physical stack because it exists on the logical stack, both the rewritten and unrewritten data are in the area A.
Since all of the data was transferred from the physical stack to the logical stack, there was a problem in that it took a long time to transfer this data.

本発明の目的は、前記問題点を解決するため、このよう
に物理スタックから論理スタックにデータを転送すると
きの転送時間を短縮したデータ転送方式を提供するもの
である。
An object of the present invention is to provide a data transfer method that reduces the transfer time when transferring data from a physical stack to a logical stack in this way, in order to solve the above-mentioned problems.

〔問題点を解決するための手段〕[Means for solving problems]

前記の目的を達成するため、本発明では、第1図に示す
如く、物理スタ・ツク(STK)1の各エントリ対応に
データが書き換えられたか否かを示すチェンジ・フラグ
・メモリ (CFLAG)2を設け、論理スタック・ポ
インタ(PTR)がセットされるレジスタ3と論理スタ
ック・トップ・ポインタ(STP)がセットされるレジ
スタ4と物理スタック(STK)1と主記憶6上の論理
スタックとの間のデータ転送を行う転送回路5と、主記
憶6をアドレスするアドレス・レジスタ7を設ける。
In order to achieve the above object, in the present invention, as shown in FIG. between the register 3 where the logical stack pointer (PTR) is set, the register 4 where the logical stack top pointer (STP) is set, the physical stack (STK) 1 and the logical stack on the main memory 6. A transfer circuit 5 for transferring data, and an address register 7 for addressing the main memory 6 are provided.

転送回路5は主記憶6上の論理スタックから物理スタッ
ク1への転送すなわちスワップ・イン(SWap  i
n)のとき、論理スタックの1ブロックもしくはそれ以
下のデータ量を転送し、物理スタックlから論理スタッ
クへの転送すなわちスワップ・アウト(SWap  o
ut)のとき、物理スタックの1ブロックもしくはそれ
以下のデータの内、前記チェンジ・フラグ・メモリ2の
エントリの情報により書き換えられたスタック・エント
リのみ主記憶6上の対応する論理スタック・エントリに
書込む。
The transfer circuit 5 performs transfer from the logical stack on the main memory 6 to the physical stack 1, that is, swap-in (SWap i
n), the data amount of one block or less of the logical stack is transferred, and the data is transferred from the physical stack l to the logical stack, that is, swap out (SWap o
ut), among the data in one block or less of the physical stack, only the stack entry that has been rewritten by the information in the entry in the change flag memory 2 is written to the corresponding logical stack entry in the main memory 6. It's crowded.

〔作用〕[Effect]

チェンジ・フラグにより物理スタック1における書き換
えられたエントリを識別できるので、この書き換えられ
たエントリのみ物理スタック1から論理スタックに転送
できるので、物理スタックから論理スタックへのデータ
転送時間を短縮できる。
Since a rewritten entry in the physical stack 1 can be identified by the change flag, only this rewritten entry can be transferred from the physical stack 1 to the logical stack, thereby reducing the data transfer time from the physical stack to the logical stack.

〔実施例〕〔Example〕

本発明の一実施例を第2図〜第8図にもとづき説明する
An embodiment of the present invention will be described based on FIGS. 2 to 8.

第2図は本発明の一実施例構成図、第3図は1ブロック
で仮想スタック制御を行うための回路説明図、第4図は
制御部の動作説明図、第5図はスタックが伸びたときの
説明図、第6図はスタックが縮むときの説明図、第7図
はNoTFOUNDP発生時の動作説明図、第8図はN
oTFOUNDS発生時の動作説明図である。
Fig. 2 is a configuration diagram of an embodiment of the present invention, Fig. 3 is an explanatory diagram of a circuit for performing virtual stack control in one block, Fig. 4 is an explanatory diagram of the operation of the control section, and Fig. 5 is an illustration of the stack extended. FIG. 6 is an explanatory diagram when the stack shrinks. FIG. 7 is an explanatory diagram of the operation when NoTFOUNDP occurs. FIG. 8 is an explanatory diagram when the stack shrinks.
FIG. 3 is an explanatory diagram of the operation when oTFOUNDS occurs.

第2図において第1図と同符号部は同一部分を示すもの
であり、同図において物理スタック数はlである。
In FIG. 2, the same reference numerals as in FIG. 1 indicate the same parts, and the number of physical stacks in the figure is l.

図中、1は仮想スタック制御機能を持つ物理スタックで
、レジスタ3に保持される論理スタック・ポインタ及び
レジスタ4に保持される論理スタック・トップ・ポイン
タによりアドレスされたスタック・エントリがあればデ
ータ・レジスタ8に出力され、ない場合にはN0TFO
UND信号を出力するもの、2はチェンジ・フラグ・メ
モリで対応するスタック・エントリが書き換えられてい
ない場合「0」、書き換えられた場合「1」のいずれか
のフラグを保持するものである。
In the figure, 1 is a physical stack with a virtual stack control function, and if there is a stack entry addressed by the logical stack pointer held in register 3 and the logical stack top pointer held in register 4, data will be stored. Output to register 8, if not, N0TFO
The change flag memory 2 outputs the UND signal and holds a flag that is either "0" if the corresponding stack entry has not been rewritten, or "1" if it has been rewritten.

転送部5は、論理スタック・ブロック番号(第9図にお
ける1〜n)を保持するレジスタ(BLK)9、論理ス
タック・ブロック内アドレスを指示するカウント・レジ
スタ(COUNT)10であってカウンタのオーバーフ
ローのときCARRY信号を出力するものと、前記レジ
スタ4に保持された論理スタック・トップ・ポインタと
、前記(BLK/C0UNT)(ここで1”はレジスタ
の連結を示す〕の値を比較する比較器11でSTP< 
(BLK/C0UNT)のときSTOP信号を出力する
ものと、スワップ・インまたはスワップ・アウトのとき
のデータ転送を総合的に制御する制御回路12と、主記
憶6上の論理スタックの先頭アドレス(STKBASE
)を保持するレジスタ13と、前記レジスタ13に保持
された論理スタックの先頭アドレス(STKBASE)
と前記(BLK/C0UNT)を加算して主記憶6上の
論理スタック・アドレス(STKADD)を求める加算
器14を具備している。
The transfer unit 5 includes a register (BLK) 9 that holds a logical stack block number (1 to n in FIG. 9) and a count register (COUNT) 10 that indicates an address within the logical stack block. a comparator that outputs a CARRY signal when STP at 11<
(BLK/C0UNT), a control circuit 12 that comprehensively controls data transfer during swap-in or swap-out, and a control circuit 12 that outputs a STOP signal when
) and the start address (STKBASE) of the logical stack held in the register 13.
and (BLK/C0UNT) to obtain the logical stack address (STKADD) on the main memory 6.

制御回路12はスワップ・インあるいはスワップ・アウ
トのときのデータ転送を行う回路であって、スタート(
START)信号により起動する。
The control circuit 12 is a circuit that transfers data during swap-in or swap-out, and is a circuit that transfers data during swap-in or swap-out.
START) signal.

このとき、モード(MODE)信号が「o」であればス
ワップ・イン、「1」であればスワップ・アウト動作を
行う。この制御回路12は、後述するようにカウント・
レジスタ10からのキャリイ(CARRY)信号もしく
は比較器11からのストップ(STOP)信号のいずれ
かが入力されるとEND信号を出力し、回路の動作を停
止する。
At this time, if the mode (MODE) signal is "o", a swap-in operation is performed, and if it is "1", a swap-out operation is performed. This control circuit 12 includes a count and a
When either the carry (CARRY) signal from the register 10 or the stop (STOP) signal from the comparator 11 is input, an END signal is output, and the operation of the circuit is stopped.

この外、制御回路12はカウント・レジスタ1゜を零ク
リアするカウントセット(COUNTSET)信号、カ
ウント・レジスタ10のインクリメントつまり+1制御
を行うカウントアツプ(C0UNTUP)信号等を出力
する。
In addition, the control circuit 12 outputs a count set (COUNTSET) signal for clearing the count register 1° to zero, a count up (COUNTUP) signal for incrementing the count register 10, that is, controlling it by +1.

レジスタ13は主記憶6上の論理スタックの先頭アドレ
ス(STKBASE)を保持するものである。
The register 13 holds the start address (STKBASE) of the logical stack on the main memory 6.

加算器14はレジスタ13に保持された論理スタックの
先頭アドレス(STKBASE)と、レジスタ9と連結
されたカウント・レジスタIOにそれぞれ保持された論
理スタック・ブロック番号BLKおよび論理スタック・
ブロック内アドレスとを加算演算することにより、主記
憶6上の論理スタック・アドレス(STKADR)を求
めるものである。
The adder 14 uses the logical stack start address (STKBASE) held in the register 13, the logical stack block number BLK and the logical stack block number held in the count register IO connected to the register 9, respectively.
The logical stack address (STKADR) on the main memory 6 is obtained by performing an addition operation with the intra-block address.

次に、第2図に示す本発明の詳細な説明する。Next, the present invention shown in FIG. 2 will be explained in detail.

ここでは、論理スタック・トップを含む物理スタック・
ブロックをスタック・トップ・プロ・ツクという。
Here we will look at the physical stack, including the logical stack top.
The block is called Stack Top Pro Tsuk.

1、初期設定 システムの立上げ時にCPUマイクロプログラムよりレ
ジスタ13に主記憶6上の論理スタック先頭アドレス(
STKBASE)を、またレジスタ4には論理スタック
が未使用状態であることを示す値例えばオール零を設定
する。
1. Initial setting When starting up the system, the CPU microprogram writes the logical stack start address (
STKBASE), and a value indicating that the logical stack is unused, for example, all zeros, is set in register 4.

2、スワップ・イン動作 ■CPUマイクロプログラムがレジスタ9にスワップ・
インを行う論理スタック・ブロック番号を設定し、かつ
制御回路12にMODE信号−「OJ、5TART信号
を入力する。このとき制御回路12が停止状態であれば
これらの信号により制御回路12は起動し、次の如き動
作を行う。
2. Swap-in operation ■CPU microprogram swaps to register 9.
The logic stack block number to be read is set, and the MODE signal - "OJ" and 5TART signals are input to the control circuit 12. At this time, if the control circuit 12 is in a stopped state, the control circuit 12 is activated by these signals. , performs the following operations.

■制御回路12は、カウント・レジスタ10にC0UN
TSET信号を出力し、その計数値を零にする。
■The control circuit 12 inputs C0UN to the count register 10.
Output the TSET signal and set the count value to zero.

■−1次に制御回路12はアドレス・レジスタ7に、レ
ジスタ13に保持された論理スタックの先頭アドレス5
TKBASEと、レジスタ9とカウント・レジスタ10
の連結した値の加算値(STKBAS+(BLK/C0
UNT))を主記憶6のアドレス値としてセットする。
■-1 Next, the control circuit 12 inputs the start address 5 of the logical stack held in the register 13 to the address register 7.
TKBASE, register 9 and count register 10
The sum of the concatenated values (STKBAS+(BLK/C0
UNT)) is set as the address value of the main memory 6.

■−2制御回路12は、後述するように、5TOP信号
もしくはCARRY信号が人力されるとEND信号を出
力し停止状態となり、スワップ・イン動作を終了する。
(2) As will be described later, when the 5TOP signal or the CARRY signal is input manually, the -2 control circuit 12 outputs an END signal, enters a stopped state, and completes the swap-in operation.

ここで5TOP信号はスワップ・インしたブロックがス
タック・トップ・ブロックであり、転送がスタック・ト
ップ・ブロックの先頭エントリから、レジスタ4にセッ
トされたスタック・トップ・ポインタの指すスタックエ
ントリまで行われたことを示す。またCARRY信号は
スタック・ブロックを1ブロック分スワップ・インした
ことを示すものである。
Here, the 5TOP signal indicates that the swapped in block is the stack top block, and the transfer was performed from the first entry of the stack top block to the stack entry pointed to by the stack top pointer set in register 4. Show that. Further, the CARRY signal indicates that one stack block has been swapped in.

■制御回路12は、アドレス・レジスタ3によってアド
レスされる論理スタック/エントリのデータをレジスタ
9とカウント・レジスタ10の連結した値によりアドレ
スされる物理スタック1の1エントリとして書き込むと
ともに、同じアドレスのチェンジ・フラグ・メモリ2の
チェンジ・フラグCFLAGを零にセットする。それか
ら制御回路12はカウント・レジスタ10をインクリメ
ンl−(+1)するC0UNTUP信号を出力する。
■The control circuit 12 writes the data of the logical stack/entry addressed by the address register 3 as one entry of the physical stack 1 addressed by the concatenated value of the register 9 and the count register 10, and also - Set change flag CFLAG in flag memory 2 to zero. Control circuit 12 then outputs a C0UNTUP signal which increments count register 10 by l-(+1).

■このような■−1、■−2、■の動作を■−2の停止
条件が起こるまで繰返すことにより、レジスタ9が保持
する論理スタック・ブロック番号を有するブロックを主
記憶6から物理スタック1にスワップ・インする。
■By repeating the operations of ■-1, ■-2, and ■ until the stop condition of ■-2 occurs, the block having the logical stack block number held by the register 9 is transferred from the main memory 6 to the physical stack 1. Swap in.

3、物理スタックへのアクセス CPUマイクロプログラムがデータ処理のため物理スタ
ック1にアクセスするとき、レジスタ3にセントされる
論理ブロックおよびレジスタ4にセットされるスタック
・トップ・ポインタによりアドレスされるスタック・エ
ントリが物理スタック1上にある場合、リード時は物理
スタック1の1エントリのリードのみ行い、またライト
時は物理スタック1の1エントリにライト・データを書
き込むとともに対応するチェンジ・フラグ・メモリ2の
チェンジ・フラグCFLAGIエントリを「1」にする
3. Access to the physical stack When the CPU microprogram accesses the physical stack 1 for data processing, the stack entry addressed by the logical block placed in register 3 and the stack top pointer set in register 4. is on physical stack 1, when reading, only one entry of physical stack 1 is read, and when writing, the write data is written to one entry of physical stack 1, and the corresponding change flag memory 2 is changed. - Set the flag CFLAGI entry to "1".

しかし、レジスタ3およびレジスタ4によりアドレスす
るスタック・エントリが物理スタック1上にない場合、
リード時またはライト時にかかわらず、CPUマイクロ
プログラムがアクセス要求したスタック・エントリが物
理スタック上にないことを示すN0TFOUND信号を
出力する。
However, if the stack entry addressed by register 3 and register 4 is not on physical stack 1, then
Regardless of whether the CPU microprogram is reading or writing, it outputs a N0TFOUND signal indicating that the stack entry requested to be accessed by the CPU microprogram is not on the physical stack.

4、スワップ・アウト動作 ■CPUマイクロプログラムがレジスタ9にスワップ・
アウトする先の論理スタック・プロソク番号を設定し、
かつ制御回路12にMODE信号rlJ、5TART信
号を入力する。このとき制御回路12が停止状態であれ
ばこれらの信号により制御回路12は起動し、次の如き
動作を行う。
4. Swap out operation ■CPU microprogram swaps to register 9.
Set the logical stack prosock number to output to,
Also, the MODE signal rlJ and the 5TART signal are input to the control circuit 12. At this time, if the control circuit 12 is in a stopped state, the control circuit 12 is activated by these signals and performs the following operations.

■制御回路12はカウント・レジスタ10にC0UNT
SET信号を出力し、その計数値を零にする。
■The control circuit 12 inputs C0UNT to the count register 10.
Output the SET signal and make the count value zero.

■−1次に制御回路12はアドレス・レジスタ7に、レ
ジスタ13に保持された論理スタックの先頭アドレス5
TKBASEと、レジスタ9とカウント・レジスタ10
の連結した値との加算値(STKBASE+ (BLK
/C0UNT))を主記憶6のアドレス値としてセット
する。そして前記レジスタ9とカウント・レジスタ10
の連結値 1(BLK/C0UNT)でアドレスされた
物理スタック1のエントリをデータ・レジスタ8にセッ
トし、チェンジ・フラグ・メモリ2の対応するチェンジ
・フラグCFLAGIエントリを読み出す。
■-1 Next, the control circuit 12 inputs the start address 5 of the logical stack held in the register 13 to the address register 7.
TKBASE, register 9 and count register 10
The sum of the concatenated values of (STKBASE+ (BLK
/C0UNT)) is set as the address value of the main memory 6. and said register 9 and count register 10
The physical stack 1 entry addressed by the concatenated value 1 (BLK/C0UNT) is set in the data register 8, and the corresponding change flag CFLAGI entry in the change flag memory 2 is read.

また制御回路12はカウント・レジスタ10をインクリ
メント(+1)するC0UNTUP信号を出力する。
Control circuit 12 also outputs a C0UNTUP signal that increments count register 10 (+1).

■−2このとき制御回路12に5TOP信号もしくはC
ARRY信号が入力されると、制御回路12はEND信
号を出力し、停止状態となり、スワップ・アウト動作は
終了する。ここでSTOP信号はスワップ・アウトした
ブロックがスタック・トップ・ブロックであり、転送が
スタック・トップ・ブロックの先頭エントリからレジス
タ4にセットされたスタック・トップ・ポインタの指す
スタック・エントリまで行われたことを示す。またCA
RRY信号は、スタック・ブロックを1ブロック分スワ
ップ・アウトしたことを示すものである。また読み出し
た前記チェンジ・フラグCFLAGO値が「0」ならば
次に前記■−1を実行する。そしてチェンジ・フラグC
FLAGO値が「1」なら次の■を実行する。
■-2 At this time, the control circuit 12 receives the 5TOP signal or C
When the ARRY signal is input, the control circuit 12 outputs the END signal, enters a stopped state, and ends the swap out operation. Here, the STOP signal indicates that the swapped out block is the stack top block, and the transfer is performed from the first entry of the stack top block to the stack entry pointed to by the stack top pointer set in register 4. Show that. Also CA
The RRY signal indicates that one stack block has been swapped out. Further, if the read change flag CFLAGO value is "0", then the process (2)-1 is executed. And change flag C
If the FLAGO value is "1", execute the next step (2).

■すなわちチェンジ・フラグCFLAGの値が「1」な
ら、制御回路12はデータ・レジスタ8にセットしたデ
ータを、アドレス・レジスタ7によってアドレスされた
論理スタックのエントリに書き込む。
(2) That is, if the value of the change flag CFLAG is "1", the control circuit 12 writes the data set in the data register 8 to the entry of the logical stack addressed by the address register 7.

■このように、■−1、■−2.■の動作を■−2の条
件が起こるまで繰り返すことにより、レジスタ9の保持
する論理スタック・ブロック番号を持つブロックを、そ
の書き換えられたチェンジ・フラグCFLAG rlJ
のもののみスワップ・アウトすることができる。
■In this way, ■-1, ■-2. By repeating the operation (2) until the condition (2) -2 occurs, the block with the logical stack block number held in register 9 is transferred to its rewritten change flag CFLAG rlJ.
Only those that can be swapped out can be swapped out.

次に物理スタックが1ブロックで仮想スタック制御を行
うための回路の説明を第3図にもとづき行う。
Next, a circuit for controlling a virtual stack using one physical stack block will be explained based on FIG.

第3図において、PTRU及びPTRLは第2図におけ
るレジスタ3の上位部レジスタおよび下位部レジスタ、
5TPU及び5TPLは第2図におけるレジスタ4の上
位部レジスタ及び下位部レジスタ、BLKおよびC0U
NTは第2図におけるレジスタ9およびカウント・レジ
スタ10である。これらの各レジスタのビット幅は、P
TRU=STPU−BLK、PTRL−3TPL=CO
UNTの関係がある。そしてPTRU、、5TPU。
In FIG. 3, PTRU and PTRL are the upper register and lower register of register 3 in FIG.
5TPU and 5TPL are the upper register and lower register of register 4 in FIG. 2, BLK and C0U.
NT is register 9 and count register 10 in FIG. The bit width of each of these registers is P
TRU=STPU-BLK, PTRL-3TPL=CO
It has something to do with UNT. and PTRU,,5TPU.

BLKは論理スタックのブロック番号を保持するレジス
タテあり、またPTRL、5TPL、C0UNTは論理
スタック・ブロック内アドレスを保持するレジスタであ
る。
BLK is a register that holds the block number of the logical stack, and PTRL, 5TPL, and C0UNT are registers that hold addresses within the logical stack block.

またMPXはマルチプレクサであり、物理スタックlお
よびチェンジ・フラグ・メモリ2は前記PTPL、5T
PLまたはC0UNTによりアドレスされる。
MPX is a multiplexer, and the physical stack l and change flag memory 2 are connected to the PTPL, 5T
Addressed by PL or C0UNT.

そしてCTLは制御部であって、下記の2種類のライト
信号すなわち、CPUマイクロプログラムより前記レジ
スタPTRおよびレジスタSTPにアドレスされる物理
スタック1へのデータライト時を示すCPUWR信号、
または前述した第2図の制御回路12のスワップ・イン
動作中の(BLK/C0UNT)によるアドレス先の物
理スタック1へのデータライト時を示すMOVEWR信
゛号の2つの信号が入力され、これに応じて第4図゛に
従って動作する。そしてこの2つの信号が同時に入力さ
れることはない。
CTL is a control unit that generates the following two types of write signals: a CPUWR signal indicating when to write data to the physical stack 1 addressed by the CPU microprogram to the register PTR and register STP;
Or, during the swap-in operation of the control circuit 12 shown in FIG. Accordingly, it operates according to FIG. These two signals are never input at the same time.

5TKBLKは論理スタック・ブロック番号を保持する
レジスタであって、通常は前記レジスタBLKと同じ内
容がセントされでいる。
5TKBLK is a register that holds a logical stack block number, and normally the same contents as the register BLK are stored.

CMPPは比較器であって、ワーク的に存在するスタッ
クのポインタを示すレジスタPTRtJ、PTRLをC
PUのマイクロプログラムが書き換えたことにより5T
KBLK#PTRUのとき、論理ブロック番号不一致を
示すN0TFOUNDP信号を出力するものである。
CMPP is a comparator, and registers PTRtJ and PTRL indicating the pointer of the stack that exists in the work area are
5T due to rewriting the PU microprogram.
When KBLK#PTRU, a N0TFOUNDP signal indicating logical block number mismatch is output.

CMPSは比較器であって、スタック・ト・ノブ・ポイ
ンタの伸び縮みにより論理ブロックが不一致、つまり5
TKBLK#5TPUのとき論理ブロック番号の不一致
を示すN0TFOUNDS信号を出力するものである。
CMPS is a comparator, and the logic block mismatches due to the expansion and contraction of the stack-to-knob pointer, that is, 5
When TKBLK#5TPU, a N0TFUNDS signal indicating a mismatch of logical block numbers is output.

ORは論理和回路であって前記N0TFOUNDP信号
とN0TFOUNDS信号の論理和をとりN0TFOU
ND信号として出力する。
OR is a logical sum circuit, which calculates the logical sum of the N0TFOUNDP signal and the N0TFOUNDS signal and outputs N0TFOU.
Output as ND signal.

このようにして、レジスタ5TKBLKとレジスタPT
RUおよび5TPUが異なる場合、つまり物理スタック
l内にない論理スタック・ブロックをアクセスするとN
0TFOUND信号が出力される。またレジスタ5TK
BLKとレジスタPTRUおよび5TPUが一致すると
き、つまり物理スタック1内にある論理スタック・ブロ
ックをアクセスする場合には、物理スタック1のリード
及びライトは可能である。
In this way, register 5TKBLK and register PT
If RU and 5TPU are different, that is, accessing a logical stack block that is not in the physical stack l, N
A 0TFOUND signal is output. Also register 5TK
When BLK and registers PTRU and 5TPU match, that is, when accessing a logical stack block in physical stack 1, reading and writing of physical stack 1 is possible.

また前記N0TPOIJND信号は、CPUマイクロプ
ログラム・レベルの割込み原因であり、N0TFOUN
D信号が出力されると割込みが発生し、割込み処理ルー
チンで割込み原因を排除したのち、本来行うべき処理に
復帰し、処理を続行する。この場合、論理ブロックが不
一致となるのでスワップ・アウトやスワップ・イン処理
が行われることになる。
Furthermore, the N0TPOIJND signal is a cause of an interrupt at the CPU microprogram level, and the N0TFOUN
When the D signal is output, an interrupt occurs, and after eliminating the cause of the interrupt in the interrupt processing routine, the process returns to the original process and continues the process. In this case, since the logical blocks do not match, swap out or swap in processing will be performed.

このときNoTFOUNDP発生ならば、第5図に示す
フローによる処理が行われ、N0TF○UNDS発生な
らば第6図に示すフローによる処理が行われる。
At this time, if NoTFOUUNDP occurs, the processing according to the flow shown in FIG. 5 is performed, and if NOTF○UNDS occurs, the processing according to the flow shown in FIG. 6 is performed.

いま5TKBLKf=PTRUになれば、比較器C0M
PPよりN0TFOUNDP信号が出力され、論理和回
路ORよりN0TFOUND信号が出力されて割込み処
理が行われることになるが、このときの処理は、第5図
に示す如きルーチンにより行われる。
If 5TKBLKf=PTRU now, comparator C0M
The N0TFOUNDP signal is output from PP, the N0TFOUND signal is output from the OR circuit OR, and interrupt processing is performed.The processing at this time is performed by a routine as shown in FIG.

a、このとき、レジスタ5TKBLKに保持していた論
理スタック・ブロック番号を第2図に示すレジスタ(B
LK)9に記入し、制御回路12にスワップ・アウト動
作の開始を指示する。これによりいままで使用していた
物理スタック1上のブロックを論理スタックにスワップ
・アウトする。
a. At this time, the logical stack block number held in register 5TKBLK is transferred to the register (B
LK)9 to instruct the control circuit 12 to start the swap out operation. As a result, the blocks on the physical stack 1 that have been used until now are swapped out to the logical stack.

すなわちレジスタ13に記入された論理スタックの先頭
アドレス5TKBASEとレジスタ9に記入された論理
スタック・ブロックの番号が加算器14により加算され
、スワップ・アラI・先のアドレスがアドレス・レジス
タ7にセットされる。これによりスワップ・アウトが行
われるが、このときチェンジ・フラグ・メモリ2のチェ
ンジ・フラグCFLAGO値が「1」のエントリのみ転
送するように制御回路12が動作する。このようにして
いままで使用していた物理スタック1上のデータのスワ
ップ・アウト処理が終了するまでCPUは待つ。
That is, the start address 5TKBASE of the logical stack written in the register 13 and the logical stack block number written in the register 9 are added by the adder 14, and the swap address I/dest address is set in the address register 7. Ru. As a result, a swap out is performed, and at this time, the control circuit 12 operates so as to transfer only the entry whose change flag CFLAGO value is "1" in the change flag memory 2. In this way, the CPU waits until the swap-out process for the data on the physical stack 1 that has been used until now is completed.

b、スワップ・アウト処理が終了すると、第3図のレジ
スタPTRUに記入された論理スタック・ブロックを第
2図のレジスタ(BLK)9に記入し、制御回路12に
スワップ・イン動作の開始を指示する。これによりレジ
スタPTRUで指示された、データ処理に必要な論理ブ
ロックを物理スタック1上にスワップ・インする。この
スワップ・インが終了するまでCPTJは処理の進行を
待ち、スワップ・インが終了すれば、次に実行すべきマ
イクロプログラムに復帰することになる。
b. When the swap out process is completed, the logical stack block written in the register PTRU in FIG. 3 is written in the register (BLK) 9 in FIG. 2, and the control circuit 12 is instructed to start the swap in operation. do. As a result, the logical blocks required for data processing, indicated by the register PTRU, are swapped into the physical stack 1. CPTJ waits for the processing to proceed until this swap-in is completed, and when the swap-in is completed, it returns to the next microprogram to be executed.

また、5TKBLK≠5TPUのとき、つまりスタック
の伸び縮みにより、スタック・トップ・ポインタの位置
がレジスタ5TKBLKのデータと不一致になったとき
、比較器COMPSよりN0TFOUNDS信号が出力
されて割込み処理が行われるが、このときの処理は第6
図に示すルーチンにより行われる。第6図のフローの説
明に先立ち、スタックが伸びたときの状態を第7図に、
スタックが縮んだときの状態を第8図に説明する。
Also, when 5TKBLK≠5TPU, that is, when the stack top pointer position does not match the data in register 5TKBLK due to expansion or contraction of the stack, the comparator COMPS outputs the N0TFOUNDS signal and interrupt processing is performed. , the processing at this time is the sixth
This is performed by the routine shown in the figure. Before explaining the flow in Figure 6, Figure 7 shows the state when the stack is extended.
The state when the stack is shrunk is illustrated in FIG.

第7図(a)に示すスタック・トップの位置から第7図
中)に示す位置まで伸びるとき、通常はデータを書込み
ながらスタックが伸びるので、この伸びた結果できた領
域Nに対応するチェンジ・フラグ・メモリ・エントリは
「1」となる。
When extending from the stack top position shown in FIG. 7(a) to the position shown in FIG. The flag memory entry becomes "1".

また第8図(alに示すスタック・トップの位置から、
第8図(b)に示す位置までスタックが縮まったとき、
不要となった領域0に対応するチェンジ・フラグ・メモ
リのエントリは縮む前とは変わらないが、この領域Oに
ついてはチェンジ・フラグが「1」であってもスワップ
・アウトのとき転送する必要はない。
Also, from the stack top position shown in Figure 8 (al),
When the stack has shrunk to the position shown in Figure 8(b),
The change flag memory entry corresponding to area 0, which is no longer needed, remains the same as before shrinking, but even if the change flag is "1" for area O, it is not necessary to transfer it when swapping out. do not have.

次に、第6図により、5TKBLKf−3TPUのとき
、論理和回路ORよりN0TFOUND信号が出力され
て割込み処理が行われるときの処理を説明する。
Next, with reference to FIG. 6, a description will be given of the processing when the N0TFOUND signal is output from the OR circuit OR and interrupt processing is performed in the case of 5TKBLKf-3TPU.

、lこのとき5TPU>5TKBLKか否かをまず判別
する。YESであれば、つまりスタックが伸びた場合に
は、いままで使用していた物理スタック1上のブロック
を論理スタックにスワップ・アウトすることが必要とな
る。そのためレジスタ5TKBLKに保持していた論理
スタック・ブロック番号を、第2図に示すレジスタ(B
LK)9に記入し、制御回路12にスワップ・アウト動
作の開始を指示する。これによりいままで使用していた
物理スタック1上のブロックを論理スタックにスワップ
・アウトする。このときチェンジ・フラグCFLAGが
「1」のエントリのみ転送する。
, l At this time, it is first determined whether 5TPU>5TKBLK. If YES, that is, if the stack has grown, it is necessary to swap out the blocks on the physical stack 1 that have been used so far to the logical stack. Therefore, the logical stack block number held in register 5TKBLK is changed to the register (B
LK)9 to instruct the control circuit 12 to start the swap out operation. As a result, the blocks on the physical stack 1 that have been used until now are swapped out to the logical stack. At this time, only entries whose change flag CFLAG is "1" are transferred.

このようにして物理スタック1上のデータのスワップ・
アウト処理が終了するまでCPUは待ち、スワップ・ア
ウト処理が終了すれば次のb′スワップ・イン動作に移
る。また5TPU>5TKBLKがNoであれば、スタ
ックが縮んだ場合であるのでスワップ・アウトは必要が
なく、次のb′に移る。
In this way, the data on physical stack 1 can be swapped and
The CPU waits until the out processing is completed, and when the swap out processing is completed, it moves on to the next b' swap in operation. If 5TPU>5TKBLK is No, this means that the stack has shrunk, so there is no need to swap out, and the process moves to the next step b'.

b、′次にレジスタ5TPUで指示されたデータ処理に
必要な論理ブロックを物理スタック1上にスワップ・イ
ンする。このためレジスタ5TPUに記入された論理ス
タック・ブロックを、第2図のレジスタ(BLK)9に
記入し、制御回路12にスワップ・イン動作をの開始を
指示する。これによりスワップ・イン動作が行われるの
で、その終了までCPUは処理の進行を待ち、スワップ
・インが終了すれば、次に実行すべきマイクロプログラ
ムに復帰することになる。
b,'Next, the logical blocks required for data processing indicated by register 5TPU are swapped into physical stack 1. Therefore, the logical stack block written in the register 5TPU is written in the register (BLK) 9 in FIG. 2, and the control circuit 12 is instructed to start the swap-in operation. As a result, a swap-in operation is performed, and the CPU waits for the processing to proceed until the swap-in operation is completed. When the swap-in is completed, the CPU returns to the next microprogram to be executed.

なお前記説明では、CPU上の物理スタックのブロック
数が1の場合のみ説明したが、勿論本発明はこれのみに
限定されるものではなく、ブロック数が複数の場合も、
同様にして実施することができる。
In the above description, only the case where the number of blocks in the physical stack on the CPU is one is explained, but of course the present invention is not limited to this only, and even when the number of blocks is plural,
It can be implemented in a similar manner.

〔発明の効果〕〔Effect of the invention〕

本発明によればスワップ・アウトのとき、物理スタック
上で書き換えのあったもののみを選択して論理スタック
に戻すことができるので、そのデータの転送量を大幅に
減少することができ、データ処理効率を向上することが
できる。
According to the present invention, when swapping out, only what has been rewritten on the physical stack can be selected and returned to the logical stack, so the amount of data transferred can be significantly reduced, and the data processing Efficiency can be improved.

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

第1図は本発明の原理説明図、 第2図は本発明の一実施例構成図、 第3図は物理スタックが1ブロックで仮想スタック制御
を行う場合の説明図、 第4図は制御部CTLの動作説明図、 第5図はNoTFOUNDP発生時の動作説明図、 第6図はNoTFOUNDS発生時の動作説明図、 第7図はスタックが伸びたときの物理スタックの説明図
、 第8図はスタックが縮むときの物理スタックの説明図、 第9図は従来例を示す。 1−物理スタック 2・・−チェンジ・フラグ・メモリ 3.4− レジスタ  5・−転送部 6−4記憶     7−アドレス・レジスタ8・−デ
ータ・レジスタ 9− レジスタ10− カウント・レ
ジスタ
Fig. 1 is an explanatory diagram of the principle of the present invention, Fig. 2 is a configuration diagram of an embodiment of the present invention, Fig. 3 is an explanatory diagram when virtual stack control is performed using one block of physical stack, and Fig. 4 is a control unit. An explanatory diagram of the operation of CTL. Figure 5 is an explanatory diagram of the operation when NoTFOUNDP occurs. Figure 6 is an explanatory diagram of the operation when NoTFOUNDS occurs. Figure 7 is an explanatory diagram of the physical stack when the stack is extended. An explanatory diagram of the physical stack when the stack shrinks, FIG. 9 shows a conventional example. 1-Physical stack 2...-Change flag memory 3.4-Register 5--Transfer section 6-4 memory 7-Address register 8--Data register 9-Register 10--Count register

Claims (1)

【特許請求の範囲】 中央処理装置、主記憶制御装置、主記憶装置等により構
成されるデータ処理システムであって、中央処理装置内
に設けた物理スタックと主記憶装置内に設けた論理スタ
ックにより仮想スタック制御を行うように構成したもの
において、 物理スタック(1)と同じエントリ数を持ち、対応する
物理スタック・エントリが書き換えられたことを示すチ
ェンジ・フラグ・メモリ2と、物理スタック1ブロック
と論理スタック1ブロック間のデータ転送を行う転送手
段(5)を具備し、 論理スタックから物理スタックへの1ブロック転送時に
は論理スタック・トップ・ブロックのみ1ブロック以下
のデータ転送を行い、また物理ブロックから論理スタッ
クへの1ブロック転送時には論理スタック・トップ・ブ
ロックのみ1ブロック以下のデータ転送とし、且つ転送
時にチェンジ・フラグ・メモリを参照して書き換えられ
たデータのみを転送するようにしたことを特徴とするデ
ータ転送方式。
[Scope of Claims] A data processing system consisting of a central processing unit, a main memory control unit, a main memory unit, etc., comprising a physical stack provided in the central processing unit and a logical stack provided in the main memory device. In a device configured to perform virtual stack control, change flag memory 2 has the same number of entries as physical stack (1) and indicates that the corresponding physical stack entry has been rewritten, and physical stack 1 block. It is equipped with a transfer means (5) that transfers data between one block of the logical stack, and when transferring one block from the logical stack to the physical stack, only the top block of the logical stack transfers data of one block or less, and also transfers data from the physical block to the top block of the logical stack. When transferring one block to the logical stack, only the top block of the logical stack transfers one block or less of data, and at the time of transfer, only the data that has been rewritten by referring to the change flag memory is transferred. data transfer method.
JP61085465A 1986-04-14 1986-04-14 Data transfer system Pending JPS62242239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61085465A JPS62242239A (en) 1986-04-14 1986-04-14 Data transfer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61085465A JPS62242239A (en) 1986-04-14 1986-04-14 Data transfer system

Publications (1)

Publication Number Publication Date
JPS62242239A true JPS62242239A (en) 1987-10-22

Family

ID=13859635

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61085465A Pending JPS62242239A (en) 1986-04-14 1986-04-14 Data transfer system

Country Status (1)

Country Link
JP (1) JPS62242239A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212472A (en) * 2006-07-26 2012-11-01 Semiconductor Energy Lab Co Ltd Program and semiconductor device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212472A (en) * 2006-07-26 2012-11-01 Semiconductor Energy Lab Co Ltd Program and semiconductor device

Similar Documents

Publication Publication Date Title
US5251303A (en) System for DMA block data transfer based on linked control blocks
JPH1091572A (en) Data transfer method and data transfer device using the method
US6684267B2 (en) Direct memory access controller, and direct memory access control method
US5423013A (en) System for addressing a very large memory with real or virtual addresses using address mode registers
EP0212152A2 (en) Microprocessor assisted memory to memory move apparatus
JPS62242239A (en) Data transfer system
EP0261947A1 (en) Computer system
US6311266B1 (en) Instruction look-ahead system and hardware
JPH11232213A (en) Data transfer system for input/output device
JPH01125644A (en) Data transfer equipment
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
US7681003B2 (en) Moving hardware context structures in memory while maintaining system operation
JPS63197254A (en) Virtual memory controller
JPH08328995A (en) System and method for dma transfer
JPS6019816B2 (en) microprogram control adapter
JP2845746B2 (en) Micro program controller
JP2954988B2 (en) Information processing device
JPS625727Y2 (en)
JPH05113888A (en) Microprocessor unit
JPH01108652A (en) Address conversion system
JPS63144496A (en) Write control system for storage device
JPH0283623A (en) Microprocessor
JPH0375831A (en) Information processor
JPH02226447A (en) Computer system and memory access therefor
JPH0248749A (en) Buffer storage control device