JPH01251248A - Cache control system for stack data structure - Google Patents

Cache control system for stack data structure

Info

Publication number
JPH01251248A
JPH01251248A JP63078837A JP7883788A JPH01251248A JP H01251248 A JPH01251248 A JP H01251248A JP 63078837 A JP63078837 A JP 63078837A JP 7883788 A JP7883788 A JP 7883788A JP H01251248 A JPH01251248 A JP H01251248A
Authority
JP
Japan
Prior art keywords
stack
block
memory
valid
data
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
JP63078837A
Other languages
Japanese (ja)
Inventor
Yoichiro Takeuchi
陽一郎 竹内
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP63078837A priority Critical patent/JPH01251248A/en
Publication of JPH01251248A publication Critical patent/JPH01251248A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute a stack access at high speed by bringing a block memory to make access as a cache memory in accordance with a stack write or read-out request. CONSTITUTION:A block memory BM 12 of a circulating buffer system consisting of plural blocks coordinated with a stack frame of a stack 21 secured in a main storage 20 is provided as a cache memory used exclusively for a stack data structure. When a stack write request is executed, write of data is executed against the next block of the latest effective block, and in case when the number of effective blocks in the BM 12 has reached the first prescribed number, data of the oldest effective block is transferred to the stack 21. Also, when the number of effective blocks in the BM 12 is below the second prescribed value by a read-out request, and also, an effective stack frame exists in the stack 21, the data is transferred to the block immediately before the oldest effective block in the BM 12.

Description

【発明の詳細な説明】 、[発明の目的] (産業上の利用分野) この発明は、主記憶に確保されたスタックを直接アクセ
スすることなくスタックアクセスが実現可能なタックデ
ータ構造用キャッシュメモリ制御方式に関する。
[Detailed Description of the Invention] , [Objective of the Invention] (Industrial Application Field) This invention provides a cache memory control method for tack data structures that enables stack access without directly accessing the stack reserved in main memory. Regarding.

(従来の技術) 主記憶内に確保したスタックを利用する情報処理装置で
は、通常のメモリスペースとスタック用のメモリスペー
スとを区別せず、したがってキャッシュメモリも共通に
使用するのが一般的である。このような情報処理装置に
おけるキャッシュメモリの構成には、離散的なメモリア
クセスに対してヒツト率の高い連想記憶方式を用い、マ
ルチプロセッサ、入出力等を考慮してライトスル一方式
(即ち書込み時には主記憶にも書込みを行ってキャッシ
ュメモリの書込み内容と主メモリの対応領域の内容とを
一致させる方式)が適用される。
(Prior art) In information processing devices that use a stack secured in main memory, there is no distinction between normal memory space and stack memory space, and therefore cache memory is also commonly used. . The configuration of the cache memory in such information processing devices uses an associative memory method with a high hit rate for discrete memory access, and takes into consideration multiprocessors, input/output, etc. A method in which data is also written to the memory and the content written in the cache memory is matched with the content in the corresponding area of the main memory is applied.

一方、スタックに対するメモリアクセスには、−度書込
んだデータはその直後に読出されることが多いという特
徴がある。このため、スタックアクセスにおいて通常メ
モリアクセスと共通のキャッシュメモリを用いる従来方
式では、上記ライトスル一方式による主記憶書込みのバ
スサイクル終了まで次の読出しアクセスが行えず、性能
が低下する問題があった。また、スタックアクセスでキ
ャッシュメモリに格納されたデータが、通常メモリアク
セスでキャッシュメモリから追出され、ヒツト率が低下
する問題もあった。
On the other hand, memory access to the stack is characterized in that data that has been written once is often read immediately after. For this reason, in the conventional method in which a cache memory shared with normal memory access is used for stack access, the next read access cannot be performed until the bus cycle of main memory write by the write-through method is completed, resulting in a decrease in performance. There is also the problem that data stored in the cache memory by stack access is evicted from the cache memory by normal memory access, reducing the hit rate.

(発明が解決しようとする課8) 上記したように従来は、スタックアクセスにおいても通
常のメモリアクセスと同様に共通のキャッシュメモリを
利用していたため、キャツシュヒツト率の低下、更には
スタックアクセスのオーバヘッドの増加等を招く問題が
あった。
(Issue 8 to be solved by the invention) As mentioned above, in the past, a common cache memory was used for stack access as well as for normal memory access, which reduced the cache hit rate and further reduced the overhead of stack access. There was a problem that caused an increase in the number of people.

したがってこの発明は、スタックアクセスの特徴を最大
限生かすことが可能な新規なスタックデータ構造専用の
キャッシュメモリ(ブロックメモリ)により通常最も頻
繁に発生するスタックアクセスの高速化が図れるように
することを解決すべき課題とする。
Therefore, this invention solves the problem of speeding up stack access, which usually occurs most frequently, by creating a cache memory (block memory) dedicated to a new stack data structure that can make maximum use of the characteristics of stack access. This is an issue that should be addressed.

〔発明の構成] (課題を解決するための手段) この発明は、主記憶に確保されたスタックのスタックフ
レームと対応付けられる複数ブロックから成る循環バッ
ファ方式のブロックメモリをスタックデータ構造専用の
キャッシュメモリとして設け、スタック書込み要求され
た場合にはブロックメモリ内の最新の有効ブロックの次
のブロックを対象にデータ書込みを行い、この書込みに
よりブロックメモリ内の有効ブロック数が第1の所定数
に達した場合にはブロックメモリ内の最も古い有効ブロ
ックのデータをスタックに転送し、スタック読出しが要
求された場合にはブロックメモリ内の最新の有効ブロッ
クを対象にデータ読出しを行い、この読出しによってブ
ロックメモリ内の有効ブロック数が第2の所定数を下回
り、且つスタックに有効スタックフレームが存在する場
合には、最新の有効スタックフレームの内容をブロック
メモリ内の最も古い有効ブロックの直前のブロックに転
送するようにしたことを特徴とする。
[Structure of the Invention] (Means for Solving the Problems) The present invention uses a circular buffer type block memory consisting of a plurality of blocks associated with stack frames of a stack secured in main memory as a cache memory dedicated to stack data structures. When a stack write request is made, data is written to the block next to the latest valid block in the block memory, and as a result of this writing, the number of valid blocks in the block memory reaches the first predetermined number. If a stack read is requested, the data of the oldest valid block in the block memory is transferred to the stack, and when a stack read is requested, data is read from the latest valid block in the block memory. When the number of valid blocks is less than a second predetermined number and there is a valid stack frame in the stack, the contents of the latest valid stack frame are transferred to the block immediately before the oldest valid block in the block memory. It is characterized by the following.

(作用) スタックに対するメモリアクセスには、前記した ■−度書込んだデータはその直後に読出されることが多
い。
(Operation) When accessing the memory to the stack, data that has been written twice as described above is often read out immediately after.

という特徴の他に、 ■スタックポインタの指すアドレス近傍にアクセスが集
中する。
In addition to these characteristics, 1.Accesses are concentrated near the address pointed to by the stack pointer.

■書込み時には何ワードかまとめて書込み、その書込み
タイミングをさほど気にしない。即ち、ライトスル一方
式を適用する必要がない。
■When writing, write several words at once, and don't worry about the timing of the writing. That is, there is no need to apply the write-through method.

という特徴がある。上記の構成は、この特徴を利用した
もので、新しい有効ブロックはど先に読出すことが可能
な構造となっており、−度ブロックメモリに書込んだ後
は必ず同ブロックメモリから高速に読出すことができる
。また、主記憶への追出しは最も古い有効ブロックから
行われるので、このブロックのデータの転送中に同デー
タを参照するスタックアクセスが発生する虞は(上記■
There is a characteristic that. The above configuration takes advantage of this feature, and has a structure that allows a new valid block to be read out first, so that after writing to a block memory, it is always read from the same block memory at high speed. I can put it out. Additionally, since the oldest valid block is flushed out to the main memory, there is a risk that a stack access that references the same data will occur during data transfer in this block (see above).
.

■のスタックアクセスの特徴から明らかなように)なく
、したがって上記ブロック転送をバスの空き時間を利用
してタイミングを気にせずに行うことができ、スタック
アクセス(特に書込み直後の読出しアクセス)のオーバ
ヘッドを低下することができる。
As is clear from the characteristics of stack access in (2), the block transfer described above can be performed using free bus time without worrying about timing, and there is no overhead of stack access (especially read access immediately after writing). can be lowered.

(実施例) 第1図はこの発明を適用する情報処理装置のこの発明に
直接関係する部分の一実施例を示すブロック構成図であ
る。同図において、10はCPU。
(Embodiment) FIG. 1 is a block diagram showing an embodiment of a portion directly related to the present invention of an information processing apparatus to which the present invention is applied. In the figure, 10 is a CPU.

20は各種プログラムデータ等が格納される主記憶であ
る。この主記憶20には、レジスタ退避等に供されるス
タック(スタック領域)21が必要に応じて確保される
。CPUl0には、スタック21等を管理するためのス
タック管理機構11.およびスタック21のスタックフ
レームと対応付けられる複数ブロックから成る循環バッ
ファ方式のブロックメモリ(以下、BMと称する)12
が設けられる。8M12はスタックデータ構造専用のキ
ャッシュメモリとして設けられたもので、スタックに格
納すべきデータを同スタックに代えて格納するように構
成される。
20 is a main memory in which various program data and the like are stored. In this main memory 20, a stack (stack area) 21 for saving registers and the like is secured as necessary. The CPU10 includes a stack management mechanism 11. for managing the stack 21 and the like. and a circular buffer type block memory (hereinafter referred to as BM) 12 consisting of a plurality of blocks associated with the stack frame of the stack 21.
is provided. 8M12 is provided as a cache memory dedicated to the stack data structure, and is configured to store data that should be stored in the stack instead of the stack.

スタック管理機構11には、スタック書込み要求に対し
てスタック21に代えて書込むべき8M12内ブロツク
(の位置)を指定するためのブロックメモリポインタB
MPを設定するブロックメモリポインタレジスタ(以下
、BMPレジスタと称する) 13と、8M12が存在
しない(従来例の)場合であればスタック書込み要求に
対する書込み先となるスタック21内スタツクフレーム
(の位置)を指定するための周知のスタックポインタS
PIを設定するスタックポインタレジスタ(以下、SP
I レジスタと称する)14と、スタックポインタSP
2を設定するスタックポインタレジスタ(以下、SP2
レジスタと称する)15とが設けられる。このスタック
ポインタSP2は、8M12において有効なデータが格
納されている最も古いブロック(最も古い有効ブロック
)をスタック21に追出す際の追出し先(スタック21
内スタツクフレーム)を指定するのに用いられる。ここ
で、ブロックメモリポインタBMPの初期値は8M12
の先頭ブロックを示ず0、スタックポインタspi。
The stack management mechanism 11 includes a block memory pointer B for specifying (the position of) a block within the 8M12 to which to write instead of the stack 21 in response to a stack write request.
Block memory pointer register (hereinafter referred to as BMP register) 13 that sets MP, and (position of) stack frame in stack 21 that is the write destination in response to a stack write request if 8M12 does not exist (as in the conventional example). The well-known stack pointer S for specifying
Stack pointer register (hereinafter referred to as SP) that sets the PI
(referred to as I register) 14, and stack pointer SP
2 is set in the stack pointer register (hereinafter referred to as SP2
15 (referred to as a register) are provided. This stack pointer SP2 is the destination (stack 21
This is used to specify the internal stack frame. Here, the initial value of block memory pointer BMP is 8M12
0, stack pointer spi does not indicate the first block.

SF3の初期値は上記ta20内スタック21の先頭ス
タックフレームを示すSPorgである。なお、8M1
2内ブロツクおよびスタック21内スタツクフレームは
複数エントリから構成されており、したがってそのエン
トリを指定するためには、オフセット(オフセットアド
レス)も必要であるが、ブロック(スタックフレーム)
を指定する情報とオフセットにより目的エントリをアク
セスする技術は周知であることから、オフセットについ
ては説明を省略する。
The initial value of SF3 is SPorg indicating the top stack frame of the stack 21 in ta20. In addition, 8M1
The block in block 2 and the stack frame in stack 21 consist of multiple entries, so an offset (offset address) is also required to specify the entry, but the block (stack frame)
Since the technique of accessing the target entry using the information specifying the offset and the information specifying the offset is well known, a description of the offset will be omitted.

次に、第1図の構成の動作を第2図のフローチャートを
参照して説明する。まず、CPUl0においてスタック
アクセス要求(命令)が発せられると、スタック管理機
構11は同要求が(スタック21への)書込み要求であ
るか否(読出し要求である)かを調べ(ステップS1)
、書込み要求であればBMPレジスタ13に設定されて
いるブロックメモリポインタBMPの指すBML2内ブ
ロツブロックとして、従来であればスタック21へ格納
すべきデータの書込みを行う(ステップS2)。ここで
はSPI レジスタ14に設定されているスタックポイ
ンタSPIの指すスタック21内スタツクフレームへの
書込みが行われないことに注意されたい。
Next, the operation of the configuration shown in FIG. 1 will be explained with reference to the flowchart shown in FIG. First, when a stack access request (instruction) is issued in CPUl0, the stack management mechanism 11 checks whether the request is a write request (to the stack 21) or not (a read request) (step S1).
, if it is a write request, the data that would conventionally be stored in the stack 21 is written as a block in BML2 pointed to by the block memory pointer BMP set in the BMP register 13 (step S2). Note that writing to the stack frame in the stack 21 pointed to by the stack pointer SPI set in the SPI register 14 is not performed here.

スタック管理機構11は、ステップS2を終了するとB
MPレジスタ13のブロックメモリポインタBMPを次
のブロックを指定するように進め、SPI レジスタ1
4のスタックポインタSP1を次のスタックフレームを
指定するように進める(ステップ83〜S6)。ここで
、上記した“次のブロック“とは、現BMPが8M12
内最終ブロツクを指すBMPmaxに一致していなけれ
ばBMP 十1で示されるブロックであり、B M P
 l1axに一致しているならば0で示されるブロック
(先頭ブロック)である。即ち、8M12は、循環バッ
ファ方式で用いられる。明らかなように、ステップs3
〜S6実行後のポインタBMPの指定するスタック管理
機構ll内ブロックの直前のブロックは、最新の有効ブ
ロックとなっている。
When the stack management mechanism 11 finishes step S2, the stack management mechanism 11 performs B
Advance block memory pointer BMP in MP register 13 to specify the next block, and
4 stack pointer SP1 is advanced to specify the next stack frame (steps 83 to S6). Here, the above-mentioned "next block" means that the current BMP is 8M12
If it does not match BMPmax indicating the last block in the block, it is the block indicated by BMP 11, and BMP
If it matches l1ax, it is a block indicated by 0 (first block). That is, 8M12 is used in a circular buffer manner. As is clear, step s3
~The block immediately before the block in the stack management mechanism 11 specified by the pointer BMP after execution of S6 is the latest valid block.

スタック管理機構11は、ステップ83〜s6を終了す
ると、8M12内の有効ブロック数が第1の所定数(例
えば8M12が持つブロック数)に達したか否かをSP
Iレジスタ14のスタックポインタSPIをもとに(例
えばSPIがSPorg+B M P a+axより大
きいか否かにより)判定する(ステップS7)。もしス
テップS7の判定がYESであれば(ここでは、8M1
2がFULL状態になったことが判定されたならば)、
スタック管理機構11は空きブロック(無効ブロック)
を確保する(ここではBMPの指す8M12内ブロツク
を空きブロックとする)ために、BMPレジスタ13の
ブロックメモリポインタBMPの指す8M12内ブロツ
クの内容をSP2レジスタ15のスタックポインタSP
2の示すスタック21内スタツクフレームへ転送し、し
かる後にスタックポインタSP2を次のスタックフレー
ムを指すように進めてスタックアクセス(書込み)要求
に対する処理を終了する(ステップS8.39)。これ
に対して、ステップS7の判定がNOであれば(ここで
は、8M12がFULL状態になければ)、スタック管
理機構11はそのままスタックアクセス(書込み)要求
に対する処理を終了する。なおSF3>SPOrg場合
には、S Porg −8P2−1で示される各スタッ
クフレームが有効スタックフレームとなっていることは
明らかである。
After completing steps 83 to s6, the stack management mechanism 11 determines whether the number of valid blocks in 8M12 has reached a first predetermined number (for example, the number of blocks held by 8M12).
A determination is made based on the stack pointer SPI of the I register 14 (for example, depending on whether SPI is greater than SPorg+BMPa+ax) (step S7). If the determination in step S7 is YES (here, 8M1
If it is determined that 2 is in the FULL state),
The stack management mechanism 11 is an empty block (invalid block)
(Here, the 8M12 block pointed to by BMP is assumed to be a free block), the contents of the 8M12 block pointed to by the block memory pointer BMP of the BMP register 13 are transferred to the stack pointer SP of the SP2 register 15.
Then, the stack pointer SP2 is advanced to point to the next stack frame, and the processing for the stack access (write) request is completed (step S8.39). On the other hand, if the determination in step S7 is NO (here, 8M12 is not in the FULL state), the stack management mechanism 11 directly ends the processing for the stack access (write) request. Note that when SF3>SPOrg, it is clear that each stack frame indicated by SPorg-8P2-1 is a valid stack frame.

次に、スタックアクセス要求が(スタック21からの)
読出し要求である場合について説明する。
Next, a stack access request (from stack 21)
The case of a read request will be explained.

この場合、スタック管理機構11はSPIレジスタ14
のスタックポインタSPIを直前のスタックフレームを
指定するように戻し、且つBMPレジスタ13のブロッ
クメモリポインタBMPを旧BMP(ポインタBMPo
ld)として内部保持する(ステップSIO,5ll)
。次にスタック管理機構11は、BMPレジスタ13の
ポインタBMPを直前のブロックを指定するように戻し
くステップS12〜514)、このブロック(即ち、最
新の有効ブロック)からの(従来であればキャッシュメ
モリまたはスタック21から読出すべき)データの読出
しを行う(ステップ515)。なお、上記した“直前の
ブロック″とは、ステップ812〜S14実行前のBM
P (BMPold )がBML2内先頭ブロックを指
す0に一致していなければBMP−1で示されるブロッ
クであ、す、一致しているならばB M P IaXで
示されるブロック(最終ブロック)である。
In this case, the stack management mechanism 11
The stack pointer SPI of the BMP register 13 is returned to specify the previous stack frame, and the block memory pointer BMP of the BMP register 13 is changed back to the old BMP (pointer BMPo
ld) (step SIO, 5ll)
. Next, the stack management mechanism 11 returns the pointer BMP of the BMP register 13 to specify the previous block (steps S12 to S514), and returns the pointer BMP of the BMP register 13 to specify the previous block (in the conventional case, the cache memory or the data to be read from the stack 21 (step 515). Note that the above-mentioned "immediately preceding block" refers to the BM before the execution of steps 812 to S14.
If P (BMPold) does not match 0 indicating the first block in BML2, it is the block indicated by BMP-1, and if it matches, it is the block indicated by BMP IaX (last block). .

スタック管理機構11は、ステップS15を終了す゛る
と、8M12内の有効ブロック数が第2の所定数を下回
り、且つスタック2■に有効スタックフレームが存在す
るか否かを判定する。ここでは、上記の第2の所定数は
8M12が持つブロック数であり、したがってステップ
315を行えば必ず第2の所定数を下回ることから、こ
の点に関する判定は不要である。そこでここでは、上記
2種の判定のうち、スタック21に有効スタックフレー
ムが存在するか否かの判定だけが、例えばSP2レジス
タ15のスタックポインタSP2がSPorgより大き
いか否かをもとに行われる(ステップ816)。もし、
SF3がSPorgより大きい場合、即ちスタック21
に有効スタックフレームが存在する場合、スタック管理
機構11はスタック21内の最新の有効スタックフレー
ムを指定するためにSP2レジスタ15のスタックポイ
ンタSP2を戻した後、この新たなSF3の指すスタッ
ク2■内のスタックフレーム(最新の有効スタックフレ
ーム)の内容をステップSllで内部保持しておいたB
 M P old  (旧BMP)の指す8M12内ブ
ロツクへ転送し、スタックアクセス(読出し)要求に対
する処理を終了する(ステップS 17.  S 18
)。これに対して、ステップS1Bの判定がNoであれ
ば(スタック21に有効なスタックフレームが存在しな
ければ)、スタック管理機構11はそのままスタックア
クセス(読出し)要求に対する処理を終了する。
After completing step S15, the stack management mechanism 11 determines whether the number of valid blocks in 8M12 is less than the second predetermined number and whether or not there is a valid stack frame in stack 22. Here, the second predetermined number is the number of blocks that 8M12 has, and therefore, if step 315 is performed, the number will definitely fall below the second predetermined number, so there is no need to make a determination regarding this point. Therefore, of the above two types of determination, only the determination of whether or not a valid stack frame exists in the stack 21 is performed based on, for example, whether or not the stack pointer SP2 of the SP2 register 15 is larger than SPorg. (Step 816). if,
If SF3 is larger than SPorg, i.e. stack 21
If there is a valid stack frame in the stack 21, the stack management mechanism 11 returns the stack pointer SP2 of the SP2 register 15 to specify the latest valid stack frame in the stack 21, and then returns the stack pointer SP2 in the stack 2■ pointed to by this new SF3. The contents of the stack frame (the latest valid stack frame) are internally held in step Sll.
Transfer to the block in 8M12 pointed to by M P old (old BMP) and end the process for the stack access (read) request (steps S17 and S18).
). On the other hand, if the determination in step S1B is No (if there is no valid stack frame in the stack 21), the stack management mechanism 11 directly ends the processing for the stack access (read) request.

以上は、1つのスタックアクセス要求を実行する毎にス
タックポインタSPI、  ブロックメモリポインタB
MPが更新される場合について説明したが、ローカル変
数処理などのように1つのスタックフレームを対象とし
て書込み/読出しが繰返される場合にも、応用できる。
In the above, each time one stack access request is executed, the stack pointer SPI, block memory pointer B
Although the case where MP is updated has been described, it can also be applied to cases where writing/reading is repeated for one stack frame, such as in local variable processing.

また、前記実施例では、前記のスタック管理に用いられ
るスタックポインタSPIの他に、スタックポインタS
P2およびブロックメモリポインタBMPを設けて、ス
タックデータ構造専用のキャッシュメモリ制御を行うも
のとして説明したが、SF3゜BMPを用意しなくても
SF3.BMPに要求される機能はSPlと8M12の
ブロック数をもとに実現することは可能である。
Further, in the embodiment, in addition to the stack pointer SPI used for the stack management, the stack pointer S
Although the explanation has been made assuming that cache memory control dedicated to the stack data structure is performed by providing P2 and block memory pointer BMP, SF3. The functions required for BMP can be realized based on SP1 and the number of blocks of 8M12.

[発明の効果] 以上詳述したようにこの発明によれば、次に列挙する作
用効果を奏することができる。
[Effects of the Invention] As described in detail above, according to the present invention, the following effects can be achieved.

■ スタックアクセスの特徴を最大限生かすことが可能
な新規なスタックデータ構造専用のギャッシュメモリ(
ブロックメモリ)を対象としてスタックアクセスが行わ
れるため、処理速度が向上する。
■ Gash memory dedicated to a new stack data structure that can take full advantage of the features of stack access (
Since stack access is performed for block memory), processing speed is improved.

■ スタック書込みアクセスにおいて、主記憶への書込
みのためのバスアクセスが生じないため、特にスタック
書込みアクセスの直後にスタック読出しアクセスを行お
うとした場合のオーバヘッドが解消される。
(2) In stack write access, no bus access for writing to the main memory occurs, so the overhead especially when trying to perform stack read access immediately after stack write access is eliminated.

■ ブロックメモリから主記憶への転送(追出し)対象
となるブロックは、その時点で最も古い有効ブロックで
あるため、このブロックのデータの転送中に同データを
参照するためのスタ・ツクアクセスが発生ずる虞はなく
、シたがって上記の転送はバスの空き時間に行えばよく
、この転送に起因するメモリアクセスのオーバヘッドは
殆どない。
■ The block to be transferred (evicted) from block memory to main memory is the oldest valid block at that time, so a stack access to reference the data is generated while the data in this block is being transferred. There is no risk that this will occur, and therefore the above transfer can be performed during bus free time, and there is almost no memory access overhead caused by this transfer.

■ ブロックメモリから主記憶へ転送された(追出され
た)ブロックデータは、同データが参照されるまでには
ブロックメモリに戻され、データ参照時には最新のブロ
ックデータとなるため、ブロックメモリを対象とするデ
ータ参照が行える。
■ Block data transferred (evicted) from block memory to main memory is returned to block memory before it is referenced, and when data is referenced, it becomes the latest block data, so block memory is targeted. You can refer to the data as follows.

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

第1図はこの発明の一実施例を示すブロック構成図、第
2図は動作を説明するためのフローチャートである。 ■1・・・スタック管理機構、12・・・ブロックメモ
リ(BM) 、13・・・ブロックメモリポインタレジ
スタ(BMPレジスタ)、14・・・スタックポインタ
レジスタ(S Pi レジスタ)、15・・・スタック
ポインタレジスタ(S P2レジスタ)、20・・・主
記憶、21・・・スタック。 出願人代理人  弁理士 鈴江武彦 第1図 第2図
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a flowchart for explaining the operation. ■1... Stack management mechanism, 12... Block memory (BM), 13... Block memory pointer register (BMP register), 14... Stack pointer register (SPi register), 15... Stack Pointer register (S P2 register), 20... Main memory, 21... Stack. Applicant's agent Patent attorney Takehiko Suzue Figure 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] 主記憶に確保されたスタックに格納すべきデータを同ス
タックに代えて格納するための上記スタックのスタック
フレームと対応付けられる複数ブロックから成る循環バ
ッファ方式のブロックメモリと、スタック書込み要求に
応じ上記ブロックメモリ内の最新の有効ブロックの次の
ブロックを対象にデータ書込みを行うブロックメモリ書
込み手段と、このブロックメモリ書込み手段の書込みに
より上記ブロックメモリ内の有効ブロック数が第1の所
定数に達した場合に上記ブロックメモリ内の最も古い有
効ブロックの内容を上記主記憶に転送して上記スタック
に積む第1転送手段と、スタック読出し要求に応じ上記
ブロックメモリ内の最新の有効ブロックを対象にデータ
読出しを行うブロックメモリ読出し手段と、このブロッ
クメモリ読出し手段の読出しによって上記ブロックメモ
リ内の有効ブロック数が第2の所定数を下回り、且つ上
記スタックに有効スタックフレームが存在する場合には
、最新の有効スタックフレームの内容を上記ブロックメ
モリに転送し、同メモリ内の最も古い有効ブロックの直
前のブロックに書込む第2転送手段とを具備し、上記ス
タック書込みまたは読出し要求に応じて上記ブロックメ
モリをキャッシュメモリとしてアクセスするようにした
ことを特徴とするスタックデータ構造用キャッシュ制御
方式。
A circular buffer type block memory consisting of a plurality of blocks associated with the stack frame of the stack for storing data to be stored in the stack reserved in the main memory instead of the same stack, and a block memory of the above-mentioned block in response to a stack write request. a block memory writing means for writing data to a block next to the latest valid block in the memory, and when the number of valid blocks in the block memory reaches a first predetermined number due to writing by the block memory writing means; a first transfer means for transferring the contents of the oldest valid block in the block memory to the main memory and stacking it on the stack; and a first transfer means for reading data from the latest valid block in the block memory in response to a stack read request. If the number of valid blocks in the block memory becomes less than a second predetermined number due to reading by the block memory reading means and there is a valid stack frame in the stack, the latest valid stack frame is read. and a second transfer means for transferring the contents of the frame to the block memory and writing it to the block immediately before the oldest valid block in the memory, and transferring the block memory to the cache memory in response to the stack write or read request. A cache control method for a stack data structure, characterized in that it is accessed as a stack data structure.
JP63078837A 1988-03-31 1988-03-31 Cache control system for stack data structure Pending JPH01251248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63078837A JPH01251248A (en) 1988-03-31 1988-03-31 Cache control system for stack data structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63078837A JPH01251248A (en) 1988-03-31 1988-03-31 Cache control system for stack data structure

Publications (1)

Publication Number Publication Date
JPH01251248A true JPH01251248A (en) 1989-10-06

Family

ID=13672941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63078837A Pending JPH01251248A (en) 1988-03-31 1988-03-31 Cache control system for stack data structure

Country Status (1)

Country Link
JP (1) JPH01251248A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606743B1 (en) 1996-11-13 2003-08-12 Razim Technology, Inc. Real time program language accelerator
JP2004303232A (en) * 2003-03-20 2004-10-28 Matsushita Electric Ind Co Ltd Data memory cache device and data memory cache system
US6948034B2 (en) 2001-11-30 2005-09-20 Nec Corporation Method for use of stack

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS573285A (en) * 1980-06-09 1982-01-08 Fuji Electric Co Ltd Buffer storage control system
JPS593772A (en) * 1982-06-29 1984-01-10 Fujitsu Ltd Control system for double hierarchical stack
JPS59146344A (en) * 1983-02-10 1984-08-22 Fujitsu Ltd Advance control system of virtual stack

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS573285A (en) * 1980-06-09 1982-01-08 Fuji Electric Co Ltd Buffer storage control system
JPS593772A (en) * 1982-06-29 1984-01-10 Fujitsu Ltd Control system for double hierarchical stack
JPS59146344A (en) * 1983-02-10 1984-08-22 Fujitsu Ltd Advance control system of virtual stack

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606743B1 (en) 1996-11-13 2003-08-12 Razim Technology, Inc. Real time program language accelerator
US6948034B2 (en) 2001-11-30 2005-09-20 Nec Corporation Method for use of stack
JP2004303232A (en) * 2003-03-20 2004-10-28 Matsushita Electric Ind Co Ltd Data memory cache device and data memory cache system

Similar Documents

Publication Publication Date Title
US4648033A (en) Look-aside buffer LRU marker controller
JPS62102344A (en) Buffer memory control system
JPS5829187A (en) Cache memory controller
JPH01251248A (en) Cache control system for stack data structure
JPS6022376B2 (en) Cache memory control device
JP3006204B2 (en) Information processing device
JP2703255B2 (en) Cache memory writing device
JPH0526216B2 (en)
JP2636760B2 (en) Multiprocessor system
JP3260566B2 (en) Storage control method and storage control device in information processing system
JPH05100926A (en) Input/output managing system
JPS6135583B2 (en)
JPS6410858B2 (en)
JPH0553912A (en) Control method for cache memory
JPS5894182A (en) Buffer memory managing system
JPH02259945A (en) Storing processing system
JPS5842546B2 (en) Store control method
JPS63259749A (en) Virtual storage control system
JPS59195753A (en) Control system of disc cache memory
JPH0612363A (en) Memory controller and multiprocessor system
JPS63311548A (en) Cache memory controlling system
JPS62226348A (en) Main memory and concurrently main memory control device
JPH0387949A (en) Cache memory controller
JPS62127943A (en) Instruction buffer control system
JPH04264641A (en) Cache memory system