JPS6349944A - Arithmetic processing unit - Google Patents

Arithmetic processing unit

Info

Publication number
JPS6349944A
JPS6349944A JP61192758A JP19275886A JPS6349944A JP S6349944 A JPS6349944 A JP S6349944A JP 61192758 A JP61192758 A JP 61192758A JP 19275886 A JP19275886 A JP 19275886A JP S6349944 A JPS6349944 A JP S6349944A
Authority
JP
Japan
Prior art keywords
interrupt
interruption
address
interrupt request
circuit
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
JP61192758A
Other languages
Japanese (ja)
Inventor
Noboru Tamura
昇 田村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP61192758A priority Critical patent/JPS6349944A/en
Publication of JPS6349944A publication Critical patent/JPS6349944A/en
Pending 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To reduce debugging operation at the time of abnormal interruption processing by successively updating an interruption request circuit in specific addresses assigned in a program memory in accordance with interruption requests. CONSTITUTION:A general register array 1 temporarily stores an arithmetic state and data processed by an arithmetic logic computing element 2. An interruption control circuit 10 calculates a vector table address in accordance with an interruption request inputted from an external apparatus and transfers the calculated address value to a memory control circuit 5. A counter increment circuit 11 to be also used as an interruption request frequency writing means successively counts up respective interruption request inputted to the circuit 10, and while successively updating the number of interruption requests, writes the counted value in a specific address assigned in the program memory 4 through a data bus 3.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、種々の命令データを解析して、プログラム
を実行する演算処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an arithmetic processing device that analyzes various instruction data and executes a program.

〔従来の技術〕[Conventional technology]

従来、この種の演算処理装着、すなわち中央処理装置(
CPU)において、割込処理(I RQ処理)は下記の
ように実行されていた。
Conventionally, this type of arithmetic processing equipment, that is, the central processing unit (
CPU), interrupt processing (IRQ processing) is executed as follows.

まず、プログラムは割込(iRQ)を行うための、iR
Qベクタテーブルを初期化する。iRQベクタテーブル
は通常中央処理装置(CPU)のメモリ空間に設けられ
ており、CPUからリード(read)/ライト(wr
ite)可能であり、そのiRQベクタテーブルに各々
の割込に対応するプログラムの開始アドレスを書き込ん
でおく。また、一般的にどのソフトウェア割込がベクタ
テーブル内のベクタを利用するかというのは、CPU内
でハード的に固定である。
First, the program uses iRQ to perform an interrupt (iRQ).
Initialize the Q vector table. The iRQ vector table is usually provided in the memory space of the central processing unit (CPU), and can be read/written from the CPU.
ite) is possible, and the start address of the program corresponding to each interrupt is written in the iRQ vector table. Furthermore, which software interrupt uses a vector in the vector table is generally fixed in terms of hardware within the CPU.

例えば第4図に示すように、割込要因Aのベクタは「0
」番庫、割込要因Bベクタは「4」番地とし、各割込要
因A、Bのアドレスを「0」または「4」番地へ書き込
んでおき、CPUをiRQ可能な状態にしておく。
For example, as shown in Figure 4, the vector of interrupt factor A is "0".
'' number, the interrupt factor B vector is set to address ``4'', and the addresses of each interrupt factor A and B are written to address ``0'' or ``4'' to make the CPU capable of iRQ.

この状態で割込要因Bが発生すると、CPUは現在のプ
ログラムカウンタや各種レジスタを保存し、「4」番地
の内容を新しいプログラムカウンタとする。したがって
、割込要因B用の処理プログラムが実行され、処理終了
時のコマンド(この例ではi RET命令)を実行する
と、CPUは先に保存してあったプログラムカウンタお
よび各種レジスタを復帰させる。
When interrupt factor B occurs in this state, the CPU saves the current program counter and various registers, and sets the contents of address "4" as the new program counter. Therefore, when the processing program for interrupt factor B is executed and the command at the end of processing (in this example, the i RET instruction) is executed, the CPU restores the previously saved program counter and various registers.

このような動作を実行するCPUにおいて、割込発生順
序を想定している場合がある。例えばプログラムが割込
要因B2割込要因Aの順に割込が発生することを想定し
て作成しであるのに、実際にはこれが逆に起きたり、全
く想定していない割込等の状態が発生すると、プログラ
ムは異常動作する。
In a CPU that executes such operations, the order in which interrupts occur may be assumed. For example, a program is created with the assumption that interrupts will occur in the order of interrupt factor B and interrupt factor A, but in reality, this may occur in the opposite order, or a completely unexpected state such as an interrupt may occur. If this occurs, the program will behave abnormally.

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

従来このような状態の下で、以上の原因を追及するのは
非常に困難であり、CPUとは異なる専用の解析装置を
用いたり、プログラム内に状態を解析するためのトレー
ス手段を設けなければ、その原因を追及できない等の問
題点があった。
In the past, it was extremely difficult to investigate the causes mentioned above under such conditions, and it was necessary to use a dedicated analysis device different from the CPU or provide a trace means to analyze the condition within the program. , there were problems such as the inability to investigate the cause.

この発明は、上記の問題点を解消するためになされたも
ので、割込要求の発生頻度を各割込要因毎にそれぞれ把
握することにより1割込処理実行が異常となった場合の
デバッキング動作を軽減できる演算処理を得ることを目
的する。
This invention was made to solve the above problems, and by understanding the frequency of occurrence of interrupt requests for each interrupt cause, it is possible to debug when one interrupt processing execution becomes abnormal. The purpose is to obtain arithmetic processing that can reduce operations.

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

この発明に係る演算処理装置は、各割込要求発生時に、
各割込要求毎にプログラムメモリ内に割り付けられた特
定アドレスにそれぞれの割込要求回数を順次更新しなが
ら書き込む割込要求回数書き込み手段を設けたものであ
る。
The arithmetic processing device according to the present invention, when each interrupt request occurs,
The interrupt request number writing means is provided for sequentially updating and writing each interrupt request number to a specific address allocated in the program memory for each interrupt request.

〔作用〕[Effect]

この発明においては、例えば各外部機器より各割込要求
が発生すると、それぞれの割込要求に対応して、割込要
求回数書き込み手段がプログラムメモリ内に割り付けら
れた特定アドレスに割込要求回数を順次それぞれ更新さ
せて行く。
In this invention, for example, when each interrupt request is generated from each external device, the interrupt request number writing means writes the number of interrupt requests to a specific address allocated in the program memory in response to each interrupt request. We will update each one sequentially.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示す演算処理装置の構成
を説明するためのブロック図であり、1は汎用レジスタ
アレイで、算術論理演算器(ALTJ) 2が処理する
演算状態およびデータを一時的に保持する。3はデータ
バス、4はプログラムメモリで、メモリ制御回路5の各
アドレスに書き込まれたデータに基づいて読み出しが制
御される。
FIG. 1 is a block diagram for explaining the configuration of an arithmetic processing device showing an embodiment of the present invention, in which 1 is a general-purpose register array, and an arithmetic logic unit (ALTJ) 2 processes arithmetic states and data. Hold temporarily. 3 is a data bus, 4 is a program memory, and reading is controlled based on data written to each address of the memory control circuit 5.

6はプログラムカウンタで、次に実行する命令を順次指
示して行く、7は命令レジスタで、データバス3を介し
て授受した命令コードを保持する。
6 is a program counter that sequentially instructs the next instruction to be executed; 7 is an instruction register that holds the instruction code sent and received via the data bus 3;

8は命令デコーダで、命令レジスタ7に保持された命令
コードを解析して制御回路9に解析した命令を転送する
。10は割込制御回路で、外部機器から入力される割込
要求に応じてベクタテーブルアドレスを演算し、演算し
たアドレス値をメモリ制御回路5に転送する。11はこ
の発明の割込要求回数書き込み手段をなすカウンタ増加
回路で、割込制御回路10に入力される各割込要求を順
次次に割込要求が発生した場合にそれぞれのアドレス「
4」 、「12」の内容を読み出し、その内容に「1」
を加算し、上述と同様にカウント値をアドレス「4」ま
たはアドレス「12」に書き込ませる。
An instruction decoder 8 analyzes the instruction code held in the instruction register 7 and transfers the analyzed instruction to the control circuit 9. Reference numeral 10 denotes an interrupt control circuit that calculates a vector table address in response to an interrupt request input from an external device, and transfers the calculated address value to the memory control circuit 5. Reference numeral 11 denotes a counter incrementing circuit constituting the interrupt request number writing means of the present invention, which sequentially inputs each interrupt request inputted to the interrupt control circuit 10, and when the next interrupt request occurs, the respective address "
Read the contents of “4” and “12” and add “1” to the contents.
is added, and the count value is written to address "4" or address "12" in the same manner as described above.

第2図は第1図に示したプログラムメモリ4のメモリ空
間を説明するための模式図であり、21は例えばプログ
ラムメモリ4の「0」番地に設定される第1ベクタエリ
アで、割込制御回路10に入力される割込要求Aに対応
している。22は例えばプログラムメモリ4の「4」番
地に設定される第1カウンタエリアで、割込要求Aが入
力された場合に、カウンタ増加回路11がカウントした
カウント値が格納される。なお、初期値は4バイト全て
が「0」である。23は例えばプログラムメモリ4の「
8」番地に設定される第2ベクタエリアで、割込制御回
路1oに入力される割込要求Bに対応している。24は
例えばプログラムメモリ4の「12」番地に設定される
第2カウンタエリアで、割込要求Bが入力された場合に
、カウンタ増加回路11がカウントしたカウント値が格
納される。なお、初期値は4バイト全てが「0」である
FIG. 2 is a schematic diagram for explaining the memory space of the program memory 4 shown in FIG. This corresponds to the interrupt request A input to the circuit 10. A first counter area 22 is set, for example, at address "4" of the program memory 4, and stores the count value counted by the counter incrementing circuit 11 when the interrupt request A is input. Note that the initial value is that all 4 bytes are "0". 23 is, for example, "
The second vector area is set at address 8'' and corresponds to the interrupt request B input to the interrupt control circuit 1o. A second counter area 24 is set, for example, at address "12" of the program memory 4, and stores the count value counted by the counter increment circuit 11 when the interrupt request B is input. Note that the initial value is that all 4 bytes are "0".

次に第3図を参照しながらこの発明による割込要求管理
制御動作について説明する。
Next, the interrupt request management control operation according to the present invention will be explained with reference to FIG.

第3図はこの発明による割込要求管理制御動作を説明す
るためのフローチャートである。なお、(1)〜(14
)は各ステップを示す。
FIG. 3 is a flowchart for explaining the interrupt request management control operation according to the present invention. In addition, (1) to (14
) indicates each step.

制御回路9は第1図に示したプログラムメモリ4に格納
されたプログラムを実行中に、割込制御回路10の図示
しないボートに割込要求Aまたは割込要求Bが入力され
るのを待機しく1)、割込要求Aまたは割込要求Bが発
生したら割込入力を割込制御回路1oが制御回路9に通
知する(2)。次いで、制御回路9がプログラムカウン
タ6および汎用レジスタアレイ]をプログラムメモリ4
内に退避させる(3)0次いで、割込制御回路10は入
力された割込要求Aまたは割込要求Bに対応する割込ベ
クタのアドレスを算出しく4)、算出したアドレスをカ
ウンタ増加回路11に送出する(5)。
While executing the program stored in the program memory 4 shown in FIG. 1, the control circuit 9 waits for an interrupt request A or B to be input to a port (not shown) of the interrupt control circuit 10. 1) When interrupt request A or interrupt request B occurs, the interrupt control circuit 1o notifies the control circuit 9 of the interrupt input (2). Next, the control circuit 9 transfers the program counter 6 and the general-purpose register array to the program memory 4.
(3) 0 Next, the interrupt control circuit 10 calculates the address of the interrupt vector corresponding to the input interrupt request A or interrupt request B (4), and stores the calculated address in the counter increment circuit 11. (5).

カウンタ増加回路11は与えられたアドレスに「4」を
加算したアドレス、すなわち、第1カウンタエリア22
のアドレスを算出しく6)、そのアドレスの内容を読み
出しく7)、その値にrlJを加算しく8)、第1カウ
ンタニリア22に加算したカウント値を書き込む(9)
。次いで、割込制御回路10が書き込み終了通知を待機
しく10)、書き込み終了通知が発生したら、割込制御
回路10が算出したアドレス、すなわち割込要求Aまた
は割込要求Bに対応するアドレス(第2図に示すアドレ
ス「4」またはアドレス「12」)を制御回路9に通知
する(11)。次いで、制御回路9がアドレス「4」ま
たはアドレス「12」に書き込まれた内容を読み出しく
12)、これをプログラムカウンタ6へ書き込み(13
)、プログラム実行制御を継続させる(14)。ここで
、任意のタイミングで、プログラムを中断または停止さ
せ、第1カウンタエリア22、第2カウンタエリア24
の内容を読み出す。すなわち、第1カウンタエリア22
.第2カウンタエリア24の内容から各割込要求の発生
頻度を判定できる。
The counter increment circuit 11 generates an address obtained by adding "4" to the given address, that is, the first counter area 22
6), read the contents of that address 7), add rlJ to that value 8), and write the added count value to the first counter area 22 (9).
. Next, the interrupt control circuit 10 waits for a write end notification (10), and when the write end notification occurs, the interrupt control circuit 10 waits for a write end notification (10). The address "4" or address "12" shown in FIG. 2) is notified to the control circuit 9 (11). Next, the control circuit 9 reads the content written to address "4" or address "12" (12) and writes it to the program counter 6 (13).
), and program execution control continues (14). Here, the program is interrupted or stopped at any timing, and the first counter area 22, second counter area 24
Read the contents of. That is, the first counter area 22
.. The frequency of occurrence of each interrupt request can be determined from the contents of the second counter area 24.

なお、上記実施例では、カウンタ増加回路11が任意の
タイミングで第1カウンタエリア22゜第2カウンタエ
リア24を初期化する場合について説明したが、各割込
要求の開始または終了時に初期化してもよい。また、上
記実施例では第1カウンタエリア22.第2カウンタエ
リア24の内容の読み出しを任意のタイミングで実行す
る場合について説明したが、各割込要求の開始または終
了時に実行するように制御してもよい。
In the above embodiment, the case where the counter increment circuit 11 initializes the first counter area 22 and the second counter area 24 at an arbitrary timing has been described, but it is also possible to initialize the first counter area 22 and the second counter area 24 at an arbitrary timing. good. Further, in the above embodiment, the first counter area 22. Although the case where the reading of the contents of the second counter area 24 is executed at an arbitrary timing has been described, it may be controlled to be executed at the start or end of each interrupt request.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、この発明は各割込要求発生時に、
各割込要求毎にプログラムメモリ内に割り付けられた特
定アドレスにそれぞれの割込要求回数を順次更新しなが
ら書き込む割込要求回数書き込み手段を設けたので、各
割込要求の発生頻度を正確にトレース可能となり、プロ
グラムが異常実行した場合のデバッキング効率を大幅に
改善できる優れた利点を有する。
As explained above, this invention, when each interrupt request occurs,
We have provided an interrupt request count writing means that sequentially updates and writes each interrupt request count to a specific address allocated in the program memory for each interrupt request, so the frequency of occurrence of each interrupt request can be accurately traced. This has the excellent advantage of greatly improving debugging efficiency when a program executes abnormally.

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

第1図はこの発明の一実施例を示す演算処理装置の構成
を説明するためのブロック図、第2図は第1図に示した
プログラムメモリのメモリ空間を説明するための模式図
、第3図はこの発明による割込要求管理制御動作を説明
するためのフローチャート、第4図は従来の割込処理動
作を説明するための模式図である。 図中、1は汎用レジスタアレイ、2は算術論理演算器、
3はデータバス、4はプログラムメモリ、5はメモリ制
御回路、6はプログラムカウンタ、7は命令レジスタ、
8は命令デコーダ、9は制御回路、10は割込制御回路
、11はカウンタ増加回路である。 第1図 第2図 第4図 アドレス ↓ 第3
FIG. 1 is a block diagram for explaining the configuration of an arithmetic processing device showing one embodiment of the present invention, FIG. 2 is a schematic diagram for explaining the memory space of the program memory shown in FIG. 1, and FIG. The figure is a flowchart for explaining the interrupt request management control operation according to the present invention, and FIG. 4 is a schematic diagram for explaining the conventional interrupt processing operation. In the figure, 1 is a general-purpose register array, 2 is an arithmetic logic unit,
3 is a data bus, 4 is a program memory, 5 is a memory control circuit, 6 is a program counter, 7 is an instruction register,
8 is an instruction decoder, 9 is a control circuit, 10 is an interrupt control circuit, and 11 is a counter increment circuit. Figure 1 Figure 2 Figure 4 Address ↓ 3rd

Claims (1)

【特許請求の範囲】[Claims] 外部機器から入力される複数の割込要求に応じて実行中
のプログラムを中断し、プログラムメモリの特定アドレ
スに書き込まれたベクタ値に基づいて特定の割込処理ル
ーチンを実行する演算処理装置において、各割込要求発
生時に、各割込要求毎に前記プログラムメモリ内に割り
付けられた特定アドレスにそれぞれの割込要求回数を順
次更新しながら書き込む割込要求回数書き込み手段を具
備したことを特徴とする演算処理装置。
In an arithmetic processing unit that interrupts a running program in response to multiple interrupt requests input from an external device and executes a specific interrupt processing routine based on a vector value written to a specific address in a program memory, The present invention is characterized by comprising an interrupt request count writing means for sequentially updating and writing each interrupt request count to a specific address allocated in the program memory for each interrupt request when each interrupt request occurs. Arithmetic processing unit.
JP61192758A 1986-08-20 1986-08-20 Arithmetic processing unit Pending JPS6349944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61192758A JPS6349944A (en) 1986-08-20 1986-08-20 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61192758A JPS6349944A (en) 1986-08-20 1986-08-20 Arithmetic processing unit

Publications (1)

Publication Number Publication Date
JPS6349944A true JPS6349944A (en) 1988-03-02

Family

ID=16296560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61192758A Pending JPS6349944A (en) 1986-08-20 1986-08-20 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JPS6349944A (en)

Similar Documents

Publication Publication Date Title
US5003468A (en) Guest machine execution control system for virutal machine system
EP1125199B1 (en) Method of debugging a program thread
JPS6349944A (en) Arithmetic processing unit
JPS6349946A (en) Arithmetic processing unit
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JPS6349942A (en) Arithmetic processing unit
JPH0283749A (en) Internal interruption control system for microprocessor
US20200285472A1 (en) Context-Switching Method and Apparatus
JPS6349941A (en) Arithmetic processing unit
JPS62221059A (en) Central processing unit
JPH0713778A (en) Device and method for process communication control
JPS63124143A (en) Information processor
JPH03119449A (en) Calculating device
JPH0264828A (en) Address trace circuit
JP2000122882A (en) Multi-thread processor and debugging device
JPS61253503A (en) Sequence controller
JPH01201730A (en) Information processor
JPS6349846A (en) Arithmetic processor
Atkins et al. Experiences with coroutines in BCPL
JPS62264338A (en) Single chip microcomputer for evaluation
JPH0746318B2 (en) Microcomputer development support device
JPH0581068A (en) Debugging support device
JPH04264632A (en) Execution tracing system for parallel arithmetic processing unit
JPS62120550A (en) Program debug system
JPS63187332A (en) Arithmetic processing unit