JPS593772A - Control system for double hierarchical stack - Google Patents

Control system for double hierarchical stack

Info

Publication number
JPS593772A
JPS593772A JP57111894A JP11189482A JPS593772A JP S593772 A JPS593772 A JP S593772A JP 57111894 A JP57111894 A JP 57111894A JP 11189482 A JP11189482 A JP 11189482A JP S593772 A JPS593772 A JP S593772A
Authority
JP
Japan
Prior art keywords
register
stack
address
pts
pointer
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
JP57111894A
Other languages
Japanese (ja)
Inventor
Akira Hattori
彰 服部
Takeshi Shinoki
剛 篠木
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 JP57111894A priority Critical patent/JPS593772A/en
Publication of JPS593772A publication Critical patent/JPS593772A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Executing Machine-Instructions (AREA)
  • Memory System (AREA)

Abstract

PURPOSE:To inhibit a block specified by a save register from being expelled from a fast memory and to improve the efficiency of use by equipping a push- down stack of double hierarchical structure consisting of the fast memory and a slow mass storage memory with a pointer register accessed directly and the save register. CONSTITUTION:The push-down stack 3 of double hierarchical structure is provided with the pointer register PTR to which an address is sent directly and its save register PTS and when the registers PTR and PTS are shared among various pointers L1-Ln, a physical address PBA in the save register PTS is supplied to a replacement deciding circuit LRU 7 and a block address PBA specified by the save register gives the priority for inhibiting the expelling from the fast memory. Consequently, a block specified by the save register is left in the fast memory all the time, so access in resetting is speeded up and the utilization of the save register is improved.

Description

【発明の詳細な説明】 発明の技術分野 本発明は、高速メモリと低速大容量メモリの2階層で構
成されるブツシュダウンスタック(Pushdown 
 5tack )の制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a pushdown stack consisting of two layers: high-speed memory and low-speed large-capacity memory.
5tack).

技術の背景 スタックは既知のようにメモリの1種ではあるがインク
レメント及びデクレメントするポインタレジスタがアド
レスを発生し外部よりアクセスアドレスを送る必要はな
い(但し最初のアドレスは送る)という利点を有する。
Technical background Although the stack is a type of memory as is known, it has the advantage that an address is generated by a pointer register that increments and decrements, and there is no need to send an access address from outside (although the first address is sent). .

ポインタは書込み用と読取りに2個備えるものもあるが
1個で共用するものもあり、この場合は書込むと共にイ
ンクレメントし、読出すとともにデクレメントとすると
いう方式をとり、従っていわばLa5t  in  F
irst out (後入れ先出し)である。Li5p
等の関数型言語を効率よく実行するためには、高速、大
容量のスタックが必要である。しかし、LiFo型スタ
ックはその性質上上部のみアクセスするという参照の局
所性があるため、全体を高速メモリで実現するのはコス
トや物理的サイズの点で問題がある。そこで、一般には
第1図のように小容量の高速メモリ1と大容量の低速メ
モリ2でスタック3を構成し、そして全体の内容は低速
メモリ2に置き、高速メモリ (高速スタックという)
1には最近アクセスしているスタックの上部のブロック
だけを置く方法が使われる。
Some have two pointers, one for writing and one for reading, but others have one pointer for common use.In this case, the system is such that it increments when writing and decrements when reading, so to speak.
irst out (last in, first out). Li5p
A high-speed, large-capacity stack is required to efficiently execute functional languages such as Python. However, since the LiFo type stack inherently has locality of reference in that only the top part is accessed, implementing the entire stack using high-speed memory poses problems in terms of cost and physical size. Therefore, generally, as shown in Figure 1, a stack 3 is configured with a small capacity high speed memory 1 and a large capacity low speed memory 2, and the entire contents are stored in the low speed memory 2, and the high speed memory (referred to as a high speed stack) is configured.
1 uses a method of placing only the blocks at the top of the stack that have been accessed recently.

このようなブツシュダウン、ポンプアップ型スタック3
のアクセス速度は内部レジスタ並に高速であることが要
求される。そこでアクセスに際し一般のキャッシュメモ
リのように、アクセス毎に論理アドレスを物理アドレス
へ変換するのは適当ではない。そこで、スタック3のア
ドレスを複数語から成るブロックに分割し、参照アドレ
スがブロック境界を越えた時のみ論理アドレスを物理ア
ドレスへ変換し、同一ブロック内で動く場合には、変換
することなく高速スタック2にアクセスする方法が採ら
れる。第2図はこの説明図で、4はスタックポインタ、
5はブロック境界をクロスしたことを検出する回路、6
は論理アドレスを物理アドレスに変換する回路である。
Bush-down, pump-up type stack like this 3
The access speed of the register is required to be as fast as that of internal registers. Therefore, it is not appropriate to convert a logical address into a physical address for each access, as in a general cache memory. Therefore, we divide the address of stack 3 into blocks consisting of multiple words, convert the logical address to a physical address only when the reference address crosses the block boundary, and when moving within the same block, we can quickly stack the address without conversion. 2 is used. Figure 2 is an explanatory diagram of this, where 4 is the stack pointer,
5 is a circuit that detects crossing a block boundary, 6
is a circuit that converts a logical address into a physical address.

ポインタ4内のLBAは論理ブロックアドレス、PBA
は物理ブロックアドレス、BAはブロック内アドレスで
ある。
LBA in pointer 4 is logical block address, PBA
is a physical block address, and BA is an intra-block address.

アクセスに際し論理アドレスが送られてくると、これは
論理ブロックアドレスと該ブロック内アドレスからなる
のでポインタレジスタ4のLBA部とBA部にセットさ
れ、LBA部の内容が検出回路5でチェックされる。こ
−でブロック境界を越えていることが分るとアドレス変
換回路6を起動し、アドレス変換したものをポインタレ
ジスタ4のPBA部にセットし、該PBA部とBA部の
内容がスタック3をアクセスするアドレスとなる。
When a logical address is sent at the time of access, since it consists of a logical block address and an address within the block, it is set in the LBA and BA sections of the pointer register 4, and the contents of the LBA section are checked by the detection circuit 5. If it is found that the block boundary has been exceeded, the address conversion circuit 6 is activated, the converted address is set in the PBA section of the pointer register 4, and the contents of the PBA section and BA section are used to access the stack 3. This is the address to be used.

ブロック境界を越えていない場合はアドレス変換は行な
われず、そのときのPBA部の内容(これは今回以前に
アドレス変換回路6が書込んだもの)とBA部の内容が
直ちにスタック3をアクセスする物理アドレスになる。
If the block boundary has not been crossed, no address translation is performed, and the contents of the PBA section at that time (this is what the address translation circuit 6 wrote before this time) and the contents of the BA section are immediately used to access the stack 3. becomes the address.

なお図示しないがこのポインタ4のBA部にインクレメ
ント、デクレメント機構が付属しており、以後の指定位
置までのアドレスはポインタ4が発生する。
Although not shown, an increment/decrement mechanism is attached to the BA section of the pointer 4, and the pointer 4 generates an address up to a specified position thereafter.

従来技術と問題点 一般に、Li5p等の高級言語を効率よく処理するため
には、各種のポインタが必要である。ところが、これら
の多数のポインタに対応してそれぞれポインタレジスタ
を設けると、スタックアクセス時間にポインタレジスタ
を選択してアクセスするためのマルチプレクサの信号伝
播遅延が加わる。又、多数のレジスタを設けることは物
理的な負担となる。そこで、第3図のように、スタック
3に直接アドレスを送るポインタレジスタPTRとその
待避用のレジスタPTSを設け、各種ポインタ上1〜L
n間で、レジスタPTR,PTSを共用する方式が考え
られる。この方式ではレジスタPTRの内容を他のポイ
ンタアドレスに切換える時は、該PTRの内容つまりポ
インタ値をまたその後すぐに使用することが予想される
場合は、該ポインタ値をPTSへ一時セーブし、その後
それをレジスタPTSからPTRへ戻して再使用できる
ようにする。このレジスタPTSにも論理アドレスLと
それに対応する物理アドレスPを保持させる。
Prior Art and Problems In general, various pointers are required to efficiently process a high-level language such as Li5p. However, if pointer registers are provided for each of these many pointers, a signal propagation delay of a multiplexer for selecting and accessing a pointer register is added to the stack access time. Furthermore, providing a large number of registers is a physical burden. Therefore, as shown in FIG.
A possible method is to share the registers PTR and PTS between n. In this method, when switching the contents of the register PTR to another pointer address, if the contents of the PTR, that is, the pointer value is expected to be used again soon, the pointer value is temporarily saved in the PTS, and then It is returned from register PTS to PTR so that it can be reused. This register PTS also holds a logical address L and a physical address P corresponding to it.

この理由は次の通りである。各種ポインタL1〜Lnの
内容は論理アドレスしてあるから、それらのポインタを
使ってスタック3をアクセスする時には物理アドレスP
への変換が必要な場合もある。
The reason for this is as follows. Since the contents of the various pointers L1 to Ln are logical addresses, when accessing the stack 3 using these pointers, the physical address P is used.
It may be necessary to convert to

例えばポインタL#iをレジスタPTRへ転送したとき
、既にレジスタPTR中にある他のポインタの論理ブロ
ックアトレスと、新規にレジスタRTRへ転送したポイ
ンタの論理ブロックアドレスとが不一致の場合には、ア
ドレス変換が必要になる。このことはレジスタPTSか
らセーブしたポインタを戻すときも同様である。そこで
、レジスタPTSには論理アドレスL以外にその物理ブ
ロックアドレスPも持たせておき、レジスタPTRへ戻
した時に無変換で即座にスタックアクセスを可能とする
For example, when pointer L#i is transferred to register PTR, if the logical block address of another pointer already in register PTR and the logical block address of the pointer newly transferred to register RTR do not match, the address Conversion will be required. The same holds true when returning the saved pointer from register PTS. Therefore, in addition to the logical address L, the register PTS also has its physical block address P, so that stack access can be performed immediately without conversion when the register PTS is returned to the register PTR.

しかし、この場合でもレジスタPTSで待機している間
に、レジスタPTS内ポインタが指すブロックが高速ス
タック1から低速メモリ2へ追出されるとそのブロック
の高速スタックへの再ロードと割付及びアドレス変換が
必要になる。即ち高速スタックlは限られた数のブロッ
ク、例えば最近使用された4ブロツクの内容しか保持で
きないので、レジスタPTR中のポインタがこれとは異
なるブロックを指すときはそれを低速メモリ2から持ち
込む代りに、高速スタック1中のいずれかのブロックを
低速メモリ2側へ戻す必要がある。
However, even in this case, if the block pointed to by the pointer in register PTS is ejected from high-speed stack 1 to low-speed memory 2 while waiting in register PTS, reloading of that block to high-speed stack, allocation, and address conversion are performed. It becomes necessary. That is, since the fast stack l can only hold the contents of a limited number of blocks, for example the four most recently used blocks, when the pointer in register PTR points to a different block, instead of bringing it in from the slow memory 2, , it is necessary to return any block in the high-speed stack 1 to the low-speed memory 2 side.

どれを戻すかの選択は通常L RU (Least R
ecentIy  Used)等のリプレースアルゴリ
ズムで行ない、このような操作で低速メモリへ追出され
ていると再使用時にそれを高速メモリへ呼戻す必要があ
り、この処理も追出してその跡へ呼び戻すという処理に
なるので、呼戻されたブロックが前に占めていた高速メ
モリ上位置を再び占めるとは限らず、アドレス変換が必
要になることもある。これは処理が複雑で、またアクセ
スタイムを増大させる。
The selection of which to return is usually LRU (Least R
This is done using a replacement algorithm such as ``EcentIyUsed'', and if it is evicted to slow memory by such an operation, it is necessary to recall it to fast memory when reusing it, and this process is also performed by evicting it and recalling it to its trace. Therefore, a recalled block may not necessarily reoccupy the high speed memory location it previously occupied, and address translation may be required. This is complicated to process and also increases access time.

発明の目的 本発明は待避レジスタPTS中のポインタが指すブロッ
クのリプレースを禁止して、該レジスクPTS使用によ
る効果を一層高めようとするものである。
OBJECTS OF THE INVENTION The present invention aims to further increase the effect of using the save register PTS by prohibiting replacement of the block pointed to by the pointer in the save register PTS.

発明の構成 本発明は、ブツシュダウンスタックの内容全体を大容量
の低速メモリへ置き、その内の最近アクセスしている部
分を含む複数ブロックを高速メモリに置くことにより実
効的に高速大容量のスタックを構成し、且つ該スタック
に直接アクセスするポレジスタを備える2階層スタック
の制御方式において、該退避用レジスタが指しているブ
ロックは該高速メモリからの追出しを禁止することを特
徴とするが、以下図示の一実施例を参照しながらこれを
詳細に説明する。
Structure of the Invention The present invention effectively provides high-speed, large-capacity processing by placing the entire contents of a bushdown stack in large-capacity, low-speed memory, and placing multiple blocks, including recently accessed portions, in high-speed memory. In a control method for a two-layer stack that comprises a stack and includes a poller register that directly accesses the stack, the block pointed to by the save register is prohibited from being evicted from the high-speed memory, as shown in the figure below. This will be explained in detail with reference to one embodiment.

発明の実施例 第4図は本発明の一実施例を示す要部ブロック図で、待
避レジスタPTS中の物理ブロックアドレスPBAをL
RU等のリプレース決定回路7に与えて、該回路による
リプレースに制限を加えようとするものである。つまり
、レジスタPTS中の物理ブロックアドレスPBAにリ
プレースを禁止する優先度を与え、ポインタレジスタP
TR中のポインタが指すブロックが低速メモリ2中にあ
る従ってリプレースが必要である場合も該リプレースは
高速メモリ1中の残りの3ブロツクについて行なわせる
ようにする。このようにすればレジスタPTS中のポイ
ンタをレジスタPTRへ戻したときにその物理アドレス
を用いて即座にスタックアクセスができる。
Embodiment of the Invention FIG. 4 is a block diagram of a main part showing an embodiment of the invention, in which the physical block address PBA in the save register PTS is
This is applied to the replacement determination circuit 7 of the RU, etc., in order to limit the replacement by the circuit. In other words, the physical block address PBA in the register PTS is given a priority that prohibits replacement, and the pointer register PBA is given a priority that prohibits replacement.
Even if the block pointed to by the pointer in TR is in the low-speed memory 2 and therefore requires replacement, the remaining three blocks in the high-speed memory 1 are replaced. In this way, when the pointer in register PTS is returned to register PTR, stack access can be performed immediately using the physical address.

発明の効果 以上述べたように本発明によれば、実行的に高速、大容
量のスタックとして機能する2階層構造のスタックで、
待避用レジスタが指すブロックは常に高速メモリ側に残
るので復帰時のアクセスも速やかに行なわれ、待避用レ
ジスタの効用が高められる。
Effects of the Invention As described above, according to the present invention, a two-layered stack that functions as a high-speed, large-capacity stack,
Since the block pointed to by the save register always remains on the high-speed memory side, it is quickly accessed upon return, increasing the utility of the save register.

【図面の簡単な説明】 第1図は2階層スタックの説明図、第2図はスタックを
ブロック分けしてアクセスする方法の説明図、第3図は
スタックを直接アクセスするレジスタおよびその待避用
レジスタを備えた従来の2階層スタック制御力式の説明
図、第4図は本発明の一実施例を示す要部ブロック図で
ある。 図中、1は高速メモリ、2は低速メモリ、3は2階層ス
タック、PTRはポインタレジスタ、PTSは待避用レ
ジスタ、7はリプレース決定回路である。 出願人 富士通株式会社 代理人弁理士  青  柳    稔 第1図 第2図 第3区 第4図
[Brief explanation of the drawings] Figure 1 is an explanatory diagram of a two-layer stack, Figure 2 is an explanatory diagram of a method of accessing the stack by dividing it into blocks, and Figure 3 is an illustration of registers that directly access the stack and their save registers. FIG. 4 is an explanatory diagram of a conventional two-layer stack control system provided with the present invention, and FIG. 4 is a block diagram of essential parts showing an embodiment of the present invention. In the figure, 1 is a high-speed memory, 2 is a low-speed memory, 3 is a two-layer stack, PTR is a pointer register, PTS is a save register, and 7 is a replacement determination circuit. Applicant Fujitsu Ltd. Representative Patent Attorney Minoru Aoyagi Figure 1 Figure 2 Ward 3 Figure 4

Claims (1)

【特許請求の範囲】[Claims] ブツシュダウンスタックの内容全体を大容量の低速メモ
リへ置き、その内の最近アクセスしている部分を含む複
数ブロックを高速メモリに置くことにより実効的に高速
大容量のスタックを構成し、且つ該スタックに直接アク
セスするポインタレジスタ以外に、該レジスタ内容の退
避用レジスタを備える2階層スタックの制御方式におい
て、該退避用レジスタが指しているブロックは該高速メ
モリからの追出しを禁止することを特徴とする2階層ス
タックの制御方式。
By placing the entire contents of the bushdown stack in a large-capacity, slow memory, and placing multiple blocks including recently accessed parts in a high-speed memory, a high-speed, large-capacity stack is effectively configured, and the A control method for a two-layer stack that includes a register for saving the contents of the register in addition to a pointer register that directly accesses the stack, characterized in that the block pointed to by the save register is prohibited from being evicted from the high-speed memory. A two-layer stack control method.
JP57111894A 1982-06-29 1982-06-29 Control system for double hierarchical stack Pending JPS593772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57111894A JPS593772A (en) 1982-06-29 1982-06-29 Control system for double hierarchical stack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57111894A JPS593772A (en) 1982-06-29 1982-06-29 Control system for double hierarchical stack

Publications (1)

Publication Number Publication Date
JPS593772A true JPS593772A (en) 1984-01-10

Family

ID=14572799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57111894A Pending JPS593772A (en) 1982-06-29 1982-06-29 Control system for double hierarchical stack

Country Status (1)

Country Link
JP (1) JPS593772A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01251248A (en) * 1988-03-31 1989-10-06 Toshiba Corp Cache control system for stack data structure
US5473945A (en) * 1990-02-14 1995-12-12 The Charles Stark Draper Laboratory, Inc. Micromechanical angular accelerometer with auxiliary linear accelerometer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01251248A (en) * 1988-03-31 1989-10-06 Toshiba Corp Cache control system for stack data structure
US5473945A (en) * 1990-02-14 1995-12-12 The Charles Stark Draper Laboratory, Inc. Micromechanical angular accelerometer with auxiliary linear accelerometer

Similar Documents

Publication Publication Date Title
JP6928123B2 (en) Mechanisms to reduce page migration overhead in memory systems
US20070094450A1 (en) Multi-level cache architecture having a selective victim cache
JPS589277A (en) Data processor
EP0019358B1 (en) Hierarchical data storage system
JPH1196074A (en) Computer system for dynamically selecting exchange algorithm
US7398371B2 (en) Shared translation look-aside buffer and method
US5293622A (en) Computer system with input/output cache
US5420994A (en) Method for reading a multiple byte data element in a memory system with at least one cache and a main memory
JPS58147879A (en) Control system of cache memory
US20020099912A1 (en) Memory system
JPH05216766A (en) Method for maintaining coherence of cache between data cache and segment descriptor and memory device of computer
US5835945A (en) Memory system with write buffer, prefetch and internal caches
JPS593772A (en) Control system for double hierarchical stack
JPH0727492B2 (en) Buffer storage
KR960008320B1 (en) System equipped with processor and method of converting addresses in the said system
JPS60214060A (en) Control system of external storage cache
JPS6331805B2 (en)
JP2011141754A (en) Cache memory
US6804754B1 (en) Space management in compressed main memory
US8065485B2 (en) Method and apparatus for determining cache storage locations based on latency requirements
JPH11143774A (en) Cache control mechanism
JP2001222467A (en) Cache device
JPH086858A (en) Cache controller
US20090024798A1 (en) Storing Data
JPS63284649A (en) Cache memory control system