JP2003122557A - Sort circuit and sort method used for the circuit - Google Patents

Sort circuit and sort method used for the circuit

Info

Publication number
JP2003122557A
JP2003122557A JP2001314762A JP2001314762A JP2003122557A JP 2003122557 A JP2003122557 A JP 2003122557A JP 2001314762 A JP2001314762 A JP 2001314762A JP 2001314762 A JP2001314762 A JP 2001314762A JP 2003122557 A JP2003122557 A JP 2003122557A
Authority
JP
Japan
Prior art keywords
shift amount
data
amount data
circuit
parallel 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
JP2001314762A
Other languages
Japanese (ja)
Inventor
Shinko Ino
真弘 猪野
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.)
NEC Platforms Ltd
Original Assignee
NEC AccessTechnica 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 NEC AccessTechnica Ltd filed Critical NEC AccessTechnica Ltd
Priority to JP2001314762A priority Critical patent/JP2003122557A/en
Publication of JP2003122557A publication Critical patent/JP2003122557A/en
Pending legal-status Critical Current

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a sort circuit capable of shortening a time for notice to a main processor and a time for data comparison. SOLUTION: A shift amount calculation circuit 11 counts the bit number of '0' continued from the uppermost bit for parallel data a, and outputs shift amount data b. A comparison circuit 14 compares the magnitude of a shift amount temporarily held data c from a shift amount temporarily holding circuit 13 with that of a shift amount data b, and outputs a select signal d. A shift amount select circuit 12 selects the smaller one of the shift amount data b and the shift amount temporarily held data c by the select signal d, and outputs the selected data as shift amount selected data e. A shift amount latch circuit 15 latches the shift amount temporarily held data c by a shift amount latch pulse signal h from a shift amount timing generating circuit 16, and notifies the main processor 1 of shift amount latch data f.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はソート回路及びそれ
に用いるソート方法に関し、特に並列データにおける最
大値の検出を行うソート回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sorting circuit and a sorting method used therein, and more particularly to a sorting circuit for detecting a maximum value in parallel data.

【0002】[0002]

【従来の技術】従来、この種のソート回路においては、
単に与えられたデータが大きいか小さいかを知りたい場
合でも、並列データのデータバス幅に関わらず、並列デ
ータ自身を比較することによって、一連のデータ群中の
並列データにおける最大値の検出を行っている。
2. Description of the Related Art Conventionally, in this type of sorting circuit,
Even if you just want to know whether the given data is large or small, the maximum value in the parallel data in the series of data groups is detected by comparing the parallel data itself regardless of the data bus width of the parallel data. ing.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上述し
た従来のソート回路では、メインプロセッサのデータバ
ス幅より並列データのバス幅が大きい場合、一連のデー
タ群中の最大値をメインプロセッサに通知する際にデー
タを分割しなければならないため、1プロセッササイク
ルで通知することが難しい。
However, in the above-described conventional sorting circuit, when the bus width of the parallel data is larger than the data bus width of the main processor, the maximum value in the series of data groups is notified to the main processor. Since it is necessary to divide the data into two, it is difficult to notify in one processor cycle.

【0004】また、従来のソート回路では、データ比較
のビット幅が、並列データのバス幅分だけ必要となるた
め、並列データのバス幅が大きい場合、データ比較時間
を高速化することができない。
Further, in the conventional sort circuit, since the bit width for data comparison is required for the bus width of the parallel data, the data comparison time cannot be shortened when the bus width of the parallel data is large.

【0005】そこで、本発明の目的は上記の問題点を解
消し、メインプロセッサへの通知時間やデータ比較時間
を高速化することができるソート回路及びそれに用いる
ソート方法を提供することにある。
Therefore, an object of the present invention is to solve the above problems and to provide a sorting circuit and a sorting method used therefor which can speed up the notification time to the main processor and the data comparison time.

【0006】[0006]

【課題を解決するための手段】本発明によるソート回路
は、一連の全ての並列データに対して最上位ビットから
連続する“0”のビット数を計数してシフト量データを
算出する算出手段と、前記並列データが入力される毎に
直前のシフト量データと前記算出手段で算出されたシフ
ト量データとを比較する比較手段と、前記比較手段の比
較結果に応じて前記並列データが入力される毎に直前の
シフト量データと前記算出手段で算出されたシフト量デ
ータとの一方を上位装置に通知する通知手段とを備えて
いる。
A sorting circuit according to the present invention comprises a calculating means for calculating shift amount data by counting the number of consecutive "0" bits from the most significant bit for all series of parallel data. Comparing means for comparing the immediately preceding shift amount data with the shift amount data calculated by the calculating means each time the parallel data is inputted, and the parallel data is inputted according to the comparison result of the comparing means. Each of them is provided with notifying means for notifying one of the immediately preceding shift amount data and the shift amount data calculated by the calculating means to the higher-level device.

【0007】本発明によるソート方法は、一連の全ての
並列データに対して最上位ビットから連続する“0”の
ビット数を計数してシフト量データを算出し、前記並列
データが入力される毎にその算出されたシフト量データ
とその算出直前のシフト量データとを比較し、この比較
結果に応じて前記並列データが入力される毎に直前のシ
フト量データと前記算出されたシフト量データとの一方
を上位装置に通知するようにしている。
In the sorting method according to the present invention, the shift amount data is calculated by counting the number of consecutive "0" bits from the most significant bit for all the series of parallel data, and every time the parallel data is input. The calculated shift amount data and the shift amount data immediately before the calculation are compared with each other, and the shift amount data immediately before and the calculated shift amount data are input each time the parallel data is input according to the comparison result. One of them is notified to the host device.

【0008】すなわち、本発明によるソート回路は、一
連の全ての並列データに対して、最上位ビットから見て
最初に“1”となるビット位置を検出し、最上位ビット
からそのビット位置までの連続する“0”のビット数を
シフト量データとして計数し、これらのシフト量データ
を比較することによって、並列データ群中の最大値の範
囲検出を簡潔に表示可能としている。つまり、最大値の
範囲検出値として通知するデータを縮小することが可能
となる。
That is, the sorting circuit according to the present invention detects the bit position which becomes "1" first from the most significant bit in all series of parallel data, and detects the bit position from the most significant bit to the bit position. By counting the number of consecutive "0" bits as shift amount data and comparing these shift amount data, the maximum value range detection in the parallel data group can be simply displayed. That is, it is possible to reduce the data notified as the maximum value range detection value.

【0009】より具体的に説明すると、本発明によるソ
ート回路では、並列データaを最上位ビットから連続す
る“0”のビット数をシフト量データbに変換し、並列
データaが入力される毎に直前のシフト量データbと変
換したシフト量データbとを比較し、シフト量データの
小さい方、つまり並列データaの大きい方をシフト量デ
ータとして保持し、このシフト量データを最大値の範囲
検出値として通知している。
More specifically, in the sorting circuit according to the present invention, the number of consecutive "0" bits from the most significant bit of the parallel data a is converted into the shift amount data b, and every time the parallel data a is input. The shift amount data b immediately before is compared with the converted shift amount data b, and the smaller shift amount data, that is, the larger parallel data a is held as the shift amount data, and this shift amount data is within the maximum value range. Notified as a detected value.

【0010】本発明によるソート回路では、上述した比
較動作を最大値範囲検出動作時間内に行うことによっ
て、一連の並列データ群中における最大値の範囲検出を
可能としている。
In the sorting circuit according to the present invention, by performing the above-described comparison operation within the maximum value range detection operation time, it is possible to detect the maximum value range in a series of parallel data groups.

【0011】[0011]

【発明の実施の形態】次に、本発明の実施例について図
面を参照して説明する。図1は本発明の一実施例による
ソート回路の構成を示すブロック図である。図1におい
て、ソート回路1はシフト量算出回路11と、シフト量
選択回路12と、シフト量一時保持回路13と、比較回
路14と、シフト量ラッチ回路15と、シフト量タイミ
ング生成回路16とから構成され、メインプロセッサ2
が接続されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a sorting circuit according to an embodiment of the present invention. In FIG. 1, the sorting circuit 1 includes a shift amount calculation circuit 11, a shift amount selection circuit 12, a shift amount temporary holding circuit 13, a comparison circuit 14, a shift amount latch circuit 15, and a shift amount timing generation circuit 16. Configured, main processor 2
Are connected.

【0012】シフト量算出回路11は一連の並列データ
群において16ビットの並列データaに対して、最上位
ビットから見て最初に“1”となるビット位置を検出
し、最上位ビットからそのビット位置までの連続する
“0”のビット数を計数し、5ビットのシフト量データ
bを出力する。
The shift amount calculation circuit 11 detects the bit position which becomes "1" first from the most significant bit in the 16-bit parallel data a in the series of parallel data groups, and detects the bit from the most significant bit. The number of consecutive "0" bits up to the position is counted, and 5-bit shift amount data b is output.

【0013】シフト量一時保持回路13は現時点のシフ
ト量データの最小値を保持し、シフト量一時保持データ
cを出力する。シフト量タイミング生成回路16は最大
値範囲検出動作の最初に直前の並列データ群のシフト量
一時保持データcをクリアするためのシフト量クリアパ
ルス信号gと、最大値範囲検出動作の最後にシフト量一
時保持データcをラッチするためのシフト量ラッチパル
ス信号hとを生成して出力する。
The shift amount temporary holding circuit 13 holds the minimum value of the shift amount data at the present time and outputs the shift amount temporary holding data c. The shift amount timing generation circuit 16 has a shift amount clear pulse signal g for clearing the shift amount temporary holding data c of the immediately preceding parallel data group at the beginning of the maximum value range detecting operation, and a shift amount at the end of the maximum value range detecting operation. A shift amount latch pulse signal h for latching the temporarily held data c is generated and output.

【0014】シフト量ラッチ回路15はシフト量一時保
持回路13から与えられるシフト量一時保持データcを
シフト量タイミング生成回路16から与えられるシフト
量ラッチパルス信号hによってラッチし、シフト量ラッ
チデータfをメインプロセッサ1に通知する。
The shift amount latch circuit 15 latches the shift amount temporary holding data c supplied from the shift amount temporary holding circuit 13 by the shift amount latch pulse signal h supplied from the shift amount timing generating circuit 16 and the shift amount latch data f. Notify the main processor 1.

【0015】比較回路14はシフト量一時保持回路13
から与えられるシフト量一時保持データcとシフト量算
出回路11から与えられるシフト量データbとの大小比
較を行い、セレクト信号dを出力する。シフト量選択回
路12は比較回路14から与えられるセレクト信号dに
よって、シフト量算出回路11から与えられるシフト量
データbとシフト量一時保持回路13から与えられるシ
フト量一時保持データcとのうちのシフト量の小さい方
を選択してシフト量選択データeとして出力する。
The comparison circuit 14 is a shift amount temporary holding circuit 13.
The magnitude comparison between the shift amount temporary holding data c given by the shift amount and the shift amount data b given by the shift amount calculating circuit 11 is performed, and the select signal d is output. The shift amount selection circuit 12 shifts the shift amount data b given from the shift amount calculation circuit 11 and the shift amount temporary holding data c given from the shift amount temporary holding circuit 13 according to the select signal d given from the comparison circuit 14. The smaller amount is selected and output as shift amount selection data e.

【0016】図2は本発明の一実施例によるソート回路
1の動作を示すタイミングチャートである。これら図1
及び図2を参照して本発明の一実施例によるソート回路
1の動作について説明する。
FIG. 2 is a timing chart showing the operation of the sorting circuit 1 according to the embodiment of the present invention. These Figure 1
The operation of the sorting circuit 1 according to the embodiment of the present invention will be described with reference to FIG.

【0017】シフト量算出回路11は一連の並列データ
群において16ビットの並列データaに対して、最上位
ビットから見て最初に“1”となるビット位置を検出
し、最上位ビットからそのビット位置までの連続する
“0”のビット数を計数し、5ビットのシフト量データ
bを出力する。
The shift amount calculation circuit 11 detects a bit position which is "1" first from the most significant bit in the 16-bit parallel data a in the series of parallel data groups, and detects the bit from the most significant bit. The number of consecutive "0" bits up to the position is counted, and 5-bit shift amount data b is output.

【0018】比較回路14は並列データaが入力される
毎に、シフト量算出回路11から与えられるシフト量デ
ータbと、シフト量一時保持回路13から与えられる現
時点のシフト量データの最小値であるシフト量一時保持
データcとの間で大小比較を行い、シフト量の小さい方
を選択するためのセレクト信号dを出力する。
The comparison circuit 14 is the minimum value of the shift amount data b given from the shift amount calculating circuit 11 and the current shift amount data given from the shift amount temporary holding circuit 13 every time the parallel data a is inputted. The magnitude comparison is performed with the shift amount temporary holding data c, and the select signal d for selecting the smaller shift amount is output.

【0019】シフト量選択回路12は比較回路14から
与えられるセレクト信号dによって、シフト量算出回路
11から与えられるシフト量データbとシフト量一時保
持回路13から与えられる現時点のシフト量データの最
小値であるシフト量一時保持データcとのうちのシフト
量の小さい方を選択し、シフト量選択データeとして出
力する。
The shift amount selection circuit 12 responds to the select signal d given from the comparison circuit 14 with the minimum value of the shift amount data b given from the shift amount calculation circuit 11 and the current shift amount data given from the shift amount temporary holding circuit 13. One of the shift amount temporary holding data c which has the smaller shift amount is selected and output as shift amount selection data e.

【0020】シフト量一時保持回路13はシフト量選択
回路12から与えられるシフト量選択データeを一時保
持し、保持データとしてシフト量保持データcを出力す
る。シフト量タイミング生成回路16は直前の最大値範
囲検出時間内における並列データ群のシフト量一時保持
データcをクリアするために、最大値範囲検出時間の最
初にクリア信号を生成し、それをシフト量クリアパルス
信号gとしてシフト量一時保持回路13に与える。
The shift amount temporary holding circuit 13 temporarily holds the shift amount selection data e supplied from the shift amount selection circuit 12, and outputs the shift amount holding data c as the holding data. The shift amount timing generation circuit 16 generates a clear signal at the beginning of the maximum value range detection time in order to clear the shift amount temporary holding data c of the parallel data group within the immediately preceding maximum value range detection time, and outputs the clear signal. The clear pulse signal g is given to the shift amount temporary holding circuit 13.

【0021】また、シフト量タイミング生成回路16は
最大値範囲検出時間内における一連の並列データ群の最
大値範囲を保持するために、最大値範囲検出動作の最後
にラッチパルス信号を生成し、それをシフト量ラッチパ
ルス信号hとしてシフト量ラッチ回路15に与える。
Further, the shift amount timing generation circuit 16 generates a latch pulse signal at the end of the maximum value range detecting operation in order to hold the maximum value range of a series of parallel data groups within the maximum value range detection time, and Is given to the shift amount latch circuit 15 as a shift amount latch pulse signal h.

【0022】シフト量ラッチ回路15はシフト量タイミ
ング生成回路16から与えられるシフト量ラッチパルス
信号hによって、シフト量一時保持回路13から与えら
れるシフト量一時保持データcをラッチすることで、最
大値範囲検出時間内における並列データ群の最大値範囲
をシフト量ラッチデータfとしてメインプロセッサ1へ
通知する。
The shift amount latch circuit 15 latches the shift amount temporary holding data c given from the shift amount temporary holding circuit 13 by the shift amount latch pulse signal h given from the shift amount timing generating circuit 16 to obtain the maximum value range. The maximum value range of the parallel data group within the detection time is notified to the main processor 1 as the shift amount latch data f.

【0023】図2に示すシフト量算出回路の出力タイミ
ングを用いて本発明の一実施例によるソート回路1の動
作について具体的に説明する。図2は3種類の16ビッ
ト並列データを並列データaから入力し、最大値範囲検
出動作を並列データの先頭から3種類のデータに対して
実施した場合のタイミングを示している。
The operation of the sorting circuit 1 according to the embodiment of the present invention will be specifically described by using the output timing of the shift amount calculating circuit shown in FIG. FIG. 2 shows the timing when three types of 16-bit parallel data are input from the parallel data a and the maximum value range detection operation is performed on the three types of data from the beginning of the parallel data.

【0024】シフト量一時保持データcは前回の最大値
範囲検出時におけるデータが残っているため、最大値範
囲検出動作の最初にシフト量クリアパルスgによってク
リアし、‘10h’を出力する。
Since the shift amount temporary holding data c remains the data at the time of the previous maximum value range detection, it is cleared by the shift amount clear pulse g at the beginning of the maximum value range detection operation, and "10h" is output.

【0025】最初の並列データ‘0010h’は最上位
ビットから連続する“0”のビット数が「11」である
ため、シフト量データbは‘0Bh’となる。比較回路
14はシフト量データb値である‘0Bh’とシフト量
一時保持データc値である‘10h’とを比較し、セレ
クト信号dを出力する。これによって、シフト量の小さ
いシフト量データb値である‘0Bh’がシフト量選択
回路12からシフト量選択データeとして出力される。
In the first parallel data "0010h", since the number of bits of "0" consecutive from the most significant bit is "11", the shift amount data b becomes "0Bh". The comparison circuit 14 compares the shift amount data b value “0Bh” with the shift amount temporary holding data c value “10h” and outputs the select signal d. As a result, “0Bh”, which is the shift amount data b value with the small shift amount, is output from the shift amount selection circuit 12 as the shift amount selection data e.

【0026】次の並列データ‘1000h’は最上位ビ
ットから連続する“0”のビット数が「3」であるた
め、シフト量データbは‘03h’となる。比較回路1
4はシフト量データb値である‘03h’と、シフト量
一時保持データc値である‘0Bh’とを比較し、セレ
クト信号dを出力する。これによって、シフト量の小さ
いシフト量データb値である‘03h’がシフト量選択
回路12からシフト量選択データeとして出力される。
In the next parallel data "1000h", since the number of bits of "0" consecutive from the most significant bit is "3", the shift amount data b becomes "03h". Comparison circuit 1
Reference numeral 4 compares the shift amount data b value '03h' with the shift amount temporary holding data c value '0Bh' and outputs the select signal d. As a result, the shift amount data b value “03h” having a small shift amount is output from the shift amount selection circuit 12 as the shift amount selection data e.

【0027】次の並列データ‘0100h’は最上位ビ
ットから連続する“0”のビット数が「7」であるた
め、シフト量データbは‘07h’となる。比較回路1
4はシフト量データb値である‘07h’とシフト量一
時保持データc値である‘03h’とを比較し、セレク
ト信号dを出力する。これによって、シフト量の小さい
シフト量一時保持データc値である‘03h’がシフト
量選択回路12からシフト量選択データeとして出力さ
れる。
In the next parallel data "0100h", the number of consecutive "0" s from the most significant bit is "7", so the shift amount data "b" is "07h". Comparison circuit 1
Reference numeral 4 compares the shift amount data b value of '07h' with the shift amount temporary holding data c value of '03h', and outputs the select signal d. As a result, the shift amount temporary holding data c value “03h” having a small shift amount is output from the shift amount selection circuit 12 as the shift amount selection data e.

【0028】最大値範囲検出時間内における並列データ
群の最大値範囲であるシフト量ラッチデータfは、シフ
ト量ラッチパルス信号hが“1”の区間のクロックCL
Kの立上りでシフト量一時保持データc値を取込むこと
によって、‘03h’を出力する。
The shift amount latch data f, which is the maximum value range of the parallel data group within the maximum value range detection time, is the clock CL in the section where the shift amount latch pulse signal h is "1".
'03h' is output by taking in the shift amount temporary holding data c value at the rising edge of K.

【0029】このように、本実施例は、16ビットの並
列データaに対して、初めに“1”となるビット位置を
検出し、最上位ビットからそのビット位置までの連続す
る“0”のビット数を計数することによって、5ビット
のシフト量データbに変換し、これらのシフト量データ
bに対して、データ群中のすべてのデータと比較を行う
ことで、最大値の範囲検出を簡潔に行うことができる。
As described above, in this embodiment, the 16-bit parallel data "a" is first detected at the bit position which becomes "1", and the continuous "0" from the most significant bit to the bit position is detected. By converting the shift amount data b of 5 bits by counting the number of bits and comparing these shift amount data b with all the data in the data group, the maximum value range detection can be simplified. Can be done.

【0030】その際、一連の並列データaの比較を16
ビットデータ幅から5ビットデータ幅に変換した後のデ
ータに対して実施するので、一定時間内の一連のデータ
群における並列データaの最大値の範囲検出を行うため
のデータ比較の規模を縮小することができ、最大値の範
囲検出を簡潔に行うことができる。
At this time, a series of parallel data a is compared by 16
Since it is performed on the data after the conversion from the bit data width to the 5-bit data width, the scale of data comparison for detecting the maximum value range of the parallel data a in the series of data groups within a fixed time is reduced. Therefore, the maximum value range can be easily detected.

【0031】尚、本発明の一実施例では一定時間内の一
連のデータ群における16ビットの並列データaに対し
て,初めて“1”となるビット位置を検出し、最上位ビ
ットからそのビット位置までの連続する“0”のビット
数を計数し、この5ビットシフト量データにおいて最大
値の範囲検出を行うための比較について説明したが、一
連のデータ群の並列データ及び変換後のシフト量データ
のビット幅におけるデータ長の制限はない。
In the embodiment of the present invention, the bit position which becomes "1" for the first time is detected for 16-bit parallel data a in a series of data groups within a fixed time, and the bit position is determined from the most significant bit. The comparison for counting the number of consecutive "0" bits up to and detecting the maximum value range in this 5-bit shift amount data has been described. Parallel data of a series of data groups and shift amount data after conversion have been described. There is no limitation on the data length in the bit width of.

【0032】また、本発明の一実施例では比較回路14
においてシフト量データbと現時点のシフト量データの
最小値であるシフト量一時保持データcとの間で大小比
較を行い、シフト量の小さい方を選択することによって
最大値範囲を検出しているが、シフト量の大きい方を選
択することと、最大値範囲検出動作の最初のクリア時に
シフト量一時保持データ値をオール“0”とすることに
よって、最小値範囲の検出も行うことが可能となる。
Further, in one embodiment of the present invention, the comparison circuit 14
In the above, the magnitude comparison is performed between the shift amount data b and the shift amount temporary holding data c which is the minimum value of the shift amount data at the present time, and the maximum value range is detected by selecting the smaller shift amount. It is also possible to detect the minimum value range by selecting the one with the larger shift amount and setting the shift amount temporary holding data value to all “0” when the maximum value range detection operation is first cleared. .

【0033】さらに、請求項の記載に関連して本発明は
さらに次の態様をとりうる。
Further, in connection with the description of the claims, the present invention can have the following aspects.

【0034】(1)一連の全ての並列データに対して最
上位ビットから連続する“0”のビット数を計数してシ
フト量データを算出し、前記並列データが入力される毎
にその算出されたシフト量データとその算出直前のシフ
ト量データとを比較し、この比較結果に応じて前記並列
データが入力される毎に直前のシフト量データと前記算
出されたシフト量データとの一方を上位装置に通知し、
前記シフト量データの算出は、前記並列データに対し
て、最上位ビットから見て最初に“1”となるビット位
置を検出し、当該並列データの最上位ビットからそのビ
ット位置までの連続する“0”のビット数をシフト量デ
ータとして計数して行うようにしたことを特徴とするソ
ート方法。
(1) The shift amount data is calculated by counting the number of consecutive "0" bits from the most significant bit for all series of parallel data, and is calculated every time the parallel data is input. The shift amount data immediately before the calculation and the shift amount data immediately before the calculation thereof are compared, and one of the shift amount data immediately before and the calculated shift amount data is placed in the higher order every time the parallel data is input according to the comparison result. Notify the device,
The shift amount data is calculated by detecting a bit position which becomes “1” first from the most significant bit in the parallel data and continuing “from the most significant bit to the bit position of the parallel data”. A sorting method characterized in that the number of bits of "0" is counted as shift amount data.

【0035】(2)前記シフト量データの比較におい
て、前記シフト量データの小さい方を指定する選択信号
を前記比較結果として出力し、その選択信号で選択され
たシフト量データを最大値の範囲検出値として通知する
ようにしたことを特徴とする(1)記載のソート方法。
(2) In the comparison of the shift amount data, a selection signal designating the smaller one of the shift amount data is output as the comparison result, and the shift amount data selected by the selection signal is detected in the maximum value range. The sorting method described in (1) is characterized in that the value is notified.

【0036】(3)前記シフト量データの比較におい
て、前記シフト量データの大きい方を指定する選択信号
を前記比較結果として出力し、その選択信号で選択され
たシフト量データを最小値の範囲検出値として通知する
ようにしたことを特徴とする(1)または(2)記載の
ソート方法。
(3) In the comparison of the shift amount data, a selection signal designating a larger one of the shift amount data is output as the comparison result, and the shift amount data selected by the selection signal is detected as a range of the minimum value. The sorting method according to (1) or (2), characterized in that the value is notified.

【0037】(4)前記シフト量データの比較結果に応
じて前記並列データが入力される毎に直前のシフト量デ
ータと前記算出されたシフト量データとの一方を保持
し、その保持内容を前記上位装置に通知すべきタイミン
グで前記保持内容をラッチして前記上位装置に通知する
ようにしたことを特徴とする(1)から(3)のいずれ
か記載のソート方法。
(4) Each time the parallel data is input according to the comparison result of the shift amount data, one of the immediately preceding shift amount data and the calculated shift amount data is held, and the held content is described above. The sorting method according to any one of (1) to (3), characterized in that the held contents are latched at a timing to notify the host device and notified to the host device.

【0038】(5)前記シフト量データの算出時に前記
保持内容をクリアするようにしたことを特徴とする
(4)記載のソート方法。
(5) The sorting method according to (4), wherein the held contents are cleared when the shift amount data is calculated.

【0039】[0039]

【発明の効果】以上説明したように本発明は、一連の全
ての並列データに対して最上位ビットから連続する
“0”のビット数を計数してシフト量データを算出し、
並列データが入力される毎にその算出されたシフト量デ
ータとその算出直前のシフト量データとを比較し、この
比較結果に応じて並列データが入力される毎に直前のシ
フト量データと算出されたシフト量データとの一方を上
位装置に通知することによって、メインプロセッサへの
通知時間やデータ比較時間を高速化することができると
いう効果が得られる。
As described above, according to the present invention, the shift amount data is calculated by counting the number of consecutive "0" bits from the most significant bit for all series of parallel data.
Each time parallel data is input, the calculated shift amount data is compared with the shift amount data immediately before the calculation, and according to the comparison result, the shift amount data immediately before is calculated each time the parallel data is input. By notifying one of the shift amount data and the shift amount data to the upper device, it is possible to shorten the notification time to the main processor and the data comparison time.

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

【図1】本発明の一実施例によるソート回路の構成を示
すブロック図である。
FIG. 1 is a block diagram showing a configuration of a sorting circuit according to an embodiment of the present invention.

【図2】本発明の一実施例によるソート回路の動作を示
すタイミングチャートである。
FIG. 2 is a timing chart showing the operation of the sorting circuit according to the embodiment of the present invention.

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

1 ソート回路 2 メインプロセッサ 11 シフト量算出回路 12 シフト量選択回路 13 シフト量一時保持回路 14 比較回路 15 シフト量ラッチ回路 16 シフト量タイミング生成回路 a 並列データ b シフト量データ c シフト量一時保持データ d セレクト信号 e シフト量選択データ f シフト量ラッチデータ g シフト量クリアパルス信号 h シフト量ラッチパルス信号 1 sort circuit 2 main processor 11 Shift amount calculation circuit 12 Shift amount selection circuit 13 Shift amount temporary holding circuit 14 Comparison circuit 15 Shift amount latch circuit 16 shift amount timing generation circuit a parallel data b Shift amount data c Shift amount temporary holding data d Select signal e Shift amount selection data f Latch data for shift amount g Shift amount clear pulse signal h Shift amount latch pulse signal

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 一連の全ての並列データに対して最上位
ビットから連続する“0”のビット数を計数してシフト
量データを算出する算出手段と、前記並列データが入力
される毎に直前のシフト量データと前記算出手段で算出
されたシフト量データとを比較する比較手段と、前記比
較手段の比較結果に応じて前記並列データが入力される
毎に直前のシフト量データと前記算出手段で算出された
シフト量データとの一方を上位装置に通知する通知手段
とを有することを特徴とするソート回路。
1. A calculation means for calculating the shift amount data by counting the number of consecutive "0" bits from the most significant bit for all the series of parallel data, and immediately before each input of the parallel data. Comparing means for comparing the shift amount data and the shift amount data calculated by the calculating means, and the shift amount data immediately before and the calculating means each time the parallel data is input according to the comparison result of the comparing means. And a notifying unit that notifies one of the shift amount data calculated in step 1 to a higher-level device.
【請求項2】 前記算出手段は、前記並列データに対し
て、最上位ビットから見て最初に“1”となるビット位
置を検出し、当該並列データの最上位ビットからそのビ
ット位置までの連続する“0”のビット数をシフト量デ
ータとして計数するよう構成したことを特徴とする請求
項1記載のソート回路。
2. The calculating means detects, for the parallel data, a bit position which is first “1” when viewed from the most significant bit, and the consecutive bits from the most significant bit to the bit position of the parallel data. 2. The sorting circuit according to claim 1, wherein the number of bits of "0" is counted as shift amount data.
【請求項3】 前記比較手段は、前記シフト量データの
小さい方を指定する選択信号を前記比較結果として出力
し、 前記通知手段は、前記選択信号で選択されたシフト量デ
ータを最大値の範囲検出値として通知するようにしたこ
とを特徴とする請求項1または請求項2記載のソート回
路。
3. The comparing means outputs a selection signal designating the smaller one of the shift amount data as the comparison result, and the notifying means outputs the shift amount data selected by the selection signal in a range of a maximum value. The sorting circuit according to claim 1 or 2, wherein notification is made as a detection value.
【請求項4】 前記比較手段は、前記シフト量データの
大きい方を指定する選択信号を前記比較結果として出力
し、 前記通知手段は、前記選択信号で選択されたシフト量デ
ータを最小値の範囲検出値として通知するようにしたこ
とを特徴とする請求項1から請求項3のいずれか記載の
ソート回路。
4. The comparing means outputs a selection signal designating a larger one of the shift amount data as the comparison result, and the notifying means outputs the shift amount data selected by the selection signal in a range of a minimum value. The sorting circuit according to any one of claims 1 to 3, wherein notification is made as a detection value.
【請求項5】 前記比較手段の比較結果に応じて前記並
列データが入力される毎に直前のシフト量データと前記
算出手段で算出されたシフト量データとの一方を保持す
る保持手段と、前記保持手段の保持内容を前記上位装置
に通知すべきタイミングを前記通知手段に知らせる手段
とを含み、 前記通知手段が当該タイミングで前記保持手段に保持さ
れたシフト量データをラッチして前記上位装置に通知す
るようにしたことを特徴とする請求項1から請求項4の
いずれか記載のソート回路。
5. Holding means for holding one of the immediately preceding shift amount data and the shift amount data calculated by the calculating means each time the parallel data is input according to the comparison result of the comparing means, Means for notifying the notifying means of the timing at which the contents held by the holding means should be notified to the upper device, and the notifying means latches the shift amount data held in the holding device at the timing and notifies the upper device. The sorting circuit according to any one of claims 1 to 4, wherein notification is made.
【請求項6】 前記算出手段による前記シフト量データ
の算出時に前記保持手段の保持内容をクリアする手段を
含むことを特徴とする請求項5記載のソート回路。
6. The sorting circuit according to claim 5, further comprising means for clearing the contents held by the holding means when the shift amount data is calculated by the calculating means.
【請求項7】 一連の全ての並列データに対して最上位
ビットから連続する“0”のビット数を計数してシフト
量データを算出し、前記並列データが入力される毎にそ
の算出されたシフト量データとその算出直前のシフト量
データとを比較し、この比較結果に応じて前記並列デー
タが入力される毎に直前のシフト量データと前記算出さ
れたシフト量データとの一方を上位装置に通知するよう
にしたことを特徴とするソート方法。
7. A shift amount data is calculated by counting the number of consecutive "0" bits from the most significant bit for all series of parallel data, and the shift amount data is calculated every time the parallel data is input. The shift amount data is compared with the shift amount data immediately before the calculation, and every time the parallel data is input according to the comparison result, one of the immediately preceding shift amount data and the calculated shift amount data is set to a higher-level device. A sorting method characterized by being notified to.
JP2001314762A 2001-10-12 2001-10-12 Sort circuit and sort method used for the circuit Pending JP2003122557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001314762A JP2003122557A (en) 2001-10-12 2001-10-12 Sort circuit and sort method used for the circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001314762A JP2003122557A (en) 2001-10-12 2001-10-12 Sort circuit and sort method used for the circuit

Publications (1)

Publication Number Publication Date
JP2003122557A true JP2003122557A (en) 2003-04-25

Family

ID=19133022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001314762A Pending JP2003122557A (en) 2001-10-12 2001-10-12 Sort circuit and sort method used for the circuit

Country Status (1)

Country Link
JP (1) JP2003122557A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113131948A (en) * 2020-01-10 2021-07-16 瑞昱半导体股份有限公司 Data shift operation device and method with multiple modes

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113131948A (en) * 2020-01-10 2021-07-16 瑞昱半导体股份有限公司 Data shift operation device and method with multiple modes

Similar Documents

Publication Publication Date Title
JP2001352350A (en) Measurement system and method by statistic eye-diagram of continuous bit stream
JPS6152499B2 (en)
US6841987B2 (en) High speed measurement system which selects optimal measurement range on a sample by sample basis
JP3123931B2 (en) Time measuring system and time measuring method
US20020008548A1 (en) Device for detecting abnormality of clock signal
US6950375B2 (en) Multi-phase clock time stamping
JP2003122557A (en) Sort circuit and sort method used for the circuit
JP2002141786A (en) Device and its operating method
JP2000009809A (en) Ic test apparatus with wrong setting detection function
JP3197469B2 (en) Automatic data transmission rate detection circuit
JP3156273B2 (en) Pointer processing circuit
JP2004281040A (en) Frequency error detection device and detection method based on histogram data of input signal
JP2006303979A (en) Testing method for a/d converting circuit and a/d converting circuit
JPH084263B2 (en) Frame signal synchronization detection circuit
US8847810B2 (en) Pulse phase difference coding circuit
JP3513399B2 (en) Variable timing device using serial data
JPH07218603A (en) Bit error measuring unit with bit error analytic function
JP2776325B2 (en) Duty measurement circuit
JP2002267726A (en) Method of determining level of signal, and device therefor
JPH05175829A (en) Method and device for data input/output
JP3115756B2 (en) Demultiplexer circuit
CN116263865A (en) Signal average value calculating device and method thereof
JP2004164402A (en) Asynchronous reading method of timer count value, and timer
JPH04354220A (en) Start bit detection circuit
JPH0292024A (en) Interface circuit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041019

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050301