JPS59142791A - Access control system of stack memory - Google Patents

Access control system of stack memory

Info

Publication number
JPS59142791A
JPS59142791A JP58017092A JP1709283A JPS59142791A JP S59142791 A JPS59142791 A JP S59142791A JP 58017092 A JP58017092 A JP 58017092A JP 1709283 A JP1709283 A JP 1709283A JP S59142791 A JPS59142791 A JP S59142791A
Authority
JP
Japan
Prior art keywords
pointer
stack
register
data
address
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
JP58017092A
Other languages
Japanese (ja)
Inventor
Masashi Niwa
雅司 丹羽
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 JP58017092A priority Critical patent/JPS59142791A/en
Publication of JPS59142791A publication Critical patent/JPS59142791A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To perform fast stack access by setting up plural stack pointers and preventing the data saving of the stack pointers and a loading step from entering in a stack access time. CONSTITUTION:When a stack 14 is accessed, the number of a pointer in use is inputted as a signal APN to a control circuit 18, which performs the access by generating a selection signal SLT so that the pointer value coincident with the pointer number in a pointer register 22 is supplied as an address to the stack 14. The circuit 18 searches the data pointer number part of the register 22 on the basis of a signal PPN, and when a corresponding number is not found, a specific address given to the pointer of a main storage MS is accessed to read its contents, which are registered in the register 22 together with the pointer number. If there is another a pointer number and value beside the entry, they are saved in a specific area of the main storage MS. Those values are loaded and saved under the control of an LRU (Least Recenthy Used) circuit 20.

Description

【発明の詳細な説明】 発明の技術分野 本発明はスタックメモリのアクセス制御方式に関し、ス
タック高速アクセスを可能にしようとするものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a stack memory access control system and is intended to enable high-speed stack access.

従来技術と問題点 計算機で主記憶から読出したデータの一時的格納または
割込み発生時などのレジスタ内容の一時的退避に、スタ
ックが使用される。スタックは本質的には普通のメモリ
で、アドレスとデータ格納領域を持つが、アクセスの仕
方が若干界なる。即ち普通のメモリではランダムアクセ
スであるのに対し、スタックでは逐次的つまりあるアド
レスでアクセスし次はそのアドレスに+1したアドレス
又は−lしたアドレスでアクセスするという方式をとる
。第1図は従来のスタックメモリ装置の概要を示すブロ
ック図で、10は中央処理装置、12はポインタレジス
タ、14はスタック(メモリ)、16はデータレジスタ
である。スタック14のアクセスに当り中央処理装置1
0は線11をしてレジスタ12にアドレスをセントし、
スタック14は該アドレスつまりレジスタ12の内容に
よりアクセスされ、読取りならスタック14から続出さ
れたデータがレジスタ16を介して中央処理装置10へ
取込まれ、書込みなら中央処理装置10がレジスタ16
へ送ったデータがスタック14に書込まれる。次のアク
セスは、中央処理装置が線ρ2をしてポインタレジスタ
12にその内容のインクレメントまたはデクレメントを
指示し、上記のアドレスより1大きい又は1小さいアド
レスによりなされることが多い。±°1アドレスではな
く、かけはなれたアドレスでのアクセスは、中央処理装
置10が当該アドレスをポインタレジスタにセントする
ことにより行なわれる。
Prior Art and Problems Stacks are used in computers to temporarily store data read from main memory or to temporarily save register contents when an interrupt occurs. The stack is essentially a normal memory, with addresses and data storage areas, but there are some restrictions on how it can be accessed. That is, while a normal memory is accessed randomly, a stack uses a method of accessing sequentially, that is, using a certain address and then accessing that address by +1 or -l. FIG. 1 is a block diagram showing an outline of a conventional stack memory device, in which 10 is a central processing unit, 12 is a pointer register, 14 is a stack (memory), and 16 is a data register. When accessing the stack 14, the central processing unit 1
0 sends the address to register 12 through line 11,
The stack 14 is accessed according to the address, that is, the contents of the register 12, and in the case of reading, the data sequentially output from the stack 14 is taken into the central processing unit 10 via the register 16, and in the case of writing, the central processing unit 10 reads the data from the register 16.
The data sent to is written to the stack 14. The next access is often made by the central processing unit using line ρ2 to instruct the pointer register 12 to increment or decrement its contents, using an address that is one greater or one less than the above address. Accessing an address that is far apart from the ±°1 address is performed by the central processing unit 10 placing the address in a pointer register.

スタックアクセスは、アドレスをポインタレジスタにセ
ントしまたは該レジスタの内容を±1し、。
A stack access places an address into a pointer register or ±1s the contents of that register.

そのレジスタのアドレスでスタックをアクセスし、とい
う2段階動作になり、スタック高速アクセスという点で
従来方式は不充分である。スタックは中央処理装置と連
動するので、中央処理装置の高速動作に支障を与えない
よう可及的に高速アクセス可能なことが望まれる。
The conventional method is insufficient in terms of high-speed access to the stack because it requires a two-step operation in which the stack is accessed using the address of the register. Since the stack works in conjunction with the central processing unit, it is desired that it can be accessed as quickly as possible without interfering with the high-speed operation of the central processing unit.

発明の目的 本発明はスタックの一層の高速アクセスを可能にしよう
とするもので、複数個のスフ・ツクポインタを用意し、
一方のスタックポインタによるスフツクアクセス中に他
方のスフ・ツクポインタのデータをプリフェッチしてお
いて該一方のスフ・ツクポインタによるスタックアクセ
スが終ったら直ちGこ該他方゛のスタックポインタによ
るスフ・ツクアクセスが可能になるようにし、こうして
スフ・7クポインタのデータセーブ、ロードステ・ノブ
がスフ・ツクアクセスタイムに入らないようにしてスフ
・ツク高速アクセスを可能にしようとするものである。
OBJECTS OF THE INVENTION The present invention aims to enable even faster access to the stack, by preparing a plurality of stack pointers,
During a quick access by one stack pointer, the data of the other stack pointer is prefetched, and as soon as the stack access by that one stack pointer is completed, the data is prefetched by the other stack pointer. In this way, it is possible to save the data of the quick 7 pointer and prevent the load steering knob from entering the quick access time, thereby making quick access possible.

発明の構成 本発明はスフツクポインタを備えて該ポインタが格納す
るアドレスによりアクセスされるスフ・ツクメモリのア
クセス制御方式において、ス外ツク、1ソインタを複数
個設けて各ポインタにポインタ番号と共にスタックアト
レスが格納され、スフ・ツクアクセス時にはポインタ番
号を指定して当該番号のポインタのスタックアドレスを
出力させ、力)つ該スタックアクセスに先立って当該ポ
インタ番号がスタックポインタ中にあるか否かをチェ・
ツクして、なければ外部メモリより当該スフ・ツクポイ
ンタのスタックアドレスを取り出してポインタ番号と共
にスタックポインタへ格納しておくことを特徴とするが
、次に実施例を参照しながらこれを詳細に説明する。
Structure of the Invention The present invention provides an access control method for a quick memory that is provided with a quick pointer and is accessed by an address stored in the pointer. When accessing the stack, a pointer number is specified and the stack address of the pointer with that number is output, and before the stack access, it is checked whether the pointer number is in the stack pointer.・
The feature is that the stack address of the pointer is retrieved from the external memory and stored in the stack pointer together with the pointer number.This will be explained in detail below with reference to an embodiment. do.

発明の実施例 第2図は本発明の実施例を示し、14は前述のスタック
である。スフツクには状態退避用の制御スタックとデー
タ一時保管用のデータスク・ツクがあるが、本例では後
者を想定している。スフ・ツクが制御用の場合ポインタ
は制御ツク・ツクポインタレジスタC3R、データ用の
場合データスク・ツクポインタレジスタDSRなどと呼
ばれる。こ−ではデータポインタレジスタ、データポイ
ンタあるし)は単にポインタと適宜略称する。18はス
フ・ツクメモリ装置を制御する回路で、データポインタ
レジスタ22、L RIJ (Least Recen
tly  1Jsed)回路20、マルチプレクサ24
、およびスフ・ツク14の制御を行なう。データポイン
タレジスタ22は第1図ではポインタレジスタと呼んだ
ものであるが、第1図の従来方式では該レジスタGよ1
うであるのに対して第2図の本発明方式で番まこれ力り
4反想的に複数個ある点が特徴的である。仮想的としよ
、このレジスタには高速書込み読取り力(可能なメモリ
などを利用してもよく、厳密に独立したレジスタ複数本
を要するということで番よなし1カ・らである。
Embodiment of the Invention FIG. 2 shows an embodiment of the invention, in which 14 is the stack described above. The architecture has a control stack for saving status and a data disk for temporarily storing data, and this example assumes the latter. When the screen is for control, the pointer is called control pointer register C3R, and when it is for data, it is called data pointer register DSR. Here, data pointer register, data pointer, etc.) will be simply abbreviated as pointer as appropriate. Reference numeral 18 denotes a circuit for controlling the short memory device, which includes a data pointer register 22, LRIJ (Least Receiver
tly 1Jsed) circuit 20, multiplexer 24
, and controls the screen 14. The data pointer register 22 is called a pointer register in FIG. 1, but in the conventional system shown in FIG.
On the other hand, the method of the present invention shown in FIG. 2 is characterized in that there are a plurality of number of rotations. Assuming that this register is hypothetical, it is possible to use a memory that has high-speed write/read capability (memory, etc.), and there is no limit to the number of registers because it requires a plurality of strictly independent registers.

ポインタレジスタが複数個あるので本発明で番!十目互
を区別するため番号を付ける。データ4ミインタ番号が
それで、第3図に示すようGここれ番ま1.5゜2など
とされる。勿論これは識別コードとし)うことであって
、他の番号でも符号でもよし)。ポインタの内容はアド
レスであり、−これをこ\でしまデータポインタ値と呼
ぶ。第3図では隘lのポインタはアドレス2000を指
しており、M5の、!インクはアドレス6000を指し
てむする。以下これGこ準する。このアドレス2000
.3000.・・・・・・はスフ・7り14のアドレス
を指しており、第3図に示すようにデータプロ・ツクA
、B・・・・・・力くアト”レス2000,3000.
・・・・・・から始まる所定メモリ領域に格納されてい
るとき、該データブロックA、B、・・・・・・に対す
るポインタ1,2.・・・・・・のポインタ値は200
0,3000.・・・・・・となる。本例ではスタック
14には10ブロック程度のデータブロックが格納され
、ポインタは各デーダブbツクに対応させてポインタ番
号1,2.・・・・・・10の10個あり、そしてポイ
ンタレジスタ22には4ポインタが格納できると仮定し
ている。制御回路18は主記憶MSとデータバスDBな
どを介して接続されており、読取り書込み指示R/W及
びアドレスADDを送って主記憶MSをアクセスできる
。PPN及びAPNは入力信号で、前者はブリフェッチ
指示データポインタ番号、後者はアク、セスするデータ
ポインタ番号を示す。SLTはマルチプレクサ24に対
する選択信号、WEはスタック14に対するライトイネ
ーブル信号、DIは入力データ、Doは出力データを示
す。
Since there are multiple pointer registers, this invention is useful! Numbers are given to distinguish between ten marks. The data 4 is the inter-number, and as shown in FIG. Of course, this is to be an identification code, and any other number or code may be used). The content of the pointer is an address, which is called the \deshima data pointer value. In FIG. 3, the pointer 01 points to address 2000, and M5's ! The ink points to address 6000 and dies. The following is based on G. this address 2000
.. 3000. . . . refers to the address of Suf.7ri14, and as shown in Figure 3, Data Pro Tsuk A
, B...... forcefully at"res 2000, 3000.
When stored in a predetermined memory area starting from . . . , pointers 1, 2 . . . to the data blocks A, B, . . . The pointer value of ... is 200
0,3000. It becomes... In this example, about 10 data blocks are stored in the stack 14, and pointers are assigned pointer numbers 1, 2, . . . corresponding to each data dub block. It is assumed that there are 10 points, and that the pointer register 22 can store 4 pointers. The control circuit 18 is connected to the main memory MS via a data bus DB, etc., and can access the main memory MS by sending a read/write instruction R/W and an address ADD. PPN and APN are input signals, the former indicating a brief fetch instruction data pointer number and the latter indicating a data pointer number to be accessed. SLT is a selection signal for the multiplexer 24, WE is a write enable signal for the stack 14, DI is input data, and Do is output data.

この装置では中央処理装置がスタック14をアクセスす
るとき、当該アクセスで使用するポインタの番号を制御
回路18に信号APNとして入力し、制御回路18はポ
インタレジスタ22内の該ポインタ番号と一致するもの
のポインタ値がスタック14にアドレスとして与えられ
るように、マルチプレクサ24の選択信号SL’rを生
成し、こうしてスタックアクセスが行なわれる。また制
御回路18はブリフェッチすべきデータボインクの番号
を示す信号PPNに基すいてポインタレジスタ22のデ
ータポインタ番号部をサーチし、ブリフェッチ指示され
たポインタ番号が存在するか否かを調べ、存在すればそ
のま\であるが、存在しなければ主記憶MSの当該ポイ
ンタ(番号)に与えられた所定アドレスをアクセスして
その内容つまり当該ポインタの値を読取る。この値は当
該ポインタ番号と共にポインタレジスタ22に登録する
。この登録がなされるポインタレジスタ22のエントリ
に他のデータポインタ番号および値があれば、これらは
当該ポインタに与えられた主記憶MSの所定領域にセー
ブする。これらのデータポインタ番号及び値をロード、
セーブするエントリの管理はLRU回路20が行ない、
これは最近使用されたポインタを1憂先するというアル
ゴリズムで、従って新しくプリフェッチしたポインタ番
号及び値は、最も古くからあるポインタ番号および値の
エントリを解放してそこへ格納するという態様で行なわ
れる。
In this device, when the central processing unit accesses the stack 14, the number of the pointer used in the access is inputted to the control circuit 18 as the signal APN, and the control circuit 18 inputs the pointer number of the pointer in the pointer register 22 that matches the pointer number. A selection signal SL'r for the multiplexer 24 is generated so that the value is applied to the stack 14 as an address, thus performing stack access. The control circuit 18 also searches the data pointer number section of the pointer register 22 based on the signal PPN indicating the number of the data boink to be briefetched, checks whether or not the pointer number instructed to be briefetched exists, and determines whether or not it exists. However, if it does not exist, a predetermined address given to the pointer (number) in the main memory MS is accessed and its contents, that is, the value of the pointer is read. This value is registered in the pointer register 22 together with the pointer number. If there are other data pointer numbers and values in the entry of the pointer register 22 to which this registration is made, these are saved in a predetermined area of the main memory MS given to the pointer. Load these data pointer numbers and values,
The LRU circuit 20 manages the entries to be saved.
This is an algorithm that places the most recently used pointer first, so newly prefetched pointer numbers and values are stored in the oldest pointer number and value entries by freeing them.

ポインタブリフェッチは、あるポインタでのスタックア
クセス中に行なう。次のポインタは何であるかはプログ
ラムの内容を見れば明らかであり、これにより中央処理
装置はブリフェッチ指示データポインタ番号を示す信号
PPNを制御回路18へ送ることができる。具体的には
プリフェッチはマイクロプログラムで行なう。スタック
アクセス中に次のポインタをポインタレジスタ22に用
意しておけば、選択信号SLTによりマルチプレクサ2
4を操作するだけでスタック14の次のポインタにより
アクセスを行なうことができ、該次のポインタによるア
クセスの時点になって該次のポインタのポインタ値をロ
ードし、それによりスタックアクセスアドレスを得ると
いう処理は不必要であるから、スタックアクセスを高速
化することができる。またこの複数ポインタ方式ではス
タ・ツク中の各データブロックにそれぞれポインタを割
当てておけるので、プログラマは従来方式のようにポイ
ンタレジスタ12の内容を考えながら(所望のものでな
ければセーブ、ロードステ・ノブを入れて)プログラム
を作成する必要がなく、単に当該データブロックを当該
ポインタで読み出すというプログラムにすることができ
、プログラム作成が容易になる。またポインタは一部の
みポインタレジスタへ持って来て残りは主記憶ヘセーブ
しておくので、ポインタレジスタは小容量でよい。
A pointer refetch is performed during a stack access at a pointer. It is clear what the next pointer is by looking at the contents of the program, so that the central processing unit can send the signal PPN indicating the briefetch instruction data pointer number to the control circuit 18. Specifically, prefetching is performed by a microprogram. If the next pointer is prepared in the pointer register 22 during stack access, the selection signal SLT allows the multiplexer 2 to
4, the next pointer on the stack 14 can be accessed, and at the time of access by the next pointer, the pointer value of the next pointer is loaded, thereby obtaining the stack access address. Since no processing is required, stack access can be speeded up. In addition, in this multiple pointer method, a pointer can be assigned to each data block in the stack, so the programmer can consider the contents of the pointer register 12 as in the conventional method. There is no need to create a program (by inserting the above), and the program can simply read the data block using the pointer, making it easier to create the program. Also, since only a portion of the pointer is brought to the pointer register and the rest is saved in the main memory, the pointer register only needs to have a small capacity.

発明の詳細 な説明したように本発明によれば、スタ・ツクポインタ
のロード、セーブのオーバへ・ノドを削減でき、スタッ
クのアクセスを高速に行なうことができるなどの利点が
得られる。
As described in detail, the present invention provides advantages such as reducing stack pointer loading and saving overload and speeding up stack access.

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

第1図はスタックメモリ装置の概要を示すブロック図、
第2図は本発明の実施例を示すプロ・ツク図、第3図は
ポインタレジスタの内容の説明図である。 図面で、10は中央処理装置、12はポインタレジスタ
、14はスタックメモリ、16はデータレジスタ、18
は制御回路、2oはLRU回路、22はポインタレジス
タ、24はマルチプレクサである。 出願人 富士通株式会社 代理人弁理士  青  柳    稔
FIG. 1 is a block diagram showing an overview of a stack memory device.
FIG. 2 is a program diagram showing an embodiment of the present invention, and FIG. 3 is an explanatory diagram of the contents of a pointer register. In the drawing, 10 is a central processing unit, 12 is a pointer register, 14 is a stack memory, 16 is a data register, 18
20 is a control circuit, 2o is an LRU circuit, 22 is a pointer register, and 24 is a multiplexer. Applicant Fujitsu Limited Representative Patent Attorney Minoru Aoyagi

Claims (1)

【特許請求の範囲】[Claims] スタックポインタを備えて該ポインタが格納するアドレ
スによりアクモスされるスタックメモリのアクセス制御
方式において、スタックポインタを複数個設けて各ポイ
ンタにポインタ番号と共にスタックアドレスが格納され
、スタックアクセス時にはポインタ番号を指定して当該
番号のポインタのスタックアドレスを出力させ、かつ該
スタックアクセスに先立って当該ポインタ番号がスタッ
クポインタ中にあるか否かをチェックして、なければ外
部メモリより当該スタックポインタのスタックアドレス
を取り出してポインタ番号と共にスタックポインタへ格
納しておくことを特徴とするスタックメモリのアクセス
制御方式。
In a stack memory access control method that includes a stack pointer and is accessed by the address stored in the pointer, a plurality of stack pointers are provided, each pointer stores a stack address together with a pointer number, and the pointer number is specified when accessing the stack. outputs the stack address of the pointer with the corresponding number, and before accessing the stack, checks whether the pointer number is in the stack pointer, and if not, retrieves the stack address of the stack pointer from external memory. A stack memory access control method characterized by storing a pointer number in a stack pointer.
JP58017092A 1983-02-04 1983-02-04 Access control system of stack memory Pending JPS59142791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58017092A JPS59142791A (en) 1983-02-04 1983-02-04 Access control system of stack memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58017092A JPS59142791A (en) 1983-02-04 1983-02-04 Access control system of stack memory

Publications (1)

Publication Number Publication Date
JPS59142791A true JPS59142791A (en) 1984-08-16

Family

ID=11934342

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58017092A Pending JPS59142791A (en) 1983-02-04 1983-02-04 Access control system of stack memory

Country Status (1)

Country Link
JP (1) JPS59142791A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62501243A (en) * 1985-06-11 1987-05-14 バロ−ス・コ−ポレ−シヨン Address environment storage for access to stack-oriented memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62501243A (en) * 1985-06-11 1987-05-14 バロ−ス・コ−ポレ−シヨン Address environment storage for access to stack-oriented memory
JPH0521250B2 (en) * 1985-06-11 1993-03-23 Unisys Corp

Similar Documents

Publication Publication Date Title
US4679140A (en) Data processor with control of the significant bit lengths of general purpose registers
US3938100A (en) Virtual addressing apparatus for addressing the memory of a computer utilizing associative addressing techniques
US5499380A (en) Data processor and read control circuit, write control circuit therefor
EP0405318A2 (en) Microprocessor having cash bypass signal terminal
JP3230262B2 (en) Electronic device and fixed information correcting method thereof
US4491908A (en) Microprogrammed control of extended integer and commercial instruction processor instructions through use of a data type field in a central processor unit
US4095268A (en) System for stopping and restarting the operation of a data processor
EP0167089B1 (en) Memory access control system and method for an information processing apparatus
US4394729A (en) Jump return stack
US4816992A (en) Method of operating a data processing system in response to an interrupt
JPS59142791A (en) Access control system of stack memory
US6311266B1 (en) Instruction look-ahead system and hardware
US5933856A (en) System and method for processing of memory data and communication system comprising such system
JPH01125644A (en) Data transfer equipment
EP0864983A2 (en) Computer system including memory adress management circuit for protecting memory from illegal writing
JPH05257807A (en) Cache memory controller
JPS6032220B2 (en) information processing equipment
JPS6240736B2 (en)
JP2918570B2 (en) Central processing unit
JP3058524B2 (en) Program control unit
US20020069344A1 (en) Apparatus and method for data access control and instruction format therewith
JPS62184560A (en) Input/output buffer controller
JP2972451B2 (en) Cache memory control method by hardware control software
JPH0775017B2 (en) Memory access method
JPH0764858A (en) Cache memory