JPS6346871B2 - - Google Patents
Info
- Publication number
- JPS6346871B2 JPS6346871B2 JP56132067A JP13206781A JPS6346871B2 JP S6346871 B2 JPS6346871 B2 JP S6346871B2 JP 56132067 A JP56132067 A JP 56132067A JP 13206781 A JP13206781 A JP 13206781A JP S6346871 B2 JPS6346871 B2 JP S6346871B2
- Authority
- JP
- Japan
- Prior art keywords
- loop
- circuit
- program
- decoder
- calculation
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/32—Address formation of the next instruction, e.g. by incrementing the instruction counter
- G06F9/322—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
- G06F9/325—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for loops, e.g. loop detection or loop counter
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Complex Calculations (AREA)
Description
【発明の詳細な説明】
本発明は、デイジタル信号処理装置におけるル
ープ演算制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a loop calculation control method in a digital signal processing device.
一般に、汎用デイジタル信号処理装置(DSP)
においては、同一の演算処理を繰り返し行うため
のループ演算が多用されている。このようなルー
プ演算においては、通常RAMに格納された一ブ
ロツクのデータが1ループの演算処理が実行され
る毎に順次読み出される。第1図には、従来形の
ループ演算制御方式を用いた汎用デイジタル信号
処理装置が示される。第1図の汎用DSP1には、
プログラムROM11、デコーダ12、RAM1
3、演算装置14およびループ演算制御回路15
が設けられている。ループ演算制御回路15は、
ループカウンタ151および終了検出回路152
を有する。 Generally, a general-purpose digital signal processor (DSP)
Loop operations are often used to repeatedly perform the same arithmetic processing. In such a loop operation, normally one block of data stored in the RAM is sequentially read out each time one loop of operation processing is executed. FIG. 1 shows a general-purpose digital signal processing device using a conventional loop arithmetic control method. The general-purpose DSP 1 in Figure 1 includes:
Program ROM11, decoder 12, RAM1
3. Arithmetic device 14 and loop arithmetic control circuit 15
is provided. The loop calculation control circuit 15 is
Loop counter 151 and end detection circuit 152
has.
第1図のDSP1において、ループ演算が実行
される態様を以下に説明する。 The manner in which loop operations are executed in the DSP 1 of FIG. 1 will be described below.
プログラムROM11のループ演算プログラム
を格納した領域には、先頭にループの繰り返し回
数を指定したデータが記憶されている。デコーダ
12は、プログラムROM11に格納されたプロ
グラムを順次読み出し、プログラムの内容に応じ
て、RAM13に格納されたデータを読み出し演
算装置においてデイジタル信号処理を実行させ
る。ループ演算がプログラムされている場合に
は、デコーダ12は、プログラムの先頭に格納さ
れた繰り返し回数をループ演算制御回路15に供
給する。次いでデコーダ12は、プログラムされ
た命令に従つてRAM13からデータを順次読み
出し演算装置14においてデイジタル処理を実行
させる。 In the area of the program ROM 11 in which the loop calculation program is stored, data specifying the number of repetitions of the loop is stored at the beginning. The decoder 12 sequentially reads out the programs stored in the program ROM 11, and depending on the contents of the program, reads the data stored in the RAM 13 and causes the arithmetic unit to execute digital signal processing. If a loop operation is programmed, the decoder 12 supplies the loop operation control circuit 15 with the number of repetitions stored at the beginning of the program. Next, the decoder 12 sequentially reads data from the RAM 13 according to the programmed instructions and causes the arithmetic unit 14 to execute digital processing.
デコーダ12がプログラムROM11からルー
プエンド命令を受取つたとき、デコーダ12は、
ループエンド信号をループ演算制御回路15に供
給する。ループ演算制御回路15においては、デ
コーダ12からのループエンド信号をループカウ
ンタ151においてカウントし、カウント数が前
記の繰り返し指定回数に達したか否かが終了検出
回路152において検出される。カウント数が指
定回数に達しない場合は、プログラムROM11
においては、ループ演算プログラムの先頭位置に
戻つて、プログラムが順次デコーダに供給され
る。従つて、デコーダ12は、ループエンド命令
に到達するまで同一のプログラムをRAM13の
新しいデータに対して実行する。このようにし
て、ループ演算が繰り返し実行され、ループカウ
ンタ151のカウント数が指定回数に達すると、
プログラムROM11は、ループを抜けて、新し
いプログラムの実行に移る。 When the decoder 12 receives the loop end instruction from the program ROM 11, the decoder 12
A loop end signal is supplied to the loop calculation control circuit 15. In the loop arithmetic control circuit 15, a loop end signal from the decoder 12 is counted by a loop counter 151, and an end detection circuit 152 detects whether the counted number has reached the specified number of repetitions. If the count does not reach the specified number, program ROM11
In this case, the program returns to the beginning of the loop calculation program and is sequentially supplied to the decoder. Therefore, the decoder 12 executes the same program on new data in the RAM 13 until the loop end instruction is reached. In this way, the loop operation is repeatedly executed, and when the count number of the loop counter 151 reaches the specified number of times,
The program ROM 11 exits the loop and starts executing a new program.
前述した第1図のDSPにおけるループ演算制
御においては、ループカウンタ151および終了
検出回路152を有するループ演算制御回路15
を設ける必要があり、そのためマイクロプロセツ
サユニツト等の小形プロセツサに適用する場合、
または、プロセツサ自体を小形する場合に不利で
あるという問題があつた。 In the loop calculation control in the DSP shown in FIG.
Therefore, when applying it to a small processor such as a microprocessor unit,
Another problem is that it is disadvantageous when the processor itself is made smaller.
本発明の主な目的は、従来形の問題点にかんが
み、汎用デイジタル信号処理装置において、非常
に小規模の回路でループ演算制御を行うことを可
能ならしめ、それにより、汎用デイジタル信号処
理装置を小形化することができる、ループ演算制
御方式を提供することにある。 The main object of the present invention is to make it possible to perform loop arithmetic control with a very small-scale circuit in a general-purpose digital signal processing device, thereby making it possible to perform loop calculation control in a general-purpose digital signal processing device. The object of the present invention is to provide a loop calculation control method that can be downsized.
本発明においては、デイジタル信号処理装置に
おけるループ演算の再起動および終了の切換えを
行うループ演算制御方式において、該ループ演算
に用いられるデータを格納したRAMの各ワード
にループ制御用のビツトを付加し、該ループ演算
が完了する毎に該ループ制御用ビツトを判別する
ことにより該ループ演算の再起動または終了を指
令するようにしたことを特徴とする、ループ演算
制御方式が提供される。 In the present invention, in a loop calculation control method that switches between restarting and ending loop calculations in a digital signal processing device, a bit for loop control is added to each word of RAM that stores data used in the loop calculation. , a loop calculation control system is provided, characterized in that each time the loop calculation is completed, the loop control bit is determined to issue a command to restart or terminate the loop calculation.
本発明の一実施例としてのループ演算制御方式
を用いたデイジタル信号処理装置(DSP)が第
2図に示される。第2図のDSP2には、プログ
ラムROM21、デコーダ22、RAM23、演
算装置24およびループ演算制御回路25が設け
られる。ループ演算制御回路25は、ループ終了
検出用フラグ回路251、およびアンド回路25
1を有する。 A digital signal processing device (DSP) using a loop arithmetic control method as an embodiment of the present invention is shown in FIG. The DSP 2 in FIG. 2 is provided with a program ROM 21, a decoder 22, a RAM 23, an arithmetic unit 24, and a loop arithmetic control circuit 25. The loop calculation control circuit 25 includes a loop end detection flag circuit 251 and an AND circuit 25.
1.
第2図のDSP2においては、前記の第1図の
場合と同様に、プログラムROM21に格納され
たプログラム命令がデコーダ22により解読さ
れ、命令に応じてRAM23から読み出されたデ
ータが演算装置24に供給され、演算装置24に
おいて所定の演算処理が実行される。 In the DSP 2 shown in FIG. 2, as in the case of FIG. The data is supplied and predetermined arithmetic processing is executed in the arithmetic unit 24.
第2図のDSP2においてループ演算を実行す
る場合、第1図の場合と異なり、プログラム
ROM21に格納されたループプログラムの先頭
に繰り返し回数を指定するデータを格納する必要
はない。ループ演算において処理されるべきデー
タは、RAM22に予め格納される。この場合、
RAM22に格納されるデータの1ビツトがルー
プ制御用ビツトとして用いられる。RAM22に
データを書込む場合、最初ループ制御用ビツトに
は「0」が書込まれる。次に最終のループ演算に
おいて用いられるデータのループ制御用ビツトに
「1」が書込まれる。 When executing a loop operation in the DSP2 shown in Figure 2, unlike the case in Figure 1, the program
There is no need to store data specifying the number of repetitions at the beginning of the loop program stored in the ROM 21. Data to be processed in the loop operation is stored in RAM 22 in advance. in this case,
One bit of data stored in RAM 22 is used as a loop control bit. When writing data to the RAM 22, "0" is first written to the loop control bit. Next, "1" is written to the loop control bit of the data used in the final loop operation.
ループ演算のプログラムがプログラムROM2
1からデコーダに供給されると、デコーダ22
は、ループ終了検出用フラグ回路251の出力を
クリアした後、プログラムされた命令を順次実行
する。この命令の実行中にRAM23から読み出
されたデータのループ制御用ビツトは、ループ制
御回路25に伝送される。ループ制御回路25に
おいては、伝送されたループ制御用ビツトのうち
に1つでも「1」であるものが存在する場合に、
ループ終了検出用フラグ回路251の出力を
「1」にセツトする。ループ演算が完了し、ルー
プエンド命令がデコーダ22に与えられると、デ
コーダ22はループエンド信号をループ制御供給
する。このループエンド信号およびループ終了検
出用フラグ回路251の出力信号がアンド回路2
52に入力される。 The loop calculation program is in program ROM2.
1 to the decoder, the decoder 22
After clearing the output of the loop end detection flag circuit 251, the programmed instructions are sequentially executed. The loop control bits of the data read from the RAM 23 during the execution of this instruction are transmitted to the loop control circuit 25. In the loop control circuit 25, if at least one of the transmitted loop control bits is "1",
The output of the loop end detection flag circuit 251 is set to "1". When the loop operation is completed and a loop end command is provided to decoder 22, decoder 22 provides a loop end signal for loop control. This loop end signal and the output signal of the loop end detection flag circuit 251 are output to the AND circuit 2.
52.
従つて、ループ演算が完了した時に、ループ終
了検出フラグがセツトされている場合には、アン
ド回路252から「1」の信号が出力される。ア
ンド回路252から「1」が出力されると、それ
により、ループの終了が指令され、プログラム
ROM21は、次の新しいプログラムをデコーダ
に供給する。一方、ループ終了検出用フラグがセ
ツトされていない場合には、アンド回路252の
出力は「0」であり、この場合には、プログラム
ROM21は、ループの先頭に戻つて、再たび同
じループのプログラムをデコーダに供給する。こ
のようにして、第2図のDSPにおいては、RAM
23に書込まれたデータによりループ演算の終了
または再起動が制御される。 Therefore, when the loop calculation is completed and the loop end detection flag is set, the AND circuit 252 outputs a signal of "1". When "1" is output from the AND circuit 252, it commands the end of the loop and the program
The ROM 21 supplies the next new program to the decoder. On the other hand, if the loop end detection flag is not set, the output of the AND circuit 252 is "0", and in this case, the program
The ROM 21 returns to the beginning of the loop and supplies the same loop program to the decoder again. In this way, in the DSP shown in Figure 2, RAM
The data written in 23 controls the termination or restart of the loop operation.
第2図のループ終了検出用フラグ回路251
は、例えば、第3図に示されるような簡単なフリ
ツプフロツプ回路により実現され得る。 Flag circuit 251 for loop end detection in FIG.
can be realized, for example, by a simple flip-flop circuit as shown in FIG.
本発明によれば、汎用デイジタル信号処理装置
において、非常に小規模な回路でループ演算制御
を行うことが可能であり、それにより、汎用デイ
ジタル信号処理装置を小形化することができる。 According to the present invention, in a general-purpose digital signal processing device, it is possible to perform loop calculation control with a very small-scale circuit, thereby making it possible to downsize the general-purpose digital signal processing device.
第1図は、従来形のループ演算制御方式を用い
たデイジタル信号処理装置のブロツク回路、第2
図は、本発明の一実施例としてのループ演算制御
方式を用いたデイジタル信号処理装置のブロツク
回路、第3図は、第2図の回路におけるループ終
了検出用フラグ回路の1構成例を示す回路図であ
る。
(符号の説明)、1……デイジタル信号処理装
置、11……プログラムROM、12……デコー
ダ、13……RAM、14……演算装置、15…
…ループ演算制御回路、151……ループカウン
タ、152……終了検出回路、2……デイジタル
信号処理装置、21……プログラムROM、22
……デコーダ、23……RAM、24……演算装
置、25……ループ演算制御回路、251……ル
ープ終了検出用フラグ回路、252……アンド回
路、NA1,NA2,NA3……ナンドゲード、
IV……インバータ。
Figure 1 shows a block circuit of a digital signal processing device using a conventional loop arithmetic control method.
The figure shows a block circuit of a digital signal processing device using a loop arithmetic control method as an embodiment of the present invention, and FIG. 3 shows a circuit showing one configuration example of a flag circuit for loop end detection in the circuit of FIG. It is a diagram. (Explanation of symbols), 1...Digital signal processing device, 11...Program ROM, 12...Decoder, 13...RAM, 14...Arithmetic unit, 15...
... Loop calculation control circuit, 151 ... Loop counter, 152 ... End detection circuit, 2 ... Digital signal processing device, 21 ... Program ROM, 22
... Decoder, 23 ... RAM, 24 ... Arithmetic device, 25 ... Loop calculation control circuit, 251 ... Flag circuit for loop end detection, 252 ... AND circuit, NA1, NA2, NA3 ... Nandogade,
IV...Inverter.
Claims (1)
の再起動および終了の切換えを行うループ演算制
御方式において、該ループ演算に用いられるデー
タを格納したRAMの各ワードにループ制御用の
ビツトを付加し、該ループ演算が完了する毎に該
ループ制御用ビツトを判別することにより該ルー
プ演算の再起動または終了を指令するようにした
ことを特徴とする、ループ演算制御方式。1. In a loop operation control method that switches between restarting and terminating a loop operation in a digital signal processing device, a bit for loop control is added to each word of RAM that stores data used in the loop operation, and the loop operation is restarted and terminated. 1. A loop calculation control method, characterized in that the loop control bit is determined each time the loop calculation is completed, thereby instructing restart or termination of the loop calculation.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP56132067A JPS5833752A (en) | 1981-08-25 | 1981-08-25 | Loop operation controlling system in digital signal processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP56132067A JPS5833752A (en) | 1981-08-25 | 1981-08-25 | Loop operation controlling system in digital signal processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5833752A JPS5833752A (en) | 1983-02-28 |
| JPS6346871B2 true JPS6346871B2 (en) | 1988-09-19 |
Family
ID=15072734
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP56132067A Granted JPS5833752A (en) | 1981-08-25 | 1981-08-25 | Loop operation controlling system in digital signal processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5833752A (en) |
-
1981
- 1981-08-25 JP JP56132067A patent/JPS5833752A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5833752A (en) | 1983-02-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR960035262A (en) | Method and apparatus for selective control of interrupt wait in data processing system | |
| EP0270081B1 (en) | Microprogram controller receiving interrupt request during instruction execution | |
| JPS6212529B2 (en) | ||
| JPS6346871B2 (en) | ||
| JPS6226486B2 (en) | ||
| US5243705A (en) | System for rapid return of exceptional processing during sequence operation instruction execution | |
| JP3871461B2 (en) | Microcontroller for sequence control | |
| JPS59100957A (en) | Loop control system | |
| JPH0218729B2 (en) | ||
| JP2585708B2 (en) | Programmable controller | |
| JPS60241104A (en) | Arithmetic method of digital controller | |
| JP2541940B2 (en) | Micro program controller | |
| JPH087613B2 (en) | Numerical control unit | |
| JP2637070B2 (en) | Micro instruction start address generation method | |
| JPS5829051A (en) | Operation processing device | |
| JPS6341092B2 (en) | ||
| JPS6338732B2 (en) | ||
| JPS595931B2 (en) | Address stop method for arithmetic processing system | |
| WO1989005003A1 (en) | Method of editing a program for pc | |
| JP2737524B2 (en) | Trace circuit | |
| WO1990013071A1 (en) | Programmable controller | |
| JPS6161411B2 (en) | ||
| JPH0462093B2 (en) | ||
| JPS616704A (en) | Programmable controller | |
| JPS62212755A (en) | Channel controller |