JPS59103158A - Debug system of digital signal processing program - Google Patents

Debug system of digital signal processing program

Info

Publication number
JPS59103158A
JPS59103158A JP57212133A JP21213382A JPS59103158A JP S59103158 A JPS59103158 A JP S59103158A JP 57212133 A JP57212133 A JP 57212133A JP 21213382 A JP21213382 A JP 21213382A JP S59103158 A JPS59103158 A JP S59103158A
Authority
JP
Japan
Prior art keywords
program
instruction
debug
dsp
signal processing
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
JP57212133A
Other languages
Japanese (ja)
Inventor
Hirohisa Karibe
雁部 洋久
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57212133A priority Critical patent/JPS59103158A/en
Publication of JPS59103158A publication Critical patent/JPS59103158A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To stop the working of a processor having no halt terminal and to realize the insertion and deletion of a debug branch instruction, by giving twice the output instruction for output register to the end of a branch instruction in case an original program is reset after the end of debug. CONSTITUTION:A subject program of debug is stored in a program memory 1, and the next address is given via a contact A of a switch 6 in response to the decoding result of the preceding instruction of an instruction decoding part 3 of a digital signal processing circuit 9. With this address a new instruction code is given to a DSP main body part 5 and executed. At the same time, a debug processing control part 2 is connected to the memory 1 and an external data processing circuit 7 is connected to an output register 4 of the circuit 9. Then the output instruction for register 4 is given twice to the end of the branch instruction when an original program is reset after the end of debug. Thus the working is stopped for the part 5 having no halt terminal, and the insertion and deletion are possible for the debug branch instruction.

Description

【発明の詳細な説明】 発明の技術分野 本発明はプログラム制御方式のディジタル信号処理回路
(以下D S P (Didital Signal 
Proce−ssor)と略す)におけるプログラムデ
バッグシステムに係り、特にホールト機能を実現するた
めの端子を有しないDSPにおいてもホールト機能を生
じさせて分岐によるデバッグ機能を実現することができ
るディジタル信号処理プログラムデバッグ方式に関する
ものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a program-controlled digital signal processing circuit (hereinafter referred to as DSP).
A digital signal processing program debugging system that can generate a halt function and realize a debug function by branching even in a DSP that does not have a terminal for realizing a halt function. It is related to the method.

従来技術と問題点 プログラム制御方式のDSPを動作させるためには、そ
のプログラムが正しく書かれていることが必要であるが
、プログラム作成時においてはある程度のミスが存在す
ることを避けられない。このためDSPのプログラムを
開発したとき、プログラムミスを発見するためデバッグ
の手続を行うことが不可欠である。
Prior Art and Problems In order to operate a program-controlled DSP, it is necessary that the program be written correctly, but it is inevitable that some errors will occur when creating the program. Therefore, when developing a DSP program, it is essential to perform debugging procedures to discover program errors.

DSPのプログラムデバッグを行うためには、通常これ
に設けられているホールト機能を利用しであるステップ
でプログラムの走行を停止し、そのとき外部に設けられ
たレジスタ等における出力値をチェックすることによっ
て、そのステップまでの動作の正否を知り、このような
手順を繰り返すことによってプログラムにおけるミスの
所在を調べる方法が行われている。
To debug a DSP program, you can usually use the halt function provided in the DSP to stop the program running at a certain step, and then check the output value in an external register. , a method is used in which the location of errors in a program is investigated by knowing whether the operations up to that step are correct or not, and repeating such steps.

一般に汎用DSP等においてはこのようなホールト機能
を行うための端子が設けられていて、これを利用して上
述のごときプログラムデバッグを行うことができるが、
特殊に製作されたDSPにおいては、ホールト機能を実
現するための端子を有しない場合があり、従ってこのよ
うな場合ホールト端子を利用して行う上述のごときプロ
グラムデバッグを実施することができない。
Generally, general-purpose DSPs are equipped with a terminal for performing such a halt function, and this can be used to perform program debugging as described above.
A specially manufactured DSP may not have a terminal for realizing a halt function, and therefore, in such a case, the above-described program debugging using the halt terminal cannot be performed.

そこで従来、ホールト専用の端子を有しないDSPをプ
ログラムデバッグの目的でホールト状態にするため、マ
スタクロックの供給をある時点で停止する方法が行われ
ている。しかしながらこの方法は、クロックを停止する
位置を検出する手段が難しく、例えばプログラム実行ア
ドレスを検出する等の方法がとられるが、高速動作時に
おいては困難が伴う。さ・しにDSPが外部と独立した
クロックで動作している場合、特にDSPがLSIで作
られているような場合には、この方法を適用することが
できない。
Conventionally, a method has been used in which the supply of the master clock is stopped at a certain point in order to put a DSP that does not have a dedicated halt terminal into a halt state for the purpose of program debugging. However, in this method, it is difficult to detect the position at which the clock is stopped. For example, a method such as detecting a program execution address is used, but this method is difficult during high-speed operation. However, this method cannot be applied when the DSP operates with a clock that is independent from the outside, especially when the DSP is made of LSI.

発明の目的 本発明はこのような従来技術の欠点を解決しようとする
ものであって、その目的は、ホールト機能を実現するた
めの端子を有しないDSPにおいて、DSPをホールト
状態にしてデバッグ用分岐命令の挿入、削除を行うこと
ができるプログラムデバッグ方式を提供することにある
OBJECT OF THE INVENTION The present invention attempts to solve the drawbacks of the prior art, and its purpose is to put the DSP in a halt state and use a branch for debugging in a DSP that does not have a terminal for realizing a halt function. The object of the present invention is to provide a program debugging method that allows insertion and deletion of instructions.

発明の実施例 第1図は本発明の一実施例としてのデバッグシステムの
構成例を示したものである。同図において、1はプログ
ラム用メモリ、2はデバッグ処理制御部、3は命令解読
部、4は出力レジスタ、5はDSP本体部、6はスイッ
チ、7は外部データ処理回路、8はハスである。また破
線で囲んで示された命令解読部3.出力レジスタ4.D
SP本体部5は、通常DSP9として一体化されて、L
Slによって実現されている。
Embodiment of the Invention FIG. 1 shows an example of the configuration of a debug system as an embodiment of the invention. In the figure, 1 is a program memory, 2 is a debug processing control section, 3 is an instruction decoding section, 4 is an output register, 5 is a DSP main body, 6 is a switch, 7 is an external data processing circuit, and 8 is a lotus. . Also, the instruction decoding unit 3 is shown surrounded by a broken line. Output register 4. D
The SP main body 5 is usually integrated as a DSP 9 and
This is realized by Sl.

また第2図はデバッグを行うべきプログラムの原形とデ
バッグ時におけるその変形の方法とを示している。
Furthermore, FIG. 2 shows the original form of a program to be debugged and a method of transforming it during debugging.

第1図において、デバッグの対象とするプログラムはプ
ログラム用メモリ1に格納されている。
In FIG. 1, a program to be debugged is stored in a program memory 1.

動作時にはスイッチ6はA側に倒されていて、DSP9
から命令解読部3を経て、前命令の命令解読結果に応じ
て次の命令アドレスを与えることによって新しい命令コ
ードが読出され、命令解読部3を経てDSP本体部5に
与えられて実行される。
During operation, switch 6 is turned to the A side, and DSP 9
A new instruction code is read out by passing the instruction decoding section 3 to the next instruction address according to the instruction decoding result of the previous instruction, and is given to the DSP main body section 5 via the instruction decoding section 3 for execution.

いま第2図fatに示されたプログラムの原形において
、原命令をに番地まで実行した直後に原プログラムのデ
バッグを行うものとする。この場合はに番地の直後に何
等かのデバッグ文(例えば内部のりジスタの内容モニタ
等)を挿入することによってデバッグが行われるが、そ
れには第2図(blのようにに+1番地をデバッグ文に
分岐するジャンプ命令に変えておけばよく、これによっ
て実行プログラムがジャンプしてm ”−n番地のデバ
ッグ文の実行が行われる。
In the original program shown in FIG. 2 fat, it is assumed that the original program is debugged immediately after the original instruction is executed up to address . In this case, debugging is performed by inserting some debug statement (for example, to monitor the contents of an internal register) immediately after the address . What is necessary is to change the jump instruction to a jump instruction that branches to , thereby causing the execution program to jump and execute the debug statement at address m''-n.

このようにしてデバッグが行われたのち原プログラムに
復帰するためには、第2図(C)に示すごとくプログラ
ムのに+1番地を原プログラムの命令に直してから、再
びに+1番地にジャンプさせればよい。このようなプロ
グラムの入換えは、スイッチ6をB側に倒しデバッグ処
理制御部2からアドレスを与えるととも命令をロードし
て、ブロク゛ラム用メモ1月の内容を更新することによ
って行われる。なおこの際必要であれば、プログラムの
λ番地をジャンプ命令に変えてさらにデノ〈ラグを行わ
せるようにしてもよい。
In order to return to the original program after debugging in this way, as shown in Figure 2 (C), change the +1 address of the program to the instruction of the original program, and then jump to the +1 address again. That's fine. Such program replacement is performed by turning the switch 6 to the B side, giving an address from the debug processing control unit 2, loading instructions, and updating the contents of the block memo January. At this time, if necessary, the λ address of the program may be changed to a jump instruction to perform further deno<lag.

ところでこのようなプログラム用メモリの内容入換えの
処理を行う間は、DSPを停止させておかなければなら
ないが、前述のようにホールト端子のないDSPを停止
させることは一般に困難である。そこで、第2図(b)
のn−2番地、n−1番地に示すごとくデバッグ処理の
最後において、出力レジスタ4への置数命令を2度与え
る。DSPは、一般に外部にデータを出力するためのレ
ジスタ(出力レジスタ)に未処理データがある状態では
、次の出力データを出力レジスタに置数する命令が発生
した場合、既に置数されたデータが外部に読出されるま
で命令実行が停止されるようになっているので、置数命
令を2度与えられることによってDSPは停止し、従っ
てその間に所要のプログラム入換えを行うことができる
。そしてプログラムの入換えが行われたのち、出力レジ
スタ4の値をバス8を経て外部データ処理回路7に2度
読出せば、その都度読出し終了通知が出方レジスタ4に
入力され、これによって1回読出しが終ったところでプ
ログラムの実行が再開され、2回目の読出し終了後に+
1番地にジャンプして以後通常の動作が行われる。なお
出方レジスタへの2回の置数命令は、上述の説明から明
らがなように必ずしも連続した番地で行われる必要はな
く、その間に出力レジスタの値の読出しが行われなけれ
ばよい。
By the way, the DSP must be stopped during the process of replacing the contents of the program memory, but as mentioned above, it is generally difficult to stop the DSP without a halt terminal. Therefore, Fig. 2(b)
As shown at addresses n-2 and n-1, at the end of the debugging process, a numeric instruction to the output register 4 is given twice. Generally, when there is unprocessed data in a register (output register) for outputting data to the outside, when a command to place the next output data in the output register is issued, the DSP will automatically replace the data that has already been placed. Since instruction execution is stopped until it is read out to the outside, the DSP is stopped by being given the numeric instruction twice, and therefore, the required program can be replaced during that time. After the program has been replaced, if the value of the output register 4 is read twice to the external data processing circuit 7 via the bus 8, a read completion notification is input to the output register 4 each time. Program execution is resumed after the second reading is completed, and after the second reading is completed, +
The program jumps to address 1 and then normal operations are performed. Note that, as is clear from the above explanation, it is not necessary that the two input instructions to the output register be performed at consecutive addresses, and it is sufficient that the value of the output register is not read out between them.

発明の詳細 な説明したように本発明のプログラムデバッグ方式によ
れば、データを出力すべき外部レジスタに未処理データ
がある状態では、次の出力データを出力レジスタに置数
する命令が発生した場合に、既に置数されたデータが外
部に読出されるまで命令実行が停止されるようになって
いるDSPにおいて、DSPの外部にデバッグしようと
するプログラムを格納するメモリを設け、デバッグのた
めの命令分岐をプログラムのジャンプ命令で行い、デバ
ッグ終了後もとのプログラムに復帰する際、分岐命令の
最後に外部レジスタに対する出力命令を2度与えること
によってホールト状態を発生させようにしたので、ホー
ルト端子を有しないDSPの場合でもDSPの動作を停
止させてプログラム復帰に必要な分岐用ジャンプ命令の
削除等のプログラム変更を行うことができる。
As described in detail, according to the program debugging method of the present invention, when there is unprocessed data in an external register to which data should be output, when an instruction to place the next output data in the output register occurs. In a DSP in which instruction execution is suspended until data that has already been set is read out, a memory for storing the program to be debugged is provided outside the DSP, and the instructions for debugging are provided outside the DSP. When branching is done with a program jump instruction and returning to the original program after debugging, a halt state is generated by giving an output command to an external register twice at the end of the branch instruction, so the halt terminal is Even in the case of a DSP that does not have this, it is possible to stop the operation of the DSP and change the program, such as deleting a branch jump instruction necessary for program recovery.

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

第1図は本発明の一実施例としてのプログラムデバッグ
システムの構成例を示す図、第2図はデバッグしようと
するプログラムの原形とデバッグ時におけるその変形と
を示す図である。 1−m−プログラム用メモリ、2−デバッグ処理制御部
、3−命令解読部、4−出方レジスタ、5−DSP本体
部、6−スイッチ、7−外部データ処理回路、8−バス
、9−ディジタル信号処理回路(DSP) 特許出願人 富士通株式会社 代理人  弁理士 玉蟲久五部 (外3名)第1図 第2図
FIG. 1 is a diagram showing an example of the configuration of a program debugging system as an embodiment of the present invention, and FIG. 2 is a diagram showing the original form of a program to be debugged and its transformation during debugging. 1-m-program memory, 2-debug processing control unit, 3-instruction decoding unit, 4-output register, 5-DSP main unit, 6-switch, 7-external data processing circuit, 8-bus, 9- Digital Signal Processing Circuit (DSP) Patent Applicant Fujitsu Limited Agent Patent Attorney Gobe Tamamushi (3 others) Figure 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] 外部へデータを出力するためのレジスタに未処理データ
がある状態で該レジスタに次の出力データを置数する命
令が発生した場合に、既に置数されたデータが外部へ読
出されるまで命令実行が停止されるごときプログラム制
御方式のディジタル信号処理回路において、該信号処理
回路の外部番こデバッグすべきプログラムを格納するメ
モリを設け、デバッグのためのプログラムの分岐をジャ
ンプ命令で行いもとのプログラムへの復帰時、2個の出
力命令を分岐プログラムの最後に設けることによりホー
ルト状態を発生させて分岐用のジャンプ命令の削除等の
プログラム変更を可能にすることを特徴とするディジタ
ル信号処理プログラムデバッグ方式。
If a register for outputting data to the outside has unprocessed data and an instruction to place the next output data in that register occurs, the instruction is executed until the data that has already been placed is read out to the outside. In a program-controlled digital signal processing circuit in which the signal processing circuit is stopped, a memory is provided to store the program to be debugged, and a jump instruction is used to branch the program for debugging, and the original program is returned to the original program. debugging of a digital signal processing program characterized in that when returning to the program, a halt state is generated by providing two output instructions at the end of the branch program, thereby making it possible to change the program such as deleting a jump instruction for branching. method.
JP57212133A 1982-12-03 1982-12-03 Debug system of digital signal processing program Pending JPS59103158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57212133A JPS59103158A (en) 1982-12-03 1982-12-03 Debug system of digital signal processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57212133A JPS59103158A (en) 1982-12-03 1982-12-03 Debug system of digital signal processing program

Publications (1)

Publication Number Publication Date
JPS59103158A true JPS59103158A (en) 1984-06-14

Family

ID=16617435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57212133A Pending JPS59103158A (en) 1982-12-03 1982-12-03 Debug system of digital signal processing program

Country Status (1)

Country Link
JP (1) JPS59103158A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6159544A (en) * 1984-08-31 1986-03-27 Hitachi Ltd Combining maintenance program method for microcomputer
JPH01241636A (en) * 1988-03-17 1989-09-26 Internatl Business Mach Corp <Ibm> Data processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6159544A (en) * 1984-08-31 1986-03-27 Hitachi Ltd Combining maintenance program method for microcomputer
JPH01241636A (en) * 1988-03-17 1989-09-26 Internatl Business Mach Corp <Ibm> Data processing system

Similar Documents

Publication Publication Date Title
JPS63301339A (en) Computer device
JPH03204737A (en) Debug circuit of signal processing processor
JP2513417B2 (en) Information processing device
JPH1078889A (en) Microcomputer
JPH10214203A (en) Information processor
JPS59103158A (en) Debug system of digital signal processing program
JP2878264B1 (en) Tracer device, trace data compression method, and compressed trace data reading method
JPH1011315A (en) In-circuit emulator device and in-circuit emulation method
JP2853774B2 (en) Programmable controller
JPS5991558A (en) Method for testing program
JPS63307543A (en) Debug device
JPH0561717A (en) Program debugging device
JPS59202546A (en) Debugging device
KR19990079373A (en) Debugging with Boundary Scan Standard Interface on Microcontrollers
JP3428253B2 (en) Sequencer
JP2679603B2 (en) Microcomputer
JPS6326416B2 (en)
JP2002014844A (en) Debug method and recording medium
JPS6214240A (en) Program inspecting system
JPH04328644A (en) Debug back-up device
JPS59163653A (en) Debug device
JPH01142948A (en) Symbolic debugger for microcomputer
JPS6250855B2 (en)
JPS61134850A (en) Debugging method of subsequent processor
JPH0324640A (en) Debugging system for information processor