Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH051499B2 - - Google Patents
[go: Go Back, main page]

JPH051499B2 - - Google Patents

Info

Publication number
JPH051499B2
JPH051499B2 JP59040010A JP4001084A JPH051499B2 JP H051499 B2 JPH051499 B2 JP H051499B2 JP 59040010 A JP59040010 A JP 59040010A JP 4001084 A JP4001084 A JP 4001084A JP H051499 B2 JPH051499 B2 JP H051499B2
Authority
JP
Japan
Prior art keywords
processing
request
macro service
data
interrupt
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.)
Expired - Fee Related
Application number
JP59040010A
Other languages
Japanese (ja)
Other versions
JPS60183639A (en
Inventor
Mitsue Abe
Osamu Matsushima
Yukio Maehashi
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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP59040010A priority Critical patent/JPS60183639A/en
Priority to DE85102394T priority patent/DE3587643T2/en
Priority to EP85102394A priority patent/EP0153764B1/en
Publication of JPS60183639A publication Critical patent/JPS60183639A/en
Priority to US07/287,622 priority patent/US5036458A/en
Priority to US07/691,284 priority patent/US5159688A/en
Priority to US07/691,297 priority patent/US5163150A/en
Publication of JPH051499B2 publication Critical patent/JPH051499B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)
  • Bus Control (AREA)

Description

【発明の詳細な説明】 (技術分野) 本発明はカウンタを内蔵するデータ処理装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION (Technical Field) The present invention relates to a data processing device incorporating a counter.

近年、LSI技術の発達には目覚しいものがあ
り、高集積化とともにその機能も高度化、多様化
してきている。特に、カウンタ、シリアルインタ
フエース、A/Dコンバータ等の周辺ハードウエ
ア機能の多様化、多機能化が目立つている。中で
もカウンタ機能は制御対象から発生されるパルス
の周期及びパルス幅等を測定するのに適した機能
で、例えばモーターの回転数や回転速度の検出及
びこれらの制御には必要不可欠な機能であり、マ
イクロコンピユータチツプの中に1機能として集
積化されている。一般に、マイクロコンピユータ
ではパルスの周期及びパルス幅等の測定のため
に、所定の計数用クロツクをカウントするカウン
タ(以下、フリーランニングカウンタ(FRC)
と言う)とカウントしたデータを一時的に保持す
るキヤブチヤレジスタ(以下、CPTRという)と
を含むカウンタが用いられる。このような構成の
カウンタは被測定対象からパルス信号が送られる
と、そのときのFRCの計数状態を示す値を
CPTRに格納し(以下、この動作をキヤブチヤす
るという)、次のパルス信号が入力されるまで
FRCの計数動作を続行する。そして次のパルス
信号が入力されるとFRCのその時の値をキヤブ
チヤする。CPTRはその間以前にキヤブチヤした
データを保持する。パルス幅及び周期を求めるに
は、CPTRに格納されている前回のデータを一時
的に他のレジスタに退避して、次にFRCの値が
キヤブチヤされた時に前回キヤブチヤしたデータ
との差分を求めればよい。
In recent years, LSI technology has made remarkable progress, and its functions have become more sophisticated and diversified along with higher integration. In particular, peripheral hardware functions such as counters, serial interfaces, and A/D converters are becoming increasingly diverse and multifunctional. Among these, the counter function is a function suitable for measuring the period and pulse width of pulses generated by a controlled object, and is an essential function for detecting and controlling the rotational speed and rotational speed of a motor, for example. It is integrated into a microcomputer chip as one function. Generally, in microcomputers, a counter (hereinafter referred to as a free running counter (FRC)) that counts a predetermined counting clock is used to measure pulse periods, pulse widths, etc.
(hereinafter referred to as CPTR) and a cabin register (hereinafter referred to as CPTR) that temporarily holds the counted data. When a counter with this type of configuration receives a pulse signal from the object being measured, it outputs a value that indicates the counting status of the FRC at that time.
Store it in CPTR (hereinafter referred to as "capture") until the next pulse signal is input.
Continue FRC counting operation. When the next pulse signal is input, the current value of FRC is captured. CPTR retains previously captured data during this time. To find the pulse width and period, temporarily save the previous data stored in CPTR to another register, and then find the difference from the previous data when the FRC value is written. good.

また、精度の高い制御を行おうとする場合に
は、ノイズに対する対策や最適制御ということを
考慮に入れなければならない。このため、以前キ
ヤブチヤしたデータから得られるパルス幅、周期
等の情報と新しく得られた情報とを比較すること
により、ノイズによるキヤブチヤ発生の有無や加
速または減速の度合いを求めたり、あるいは複数
回のキヤブチヤしたデータから平均を求め、その
結果を用いて種々の制御を行うという手法が採用
されている。
Furthermore, when attempting to perform highly accurate control, measures against noise and optimal control must be taken into consideration. For this reason, by comparing information such as pulse width and period obtained from previously recorded data with newly obtained information, it is possible to determine whether or not noise is occurring, the degree of acceleration or deceleration, or to calculate the degree of acceleration or deceleration caused by noise. A method has been adopted in which an average is calculated from the captured data and the results are used to perform various controls.

(従来技術) 以下にカウンタを有する従来のデータ処理装置
について第1図に示すブロツク図を参照して説明
する。
(Prior Art) A conventional data processing device having a counter will be described below with reference to the block diagram shown in FIG.

マイクロコンピユータ100は実行部101、
プログラムメモリ102、データメモリ103、
割込み制御部104及びカウンタ105を有し、
これらは内部バス106を介して相互に接続され
ている。プログラムカウンタ(以下、PCという)
101−1、プログラム・ステータス・ワード
(以下、PSWという)101−2及び汎用レジス
タセツト101−3を有する実行部101は、プ
ログラムメモリ102から命令コードを読み出し
て実行し、処理データをデータメモリ103に格
納する。カウンタ105はFRC105−1、キ
ヤブチヤしたデータを保持するキヤブチヤ・レジ
スタ105−2、キヤブチヤ指令線105−3及
びキヤブチヤ終了信号出力線105−4を有す
る。FRC105−1はキヤブチヤ指令線105
−3の信号がアクテイブになると、そのときの
FRC105−1の値をCPTR105−2に格納
し、キヤブチヤ終了信号出力線105−4に信号
を出力して1回のキヤブチヤ動作が終了したこと
を割込み制御部104に通知する。これを受けて
割込み制御部104は割込み要求線104−1を
アクテイブにして割込み要求発生を実行部101
に通知し、それにより実行部101はキヤブチヤ
割込み処理を実行する。
The microcomputer 100 includes an execution unit 101,
program memory 102, data memory 103,
It has an interrupt control unit 104 and a counter 105,
These are interconnected via an internal bus 106. Program counter (hereinafter referred to as PC)
101-1, a program status word (hereinafter referred to as PSW) 101-2, and a general-purpose register set 101-3. Store in. The counter 105 has an FRC 105-1, a cabin register 105-2 for holding the cabin data, a cabin command line 105-3, and a cabin end signal output line 105-4. FRC105-1 is Kyabuchia command line 105
-3 signal becomes active, the current
The value of FRC 105-1 is stored in CPTR 105-2, and a signal is output to cabin end signal output line 105-4 to notify interrupt control unit 104 that one cabin operation has ended. In response to this, the interrupt control unit 104 activates the interrupt request line 104-1 to issue an interrupt request to the execution unit 101.
As a result, the execution unit 101 executes the interrupt processing.

ここで第2図のフローチヤートを用いて割込み
によるシーケンス処理手順を述べる。
Here, the sequence processing procedure using an interrupt will be described using the flowchart shown in FIG.

本ソフトウエア処理ではキヤブチヤ指令線10
5−3に入力された信号の時間間隔、すなわちパ
ルス幅、周期等の情報をキヤブチヤしたデータ間
で減算を実行することによつて求め、その減算結
果をデータメモリ内の所定アドレスに転送すると
いう処理を行う。データメモリ103にはキヤブ
チヤパラメータ退避領域103−1、および演算
結果格納領域103−2、PC101−1、PSW
101−2、汎用レジスタセツト101−3(以
下、これらをステータスという)を退避するスタ
ツク領域103−3及び前回キヤブチヤした値を
一時的に記憶するキヤブチヤデータ可能領域10
3−4を設定する。キヤブチヤパラメータ退避領
域103−1には演算結果格納領域103−2内
のアドレスを指定するメモリ・ポインタ、及びキ
ヤブチヤした回数を保持するキヤブチヤ回数情報
があらかじめ格納されている。
In this software processing, the Kyabuchia command line 10
The time interval of the signal input to 5-3, that is, information such as pulse width and period, is obtained by subtracting between the captured data, and the result of the subtraction is transferred to a predetermined address in the data memory. Perform processing. The data memory 103 includes a cab parameter save area 103-1, a calculation result storage area 103-2, a PC 101-1, and a PSW.
101-2, a stack area 103-3 for saving the general-purpose register set 101-3 (hereinafter referred to as status), and a cache data possible area 10 for temporarily storing the previously cached value.
Set 3-4. A memory pointer specifying an address in the calculation result storage area 103-2 and cabin number information that holds the number of cabins have been stored in advance in the cabin parameter save area 103-1.

キヤブチヤ指令線105−3からの信号がアク
テイブになり、FRC105−1の値がCPTR1
05−2に転送されるとキヤブチヤ終了信号線1
05−4に信号が出力されてキヤブチヤ割込みが
発生する。第1図において、実行部101はそれ
までの処理内容を保持しておくためにステータス
の内容を一時的にデータメモリ103内のスタツ
ク領域103−3に退避する。その後、キヤブチ
ヤパラメータ退避領域103−1からキヤブチヤ
回数情報及びメモリポインタを読み出す。次に
CPTR105−2の値を読み出し、データメモリ
103内のキヤブチヤデータ格納領域103−4
から前回キヤブチヤしたデータを読み出し、
CPTR105−2の値からこの値を演算しその結
果をメモリポインタの指定するアドレスに転送す
る。
The signal from Cabuchi command line 105-3 becomes active, and the value of FRC105-1 becomes CPTR1.
When transferred to 05-2, the terminal signal line 1
A signal is output at 05-4 and a cab interrupt occurs. In FIG. 1, the execution unit 101 temporarily saves the contents of the status in the stack area 103-3 in the data memory 103 in order to retain the contents of the processing up to that point. Thereafter, the cabin number information and memory pointer are read from the cabin parameter save area 103-1. next
Read the value of CPTR 105-2 and store it in the cabin data storage area 103-4 in the data memory 103.
Read the data that was previously captured from
This value is calculated from the value of CPTR 105-2 and the result is transferred to the address specified by the memory pointer.

次に、今読み出したCPTR105−2の値をキ
ヤブチヤデータ格納領域103−4に転送する。
その後、メモリポインタをインクリメントし、ま
たキヤブチヤ回数情報をデクリメントして、キヤ
ブチヤパラメータ退避領域103−1に返却す
る。キヤブチヤ回数が所定の回数に達した時、す
なわち、デクリメントした値が0になつた時に
は、一連のキヤブチヤ動作により速度情報の収集
を完了したものとして、キヤブチヤ手順完了処理
へ分岐し、例えば平均化処理や加速あるいは減速
の度合いを求める処理等を行う。まだ所定の回数
が終了していない時にはPC101−1、PSW1
01−2、汎用レジスタセツト101−3をスタ
ツク領域103−3から復帰してキヤブチヤ割込
みサービスを完了する。
Next, the value of the CPTR 105-2 just read out is transferred to the cabin data storage area 103-4.
Thereafter, the memory pointer is incremented, the cabin count information is decremented, and the information is returned to the cabin parameter save area 103-1. When the number of cabin operations reaches a predetermined number, that is, when the decremented value becomes 0, it is assumed that the collection of speed information has been completed through a series of cabin operations, and the process branches to the cabin procedure completion process, for example, averaging processing. It performs processes such as determining the degree of acceleration or deceleration. If the predetermined number of times has not yet been completed, PC101-1, PSW1
01-2, the general purpose register set 101-3 is restored from the stack area 103-3 and the cache interrupt service is completed.

以上述べた通り、従来のマイクロコンピユータ
における割込みによるソフトウエア処理では、割
込み発生時に前回のキヤブチヤデータをメモリか
ら読み出して最新のキヤブチヤデータとの減算を
行い、されをデータメモリ内に格納するという処
理を行うが、これらの処理の他にCPUの割込み
処理、PC101−1、PSW101−2、汎用レ
ジスタセツト101−3等のレジスタの退避及び
復帰、メインルーチンへの復帰、さらに個々の命
令のフエツチ、デコード等、相当のオーバーヘツ
ドが伴う。これらのオーバーヘツドは全割込みサ
ービスルーチンのうち相当の割合を占めており、
割込みの回数が増える程、CPUが本来のデータ
処理を行う時間が減少し、CPUの処理能力が低
下するという大きな欠点を有していることにな
り、精度の高い制御が要求される場合にはこの処
理能力の低下は非常に大きな問題となる。
As mentioned above, in conventional interrupt-based software processing in microcomputers, when an interrupt occurs, the previous cabin data is read from memory, subtracted from the latest cabin data, and the result is stored in the data memory. , In addition to these processes, CPU interrupt processing, saving and restoring registers such as PC 101-1, PSW 101-2, and general-purpose register set 101-3, returning to the main routine, fetching and decoding of individual instructions, etc. Significant overhead is involved. These overheads account for a significant portion of the total interrupt service routine;
As the number of interrupts increases, the time for the CPU to perform the original data processing decreases, which has the major disadvantage of reducing the CPU's processing ability.If high-precision control is required, This decrease in processing capacity becomes a very big problem.

(発明の目的) したがつて本発明の目的は上記のキヤブチヤデ
ータの演算及び演算結果の転送機能を命令実行制
御のためのハードウエアを有効に活用することに
よつて、ソフトウエア割込み処理の介入による
CPUの負担を軽減し、処理能力の低下を最小限
に抑えたデータ処理装置を提供することである。
(Object of the Invention) Therefore, the object of the present invention is to effectively utilize the hardware for controlling instruction execution to perform the above-mentioned function of calculating the above-mentioned computer data and transferring the result of the calculation, by intervening with software interrupt processing.
An object of the present invention is to provide a data processing device that reduces the burden on a CPU and minimizes a decrease in processing performance.

(発明の構成) 本発明は、中央処理装置でプログラム処理の実
行中に割込みが発生すると、これに対応する割込
み処理をこの中央処理装置で実行するデータ処理
において、カウンタと、このカウンタで計数され
た値に対してデータ制御を行うカウントデータ処
理制御部とを有し、割込みが発生するとプログラ
ム処理を一時中断し、中断時の中央処理装置の状
態を退避することなく割込み処理を実行するとと
もに、この割込み処理ではカウントデータ処理制
御部から割込み命令を発生すると、カウンタの計
数値を中央処理装置の算術論理演算ユニツトを用
いて演算処理するものである。
(Structure of the Invention) According to the present invention, when an interrupt occurs during the execution of program processing in a central processing unit, the corresponding interrupt processing is counted by a counter and in data processing executed by the central processing unit. and a count data processing control unit that performs data control on the value set, and when an interrupt occurs, the program processing is temporarily interrupted, and the interrupt processing is executed without saving the state of the central processing unit at the time of interruption. In this interrupt processing, when an interrupt command is generated from the count data processing control section, the count value of the counter is processed using the arithmetic and logic operation unit of the central processing unit.

(発明の効果) 本発明ではカウンタからの処理要求(以下、
I/O要求という)の発生に対処するための
CPUの割込み処理ルーチンが不要である。すな
わち、I/O要求の発生により自動的にキヤブチ
ヤ・データの減算を実行してパルス幅、周期等の
情報を求めその演算結果をメモリに転送すること
ができる(以下、前記減算及び転送処理をマク
ロ・サービスという)。
(Effects of the Invention) In the present invention, processing requests (hereinafter referred to as
To deal with the occurrence of I/O requests)
No CPU interrupt handling routine is required. That is, upon the generation of an I/O request, it is possible to automatically perform subtraction of the capacitor data to obtain information such as pulse width and period, and to transfer the calculation results to the memory (hereinafter, the subtraction and transfer process will be described below). macro service).

マクロ・サービスはカウント装置からのI/O
要求が発生すると、CPUの通常のプログラム実
行を停止し、PC、PSW、汎用レジスタセツト等
のステータス情報、及びデータをその位置に保持
した状態で行なわれる。マクロサービスはCPU
自身が通常のプログラム実行時の命令実行制御の
ために使うハードウエアの一部を有効に活用して
行われるので、マクロ・サービス用の特殊なハー
ドウエアを付加する必要はない。データ処理制御
手段がマクロ・サービスを終了すると、CPUは
保持していたステータス及びデータをそのまま使
つて中断していたプログラムの実行を再開実行す
る。このプログラムの中断はソフトウエア上はオ
ペレータに見えないため、見かけ上プログラム処
理の途中に自動的にマクロサービスが挿入された
ような形となる。このようにマクロサービスはソ
フトウエア処理を伴うキヤブチヤ割込みの発生回
数を最小限におさえることができるので、CPU
の実行効率を向上させることができる。尚、所定
の回数のマクロサービスを終了すると、従来の割
込み要求を発生させてCPUにマクロサービス終
了を通知し、その後の処理はプログラム実行によ
つて行う。
Macro service is I/O from counting device
When a request occurs, the normal program execution of the CPU is stopped, and status information such as the PC, PSW, general register set, etc., and data are held at their positions. Macro service is CPU
Since this is done by effectively utilizing part of the hardware used for controlling instruction execution during normal program execution, there is no need to add special hardware for macro service. When the data processing control means finishes the macro service, the CPU resumes execution of the interrupted program using the status and data that it held. Since this program interruption is not visible to the operator from the software perspective, it appears as if a macro service was automatically inserted in the middle of program processing. In this way, macro services can minimize the number of interrupts that involve software processing, so the CPU
can improve execution efficiency. When the macro service is completed a predetermined number of times, a conventional interrupt request is generated to notify the CPU of the completion of the macro service, and subsequent processing is performed by program execution.

(実施例) 第3図に本発明の一実施例を示し、図を用いて
説明する。カウント装置105はFRC105−
1とCPTR105−2を有し、キヤブチヤ指令信
号105−3によりFRC105−1の値をキヤ
ブチヤすると、キヤブチヤ終了信号105−4を
出力する。カウントデータ処理制御部500は
I/O要求制御部205、I/O処理実行要求線
205−1、I/O処理実行形態指定線205−
2,及びCPU510の動作を制御するI/O要
求受付け部206を有する。またデータメモリ部
103は演算結果格納領域103−2、ステータ
スを退避させるスタツク領域103−3を有し、
CPU510は次に実行するプログラムメモリ1
02のアドレスを指すPC101−1、CPU全体
の動作状態を示すPSW101−2、処理中のデ
ータを保持する汎用レジスタセツト101−3、
算術論理演算機能を持つ算術論理演算ユニツト
(以下、ALRという)201、次に実行すべき命
令を保持する命令レジスタ202、命令レジスタ
202の内容を解読し各種制御信号を発生する命
令デコーダ203、命令デコーダ203の出力に
よりCPU510全体の動作を制御する実行制御
部204により構成されている。また、データメ
モリ103の一部にはマクロサービスに必要とな
るマクロサービスレジスタ群207を設けてい
る。このマクロサービスレジスタ群207は、キ
ヤブチヤレジスタのアドレスを指定するがポイン
タ(以下I/OPと記す)207−1、前回キヤ
ブチヤしたデータを保持するデータメモリのアド
レスを指定するポインタ(以下BPと記す)20
7−2、2つのキヤブチヤ・データの減算結果を
格納する演算結果格納領域103−2内のアドレ
スを指定するメモリポインタ(以下MRと記す)
207−3、キヤブチヤ回数を保持できるターミ
ナル・カウンタ(以下TCと記す)207−4に
より構成されている。上記各部はすべて内部バス
106に接続している。
(Example) An example of the present invention is shown in FIG. 3, and will be explained using the drawings. The counting device 105 is FRC105-
1 and CPTR 105-2, and when the value of FRC 105-1 is calculated by the cabin command signal 105-3, a cabin end signal 105-4 is output. The count data processing control section 500 includes an I/O request control section 205, an I/O processing execution request line 205-1, and an I/O processing execution mode specification line 205-.
2, and an I/O request receiving unit 206 that controls the operation of the CPU 510. The data memory unit 103 also has an operation result storage area 103-2, a stack area 103-3 for saving status,
The CPU 510 is the program memory 1 to be executed next.
PC 101-1 pointing to address 02, PSW 101-2 indicating the operating status of the entire CPU, general-purpose register set 101-3 holding data being processed,
An arithmetic and logic unit (hereinafter referred to as ALR) 201 that has an arithmetic and logic operation function, an instruction register 202 that holds the next instruction to be executed, an instruction decoder 203 that decodes the contents of the instruction register 202 and generates various control signals, and an instruction It is composed of an execution control unit 204 that controls the overall operation of the CPU 510 based on the output of the decoder 203. Further, a macro service register group 207 necessary for macro service is provided in a part of the data memory 103. This macro service register group 207 includes a pointer (hereinafter referred to as I/OP) 207-1 that specifies the address of the cache register, and a pointer (hereinafter referred to as BP) that specifies the address of the data memory that holds the previously cached data. )20
7-2. Memory pointer (hereinafter referred to as MR) that specifies the address in the operation result storage area 103-2 that stores the result of subtraction of two cabocha data.
207-3, and a terminal counter (hereinafter referred to as TC) 207-4 that can hold the number of times of kabuchiya. All of the above parts are connected to an internal bus 106.

このブロツク図を参照して、以下にカウント・
データ処理におけるマクロサービスの動作につい
て述べる。
Referring to this block diagram, perform the counting below.
This section describes the operation of macro services in data processing.

カウント装置105は、キヤブチヤ指令線10
5−3からアクテイブ信号が入力されると、その
ときのFRC105−1の値をCPTR105−2
にキヤブチヤし、キヤブチヤ終了信号105−4
を出力する。I/O要求制御部205はそれを受
けてI/O要求受付け部206に対するI/O処
理要求線205−1をアクテイブ・レベルとし、
同時にI/O処理実行形態指定線205−2をハ
イレベルとする。
The counting device 105 is connected to the Kyabuchia command line 10.
When an active signal is input from 5-3, the value of FRC105-1 at that time is transferred to CPTR105-2.
105-4
Output. In response, the I/O request control unit 205 sets the I/O processing request line 205-1 to the I/O request receiving unit 206 to an active level, and
At the same time, the I/O processing execution mode designation line 205-2 is set to high level.

I/O要求受付け部206はI/O処理要求線
205−1がアクテイブとなつたときにI/O処
理実行形態指定線205−2がハイレベルである
ことを検出するとこのI/O要求がマクロ・サー
ビスにより処理するために命令レジスタ202に
マクロ・サービスコードを設定する。実行制御部
204はPC101−1の更新を禁止し、PC10
1−1、PSW101−2、汎用レジスタセツト
101−3の値を保持したまま、以下に示す処理
を開始する。
If the I/O request receiving unit 206 detects that the I/O processing execution mode designation line 205-2 is at a high level when the I/O processing request line 205-1 becomes active, this I/O request is accepted. A macro service code is set in the instruction register 202 for processing by macro service. The execution control unit 204 prohibits updating of the PC 101-1, and updates the PC 101-1.
1-1, PSW 101-2, and general-purpose register set 101-3 are held, and the following processing is started.

まずI/O要求制御部205は内部バス106
上にマクロ・サービスレジスタ群207のアドレ
スを出力し、実行制御部204がこのマクロ・サ
ービスレジスタ群207のアドレスを読み込む。
次に実行制御部204はマクロ・サービスレジス
タ群207のI/OP207−1で指定される
CPTR105−2からキヤブチヤ・データを読み
出す。次に実行制御部204はマクロ・サービス
レジスタ群207のBP207−2で指定される
アドレスのメモリから前回キヤブチヤした値を読
み出し、前記CPTRの値からこの前回キヤブチヤ
した値を減算する。この減算した結果をMP20
7−3で指定されるデータメモリ103中の演算
結果格納領域103−2へ格納し読み出した
CPTR105−2の値をBP207−2で指定さ
れるアドレスのメモリへ格納する。次にTC20
7−4をデクリメントしてTC207−4へ格納
し、演算結果を格納するアドレスを指定するメモ
リポンイタMPの値をインクリメントし、MP2
07−3へ格納する。以上一連の処理で一回のマ
クロ・サービスにおけるキヤブチヤ・データの減
算及び転送処理が終了するが、TC207−4の
値が減算の結果0になつた時には一連のマクロ・
サービスを完了したものとみなし、I/O要求制
御部205はI/O処理実行要求線205−1を
再びアクテイブにすると共に従来の割込み要求を
発生するためにI/O処理実行形態指定線205
−2をロウレベルとする。するとI/O要求受付
け部206は割込み処理プログラムを起動し、マ
クロ・サービスの実行によつて得られた一連のデ
ータを平均化する等のソフトウエア処理を実行す
る。
First, the I/O request control unit 205
The address of the macro service register group 207 is output to the top, and the execution control unit 204 reads the address of the macro service register group 207.
Next, the execution control unit 204 is specified by the I/OP 207-1 of the macro service register group 207.
Read the cabocha data from CPTR105-2. Next, the execution control unit 204 reads the previously captured value from the memory at the address specified by the BP 207-2 of the macro service register group 207, and subtracts this previously captured value from the value of the CPTR. The result of this subtraction is MP20
Stored and read out the calculation result storage area 103-2 in the data memory 103 specified by 7-3.
The value of CPTR105-2 is stored in the memory at the address specified by BP207-2. Next TC20
Decrement 7-4 and store it in TC207-4, increment the value of memory pointer MP that specifies the address to store the calculation result, and then
Store in 07-3. The above series of processing completes the subtraction and transfer processing of the cabocha data in one macro service, but when the value of TC207-4 becomes 0 as a result of the subtraction, a series of macro
Recognizing that the service has been completed, the I/O request control unit 205 activates the I/O processing execution request line 205-1 again and connects the I/O processing execution mode specification line 205-1 to generate a conventional interrupt request.
-2 is the low level. Then, the I/O request accepting unit 206 starts an interrupt processing program and executes software processing such as averaging a series of data obtained by executing the macro service.

(実施例の効果) 以上延べてきたように、本実施例ではキヤブチ
ヤ終了に伴うキヤブチヤ終了信号が発生した時
に、マクロ・サービスによつて自動的にキヤブチ
ヤ・データの減算及び転送処理を行ない、従来の
ソフトウエア処理を伴う割込み処理ルーチンでは
不可避であつたPC101−1、PSW101−
2、汎用レジスタセツト101−3の退避・復帰
処理、割込みプログラムへの分岐処理、命令の読
み出し、デコード等に費していた時間を大幅に削
減することが可能となり、CPUの処理能力の低
下を極力抑えることができる。
(Effects of the Embodiment) As described above, in this embodiment, when the cab end signal is generated due to the end of the cab, the macro service automatically performs the subtraction and transfer processing of the cab data. PC101-1 and PSW101- which were unavoidable in the interrupt processing routine that involves software processing.
2. The time spent on saving and restoring the general-purpose register set 101-3, branching to interrupt programs, reading instructions, decoding, etc. can be significantly reduced, and the decrease in CPU processing capacity can be reduced. It can be suppressed as much as possible.

上記のように、本発明に基づくデータ処理装置
は画期的なカウントデータ処理手段を提供するも
ので、応用性があり実用効果は極めて高いもので
ある。
As described above, the data processing device based on the present invention provides an innovative count data processing means, and is applicable and has extremely high practical effects.

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

第1図は従来のカウント機能を内蔵したマイク
ロコンピユータの例を示す簡単なブロツク図、第
2図は第1図の割込み処理のフローチヤート、第
3図は本発明の一実施例の詳細なブロツク図であ
る。 100……マイクロコンピユータ、101……
実行部、101−1……プログラムカウンタ
(PC)、101−2……プログラム・ステータ
ス・ワード(PSW)、101−3……汎用レジス
タセツト、102……プログラムメモリ、103
……データメモリ、103−1……キヤブチヤ・
パラメータ退避領域、103−2……演算結果格
納領域、103−3……スタツク領域、103−
4……キヤブチヤ・データ格納領域、104……
割込み制御部、104−1……割込み要求線、1
05……カウント装置、105−1……フリー・
ランニング・カウンタ(FRC)、105−2……
キヤブチヤ・レジスタ(CPTR)、105−3…
…キヤブチヤ指令線、105−4……キヤブチヤ
終了信号出力線、106……内部バス、201…
…算術論理演算ユニツト(ALU)、202……命
令レジスタ、203……命令デコーダ、204…
…実行制御部、205……I/O要求制御部、2
05−1……I/O処理要求線、205−2……
I/O処理実行形態指定線、206……I/O要
求受付け部、207……マクロサービスレジスタ
群、207−1……I/OP、207−2……
BP、207−3……MP、207−4……TC、
500……カウントデータ処理制御部、510…
…中央処理装置(CPU)。
Fig. 1 is a simple block diagram showing an example of a microcomputer with a built-in conventional counting function, Fig. 2 is a flowchart of the interrupt processing shown in Fig. 1, and Fig. 3 is a detailed block diagram of an embodiment of the present invention. It is a diagram. 100...Microcomputer, 101...
Execution unit, 101-1...Program counter (PC), 101-2...Program status word (PSW), 101-3...General-purpose register set, 102...Program memory, 103
...Data memory, 103-1...Kiyabuchiya
Parameter save area, 103-2... Calculation result storage area, 103-3... Stack area, 103-
4... Kiyabutiya data storage area, 104...
Interrupt control unit, 104-1...Interrupt request line, 1
05...Counting device, 105-1...Free
Running counter (FRC), 105-2...
Kiyabutiya Register (CPTR), 105-3...
...Kyabuchiya command line, 105-4...Kyabuchiya end signal output line, 106...Internal bus, 201...
...Arithmetic logic unit (ALU), 202...Instruction register, 203...Instruction decoder, 204...
...Execution control unit, 205...I/O request control unit, 2
05-1...I/O processing request line, 205-2...
I/O processing execution mode specification line, 206...I/O request reception unit, 207...Macro service register group, 207-1...I/OP, 207-2...
BP, 207-3...MP, 207-4...TC,
500... Count data processing control unit, 510...
...Central processing unit (CPU).

Claims (1)

【特許請求の範囲】 中央処理装置によりプログラム処理の実行中に
割込みが発生すると、これに対応する割込み処理
を前記中央処理装置により実行するデータ処理装
置において、 クロツクを計数する計数部と、所定の入力信号
に同期して前記計数部の値を一時的に記憶する記
憶手段と、前記記憶手段に計数値が格納されると
前記割込み処理要求およびマクロサービス処理要
求を共に発生する要求制御手段と、前記マクロサ
ービス処理要求を検出しマクロサービス処理動作
を制御する実行制御部と、各種データを記憶する
データメモリとを有し、 前記実行制御部は前記マクロサービス処理要求
の発生に応答して前記中央処理装置のプログラム
処理を一時中断し、中断時の中央処理装置の状態
を退避することなくそのままの状態に保持し、前
記記憶手段に記憶されている値と前記データメモ
リ上の所定のアドレスに記憶されている値を前記
中央処理装置の算術論理演算ユニツトを用いて演
算するとともに、減算結果を前記データメモリ上
の所定アドレスへ転送し、 前記要求制御手段は前記マクロサービス処理要
求に基づく処理が所定回数実行された時に前記マ
クロサービス処理要求を取り下げ、前記割り込み
処理要求のみ有効とすることにより中断時の中央
処理装置の状態を退避させ前記割り込み処理要求
に基づくプログラム処理を実行することを特徴と
するデータ処理装置。
[Scope of Claims] When an interrupt occurs during execution of program processing by a central processing unit, the data processing device executes corresponding interrupt processing by the central processing unit, comprising: a counter for counting clocks; storage means for temporarily storing the value of the counter in synchronization with an input signal; request control means for generating both the interrupt processing request and the macro service processing request when the count value is stored in the storage means; It has an execution control unit that detects the macro service processing request and controls the macro service processing operation, and a data memory that stores various data, and the execution control unit detects the macro service processing request and controls the macro service processing operation. Temporarily interrupting the program processing of the processing unit, maintaining the state of the central processing unit at the time of the interruption without saving, and storing the value stored in the storage means and a predetermined address on the data memory. The arithmetic and logic operation unit of the central processing unit calculates the value of the macro service processing request, and the subtraction result is transferred to a predetermined address on the data memory, and the request control means performs a predetermined process based on the macro service processing request. When the macro service processing request has been executed a number of times, the macro service processing request is canceled and only the interrupt processing request is valid, thereby saving the state of the central processing unit at the time of interruption and executing the program processing based on the interrupt processing request. Data processing equipment.
JP59040010A 1984-03-02 1984-03-02 Data processing unit Granted JPS60183639A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP59040010A JPS60183639A (en) 1984-03-02 1984-03-02 Data processing unit
DE85102394T DE3587643T2 (en) 1984-03-02 1985-03-04 Information processing unit with interrupt function.
EP85102394A EP0153764B1 (en) 1984-03-02 1985-03-04 Information processor having an interruption operating function
US07/287,622 US5036458A (en) 1984-03-02 1988-12-20 Information processor executing interruption program without saving contents of program counter
US07/691,284 US5159688A (en) 1984-03-02 1991-04-25 Information processor performing interrupt operation in two modes
US07/691,297 US5163150A (en) 1984-03-02 1991-04-25 Information processor performing interrupt operation without saving contents of program counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59040010A JPS60183639A (en) 1984-03-02 1984-03-02 Data processing unit

Publications (2)

Publication Number Publication Date
JPS60183639A JPS60183639A (en) 1985-09-19
JPH051499B2 true JPH051499B2 (en) 1993-01-08

Family

ID=12568933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59040010A Granted JPS60183639A (en) 1984-03-02 1984-03-02 Data processing unit

Country Status (1)

Country Link
JP (1) JPS60183639A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62224831A (en) * 1986-03-25 1987-10-02 Nec Corp Data reception processing system
JPS62266624A (en) * 1986-05-14 1987-11-19 Nec Corp Counter device
JPS6448162A (en) * 1987-08-18 1989-02-22 Nec Corp Microcomputer
JP2778066B2 (en) * 1988-12-05 1998-07-23 松下電器産業株式会社 Microprocessor with capture mechanism
JPH0764886A (en) * 1993-08-23 1995-03-10 Nec Corp Processor provided with serial interface device
JP3141787B2 (en) * 1996-08-28 2001-03-05 日本電気株式会社 Microcomputer

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5582325A (en) * 1978-12-18 1980-06-21 Toshiba Corp Unit for writting time onto main memory

Also Published As

Publication number Publication date
JPS60183639A (en) 1985-09-19

Similar Documents

Publication Publication Date Title
US5754839A (en) Apparatus and method for implementing watchpoints and breakpoints in a data processing system
JP2002512396A (en) Real-time debugger interface for embedded systems
JPH05204709A (en) Processor
WO1987003396A1 (en) A method and apparatus for minimizing overhead when executing nested do loops
JPH051499B2 (en)
EP0331193B1 (en) Vector operation instruction issue control method
JP2001318807A (en) Method and device for controlling task switching
EP0371443A2 (en) A saving and restoring method and a processor system for implementation of the same method
IE62074B1 (en) Apparatus and method for synchronization of arithmetic exceptions in parallel pipelined execution units
JP2903526B2 (en) Pulse generator
JPS6267603A (en) Pulse measuring instrument
EP0275125B1 (en) Data processor capable of accessing the content of internal counters at a high speed
JP3900660B2 (en) Sequence controller
JPH02186463A (en) Interrupt request generation method and device
JPS6120139A (en) Interruption control system
JPS61241833A (en) Instruction code access controller
JPH0895945A (en) Microprocessor with built-in trace memory and trace method
JPS63118949A (en) Information processor
JPH0414378B2 (en)
JPH0531775B2 (en)
JPH05250161A (en) Microcomputer device
JPH0333940A (en) Microprocessor for evaluation
JPS62251837A (en) Interruption control system
JPS6349941A (en) Arithmetic processing unit
JPH0535456B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees