JPS58103043A - Stack forming method - Google Patents

Stack forming method

Info

Publication number
JPS58103043A
JPS58103043A JP56203269A JP20326981A JPS58103043A JP S58103043 A JPS58103043 A JP S58103043A JP 56203269 A JP56203269 A JP 56203269A JP 20326981 A JP20326981 A JP 20326981A JP S58103043 A JPS58103043 A JP S58103043A
Authority
JP
Japan
Prior art keywords
stack
internal
external
pointer
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.)
Granted
Application number
JP56203269A
Other languages
Japanese (ja)
Other versions
JPS6149696B2 (en
Inventor
Yoshio Nakano
中埜 善夫
Masashi Deguchi
雅士 出口
Teiji Nishizawa
西沢 貞次
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP56203269A priority Critical patent/JPS58103043A/en
Publication of JPS58103043A publication Critical patent/JPS58103043A/en
Publication of JPS6149696B2 publication Critical patent/JPS6149696B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • G06F9/4486Formation of subprogram jump address

Abstract

PURPOSE:To make the stack operation high-speed, by providing an internal stack, an internal stack pointer and an external stack pointer in an operation processing device and reducing the frequency of write to and read from a storage device, to reduce a waste of time for data transfer. CONSTITUTION:An external stack pointer 7, an internal stack pointer 8, an internal stack 9, and an internal bus 10 for connecting them are provided in an operation processing device 6. In case that a stack use request is generated during the execution of a progam, data is transferred to the stack 9 under the control of the internal stack pointer 8 if data is within the range of the capacity of the internal stack 9. If data is not within the range of the capacity of the internal stack 9, data is transferred to an external stack 12 in a form of block transfer.

Description

【発明の詳細な説明】 本発明は、情報処理装置例えばマイクロコンビュータ装
覧で、データの受は渡し例えば副プログラム力岐の際の
引数や主プログラムへの戻り番地の格納に使用されるス
タック形成方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention is an information processing device such as a microcomputer display, in which data is received and passed, and a stack is formed which is used for storing arguments when branching to a subprogram or a return address to a main program. It is about the method.

従来例を第1図にホす。演算処理装置(1)内にスタッ
クポインタ(2)なるものを設け、そのスタックポイン
タ(2)の内容が示すアドレスに対応する記憶装置(3
)内のメモリに対してのみ読み書きができる機構を形成
し、メモリに対して1回読み書きするごとにスタックポ
インタ(2)の内容を1語の占めるアドレス領域性例え
ば1だけ増減することによって先入後出記憶としてのス
タック(4)を形成している。スタック(4)は記憶装
置(3)内のメモリアドレスというものを特に意識せず
にデータの出し入れができるため、副プログラム分岐の
際の主プログラムへの戻り番地の格納および副プログラ
ムから主プログラムへの復帰時の戻り番地の取り出し、
演算処理装置(1)内の各種レジスタの内容の退避およ
び復帰、プログラム間のデータの受は渡しなどに頻繁に
使用されている。演算処理装置(1)がスタックポイン
タ(2)の管理の下で記憶装置(3)との間で母線(5
)を介してデータの読み書きを行なうために、母線(5
)の分布容量によるデータの遅延、演算処理装置(1)
と母線(5)、記憶装置(3)と母線(5)を結合する
ために用いられる母線(5)との送受信部ならびに送受
信制御部内でのデータの遅延が生じ、データを正しく伝
えるのに多くの時間を必要としていた。
A conventional example is shown in Figure 1. A stack pointer (2) is provided in the arithmetic processing unit (1), and a storage device (3) corresponding to the address indicated by the contents of the stack pointer (2) is provided.
), and each time the memory is read or written, the contents of the stack pointer (2) are changed to the address area occupied by one word. A stack (4) is formed as an output memory. Since the stack (4) allows data to be transferred in and out without being particularly aware of the memory address in the storage device (3), it is possible to store the return address to the main program when branching to a subprogram, and to transfer data from the subprogram to the main program. Retrieving the return address when returning,
It is frequently used for saving and restoring the contents of various registers in the arithmetic processing unit (1), and for passing data between programs. An arithmetic processing unit (1) connects a bus line (5) to a storage device (3) under the control of a stack pointer (2).
) to read and write data via the bus (5
) data delay due to distributed capacity, arithmetic processing unit (1)
Data delays occur in the transmission/reception section between the storage device (3) and the bus (5) used to connect the storage device (3) and the bus (5), as well as within the transmission/reception control section. needed time.

本発明は従来のかかる欠点を改善した新規なスタックの
形成方法を提供するもので、演算処理装置a内に補助(
内部)スタックを設け、これにより、母線を介して主(
外部)スタックとし゛C使用される記憶装置への読み書
きの頻度を下げ、データの受は渡しの無駄時間を軽減し
、高速化を図ろうとするものである。
The present invention provides a novel method for forming a stack that improves the conventional drawbacks.
internal) stack, which connects the main (
The purpose is to reduce the frequency of reading and writing to a storage device used as an external stack, reduce wasted time in data transfer, and increase speed.

以下本発明の一実施例を図面に基づいて説明する。第2
図において、演算処理袋H(0)は外部スタックポイン
タ(7)、内部スタックポインタ(8)、内部スタック
(9)とこれらを結合する内部母線(+()を内蔵し、
外部スタック(1′4を内蔵する記憶装置(1+)と母
線(1→を介して結合されている。外部スタックポイン
タ(7)は外部スタック@の空の先頭位置を示し、内部
スタックポインタ(8)は内部スタック(9)の空の先
頭位置を示し、演算処理装置(6)がスタックへの書き
込み読み出し動作を行なう場合、データを内部スタック
ポインタ(8)を通して内部スタック(1りに対して書
き込み読み出ずとともに内部スタックポインタ(8)を
更新する。また内部スタックが充満状態時に演算処理装
置(6)がスタックへの書き込む時は内部スタックの内
容の一部を内部スタックポインタ(8)、タ1部ス々ツ
クポインタ(7)を通して外部スタック@へ転送した後
、内部スタック(9)に書き込むとともに内部スタック
ポインタ(8)と外部スタックポインタ(7)を更新す
る。また内部スタック(9)が空状態時にスタックから
読み出す時は外部スタック0の内容の一部を外部スタッ
ク、ifポインタ7)、内部スタックポインタ(8)を
通して内部スタック(9)へ転送した後、内部スタック
(9)から読み出すとともに、内部スタックポインタ(
8)と外部スタックポインタ(7)を更新する。
An embodiment of the present invention will be described below based on the drawings. Second
In the figure, the arithmetic processing bag H(0) includes an external stack pointer (7), an internal stack pointer (8), an internal stack (9), and an internal bus bar (+()) that connects them.
It is connected to the storage device (1+) containing the external stack (1'4) via the bus (1→). The external stack pointer (7) indicates the empty head position of the external stack @, and the internal stack pointer (8 ) indicates the empty top position of the internal stack (9), and when the arithmetic processing unit (6) performs a write/read operation to the stack, data is transferred to the internal stack (1) through the internal stack pointer (8). When the processing unit (6) writes to the stack when the internal stack is full, it updates the internal stack pointer (8) without reading. After transferring the first part to the external stack @ through the stack pointer (7), it writes to the internal stack (9) and updates the internal stack pointer (8) and external stack pointer (7). When reading from the stack when it is empty, transfer part of the contents of external stack 0 to the internal stack (9) through the external stack, if pointer 7) and internal stack pointer (8), and then read from the internal stack (9). , internal stack pointer (
8) and the external stack pointer (7).

いま、内部スタック(9)の容量が2n語の場合を考え
、更に詳しく説明する。プログラム実行中にスタック使
用要求が生じた場合は内部スタック(9)に対して内部
スタックポインタ(8)の管理の下でデータの受は渡し
をする。内部スタック(9)はレジスタ配列の形成をと
るように構成され、内部母線(Inを」jiじてデータ
の受は渡しをするので、演算処理装置(6)内でのレジ
スタ間のデータの受は渡しと同様に高速で行なうことが
できる。内部スタック(9)に格納されているデータが
0語である時に読み出し要求が生じた時は、外部スタッ
クポインタ(7)の示す位置からn語を記憶装置01)
の外部スタック0′4から母線03を介して内部スタッ
ク(9)に格納し、それから内部スタック(9)に対し
て読み出しを行なう。
Let us now consider the case where the capacity of the internal stack (9) is 2n words and explain in more detail. When a stack use request occurs during program execution, data is received and delivered to and from the internal stack (9) under the control of the internal stack pointer (8). The internal stack (9) is configured to form a register array, and data is received and passed through the internal bus (In), so data cannot be received between registers within the arithmetic processing unit (6). can be performed as fast as passing.If a read request occurs when the data stored in the internal stack (9) is 0 words, n words are transferred from the position indicated by the external stack pointer (7). Storage device 01)
The data is stored in the internal stack (9) from the external stack 0'4 via the bus 03, and then read from the internal stack (9).

同様に、内部スタック(9)に格納されているデータが
2n語である時に書き込み要求が生じた時は、夕を部ス
タックポインタ(7)の示す位置に内部スタック(9)
から母線(13を介して外部スタックo砂へn m格納
し、それから内部スタック(9)に対して書き込みを行
なう。このように内部スタック(9)と外部スタック0
4間の1回の転送語表を2nとせずにnにすることによ
って、内部スタック(9)の格納語数がOまた2n付近
での稼動頻度を下げ、内部スタック(9)と外部スタッ
ク0の間のデータ転送回数を低減し、内部スタック(9
)内のみでデータの受は渡しができやすいようにする。
Similarly, when a write request occurs when the data stored in the internal stack (9) is 2n words, the internal stack (9) is placed at the position indicated by the stack pointer (7).
n m is stored from the busbar (13) to the outer stack o sand, and then written to the inner stack (9). In this way, the inner stack (9) and the outer stack 0
By changing the table of words transferred at one time between 4 and 4 to n instead of 2n, the number of words stored in the internal stack (9) is O or the operation frequency near 2n is reduced, and the number of words stored in the internal stack (9) and external stack 0 is reduced. This reduces the number of data transfers between internal stacks (9
) to make it easy to receive and pass data.

一般的にいうと、内部スタック(9)が(i+j十k)
語(但しi、には正の整数、Jは整数)で構成されてい
る場合、内部スタック(9)が充満状態時にスタ、りに
書き込む時は内部スタックの内容のうちi語を外部スタ
ック(6)へ転送し、また内部スタックが空状態時にス
タックから読み出す時は関部スタックからに語を内部ス
タックに転送する。^口述芙施例では i=に=n、j
=oの場合を考えたが、l。
Generally speaking, the internal stack (9) is (i + j ten k)
(where i is a positive integer and J is an integer), when writing to the star when the internal stack (9) is full, the i word from the contents of the internal stack is written to the external stack (9). 6), and when reading from the stack when the internal stack is empty, the word is transferred from the function stack to the internal stack. ^In the oral example, i = to = n, j
I considered the case where =o, but l.

J、にの値の組み合せはこの限りではない。The combination of values for J and is not limited to this.

以上説明したように本発明のスタック形成方法は、スタ
ックを記憶装置上でのみ形成するのではなく、内部スタ
ックとして演算処理装置d内にスタック用レジスタ配列
を設けて、そのレジスタ配列上に形成するので、内部ス
タックの容量を越えない範囲の語数しか扱わない場合に
は一切外部スタックとのデータ転送を伴わないし、また
、内部ス  −タックの容量を越える場合にも、外部ス
タックとのデータ転送はブロック転送の形式をとるので
、スタック操作が高速に行なえる利点を有する。
As explained above, the stack forming method of the present invention does not form the stack only on the storage device, but also provides a stack register array in the arithmetic processing unit d as an internal stack, and forms the stack on the register array. Therefore, if the number of words that does not exceed the capacity of the internal stack is handled, there is no data transfer with the external stack, and even if the capacity of the internal stack is exceeded, no data transfer with the external stack occurs. Since it takes the form of block transfer, it has the advantage that stack operations can be performed at high speed.

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

第1図は従来のスタック形成方法を示すブロック図、第
2図は本発明によるスタック形成方法を示すブロック図
である。 (6)・・・演算処理装置、(7)・・外部スタックポ
インタ、(8)・・内部スタックポインタ、(9)  
内部スタック、0()・内部母線、0υ・・・記憶装置
、Oj ・外部スタック、(I撞・・母線 代理人 森本義弘
FIG. 1 is a block diagram showing a conventional stack forming method, and FIG. 2 is a block diagram showing a stack forming method according to the present invention. (6)...Arithmetic processing unit, (7)...External stack pointer, (8)...Internal stack pointer, (9)
Internal stack, 0()・Internal bus, 0υ...Storage device, Oj・External stack, (I)・Bus line agent Yoshihiro Morimoto

Claims (1)

【特許請求の範囲】 1、演算処理装置、それが実行すべきプログラムおよび
取扱うデータを格納する記憶装置、それらを結合する母
線から成る情報処理装置を用いて、プログラム内でのデ
ータの受は渡しに先入後出のスタックを形成するにあた
り、前記記憶装置内に外部スタック、前記演算処理装置
内に内部スタックおよび該内部スタックの空の先頭位置
を示す内部スタックポインタ、該外部スタックの空の先
頭位置を示す外部スタックポインタを有し、前記演算処
理装置がスタックへの書き込み読み出し動作を行なう場
合、デ タを前記内部スタックに対して書き込み読み出
すとともに前記内部スタックポインタを更新し、前記内
部スタックが充満状態時にスタックに書き込む時は前記
内部スタックの内容を前記外部スタックへ転送I7た後
前記内部スタックに書き込むとともに前記内部スタック
ポインタ、前記外部スタックポインタを更新し、前記内
部スタックが空状態時にスタックから読み出す時は前記
外部スタックの内容を前記内部スタックへ転送した後前
記内部スタックから読み出すとともに前記内部スタック
ポインタ、前記外部スタックポインタを更新することを
特徴とするスタック形成方法1つ・ 2、 内部スタックが(i 十j 十k )語(ただし
i、には正の整数、jは整数)で構成され、内部スタッ
クが充満状態時にスタックに書き込む時は内部スタック
の内容のうち1語を外部スタックへ転送し、また内部ス
タックが空状態時にスタックから読み出す時は夕1部ス
タックがらに語を内部スタックに転送することを特徴と
する特許請求の範囲第1項記載のスタック形成方法。
[Claims] 1. Using an information processing device consisting of an arithmetic processing device, a storage device for storing programs to be executed by the arithmetic processing device and data to be handled, and a bus connecting these devices, data is exchanged within the program. In forming a first-in, last-out stack, an external stack is stored in the storage device, an internal stack is stored in the arithmetic processing unit, an internal stack pointer indicating the empty top position of the internal stack, and an empty top position of the external stack. When the arithmetic processing unit performs a write/read operation to the stack, it writes and reads data to and from the internal stack, updates the internal stack pointer, and maintains the internal stack in a full state. When writing to the stack, the contents of the internal stack are transferred to the external stack I7 and then written to the internal stack, and the internal stack pointer and the external stack pointer are updated, and when reading from the stack when the internal stack is empty. One stack forming method is characterized in that the contents of the external stack are transferred to the internal stack and then read from the internal stack and the internal stack pointer and the external stack pointer are updated. It consists of 10j 10k) words (where i is a positive integer and j is an integer), and when writing to the stack when the internal stack is full, one word from the contents of the internal stack is transferred to the external stack, 2. The stack forming method according to claim 1, wherein when reading from the stack when the internal stack is empty, words are transferred to the internal stack from one stack to the next.
JP56203269A 1981-12-15 1981-12-15 Stack forming method Granted JPS58103043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56203269A JPS58103043A (en) 1981-12-15 1981-12-15 Stack forming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56203269A JPS58103043A (en) 1981-12-15 1981-12-15 Stack forming method

Publications (2)

Publication Number Publication Date
JPS58103043A true JPS58103043A (en) 1983-06-18
JPS6149696B2 JPS6149696B2 (en) 1986-10-30

Family

ID=16471240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56203269A Granted JPS58103043A (en) 1981-12-15 1981-12-15 Stack forming method

Country Status (1)

Country Link
JP (1) JPS58103043A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0303868A2 (en) * 1987-08-06 1989-02-22 Otto Müller Stack control
JPH01255035A (en) * 1988-04-05 1989-10-11 Matsushita Electric Ind Co Ltd Processor
JPH02299025A (en) * 1989-05-12 1990-12-11 Nec Corp Microcomputer
JP2009540438A (en) * 2006-06-06 2009-11-19 クゥアルコム・インコーポレイテッド Processor core stack expansion

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ZA86832B (en) * 1985-02-19 1987-02-25 Berwind Corp Removable mold segments for rotary molds

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5241132A (en) * 1975-09-29 1977-03-30 Hitachi Ltd Molten plating method
JPS54146531A (en) * 1978-05-09 1979-11-15 Fujitsu Ltd Address stack control system
JPS5730167A (en) * 1980-07-30 1982-02-18 Fujitsu Ltd Stack memory device
JPS5730166A (en) * 1980-07-30 1982-02-18 Fujitsu Ltd Stack memory processor
JPS57105877A (en) * 1980-12-22 1982-07-01 Fujitsu Ltd Stack memory device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5241132A (en) * 1975-09-29 1977-03-30 Hitachi Ltd Molten plating method
JPS54146531A (en) * 1978-05-09 1979-11-15 Fujitsu Ltd Address stack control system
JPS5730167A (en) * 1980-07-30 1982-02-18 Fujitsu Ltd Stack memory device
JPS5730166A (en) * 1980-07-30 1982-02-18 Fujitsu Ltd Stack memory processor
JPS57105877A (en) * 1980-12-22 1982-07-01 Fujitsu Ltd Stack memory device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0303868A2 (en) * 1987-08-06 1989-02-22 Otto Müller Stack control
JPH01255035A (en) * 1988-04-05 1989-10-11 Matsushita Electric Ind Co Ltd Processor
JPH02299025A (en) * 1989-05-12 1990-12-11 Nec Corp Microcomputer
JP2009540438A (en) * 2006-06-06 2009-11-19 クゥアルコム・インコーポレイテッド Processor core stack expansion

Also Published As

Publication number Publication date
JPS6149696B2 (en) 1986-10-30

Similar Documents

Publication Publication Date Title
JP3598321B2 (en) Buffering data exchanged between buses operating at different frequencies
JPS61148563A (en) Data transfer system and data transfer
JPS60142439A (en) Store buffer device
JPS58103043A (en) Stack forming method
JPH01125644A (en) Data transfer equipment
JPS61165170A (en) Bus controlling system
JP2699482B2 (en) Data transfer control device
JPH07182849A (en) Fifo memory
JP2734581B2 (en) Control method of input / output control unit
JPS61153770A (en) Image processor
JPS62110697A (en) Address control system
JPH0383134A (en) Stack management method
JPS58215778A (en) Buffer storage control system
JP2581144B2 (en) Bus control device
JPH04333950A (en) Information processing system
JPS6117478Y2 (en)
JPS5533282A (en) Buffer control system
JPS6373458A (en) Shared memory access device
JPH0546565A (en) Data processor
JPH04107665A (en) Input/output controller
JPH01125619A (en) Graphic display device
JPS63245745A (en) Buffer storage controller
JPS63228488A (en) Pushup storage
JPH0652516B2 (en) Bus interface device
JPH06139201A (en) Method for transmitting information via shared memory