JPH10143354A - Dsp, and maximum and minimum value detector suiting it - Google Patents

Dsp, and maximum and minimum value detector suiting it

Info

Publication number
JPH10143354A
JPH10143354A JP29643496A JP29643496A JPH10143354A JP H10143354 A JPH10143354 A JP H10143354A JP 29643496 A JP29643496 A JP 29643496A JP 29643496 A JP29643496 A JP 29643496A JP H10143354 A JPH10143354 A JP H10143354A
Authority
JP
Japan
Prior art keywords
data
register
minimum value
maximum value
input data
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
JP29643496A
Other languages
Japanese (ja)
Inventor
Toshiyuki Okamura
俊幸 岡村
Hideaki 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.)
Japan Radio Co Ltd
Original Assignee
Japan Radio 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 Japan Radio Co Ltd filed Critical Japan Radio Co Ltd
Priority to JP29643496A priority Critical patent/JPH10143354A/en
Publication of JPH10143354A publication Critical patent/JPH10143354A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PROBLEM TO BE SOLVED: To make the detection of the maximum and minimum values efficient in a DSP(digital signal processor), to reduce the number of program steps, and to reduce the power consumption. SOLUTION: The maximum and minimum value detector 20 is provided independently of an arithmetic block which executes processing such as addition, subtraction, sum of product, shift, etc. A controlling part 21 of the detector 20 controls and sets write paths of data and numbers so that the maximum or minimum value may be written to a register R1, the next maximum or minimum value to a register R2, the number of data on the register R1 to a register R3, the number of data on the register R2 to a register R4 respectively by using selectors S1 to S4. A comparator 23 decides the size relation between data of the registers R1 and R2 and data that is inputted through an inputting part 22 and supplies the result to the part 21. Because an operation controlled by the part 21 can be carried out with one piece of data in one basic cycle, processing is further accelerated.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、DSP(ディジタ
ルシグナルプロセッサ)のアーキテクチャに関する。
The present invention relates to a DSP (Digital Signal Processor) architecture.

【0002】[0002]

【従来の技術及びその問題点】DSPは、一般に、加減
算、積和演算等を繰り返しかつ高速に実行する機能を有
している。しかしながら、加減算や積和演算のみでは音
声コーデック等の分野で要請されている高速での最大値
最小値検出処理を実行することが困難である。すなわ
ち、加減算や積和演算の組合せによって最大値最小値検
出処理等を実行するには、プログラムを工夫したとして
も、入力データ1個あたり数個の命令ステップが必要と
なるため、DSPの処理能力にとっては負担となり、ま
たその消費電力増大の原因ともなる。
2. Description of the Related Art A DSP generally has a function of repeatedly performing addition, subtraction, multiplication and accumulation, and the like at high speed. However, it is difficult to perform high-speed maximum / minimum value detection processing required in the field of a voice codec or the like only by addition / subtraction or product-sum operation. That is, in order to execute the maximum value / minimum value detection processing or the like by a combination of addition and subtraction or the product-sum operation, even if the program is devised, several instruction steps are required for each input data. Is a burden on the user, and causes an increase in power consumption.

【0003】[0003]

【発明の概要】本発明の目的の一つは、加減算器や積和
器を用いることなく、最大値及び/又は最小値の検出を
行えるようDSPを構成することにより、音声コーデッ
ク等で実行する必要がある大規模プログラムを高速でか
つ低消費電力で実行可能にすることにある。また、本発
明の目的の一つは、最大値及び/又は最小値検出をデー
タ1個当り1個の基本サイクルにて実行可能にすること
により、上記目的を好適に達成することにある。また、
本発明の目的の一つは、最大値及び又は最小値の検出と
共に、最大値を有するデータ及び/又は最小値を有する
データの番号をも検出可能にすることにある。本発明の
目的の一つは、外部からの指令に応じ、最大値検出、最
小値検出、初期設定等を選択的に実行可能にすることに
ある。
SUMMARY OF THE INVENTION One of the objects of the present invention is to execute a speech codec or the like by configuring a DSP so as to detect a maximum value and / or a minimum value without using an adder / subtracter or a product-sum unit. An object of the present invention is to enable a large-scale program to be executed at high speed and with low power consumption. Another object of the present invention is to appropriately achieve the above object by enabling detection of a maximum value and / or a minimum value in one basic cycle per data. Also,
One of the objects of the present invention is to make it possible to detect not only the maximum value and / or the minimum value but also the number of the data having the maximum value and / or the data having the minimum value. An object of the present invention is to enable the maximum value detection, the minimum value detection, the initial setting, and the like to be selectively executed in response to an external command.

【0004】かかる目的を達成すべく、本発明に係るD
SPは、逐次入力される入力データの和、差、積和及び
シフト値のうち少なくともいずれかを求める第1演算ブ
ロックと、上記入力データの中から最大値若しくは最小
値を検出する第2演算ブロックと、を備えることを特徴
とする。このような機能を有する第2演算ブロックを第
1演算ブロックとは別にDSP内に設けることにより、
第1演算ブロックを用いることなく最大値や最小値の検
出を実行可能になるため、最大値又は最小値の検出に係
るDSPの処理量が低減し、従って処理能力への負担の
軽減や消費電力の増大の抑制を達成することができる。
In order to achieve such an object, the D
SP is a first operation block for obtaining at least one of a sum, a difference, a product sum, and a shift value of input data sequentially input, and a second operation block for detecting a maximum value or a minimum value from the input data. And the following. By providing the second operation block having such a function in the DSP separately from the first operation block,
Since the detection of the maximum value or the minimum value can be executed without using the first operation block, the processing amount of the DSP related to the detection of the maximum value or the minimum value is reduced, so that the load on the processing capacity is reduced and the power consumption is reduced. Can be suppressed.

【0005】また、上述の第2演算ブロックとしては、
例えば、過去の入力データを一時記憶する第1レジスタ
と、新しい入力データ及び上記第1レジスタ上の過去の
入力データの間の大小関係を検出する比較器と、検出さ
れた大小関係からみて最大の値を有するデータを第1レ
ジスタに記憶させる最大値データ書込み手段とを備える
最大値検出器を、使用することができる。あるいは、こ
の最大値検出器にて用いている最大値データ書込手段に
代え、検出された大小関係からみて最小の値を有するデ
ータを第1レジスタに記憶させる最小値データ書込み手
段を備える最小値検出器を、使用することができる。こ
のような構成を有する最大値又は最小値検出器を上述の
第2演算ブロックとして使用した場合、1個の入力デー
タに関する処理が最大値又は最小値データ書き込み手段
の基本サイクル1個で終了するため、本発明に係るDS
Pにおける効果、例えば大規模プログラム実行時の処理
ステップ数の低減がより顕著になり、従って消費電力、
プログラムステップ数、プログラム容量の大幅な低減を
実現できる。すなわち、最大値又は最小値データ書込み
手段は、比較器にて検出された大小関係の入力・判別
と、その結果に基づく第1レジスタへのデータの書込み
とを、合計1基本サイクルにて、例えば各半サイクルに
て実行することができるため、上述のような効果が得ら
れる。
[0005] Further, as the above-mentioned second operation block,
For example, a first register for temporarily storing past input data, a comparator for detecting a magnitude relationship between new input data and past input data on the first register, and a maximum value in view of the detected magnitude relationship. Maximum value data writing means for storing data having a value in the first register. Alternatively, in place of the maximum value data writing means used in the maximum value detector, a minimum value including minimum value data writing means for storing data having a minimum value in the first register in view of the detected magnitude relation. A detector can be used. When the maximum value or minimum value detector having such a configuration is used as the above-described second arithmetic block, the processing for one input data is completed in one basic cycle of the maximum value or minimum value data writing unit. , DS according to the present invention
The effect in P, for example, the reduction in the number of processing steps when executing a large-scale program becomes more conspicuous, so that power consumption,
The number of program steps and the program capacity can be greatly reduced. That is, the maximum value or minimum value data writing means performs the input / determination of the magnitude relationship detected by the comparator and the writing of data to the first register based on the result in a total of one basic cycle, for example. Since it can be executed in each half cycle, the above-described effects can be obtained.

【0006】更に、上述の第2演算ブロックは、上述の
最大値検出器及び最小値検出器双方の機能を有する最大
値最小値検出器としても実現することができる。この場
合、好ましくは、データ書込みパス制御手段を設けるの
が好ましい。データ書込みパス制御手段は、最大値検出
が指令されたときには最大値データ書込み手段を、最小
値検出が指令されたときには最小値データ書込み手段
を、各々動作させる。このような構成を採用することに
より、外部から、第2演算ブロックにおける動作モード
を切り替えることができる。
Further, the second operation block can be realized as a maximum value minimum value detector having both functions of the maximum value detector and the minimum value detector. In this case, it is preferable to provide data write path control means. The data writing path control means operates the maximum value data writing means when the maximum value detection is instructed, and operates the minimum value data writing means when the minimum value detection is instructed. By employing such a configuration, the operation mode in the second operation block can be switched from outside.

【0007】また、好ましくは、本発明に係る最大値検
出器、最小値検出器又は最大値最小値検出器は、逐次入
力される入力データ各々に計数によって番号を付与する
カウンタ部と、各々の過去の入力データの番号を一時記
憶する第2レジスタと、第1レジスタ上のデータに対応
する番号が第2レジスタ上に一時記憶されるよう、第1
レジスタへのデータの書込みと同期して第2レジスタ上
の番号を更新する番号書込み手段と、を備える。かかる
構成とすることにより、最大値や最小値のみならず、最
大値や最小値を有する入力データの番号をも、1基本サ
イクルにて検出することが可能になる。また、上記カウ
ンタ部から、上記第1又は第2レジスタへのデータ又は
番号の書込みタイミングを、上記計数のタイミングと同
期して与えるようにすることにより、第1レジスタ上の
データと第2レジスタ上の番号との対応関係を常に維持
することができる。
Preferably, the maximum value detector, the minimum value detector or the maximum value minimum value detector according to the present invention comprises: a counter unit for assigning a number to each of sequentially input data by counting; A second register for temporarily storing the number of past input data, and a first register for temporarily storing a number corresponding to data on the first register on the second register.
Number writing means for updating a number on the second register in synchronization with writing of data to the register. With this configuration, it is possible to detect not only the maximum value and the minimum value but also the number of the input data having the maximum value and the minimum value in one basic cycle. Further, the timing of writing data or a number from the counter unit to the first or second register is given in synchronization with the timing of the counting, so that the data on the first register and the data on the second register are given. Can always be maintained in correspondence with the number.

【0008】そして、本発明に係る最大値検出器、最小
値検出器又は最大値最小値検出器は、好ましくは、第1
又は第2レジスタの少なくともいずれかへのデータ又は
番号の初期設定が指定されたときに、新たな入力データ
又は上記カウンタ部の出力を初期設定先のレジスタに記
憶させる初期設定パス制御手段を備える。かかる初期設
定パス制御手段を設けることにより、第1又は第2レジ
スタ上に、所望のデータ又は番号を初期設定することが
可能になる。加えて、本発明に係る最大値検出器、最小
値検出器又は最大値最小値検出器は、好ましくは、第1
又は第2レジスタに記憶されているデータ又は番号を選
択的に出力させる出力セレクタを備える。かかる出力セ
レクタを設けることにより、第1又は第2レジスタ上の
データ又は番号を、外部からの要求に応じて出力するこ
とが可能になる。
[0008] The maximum value detector, the minimum value detector or the maximum value minimum value detector according to the present invention is preferably the first value detector.
Alternatively, an initial setting path control means for storing new input data or an output of the counter unit in an initial setting destination register when initial setting of data or a number in at least one of the second registers is designated. Providing such an initialization path control means makes it possible to initialize desired data or numbers on the first or second register. In addition, the maximum value detector, the minimum value detector, or the maximum value minimum value detector according to the present invention is preferably the first value detector.
Alternatively, an output selector for selectively outputting data or a number stored in the second register is provided. By providing such an output selector, it becomes possible to output data or numbers on the first or second register in response to an external request.

【0009】[0009]

【発明の実施の形態】以下、本発明の好適な実施形態に
関し図面に基づき説明する。なお、以下に示す実施形態
は単なる一例に過ぎず、本願の開示に基づき当業者が容
易に実施しうる性質の変形に関しては、本願発明の技術
範囲に属するものと認定されるべきである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. The embodiment described below is merely an example, and any modification of a property that can be easily implemented by those skilled in the art based on the disclosure of the present application should be recognized as belonging to the technical scope of the present invention.

【0010】図1に、本発明の一実施形態に係るDSP
の機能構成を示す。この図に示すDSPは、4本のバス
A〜Dを、加減算器10a、積和器10b、シフト演算
器10c及び最大値最小値検出器20に、入力選択部S
AB及びSCDによって、選択的に接続する構成を有してい
る。従って、バスA〜Dを介し供給されたデータは、加
減算器10a、積和器10b、シフト演算器10c及び
最大値最小器検出器20に選択的に供給され、入力デー
タの和又は差、積和、シフト値、あるいは最大値又は最
小値が演算される。加減算器10a、積和器10b、シ
フト演算器10c及び最大値最小値検出器20の後段に
各々ラッチ部L1〜L4が設けられている。ラッチ部L
1〜L4は、加減算器10a、積和器10b、シフト演
算器10c及び最大値最小値検出器20のうち対応する
ものからの出力データをラッチし、図示しない後段の回
路に供給している。
FIG. 1 shows a DSP according to an embodiment of the present invention.
The functional configuration of is shown. In the DSP shown in FIG. 1, the four buses A to D are added to an adder / subtractor 10a, a sum-of-products 10b, a shift calculator 10c, and a maximum value / minimum value detector 20 by an input selector S
By AB and S CD, it has a structure to selectively connect. Therefore, the data supplied via the buses A to D is selectively supplied to the adder / subtracter 10a, the product-sum device 10b, the shift calculator 10c, and the maximum / minimum detector 20 to obtain the sum, difference, and product of the input data. A sum, shift value, or maximum or minimum value is calculated. Latch sections L1 to L4 are provided at the subsequent stage of the adder / subtracter 10a, the sum of products 10b, the shift calculator 10c, and the maximum / minimum value detector 20, respectively. Latch section L
1 to L4 latch output data from the corresponding one of the adder / subtracter 10a, the product-sum unit 10b, the shift calculator 10c, and the maximum / minimum value detector 20, and supply the latched data to a subsequent circuit (not shown).

【0011】図1に示すDSPが特徴とするところは、
加減算器10a、積和器10b及びシフト演算器10c
から構成される第1演算ブロック10とは独立して、第
2演算ブロックたる最大値最小値検出器20を設けたこ
とにある。すなわち、最大値最小値検出器20を第1演
算ブロック10から独立した演算ブロックとして設けて
いるため、最大値最小値検出のために第1演算ブロック
10を用いて加減算や積和演算を行いその結果第1演算
ブロック10の処理負担を増大させるといった支障を、
発生させることはない。また、後述のように、最大値最
小値検出器20は、1個の入力データに関し1個の基本
サイクルにて最大値又は最小値検出の処理を実行するこ
とができるよう構成されているため、例えば音声コーデ
ックなどで実行される大規模プログラムを例とすると、
全体で数万個のプログラムステップの低減が可能とな
り、従って消費電力やプログラム容量を大幅に低減する
ことができる。
The features of the DSP shown in FIG.
Adder / subtracter 10a, sum-of-products 10b, and shift calculator 10c
Is provided with a maximum value / minimum value detector 20, which is a second operation block, independently of the first operation block 10 composed of. That is, since the maximum / minimum value detector 20 is provided as an arithmetic block independent of the first arithmetic block 10, the first arithmetic block 10 is used to perform addition / subtraction or product-sum operation for maximum / minimum value detection. As a result, there is a problem that the processing load of the first operation block 10 is increased.
It does not. Further, as described later, the maximum value / minimum value detector 20 is configured to be able to execute the processing of detecting the maximum value or the minimum value in one basic cycle for one input data. For example, a large-scale program executed by an audio codec, for example,
It is possible to reduce tens of thousands of program steps in total, so that power consumption and program capacity can be significantly reduced.

【0012】図2に、本実施形態にて使用可能な最大値
最小値検出器20の一例構成を示す。この図において
は、4個のレジスタ(reg)R1〜R4と、これらに
各々対応するセレクタ(sel)S1〜S4とが用いら
れている。レジスタR1は、過去入力されたデータのう
ち最大又は最小の値を一時記憶するためのレジスタであ
り、レジスタR2はこれに次いで大きい値又は小さい値
を一時記憶するためのレジスタである。レジスタR3及
びR4は、各々、レジスタR1及びR2上のデータに付
与された番号を格納するためのレジスタである。セレク
タS1及びS2は、制御部21と併せ、レジスタR1及
びR2へのデータ書込みパスを制御及び設定する手段を
構成しており、セレクタS1及びS4は制御部21と併
せ、レジスタR3及びR4への番号書込みパスを制御及
び設定する手段を実現している。更に、入力部22は、
入力選択部SAB又はSCDから供給される入力データを比
較器23、セレクタS1〜S4、カウンタ部24等に供
給する機能を有している。比較器23は、レジスタR1
及びR2上のデータと、入力部22から供給されたデー
タとを比較し、その大小関係を検出して制御部21に報
知する。カウンタ部24は、所定速度で計数等を実行
し、その結果得られたカウント値をセレクタS1又はS
4を介しレジスタR3又はR4に一時記憶させる一方
で、セレクタS1〜S4に対し選択動作のタイミングを
計数タイミングと同期して与えている。出力セレクタS
0は、例えば制御部21からの指令に応じ、レジスタR
1〜R4上のデータのうちいずれか、すなわち最大値、
最小値又はカウンタ部24によるカウント値を選択的に
出力する。
FIG. 2 shows an example of the configuration of the maximum value / minimum value detector 20 usable in this embodiment. In this figure, four registers (reg) R1 to R4 and selectors (sel) S1 to S4 corresponding to them are used. The register R1 is a register for temporarily storing the maximum or minimum value of the past input data, and the register R2 is a register for temporarily storing the next larger or smaller value. The registers R3 and R4 are registers for storing numbers given to data on the registers R1 and R2, respectively. The selectors S1 and S2 constitute, together with the control unit 21, means for controlling and setting a data write path to the registers R1 and R2, and the selectors S1 and S4, together with the control unit 21, provide access to the registers R3 and R4. A means for controlling and setting the number writing path is realized. Further, the input unit 22
It has a function of supplying input data supplied from the input selection unit S AB or S CD to the comparator 23, the selectors S1 to S4, the counter unit 24, and the like. The comparator 23 includes a register R1
And the data on R2 and the data supplied from the input unit 22 are compared, and the magnitude relation is detected and reported to the control unit 21. The counter unit 24 performs counting at a predetermined speed, and counts the resulting count value to the selector S1 or S1.
4, while temporarily storing the data in the register R3 or R4, the timing of the selection operation is given to the selectors S1 to S4 in synchronization with the counting timing. Output selector S
0 is, for example, in response to a command from the control unit 21,
Any one of the data on 1 to R4, that is, the maximum value,
The minimum value or the count value of the counter unit 24 is selectively output.

【0013】図2に示す最大値最小値検出器20におい
ては、具体的には、次のような手順によって最大値検出
が実行される。
In the maximum / minimum value detector 20 shown in FIG. 2, specifically, the maximum value is detected by the following procedure.

【0014】まず、入力選択部をSAB又はSCDを介しバ
スA〜Dから入力データが与えられると、入力部22は
最大値検出の対象とすべき入力データを比較器23に供
給する。比較器23は、この入力データをレジスタR1
及びR2上のデータと比較し、これによりこれら3種類
のデータの間の大小関係を検出する。制御部21は、比
較器23にて検出された大小関係に基づきレジスタR1
及びR2に信号を供給し書込みを可能にすると共に、セ
レクタS1及びS2に対し信号を供給しデータ書込みパ
スを設定する。例えば、入力部22から比較器23に与
えられた入力データが3種類のデータの中で最大の値を
有している旨比較器23にて検出されたときには、制御
部21は、レジスタR1上のデータがレジスタR2に転
送格納され、かつ入力部22から比較器23に与えられ
たデータがレジスタR1上に格納されるよう、セレクタ
S1及びS2を用いたデータ書込みパスの設定を実行す
る。また、入力部22からのデータが2番目に大きなデ
ータであることが比較器23にて検出されたときには、
制御部21は、入力部22から比較器23に入力された
データがレジスタR2上に格納されるよう、データ書込
みパスを設定する。そして、入力部22から比較器23
に供給された入力データが3種類のデータの中で最も小
さな値を有することが比較器23にて検出されたときに
は、制御部21は、レジスタR1及びR2の内容がその
まま維持されるよう、データ書込みパスを設定する。こ
のような手順を実行することにより、常に、レジスタR
1上にはこれまで入力したデータの中で最大の値を有す
るものが格納され、レジスタR2上にはその次に大きな
値を有するものが格納されることになる。
First, when input data is supplied to the input selector from the buses A to D via S AB or S CD , the input unit 22 supplies input data to be subjected to maximum value detection to the comparator 23. The comparator 23 outputs the input data to the register R1.
And data on R2, thereby detecting the magnitude relationship between these three types of data. The control unit 21 sets the register R1 based on the magnitude relation detected by the comparator 23.
And a signal to R2 to enable writing, and a signal to selectors S1 and S2 to set a data write path. For example, when the comparator 23 detects that the input data given from the input unit 22 to the comparator 23 has the maximum value among the three types of data, the control unit 21 sets The data write path is set using the selectors S1 and S2 so that the data is transferred and stored in the register R2, and the data supplied from the input unit 22 to the comparator 23 is stored in the register R1. When the comparator 23 detects that the data from the input unit 22 is the second largest data,
The control unit 21 sets a data write path so that the data input from the input unit 22 to the comparator 23 is stored in the register R2. Then, from the input unit 22 to the comparator 23
When the comparator 23 detects that the input data supplied to the comparator 23 has the smallest value among the three types of data, the control unit 21 transmits the data so that the contents of the registers R1 and R2 are maintained as they are. Set the write path. By performing such a procedure, the register R
The data having the largest value among the data input so far is stored in 1 and the data having the next largest value is stored in the register R2.

【0015】また、制御部21は、上述のデータ書込み
パスの制御・設定と同時に、番号の書込みパスの制御・
設定をも実行している。すなわち、レジスタR1上のデ
ータに対応する番号がレジスタR3上に、またレジスタ
R2上のデータに対応する番号がレジスタR4上に常に
格納されるよう、セレクタS3及びS4を用いた番号書
込みパスの制御・設定を実行する。この制御・設定に関
しては、データ書込みパスの制御・設定の手順と相似で
あるので、ここでは説明を省略するが、当業者には容易
にかつ一義に理解することができるであろう。その理解
にあたっては、カウンタ部24によって、最新の入力デ
ータの番号が与えられていることに留意されたい。
The control unit 21 controls and sets the number writing path simultaneously with the control and setting of the data writing path.
The settings are also running. That is, control of the number writing path using the selectors S3 and S4 so that the number corresponding to the data on the register R1 is always stored on the register R3 and the number corresponding to the data on the register R2 is always stored on the register R4. -Execute the setting. This control / setting is similar to the control / setting procedure of the data write path, and thus the description thereof is omitted here, but it will be easily and uniquely understood by those skilled in the art. In understanding, it should be noted that the latest input data number is given by the counter unit 24.

【0016】制御部21は、レジスタR1〜R4上にあ
るデータ又は番号を選択的に後段に供給すべく、出力セ
レクタS0に対し信号を供給する。出力セレクタS0
は、この信号に応じて、レジスタR1〜R4上のデータ
又は番号の中から1個乃至数個を選択的に出力する。こ
のような処理の結果、最大値やこれに対応する番号とい
った情報を、後段の回路が選択的に受け取ることが可能
になる。
The control section 21 supplies a signal to the output selector S0 in order to selectively supply data or numbers in the registers R1 to R4 to a subsequent stage. Output selector S0
Selectively outputs one or several data or numbers from the registers R1 to R4 in response to this signal. As a result of such processing, it becomes possible for a subsequent circuit to selectively receive information such as a maximum value and a number corresponding thereto.

【0017】制御部21は、上述のような最大値検出動
作を、最大値検出を指令する制御信号に応じて実行す
る。最小値検出を指令する制御信号が与えられていると
きには、制御部21は、上述の最大値検出手順に替えて
最小値検出手順を実行する。最小値検出手順の具体的な
内容に関しては、上述の最大値検出手順の説明中、「最
大値」「大きい」等の記載を「最小値」「小さい」等と
読み替えられたい。制御部21は、また、初期設定を指
令する制御信号が与えられたときには、例えば、入力部
22から供給されるデータをレジスタR1〜R4やカウ
ンタ部24に直接書込み又は設定する等の初期設定動作
を、実行する。このように、図2に示す最大値最小値検
出器20においては、その動作モードを、最大値検出、
最小値検出、初期設定といった3種類の間で切り替える
ことができる。
The control unit 21 executes the above-described maximum value detection operation in accordance with a control signal instructing the maximum value detection. When the control signal instructing the minimum value detection is given, the control unit 21 executes the minimum value detection procedure instead of the above-described maximum value detection procedure. Regarding the specific contents of the minimum value detection procedure, in the above description of the maximum value detection procedure, descriptions such as “maximum value” and “large” should be read as “minimum value” and “small”. When a control signal for instructing initialization is given, the control unit 21 performs, for example, an initialization operation such as directly writing or setting data supplied from the input unit 22 to the registers R1 to R4 and the counter unit 24. Is executed. As described above, in the maximum / minimum value detector 20 shown in FIG.
It is possible to switch between three types such as minimum value detection and initial setting.

【0018】なお、図2の最大値最小値検出器20にお
いては、大きい方からあるいは小さい方から2個目まで
のデータ及びその番号を検出するようにしているが、セ
レクタ用レジスタの個数を増やすことによって、3番目
以降のデータ又はその番号をも検出することができる。
加えて、必要がない場合には、番号の検出に係る構成部
材は省略しても構わない。
Although the maximum value minimum value detector 20 shown in FIG. 2 detects the second data from the largest or the smallest and the number thereof, the number of selector registers is increased. This makes it possible to detect the third and subsequent data or their numbers.
In addition, when it is not necessary, the components related to the number detection may be omitted.

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

【図1】 本発明の一実施形態に係るDSPの機能構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a functional configuration of a DSP according to an embodiment of the present invention.

【図2】 この実施形態において利用可能な最大値最小
値検出器の構成の例を示すブロック図である。
FIG. 2 is a block diagram illustrating an example of a configuration of a maximum value / minimum value detector usable in this embodiment.

【符号の説明】 10 第1演算ブロック、20 最大値最小値検出器、
21 制御部、22入力部、23 比較器、24 カウ
ント部、S0〜S4 セレクタ、R1〜R4レジスタ。
[Description of Signs] 10 first operation block, 20 maximum value minimum value detector,
21 control unit, 22 input unit, 23 comparator, 24 counting unit, S0 to S4 selector, R1 to R4 register.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 逐次入力される入力データの和、差、積
和及びシフト値のうち少なくともいずれかを求める第1
演算ブロックと、上記入力データの中から最大値若しく
は最小値を検出する第2演算ブロックと、を備えること
を特徴とするDSP。
1. A first method for determining at least one of a sum, a difference, a product sum, and a shift value of input data sequentially input.
A DSP comprising: an operation block; and a second operation block that detects a maximum value or a minimum value from the input data.
【請求項2】 過去の入力データを一時記憶する第1レ
ジスタと、新しい入力データ及び上記第1レジスタ上の
過去の入力データの間の大小関係を検出する比較器と、
検出された大小関係からみて最大の値を有するデータを
第1レジスタに記憶させる最大値データ書込み手段と、
を備え、請求項1記載のDSPにて第2演算ブロックと
して使用されることを特徴とする最大値検出器。
2. A first register for temporarily storing past input data, a comparator for detecting a magnitude relationship between new input data and past input data on the first register,
Maximum value data writing means for storing data having the maximum value in view of the detected magnitude relation in the first register;
A maximum value detector used as the second operation block in the DSP according to claim 1.
【請求項3】 過去の入力データを一時記憶する第1レ
ジスタと、新しい入力データ及び上記第1レジスタ上の
過去の入力データの間の大小関係を検出する比較器と、
検出された大小関係からみて最小の値を有するデータを
第1レジスタに記憶させる最小値データ書込み手段と、
を備え、請求項1記載のDSPにて第2演算ブロックと
して使用されることを特徴とする最小値検出器。
3. A first register for temporarily storing past input data, a comparator for detecting a magnitude relationship between new input data and past input data on the first register,
Minimum value data writing means for storing data having a minimum value in view of the detected magnitude relation in the first register;
A minimum value detector used as the second operation block in the DSP according to claim 1.
【請求項4】 請求項2記載の最大値検出器と、検出さ
れた大小関係からみて最小の値を有するデータを第1レ
ジスタに記憶させる最小値データ書込み手段と、最大値
検出が指令されたときには最大値データ書込み手段を、
最小値検出が指令されたときには最小値データ書込み手
段を、各々動作させるデータ書込みパス制御手段と、を
備え、請求項1記載のDSPにて第2演算ブロックとし
て使用されることを特徴とする最大値最小値検出器。
4. A maximum value detector according to claim 2, a minimum value data writing means for storing data having a minimum value in view of the detected magnitude relationship in a first register, and a maximum value detection command is issued. Sometimes the maximum value data writing means
2. The DSP according to claim 1, further comprising data write path control means for operating the minimum value data writing means when the minimum value detection is instructed, and being used as a second operation block in the DSP according to claim 1. Value minimum detector.
【請求項5】 逐次入力される入力データ各々に計数に
よって番号を付与するカウンタ部と、過去の入力データ
の番号を一時記憶する第2レジスタと、第1レジスタ上
のデータに対応する番号が第2レジスタ上に一時記憶さ
れるよう、第1レジスタへのデータの書込みと同期して
第2レジスタ上の番号を更新する番号書込み手段と、を
備え、請求項1記載のDSPにて第2演算ブロックとし
て使用されることを特徴とする請求項2乃至4記載の検
出器。
5. A counter unit for assigning a number to each successively inputted input data by counting, a second register for temporarily storing the number of past input data, and a second register corresponding to data on the first register. 2. A number writing means for updating a number in the second register in synchronization with writing of data to the first register so as to be temporarily stored in the second register. 5. The detector according to claim 2, wherein the detector is used as a block.
【請求項6】 上記カウンタ部が、上記第1又は第2レ
ジスタへのデータ又は番号の書込みタイミングを、上記
計数のタイミングと同期して与えることを特徴とする請
求項5記載の検出器。
6. The detector according to claim 5, wherein the counter section gives a timing of writing data or a number to the first or second register in synchronization with the timing of the counting.
【請求項7】 第1又は第2レジスタの少なくともいず
れかへのデータ又は番号の初期設定が指令されたとき
に、新たな入力データ又は上記カウント部の出力を初期
設定先のレジスタに記憶させる初期設定パス制御手段を
備えることを特徴とする請求項5又は6記載の検出器。
7. An initial setting for storing new input data or an output of the counting section in a register of an initial setting destination when an initial setting of data or a number to at least one of the first and second registers is instructed. 7. The detector according to claim 5, further comprising a setting path control unit.
【請求項8】 第1又は第2レジスタに記憶されている
データ又は番号を選択的に出力させる出力セレクタを備
えることを特徴とする請求項5乃至7記載の最大値最小
値検出器。
8. The maximum value / minimum value detector according to claim 5, further comprising an output selector for selectively outputting data or a number stored in the first or second register.
JP29643496A 1996-11-08 1996-11-08 Dsp, and maximum and minimum value detector suiting it Pending JPH10143354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29643496A JPH10143354A (en) 1996-11-08 1996-11-08 Dsp, and maximum and minimum value detector suiting it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29643496A JPH10143354A (en) 1996-11-08 1996-11-08 Dsp, and maximum and minimum value detector suiting it

Publications (1)

Publication Number Publication Date
JPH10143354A true JPH10143354A (en) 1998-05-29

Family

ID=17833495

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29643496A Pending JPH10143354A (en) 1996-11-08 1996-11-08 Dsp, and maximum and minimum value detector suiting it

Country Status (1)

Country Link
JP (1) JPH10143354A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094020A (en) * 2021-03-15 2021-07-09 西安交通大学 Hardware device and method for quickly searching maximum or minimum N values of data set

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094020A (en) * 2021-03-15 2021-07-09 西安交通大学 Hardware device and method for quickly searching maximum or minimum N values of data set
CN113094020B (en) * 2021-03-15 2023-03-28 西安交通大学 Hardware device and method for quickly searching maximum or minimum N values of data set

Similar Documents

Publication Publication Date Title
JP2006018413A (en) Processor and pipeline reconfiguration control method
US5812806A (en) Data driven information processor configuring each data packet with a multi-attribute tag having at least two components
JPH02195429A (en) Information processor
JPH10143354A (en) Dsp, and maximum and minimum value detector suiting it
JP2918019B2 (en) Test circuit for single-chip microprocessor
JP2002229970A (en) Simd product sum operation method, sum of product sum arithmetic circuit and semiconductor integrated circuit device
JP2002532811A (en) Musical sound data generating apparatus and method, and medium for providing the method
JPH09305401A (en) Computer and compiler
KR100343467B1 (en) Java processor
JPH0644389A (en) Data driving information processor
WO2010087098A1 (en) Parallel computing device, information processing system, parallel computing method, and information processing device
JP2001092658A (en) Data processing circuit and data processor
JP3541776B2 (en) Microcomputer
JP2000305782A (en) Arithmetic unit
JP3708560B2 (en) Data flow type information processor
JPH04184535A (en) Parallel arithmetic units
JP3110072B2 (en) Pre-normalization circuit
JPS63298633A (en) Instruction fetching control system in pipeline processor
JPH05204638A (en) Pipeline processor
JPH0620071A (en) Data driven information processor
JPH0573297A (en) Microcomputer
JPH023822A (en) Data processor
JPH04245333A (en) Information processor
JP2003122628A (en) Digital signal processor, program converter and communication system having digital signal processor
JP2004303058A (en) Vector processor and its data processing method