JPS61150049A - Information processing unit - Google Patents

Information processing unit

Info

Publication number
JPS61150049A
JPS61150049A JP27602884A JP27602884A JPS61150049A JP S61150049 A JPS61150049 A JP S61150049A JP 27602884 A JP27602884 A JP 27602884A JP 27602884 A JP27602884 A JP 27602884A JP S61150049 A JPS61150049 A JP S61150049A
Authority
JP
Japan
Prior art keywords
bank
area
section
switching
stack area
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
JP27602884A
Other languages
Japanese (ja)
Inventor
Kenkichi Kubo
久保 健吉
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 JP27602884A priority Critical patent/JPS61150049A/en
Publication of JPS61150049A publication Critical patent/JPS61150049A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain write protection of a common area and to arrange a stack area on each bank memory section by moving the stack area to the common area at bank switching to attain interruption protection at switching. CONSTITUTION:In calling a sub-program (existing in a bank memory section 15) by a main program (existing in a bank memory section 14), a bank switch program 12 designates a decoder 11, releases write protection, permits the write on a common area 12 and locates the stack area on the common area section 12 to save restoration information of the main program. A prescribed value is set to a bank register 6, the bank memory section 15 is adopted and the stack area is arranged there on. Then a decoder 10 is designated to set a latch section 9 to protect writing of the common area section.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はセグメント切換を行う情報処理装置に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to an information processing device that performs segment switching.

近年、電子装置の機能拡大に伴い、マイクロプロセッサ
のアドレッシング不足がプログラム開発の大きな障害に
なっているが、その問題の一解決方法として、メモリの
バンク化がある。
In recent years, as the functionality of electronic devices has expanded, the lack of addressing in microprocessors has become a major hindrance to program development. One way to solve this problem is to create banks of memory.

これは共通記憶手段(共通領域)を除く領域をセグメン
トとしく以下バンクと称する)、外部に選択用レジスタ
(以下バンクレジスタと称する)を設けて共通のアドレ
ス領域を有する個別記憶手段(以下バンクメモリと称す
る)を選択切換えて。
The area excluding the common storage means (common area) is referred to as a segment and is hereinafter referred to as a bank), and the individual storage means (hereinafter referred to as bank memory) has an external selection register (hereinafter referred to as a bank register) and has a common address area. ).

マイクロプロセッサのアドレッシング領域を拡大しよう
とするものである。
This is an attempt to expand the addressing area of microprocessors.

上記手段において、応用プログラムのスタック領域は共
通領域に配置されるが、それはバンクメモリに配置した
場合、バンク切換中に割込みが発生するとデータが破壊
される可能性があるためである。
In the above means, the stack area of the application program is placed in a common area because if it is placed in a bank memory, data may be destroyed if an interrupt occurs during bank switching.

そのため、共通領域が増大しバンクメモリ領域が縮小す
るのみならず、共通領域に対して書込み保護機能を施す
ことが出来なくなっている。
Therefore, not only is the common area increased and the bank memory area reduced, but it is no longer possible to apply a write protection function to the common area.

共通領域にはバンク切換プログラム等の管理プログラム
が格納されており、応用プログラムによって誤って破壊
されてはならないものである。
Management programs such as bank switching programs are stored in the common area, and must not be accidentally destroyed by application programs.

そのためスタック領域のバンクメモリ内配置を可能とし
共通領域に書込保護を施した情報処理装置が要望されて
いる。
Therefore, there is a need for an information processing device that allows the stack area to be placed in a bank memory and that provides write protection to the common area.

〔従来の技術〕[Conventional technology]

従来の技術を以下説明する。 The conventional technology will be explained below.

第2図(a)はバンクメモリにスタック領域を配置した
場合におけるデータ破壊の可能性を説明する図、第2図
(b)は第2図(a)におけるバンク切換動作を説明す
るフローチャートである。
FIG. 2(a) is a diagram explaining the possibility of data destruction when a stack area is placed in a bank memory, and FIG. 2(b) is a flowchart explaining the bank switching operation in FIG. 2(a). .

第2図(a)において、1はマイクロプロセッサ。In FIG. 2(a), 1 is a microprocessor.

2はメモリの共通領域部、3〜5はバンクメモリ部であ
る。
2 is a common area section of the memory, and 3 to 5 are bank memory sections.

マイクロプロセッサ1のアドレス可能な領域を64にバ
イトとすると2図示のごと<oooo〜FFFF (1
6進表示)で表されるが、この領域を共通領域部2およ
び選択されたバンクメモリ部3〜5で占有することにな
る。
If the addressable area of the microprocessor 1 is 64 bytes, then as shown in Figure 2 <oooo~FFFF (1
Although expressed in hexadecimal notation), this area is occupied by the common area section 2 and the selected bank memory sections 3 to 5.

上記バンクメモリ部3〜5はマイクロプロセッサ1のア
ドレッシングは共通であるが、共通領域部2にあるバン
ク切換プログラム2aによりそれぞれ選択されるため、
実質的にアドレッシング領域が拡大することになる。
Although the bank memory sections 3 to 5 have the same addressing in the microprocessor 1, they are each selected by the bank switching program 2a in the common area section 2.
The addressing area will essentially be expanded.

、なおバンクメモリ部3〜5の選択はバンクレジスタ6
に選択情報を書込むことによって行われる。
, bank memory sections 3 to 5 are selected by bank register 6.
This is done by writing selection information into the .

上記各バンクメモリ部3〜5より共通領域部2をアクセ
スすることは可能であり、従って共通領域部2に各バン
クメモリ部3〜5にある応用プログラムのスタック領域
がそれぞれ配置されると。
It is possible to access the common area section 2 from each of the bank memory sections 3 to 5, and therefore, the stack areas of the application programs in the bank memory sections 3 to 5 are arranged in the common area section 2, respectively.

共通領域部2が増大し、バンクメモリ部3〜5がその分
減少するとともに、共通領域部2の書込保護が実施し得
なくなる。
The common area portion 2 increases, the bank memory portions 3 to 5 decrease accordingly, and write protection of the common area portion 2 becomes impossible.

上記説明の如く、スタック領域は各バンクメモリ部3〜
5に配置することが望ましいが、パンク切換え中、NM
I等の割込みが発生すると、バンクメモリ内の情報を破
壊する可能性がある。
As explained above, the stack area is for each bank memory section 3 to
5, but during puncture changeover, NM
If an interrupt such as I occurs, there is a possibility that information in the bank memory will be destroyed.

以下その理由を説明する。The reason will be explained below.

第2図(a)において、現在バンクメモリ部4に格納さ
れている主プログラムが動作中であり、スタック領域を
現在、aよりbまで使用しているとする。即ち、スタッ
クポインタは現在すを指示している。
In FIG. 2(a), it is assumed that the main program currently stored in the bank memory section 4 is in operation and the stack area from a to b is currently being used. That is, the stack pointer points to the current location.

ここでバンクメモリ部5にあるサブプログラムに分岐す
る場合の動作の1例を第2図(b)参照しつつ説明する
Here, an example of the operation when branching to a subprogram in the bank memory section 5 will be described with reference to FIG. 2(b).

(1)バンクメモリ部4の主プログラムはサブプログラ
ム名を指定して、バンク切換プログラム2aに分岐を依
頼する。
(1) The main program of the bank memory section 4 specifies the subprogram name and requests the bank switching program 2a to branch.

(2)バンク切換プログラム2aはバンクメモリ部5に
切換え、該サブプログラムを起動する。
(2) The bank switching program 2a switches to the bank memory section 5 and starts the subprogram.

(3)  該サブプログラムではスタック領域を目領域
に配置し、続いて主プログラムの最終情報を該スター・
り領域に退避し、所定の処理を開始する。
(3) In this subprogram, the stack area is placed in the eye area, and then the final information of the main program is placed in the star area.
The data is saved to a new area and the predetermined process is started.

上記処理終了後、上記退避データを復帰しバンク切換プ
ログラム2aにリターンする。
After the above processing is completed, the saved data is restored and the process returns to the bank switching program 2a.

(4)バンク切換プログラム2aは主プログラムの格納
されているバンクメモリ部4に切換え、主プログラムを
起動する。
(4) The bank switching program 2a switches to the bank memory section 4 in which the main program is stored, and starts the main program.

以上の動作において、バンクメモリ切換え後。In the above operation, after bank memory switching.

サブプログラムを起動し、該サブプログラムがスタック
領域を配置するまでは、スタック領域のアドレスを指定
するスタックポインタSPの値は主プログラムのそれで
あり、バンクメモリ部5にとってはスタックアドレスと
は無関係なアドレスとなっている。
Until a subprogram is started and the subprogram allocates a stack area, the value of the stack pointer SP that specifies the address of the stack area is that of the main program, and for the bank memory unit 5, it is an address unrelated to the stack address. It becomes.

そのため、この時点でNMI等の割込みが発生すると、
バンクメモリ部5のアドレスbはスタックアドレスと認
識されて、破壊する可能性が生じる。
Therefore, if an interrupt such as NMI occurs at this point,
Address b of bank memory section 5 is recognized as a stack address, and there is a possibility that it will be destroyed.

以上はサブプログラム分岐によるバンク切換動作を説明
したが、ハードウェア割込によるバンク切換動作時も同
様である。
The bank switching operation by subprogram branching has been described above, but the same applies to the bank switching operation by hardware interrupt.

以上の理由により従来はスタック領域を共通領域部2に
配置している。そのため共通領域部2に書込保護を実施
することが出来ない。
For the above reasons, conventionally the stack area is placed in the common area section 2. Therefore, write protection cannot be applied to the common area section 2.

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

上記説明したように、共通領域にスタック領域を設ける
従来の方法ではバンクメモリの領域が減少するとともに
、共通領域の書込保護が出来ないという問題点があった
As explained above, the conventional method of providing a stack area in the common area has the problem that the area of the bank memory is reduced and the common area cannot be protected from writing.

そのためバンクメモリ内にスタック領域を設けることが
考えられるが、バンクメモリ切換え時。
For this reason, it is possible to provide a stack area in the bank memory, but when switching the bank memory.

前述のごとくマイクロプロセッサはスタックポインタが
更新されるまで前バンクメモリのスタックポインタを保
持している。そのためNMI等の割込みが発生すると切
換え後のバンクメモリの情報を破壊する恐れがあるとい
う問題点があった。
As mentioned above, the microprocessor holds the stack pointer of the previous bank memory until the stack pointer is updated. Therefore, there is a problem that when an interrupt such as NMI occurs, the information in the bank memory after switching may be destroyed.

本発明はバンク切換期間中、上記割込みによる障害を防
止してスタック領域をバンクメモリに配置するとともに
、共通領域の書込保護を行う情報処理装置を提供するも
のである。
The present invention provides an information processing device that prevents failures due to the above-mentioned interrupts, arranges a stack area in a bank memory, and protects a common area from writing during a bank switching period.

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

上記従来の問題点は、共通記憶手段への書込みを禁止/
解除する手段と上記共通記憶手段または個別記憶手段に
スタック領域を配置する手段と上記個別記憶手段を切換
える手段とを設け、切換依頼により上記書込み禁止を解
除して依頼元個別記憶手段のスタック領域を共通記憶手
段に配置した後依頼先個別記憶手段に切換えるとともに
、上記切換え後該個別記憶手段にスタック領域を配置し
た後上記書込みを禁止して所定プログラムを起動する本
発明の情報処理装置により解決することができる。
The above conventional problem is that writing to the common storage means is prohibited/
means for canceling, a means for arranging a stack area in the common storage means or the individual storage means, and a means for switching the individual storage means, and upon a switching request, the write protection is canceled and the stack area of the requesting individual storage unit is changed. The problem is solved by the information processing apparatus of the present invention, which switches to the request destination individual storage means after arranging the problem in the common storage means, and after the above switching, arranges a stack area in the individual storage means, prohibits the above writing, and starts a predetermined program. be able to.

〔作用〕[Effect]

即ち2本発明によるとバンク切換依頼があると。 That is, according to the second invention, if there is a bank switching request.

まず共通領域へ動作中のプログラムのスタック領域を移
動する。この動作後はバンク切換を実施してもスタ・7
クポインタは正しく指定されているため割込みによるデ
ータ破壊は起こらない。従ってバンク切換後スタック領
域を該バンク内に移動することができる。
First, move the stack area of the running program to the common area. After this operation, even if bank switching is performed, the star 7
Since the pointer is specified correctly, data will not be destroyed by an interrupt. Therefore, after bank switching, the stack area can be moved into the bank.

上記手段によりスタック領域を各バンク内に配置するこ
とにより、共通領域の書込保護が実施できることになる
が、上記切換中ば書込保護を解除するものである。
By arranging the stack area in each bank by the above means, write protection of the common area can be implemented, but the write protection is canceled during the above switching.

〔実施例〕〔Example〕

本発明の実施例を図を用いて説明する。 Embodiments of the present invention will be described with reference to the drawings.

第1図(a)は本発明に係わる情報処理装置の一部を示
したプロ・ツク図、第1図(b)は動作を表すフローチ
ャートである。なお全図を通じて同一記号は同一対象物
を表す。
FIG. 1(a) is a block diagram showing a part of the information processing apparatus according to the present invention, and FIG. 1(b) is a flowchart showing the operation. Note that the same symbols represent the same objects throughout the figures.

・第1図(alにおいて、12は共通領域部でありバン
ク切換プログラム12a、スタック領域部12b、起動
情報メモリ部12c等が格納されている。
- In FIG. 1 (al), 12 is a common area section in which a bank switching program 12a, a stack area section 12b, a startup information memory section 12c, etc. are stored.

バンク切換プログラム12aはスタック領域配置動作、
バンク切換動作、復帰情報の退避動作。
The bank switching program 12a performs a stack area arrangement operation,
Bank switching operation, recovery information saving operation.

プログラムの起動動作等を行う。Performs program startup operations, etc.

13〜15はバンクメモリ部であって、それぞれバンク
レジスタ6の出力を識別し、マイクロプロセッサ1のア
ドレッシングを有効とする手段(図示せず)を有してい
る。オペレーティングシステムはバンクメモリ部13に
格納するものとし。
Bank memory units 13 to 15 each have means (not shown) for identifying the output of the bank register 6 and validating the addressing of the microprocessor 1. It is assumed that the operating system is stored in the bank memory section 13.

該バンクメモリ部13はバンクレジスタ6がクリアされ
たとき選択されるよう構成されている。
The bank memory section 13 is configured to be selected when the bank register 6 is cleared.

8はバンク切換部であって、バンク切換プログラム12
aによってバンク選択情報がバンクレジスタ6に書込ま
れ、各バンクメモリ部13〜15にバンクメモリ選択信
号線104を通じて該信号を送出する。
Reference numeral 8 represents a bank switching section, which includes a bank switching program 12.
Bank selection information is written into the bank register 6 by a, and the signal is sent to each bank memory section 13-15 through the bank memory selection signal line 104.

16は書込禁止/解除信号発生部であって、バンク切換
プログラム12aの命令によりデコーダ10.11が指
定されて、ランチ部9がセント・リセフトされ、書込可
信号線101に該信号を送出する。
Reference numeral 16 denotes a write inhibit/cancel signal generating unit, which specifies the decoder 10.11 by the command of the bank switching program 12a, resets the launch unit 9, and sends the signal to the write enable signal line 101. do.

102はマイクロプロセッサ1と接続されている読出し
/iF込み制御線であって、上記書込可信号線101と
論理積(ゲート17)がとられ、ランチ部9がセットの
時1強制的に書込が禁止される。なお100はバス線を
表す。
102 is a read/IF write control line connected to the microprocessor 1, which is logically ANDed (gate 17) with the write enable signal line 101, and when the launch section 9 is set, 1 is forcibly written. inclusion is prohibited. Note that 100 represents a bus line.

以上の構成において、第1図(′b)に示すフローチャ
ートにより動作の1例を説明する。
An example of the operation of the above configuration will be explained with reference to the flowchart shown in FIG. 1('b).

(1)  主プロ゛グラム(バンクメモリ部14)はサ
ブプログラム(バンクメモリ部15)呼出をバンク切換
プログラム12aに依頼する。
(1) The main program (bank memory section 14) requests the bank switching program 12a to call the subprogram (bank memory section 15).

(2)バンク切換プログラム12aはデコーダ11を指
定して書込保護を解除し、共通領域部12への書込みを
許可する。
(2) The bank switching program 12a designates the decoder 11, cancels write protection, and permits writing to the common area section 12.

(3)  バンク切換プログラム12aはスタック領域
を共通領域部12に配置したのち、主プログラムの復帰
情報を待避する。
(3) After the bank switching program 12a arranges the stack area in the common area section 12, it saves the return information of the main program.

(4)続いてバンクレジスタ6に所定の値をセントしバ
ンクメモリ部を切換える。
(4) Next, a predetermined value is sent to the bank register 6 to switch the bank memory section.

(5)  バンクメモリ部15にスタック領域を配置す
る。
(5) A stack area is arranged in the bank memory section 15.

(6)デコーダ10を指定してラッチ部9をセットし、
共通領域部12の書込保護を実施する。
(6) Specify the decoder 10 and set the latch section 9,
Write protection for the common area section 12 is implemented.

(7)起動情報メモリ部12Cをマイクロプロセッサ1
の各レジスタに格納して該サブプログラムを起動する。
(7) The startup information memory section 12C is connected to the microprocessor 1
, and start the subprogram.

以上説明のごとく、スタック領域を共通領域部12に移
動することによって1割込みに対するデータ保護が実施
できるため、各バンクメモリ部にスタック領域を配置す
ることができる。従って共通領域の書込保護が実施でき
るが、上記バンク切換動作のため、切換時該書込保護を
解除するものである。
As explained above, by moving the stack area to the common area section 12, data protection against one interrupt can be implemented, so the stack area can be placed in each bank memory section. Therefore, write protection of the common area can be implemented, but because of the bank switching operation described above, the write protection is canceled at the time of switching.

〔発明の効果〕 上記説明のごとく、バンク切換時スタック領域を共通領
域に移動せしめることにより、切換時における割込み保
護が可能となるため、各バンクメモリ部にスタック領域
を配置することが出来るとともに共通領域の書込保護が
可能となる効果がある。
[Effects of the Invention] As explained above, by moving the stack area to the common area when switching banks, it is possible to protect interrupts at the time of switching. This has the effect of making it possible to write protect the area.

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

第1図(alは本発明を実施する情報処理装置のブック
図。 第1図(b)は動作フローチャート。 第2図(a) (blはバンクメモリにスタック領域を
配置した場合における割込みの影響を説明する図。 である。図中。 1はマイクロプロセッサ。 6はバンクレジスタ。 ?、10.11はデコーダ。 8はバンク切換部。 9はラッチ部。 12は共通領域部。 12aはバンク切換プログラム。 12bはスタック領域部。 12Cは起動情報メモリ部。 13〜15はバンクメモリ部。 16は書込禁止/解除信号発生部。 17はゲート。 100はバス線。 101は書込可信号線。 102は読出し/書込み制御線。 104はバンクメモリ選択制御線。 である。 千 1 目 (久) +2
Figure 1 (al is a book diagram of an information processing device that implements the present invention. Figure 1 (b) is an operation flowchart. Figure 2 (a) (bl is the effect of interrupts when a stack area is placed in bank memory. 1 is a microprocessor. 6 is a bank register. ?, 10.11 is a decoder. 8 is a bank switching section. 9 is a latch section. 12 is a common area section. 12a is a bank switching section. Program. 12b is a stack area section. 12C is a startup information memory section. 13 to 15 are bank memory sections. 16 is a write inhibit/release signal generation section. 17 is a gate. 100 is a bus line. 101 is a write enable signal line . 102 is a read/write control line. 104 is a bank memory selection control line.

Claims (1)

【特許請求の範囲】[Claims] 共通アドレスを有し選択されて動作する複数の個別記憶
手段と共通記憶手段とを備えた情報処理装置であって、
共通記憶手段への書込みを禁止/解除する手段と上記共
通記憶手段または個別記憶手段にスタック領域を配置す
る手段と上記個別記憶手段を切換える手段とを設け、切
換依頼により上記書込み禁止を解除して依頼元個別記憶
手段のスタック領域を共通記憶手段に配置した後依頼先
個別記憶手段に切換えるとともに、上記切換え後該個別
記憶手段にスタック領域を配置した後上記書込みを禁止
して所定プログラムを起動することを特徴とする情報処
理装置。
An information processing device comprising a plurality of individual storage means that have a common address and are selected and operated, and a common storage means,
Means for prohibiting/cancelling writing to the common storage means, means for arranging a stack area in the common storage means or the individual storage means, and means for switching the individual storage means are provided, and the writing prohibition is canceled upon a switching request. After arranging the stack area of the request source individual storage means in the common storage means, switch to the request destination individual storage means, and after the above switching, after arranging the stack area in the individual storage means, prohibit the above writing and start a predetermined program. An information processing device characterized by:
JP27602884A 1984-12-25 1984-12-25 Information processing unit Pending JPS61150049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27602884A JPS61150049A (en) 1984-12-25 1984-12-25 Information processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27602884A JPS61150049A (en) 1984-12-25 1984-12-25 Information processing unit

Publications (1)

Publication Number Publication Date
JPS61150049A true JPS61150049A (en) 1986-07-08

Family

ID=17563785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27602884A Pending JPS61150049A (en) 1984-12-25 1984-12-25 Information processing unit

Country Status (1)

Country Link
JP (1) JPS61150049A (en)

Similar Documents

Publication Publication Date Title
JPH0156410B2 (en)
JPS61150049A (en) Information processing unit
JPS5831651A (en) Restart processing system for electronic exchanger
JP2020140689A (en) Computer, operating system, and method
JPS58211254A (en) Accumulated program controlling system
JPH1153249A (en) Memory managing method
JPS61150048A (en) Information processing unit
JP3133814B2 (en) Non-destructive writing control method of information in redundant device
JP3463696B2 (en) Online garbage collection processing method
JP2000267936A (en) Disk sub-system
JP2003140966A (en) Cache memory control system of computer system
JPS61278943A (en) Register protecting circuit
JPS62232054A (en) Controlling system for stack frame descriptor
JPS60230248A (en) Memory protecting system
JPH0384645A (en) Memory protection system
JPS5956299A (en) Storage control system
JPH08339328A (en) Bank memory switching circuit
JPS6285357A (en) Memory protecting device
JPH06202901A (en) Rom emulation system debugger and rom emulation method
JPS63251964A (en) System for protecting magnetic disk memory
JPS6118224B2 (en)
JPH0673115B2 (en) Memory protection key controller
JPH03188551A (en) Protective system for asynchronous processing memory
JPH0764732A (en) Extended memory storage protecting system
JPH0362223A (en) Local stack control method for prolog