JPH1097441A - Data processor - Google Patents

Data processor

Info

Publication number
JPH1097441A
JPH1097441A JP8248166A JP24816696A JPH1097441A JP H1097441 A JPH1097441 A JP H1097441A JP 8248166 A JP8248166 A JP 8248166A JP 24816696 A JP24816696 A JP 24816696A JP H1097441 A JPH1097441 A JP H1097441A
Authority
JP
Japan
Prior art keywords
instruction
specific
memory
data
request signal
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
JP8248166A
Other languages
Japanese (ja)
Inventor
Yuji Tanaka
勇司 田中
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP8248166A priority Critical patent/JPH1097441A/en
Publication of JPH1097441A publication Critical patent/JPH1097441A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data processor which enables a CPU to efficiently and speedily performs processes when data transfer, a counting of the number of signals, or debugging is requested from outside by decreasing circuits which are connected to outside the CPU. SOLUTION: This data processor is provided with a specific instruction request signal generation part which outputs a specific instruction request signal to a request latch 16 of the CPU with a request signal for transfer, the counting of the number of pulses, or debugging which is inputted from outside. If the request latch 16 is detecting the specific instruction request signal 24 when the CPU is to take out an instruction corresponding to a program counter 1, a specific execution instruction for an instruction code 15 is read in instead of reading in the instruction corresponding to the program counter 1 and the specific execution instruction is executed. While the specific execution instruction is executed, the increase of the counting-up operation of the program counter 1 and access to a memory are inhibited.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムカウン
タに応じた命令を、アドレスバス及びデータバスを介し
てメモリにアクセスして読み込み、読み込んだ命令に基
づきその命令を実行すると共に、その命令を読み込む毎
にプログラムカウンタを増加させる中央処理装置を備え
たデータ処理装置であって、特に、中央処理装置の外部
からのデータ転送、信号のパルス数のカウント及びデバ
ッグ等の特定の要求信号に応じて処理し得るデータ処理
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for reading an instruction corresponding to a program counter by accessing a memory via an address bus and a data bus, executing the instruction based on the read instruction, and reading the instruction. A data processing device having a central processing unit that increases a program counter every time, and particularly processes data according to a specific request signal such as data transfer from outside the central processing unit, counting of signal pulses and debugging. The present invention relates to a data processing device that can perform the processing.

【0002】[0002]

【従来の技術】従来の高速処理が可能な中央処理装置の
内、3段のパイプラインを備えたものでは、図6に示す
ように、プログラムカウンタ101の値をアドレスバス
120に出力し、そのアドレスに格納されている命令
(インストラクション:Instruction)をデータバス12
1から読み出し、第1命令ラッチ(Latch)108に取り
込む。今、あるクロックタイミングで第1命令ラッチ1
08に取り込まれた値は、命令デコード部111にて解
読される。次のクロックで第1命令ラッチ108の内容
は第2命令ラッチ107に送られると共に、命令デコー
ド部111での解読内容は命令実行部110に送られ、
バス制御部109及びリードデータラッチ105若しく
はライトデータラッチ106を制御し、これによってデ
ータをメモリから読み出したり、メモリに書き込んだり
又はレジスタ102、セレクタ103及び演算器(AL
U:Arithmetic and Logic Unit)104を制御して計算
を行ったりする。
2. Description of the Related Art Among conventional central processing units capable of high-speed processing, those equipped with a three-stage pipeline output the value of a program counter 101 to an address bus 120 as shown in FIG. The instruction (instruction) stored in the address is transferred to the data bus 12.
1 and read into the first instruction latch (Latch) 108. Now, at a certain clock timing, the first instruction latch 1
08 is decoded by the instruction decoding unit 111. At the next clock, the contents of the first instruction latch 108 are sent to the second instruction latch 107, and the contents decoded by the instruction decode unit 111 are sent to the instruction execution unit 110.
The bus control unit 109 and the read data latch 105 or the write data latch 106 are controlled, whereby data is read from or written to the memory, or the register 102, the selector 103, and the arithmetic unit (AL
U: Arithmetic and Logic Unit) 104 is controlled to perform calculations.

【0003】このとき同時に、プログラムカウンタ10
1の値はプログラムカウンタインクリメンタ100で一
定値だけ加算されプログラムカウンタ101に書き込ま
れ、次いで、次の命令が第1命令ラッチ108に取り込
まれる。
At this time, the program counter 10
The value of 1 is incremented by a predetermined value in the program counter incrementer 100 and written to the program counter 101, and then the next instruction is taken into the first instruction latch 108.

【0004】一方、割り込み要求信号123が入力され
ると割り込み処理部112が命令実行部110やプログ
ラムカウンタ101を制御し、第1命令ラッチ108に
現在格納されている命令を無効にしプログラムカウンタ
101を予め設定された値にすることにより、割り込み
処理プログラムに分岐するようになっている。
On the other hand, when the interrupt request signal 123 is input, the interrupt processing unit 112 controls the instruction execution unit 110 and the program counter 101, invalidates the instruction currently stored in the first instruction latch 108, and resets the program counter 101. By setting the value to a preset value, the process branches to an interrupt processing program.

【0005】ここで、従来のデータ処理装置では、外部
からの要求によりデータを高速に転送したい場合には、
図7に示すように、DMA(Direct Memory Access) コ
ントローラ140を用いていた。DMAコントローラ1
40では、転送要求信号が入力されると例えばバスの開
放等のバスの調停(Arbitration)を行い、中央処理装置
(以下、「CPU(Central Processing Unit)」と称す
る)130を停止させる。また、DMAコントローラ1
40がメモリアクセスやアドレス出力を行う。
Here, in the conventional data processing device, when it is desired to transfer data at a high speed in response to an external request,
As shown in FIG. 7, a DMA (Direct Memory Access) controller 140 was used. DMA controller 1
At 40, when a transfer request signal is input, arbitration (Arbitration) of the bus such as opening of the bus is performed, and the central processing unit (hereinafter, referred to as a “CPU (Central Processing Unit)”) 130 is stopped. DMA controller 1
40 performs memory access and address output.

【0006】したがって、CPU130の処理速度が速
くなるに伴って、アドレスや制御信号を切り替える場合
等においてバスの調停のタイミングが難しくなる。
Accordingly, as the processing speed of the CPU 130 increases, the timing of bus arbitration becomes more difficult when switching addresses and control signals.

【0007】また、DMAコントローラ140は内部に
アドレスカウンタ141や転送カウンタ142等を有す
るため、データ処理装置の回路規模が大きくなる。
Further, since the DMA controller 140 has the address counter 141 and the transfer counter 142 therein, the circuit scale of the data processing device becomes large.

【0008】一方、最近では、外部からの要求によりデ
ータを高速に転送する場合には、同図に示すように、M
MU(Memory Management Unit) 190を使用するシス
テムが増えている。MMU190は、記憶装置を有効利
用するために、CPU130が出力するアドレス(仮想
アドレス)を実際にメモリデバイスの存在するアドレス
(物理アドレス)に変換する回路であり、その変換方法
はプログラマブルになっている。
On the other hand, recently, when data is transferred at a high speed in response to an external request, as shown in FIG.
Systems using MU (Memory Management Unit) 190 are increasing. The MMU 190 is a circuit for converting an address (virtual address) output by the CPU 130 into an address (physical address) where a memory device actually exists in order to effectively use a storage device, and the conversion method is programmable. .

【0009】しかし、DMAコントローラ140はCP
U130の外部に取り付けられており、MMU190の
アドレス変換方法を知ることができないので、常に物理
アドレスを指定してしか転送することができない。
However, the DMA controller 140
Since it is attached to the outside of the U130 and cannot know the address conversion method of the MMU 190, it can always be transferred only by specifying a physical address.

【0010】そこで、CPU130とDMAコントロー
ラ140とを1つにしてその後にMMU190を接続す
れば問題は解決するが、MMU190を内蔵したCPU
130に、後からDMAコントローラ140を追加する
場合にはこの方法を採ることができない。
Therefore, the problem can be solved by integrating the CPU 130 and the DMA controller 140 and then connecting the MMU 190.
This method cannot be adopted when the DMA controller 140 is added to the memory 130 later.

【0011】一方、同図に示すように、最近のデータ処
理装置では、キャッシュ制御回路180を内蔵したCP
U130が増加している。このキャッシュ制御回路18
0は、CPU130が最近アクセスしたメモリのアドレ
ス及び内容を小容量の高速メモリ、つまりキャッシュメ
モリに記録しておき、CPU130がデータ及び命令コ
ードを必要とするときには、まずキャッシュメモリの中
に含まれていないか確認し、含まれていればキャッシュ
メモリから読み出し、含まれていなければ外部メモリか
ら読み出すというものである。なお、読み出す内容以外
に書き込む内容もキャッシュメモリに格納することがで
きる。
On the other hand, as shown in FIG. 1, in a recent data processing device, a CP having a cache control circuit 180 is incorporated.
U130 is increasing. This cache control circuit 18
0 stores the address and contents of the memory recently accessed by the CPU 130 in a small-capacity high-speed memory, that is, a cache memory. When the CPU 130 needs data and instruction codes, it is first included in the cache memory. It is checked if there is any, and if it is included, it is read from the cache memory, and if not, it is read from the external memory. Note that, in addition to the content to be read, the content to be written can also be stored in the cache memory.

【0012】しかしながら、外部に取り付けられた上記
DMAコントローラ140からはキャッシュ制御回路1
80が見えないし、キャッシュ制御回路180もDMA
コントローラ140の動作が分からない。このため、キ
ャッシュメモリに格納されているアドレスのデータがD
MAコントローラ140の転送により書き換えられても
気付かずにキャッシュメモリ内の古いデータを参照する
ことになり、問題となる。
However, the cache control circuit 1 is provided from the DMA controller 140 attached to the outside.
80 cannot be seen, and the cache control circuit 180
The operation of the controller 140 is not known. Therefore, if the data at the address stored in the cache memory is D
Even if the data is rewritten by the transfer of the MA controller 140, old data in the cache memory is referred to without notice, which is a problem.

【0013】すなわち、外部のメモリ内のデータは、初
めてアクセスされるとキャッシュメモリに入るが、その
メモリの同じアドレスのデータがDMA処理を行った
後、別のデータに書き変わってしまう。本来、メモリ内
のデータとキャッシュメモリ内のデータとは一致してい
るはずであるが、DMA処理をした時には、全く別のデ
ータになっているので矛盾が生ずる。
That is, when data in an external memory is accessed for the first time, it enters the cache memory, but after the data at the same address in the memory is subjected to DMA processing, it is rewritten to another data. Originally, the data in the memory should match the data in the cache memory, but when DMA processing is performed, inconsistency arises because the data is completely different.

【0014】そこで、これらの問題を解決するために、
DMA処理を行わないで、図8に示すように、割り込み
によりデータを転送していた。
Therefore, in order to solve these problems,
As shown in FIG. 8, data was transferred by interruption without performing DMA processing.

【0015】割り込みによるデータの転送では、CPU
130に割り込み要求信号123が入力されると、CP
U130は予め決まったアドレスにジャンプしてプログ
ラムを実行する。したがって、ジャンプ先にデータ転送
のためのプログラムを書いておくことにより、CPU1
30がキャッシュ制御回路180やMMU190を介し
てメモリにアクセスするので上記のような問題が解決で
きる。すなわち、DMA処理とは異なり、CPU130
がデータを監視しながら処理するので問題がない。
In data transfer by interruption, the CPU
When the interrupt request signal 123 is input to
U130 jumps to a predetermined address and executes the program. Therefore, by writing a program for data transfer at the jump destination, the CPU 1
Since the memory 30 accesses the memory via the cache control circuit 180 and the MMU 190, the above problem can be solved. That is, unlike the DMA processing, the CPU 130
Processes while monitoring data, so there is no problem.

【0016】[0016]

【発明が解決しようとする課題】しかしながら、上記従
来のデータ処理装置では、割り込み処理に余分な手順が
必要であり多くのクロックサイクルを必要とするので、
高速な転送には向かないという問題点を有している。
However, in the above-mentioned conventional data processing apparatus, an extra procedure is required for interrupt processing and many clock cycles are required.
There is a problem that it is not suitable for high-speed transfer.

【0017】この問題を詳細に説明するために、具体例
として、メモリ131からI/O132にデータ転送す
る場合を考える。
In order to explain this problem in detail, a case where data is transferred from the memory 131 to the I / O 132 will be considered as a specific example.

【0018】まず、DMAコントローラ140を用いる
場合について説明する。図7及び図9に示すように、例
えば、アドレスA1、A2…に格納されている命令デー
タD1、D2…の実行中に、外部からの要求があり、メ
モリ131に格納されたアドレスTの命令データDTを
I/O132へ転送する場合には、DMAコントローラ
140の転送制御部143に転送要求信号が入力され
る。これにより、転送制御部143はI/O132に対
してアクノレッジ信号127を出力し、I/O132は
このアクノレッジ信号127によりデータDTを取り込
む。なお、このアドレスTの命令データDTをI/O1
32に転送している間の1クロックにおいては、CPU
130は停止状態となっている。
First, the case where the DMA controller 140 is used will be described. As shown in FIGS. 7 and 9, for example, during execution of instruction data D1, D2,... Stored at addresses A1, A2,. When transferring the data DT to the I / O 132, a transfer request signal is input to the transfer control unit 143 of the DMA controller 140. As a result, the transfer control unit 143 outputs an acknowledge signal 127 to the I / O 132, and the I / O 132 captures the data DT based on the acknowledge signal 127. It should be noted that the instruction data DT at the address T is transmitted to the I / O1
32 during one clock while transferring to
130 is in a stopped state.

【0019】一方、割り込みによりデータを転送する場
合には、図10に示すように、アドレスA1、A2・・
・に格納されている命令データD1、D2・・・の実行
中にアドレスTのメモリの命令データDTを上記I/O
132へ転送するに際して、できるだけ高速に処理でき
るように、アドレスTとメモリライト信号とによりデー
タDTを取り込む。
On the other hand, when data is transferred by interruption, as shown in FIG. 10, addresses A1, A2,.
··· stored in the instruction data DT in the memory at the address T during execution of the instruction data D1, D2,.
At the time of transfer to the memory 132, the data DT is fetched by the address T and the memory write signal so that the data DT can be processed as fast as possible.

【0020】ここで、両者を比較すべく、CPU130
の実行内容を見ると、図9のDMAコントローラ140
を用いたデータ転送では、転送による命令実行の遅れは
1クロックであるが、図10の割り込みによる場合に
は、9クロックもかかっている。この理由は、割り込み
の場合には、割り込み処理プログラムを実行するため
に、余分の命令データを読み込み、かつ割り込みからの
リターン命令を読み込む必要があるためである。
Here, in order to compare the two, the CPU 130
9 shows that the DMA controller 140 shown in FIG.
In the data transfer using, the delay of the instruction execution due to the transfer is one clock, but in the case of the interrupt in FIG. 10, it takes nine clocks. This is because, in the case of an interrupt, it is necessary to read extra instruction data and read a return instruction from the interrupt in order to execute the interrupt processing program.

【0021】なお、上記の割り込み例は、最も高速に割
り込み処理ができる場合を示しており、この例よりもさ
らに多くのクロックがかかる場合もある。
The above-mentioned interrupt example shows a case where the interrupt processing can be performed at the highest speed, and in some cases, more clocks may be applied than in this example.

【0022】また、特公昭59−6413号公報に開示
されるように、CPUのみで高速にデータ転送する方法
もあるが、各命令のための専用レジスタ等の増加により
回路追加量が多くなり、かつ、マイクロ命令の割り込み
で処理しているため転送速度に限界がある。
Further, as disclosed in Japanese Patent Publication No. 59-6413, there is a method of transferring data at high speed by using only a CPU. However, an increase in dedicated registers for each instruction increases the amount of additional circuits. In addition, there is a limit to the transfer speed because processing is performed by interruption of a micro instruction.

【0023】一方、データ処理装置においては、特定信
号のパルス数を数えたい場合がある。このように特定信
号のパルス数を数えたい場合には、図7のように、CP
U130以外に信号カウンタ151とクロック生成部1
52とを含むパルスカウンタ150等の回路が必要にな
ったり、図8のような構成による割り込みによって時間
をかけて処理する必要がある。
On the other hand, in a data processing device, it may be desired to count the number of pulses of a specific signal. When it is desired to count the number of pulses of a specific signal, as shown in FIG.
In addition to U130, the signal counter 151 and the clock generator 1
It is necessary to provide a circuit such as a pulse counter 150 including the step 52, and it is necessary to take a long time to perform processing by an interrupt having the configuration shown in FIG.

【0024】また、データ処理装置におけるプログラム
のデバッグをすべくCPU130の状態を外部に知らせ
たりCPU130のレジスタ等に値を設定したりする場
合も、図8に示す割り込みで処理する場合が多い。その
ため、CPU130の負担が大きく、CPU130の本
来の処理の効率が低下する等の問題がある。
Also, in order to notify the state of the CPU 130 to the outside or to set a value in a register or the like of the CPU 130 in order to debug a program in the data processing device, the interruption shown in FIG. 8 is often performed. Therefore, there is a problem that the load on the CPU 130 is large and the efficiency of the original processing of the CPU 130 is reduced.

【0025】本発明は、上記従来の問題点に鑑みなされ
たものであって、その目的は、データを転送したり、信
号の数を数えたり、デバッグのために中央処理装置の状
態を外部に出力したい場合に、外部に接続する回路を少
なくして、中央処理装置が効率良くかつ高速に処理でき
るデータ処理装置を提供することにある。
The present invention has been made in view of the above-mentioned conventional problems, and has as its object to transfer data, count the number of signals, and externally output the state of a central processing unit for debugging. An object of the present invention is to provide a data processing device in which the number of externally connected circuits is reduced when output is desired, and the central processing unit can process the data efficiently and at high speed.

【0026】[0026]

【課題を解決するための手段】請求項1に係る発明のデ
ータ処理装置は、上記課題を解決するために、プログラ
ムカウンタに応じた命令をアドレスバス及びデータバス
を介してメモリにアクセスして読み込み、読み込んだ命
令に基づきその命令を実行すると共に、その命令を読み
込む毎にプログラムカウンタを増加させる中央処理装置
を備えたデータ処理装置において、中央処理装置の外部
から入力される転送、パルス数のカウント又はデバッグ
の特定命令を実行させるための要求信号を受けてこれら
いずれかの要求信号があったことを中央処理装置に知ら
せるべく上記各要求信号に対応する特定命令要求信号を
生成して出力する特定命令要求信号生成手段が設けられ
ると共に、上記中央処理装置には、上記特定命令要求信
号を検出する特定命令要求信号検出手段と、外部から入
力された転送、パルス数のカウント又はデバッグの特定
命令を処理するための特定実行命令を保管しておくため
の実行命令保管手段と、上記中央処理装置がプログラム
カウンタに応じた命令を取り出そうとする時点で、上記
特定命令要求信号検出手段が特定命令要求信号を検出し
ているときには、上記プログラムカウンタに応じた命令
の読み込みに代えて、上記実行命令保管手段に保管され
た転送、パルス数のカウント又はデバッグのいずれかの
特定実行命令を読み込み、その特定実行命令を実行さ
せ、かつこの特定実行命令の実行中には、プログラムカ
ウンタの増加及びメモリへのアクセスを禁止させるよう
に選択する選択手段とが設けられていることを特徴とし
ている。
According to a first aspect of the present invention, there is provided a data processing apparatus for reading an instruction corresponding to a program counter by accessing a memory via an address bus and a data bus. In a data processing device having a central processing unit that executes the instruction based on the read instruction and increments a program counter each time the instruction is read, a transfer and counting of the number of pulses input from outside the central processing unit Alternatively, receiving a request signal for executing a specific instruction for debugging, generating and outputting a specific instruction request signal corresponding to each of the request signals so as to notify the central processing unit that any of the request signals has been received. Command request signal generating means is provided, and the central processing unit is provided with a specific command for detecting the specific command request signal. Instruction request signal detecting means, execution instruction storage means for storing a specific execution instruction for processing a transfer, pulse count or debug specific instruction input from the outside, and the central processing unit is a program. When the specific instruction request signal detecting means detects the specific instruction request signal at the time when the instruction corresponding to the counter is to be fetched, instead of reading the instruction corresponding to the program counter, the execution instruction storage means Reads a specific execution instruction of any of the stored transfer, pulse count or debug, executes the specific execution instruction, and during execution of the specific execution instruction, increases the program counter and accesses the memory. And selecting means for selecting to prohibit.

【0027】上記の発明によれば、中央処理装置の外部
から入力される転送、パルス数のカウント又はデバッグ
の特定命令を実行させるための要求信号があると、特定
命令要求信号生成手段が上記各要求信号に対応する特定
命令要求信号を生成して中央処理装置に出力する。
According to the above-mentioned invention, when there is a request signal for executing a specific command for transfer, counting of the number of pulses or debugging, which is input from outside the central processing unit, the specific command request signal generating means sets A specific command request signal corresponding to the request signal is generated and output to the central processing unit.

【0028】中央処理装置は、特定命令要求信号検出手
段にてこの特定命令要求信号を検出する。
The central processing unit detects the specific command request signal by the specific command request signal detecting means.

【0029】一方、中央処理装置がプログラムカウンタ
に応じた命令を取り出そうとする時点で、上記特定命令
要求信号検出手段が特定命令要求信号を検出していると
きには、選択手段が、上記プログラムカウンタに応じた
命令の読み込みに代えて、実行命令保管手段に保管され
た転送、パルス数のカウント又はデバッグのいずれかの
特定実行命令を読み込み、その特定実行命令を実行さ
せ、かつこの特定実行命令の実行中には、プログラムカ
ウンタの増加及びメモリへのアクセスを禁止させるよう
に選択する。
On the other hand, when the specific instruction request signal detecting means detects the specific instruction request signal at the time when the central processing unit tries to fetch the instruction corresponding to the program counter, the selecting means sets the specific instruction request signal in accordance with the program counter. In place of reading the read instruction, read a specific execution instruction of transfer, pulse count, or debugging stored in the execution instruction storage unit, execute the specific execution instruction, and execute the specific execution instruction. Is selected to prohibit the increase of the program counter and the access to the memory.

【0030】このように、中央処理装置の外部から転
送、パルス数のカウント又はデバッグの特定命令があっ
た場合に、データ処理装置は、割り込みと同様な動作に
て処理する。しかし、割り込みのように中央処理装置の
処理を中断し、ある決まったアドレスに分岐し、処理が
終了してから元のアドレスに戻り元の処理を再開するの
ではなく、プログラムカウンタの増加及びメモリへのア
クセスを禁止させながら、転送やパルス数のカウントや
デバッグ情報のやり取りを行う特定命令を読み込んで実
行させる。そして、実行後は、通常通りプログラムカウ
ンタを増加させる。
As described above, when there is a specific command of transfer, counting of the number of pulses, or debugging from the outside of the central processing unit, the data processing unit performs a process similar to an interrupt. However, instead of interrupting the processing of the central processing unit like an interrupt, branching to a certain address, and returning to the original address after the processing is completed and restarting the original processing, the program counter is increased and the memory is increased. A specific instruction for transferring, counting the number of pulses, and exchanging debug information is read and executed while prohibiting access to the program. After execution, the program counter is incremented as usual.

【0031】このため、分岐処理に必要な時間を省くこ
とができ、比較的高速にデータ転送やパルス数のカウン
ト及びデバッグ処理を行うことが可能となる。
Therefore, the time required for the branching process can be saved, and the data transfer, the counting of the number of pulses, and the debugging process can be performed at a relatively high speed.

【0032】一方、上記の特定命令の処理に際しては、
1つの中央処理装置にて様々な処理を行わせ、中央処理
装置に内蔵されるレジスタやメモリアクセス機能を有効
に利用することで実現する。
On the other hand, when processing the above specific instruction,
This is realized by causing a single central processing unit to perform various processes and effectively using a register and a memory access function built in the central processing unit.

【0033】例えば、中央処理装置にメモリアクセスす
る命令を実行命令保管手段に保管しておくことで、デー
タの転送を行うことができる。この場合、中央処理装置
の機能を使ってデータ転送を行うため、MMUやキャッ
シュ等を内蔵していても、これらの機能を生かした転送
が可能となる。したがって、全体の回路規模を小さくで
き、また、バスの調整も不要になる。
For example, data can be transferred by storing an instruction for memory access to the central processing unit in the execution instruction storage means. In this case, since data transfer is performed using the function of the central processing unit, transfer using these functions can be performed even if an MMU, a cache, or the like is incorporated. Therefore, the overall circuit scale can be reduced, and bus adjustment is not required.

【0034】同様に、特定のレジスタの値を増加させる
特定命令を実行させることでパルス数をカウントするこ
とができる。この場合、中央処理装置の内部のレジスタ
を使用してカウントするので、外部には要求信号を発生
させる回路のみで実現できる。
Similarly, the number of pulses can be counted by executing a specific instruction for increasing the value of a specific register. In this case, since counting is performed using a register inside the central processing unit, it can be externally realized only by a circuit for generating a request signal.

【0035】さらに、中央処理装置のレジスタ値をメモ
リ等に書き込む特定命令を実行させれば、デバッグのた
めの情報を外部に出力させることができる。この場合、
外部には要求信号を発生させる回路及び出力された情報
を取り出す回路を追加するだけで実現できる。
Further, by executing a specific instruction for writing the register value of the central processing unit into a memory or the like, information for debugging can be output to the outside. in this case,
It can be realized only by adding a circuit for generating a request signal and a circuit for extracting output information to the outside.

【0036】したがって、データを転送したり、信号の
数を数えたり、デバッグのために中央処理装置の状態を
外部に出力したい場合に、外部に接続する回路を少なく
して、中央処理装置が効率良くかつ高速に処理できるデ
ータ処理装置を提供することができる。
Therefore, when it is desired to transfer data, count the number of signals, or output the state of the central processing unit to the outside for debugging, the number of externally connected circuits is reduced, and the central processing unit is efficiently used. It is possible to provide a data processing device capable of performing good and high-speed processing.

【0037】請求項2に係る発明のデータ処理装置は、
上記課題を解決するために、請求項1記載のデータ処理
装置において、上記実行命令保管手段の特定実行命令
は、書換え可能に形成されていることを特徴としてい
る。
According to a second aspect of the present invention, there is provided a data processing apparatus comprising:
In order to solve the above-mentioned problem, in the data processing device according to claim 1, the specific execution instruction of the execution instruction storage means is formed to be rewritable.

【0038】上記の発明によれば、実行命令保管手段の
特定実行命令は、書換え可能に形成されているので、1
つの小さい容量の実行命令保管手段にて、外部から転
送、パルス数のカウント又はデバッグの各特定命令に対
応する特定実行命令に切り換えることができる。
According to the above invention, the specific execution instruction of the execution instruction storage means is formed to be rewritable.
The two small-capacity execution instruction storage means can switch to a specific execution instruction corresponding to each specific instruction of transfer, counting of the number of pulses, or debugging from outside.

【0039】したがって、回路数を少なくしてデータ処
理装置が大型化するのを防止することができる。
Therefore, the number of circuits can be reduced to prevent the data processing device from being enlarged.

【0040】請求項3に係る発明のデータ処理装置は、
上記課題を解決するために、請求項1又は2記載のデー
タ処理装置において、上記実行命令保管手段の特定実行
命令は、特定命令がデバッグを示す場合には、中央処理
装置内の全てのレジスタの内容やフラッグの値を外部に
出力するための情報外部出力命令からなっていることを
特徴としている。
According to a third aspect of the present invention, there is provided a data processing apparatus comprising:
In order to solve the above-mentioned problem, in the data processing device according to claim 1 or 2, the specific execution instruction of the execution instruction storage means, when the specific instruction indicates a debug, all the registers in the central processing unit. It is characterized by comprising an information external output command for outputting contents and flag values to the outside.

【0041】すなわち、従来であれば、プログラムのデ
バッグを行う場合には、割り込みにより処理しなければ
ならなかったので、高速処理することが困難であった。
That is, in the prior art, when debugging a program, it was necessary to perform processing by an interrupt, so that it was difficult to perform high-speed processing.

【0042】しかし、上記の発明によれば、特定命令が
デバッグを示す場合には、上記実行命令保管手段の特定
実行命令は、中央処理装置内の全てのレジスタの内容や
フラッグの値を外部に出力するための情報外部出力命令
となる。
However, according to the present invention, when the specific instruction indicates debugging, the specific execution instruction of the execution instruction storage means transmits the contents of all registers and flag values in the central processing unit to the outside. This is an information external output instruction for output.

【0043】したがって、中央処理装置のレジスタ値を
メモリ等に書き込むための情報外部出力命令を実行させ
れば、デバッグのための情報を外部に出力させることが
できる。この場合、外部には要求信号を発生させる回路
及び出力された情報を取り出す回路を追加するだけで実
現できる。
Therefore, if an information external output instruction for writing the register value of the central processing unit into a memory or the like is executed, information for debugging can be output to the outside. In this case, it can be realized only by adding a circuit for generating a request signal and a circuit for extracting output information to the outside.

【0044】この結果、回路数を少なくしてデータ処理
装置が大型化するのを防止すると共に、従来の割り込み
処理ではないので、高速に処理することができる。
As a result, the number of circuits is reduced to prevent the data processing apparatus from becoming large, and the processing can be performed at high speed because it is not the conventional interrupt processing.

【0045】請求項4に係る発明のデータ処理装置は、
上記課題を解決するために、請求項1又は2記載のデー
タ処理装置において、中央処理装置には、特定のパルス
数をカウントするためのパルスカウント用レジスタが設
けられると共に、上記選択手段は、外部から入力される
要求信号が特定のパルス数のカウントを示す場合には、
上記パルスカウント用レジスタの値を1ずつ増加させる
ことを特徴としている。
According to a fourth aspect of the present invention, there is provided a data processing apparatus comprising:
In order to solve the above-mentioned problem, in the data processing device according to claim 1 or 2, the central processing unit is provided with a pulse counting register for counting a specific number of pulses, and the selection unit is provided with an external device. If the request signal input from the device indicates a count of a specific number of pulses,
It is characterized in that the value of the pulse count register is increased by one.

【0046】すなわち、従来では、特定のパルス数のカ
ウントを示す場合には、中央処理装置以外に専用のパル
スカウンタが必要であり、データ処理装置の大型化を招
いていた。
That is, conventionally, when a count of a specific number of pulses is indicated, a dedicated pulse counter is required in addition to the central processing unit, which has led to an increase in the size of the data processing unit.

【0047】しかし、上記の発明によれば、特定のパル
ス数をカウントする場合には、選択手段の選択により、
特定のパルス数をカウントするために設けられている中
央処理装置のパルスカウント用レジスタの値を1ずつ増
加させることができる。この場合、中央処理装置の内部
のパルスカウント用レジスタを使用してカウントするの
で、外部には要求信号を発生させる回路のみで実現でき
る。
However, according to the above invention, when counting a specific number of pulses, the selection means selects
The value of the pulse count register of the central processing unit provided for counting a specific number of pulses can be increased by one. In this case, since the counting is performed using the pulse counting register inside the central processing unit, it can be realized only by a circuit for generating a request signal outside.

【0048】したがって、回路数を少なくしてデータ処
理装置の小型化を図ることができる。
Therefore, the number of circuits can be reduced and the size of the data processing device can be reduced.

【0049】請求項5に係る発明のデータ処理装置は、
上記課題を解決するために、請求項1又は2記載のデー
タ処理装置において、上記実行命令保管手段の特定実行
命令は、特定命令が転送を示す場合には、メモリの内容
を読み込むためのメモリリード命令又はメモリに書き込
むためのメモリライト命令からなっていることを特徴と
している。
According to a fifth aspect of the present invention, there is provided a data processing apparatus comprising:
3. The data processing device according to claim 1, wherein the specific execution instruction of the execution instruction storage unit is a memory read for reading the contents of the memory when the specific instruction indicates transfer. It is characterized by comprising an instruction or a memory write instruction for writing to a memory.

【0050】上記の発明によれば、特定命令が転送を示
す場合には、上記実行命令保管手段の特定実行命令とし
て、メモリの内容を読み込むためのメモリリード命令又
はメモリに書き込むためのメモリライト命令のいずれか
を選択すればメモリリード又はメモリライトが実行でき
る。この場合、中央処理装置の機能を使ってデータ転送
を行うため、MMUやキャッシュメモリ等を内蔵してい
ても、これらの機能を生かした転送が可能となる。さら
に、バスの調整が不要になる。
According to the above invention, when the specific instruction indicates transfer, a memory read instruction for reading the contents of the memory or a memory write instruction for writing to the memory is used as the specific execution instruction of the execution instruction storage means. If either of these is selected, memory read or memory write can be executed. In this case, since data transfer is performed using the function of the central processing unit, transfer utilizing these functions can be performed even if an MMU, a cache memory, or the like is incorporated. Furthermore, no bus adjustment is required.

【0051】したがって、データ転送に際して、回路数
を少なくしてデータ処理装置が大型化するのを防止する
ことができる。
Therefore, at the time of data transfer, the number of circuits can be reduced and the data processing device can be prevented from being enlarged.

【0052】請求項6に係る発明のデータ処理装置は、
上記課題を解決するために、請求項5記載のデータ処理
装置において、上記選択手段は、上記実行命令保管手段
の特定実行命令によりメモリリード命令又はメモリライ
ト命令を実行させるときには、メモリリード命令によっ
て読み込んだ値をレジスタに書き込むことなく、メモリ
ライト命令でデータバスをハイインピーダンスにさせる
ことを特徴としている。
According to a sixth aspect of the present invention, there is provided a data processing apparatus comprising:
In order to solve the above-mentioned problem, in the data processing apparatus according to claim 5, when the execution instruction storage means executes a memory read instruction or a memory write instruction by a specific execution instruction, the selection means reads the memory read instruction by a memory read instruction. It is characterized in that the data bus is made to have a high impedance by a memory write instruction without writing a value to a register.

【0053】すなわち、I/Oとメモリ間でデータのや
り取りを行う場合に、データバス上で中央処理装置から
のデータとのぶつかりを防ぐためにデータバスを開放し
なければならない。
That is, when data is exchanged between the I / O and the memory, the data bus must be opened to prevent the data bus from colliding with data from the central processing unit.

【0054】そこで、本発明では、上記選択手段は、上
記実行命令保管手段の特定実行命令によりメモリリード
命令又はメモリライト命令を実行させるときには、メモ
リリード命令によって読み込んだ値をレジスタに書き込
むことなく、メモリライト命令でデータバスをハイイン
ピーダンスにさせる。
Therefore, in the present invention, when the memory read instruction or the memory write instruction is executed by the specific execution instruction of the execution instruction storage means, the selecting means does not write the value read by the memory read instruction to the register. The data bus is made high impedance by a memory write instruction.

【0055】したがって、実行命令保管手段の特定実行
命令によりI/Oとメモリ間でデータのやり取りを行う
場合においても、データバス上で中央処理装置からのデ
ータとぶつかることを防止することができる。
Therefore, even when data is exchanged between the I / O and the memory according to the specific execution instruction of the execution instruction storage means, it is possible to prevent the data from colliding with the data from the central processing unit on the data bus.

【0056】[0056]

【発明の実施の形態】本発明の実施の一形態について図
1ないし図5に基づいて説明すれば、以下の通りであ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to FIGS.

【0057】本実施の形態のデータ処理装置における中
央処理装置は、図1に示すように、プログラムカウンタ
1、レジスタ2、セレクタ3、演算器(ALU:Arithm
eticand Logic Unit)4、リードデータラッチ(Latch)
5、ライトデータラッチ6、第1命令ラッチ8、第2命
令ラッチ7、バス制御部9、命令実行部10、命令デコ
ード部11、割り込み処理部12、プログラムカウンタ
インクリメンタ(以下、「PCインクリメンタ」と称す
る)13等を有している。ここまでは、従来のものと同
じであるが、本実施の形態では、さらに、選択手段とし
てのセレクタ14、実行命令保管手段としての命令コー
ド15及び特定命令要求信号検出手段としての要求ラッ
チ16が設けられている。
As shown in FIG. 1, the central processing unit in the data processing apparatus according to the present embodiment includes a program counter 1, a register 2, a selector 3, and an arithmetic unit (ALU: Arithm).
eticand Logic Unit) 4, Read data latch (Latch)
5, a write data latch 6, a first instruction latch 8, a second instruction latch 7, a bus control unit 9, an instruction execution unit 10, an instruction decoding unit 11, an interrupt processing unit 12, a program counter incrementer (hereinafter, “PC incrementer”). 13). Up to this point, this is the same as the conventional one, but in the present embodiment, the selector 14 as the selection means, the instruction code 15 as the execution instruction storage means, and the request latch 16 as the specific instruction request signal detection means are further provided. Is provided.

【0058】上記の中央処理装置は、3段のパイプライ
ンを備えたものとなっており、命令を3ステップに分け
て実行し、各ステップ毎に次の命令を入力し、3つの命
令をパラレルに処理するものとなっている。すなわち、
命令の取り出し、デコード及び実行を同時にパラレルに
行うものとなっている。
The above-mentioned central processing unit is provided with a three-stage pipeline, executes instructions in three steps, inputs the next instruction for each step, and executes the three instructions in parallel. To be processed. That is,
Instructions are fetched, decoded and executed simultaneously in parallel.

【0059】ここで、この中央処理装置は、通常の動作
及び割り込み処理についてはセレクタ3にてデータバス
21が選ばれるので従来のものと全く同じ動作をする。
Here, the central processing unit performs exactly the same operation as the conventional one because the data bus 21 is selected by the selector 3 for normal operation and interrupt processing.

【0060】すなわち、通常の動作では、プログラムカ
ウンタ1の値をアドレスバス20に出力し、そのアドレ
スに格納されている命令(インストラクション:Instru
ction)をデータバス21から読み出し、第1命令ラッチ
8に取り込む。今、あるクロックタイミングで第1命令
ラッチ8に取り込まれた値は、命令デコード部11にて
解読される。次いで、次のクロックで第1命令ラッチ8
の内容は第2命令ラッチ7に送られる一方、命令デコー
ド部11での解読内容は命令実行部10に送られ、バス
制御部9及びリードデータラッチ5若しくはライトデー
タラッチ6を制御し、データをメモリから読み出した
り、メモリに書き込んだり又はレジスタ2、セレクタ3
及び演算器(ALU)4を制御して計算を行ったりす
る。
That is, in a normal operation, the value of the program counter 1 is output to the address bus 20, and the instruction (Instruction) stored at that address is output.
ction) is read from the data bus 21 and taken into the first instruction latch 8. Now, the value fetched into the first instruction latch 8 at a certain clock timing is decoded by the instruction decoding unit 11. Next, at the next clock, the first instruction latch 8
Is sent to the second instruction latch 7, while the contents decoded by the instruction decode unit 11 are sent to the instruction execution unit 10 to control the bus control unit 9 and the read data latch 5 or the write data latch 6, and Read from memory, write to memory or register 2, selector 3
And the arithmetic unit (ALU) 4 to perform calculations.

【0061】このとき同時に、プログラムカウンタ1の
値はPCインクリメンタ13で一定値だけ加算されプロ
グラムカウンタ1に書き込まれ、次の命令が第1命令ラ
ッチ8に取り込まれる。
At the same time, the value of the program counter 1 is added by a predetermined value by the PC incrementer 13 and written into the program counter 1, and the next instruction is taken into the first instruction latch 8.

【0062】また、割り込み要求信号23が入力される
と割り込み処理部12が命令実行部10やプログラムカ
ウンタ1を制御し、第1命令ラッチ8に現在格納されて
いる命令を無効にしプログラムカウンタ1を予め設定さ
れた値にすることにより、割り込み処理プログラムに分
岐する。
When the interrupt request signal 23 is input, the interrupt processing unit 12 controls the instruction execution unit 10 and the program counter 1, invalidates the instruction currently stored in the first instruction latch 8, and resets the program counter 1. By setting the value to a preset value, the process branches to an interrupt processing program.

【0063】一方、本実施の形態のデータ処理装置の中
央処理装置では、外部からの要求によりデータ転送をす
る場合には、要求ラッチ16に特定命令要求信号24が
入力される。そして、要求ラッチ16でタイミングをと
って、セレクタ14を切り替えて第1命令ラッチ8に命
令コード15に格納された特定実行命令を表すデータが
取り込まれるようにする。
On the other hand, in the central processing unit of the data processing apparatus according to the present embodiment, when data is transferred in response to an external request, a specific instruction request signal 24 is input to the request latch 16. Then, the selector 14 is switched at a timing by the request latch 16 so that the data representing the specific execution instruction stored in the instruction code 15 is taken into the first instruction latch 8.

【0064】また、第1命令ラッチ8に命令コード15
が取り込まれている間は、バス制御部9がメモリアクセ
スを行うことを禁止し、PCインクリメンタ13に対し
てはプログラムカウンタ1の加算を禁止する。その後
は、通常動作に戻る。
The instruction code 15 is stored in the first instruction latch 8.
While the data is loaded, the bus control unit 9 prohibits the memory access, and prohibits the PC incrementer 13 from incrementing the program counter 1. Thereafter, the operation returns to the normal operation.

【0065】さらに、上記の第1命令ラッチ8に取り込
まれた命令が命令実行部10にて実行されるタイミング
が分かるように登録命令処理信号26も出力する。すな
わち、登録命令処理信号26は、従来のDMA処理にお
いて存在したアクノレッジ信号に相当する信号を出力す
るものとなっている。
Further, it also outputs a registered instruction processing signal 26 so that the timing at which the instruction fetched by the first instruction latch 8 is executed by the instruction execution unit 10 can be known. That is, the registration command processing signal 26 outputs a signal corresponding to an acknowledge signal existing in the conventional DMA processing.

【0066】また、本実施の形態のデータ処理装置は、
図2に示すように、中央処理装置(以下、「CPU(Ce
ntral Processing Unit)」と称する)30の周辺機器と
して、転送制御部71、クロック生成部72、デバッグ
制御回路73、特定命令要求信号生成手段としての特定
命令要求信号生成部70、転送カウンタ42、I/O3
2、キャッシュ制御回路80、MMU(Memory Managem
ent Unit) 90及びメモリ31を有している。
Further, the data processing device of the present embodiment
As shown in FIG. 2, the central processing unit (hereinafter referred to as “CPU (Ce
ntral Processing Unit) 30), a transfer control unit 71, a clock generation unit 72, a debug control circuit 73, a specific instruction request signal generation unit 70 as specific instruction request signal generation means, a transfer counter 42, and I / O3
2. Cache control circuit 80, MMU (Memory Managem
ent Unit) 90 and a memory 31.

【0067】上記の構成を有するデータ処理装置にて、
外部からの入力により、例えば、I/O32のデータを
メモリ31にデータ転送することを考える。
In the data processing device having the above configuration,
It is assumed that, for example, data of the I / O 32 is transferred to the memory 31 by an external input.

【0068】この場合には、図1に示す上記CPU30
の命令コード15に特定実行命令として、例えばメモリ
ライト命令を予め入れておく。なお、この命令コード1
5は、レジスタにて構成することが高速処理の点で好ま
しいが、必ずしもこれに限らず、他の記憶装置にて構成
することも可能である。
In this case, the CPU 30 shown in FIG.
For example, a memory write instruction is inserted in advance as a specific execution instruction in the instruction code 15 of FIG. This instruction code 1
5 is preferably constituted by a register in terms of high-speed processing, but is not necessarily limited to this, and may be constituted by another storage device.

【0069】この状態で、図2に示すように、転送要求
信号が転送制御部71に入力されると、特定命令要求信
号生成部70からCPU30に特定命令要求信号24と
して転送要求信号が出力される。この転送要求信号は、
図1に示すように、上記CPU30の要求ラッチ16に
入力される。
In this state, when a transfer request signal is input to the transfer control unit 71 as shown in FIG. 2, the specific command request signal generation unit 70 outputs a transfer request signal to the CPU 30 as the specific command request signal 24. You. This transfer request signal is
As shown in FIG. 1, the request is input to the request latch 16 of the CPU 30.

【0070】次いで、この要求ラッチ16の転送要求信
号によりタイミングをとって切り替え信号25を介して
セレクタ14を切り替えて、上記命令コード15の特定
実行命令を第1命令ラッチ8に入力させる。これによ
り、以後、上述した通常動作と同様に、第2命令ラッチ
7、命令デコード部11、命令実行部10及びバス制御
部9によって特定実行命令が実行される。
Next, the selector 14 is switched via the switching signal 25 at a timing according to the transfer request signal of the request latch 16, and the specific execution instruction of the instruction code 15 is input to the first instruction latch 8. As a result, the specific execution instruction is thereafter executed by the second instruction latch 7, the instruction decoding unit 11, the instruction execution unit 10, and the bus control unit 9, as in the normal operation described above.

【0071】またこのとき、上記の命令コード15の特
定実行命令の実行に際して、要求ラッチ16から登録命
令処理信号26としての転送処理信号が出力される。こ
の転送処理信号は、図2に示すように、CPU30から
出力され転送制御部71に入力され、これによって、I
/O32にアクノレッジ信号27が出力される。このと
き、データバス21はハイインピーダンスとなり、I/
O32のデータがメモリ31に書き込まれるようなる。
この結果、I/O32からメモリ31ヘの転送が可能に
なる。
At this time, upon execution of the specific execution instruction of the instruction code 15, the request latch 16 outputs a transfer processing signal as a registered instruction processing signal 26. The transfer processing signal is output from the CPU 30 and input to the transfer control unit 71 as shown in FIG.
An acknowledgment signal 27 is output to / O32. At this time, the data bus 21 becomes high impedance,
The data of O32 is written to the memory 31.
As a result, transfer from the I / O 32 to the memory 31 becomes possible.

【0072】ただし、この方法を使う場合は、転送デー
タをキャッシュ禁止にしておく必要がある。すなわち、
このように転送データをキャッシュしておかなければ、
従来技術で述べたように、外部のメモリ内のデータは初
めてアクセスされるとキャッシュメモリに入り別のデー
タに書き変わってしまうため、通常処理を行うときに不
一致が生じるためである。
However, when using this method, it is necessary to prohibit the transfer data from being cached. That is,
If you do not cache the transfer data like this,
As described in the related art, the data in the external memory enters the cache memory and is rewritten to another data when accessed for the first time, so that a mismatch occurs during normal processing.

【0073】上記の動作を、図3に示すタイミングチャ
ートに基づいて説明する。
The above operation will be described with reference to the timing chart shown in FIG.

【0074】今、アドレスA1、A2…に格納されてい
る命令データD1、D2…の実行中に、特定命令要求信
号24である転送要求信号がハイになると、要求ラッチ
16及び切り替え信号25が順にハイになり、登録命令
処理信号26である転送処理信号がハイとなる。これに
よって、次のクロックサイクルにてアクノレッジ信号2
7が出力される。このとき、CPU30のデータバス2
1をハイインピーダンスにし、I/O32のデータがメ
モリ31に書き込まれるようにすればI/O32からメ
モリ31ヘの転送が可能になる。
When the transfer request signal, which is the specific instruction request signal 24, goes high during execution of the instruction data D1, D2,... Stored in the addresses A1, A2,. The transfer processing signal which is the registration command processing signal 26 becomes high. This allows the acknowledgment signal 2 in the next clock cycle.
7 is output. At this time, the data bus 2 of the CPU 30
If 1 is set to high impedance and the data of the I / O 32 is written to the memory 31, the transfer from the I / O 32 to the memory 31 becomes possible.

【0075】すなわち、アドレスA1、A2…の命令デ
ータD1、D2…を実行している場合に、次にアドレス
A3、A4…の命令データD3、D4…と続くべきとこ
ろに、アドレスA3の命令データD3の前に、I/O3
2からメモリ31へのライト命令を割り込ませる状態を
生じさせる。
That is, when the instruction data D1, D2... Of the addresses A1, A2... Are executed, the instruction data D3 of the address A3, A4. Before D3, I / O3
2 causes a state in which a write instruction to the memory 31 is interrupted.

【0076】これにより、第1命令ラッチ8には、命令
データD2の次のクロックでライト命令が入力され、さ
らに次のクロックで第2命令ラッチ7及び命令実行部1
0にライト命令が入力されて実行される。このとき、転
送回数をカウントする必要がある場合には、図2に示す
転送制御部71の転送カウンタ42により、上記第2命
令ラッチ7及び命令実行部10のライト命令の次のクロ
ックにてカウントされる。上記の動作の結果、転送に要
するクロック数は、2クロックとなる。
As a result, a write instruction is input to the first instruction latch 8 at the next clock of the instruction data D2, and the second instruction latch 7 and the instruction execution unit 1 are input at the next clock.
A write command is input to 0 and executed. At this time, if it is necessary to count the number of transfers, the transfer counter 42 of the transfer control unit 71 shown in FIG. 2 counts the second instruction latch 7 and the write instruction of the instruction execution unit 10 at the next clock. Is done. As a result of the above operation, the number of clocks required for transfer is two.

【0077】一方、従来の方法では、転送に要するクロ
ック数は、DMAコントローラを使った場合では1クロ
ック(図9参照)、割り込みを使った場合では9クロッ
クである(図10参照)。
On the other hand, in the conventional method, the number of clocks required for transfer is one clock when the DMA controller is used (see FIG. 9) and nine clocks when the interrupt is used (see FIG. 10).

【0078】したがって、従来品と比較すると、本実施
の形態では、DMAコントローラを使った場合よりも多
少高速性が失われるが、DMAコントローラを使用する
よりも回路構成が簡単になり、さらに、CPU30がデ
ータを管理することになるのでMMU90を生かすこと
ができる。すなわち、ハードウェア的に従来のDMAコ
ントローラの部分を小さくできる。
Therefore, when compared with the conventional product, in the present embodiment, although the speed is slightly reduced compared with the case where the DMA controller is used, the circuit configuration is simpler than the case where the DMA controller is used. Manages data, so that the MMU 90 can be utilized. That is, the portion of the conventional DMA controller can be reduced in hardware.

【0079】次に、上記の例では、命令コード15にメ
モリライト命令を入れておいたが、この命令コード15
に転送命令の1つの特定実行命令であるメモリリード命
令を入れておけばメモリ31からI/O32へのデータ
転送が可能である。また、転送カウンタ42に1を加え
る命令を入れておけば、転送のパルス信号をカウントす
ることができる。
Next, in the above example, the memory write instruction is inserted in the instruction code 15, but this instruction code 15
If a memory read instruction, which is one specific execution instruction of the transfer instruction, is inserted in the memory 31, data transfer from the memory 31 to the I / O 32 is possible. Further, if an instruction to add 1 to the transfer counter 42 is inserted, the transfer pulse signal can be counted.

【0080】さらに、命令コード15に、特定実行命令
として、外部メモリへ書き出す命令を入れておくことも
可能である。これにより、登録命令処理信号26がハイ
になった後に出力される値を取り出すことにより、デバ
ッグ情報を取り出すことができる。
Furthermore, it is also possible to put, in the instruction code 15, an instruction to be written to an external memory as a specific execution instruction. Thus, by extracting the value output after the registration command processing signal 26 becomes high, debug information can be extracted.

【0081】ここで、命令コード15の具体例として、
例えば、英国ARM社の32bitRISCプロセッサ
ARM6/7の命令セットを使用する場合には、図4に
示すように、レジスタRyの示すアドレス[Ry]から
I/O32に転送する命令、I/O32からアドレス
[Ry]に転送する命令、パルス数をカウントする命令
及びレジスタの値を呼び出す命令が、それぞれ命令欄に
示すように表される。
Here, as a specific example of the instruction code 15,
For example, when using the instruction set of a 32-bit RISC processor ARM6 / 7 of ARM, UK, as shown in FIG. 4, an instruction to transfer from the address [Ry] indicated by the register Ry to the I / O 32 and an address from the I / O 32 The instruction to transfer to [Ry], the instruction to count the number of pulses, and the instruction to call the value of the register are respectively shown in the instruction column.

【0082】なお、上記命令コード15は、上記の内容
に固定された値である必要はなく、プログラムで書き換
えることができるようにしても良い。
The instruction code 15 does not need to be a value fixed to the above contents, but may be rewritable by a program.

【0083】また、特定命令要求信号24や命令コード
15が2種類以上あり、入力される要求信号の種類によ
り別々の特定実行命令が選ばれるようにしても良い。
There may be two or more types of the specific command request signal 24 and the command code 15, and different specific execution commands may be selected depending on the type of the input request signal.

【0084】さらに、図5に示すように、命令コード1
5の特定実行命令は1つだけではなく2つ以上有り、そ
れら特定実行命令が順番に第1命令ラッチ8に取り込ま
れ、その間は上記メモリ31へのアクセス及び上記プロ
グラムカウンタ1の加算を停止させることも可能であ
る。
Further, as shown in FIG.
5, there is not only one specific execution instruction but also two or more specific execution instructions. These specific execution instructions are sequentially taken into the first instruction latch 8, and during that time, the access to the memory 31 and the addition of the program counter 1 are stopped. It is also possible.

【0085】この図5では、レジスタRyの示すアドレ
ス[Ry]からレジスタRzの示すアドレス[Rz]へ
データを転送する場合を示している。レジスタRxは転
送前後で値が変わらないようにしている。この図5に示
す例では、MMU90もキャッシュ制御回路80も両方
活用して転送することができる。
FIG. 5 shows a case where data is transferred from address [Ry] indicated by register Ry to address [Rz] indicated by register Rz. The value of the register Rx does not change before and after the transfer. In the example shown in FIG. 5, the transfer can be performed by utilizing both the MMU 90 and the cache control circuit 80.

【0086】ところで、図4に示す例においては、汎用
レジスタRxとレジスタRyとがデー夕転送やパルスの
カウントのために使用できなくなったり、メモリ31を
キャッシュ禁止にしてCPU30のデータバス21をハ
イインピーダンスにしたりしなければならないという問
題がある。
In the example shown in FIG. 4, the general-purpose register Rx and the register Ry cannot be used for data transfer or pulse counting, or the memory 31 is prohibited from being cached and the data bus 21 of the CPU 30 is set high. There is a problem that impedance must be set.

【0087】そこで、これを回避するために、CPU3
0に転送専用レジスタや特定のパルス数をカウントする
ためのパルスカウント用レジスタ等の専用レジスタ15
aを準備し、この専用レジスタ15aを用いてメモリリ
ード/ライトしたり、足し算を行う命令を追加したりし
て命令コード15に使用することも可能である。
Therefore, in order to avoid this, the CPU 3
A dedicated register 15 such as a transfer dedicated register or a pulse count register for counting a specific number of pulses to 0
It is also possible to prepare a and use it for the instruction code 15 by reading / writing the memory using the dedicated register 15a or adding an instruction for performing addition.

【0088】ここで、メモリリード/ライト命令は、C
PU30内部のレジスタ2にリード/ライトせずに、デ
ータバス21をハイインピーダンスにし、かつ自動的に
キャッシュ禁止となるような動作をする実行命令にすれ
ば、転送動作として適切な状態となる。例えば、図4に
示すLDR命令(リード命令)の例では、汎用レジスタ
Rxに読み込んだ値が書き込まれるが、効果をみると汎
用レジスタRxに書き込む必要がないことが分かる。し
たがって、上記のようにしても問題はない。逆に、汎用
レジスタRxの値が変わると、他のプログラムで汎用レ
ジスタRxを使用したい場合に悪影響を及ぼすことにな
る。
Here, the memory read / write instruction is C
If the data bus 21 is set to a high impedance and an execution instruction that automatically performs an operation of prohibiting caching is performed without reading / writing the register 2 inside the PU 30, the transfer operation is in an appropriate state. For example, in the example of the LDR instruction (read instruction) shown in FIG. 4, the read value is written to the general-purpose register Rx, but it is understood from the effects that it is not necessary to write to the general-purpose register Rx. Therefore, there is no problem even in the case described above. Conversely, a change in the value of the general-purpose register Rx will adversely affect the use of the general-purpose register Rx in another program.

【0089】このように、本実施の形態のデータ処理装
置では、CPU30の外部から入力される転送、パルス
数のカウント又はデバッグの特定命令を実行させるため
の要求信号があると、特定命令要求信号生成部70がこ
れら各要求信号に対応する特定命令要求信号24を生成
してCPU30に出力する。
As described above, in the data processing apparatus of the present embodiment, when there is a request signal for executing a transfer, pulse count, or debug specific instruction input from outside the CPU 30, a specific instruction request signal The generation unit 70 generates the specific command request signal 24 corresponding to each of these request signals, and outputs it to the CPU 30.

【0090】CPU30は、要求ラッチ16にてこの特
定命令要求信号24を検出する。
The CPU 30 detects the specific command request signal 24 in the request latch 16.

【0091】一方、CPU30がプログラムカウンタ1
に応じた命令を取り出そうとする時点で、要求ラッチ1
6が特定命令要求信号24を検出しているときには、セ
レクタ14が、上記プログラムカウンタ1に応じた命令
の読み込みに代えて、命令コード15に保管された転
送、パルス数のカウント又はデバッグのいずれかの特定
実行命令を読み込み、その特定実行命令を実行させる。
また、セレクタ14の選択により、特定実行命令の実行
中には、プログラムカウンタ1の増加及びメモリ31へ
のアクセスを禁止させる。
On the other hand, when the CPU 30
At the point when the instruction corresponding to
6 detects the specific command request signal 24, the selector 14 selects one of the transfer, the counting of the number of pulses, and the debugging stored in the command code 15 instead of reading the command corresponding to the program counter 1. Is read, and the specific execution instruction is executed.
In addition, the selection of the selector 14 inhibits the increase of the program counter 1 and the access to the memory 31 during execution of the specific execution instruction.

【0092】このように、CPU30の外部から転送、
パルス数のカウント又はデバッグの特定命令があった場
合に、データ処理装置は、割り込みと同様な動作にて処
理する。しかし、割り込みのようにCPU30の処理を
中断し、ある決まったアドレスに分岐し、処理が終了し
てから元のアドレスに戻り元の処理を再開するのではな
く、プログラムカウンタ1の増加及びメモリ31へのア
クセスを禁止させながら、転送やパルス数のカウントや
デバッグ情報のやり取りを行う特定命令を読み込んで実
行させる。そして、実行後は、通常通りプログラムカウ
ンタ1を増加させる。
As described above, transfer from outside the CPU 30
When there is a specific instruction for counting the number of pulses or for debugging, the data processing device processes the same operation as an interrupt. However, instead of interrupting the processing of the CPU 30 like an interrupt, branching to a predetermined address, and returning to the original address after the processing is completed and resuming the original processing, the program counter 1 is increased and the memory 31 is increased. A specific instruction for transferring, counting the number of pulses, and exchanging debug information is read and executed while prohibiting access to the program. After the execution, the program counter 1 is incremented as usual.

【0093】このため、分岐処理に必要な時間を省くこ
とができ、比較的高速にデータ転送やパルス数のカウン
ト及びデバッグ処理を行うことが可能となる。
Therefore, the time required for the branching process can be omitted, and the data transfer, the counting of the number of pulses, and the debugging process can be performed at a relatively high speed.

【0094】一方、上記の特定命令の処理に際しては、
1つのCPU30にて様々な処理を行わせ、CPU30
に内蔵されるレジスタやメモリアクセス機能を有効に利
用することで実現する。
On the other hand, when processing the above specific instruction,
Various processes are performed by one CPU 30 and the CPU 30
This is achieved by effectively utilizing the registers and memory access functions built into the LM.

【0095】例えば、CPU30にメモリアクセスする
命令を命令コード15に保管しておくことで、データの
転送を行うことができる。この場合、CPU30の機能
を使ってデータ転送を行うため、MMU90やキャッシ
ュ制御回路80等を内蔵していても、これらの機能を生
かした転送が可能となる。したがって、全体の回路規模
を小さくでき、また、バスの調整も不要になる。
For example, by storing an instruction for accessing the memory of the CPU 30 in the instruction code 15, data can be transferred. In this case, since the data is transferred using the function of the CPU 30, even if the MMU 90, the cache control circuit 80, and the like are built in, the transfer using these functions can be performed. Therefore, the overall circuit scale can be reduced, and bus adjustment is not required.

【0096】同様に、専用レジスタ15aの値を増加さ
せる特定命令を実行させることでパルス数をカウントす
ることができる。この場合、CPU30の内部のALU
4及び専用レジスタ15aを使用してカウントするの
で、外部には要求信号を発生させる回路のみで実現でき
る。
Similarly, the number of pulses can be counted by executing a specific instruction for increasing the value of the dedicated register 15a. In this case, the ALU inside the CPU 30
Since the count is performed using the register 4 and the dedicated register 15a, it can be realized only by a circuit for generating a request signal externally.

【0097】さらに、CPU30の各レジスタ2・15
a等の値をメモリ31等に書き込む特定命令を実行させ
れば、デバッグのための情報を外部に出力させることが
できる。この場合、外部には要求信号を発生させる回路
つまりデバッグ制御回路73及び出力された情報を取り
出す回路を追加するだけで実現できる。
Further, each register 2.15 of the CPU 30
By executing a specific instruction to write a value such as a into the memory 31 or the like, information for debugging can be output to the outside. In this case, it can be realized only by adding a circuit for generating a request signal, that is, a debug control circuit 73 and a circuit for extracting output information to the outside.

【0098】したがって、データを転送したり、信号の
数を数えたり、デバッグのためにCPU30の状態を外
部に出力したい場合に、外部に接続する回路を少なくし
て、CPU30が効率良くかつ高速に処理できるデータ
処理装置を提供することができる。
Therefore, when it is desired to transfer data, count the number of signals, or output the state of the CPU 30 to the outside for debugging, the number of circuits connected to the outside is reduced and the CPU 30 can operate efficiently and at high speed. A data processing device capable of processing can be provided.

【0099】また、本実施の形態のデータ処理装置で
は、命令コード15の特定実行命令は、書換え可能に形
成されている。このため、1つの小さい容量の命令コー
ド15にて、外部から転送、パルス数のカウント又はデ
バッグの各特定命令に対応する特定実行命令に切り換え
ることができる。
In the data processing device according to the present embodiment, the specific execution instruction of the instruction code 15 is rewritable. Therefore, it is possible to switch to a specific execution instruction corresponding to each specific instruction of transfer, counting of the number of pulses, or debugging from the outside with one small-capacity instruction code 15.

【0100】したがって、回路数を少なくしてデータ処
理装置が大型化するのを防止することができる。
Therefore, the number of circuits can be reduced and the data processing device can be prevented from being enlarged.

【0101】一方、従来であれば、プログラムのデバッ
グを行う場合には、割り込みにより処理しなければなら
なかったので、高速処理することが困難であった。
On the other hand, in the prior art, when debugging a program, it was necessary to perform processing by interruption, so that it was difficult to perform high-speed processing.

【0102】しかし、本実施の形態のデータ処理装置で
は、特定命令がデバッグを示す場合には、命令コード1
5の特定実行命令は、CPU30内の全てのレジスタの
内容やフラッグの値を外部に出力するための情報外部出
力命令となる。
However, in the data processing device of the present embodiment, when the specific instruction indicates debugging, the instruction code 1
The fifth specific execution instruction is an information external output instruction for outputting the contents of all the registers in the CPU 30 and the flag values to the outside.

【0103】したがって、CPU30のレジスタ値をメ
モリ31等に書き込むための情報外部出力命令を実行さ
せれば、デバッグのための情報を外部に出力させること
ができる。この場合、外部には要求信号を発生させる回
路及び出力された情報を取り出す回路を追加するだけで
実現できる。
Therefore, if an information external output instruction for writing the register value of the CPU 30 to the memory 31 or the like is executed, information for debugging can be output to the outside. In this case, it can be realized only by adding a circuit for generating a request signal and a circuit for extracting output information to the outside.

【0104】この結果、回路数を少なくしてデータ処理
装置が大型化するのを防止すると共に、従来の割り込み
処理ではないので、高速に処理することができる。
As a result, the number of circuits can be reduced to prevent the data processing apparatus from becoming large, and the processing can be performed at high speed because it is not the conventional interrupt processing.

【0105】また、従来では、パルス数のカウントを示
す場合には、CPU30の外に専用のパルスカウンタが
必要であり、データ処理装置の大型化を招いていた。
Conventionally, when indicating the count of the number of pulses, a dedicated pulse counter is required outside the CPU 30, which has led to an increase in the size of the data processing apparatus.

【0106】しかし、本実施の形態のデータ処理装置で
は、特定のパルス数をカウントする場合には、セレクタ
14の選択により、特定のパルス数をカウントするため
に設けられているCPU30の専用レジスタ15aの値
を1ずつ増加させることができる。この場合、CPU3
0の内部のALU4及び専用レジスタ15aを使用して
カウントするので、外部には要求信号を発生させる回路
のみで実現できる。
However, in the data processing device of the present embodiment, when counting a specific number of pulses, the selector 14 selects the dedicated register 15a of the CPU 30 provided for counting the specific number of pulses when the selector 14 is selected. Can be increased by one. In this case, the CPU 3
Since counting is performed using the ALU 4 inside the 0 and the dedicated register 15a, it can be realized only by a circuit for generating a request signal externally.

【0107】したがって、回路数を少なくしてデータ処
理装置の小型化を図ることができる。
Therefore, the number of circuits can be reduced and the size of the data processing device can be reduced.

【0108】さらに、本実施の形態のデータ処理装置で
は、特定命令が転送を示す場合には、命令コード15の
特定実行命令として、メモリ31の内容を読み込むため
のメモリリード命令又はメモリ31に書き込むためのメ
モリライト命令のいずれかを選択すればメモリリード又
はメモリライトが実行できる。この場合、CPU30の
機能を使ってデータ転送を行うため、MMU90やキャ
ッシュ制御回路80等を内蔵していても、これらの機能
を生かした転送が可能となる。さらに、バスの調整が不
要になる。
Further, in the data processing apparatus of the present embodiment, when the specific instruction indicates transfer, a memory read instruction for reading the contents of the memory 31 or writing to the memory 31 is performed as the specific execution instruction of the instruction code 15. Memory read or memory write can be executed by selecting any one of the memory write instructions. In this case, since the data is transferred using the function of the CPU 30, even if the MMU 90, the cache control circuit 80, and the like are built in, the transfer using these functions can be performed. Furthermore, no bus adjustment is required.

【0109】したがって、データ転送に際して、回路数
を少なくしてデータ処理装置が大型化するのを防止する
ことができる。
Therefore, at the time of data transfer, it is possible to reduce the number of circuits and prevent the data processing apparatus from becoming large.

【0110】一方、I/O32とメモリ31間でデータ
のやり取りを行う場合に、データバス21上でCPU3
0からのデータとのぶつかりを防ぐためにデータバス2
1を開放しなければならない。
On the other hand, when exchanging data between the I / O 32 and the memory 31, the CPU 3
Data bus 2 to prevent collision with data from 0
1 must be released.

【0111】そこで、本実施の形態では、セレクタ14
は、命令コード15の特定実行命令によりメモリリード
命令又はメモリライト命令を実行させるときには、メモ
リリード命令によって読み込んだ値をレジスタ2に書き
込むことなく、メモリライト命令でデータバス21をハ
イインピーダンスにさせる。
Thus, in the present embodiment, the selector 14
When the memory read instruction or the memory write instruction is executed by the specific execution instruction of the instruction code 15, the data bus 21 is made high impedance by the memory write instruction without writing the value read by the memory read instruction to the register 2.

【0112】したがって、命令コード15の特定実行命
令によりI/O32とメモリ31間でデータのやり取り
を行う場合においても、データバス21上でCPU30
からのデータとぶつかることを防止することができる。
Therefore, even when data is exchanged between the I / O 32 and the memory 31 according to the specific execution instruction of the instruction code 15, the CPU 30
Can be prevented from colliding with data from.

【0113】[0113]

【発明の効果】請求項1に係る発明のデータ処理装置
は、以上のように、中央処理装置の外部から入力される
転送、パルス数のカウント又はデバッグの特定命令を実
行させるための要求信号を受けてこれらいずれかの要求
信号があったことを中央処理装置に知らせるべく上記各
要求信号に対応する特定命令要求信号を生成して出力す
る特定命令要求信号生成手段が設けられると共に、上記
中央処理装置には、上記特定命令要求信号を検出する特
定命令要求信号検出手段と、外部から入力された転送、
パルス数のカウント又はデバッグの特定命令を処理する
ための特定実行命令を保管しておくための実行命令保管
手段と、上記中央処理装置がプログラムカウンタに応じ
た命令を取り出そうとする時点で、上記特定命令要求信
号検出手段が特定命令要求信号を検出しているときに
は、上記プログラムカウンタに応じた命令の読み込みに
代えて、上記実行命令保管手段に保管された転送、パル
ス数のカウント又はデバッグのいずれかの特定実行命令
を読み込み、その特定実行命令を実行させ、かつこの特
定実行命令の実行中には、プログラムカウンタの増加及
びメモリへのアクセスを禁止させるように選択する選択
手段とが設けられているものである。
According to the first aspect of the present invention, as described above, the request signal for executing the transfer, pulse count, or debug specific instruction input from outside the central processing unit is provided. And a specific command request signal generating means for generating and outputting a specific command request signal corresponding to each of the request signals so as to notify the central processing unit that the request signal has been received. The apparatus includes a specific command request signal detecting means for detecting the specific command request signal, a transfer externally input,
Execution instruction storage means for storing a specific execution instruction for processing a pulse count or debug specific instruction; and when the central processing unit attempts to fetch an instruction corresponding to a program counter, When the instruction request signal detecting means detects the specific instruction request signal, instead of reading the instruction corresponding to the program counter, any of transfer, pulse count or debug stored in the execution instruction storage means is performed. Selecting means for reading the specific execution instruction, executing the specific execution instruction, and selecting to inhibit the increase of the program counter and the access to the memory during the execution of the specific execution instruction. Things.

【0114】それゆえ、中央処理装置の外部から転送、
パルス数のカウント又はデバッグの特定命令があった場
合に、データ処理装置は、割り込みと同様な動作にて処
理する。しかし、割り込みのように中央処理装置の処理
を中断し、ある決まったアドレスに分岐し、処理が終了
してから元のアドレスに戻り元の処理を再開するのでは
なく、プログラムカウンタの増加及びメモリへのアクセ
スを禁止させながら、転送やパルス数のカウントやデバ
ッグ情報のやり取りを行う特定命令を読み込んで実行さ
せる。そして、実行後は、通常通りプログラムカウンタ
を増加させる。
Therefore, transfer from outside the central processing unit,
When there is a specific instruction for counting the number of pulses or for debugging, the data processing device processes the same operation as an interrupt. However, instead of interrupting the processing of the central processing unit like an interrupt, branching to a certain address, and returning to the original address after the processing is completed and restarting the original processing, the program counter is increased and the memory is increased. A specific instruction for transferring, counting the number of pulses, and exchanging debug information is read and executed while prohibiting access to the program. After execution, the program counter is incremented as usual.

【0115】このため、分岐処理に必要な時間を省くこ
とができ、比較的高速にデータ転送やパルス数のカウン
ト及びデバッグ処理を行うことが可能となる。
As a result, the time required for the branching process can be omitted, and the data transfer, the counting of the number of pulses, and the debugging process can be performed at a relatively high speed.

【0116】一方、上記の特定命令の処理に際しては、
1つの中央処理装置にて様々な処理を行わせ、中央処理
装置に内蔵されるレジスタやメモリアクセス機能を有効
に利用することで実現する。
On the other hand, when processing the above specific instruction,
This is realized by causing a single central processing unit to perform various processes and effectively using a register and a memory access function built in the central processing unit.

【0117】したがって、データを転送したり、信号の
数を数えたり、デバッグのために中央処理装置の状態を
外部に出力したい場合に、外部に接続する回路を少なく
して、中央処理装置が効率良くかつ高速に処理できるデ
ータ処理装置を提供することができるという効果を奏す
る。
Therefore, when it is desired to transfer data, count the number of signals, or output the state of the central processing unit to the outside for debugging, the number of externally connected circuits is reduced, and the efficiency of the central processing unit is reduced. There is an effect that a data processing device capable of performing good and high-speed processing can be provided.

【0118】請求項2に係る発明のデータ処理装置は、
以上のように、請求項1記載のデータ処理装置におい
て、上記実行命令保管手段の特定実行命令は、書換え可
能に形成されているものである。
The data processing device according to the second aspect of the present invention
As described above, in the data processing device according to the first aspect, the specific execution instruction of the execution instruction storage unit is formed to be rewritable.

【0119】それゆえ、1つの小さい容量の実行命令保
管手段にて、外部から転送、パルス数のカウント又はデ
バッグの各特定命令に対応する特定実行命令に切り換え
ることができる。
Therefore, it is possible to switch to a specific execution instruction corresponding to each specific instruction of transfer, counting of the number of pulses or debugging from outside by one small-capacity execution instruction storage means.

【0120】したがって、回路数を少なくしてデータ処
理装置が大型化するのを防止することができるという効
果を奏する。
Therefore, an effect is obtained that the number of circuits can be reduced to prevent the data processing device from being enlarged.

【0121】請求項3に係る発明のデータ処理装置は、
以上のように、請求項1又は2記載のデータ処理装置に
おいて、上記実行命令保管手段の特定実行命令は、特定
命令がデバッグを示す場合には、中央処理装置内の全て
のレジスタの内容やフラッグの値を外部に出力するため
の情報外部出力命令からなっているものである。
The data processing device according to the third aspect of the present invention
As described above, in the data processing device according to claim 1 or 2, when the specific instruction indicates debugging, the specific execution instruction of the execution instruction storage means is the contents or flags of all registers in the central processing unit. Is an information external output instruction for outputting the value of the information to the outside.

【0122】それゆえ、中央処理装置のレジスタ値をメ
モリ等に書き込むための情報外部出力命令を実行させれ
ば、デバッグのための情報を外部に出力させることがで
きる。この場合、外部には要求信号を発生させる回路及
び出力された情報を取り出す回路を追加するだけで実現
できる。
Therefore, if an information external output instruction for writing the register value of the central processing unit to a memory or the like is executed, information for debugging can be output to the outside. In this case, it can be realized only by adding a circuit for generating a request signal and a circuit for extracting output information to the outside.

【0123】この結果、回路数を少なくしてデータ処理
装置が大型化するのを防止すると共に、従来の割り込み
処理ではないので、高速に処理することができるという
効果を奏する。
As a result, the number of circuits can be reduced to prevent the data processing device from increasing in size, and it is possible to perform high-speed processing because it is not the conventional interrupt processing.

【0124】請求項4に係る発明のデータ処理装置は、
以上のように、請求項1又は2記載のデータ処理装置に
おいて、中央処理装置には、特定のパルス数をカウント
するためのパルスカウント用レジスタが設けられると共
に、上記選択手段は、外部から入力される要求信号が特
定のパルス数のカウントを示す場合には、上記パルスカ
ウント用レジスタの値を1ずつ増加させるものである。
The data processing apparatus according to the fourth aspect of the present invention
As described above, in the data processing device according to claim 1 or 2, the central processing unit is provided with a pulse count register for counting a specific number of pulses, and the selection unit is externally input. If the request signal indicates a count of a specific number of pulses, the value of the pulse count register is incremented by one.

【0125】それゆえ、特定のパルス数をカウントする
場合には、中央処理装置の内部のパルスカウント用レジ
スタを使用してカウントするので、外部には要求信号を
発生させる回路のみで実現できる。
Therefore, when counting a specific number of pulses, the number of pulses is counted using a pulse counting register inside the central processing unit, so that it can be externally realized only by a circuit for generating a request signal.

【0126】したがって、回路数を少なくしてデータ処
理装置の小型化を図ることができるという効果を奏す
る。
Therefore, there is an effect that the number of circuits can be reduced and the size of the data processing device can be reduced.

【0127】請求項5に係る発明のデータ処理装置は、
以上のように、請求項1又は2記載のデータ処理装置に
おいて、上記実行命令保管手段の特定実行命令は、特定
命令が転送を示す場合には、メモリの内容を読み込むた
めのメモリリード命令又はメモリに書き込むためのメモ
リライト命令からなっているものである。
The data processing device according to the fifth aspect of the present invention
As described above, in the data processing apparatus according to claim 1 or 2, the specific execution instruction of the execution instruction storage means is a memory read instruction or a memory for reading the contents of the memory when the specific instruction indicates transfer. Consists of a memory write instruction for writing to

【0128】それゆえ、特定命令が転送を示す場合に
は、上記実行命令保管手段の特定実行命令として、メモ
リの内容を読み込むためのメモリリード命令又はメモリ
に書き込むためのメモリライト命令のいずれかを選択す
ればメモリリード又はメモリライトが実行できる。この
場合、中央処理装置の機能を使ってデータ転送を行うた
め、MMUやキャッシュメモリ等を内蔵していても、こ
れらの機能を生かした転送が可能となる。さらに、バス
の調整が不要になる。
Therefore, when the specific instruction indicates transfer, either the memory read instruction for reading the contents of the memory or the memory write instruction for writing to the memory is used as the specific execution instruction of the execution instruction storage means. If selected, memory read or memory write can be executed. In this case, since data transfer is performed using the function of the central processing unit, transfer utilizing these functions can be performed even if an MMU, a cache memory, or the like is incorporated. Furthermore, no bus adjustment is required.

【0129】したがって、データ転送に際して、回路数
を少なくしてデータ処理装置が大型化するのを防止する
ことができるという効果を奏する。
Therefore, in data transfer, there is an effect that the number of circuits can be reduced to prevent the data processing device from being enlarged.

【0130】請求項6に係る発明のデータ処理装置は、
以上のように、請求項5記載のデータ処理装置におい
て、上記選択手段は、上記実行命令保管手段の特定実行
命令によりメモリリード命令又はメモリライト命令を実
行させるときには、メモリリード命令によって読み込ん
だ値をレジスタに書き込むことなく、メモリライト命令
でデータバスをハイインピーダンスにさせるものであ
る。
[0130] The data processing device of the invention according to claim 6 is characterized in that:
As described above, in the data processing device according to claim 5, when the memory read instruction or the memory write instruction is executed by the specific execution instruction of the execution instruction storage unit, the selection unit reads the value read by the memory read instruction. The data bus is made high impedance by a memory write instruction without writing to a register.

【0131】それゆえ、実行命令保管手段の特定実行命
令によりI/Oとメモリ間でデータのやり取りを行う場
合においても、データバス上で中央処理装置からのデー
タとぶつかることを防止することができるという効果を
奏する。
Therefore, even when data is exchanged between the I / O and the memory according to the specific execution instruction of the execution instruction storage means, it is possible to prevent the data from colliding with the data from the central processing unit on the data bus. This has the effect.

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

【図1】本発明におけるデータ処理装置の実施の一形態
を示すものであり、中央処理装置の構成を示すブロック
図である。
FIG. 1 is a block diagram illustrating an embodiment of a data processing device according to the present invention and illustrating a configuration of a central processing unit.

【図2】上記データ処理装置の全体構成を示すブロック
図である。
FIG. 2 is a block diagram showing an overall configuration of the data processing device.

【図3】上記データ処理装置の動作を示すタイミングチ
ャートである。
FIG. 3 is a timing chart showing an operation of the data processing device.

【図4】上記データ処理装置の具体的な命令及び動作を
示す説明図である。
FIG. 4 is an explanatory diagram showing specific instructions and operations of the data processing device.

【図5】上記データ処理装置において複数の命令コード
を備えている場合の具体的な命令及び動作を示す説明図
である。
FIG. 5 is an explanatory diagram showing specific instructions and operations when the data processing apparatus includes a plurality of instruction codes.

【図6】従来のデータ処理装置における中央処理装置の
構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a central processing unit in a conventional data processing device.

【図7】上記データ処理装置の全体構成を示すブロック
図である。
FIG. 7 is a block diagram showing an overall configuration of the data processing device.

【図8】上記データ処理装置における割り込み処理を行
う場合の構成を示すブロック図である。
FIG. 8 is a block diagram showing a configuration in a case where an interrupt process is performed in the data processing device.

【図9】図7に示すDMAコントローラによる処理にて
データ転送を行う場合の動作を示すタイミングチャート
である。
FIG. 9 is a timing chart showing an operation when data transfer is performed in the processing by the DMA controller shown in FIG. 7;

【図10】割り込み処理にてデータ転送を行う場合の動
作を示すタイミングチャートである。
FIG. 10 is a timing chart showing an operation when data transfer is performed in interrupt processing.

【符号の説明】[Explanation of symbols]

1 プログラムカウンタ 14 セレクタ(選択手段) 15 命令コード(実行命令保管手段) 15a 専用レジスタ(パルスカウント用レジスタ) 16 要求ラッチ(特定命令要求信号検出手段) 20 アドレスバス 21 データバス 24 特定命令要求信号 30 中央処理装置〔CPU〕 31 メモリ 70 特定命令要求信号生成部(特定命令要求信号生
成手段)
1 Program Counter 14 Selector (Selection Means) 15 Instruction Code (Execution Instruction Storage Means) 15a Dedicated Register (Pulse Count Register) 16 Request Latch (Specific Instruction Request Signal Detection Means) 20 Address Bus 21 Data Bus 24 Specific Instruction Request Signal 30 Central processing unit [CPU] 31 Memory 70 Specific instruction request signal generation unit (specific instruction request signal generation means)

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】プログラムカウンタに応じた命令をアドレ
スバス及びデータバスを介してメモリにアクセスして読
み込み、読み込んだ命令に基づきその命令を実行すると
共に、その命令を読み込む毎にプログラムカウンタを増
加させる中央処理装置を備えたデータ処理装置におい
て、 中央処理装置の外部から入力される転送、パルス数のカ
ウント又はデバッグの特定命令を実行させるための要求
信号を受けてこれらいずれかの要求信号があったことを
中央処理装置に知らせるべく上記各要求信号に対応する
特定命令要求信号を生成して出力する特定命令要求信号
生成手段が設けられると共に、 上記中央処理装置には、 上記特定命令要求信号を検出する特定命令要求信号検出
手段と、外部から入力された転送、パルス数のカウント
又はデバッグの特定命令を処理するための特定実行命令
を保管しておくための実行命令保管手段と、 上記中央処理装置がプログラムカウンタに応じた命令を
取り出そうとする時点で、上記特定命令要求信号検出手
段が特定命令要求信号を検出しているときには、上記プ
ログラムカウンタに応じた命令の読み込みに代えて、上
記実行命令保管手段に保管された転送、パルス数のカウ
ント又はデバッグのいずれかの特定実行命令を読み込
み、その特定実行命令を実行させ、かつこの特定実行命
令の実行中には、プログラムカウンタの増加及びメモリ
へのアクセスを禁止させるように選択する選択手段とが
設けられていることを特徴とするデータ処理装置。
An instruction corresponding to a program counter is read by accessing a memory via an address bus and a data bus. The instruction is executed based on the read instruction, and the program counter is incremented each time the instruction is read. In a data processing device provided with a central processing unit, a request signal for executing a specific instruction of transfer, counting of the number of pulses, or debugging input from outside the central processing unit, and any of these request signals was received. In order to notify the central processing unit of this, a specific instruction request signal generating means for generating and outputting a specific instruction request signal corresponding to each of the request signals is provided, and the central processing unit detects the specific instruction request signal. Specific instruction request signal detecting means to transfer, pulse count or debug input from outside An execution instruction storage unit for storing a specific execution instruction for processing the specific instruction; and the specific instruction request signal detection unit, when the central processing unit attempts to fetch the instruction corresponding to the program counter, When detecting the instruction request signal, instead of reading the instruction corresponding to the program counter, read a specific execution instruction of any of transfer, pulse count or debug stored in the execution instruction storage means, Data processing means for executing the specific execution instruction and selecting the execution of the specific execution instruction so as to increase the program counter and inhibit access to the memory. apparatus.
【請求項2】上記実行命令保管手段の特定実行命令は、
書換え可能に形成されていることを特徴とする請求項1
記載のデータ処理装置。
2. The specific execution instruction of the execution instruction storage means,
2. The device according to claim 1, wherein the rewritable portion is formed.
The data processing device according to claim 1.
【請求項3】上記実行命令保管手段の特定実行命令は、
特定命令がデバッグを示す場合には、中央処理装置内の
全てのレジスタの内容やフラッグの値を外部に出力する
ための情報外部出力命令からなっていることを特徴とす
る請求項1又は2記載のデータ処理装置。
3. The specific execution instruction of the execution instruction storage means,
3. The information external output instruction for outputting the contents of all registers and flag values in the central processing unit to the outside when the specific instruction indicates debugging. Data processing equipment.
【請求項4】中央処理装置には、特定のパルス数をカウ
ントするためのパルスカウント用レジスタが設けられる
と共に、 上記選択手段は、外部から入力される要求信号が特定の
パルス数のカウントを示す場合には、上記パルスカウン
ト用レジスタの値を1ずつ増加させることを特徴とする
請求項1又は2記載のデータ処理装置。
4. The central processing unit is provided with a pulse counting register for counting a specific number of pulses, and the selecting means indicates that the request signal input from the outside indicates the counting of the specific number of pulses. 3. The data processing device according to claim 1, wherein the value of the pulse count register is increased by one in each case.
【請求項5】上記実行命令保管手段の特定実行命令は、
特定命令が転送を示す場合には、メモリの内容を読み込
むためのメモリリード命令又はメモリに書き込むための
メモリライト命令からなっていることを特徴とする請求
項1又は2記載のデータ処理装置。
5. The specific execution instruction of the execution instruction storage means,
3. The data processing apparatus according to claim 1, wherein when the specific instruction indicates transfer, the data processing apparatus comprises a memory read instruction for reading the contents of the memory or a memory write instruction for writing to the memory.
【請求項6】上記選択手段は、上記実行命令保管手段の
特定実行命令によりメモリリード命令又はメモリライト
命令を実行させるときには、メモリリード命令によって
読み込んだ値をレジスタに書き込むことなく、メモリラ
イト命令でデータバスをハイインピーダンスにさせるこ
とを特徴とする請求項5記載のデータ処理装置。
6. When the memory read instruction or the memory write instruction is executed by the specific execution instruction of the execution instruction storage means, the selecting means does not write the value read by the memory read instruction to the register, but executes the memory write instruction. 6. The data processing device according to claim 5, wherein the data bus is set to a high impedance.
JP8248166A 1996-09-19 1996-09-19 Data processor Pending JPH1097441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8248166A JPH1097441A (en) 1996-09-19 1996-09-19 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8248166A JPH1097441A (en) 1996-09-19 1996-09-19 Data processor

Publications (1)

Publication Number Publication Date
JPH1097441A true JPH1097441A (en) 1998-04-14

Family

ID=17174206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8248166A Pending JPH1097441A (en) 1996-09-19 1996-09-19 Data processor

Country Status (1)

Country Link
JP (1) JPH1097441A (en)

Similar Documents

Publication Publication Date Title
US4648034A (en) Busy signal interface between master and slave processors in a computer system
US5481734A (en) Data processor having 2n bits width data bus for context switching function
US6959367B2 (en) System having read-modify-write unit
KR100335785B1 (en) Execution of data processing instructions
JP3226055B2 (en) Information processing device
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
US5572667A (en) Interrupt processing device for controlling the timing of an interrupt signal initiated by a debugging break point in an instruction code
JP4965638B2 (en) System and method for controlling task switching
EP0418621A2 (en) Data processing device for maintaining coherency of data stored in main memory, external cache memory and internal cache memory
US6757809B1 (en) Data processor having 2n bits width data bus for context switching functions
US6401191B1 (en) System and method for remotely executing code
US5938758A (en) Microprocessor having function of prefetching instruction
JPS62179033A (en) Ic microprocessor
US5586336A (en) Microcomputer capable of monitoring internal resources from external
US5421026A (en) Data processor for processing instruction after conditional branch instruction at high speed
JPH1097441A (en) Data processor
JPH08249175A (en) Method and apparatus for selective support of nonarchitectural instruction at inside of superscalar processor device
JP2504191B2 (en) Microprocessor
JP2808757B2 (en) Microprocessor for debugging
JPH11143732A (en) Microcomputer and emulator
JP3097602B2 (en) Data processing device
US7124281B1 (en) Processing system having sequential address indicator signals
KR100376639B1 (en) Memory data access structure and method suitable for use in a processor
JPH04162135A (en) Data processor
JPH02242337A (en) Instruction pre-fetch device