JP3182287B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP3182287B2
JP3182287B2 JP05919694A JP5919694A JP3182287B2 JP 3182287 B2 JP3182287 B2 JP 3182287B2 JP 05919694 A JP05919694 A JP 05919694A JP 5919694 A JP5919694 A JP 5919694A JP 3182287 B2 JP3182287 B2 JP 3182287B2
Authority
JP
Japan
Prior art keywords
register
memory
debug
data
program
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
JP05919694A
Other languages
Japanese (ja)
Other versions
JPH07271630A (en
Inventor
秀紀 大橋
高志 内野
隆 黒田
昭 吉田
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP05919694A priority Critical patent/JP3182287B2/en
Publication of JPH07271630A publication Critical patent/JPH07271630A/en
Application granted granted Critical
Publication of JP3182287B2 publication Critical patent/JP3182287B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサの
デバッグレジスタ、メモリ間のデータ転送に際して、デ
バッグ時に斯かるレジスタ、メモリの切換制御を行なう
ディジタルシグナルプロセッサ(以下DSPという。)
等のマイクロプロセッサのレジスタ/メモリ切換制御装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital signal processor (hereinafter referred to as a DSP) for controlling the switching of such registers and memories during debugging when transferring data between debug registers and memories of a microprocessor.
And a register / memory switching control device for a microprocessor.

【0002】[0002]

【従来の技術】半導体技術、マイクロプロセッサアーキ
テクチャなどの進歩により、プロセッサのメモリ空間を
プログラムメモリ空間とデータメモリ空間に分割し、命
令実行の高速化を図るハーバードアーキテクチャを採用
したRISCプロセッサ、DSP等の実用化が進んでい
る。
2. Description of the Related Art Due to advances in semiconductor technology and microprocessor architecture, the memory space of a processor is divided into a program memory space and a data memory space, and RISC processors, DSPs and the like adopting a Harvard architecture for speeding up instruction execution. Practical use is progressing.

【0003】斯かるDSPで行う信号処理は、アナログ
処理に比較して高精度処理が可能であり、またパラメー
タの設定によりフィルタ特性などの任意の特性が安定し
て均一に得られ、さらにDSPの使用により、アナログ
構成に比べて部品の精度に起因する微調整を行うことが
不要である、などの特徴を有しており、近年様々な分野
で急速に普及が進んでいる。このDSPの応用分野とし
ては、音声、通信、計測、画像、音響等のディジタル信
号処理の幅広い分野において利用されている。
[0003] The signal processing performed by such a DSP can perform high-precision processing as compared with analog processing. In addition, arbitrary characteristics such as filter characteristics can be stably and uniformly obtained by setting parameters. It has the feature that it is not necessary to make fine adjustments due to the accuracy of parts as compared with the analog configuration, and has been rapidly spreading in various fields in recent years. As an application field of this DSP, it is used in a wide field of digital signal processing such as voice, communication, measurement, image, and sound.

【0004】図4は、従来のマイクロプロセッサの概略
構成図である。
FIG. 4 is a schematic configuration diagram of a conventional microprocessor.

【0005】図4において、1は次に実行するプログラ
ムのアドレスが格納されているプログラムカウンタ、2
は演算用プログラムの命令コードなどが格納されている
プログラムメモリ、3はプログラムメモリ2に格納され
ている命令コードを一時的に読み込んで格納しておくイ
ンストラクションレジスタ、4はインストラクションレ
ジスタ3に格納されている命令コードを解読するインス
トラクションデコーダ、5はイミディエートデータが格
納されているイミディエートデータレジスタ、6は演算
に必要なデータ、演算途中結果、或るいは演算最終結果
からなる演算データが格納されているデータメモリ、7
はデータメモリ6におけるデータのリード/ライトの際
のアドレスを指定するアドレスレジスタ、8はインスト
ラクションデコーダ4で解読された命令コードにしたが
って、データメモリ6の演算データを用い乍ら、演算処
理を実行する演算部、9はインストラクションデコーダ
4にて解読された命令にしたがってデータバスを介して
送出されてくる演算データを格納するデータレジスタ、
10は演算部8にて行われた演算結果を累算格納するア
キュムレータである。
In FIG. 4, reference numeral 1 denotes a program counter in which the address of the next program to be executed is stored;
Is an instruction register for temporarily reading and storing an instruction code stored in the program memory 2, and 4 is an instruction register for temporarily storing an instruction code stored in the program memory 2. An instruction decoder for decoding an instruction code stored therein; 5, an immediate data register for storing immediate data; 6, data for storing data required for calculation, a result during calculation, or a calculation result including a final result of calculation. Memory, 7
Is an address register for designating an address at the time of data read / write in the data memory 6, and 8 is for executing arithmetic processing according to the instruction code decoded by the instruction decoder 4 while using the arithmetic data of the data memory 6. An operation unit 9 for storing operation data transmitted via a data bus in accordance with an instruction decoded by the instruction decoder 4;
Reference numeral 10 denotes an accumulator that accumulates and stores the operation results performed by the operation unit 8.

【0006】11はデバッグの対象となるプログラム
(例えば、演算用のプログラムが該当する。)のデバッ
グ時に、プログラムカウンタ1のアドレス、又はアドレ
スレジスタ7、データレジスタ9、或るいはアキュムレ
ータ10の演算データを一時的に格納しておくデバッグ
レジスタであり、このデバッグレジスタ11に格納され
ているアドレス、又は演算データは外部インターフェー
ス(図示せず)を介して、デバッグ用処理装置(図示せ
ず)に送出される。
Reference numeral 11 denotes the address of the program counter 1 or the operation data of the address register 7, the data register 9, or the accumulator 10 when debugging a program to be debugged (for example, an operation program). Is temporarily stored in the debug register 11, and the address or operation data stored in the debug register 11 is transmitted to a debug processing device (not shown) via an external interface (not shown). Is done.

【0007】上述の構成に於いて、プログラムカウンタ
1のアドレスは、図示しないクロックの立ち上がりに同
期し乍ら、次に実行される命令が格納されているプログ
ラムメモリ2のアドレスを生成する。
In the above configuration, the address of the program counter 1 generates an address of the program memory 2 in which an instruction to be executed next is stored in synchronization with the rising of a clock (not shown).

【0008】このプログラムカウンタ1のアドレスにし
たがって、演算用プログラムの命令コードがプログラム
メモリ2からインストラクションレジスタ3に送出さ
れ、インストラクションレジスタ3は斯かる命令コード
をロードし、その命令コードはインストラクションデコ
ーダ4、及びイミディエ−トデータレジスタ5に送出さ
れる。
In accordance with the address of the program counter 1, the instruction code of the operation program is sent from the program memory 2 to the instruction register 3, and the instruction register 3 loads the instruction code. And to the immediate data register 5.

【0009】次に、インストラクションデコーダ4はア
ドレスレジスタ7に対してアドレスのインクリメント、
或るいはデクリメント等の制御指令を送出する。これに
したがって、アドレスレジスタ7からアドレスデータが
送出され、このアドレスデータに対応するデータメモリ
6のデータが読み出された後、そのデータはデータバス
を介してデータレジスタ9等に送出される。
Next, the instruction decoder 4 increments the address of the address register 7 by
Alternatively, a control command such as decrement is transmitted. In accordance with this, the address data is transmitted from the address register 7, and after the data in the data memory 6 corresponding to the address data is read, the data is transmitted to the data register 9 and the like via the data bus.

【0010】一方、演算部8はデータレジスタ9に格納
されている演算データを用いて演算処理を行ない、この
処理結果はアキュムレータ10に一時的に格納された
後、データメモリ6に適宜送出・格納される。
On the other hand, the arithmetic unit 8 performs arithmetic processing using the arithmetic data stored in the data register 9, and the processing result is temporarily stored in the accumulator 10 and then transmitted and stored in the data memory 6 as appropriate. Is done.

【0011】更に、演算処理を続ける場合には、データ
メモリ6に格納されている演算データはデータレジスタ
9に送出され、演算部8はこの演算データを用い乍ら、
演算処理を続けて行ない、このときの演算最終結果はア
キュムレータ10からデータメモリ6に格納されること
によって、一連の演算処理を終了する。
Further, when the arithmetic processing is to be continued, the arithmetic data stored in the data memory 6 is sent to the data register 9, and the arithmetic unit 8 uses this arithmetic data,
The arithmetic processing is continued, and the final result of the arithmetic operation at this time is stored in the data memory 6 from the accumulator 10, thereby ending a series of arithmetic processing.

【0012】ところで、プログラムメモリ2に格納され
ている演算用プログラムは誤りを有することがあり、こ
の誤りを捜し出し、修正(以下デバッグという)するに
は演算部8での演算処理を一時的に中断し、そのときの
プログラムカウンタ1のアドレス、又はアドレスレジス
タ7、データレジスタ9、或るいはアキュムレータ10
の演算データをデバッグレジスタ11に送出し、このデ
バッグレジスタ11から外部インターフェースを介し
て、ディスプレイを有するデバッグ用処理装置に送出
し、デバッグ作業を行なうことができる。
By the way, the arithmetic program stored in the program memory 2 may have an error. In order to find out and correct the error (hereinafter referred to as debugging), the arithmetic processing in the arithmetic unit 8 is temporarily interrupted. At that time, the address of the program counter 1 or the address register 7, the data register 9, or the accumulator 10
Is sent to the debug register 11 and is sent from the debug register 11 to a debug processing device having a display via an external interface, so that debugging can be performed.

【0013】ここで、通常プログラムバスのビット幅に
は制限があり、図5(a)に示すように斯かるプログラ
ムバス、例えばプログラムメモリ2乃至インストラクシ
ョンレジスタ3、インストラクションレジスタ3乃至イ
ンストラクションレコーダ4のビット幅を16ビットと
すると、プログラムの最初の6ビットにはアキュムレー
タ10に格納されているデータをデバッグレジスタ11
に転送するためのデバッグ用の命令(オペコード)が配
され、次の5ビットにはそのデータの転送元レジスタ、
即ちアキュムレータ10を示すコードが配され、更に次
の5ビットにはそのデータの転送先レジスタ、即ちデバ
ッグレジスタ11を示すコードが配されるようになって
いる。
Here, the bit width of the normal program bus is limited, and as shown in FIG. 5A, such a program bus, for example, the bits of the program memory 2 to the instruction register 3 and the bits of the instruction register 3 to the instruction recorder 4 are used. Assuming that the width is 16 bits, the data stored in the accumulator 10 is stored in the first 6 bits of the program in the debug register 11.
A debugging instruction (opcode) for transferring the data is provided, and the next five bits are a transfer source register of the data,
That is, a code indicating the accumulator 10 is arranged, and a code indicating a transfer destination register of the data, that is, a debug register 11 is arranged in the next 5 bits.

【0014】而して、演算用プログラムのデバッグの際
に演算データ、又はプログラムカウンタ1のアドレスを
デバッグレジスタ11に送出するためには、デバッグ用
の命令と共に、プログラムカウンタ1、アドレスレジス
タ7、データレジスタ9、アキュムレータ10、及びデ
バッグレジスタ11を示すコードをデバッグ用処理装置
から外部インターフェースを介してデバッグレジスタ1
1に送出し、この後そのデバッグ用の命令はデータバス
を介してプログラムメモリ2に送出される。
In order to send the operation data or the address of the program counter 1 to the debug register 11 when debugging the operation program, the program counter 1, address register 7, data Codes indicating the register 9, the accumulator 10, and the debug register 11 are transferred from the debug processing device to the debug register 1 via an external interface.
1 and then the debugging instruction is sent to the program memory 2 via the data bus.

【0015】斯かるデバッグ用の命令はインストラクシ
ョンレジスタ3に送出され、インストラクションレジス
タ3は斯かる命令をロードし、その命令コードはインス
トラクションデコーダ4に送出され、このインストラク
ションデコーダ4は図5(a)に示す転送元レジスタを
示すコードをプログラムカウンタ1、アドレスレジスタ
7、データレジスタ9、及びアキュムレータ10に、ま
た転送先レジスタを示すコードをデバッグレジスタ11
に夫々送出する結果、プログラムカウンタ1のアドレ
ス、又はアドレスレジスタ7、データレジスタ9、アキ
ュムレータ10の演算データはデバッグレジスタ11に
送出された後、外部インターフェースを介してデバッグ
用処理装置に送出されることになる。
The instruction for debugging is sent to the instruction register 3, the instruction register 3 loads the instruction, and the instruction code is sent to the instruction decoder 4. The instruction decoder 4 shown in FIG. The code indicating the transfer source register is stored in the program counter 1, the address register 7, the data register 9, and the accumulator 10, and the code indicating the transfer destination register is stored in the debug register 11.
As a result, the address of the program counter 1 or the operation data of the address register 7, the data register 9, and the accumulator 10 is transmitted to the debug register 11 and then transmitted to the debug processing device via the external interface. become.

【0016】[0016]

【発明が解決しようとする課題】然し乍ら、デバッグ用
の命令はプログラム、或るいはシステムソフトウエアの
デバッグ時しか使用されず、通常ユーザは使用しないに
も拘らず、上述の如くデバッグ用の命令、転送元レジス
タ、及び転送先レジスタを示すコードをデータバス、及
びプログラムバスを通じて、プログラムカウンタ1、ア
ドレスレジスタ7、データレジスタ9、アキュムレータ
10、及びデバッグレジスタ11に送出しなければなら
ない。
However, debugging instructions are used only when debugging a program or system software, and are usually not used by a user. The codes indicating the transfer source register and the transfer destination register must be sent to the program counter 1, the address register 7, the data register 9, the accumulator 10, and the debug register 11 via the data bus and the program bus.

【0017】このため、プログラムバスのビット幅のう
ち、転送元レジスタ、及び転送先レジスタを示すコード
だけで16ビットのうち10ビットを占めることになっ
ており、これに伴ってデバッグ用命令以外の命令(オペ
コード)をユーザが実行するに際してプログラムバスに
演算等のオペコードを有効にプログラムバスに配するこ
とができていなかった。
For this reason, in the bit width of the program bus, only the codes indicating the transfer source register and the transfer destination register occupy 10 bits out of the 16 bits. When a user executes an instruction (opcode), an opcode for operation or the like cannot be effectively allocated to the program bus.

【0018】[0018]

【0019】本発明のマイクロプロセッサは、次に実行
するプログラムのアドレスが格納されているプログラム
カウンタと、演算データを格納するレジスタと、デバッ
グ時、上記プログラムカウンタから転送されてくるアド
レス、又は上記レジスタから転送されてくる演算データ
を格納するデバッグレジスタと、上記演算データを格納
すると共に、デバッグ時、該デバッグレジスタを介して
送出されてくるデバッグ用プログラムを格納するメモリ
と、該メモリから送出されるデバッグ用プログラムの命
令を解読するインストラクションデコーダと、該インス
トラクションデコーダからの命令にしたがって、上記レ
ジスタに格納された演算データに基づいて演算を行なう
演算部と、デバッグ開始時、上記デバッグレジスタが上
記プログラムカウンタから転送されてくるアドレス、上
記レジスタから転送されてくる演算データを格納するべ
く、上記インストラクションデコーダからのレジスタ/
メモリ切換信号を受けて、上記デバッグレジスタにライ
ト信号を送出し、一方演算開始時、上記メモリが上記プ
ログラムカウンタから転送されてくるアドレス、上記レ
ジスタから転送されてくる演算データを格納するべく、
上記インストラクションデコーダからのレジスタ/メモ
リ切換信号を受けて、上記メモリにライト信号を送出す
るレジスタ/メモリ切換制御部と、を具備し、上記メモ
リから送出される命令のビット配分は、上記演算データ
のリード/ライト信号の他に、上記レジスタ、或るいは
デバッグレジスタの転送元、又は転送先を示すコードか
ら構成されていることを特徴とする。
The microprocessor according to the present invention comprises a program counter storing an address of a program to be executed next, a register storing operation data, an address transferred from the program counter during debugging, or the register A debug register for storing the operation data transferred from the memory, a memory for storing the operation data, and a debug program transmitted through the debug register during debugging, and a memory for storing the debug data transmitted from the memory. An instruction decoder for decoding instructions of the debug program; an operation unit for performing an operation based on the operation data stored in the register in accordance with the instruction from the instruction decoder; Address transferred from the data, in order to store the operation data which is transferred from the register, the register from the instruction decoder /
In response to the memory switching signal, a write signal is sent to the debug register. On the other hand, at the start of the operation, the memory stores the address transferred from the program counter and the operation data transferred from the register.
A register / memory switching control unit for receiving a register / memory switching signal from the instruction decoder and transmitting a write signal to the memory, wherein a bit distribution of an instruction transmitted from the memory is In addition to the read / write signal, it is characterized by comprising a code indicating a transfer source or a transfer destination of the register or the debug register.

【0020】[0020]

【作用】デバッグ/メモリ切換制御部は、デバッグ時に
デバッグレジスタを選択することによって、演算処理途
中での中断以前の演算データ、又はプログラムカウンタ
のアドレスをデバッグレジスタを介して、デバッグ用処
理装置に送出する。
The debug / memory switching control unit selects the debug register at the time of debugging, and sends the operation data before the interruption during the arithmetic processing or the address of the program counter to the debug processing device via the debug register. I do.

【0021】一方、デバッグ終了時には、プログラムカ
ウンタのアドレスをプログラムカウンタに戻すと共に、
デバッグレジスタを介して演算用プログラムをメモリに
送出すると共に、デバッグ/メモリ切換制御部は上記メ
モリを選択することによって、演算処理途中での中断以
降の演算データを上記メモリに書き込む。
On the other hand, at the end of debugging, the address of the program counter is returned to the program counter,
The operation program is sent to the memory via the debug register, and the debug / memory switching control unit selects the memory to write the operation data after the interruption during the operation processing to the memory.

【0022】[0022]

【実施例】本発明の実施例を図1乃至図5に基づいて説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to FIGS.

【0023】図1は本発明のデバッグ時におけるレジス
タ/メモリ切換制御部を含むマイクロプロセッサの概略
構成図である。尚、図1において、従来例の図4と同一
機能を有するものについては、同一番号を付し、その説
明は省略し、以下の実施例ではデータバス、及びプログ
ラムバスのビット幅は従来例と同様に16ビットである
ものとする。
FIG. 1 is a schematic block diagram of a microprocessor including a register / memory switching control unit during debugging according to the present invention. In FIG. 1, components having the same functions as those in FIG. 4 of the conventional example are denoted by the same reference numerals, and the description thereof is omitted. Similarly, it is 16 bits.

【0024】ここで、本発明の構成が従来のそれと異な
る第1の点は、通常の演算処理時にデータメモリ6に送
出される演算データ、又はプログラムカウンタ1のアド
レスが、デバッグ時にデバッグレジスタ11に送出され
るようにデバッグレジスタ11を選択し、一方デバッグ
終了後に演算部8で演算された際の演算結果等がデータ
メモリ6に送出されるようにデータメモリ6を選択する
よう切り換えを行なうレジスタ/メモリ切換制御部12
を、インストラクションデコーダ4とデータメモリ6、
及びデバッグレジスタ11との間に設けたことである。
Here, the first point in which the configuration of the present invention is different from that of the prior art is that the operation data sent to the data memory 6 during normal operation processing or the address of the program counter 1 is stored in the debug register 11 during debugging. The debug register 11 is selected so as to be transmitted, while the register / switch is performed so as to select the data memory 6 so that the operation result or the like when the operation is performed by the operation unit 8 after the end of debugging is transmitted to the data memory 6. Memory switching control unit 12
With the instruction decoder 4 and the data memory 6,
And the debug register 11.

【0025】一方、図5(b)は本発明における、プロ
グラムメモリ2に接続されているプログラムバスのビッ
ト配分を表しており、本発明の構成が従来のそれと異な
る第2の点は、プログラムバスの全ビット幅を1ビット
のデータのリード/ライト信号の他に、転送元レジス
タ、又は転送先レジスタのうち一方の転送対象レジスタ
を示す5ビットのコードを指定するように配分したこと
である。これに伴って、デバッグ時、或るいは演算実行
時に拘らず、プログラムバスの全ビット幅のうち、演算
実行時のオペコードに使用されるビット幅が制限される
ことがなくなり、プログラムバスのビット幅を有効的に
使用することができるようになった。
On the other hand, FIG. 5B shows the bit allocation of the program bus connected to the program memory 2 in the present invention. Is allocated so as to designate a 5-bit code indicating one of the transfer source register and the transfer destination register in addition to the 1-bit data read / write signal. Along with this, the bit width used for the operation code at the time of execution of the operation is not restricted among the total bit width of the program bus regardless of the time of debugging or the time of execution of the operation. Can be used effectively.

【0026】以下に本発明のマイクロプロセッサのデバ
ッグ時、或るいはデバッグ終了後におけるレジスタ/メ
モリ切換制御部12を実行して、デバッグレジスタ/メ
モリ間でデータ転送を行なう際の動作説明を行なう。
The operation of the register / memory switching control unit 12 at the time of debugging of the microprocessor of the present invention or after the debugging is completed to transfer data between the debug register / memory will be described below.

【0027】尚、演算実行によって得られた演算データ
はアドレスレジスタ7、データレジスタ9、又はアキュ
ムレータ10に格納されることになっているが、斯かる
格納処理手順は従来例と同様であるので、以下にはプロ
グラムカウンタ1のアドレス、アドレスレジスタ7、デ
ータレジスタ9、及びアキュムレータ10に格納されて
いる演算データをデバッグレジスタ11に転送する以降
の処理について説明する。
The operation data obtained by execution of the operation is to be stored in the address register 7, the data register 9, or the accumulator 10. However, since such a storage processing procedure is the same as the conventional example, In the following, a description will be given of processing after transferring the address of the program counter 1, the address register 7, the data register 9, and the operation data stored in the accumulator 10 to the debug register 11.

【0028】まず、デバッグに際して、デバッグ用処理
装置は外部インターフェースを介してデバッグレジスタ
11にデバッグ用プログラムを送出し、この後そのデバ
ッグ用プログラムはデータバスを介してプログラムメモ
リ2に送出され、これによってプログラムメモリ2には
デバッグ用プログラムが格納される。
First, at the time of debugging, the debugging processor sends a debugging program to the debugging register 11 via the external interface, and then sends the debugging program to the program memory 2 via the data bus. The program memory 2 stores a debugging program.

【0029】斯かるデバッグ用プログラムの命令コード
は、インストラクションレジスタ3に送出され、このイ
ンストラクションレジスタ3は斯かる命令コードをロー
ドし、その命令コードはインストラクションデコーダ4
に送出される。
The instruction code of the debugging program is sent to an instruction register 3, which loads the instruction code, and the instruction code is stored in an instruction decoder 4.
Sent to

【0030】インストラクションデコーダ4はアキュム
レータ10、データレジスタ9、アドレスレジスタ7、
及びプログラムカウンタ1に対してリード信号を送出す
ると共に、レジスタ/メモリ切換制御部12にレジスタ
/メモリ切換信号を送出する。
The instruction decoder 4 includes an accumulator 10, a data register 9, an address register 7,
And a read signal to the program counter 1 and a register / memory switching signal to the register / memory switching control unit 12.

【0031】これによって、レジスタ/メモリ切換制御
部12はデバッグレジスタ11にライト信号を送出する
ことによって、プログラムカウンタ1のアドレス、又は
アドレスレジスタ7、データレジスタ9、或るいはアキ
ュムレータ10の演算データはデータバスを介してデバ
ッグレジスタ11に送出・格納される。
Thus, the register / memory switching control unit 12 sends a write signal to the debug register 11 so that the address of the program counter 1 or the operation data of the address register 7, the data register 9, or the accumulator 10 is changed. The data is sent to and stored in the debug register 11 via the data bus.

【0032】ここで、デバッグレジスタ11に格納され
ているアドレス、及び演算データは外部インターフェー
スを介してデバッグ用処理装置に送出され、デバッグ作
業を行なうことができる。
Here, the address and the operation data stored in the debug register 11 are sent to the debug processing device via the external interface, so that the debug operation can be performed.

【0033】このデバッグ作業が終了すると、インスト
ラクションデコーダ4はレジスタ/メモリ切換制御部1
2に対してリード信号を送出し、これによってレジスタ
/メモリ切換制御部12はデバッグレジスタ11にリー
ド信号を送出することによって、先程演算を中断した際
のアドレスをプログラムカウンタ1に送出すると共に、
プログラムメモリ2にはデバッグ用処理装置からデバッ
グレジスタ11を介して、演算用プログラムが送出され
る。
When the debugging operation is completed, the instruction decoder 4 sets the register / memory switching control unit 1
2, the register / memory switching control unit 12 sends the read signal to the debug register 11 to send the address when the operation was interrupted earlier to the program counter 1,
An arithmetic program is sent to the program memory 2 from the debug processing device via the debug register 11.

【0034】而して、インストラクションデコーダ4は
レジスタ/メモリ切換制御部12にレジスタ/メモリ切
換信号を送出し、データメモリ6を選択すると共に、ア
ドレスレジスタ7にライト信号を送出する。アドレスレ
ジスタ7はデータメモリ6にアドレス信号を送出すると
共に、レジスタ/メモリ切換制御部12はデータメモリ
6にライト信号を送出する。これによって、アキュムレ
ータ10に格納されている演算データはこれ以降データ
メモリ6に格納されることになる。
Thus, the instruction decoder 4 sends a register / memory switching signal to the register / memory switching control unit 12, selects the data memory 6, and sends a write signal to the address register 7. The address register 7 sends an address signal to the data memory 6, and the register / memory switching control unit 12 sends a write signal to the data memory 6. As a result, the operation data stored in the accumulator 10 is stored in the data memory 6 thereafter.

【0035】斯くして、演算部8は中断された演算処理
を継続して行なうことができ、この後デバッグ用処理装
置から再度デバッグ処理の指示があると、プログラムカ
ウンタ1、アドレスレジスタ7、データレジスタ9、及
びアキュムレータ10からデバッグレジスタ11に再度
アドレス、及び演算データを送出し、上述のデバッグ処
理を繰り返し行なう。
In this way, the arithmetic unit 8 can continue the interrupted arithmetic processing, and when the debug processing unit issues an instruction for the debug processing again, the program counter 1, the address register 7, the data register The address and the operation data are transmitted again from the register 9 and the accumulator 10 to the debug register 11, and the above-described debug processing is repeatedly performed.

【0036】ところで、図2はレジスタ/メモリ切換制
御部12の回路図の一例、図3(a)はREGSET
(デバッグレジスタ11のセット信号)、及びREGR
ST(デバッグレジスタ11のリセット信号)における
DFFのREGSEL(デバッグレジスタ11の選択信
号)の論理値を示す図、図3(b)はMWR(データメ
モリ6のライト信号)、及びREGSEL信号における
REGWR(デバッグレジスタ11のライト信号)、及
びMEMWR(データメモリ6のライト信号)の論理値
を示す図であり、斯かる図はデバッグレジスタ11、又
はデータメモリ6への書き込みに際して使用され、アク
ティブローで駆動するものとする。また、図3(c)は
MRD(データメモリ6のリード信号)、及びREGS
EL信号におけるREGRD(デバッグレジスタ11の
リード信号)、及びMEMRD(データメモリ6のリー
ド信号)の論理値を示す図であり、斯かる図はデバッグ
レジスタ11、又はデータメモリ6の読み出しに際して
使用され、アクティブローで駆動するものとする。
FIG. 2 is an example of a circuit diagram of the register / memory switching control unit 12, and FIG.
(Set signal of debug register 11), and REGR
FIG. 3B shows a logical value of REGSEL (selection signal of debug register 11) of DFF in ST (reset signal of debug register 11), and FIG. 3B shows MWR (write signal of data memory 6) and REGWR (REGWR signal in REGSEL signal). FIG. 4 is a diagram showing logical values of a debug register 11 (write signal of the data memory 6) and MEMWR (write signal of the data memory 6). These diagrams are used when writing to the debug register 11 or the data memory 6, and are driven by active low. It shall be. FIG. 3C shows MRD (read signal of data memory 6) and REGS.
It is a figure which shows the logical value of REGRD (read signal of the debug register 11) and MEMRD (read signal of the data memory 6) in an EL signal. Such a figure is used at the time of reading of the debug register 11 or the data memory 6, It shall be driven by active low.

【0037】ここで、図2に示す信号線と図1に示す信
号線との対応を説明すると、図2のREGSET、及び
REGRSTは図1のインストラクションデコーダ4か
らレジスタ/メモリ切換制御部12に接続されているレ
ジスタ/メモリ切換信号に対応し、MWR、及びMRD
は図1のインストラクションデコーダ4からレジスタ/
メモリ切換制御部12に接続されているリード/ライト
信号に対応している。
Here, the correspondence between the signal lines shown in FIG. 2 and the signal lines shown in FIG. 1 will be described. REGSET and REGRST in FIG. 2 are connected from the instruction decoder 4 in FIG. MWR and MRD corresponding to the register / memory switching signal
Is the register / from the instruction decoder 4 in FIG.
This corresponds to a read / write signal connected to the memory switching control unit 12.

【0038】一方、図2のREGWR、及びREGRD
は図1のデバッグ/メモリ切換制御部12からデバッグ
レジスタ11に接続されているリード/ライト信号に対
応し、MEMWR、及びMEMRDは図1のデバッグ/
メモリ切換制御部12からデータメモリ6に接続されて
いるリード/ライト信号に対応している。
On the other hand, REGWR and REGRD of FIG.
1 corresponds to the read / write signal connected to the debug register 11 from the debug / memory switching control unit 12 in FIG. 1, and MEMWR and MEMRD are the debug / memory signals in FIG.
This corresponds to a read / write signal connected to the data memory 6 from the memory switching control unit 12.

【0039】而して、上記REGSET、及びREGR
ST信号は最終的にOR1〜OR4回路のA1端子に夫
々接続され、またMWR信号はOR1、及びOR2回路
のA2端子に夫々接続され、更にMRD信号はOR3、
及びOR4回路のA2端子に夫々接続されている。
Thus, the above REGSET and REGR
The ST signal is finally connected to the A1 terminals of the OR1 to OR4 circuits, the MWR signal is connected to the A2 terminals of the OR1 and OR2 circuits, respectively, and the MRD signal is connected to the OR3,
And the A2 terminal of the OR4 circuit.

【0040】斯かる図2の構成において、デバッグ/メ
モリ切換制御部12がデバッグレジスタ11を選択する
に際しては、図3(b)の第2段目の信号、即ちMWR
が「0」、REGSELが「1」のときREGWRは
「0」となり、これによってデバッグレジスタ11への
書き込みが可能になる。これと共に、図3(c)の第1
段目の信号、即ちMRDが「0」、REGSEL「0」
のときMEMRD「0」となり、これによってデータメ
モリ6の演算データの読み出しが可能となる。
In the configuration of FIG. 2, when the debug / memory switching control unit 12 selects the debug register 11, the signal of the second stage in FIG.
Is "0" and REGSEL is "1", REGWR becomes "0", which enables writing to the debug register 11. At the same time, the first of FIG.
The signal of the stage, that is, MRD is “0”, REGSEL “0”
At this time, the MEMRD becomes "0", which makes it possible to read the operation data from the data memory 6.

【0041】一方、図2の構成において、デバッグ/メ
モリ切換制御部12がデータメモリ6を選択するに際し
ては、図3(b)の第1段目の信号、即ちMWRが
「0」、REGSELが「0」のときMEMWRは
「0」となり、これによってデータメモリ6への書き込
みが可能となり、これ以降演算部8での演算処理結果は
データメモリ6へ送出される。これと共に、中断された
演算処理を演算部8で継続して行なうために、図3
(c)の第2段目の信号、即ちMRDが「0」、REG
SELが「1」のときREGRDは「0」となり、これ
によってデバッグレジスタ11に格納されているデータ
の読み出しが可能となり、読み出されたデバッグレジス
タ11のアドレスはプログラムカウンタ1に、またデバ
ッグレジスタ11の演算用プログラムはプログラムメモ
リ2に夫々戻される。
On the other hand, in the configuration of FIG. 2, when the debug / memory switching control unit 12 selects the data memory 6, the signal of the first stage in FIG. 3B, that is, MWR is "0" and REGSEL is When it is "0", the MEMWR becomes "0", whereby writing to the data memory 6 becomes possible. Thereafter, the result of the arithmetic processing in the arithmetic unit 8 is sent to the data memory 6. At the same time, in order to continue the interrupted arithmetic processing by the arithmetic unit 8, FIG.
The signal of the second stage of (c), that is, MRD is “0”, REG
When SEL is “1”, REGRD becomes “0”, whereby data stored in the debug register 11 can be read. The read address of the debug register 11 is stored in the program counter 1 and in the debug register 11. Are returned to the program memory 2 respectively.

【0042】上述の如く、デバッグ/メモリ切換制御部
12は、デバッグ時にデバッグレジスタ11を選択する
ことによって、演算処理途中での中断以前の演算処理結
果等はデバッグレジスタ11を介して、デバッグ用処理
装置に送出され、一方デバッグ終了時にはデータメモリ
6を選択することによって、演算処理途中での中断以降
の演算処理結果等はデータメモリ6に書き込むことがで
きると共に、それまでデバッグレジスタ11に格納され
ているプログラムカウンタ1のアドレス、及び演算用プ
ログラムは夫々元のレジスタに戻されることになる。
As described above, the debug / memory switching control unit 12 selects the debug register 11 at the time of debugging, so that the result of the arithmetic processing before interruption during the arithmetic processing is processed via the debug register 11 for debugging processing. On the other hand, by selecting the data memory 6 at the end of debugging, the result of the arithmetic processing after the interruption during the arithmetic processing can be written into the data memory 6 and stored in the debug register 11 until then. The address of the program counter 1 and the operation program are returned to the original registers.

【0043】ところで、本発明はプログラムバスのビッ
ト幅が16ビットの場合だけには限られず、32ビッ
ト、更には48ビットでも本発明の適用は可能であり、
斯かる場合における図5(b)のプログラムバスの転送
対象レジスタに係るビット配分はプログラムカウンタ
1、アドレスレジスタ7、データレジスタ9、及びアキ
ュムレータ10等の総個数によって決定されることにな
る。
By the way, the present invention is not limited to the case where the bit width of the program bus is 16 bits, but the present invention can be applied to 32 bits, and even 48 bits.
In such a case, the bit allocation of the transfer target register of the program bus in FIG. 5B is determined by the total number of the program counter 1, the address register 7, the data register 9, the accumulator 10, and the like.

【0044】[0044]

【発明の効果】以上の説明で明らかなように、本発明に
よれば、デバッグ時、或るいはデバッグ終了後に、デバ
ッグレジスタ、メモリ間のデータ転送に際して、1ビッ
トのリード/ライト信号の他に、転送元レジスタ、又は
転送先レジスタのうち一方の転送対象レジスタを示すコ
ードを指定するだけで、上述のデバッグレジスタ、メモ
リ間のデータ転送を行えることができる。
As is apparent from the above description, according to the present invention, when data is transferred between a debug register and memory after debugging or after debugging is completed, in addition to the 1-bit read / write signal, The data transfer between the debug register and the memory can be performed only by designating a code indicating one of the transfer target registers of the transfer source register and the transfer destination register.

【0045】更に、デバッグ用命令以外の命令(オペコ
ード)をユーザが実行するに際してプログラムバスの全
ビット幅のうち、オペコードに使用されるビット幅が従
来と比較して大きくなくなるので、演算等のオペコード
を有効にプログラムバスに配することができる。
Further, when the user executes an instruction (opcode) other than the debug instruction, the bit width used for the opcode out of the total bit width of the program bus is smaller than that of the conventional program bus. Can be effectively allocated to the program bus.

【0046】したがって、従来において転送元レジス
タ、及び転送先レジスタを示すコードが2ビット以上で
あれば本発明は顕著な効果を奏することができる。
Therefore, in the related art, if the codes indicating the transfer source register and the transfer destination register are two bits or more, the present invention can provide a remarkable effect.

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

【図1】本発明のレジスタ/メモリ切換制御装置を含む
マイクロプロセッサの概略構成図である。
FIG. 1 is a schematic configuration diagram of a microprocessor including a register / memory switching control device of the present invention.

【図2】図1に示すレジスタ/メモリ切換制御部の回路
図である。
FIG. 2 is a circuit diagram of a register / memory switching control unit shown in FIG.

【図3】図2に示すレジスタ/メモリ切換制御部の論理
値を示す図である。
FIG. 3 is a diagram showing logical values of a register / memory switching control unit shown in FIG. 2;

【図4】従来のマイクロプロセッサの概略構成図であ
る。
FIG. 4 is a schematic configuration diagram of a conventional microprocessor.

【図5】従来、及び本発明に係るバスのビット配分を表
す概念図である。
FIG. 5 is a conceptual diagram illustrating bit allocation of a bus according to the related art and the present invention.

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

1 プログラムカウンタ 2 プログラムメモリ 3 インストラクションレジスタ 4 インストラクションデコーダ 5 イミディエートデータレジスタ 6 データメモリ 7 アドレスレジスタ 8 演算部 9 データレジスタ 10 アキュムレータ 11 デバッグレジスタ 12 レジスタ/メモリ切換制御部 DESCRIPTION OF SYMBOLS 1 Program counter 2 Program memory 3 Instruction register 4 Instruction decoder 5 Immediate data register 6 Data memory 7 Address register 8 Operation part 9 Data register 10 Accumulator 11 Debug register 12 Register / memory switching control part

───────────────────────────────────────────────────── フロントページの続き (72)発明者 吉田 昭 大阪府守口市京阪本通2丁目5番5号 三洋電機株式会社内 (56)参考文献 特開 平4−276822(JP,A) 特開 平5−233347(JP,A) 特開 昭57−109058(JP,A) 特開 平1−144135(JP,A) 特開 平5−233377(JP,A) 特開 昭57−23150(JP,A) 特開 昭62−98437(JP,A) 特開 平1−121945(JP,A) 特開 平2−12436(JP,A) 実開 昭63−9651(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06F 11/28 - 11/36 G06F 9/30 - 9/42 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Akira Yoshida 2-5-5 Keihanhondori, Moriguchi-shi, Osaka Sanyo Electric Co., Ltd. (56) References JP-A-4-276822 (JP, A) JP JP-A-5-233347 (JP, A) JP-A-57-109058 (JP, A) JP-A-1-144135 (JP, A) JP-A-5-233377 (JP, A) JP-A-57-23150 (JP , A) JP-A-62-98437 (JP, A) JP-A-1-121945 (JP, A) JP-A-2-12436 (JP, A) Real opening 63-9651 (JP, U) (58) Field surveyed (Int.Cl. 7 , DB name) G06F 11/28-11/36 G06F 9/30-9/42

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】次に実行するプログラムのアドレスが格納
されているプログラムカウンタと、演算データを格納す
るレジスタと、デバッグ時、上記プログラムカウンタか
ら転送されてくるアドレス、又は上記レジスタから転送
されてくる演算データを格納するデバッグレジスタと、
上記演算データを格納すると共に、デバッグ時、該デバ
ッグレジスタを介して送出されてくるデバッグ用プログ
ラムを格納するメモリと、該メモリから送出されるデバ
ッグ用プログラムの命令を解読するインストラクション
デコーダと、該インストラクションデコーダからの命令
にしたがって、上記レジスタに格納された演算データに
基づいて演算を行なう演算部と、デバッグ開始時、上記
デバッグレジスタが上記プログラムカウンタから転送さ
れてくるアドレス、上記レジスタから転送されてくる演
算データを格納するべく、上記インストラクションデコ
ーダからのレジスタ/メモリ切換信号を受けて、上記デ
バッグレジスタにライト信号を送出し、一方演算開始
時、上記メモリが上記プログラムカウンタから転送され
てくるアドレス、上記レジスタから転送されてくる演算
データを格納するべく、上記インストラクションデコー
ダからのレジスタ/メモリ切換信号を受けて、上記メモ
リにライト信号を送出するレジスタ/メモリ切換制御部
と、を具備し、 上記メモリから送出される命令のビット配分は、上記演
算データのリード/ライト信号の他に、上記レジスタ、
或るいはデバッグレジスタの転送元、又は転送先を示す
コードから構成されていることを特徴とするマイクロプ
ロセッサ
An address of a program to be executed next is stored.
Stores the program counter and operation data
Register and the above program counter when debugging.
From the address transferred from the above or from the above register
A debug register for storing the calculated operation data,
In addition to storing the above operation data, when debugging,
Debug program sent via program register
Memory for storing the RAM and a device transmitted from the memory.
Instructions for decoding the instructions of the programming program
A decoder and an instruction from the instruction decoder
According to the operation data stored in the register
An operation unit that performs an operation based on
The debug register is transferred from the above program counter.
Address received from the above register
Instruction deco
Receiving the register / memory switching signal from the
Sends a write signal to the bag register and starts operation
When the memory is transferred from the program counter
Address, operation transferred from the above register
To store the data,
Receiving the register / memory switching signal from the
Register / memory switching controller for sending write signal to memory
And the bit allocation of the instruction sent from the memory is
In addition to the arithmetic data read / write signal,
Indicates the source or destination of the debug register or transfer
Microprocessor characterized by being composed of code
Rosessa .
【請求項2】上記インストラクションデコーダはデバッ
グ用プログラムの命令にしたがって、上記デバッグレジ
スタに格納されているアドレスを上記プログラムカウン
タに送出すると共に、上記デバッグレジスタを介してデ
バッグの対象となるプログラムを上記メモリに送出し、
この後上記インストラクションデコーダは上記メモリか
ら送出される演算用プログラムの命令を解読して、斯か
る命令を上記デバッグ/メモリ切換制御部に送出し、上
記レジスタ/メモリ切換制御部はデバッグ終了後、上記
インストラクションデコーダからの命令にしたがって、
上記メモリにライト信号を送出し、これによって斯かる
メモリは、上記デバッ グの対象となるプログラムが実行
された際に上記レジスタから転送されてくる演算データ
を格納することを特徴とする請求項1記載のマイクロプ
ロセッサ
2. The method according to claim 1, wherein the instruction decoder is a debugger.
In accordance with the instructions of the
Address in the program counter
Data and send the data through the debug register.
Send the program to be bagged to the above memory,
After that, the instruction decoder is
Decoding the instruction of the operation program sent from the
Instruction to the debug / memory switching control unit, and
After the debug, the register / memory switching control unit
According to the instruction from the instruction decoder,
Sending a write signal to the memory, thereby
Memory, a program is subject to the debug execution
Operation data transferred from the above register when
2. The microcomputer according to claim 1, wherein
Rosessa .
JP05919694A 1994-03-29 1994-03-29 Microprocessor Expired - Fee Related JP3182287B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05919694A JP3182287B2 (en) 1994-03-29 1994-03-29 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05919694A JP3182287B2 (en) 1994-03-29 1994-03-29 Microprocessor

Publications (2)

Publication Number Publication Date
JPH07271630A JPH07271630A (en) 1995-10-20
JP3182287B2 true JP3182287B2 (en) 2001-07-03

Family

ID=13106434

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05919694A Expired - Fee Related JP3182287B2 (en) 1994-03-29 1994-03-29 Microprocessor

Country Status (1)

Country Link
JP (1) JP3182287B2 (en)

Also Published As

Publication number Publication date
JPH07271630A (en) 1995-10-20

Similar Documents

Publication Publication Date Title
EP0554917B1 (en) Digital signal processing system having two instruction memories accessed by a processor under control of host
US4672534A (en) Integrated circuit device incorporating a data processing unit and a ROM storing applications program therein
US4274138A (en) Stored program control system with switching between instruction word systems
JPS63301339A (en) Computer device
US4095268A (en) System for stopping and restarting the operation of a data processor
JP3563768B2 (en) ROM program change device
JPH0447856B2 (en)
JP3182287B2 (en) Microprocessor
JP3380827B2 (en) Emulator device
US6343353B1 (en) Micro-controller unit for accessing external memory using microcode
KR19980054349A (en) Optional automatic setting circuit
JPH08202582A (en) Data transferring device for microprocessor
US6760834B2 (en) Microprocessor for saving contextual data when switching to a test program
KR100658485B1 (en) Microprocessor development system
JP3097602B2 (en) Data processing device
JPH07109589B2 (en) Instruction processing method
US5864691A (en) Central processing unit with a selector that bypasses circuits where processing is not required
JP2604203B2 (en) Debug device for one-chip digital signal processor
JPH1165884A (en) Microcomputer and debugging method therefor
JP3785807B2 (en) Control device
JPH0226252B2 (en)
JPH0876876A (en) Clock supply control circuit of microprocessor
JPS59103153A (en) Data processor
JPH0561717A (en) Program debugging device
JPS6273339A (en) Microprocessor development aided device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090420

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees