JPS6230654B2 - - Google Patents
Info
- Publication number
- JPS6230654B2 JPS6230654B2 JP2775482A JP2775482A JPS6230654B2 JP S6230654 B2 JPS6230654 B2 JP S6230654B2 JP 2775482 A JP2775482 A JP 2775482A JP 2775482 A JP2775482 A JP 2775482A JP S6230654 B2 JPS6230654 B2 JP S6230654B2
- Authority
- JP
- Japan
- Prior art keywords
- index
- register
- address
- circuit
- contents
- 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/34—Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
- G06F9/355—Indexed addressing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Complex Calculations (AREA)
Description
(1) 発明の技術分野
本発明は、マイクロコンピユータ等の汎用デイ
ジタル信号処理装置のアドレス修飾回路に関し、
特に二重ループ処理において内側のループ内に入
る場合等に外側のループに関係するインデツク
ス・レジスタ(IX)の内容をインデツクス・セ
ーブ・レジスタ(IXS)に退避すると同時にIXS
に格納された値をIXに初期バイアス値として置
数する方式のアドレス修飾回路に関する。
(2) 従来技術と問題点
従来、汎用デイジタル信号処理装置において二
重ループ構成の処理を容易にするために、インデ
ツクス・レジスタの値を退避させるためのインデ
ツクス・セーブ・レジスタを設けたアドレス修飾
回路が用いられている。ところが、前記のアドレ
ス修飾回路においては、外側のループと内側のル
ープのインデツクス(i,j)の値に関係するア
ドレスを指示する場合には各インデツクスの値を
取り出していちいち演算することにより所望のア
ドレスを算出しなければならないという問題があ
る。
(3) 発明の目的
本発明の主な目的は、前記の従来形の問題点に
かんがみ、汎用デイジタル信号処理装置におい
て、二重ループ構成の処理における内側のループ
に入るときにインデツクス・レジスタへバイアス
値を初期設定することにより、外側と内側の両方
のループのパラメータに依存するアドレスを極め
て容易に発生することができるアドレス修飾回路
を提供することにある。
(4) 発明の構成
本発明においては、インデツクス・レジスタ
と、該インデツクス・レジスタの出力を1方の入
力とし命令指定アドレスまたは定数を選択するこ
とができる選択回路の出力を他方の入力とする加
算回路と、該加算回路の出力または該インデツク
ス・レジスタの出力を選択して入力することがで
きるインデツクス・セーブ・レジスタを具備し、
該インデツクス・セーブ・レジスタに該インデツ
クス・レジスタの内容を一時退避するときに同時
に該インデツクス・セーブ・レジスタの内容を該
インデツクス・レジスタに格納することができ、
該インデツクス・セーブ・レジスタに退避された
内容を再び該インデツクス・レジスタに戻すとき
に同時に該インデツクス・レジスタの内容に該定
数を加えた値を該インデツクス・セーブ・レジス
タに格納することができるようにしたことを特徴
とする、汎用デイジタル信号処理装置のアドレス
修飾回路が提供される。
(5) 発明の実施例
本発明の一実施例としてのアドレス修飾回路が
第1図に示される。第1図において、1はアドレ
ス修飾回路に与えられる命令を示す。アドレス修
飾回路は、命令指定アドレスラツチ2、選択回路
A3、加算回路4、選択回路B5、選択回路C
6、IX(インデツクス・レジスタ)7、選択回
路D8、IXS(インデツクス・セーブ・レジス
タ)9により構成される。10は、汎用デイジタ
ル信号処理装置内のアドレス・バスである。
第1図のアドレス修飾回路における各処理に対
応する選択回路A,B,C,Dの選択の状態が第
2図に示される。第2図のにおいては、命令指
定のアドレスS1が直接アドレス・バスに出力さ
れ命令による直接アドレス指定が行われ得る。ま
たにより命令指定のアドレスS5がIXに初期
値としてロードされ得る。さらにのインデツク
ス修飾出力により、インデツクス・レジスタ7の
内容値S4に命令指定のアドレス値S1を加算し
たアドレス値をアドレス・バスに出力することが
できる。インデツクス・レジスタの内容は、に
より1だけ増加させることができる。これによ
り、第1図の回路において、一重のループ構成の
処理を行う際に、インデツクス・レジスタ7にル
ープの初期値を格納すれば、インデツクス修飾に
より、次々と連続したアドレスをアドレス・バス
10に出力することができる。すなわち、最初に
IX=0とし命令1のアドレスオペランドをAと
すると、
(1) Technical Field of the Invention The present invention relates to an address modification circuit for a general-purpose digital signal processing device such as a microcomputer.
Especially when entering the inner loop in double loop processing, the contents of the index register (IX) related to the outer loop are saved to the index save register (IXS), and at the same time the IXS
This invention relates to an address modification circuit that uses a value stored in IX as an initial bias value. (2) Prior art and problems Conventionally, in order to facilitate processing of a double loop configuration in a general-purpose digital signal processing device, an address modification circuit is provided with an index save register for saving the value of an index register. is used. However, in the address modification circuit described above, when specifying an address related to the values of the indexes (i, j) of the outer loop and the inner loop, the desired value is obtained by extracting the value of each index and calculating it one by one. There is a problem in that the address must be calculated. (3) Object of the Invention In view of the problems of the conventional type described above, the main object of the present invention is to bias the index register when entering the inner loop in processing of a double loop configuration in a general-purpose digital signal processing device. The object of the present invention is to provide an address modification circuit that can very easily generate addresses that depend on parameters of both outer and inner loops by initializing values. (4) Structure of the Invention The present invention provides an index register and an addition method in which the output of the index register is one input and the output of a selection circuit capable of selecting an instruction specified address or a constant is the other input. an index save register capable of selectively inputting the output of the adder circuit or the output of the index register;
When the contents of the index register are temporarily saved in the index save register, the contents of the index save register can be simultaneously stored in the index register,
When the contents saved in the index save register are returned to the index register, the value obtained by adding the constant to the contents of the index register can be simultaneously stored in the index save register. An address modification circuit for a general-purpose digital signal processing device is provided. (5) Embodiment of the Invention An address modification circuit as an embodiment of the present invention is shown in FIG. In FIG. 1, 1 indicates an instruction given to the address modification circuit. The address modification circuit includes an instruction designation address latch 2, a selection circuit A3, an addition circuit 4, a selection circuit B5, and a selection circuit C.
6, IX (index register) 7, selection circuit D8, and IXS (index save register) 9. 10 is an address bus within the general purpose digital signal processing device. FIG. 2 shows the selection states of selection circuits A, B, C, and D corresponding to each process in the address modification circuit of FIG. 1. In FIG. 2, the address S1 specified by the instruction is directly outputted to the address bus so that direct addressing by the instruction can be performed. Also, the instruction-specified address S5 can be loaded into IX as an initial value. Further, by outputting an index modification, an address value obtained by adding the address value S1 specified by the instruction to the content value S4 of the index register 7 can be output to the address bus. The contents of the index register can be incremented by one. As a result, when processing a single loop configuration in the circuit shown in FIG. It can be output. i.e. first
If IX=0 and the address operand of instruction 1 is A, then
【表】
となる。
ところで、第1図の回路において、二重ループ
構成の処理を行う際には、二重目のループの内側
では内側のループをインデツクス・レジスタ7に
記憶するために外側のループに関するインデツク
ス・レジスタ7の内容がインデツクス・セーブ・
レジスタ9に一時退避させる必要がある。
例えば、二重ループ構成の処理として最も典型
的な演算は、FORTRANによる表現では次のよ
うに表わされる。[Table] becomes. By the way, in the circuit shown in FIG. 1, when processing a double loop configuration, inside the second loop, the index register 7 for the outer loop is used to store the inner loop in the index register 7. The contents of index, save,
It is necessary to temporarily save it in register 9. For example, the most typical operation in a double-loop configuration is expressed in FORTRAN as follows.
【表】
前記の演算においてはループ内ではアドレスの
演算にループの引数(J、I)がそのまま引用さ
れている。ループ内で処理されるアドレスの配列
AがA(1、1)、A(2、1)、……、A(m、
1)、A(1、2)、A(2、2)……、A(m、
n)の順にa番地から割当てられているとき、前
記のA(J、I)のアドレスは次のように表わさ
れる。A(1、1)の番地をa+1とすると、
a+((I−1)×m+J)
ここで、aを命令指定のアドレスとしておけ
ば、前記のアドレスをインデツクス修飾するため
には、インデツクス・レジスタ7の中に(I−
1)×m+Jが置数されている必要がある。
第1図の回路においては、以下に説明されるよ
うに、インデツクス・レジスタ7に前記の値を置
数することが容易に行われ得る。
最初に外側のループに入るときにIX,IXSの内
容が共にゼロであるとすると、内側のループに最
初に入るとき、第2図のによりIXとIXSの内容
の交換が行われ、IX=0、IXS=0となる。内側
のループエンドにおいてによりIXの内容が1
だけ増加され再び内側のループの先頭に戻るの
で、インデツクス修飾によるアドレス指定は、a
+IXすなわち、a、a+1、a+2、……、a
+(m−1)となる。IX=(m−1)であると
き、すなわちJ=mで最初に内側のループを出る
とき、によりIXSに退避されていた値がIXに戻
され、IX=0となると同時にIXS=(m−1)+1
=mとされる。外側のループエンドにおいてに
よりIX=1となり、再び外側のループの先頭に
戻る。そして、2番目に内側のループに入るとき
にによりIX=m、IXS=1となる。従つて、内
側のループにおいては、インデツクス修飾による
アドレス指定は、a+m、a+m+1、……、a
+2m−1となり、A(2、1)、A(2、2)、
……、A(2、m)が指定され得る。2番目に内
側のループを出るとき、によりIX=1、IXS=
(2m−1)+1=2mとなる。以下同様にして、
内側のループにおけるA(J、I)のアドレス指
定を特別なアドレス演算を行うことなしで発生さ
せることができる。
以上に説明したように、第1図のアドレス修飾
回路においては、IXとIXSの間でデータ転送を行
うとき第2図の,に示されるような置数を行
うことができ、それにより二重ループの最も標準
的なインデツクス修飾によるアドレス指定が、特
別なアドレス演算用回路を用いることなしで実現
され得る。
(6) 発明の効果
本発明によれば、汎用デイジタル信号処理装置
において、わずかなハードウエアの増加のみで二
重ループの処理におけるインデツクス・レジスタ
の値の一時退避の際に最も標準的なアドレス指定
のためのアドレスを特別な演算を行うことなしで
発生させることができ、それにより簡単な回路で
高速のインデツクス修飾によるアドレス指定の演
算を行うことができる。[Table] In the above operation, the loop arguments (J, I) are quoted as-is in the address operation within the loop. The array A of addresses processed within the loop is A(1, 1), A(2, 1), ..., A(m,
1), A(1, 2), A(2, 2)..., A(m,
n), the address of A(J, I) is expressed as follows. Letting the address of A(1,1) be a+1, then a+((I-1)×m+J) Here, if a is set as the address specified by the instruction, in order to modify the above address with an index, the index register In 7 (I-
1) ×m+J must be set. In the circuit of FIG. 1, it is easy to populate the index register 7 with the above values, as will be explained below. If the contents of IX and IXS are both zero when entering the outer loop for the first time, then when entering the inner loop for the first time, the contents of IX and IXS are exchanged as shown in Figure 2, and IX = 0. , IXS=0. At the inner loop end, the content of IX becomes 1
Since the index is incremented by
+IX i.e. a, a+1, a+2, ..., a
+(m-1). When IX = (m-1), that is, when exiting the inner loop for the first time at J = m, the value saved in IXS is returned to IX, and at the same time as IX = 0, IXS = (m- 1)+1
= m. At the end of the outer loop, IX=1, and the process returns to the beginning of the outer loop. Then, when entering the second inner loop, IX=m and IXS=1. Therefore, in the inner loop, addressing by index modification is a+m, a+m+1, ..., a
+2m-1, A(2,1), A(2,2),
..., A(2, m) may be specified. When exiting the inner loop for the second time, IX=1, IXS=
(2m-1)+1=2m. Similarly below,
The addressing of A(J,I) in the inner loop can occur without special address operations. As explained above, in the address modification circuit shown in Fig. 1, when data is transferred between IX and IXS, the numbers shown in Fig. 2 can be set. Addressing by the most standard index modification of loops can be realized without using special address calculation circuits. (6) Effects of the Invention According to the present invention, in a general-purpose digital signal processing device, the most standard addressing method for temporarily saving the index register value in double loop processing can be achieved with only a slight increase in hardware. It is possible to generate an address for the address without performing any special calculations, thereby allowing a simple circuit to perform address designation calculations using high-speed index modification.
第1図は、本発明の一実施例としてのアドレス
修飾回路の回路図、第2図は、第1図の回路にお
ける選択回路の選択状態を示す図である。
(符号の説明)、1:命令、2:命令指定アド
レスのラツチ、3:選択回路A、4:加算回路、
5:選択回路B、6:選択回路C、7:インデツ
クス・レジスタ、8:選択回路D、9:インデツ
クス・セーブ・レジスタ、10:アドレス・バ
ス。
FIG. 1 is a circuit diagram of an address modification circuit as an embodiment of the present invention, and FIG. 2 is a diagram showing a selection state of a selection circuit in the circuit of FIG. (Explanation of symbols), 1: Instruction, 2: Latch of instruction specified address, 3: Selection circuit A, 4: Addition circuit,
5: Selection circuit B, 6: Selection circuit C, 7: Index register, 8: Selection circuit D, 9: Index save register, 10: Address bus.
Claims (1)
ス・レジスタの出力を1方の入力とし命令指定ア
ドレスまたは定数を選択することができる選択回
路の出力を他方の入力とする加算回路と、該加算
回路の出力または該インデツクス・レジスタの出
力を選択して入力することができるインデツク
ス・セーブ・レジスタを具備し、該インデツク
ス・セーブ・レジスタに該インデツクス・レジス
タの内容を一時退避するときに同時に該インデツ
クス・セーブ・レジスタの内容を該インデツク
ス・レジスタに格納することができ、該インデツ
クス・セーブ・レジスタに退避された内容を再び
該インデツクス・レジスタに戻すときに同時に該
インデツクス・レジスタの内容に該定数を加えた
値を該インデツクス・セーブ・レジスタに格納す
ることができるようにしたことを特徴とする、汎
用デイジタル信号処理装置のアドレス修飾回路。1 An index register, an adder circuit whose one input is the output of the index register, and whose other input is the output of a selection circuit that can select an instruction-specified address or a constant; It is equipped with an index save register that can select and input the output of the index register, and when the contents of the index register are temporarily saved to the index save register, the contents of the index save register are simultaneously saved. The contents can be stored in the index register, and when the contents saved in the index save register are returned to the index register, the value obtained by adding the constant to the contents of the index register can be saved at the same time. An address modification circuit for a general-purpose digital signal processing device, characterized in that an address modification circuit can be stored in an index save register.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2775482A JPS58144951A (en) | 1982-02-23 | 1982-02-23 | Address qualifying circuit of general-purpose digital signal processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2775482A JPS58144951A (en) | 1982-02-23 | 1982-02-23 | Address qualifying circuit of general-purpose digital signal processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58144951A JPS58144951A (en) | 1983-08-29 |
| JPS6230654B2 true JPS6230654B2 (en) | 1987-07-03 |
Family
ID=12229801
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2775482A Granted JPS58144951A (en) | 1982-02-23 | 1982-02-23 | Address qualifying circuit of general-purpose digital signal processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58144951A (en) |
-
1982
- 1982-02-23 JP JP2775482A patent/JPS58144951A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58144951A (en) | 1983-08-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4754421A (en) | Multiple precision multiplication device | |
| US6128726A (en) | Accurate high speed digital signal processor | |
| US4954947A (en) | Instruction processor for processing branch instruction at high speed | |
| JPS6244292B2 (en) | ||
| US5363322A (en) | Data processor with an integer multiplication function on a fractional multiplier | |
| JPH0690668B2 (en) | Fuzzy computing device | |
| JPH07107664B2 (en) | Multiplication circuit | |
| CN1004306B (en) | information processing device | |
| JPS6230654B2 (en) | ||
| US4723258A (en) | Counter circuit | |
| JPH0519170B2 (en) | ||
| JP3055316B2 (en) | Digital signal processor | |
| JPH0831033B2 (en) | Data processing device | |
| JPS62549B2 (en) | ||
| JP2951685B2 (en) | Fixed-point arithmetic unit | |
| JPS6259828B2 (en) | ||
| JPH0580978A (en) | Arithmetic processing circuit | |
| JPS619725A (en) | Microprogram control circuit | |
| JP2706459B2 (en) | Microprocessor with decimal multiplier | |
| JPH05224888A (en) | Variable point position type data multiplication circuit | |
| JPS6260755B2 (en) | ||
| KR930002850B1 (en) | Variable bit field making processor circuit | |
| JP2624738B2 (en) | Rounding method | |
| JP3110072B2 (en) | Pre-normalization circuit | |
| JPS59201144A (en) | Decimal arithmetic circuit |