JPH06337812A - Address generating mechanism - Google Patents

Address generating mechanism

Info

Publication number
JPH06337812A
JPH06337812A JP12947393A JP12947393A JPH06337812A JP H06337812 A JPH06337812 A JP H06337812A JP 12947393 A JP12947393 A JP 12947393A JP 12947393 A JP12947393 A JP 12947393A JP H06337812 A JPH06337812 A JP H06337812A
Authority
JP
Japan
Prior art keywords
address
storage means
register
instruction
address storage
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
JP12947393A
Other languages
Japanese (ja)
Inventor
Hidenori Ohashi
秀紀 大橋
Takashi Uchino
高志 内野
Takashi Kuroda
隆 黒田
Akira Yoshida
昭 吉田
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 JP12947393A priority Critical patent/JPH06337812A/en
Publication of JPH06337812A publication Critical patent/JPH06337812A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE:To efficiently generate an address without saving an address storage means in the middle of use to a data memory in an interruption processing and a sub-routine processing by using the plural address storage means and selectively using the plural address storage means. CONSTITUTION:The plural address storage means 61 and 62, an address allocation unit 5 generating the address from an address register, a control register 10 where selection information of the address storage means 61 and 62 are stored, an interruption detection part 9 detecting an interruption signal 8 and an instruction decoder 3 reading and decoding an instruction are provided. The selection of the address storage means 61 and 62 enables the easy switching of the address storage means 61 and 62 in accordance with address selection information stored in the control register 10.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、データメモリを有し、
そのデータメモリの内容を基にして処理を進めるディジ
タルシグナルプロセッサ(以下DSPと称する。)のア
ドレス生成機構に関し、特にデータメモリのアドレスを
指定するアドレス記憶手段を用いて、演算を行う場合の
アドレス記憶手段の使用方法に関するものである。
The present invention has a data memory,
An address generation mechanism of a digital signal processor (hereinafter referred to as a DSP) that advances processing based on the contents of the data memory, and particularly, an address storage when an operation is performed by using an address storage means for designating an address of the data memory. It relates to how to use the means.

【0002】[0002]

【従来の技術】半導体技術、マイクロプロセッサアーキ
テクチャなどの進歩により、プロセッサのメモリ空間を
プログラムメモリ空間とデータメモリ空間に分割し、命
令実行の高速化を図るハーバードアーキテクチャを採用
したRISCプロセッサ、DSP等の実用化が進んでい
る。
2. Description of the Related Art With 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, etc. adopting a Harvard architecture for speeding up instruction execution. Practical application is progressing.

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

【0004】例えば、DSPにおいて音声信号処理を行
う場合には、一定時間間隔で割り込みを発生させ、その
タイミングに従って、音声データをADコンバータによ
り取り込み、そのデータを基に割り込み処理、或るいは
サブルーチンコールなどの処理を行っていた。このよう
な割り込み処理においては、アドレスレジスタの内容を
データメモリなどに保存しておいて、新たにアドレスレ
ジスタに値を設定することによリ処理を行い、その処理
の終了後、保存されているアドレスレジスタの内容を読
み出すことにより、元の処理を継続していた。
For example, in the case of performing voice signal processing in a DSP, an interrupt is generated at a constant time interval, voice data is taken in by an AD converter in accordance with the timing, and interrupt processing is performed based on the data, or a subroutine call is made. And so on. In such an interrupt process, the contents of the address register are saved in a data memory or the like, and a new process is performed by setting a new value in the address register, and the process is saved after the end of the process. The original processing was continued by reading the contents of the address register.

【0005】図4は、従来のDSPにおけるアドレス記
憶手段を備えた、アドレス生成機構の概略構成図であ
る。
FIG. 4 is a schematic configuration diagram of an address generation mechanism provided with an address storage means in a conventional DSP.

【0006】図4における1は次に実行するプログラム
のアドレスが格納されているプログラムカウンタ、2は
プログラムの命令コードなどが格納されているプログラ
ムメモリ、3はプログラムメモリ2に格納されている命
令コードを読み込み、解読する命令デコーダ、4は演算
に用いるデータが格納されているデータメモリ、5はデ
ータメモリ4のアドレスを指定するアドレスアロケーシ
ョンユニット、6はアドレスアロケーションユニット5
のアドレスを指定するために用いられるアドレス記憶部
であり、このアドレス記憶部6は、第1のアドレス記憶
手段61及び第2のアドレス記憶手段62から構成され
ている。7は割り込み信号、8は割り込み信号7を検出
する割り込み検出部、9はアドレスアロケーションユニ
ット5の出力と、アドレス記憶部6の内容とが一致する
か否かの判定を行うアドレス比較器である。
In FIG. 4, 1 is a program counter in which the address of the program to be executed next is stored, 2 is a program memory in which the instruction code of the program is stored, and 3 is an instruction code stored in the program memory 2. An instruction decoder for reading and decoding the data, 4 is a data memory in which data used for operation is stored, 5 is an address allocation unit for designating an address of the data memory 4, and 6 is an address allocation unit 5.
The address storage unit 6 is used to specify the address of the address storage unit 6. The address storage unit 6 includes a first address storage unit 61 and a second address storage unit 62. Reference numeral 7 is an interrupt signal, 8 is an interrupt detection unit that detects the interrupt signal 7, and 9 is an address comparator that determines whether or not the output of the address allocation unit 5 and the contents of the address storage unit 6 match.

【0007】次に図5は、前記第1のアドレス記憶手段
61の内部構成を示す構成図である。同図における61
aはアドレスアロケーションユニット5で生成されるア
ドレスの基となるアドレスが格納されている第1のアド
レスレジスタ、61bは第1のアドレスレジスタ61a
に対する増減値が格納されている第1のオフセットレジ
スタ、61cはデータメモリ4のループ開始アドレスが
格納されている第1のループアドレスレジスタ、61d
はデータメモリ4のループ終了アドレスが格納されてい
る第1のループエンドアドレスレジスタである。
Next, FIG. 5 is a configuration diagram showing an internal configuration of the first address storage means 61. 61 in FIG.
a is a first address register that stores the address that is the basis of the address generated by the address allocation unit 5, and 61b is the first address register 61a.
61c is a first offset register that stores the increase / decrease value with respect to, and 61c is a first loop address register that stores the loop start address of the data memory 4, 61d
Is a first loop end address register in which the loop end address of the data memory 4 is stored.

【0008】図6は、前記第2のアドレス記憶手段62
の内部構成を示す構成図であり、その内部構成は図5に
示す第1のアドレス記憶手段61の内部構成と同じであ
るので説明は省略する。
FIG. 6 shows the second address storage means 62.
6 is a configuration diagram showing the internal configuration of the first address storage means 61, and its description is omitted.

【0009】図7、及び図8は、従来のDSPにおける
サブルーチンコールを含んだプログラム例であり、図7
はメインル−チンのプログラム例、図8はサブル−チン
のプログラム例である。図7のn−l−7、・・・・、n−
l、・・・・、n、・・・・、n+3、並びに、図8のm、m+
1、・・・・、m+5、・・・・、m+s、・・・・、m+s+6は
夫々アドレスを示しており、また枠内はプログラムを示
している。プログラム中のA0、C0、LB0、LE
0、及びA1は、それぞれ第1のアドレスレジスタ61
a、第1のオフセットレジスタ61b、第1のループア
ドレスレジスタ61c、第1のループエンドアドレスレ
ジスタ61d、及び第2のアドレスレジスタ62aを示
している。
FIGS. 7 and 8 are examples of programs including a subroutine call in a conventional DSP.
Is a program example of main routine, and FIG. 8 is a program example of subroutine. N-l-7, ..., N- of FIG.
l, ..., N, ..., N + 3, and m, m + in FIG.
.., m + 5, ..., M + s, ..., M + s + 6 respectively indicate addresses, and the boxes indicate programs. A0, C0, LB0, LE in the program
0 and A1 are the first address register 61, respectively.
a, a first offset register 61b, a first loop address register 61c, a first loop end address register 61d, and a second address register 62a.

【0010】ここで、load X,YはレジスタXに
定数<Y>を格納する命令であることを意味する機械
語、move (X+),Yは、レジスタYの内容を、
レジスタXに示されるアドレスに該当するデータメモリ
4に格納し、レジスタXの値を1インクリメントする命
令であることを意味する機械語、call ZはZ番地
以降のサブルーチンを実行する命令であることを意味す
る機械語、mac +は乗算器(明示せず)において、
演算を行うとともに、アドレスアロケ−ションユニット
5のアドレスを1インクリメントする命令であることを
意味する機械語、rpt Wは、次の命令をW回繰り返
す命令であることを意味する機械語、move X,
(Y+)はレジスタYに示されるアドレスのデータをレ
ジスタXに格納し、レジスタYを1インクリメントする
命令であることを意味する機械語、retはサブルーチ
ンを終了し、サブルーチンZの次の命令を実行すること
を意味する機械語である。尚、< >は定数を示してい
る。
Here, load X, Y is a machine language meaning that it is an instruction to store the constant <Y> in the register X, move (X +), Y is the contents of the register Y,
Call Z is a machine language meaning that it is an instruction for storing in the data memory 4 corresponding to the address indicated by the register X and incrementing the value of the register X by 1, call Z is an instruction for executing a subroutine after the address Z. Meaning machine language, mac +, in a multiplier (not explicitly shown)
A machine language that means an instruction that performs an operation and increments the address of the address allocation unit 5 by 1, rpt W is a machine language that means an instruction that repeats the next instruction W times, move X ,
(Y +) is a machine language that means that the data at the address indicated in the register Y is stored in the register X and the register Y is incremented by 1, and ret ends the subroutine and executes the next instruction of the subroutine Z. It is a machine language that means to do. Note that <> indicates a constant.

【0011】ここで、図7におけるプログラム例の実行
動作を図4乃至図6に基づいて説明する。命令load
A0,2000、命令load C0,200、命令
load LB0,2000、及び命令load LE
0,2100が順次実行されると、第1のアドレスレジ
スタ61a、第1のオフセットレジスタ61b、第1の
ループアドレスレジスタ61c、及び第1のループエン
ドアドレスレジスタ61dには、それぞれ、<2000
>、<200>、<2000>、及び<2100>が格
納される。
The execution operation of the program example shown in FIG. 7 will be described with reference to FIGS. 4 to 6. Instruction load
A0, 2000, instruction load C0, 200, instruction load LB0, 2000, and instruction load LE
When 0 and 2100 are sequentially executed, the first address register 61a, the first offset register 61b, the first loop address register 61c, and the first loop end address register 61d respectively have <2000.
>, <200>, <2000>, and <2100> are stored.

【0012】続いて命令rpt 100が実行され、命
令mac +が100回繰り返される。ここで、アドレ
ス比較器9は、逐次アドレスアロケ−ションユニット5
の内容と、第1のループエンドアドレスレジスタ61d
の内容を比較し、一致した場合にのみ、アドレスアロケ
−ションユニット5の内容を、第1のループアドレスレ
ジスタ61cの値に置き替える。
Then, the instruction rpt 100 is executed, and the instruction mac + is repeated 100 times. Here, the address comparator 9 is used for the sequential address allocation unit 5
And the contents of the first loop end address register 61d
The contents of the address allocation unit 5 are replaced with the value of the first loop address register 61c only when the contents are compared.

【0013】続いてn番地の命令call mが実行さ
れると、m番地以降のサブルーチンが実行される。第1
のアドレスレジスタ61a、第1のオフセットレジスタ
61b、第1のループアドレスレジスタ61c、及び第
1のループエンドアドレスレジスタ61dは、このサブ
ルーチンの中で使用されるため、メインルーチンにおい
て格納されている値をデータメモリ4に退避させる。こ
の後、サブルーチンを実行するべく図8のサブルーチン
のプログラムのm+2番地乃至m+5番地の命令が実行
されると、第1のアドレスレジスタ61a、第1のオフ
セットレジスタ61b、第1のループアドレスレジスタ
61c、及び第1のループエンドアドレスレジスタ61
dの値は、順次データメモリの4000番地乃至400
3番地に格納される。
When the instruction call m at the address n is subsequently executed, the subroutines at the addresses after the address m are executed. First
Since the address register 61a, the first offset register 61b, the first loop address register 61c, and the first loop end address register 61d are used in this subroutine, the values stored in the main routine are It is saved in the data memory 4. After that, when the instructions at addresses m + 2 to m + 5 of the program of the subroutine of FIG. 8 are executed to execute the subroutine, the first address register 61a, the first offset register 61b, the first loop address register 61c, And the first loop end address register 61
The value of d is sequentially 4000 to 400 in the data memory.
It is stored at address 3.

【0014】サブルーチン内での処理が終了すると、m
+s番地乃至m+s+6番地の命令が実行され、第1の
アドレスレジスタ61a、第1のオフセットレジスタ6
1b、第1のループアドレスレジスタ61c、及び第1
のループエンドアドレスレジスタ61dに、データメモ
リ4の4000番地以降に格納されているデータをそれ
ぞれ復帰させる。さらに、m+s+6番地のretが実
行されると、プログラムは再度n+2番地以降のメイン
プログラムが順次実行される。
When the processing in the subroutine is completed, m
The instructions at addresses + s to m + s + 6 are executed, and the first address register 61a and the first offset register 6 are executed.
1b, the first loop address register 61c, and the first
The data stored at addresses 4000 and after of the data memory 4 are restored to the loop end address register 61d. Further, when the ret at the address m + s + 6 is executed, the main program after the address n + 2 is sequentially executed again.

【0015】従って、再度命令rpt 100及び命令
mac +を実行する場合にも、第1のアドレスレジス
タ61a、第1のオフセットレジスタ61b、第1のル
ープアドレスレジスタ61c、及び第1のループエンド
アドレスレジスタ61dの値を設定する必要はない。
Therefore, even when the instruction rpt 100 and the instruction mac + are executed again, the first address register 61a, the first offset register 61b, the first loop address register 61c, and the first loop end address register. It is not necessary to set the value of 61d.

【0016】[0016]

【発明が解決しようとする課題】上述のように、従来の
ディジタル計算機において、プログラムを実行する場合
には、データメモリのアドレスを指定するために、複数
のアドレス記憶手段を用いており、それを選択すること
により演算を行っていた。
As described above, in the conventional digital computer, when the program is executed, a plurality of address storage means are used to specify the address of the data memory. Calculation was performed by selecting.

【0017】一方、割り込み処理やサブルーチンコール
などにおいては、別途アドレス記憶手段を必要とするた
め、アドレス記憶手段の内容をプログラムにより、一旦
データメモリに退避しておき、処理が終了すると、その
内容をアドレス記憶手段に復帰することが行われてい
た。従って、アドレス記憶手段の退避、復帰という処理
のオーバーヘッドが生じ、演算実行の高速化の妨げとな
っていた。
On the other hand, interrupt processing or subroutine call requires a separate address storage means, so the contents of the address storage means are temporarily saved in the data memory by the program, and when the processing is completed, the contents are saved. Returning to the address storage means was performed. Therefore, the processing overhead of saving and restoring the address storage means is generated, which hinders the speeding up of calculation execution.

【0018】そこで、本発明は前述の問題点に鑑みて為
されたものであり、アドレス記憶手段を複数組用意し、
その選択をコントロールレジスタにより行うことによ
り、複数のアドレス記憶手段を効率よく用いるアドレス
生成機構を提供することを目的とする。
Therefore, the present invention has been made in view of the above problems, and a plurality of sets of address storage means are prepared,
An object of the present invention is to provide an address generation mechanism that efficiently uses a plurality of address storage means by making the selection by the control register.

【0019】[0019]

【課題を解決するための手段】前記問題点を解決するた
めに、本発明のアドレス生成機構は複数組のアドレス記
憶手段からなるアドレス記憶部と、アドレス記憶手段の
選択情報が格納されているコントロールレジスタと、割
り込み信号を検出する割り込み検出部と、命令コードを
格納し、命令コードの解読を行う命令デコーダと、デー
タメモリのアドレスを指定するアドレスアロケーション
ユニットと、を備えることにより、割り込み処理やアド
レス記憶手段の切り替え命令、或るいはアドレス記憶手
段の選択命令により、コントロールレジスタの選択情報
の選択を行い、アドレス記憶部の複数のアドレス記憶手
段から所望のアドレス記憶手段を選択する機能を有す
る。
In order to solve the above-mentioned problems, the address generation mechanism of the present invention has an address storage unit comprising a plurality of sets of address storage units, and a control storing selection information of the address storage units. By providing a register, an interrupt detection unit that detects an interrupt signal, an instruction decoder that stores an instruction code and decodes the instruction code, and an address allocation unit that specifies the address of the data memory, interrupt processing and address It has a function of selecting the selection information of the control register by a storage means switching instruction or an address storage selection instruction and selecting a desired address storage means from a plurality of address storage means of the address storage unit.

【0020】[0020]

【作用】上述の手段によれば、割り込み信号が発生した
場合には、割り込み検出部で前記割り込み信号が検出さ
れ、コントロールレジスタの値が変更される。また、サ
ブルーチンコールなどの場合には、サブルーチンの先頭
に於て、アドレス記憶手段の選択、或るいはアドレス記
憶手段の切り替えを一括して行う命令を実行されると、
命令デコーダによりアドレス選択情報が決定され、コン
トロールレジスタに格納される。
According to the above means, when the interrupt signal is generated, the interrupt detecting section detects the interrupt signal and changes the value of the control register. Further, in the case of a subroutine call or the like, at the beginning of the subroutine, if an instruction for collectively selecting the address storage means or switching the address storage means is executed,
Address selection information is determined by the instruction decoder and stored in the control register.

【0021】[0021]

【実施例】図1は本発明のアドレス生成機構を備えたデ
ィジタルシグナルプロセッサの一実施例の概略構成図を
示す。
1 is a schematic block diagram of an embodiment of a digital signal processor having an address generating mechanism of the present invention.

【0022】図1において、従来例の図4と同一機能を
有するものについては、同一番号を付し、その説明は省
略する。
In FIG. 1, components having the same functions as those of the conventional example shown in FIG. 4 are designated by the same reference numerals, and the description thereof will be omitted.

【0023】本発明が従来例と異なる点は、コントロー
ルレジスタ10を命令デコーダ3とアドレスアロケーシ
ョンユニット5との間に設けたことであり、該コントロ
ールレジスタ10は、アドレス記憶部6のうち第1のア
ドレス記憶手段61或るいは第2のアドレス記憶手段6
2のいずれか1組のアドレス記憶手段を選択する選択信
号を格納しており、この選択信号はアドレスアロケーシ
ョンユニット5に送出されるように構成されている。こ
こで、選択信号の値が<0>の場合には第1のアドレス
記憶手段61を、また選択信号の値が<1>の場合には
第2のアドレス記憶手段62を選択するように構成され
ている。
The present invention is different from the conventional example in that a control register 10 is provided between the instruction decoder 3 and the address allocation unit 5, and the control register 10 is the first of the address storage units 6. Address storage means 61 or second address storage means 6
A selection signal for selecting any one of the two sets of address storage means is stored, and this selection signal is sent to the address allocation unit 5. Here, the first address storage means 61 is selected when the value of the selection signal is <0>, and the second address storage means 62 is selected when the value of the selection signal is <1>. Has been done.

【0024】図2、及び図3は、本発明のアドレス生成
機構を備えたDSPにおけるサブルーチンコールを含ん
だプログラム例であり、図2はメインル−チンのプログ
ラム例、図3(a)はサブル−チンのプログラム例、図
3(b)は図3(a)とは別のサブル−チンのプログラ
ム例であリ、chg ARはアドレス記憶手段を変更す
る命令であることを意味する機械語、select A
R0及びselectAR1は、それぞれ、第1又は第
2のアドレス記憶手段61又は62を選択する命令であ
ることを意味する機械語である。
2 and 3 are examples of programs including a subroutine call in the DSP having the address generation mechanism of the present invention. FIG. 2 is an example of a main routine program, and FIG. 3 (a) is a subroutine. A program example of Chin, FIG. 3B is a program example of a subroutine different from FIG. 3A, and chg AR is a machine language meaning that it is an instruction to change the address storage means, select. A
R0 and selectAR1 are machine words meaning that they are instructions for selecting the first or second address storage means 61 or 62, respectively.

【0025】メインル−チンに関する命令の説明は従来
例に示す図7と同じであるので省略する。尚、アドレス
記憶部6は、メインルーチンにおいて第1のアドレス記
憶手段61が選択されており、コントロールレジスタ1
0には<0>が格納されている。
The description of the instructions relating to the main routine is the same as that of FIG. In the address storage unit 6, the first address storage unit 61 is selected in the main routine, and the control register 1
<0> is stored in 0.

【0026】図2において、n−l−7番地乃至n−1
番地の実行が行われた後、n番地の命令call mが
実行されると、図3(a)に示すm番地からのサブルー
チンが実行される。命令デコーダ3において命令chg
ARが読み込みまれて解読される。解読された命令は
アドレス記憶手段を変更する命令であるので、アドレス
記憶部6は第1のアドレス記憶手段61から第2のアド
レス記憶手段62に切り替えられるとともに、コントロ
−ルレジスタ10の値は<1>となる。以降順次サブル
ーチンが実行され、実行が終了すると、次にm+s番地
の命令chgARが実行され、アドレス記憶部6が第2
のアドレス記憶手段62から第1のアドレス記憶手段6
1に切り替えられるとともに、コントロールレジスタ1
0に<0>が格納され、命令retが実行され、これ以
降図2のメインルーチンが実行される。
In FIG. 2, addresses n-1 to n-1.
When the instruction call m at the address n is executed after the execution of the address, the subroutine from the address m shown in FIG. 3A is executed. Instruction chg in the instruction decoder 3
The AR is read and decrypted. Since the decoded instruction is an instruction to change the address storage means, the address storage unit 6 is switched from the first address storage means 61 to the second address storage means 62, and the value of the control register 10 is <1. >. Subsequent subroutines are sequentially executed, and when the execution is completed, the instruction chgAR at the address m + s is executed next, and the address storage unit 6 stores the second
Address storage means 62 to first address storage means 6
1 and the control register 1
<0> is stored in 0, the instruction ret is executed, and thereafter, the main routine of FIG. 2 is executed.

【0027】別のサブルーチンの例である、図3(b)
に示すサブル−チンが実行された場合について説明す
る。命令select AR1及び命令select
AR0は命令chg ARと同一の働きをしており、命
令select AR1が命令デコーダ3において、ア
ドレス記憶部6のうち第2のアドレス記憶手段62を選
択する命令として、解読される。前記命令select
AR1が実行されると、アドレス記憶部6としては第
2のアドレス記憶手段62が選択されるとともに、コン
トロ−ルレジスタ10の値は<1>となる。また、命令
select AR0が命令デコーダ3において、アド
レス記憶部6のうち第1のアドレス記憶手段61を選択
する命令として、解読される。前記命令select
AR0が実行されると、アドレス記憶部6としては第1
のアドレス記憶手段61が選択されるとともに、コント
ロ−ルレジスタ10の値は<0>となる。
FIG. 3B is an example of another subroutine.
The case where the subroutine shown in (1) is executed will be described. Instruction select AR1 and instruction select
AR0 has the same function as the instruction chg AR, and the instruction select AR1 is decoded in the instruction decoder 3 as an instruction to select the second address storage means 62 in the address storage unit 6. The instruction select
When AR1 is executed, the second address storage unit 62 is selected as the address storage unit 6 and the value of the control register 10 becomes <1>. Further, the instruction select AR0 is decoded in the instruction decoder 3 as an instruction to select the first address storage means 61 in the address storage unit 6. The instruction select
When AR0 is executed, the first address storage unit 6
The address storage means 61 is selected, and the value of the control register 10 becomes <0>.

【0028】尚、本実施例においては、アドレス記憶部
6の選択は、アドレス記憶手段切り替え命令、及びアド
レス記憶手段指定命令により行ったが、割り込みが発生
した場合には、割り込み信号7が割り込み検出部8によ
り検出され、自動的にコントロールレジスタ10のアド
レス選択情報を決定し、アドレス記憶手段を切り替える
ことも可能である。
In this embodiment, the address storage unit 6 is selected by the address storage unit switching instruction and the address storage unit designation instruction. However, when an interrupt occurs, the interrupt signal 7 detects the interrupt. It is also possible to detect the address selection information of the control register 10 automatically by the unit 8 and switch the address storage means.

【0029】以上の説明が示す如く、アドレス記憶部6
の制御をコントロールレジスタ10により行うことによ
り、プログラムのステップ数の削減し、プログラム実行
の高速化を計ることが可能となる。
As described above, the address storage unit 6
By controlling the control by the control register 10, it is possible to reduce the number of steps of the program and speed up the program execution.

【0030】[0030]

【発明の効果】本発明は以上の説明から明らかなよう
に、割り込み信号の検出、或るいはアドレス記憶手段の
切り替え命令及びアドレス記憶手段の選択命令により、
アドレス記憶手段の選択情報が格納されているコントロ
−ルレジスタを制御し、アドレス記憶部の複数のアドレ
ス記憶手段は、コントロールレジスタにおけるアドレス
選択情報の選択に従って決定されるため、現在、使用し
ていないアドレス記憶手段を容易に選択することが可能
である。従来、複数ステップにより行っていたアドレス
記憶手段に格納されているデータをデータメモリに退避
する命令を実行する必要がなくなる結果、1命令でアド
レス記憶手段を切り替えることができると共に、プログ
ラムのステップ数が削減され、更にプログラム実行の高
速化を図ることが可能となる。
As is apparent from the above description, the present invention can detect an interrupt signal, or an instruction for switching the address storage means and an instruction for selecting the address storage means.
The control register that stores the selection information of the address storage means is controlled, and the plurality of address storage means of the address storage section are determined according to the selection of the address selection information in the control register. It is possible to easily select the storage means. As a result of eliminating the need to execute the instruction for saving the data stored in the address storage means to the data memory, which has been conventionally performed by a plurality of steps, the address storage means can be switched by one instruction and the number of steps of the program can be reduced. It is possible to reduce the number of programs and speed up program execution.

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

【図1】本発明のアドレス生成機構を備えたDSPの概
略構成図
FIG. 1 is a schematic configuration diagram of a DSP having an address generation mechanism of the present invention.

【図2】本発明のアドレス生成機構を備えたDSPにお
けるメインルーチンの一例
FIG. 2 is an example of a main routine in a DSP having an address generation mechanism of the present invention.

【図3】本発明のアドレス生成機構を備えたDSPにお
けるサブルーチンの一例
FIG. 3 is an example of a subroutine in a DSP having an address generation mechanism of the present invention.

【図4】従来例のアドレス生成機構を備えたDSPの一
実施例の概略構成図
FIG. 4 is a schematic configuration diagram of one embodiment of a DSP having a conventional address generation mechanism.

【図5】従来例のアドレス生成機構を備えたDSPにお
ける第1のアドレス記憶手段61の構成図
FIG. 5 is a configuration diagram of a first address storage means 61 in a DSP having a conventional address generation mechanism.

【図6】従来例のアドレス生成機構を備えたDSPにお
ける第2のアドレス記憶手段62の構成図
FIG. 6 is a configuration diagram of a second address storage means 62 in a DSP having a conventional address generation mechanism.

【図7】従来例のアドレス生成機構を備えたDSPにお
けるメインルーチンの一例
FIG. 7 shows an example of a main routine in a DSP having a conventional address generation mechanism.

【図8】従来例のアドレス生成機構を備えたDSPにお
けるサブルーチンの一例
FIG. 8 shows an example of a subroutine in a DSP having a conventional address generation mechanism.

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

3 命令デコーダ 4 データメモリ 5 アドレスアロケーションユニット 6 アドレス記憶部 7 割り込み信号 8 割り込み検出部 9 アドレス比較器 10 コントロールレジスタ 61 第1のアドレス記憶手段 61a 第1のアドレスレジスタ 62b 第1のオフセットレジスタ 63c 第1のループアドレスレジスタ 64d 第1のループエンドアドレスレジスタ 62 第2のアドレス記憶手段 62a 第2のアドレスレジスタ 62b 第2のオフセットレジスタ 62c 第2のループアドレスレジスタ 62d 第2のループエンドアドレスレジスタ 3 instruction decoder 4 data memory 5 address allocation unit 6 address storage unit 7 interrupt signal 8 interrupt detection unit 9 address comparator 10 control register 61 first address storage unit 61a first address register 62b first offset register 63c first Loop address register 64d first loop end address register 62 second address storage means 62a second address register 62b second offset register 62c second loop address register 62d second loop end address register

───────────────────────────────────────────────────── フロントページの続き (72)発明者 吉田 昭 大阪府守口市京阪本通2丁目18番地 三洋 電機株式会社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Akira Yoshida 2-18 Keihan Hondori, Moriguchi City, Osaka Sanyo Electric Co., Ltd.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 演算に用いるデータが格納されているデ
ータメモリと、該データメモリのアドレスを指定するア
ドレスアロケーションユニットと、該アドレスアロケー
ションユニットが指定するアドレスの基となるアドレス
を格納する少なくとも2組のアドレス記憶手段と、該ア
ドレス記憶手段のうち有効となるアドレス記憶手段の選
択情報を格納すると共に、前記アドレスアロケーション
ユニットに対して該選択情報を送出するコントロールレ
ジスタと、を備え、 前記アドレス記憶手段の選択は、前記コントロールレジ
スタの選択情報に基づいて行われることを特徴とするア
ドレス生成機構。
1. A data memory in which data used for calculation is stored, an address allocation unit for designating an address of the data memory, and at least two sets for storing an address which is a basis of an address designated by the address allocation unit. Address storage means, and a control register that stores selection information of an effective address storage means among the address storage means and sends the selection information to the address allocation unit. The address generation mechanism is characterized in that the selection is performed based on the selection information of the control register.
【請求項2】 命令のデコードを行う命令デコーダを備
え、該命令デコーダで解読された命令が、前記アドレス
記憶手段の切り替え命令、或るいはアドレス記憶手段の
指定命令の場合には、前記命令に従ってコントロールレ
ジスタの選択情報が選択されることによって前記アドレ
ス記憶手段を決定することを特徴とする請求項1記載の
アドレス生成機構。
2. An instruction decoder for decoding an instruction is provided, and when the instruction decoded by the instruction decoder is a switching instruction of the address storage means or a designation instruction of the address storage means, the instruction is followed according to the instruction. 2. The address generating mechanism according to claim 1, wherein the address storing means is determined by selecting selection information of a control register.
【請求項3】 割り込み信号を検出する割り込み検出部
を備え、該割り込み検出部において割り込み信号が検出
されると、前記コントロールレジスタの選択情報に基づ
いて前記アドレス記憶手段の選択を行うことを特徴とす
る請求項1記載のアドレス生成機構。
3. An interrupt detecting section for detecting an interrupt signal is provided, and when the interrupt detecting section detects an interrupt signal, the address storage means is selected based on selection information of the control register. The address generation mechanism according to claim 1.
【請求項4】 前記アドレス記憶手段は、少なくとも前
記アドレスアロケーションユニットで生成されるアドレ
スの基となるアドレスが格納されているアドレスレジス
タと、該アドレスレジスタに対する増減値が格納されて
いるオフセットレジスタと、からなることを特徴とする
請求項1、2、又は3記載のアドレス生成機構。
4. The address storage means includes at least an address register that stores an address that is a basis of an address generated by the address allocation unit, and an offset register that stores an increase / decrease value for the address register. The address generating mechanism according to claim 1, 2, or 3, wherein
【請求項5】 前記アドレス記憶手段は、少なくとも前
記アドレスアロケーションユニットで生成されるアドレ
スの基となるアドレスが格納されているアドレスレジス
タと、該アドレスレジスタに対する増減値が格納されて
いるオフセットレジスタと、ループの開始アドレスを格
納するループアドレスレジスタと、ループの終了アドレ
スを格納するループエンドアドレスレジスタと、からな
ることを特徴とする請求項1、2、又は3記載のアドレ
ス生成機構。
5. The address storage means includes an address register that stores at least an address serving as a basis of an address generated by the address allocation unit, and an offset register that stores an increase / decrease value for the address register. 4. The address generation mechanism according to claim 1, comprising a loop address register for storing a loop start address and a loop end address register for storing a loop end address.
JP12947393A 1993-05-31 1993-05-31 Address generating mechanism Pending JPH06337812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12947393A JPH06337812A (en) 1993-05-31 1993-05-31 Address generating mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12947393A JPH06337812A (en) 1993-05-31 1993-05-31 Address generating mechanism

Publications (1)

Publication Number Publication Date
JPH06337812A true JPH06337812A (en) 1994-12-06

Family

ID=15010361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12947393A Pending JPH06337812A (en) 1993-05-31 1993-05-31 Address generating mechanism

Country Status (1)

Country Link
JP (1) JPH06337812A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409607B2 (en) 2005-04-11 2008-08-05 Sanyo Electric Co., Ltd. Memory address generating apparatus, processor having the same, and memory address generating method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409607B2 (en) 2005-04-11 2008-08-05 Sanyo Electric Co., Ltd. Memory address generating apparatus, processor having the same, and memory address generating method

Similar Documents

Publication Publication Date Title
JPH06337812A (en) Address generating mechanism
JPH10124312A (en) Central processor
JP2002297378A (en) Signal processor
KR100551458B1 (en) Digital signal processing operation method and digital signal processor
JPH04140851A (en) Diagnostic system for information processor
JPH05181671A (en) Emulation system for software instruction
JP2601055B2 (en) Microprogram sequencer
JPH052506A (en) Information processor
JPH04167150A (en) Computer containing list instruction processor
JPH05100957A (en) Information processor
JPH05165640A (en) Microprocessor
JPH04251331A (en) Information processor
JPH036735A (en) Data processor
JPS63288331A (en) Information processor
JPH04177432A (en) Multi-task executing device
JPH0442328A (en) Interruption control system for information processor
JPH01175632A (en) Micro program controller
JPH03139723A (en) Data processor
JPH0340075A (en) Microcomputer
JPH0682321B2 (en) Micro controller
JPH02181231A (en) Data processor
JPH03208140A (en) Input/output log recording system
JPH05181667A (en) Microprogram control part
JPH08249024A (en) Programmable controller
JP2004206214A (en) Microprocessor