[go: up one dir, main page]

JP2016192694A - Stream processing apparatus - Google Patents

Stream processing apparatus Download PDF

Info

Publication number
JP2016192694A
JP2016192694A JP2015071914A JP2015071914A JP2016192694A JP 2016192694 A JP2016192694 A JP 2016192694A JP 2015071914 A JP2015071914 A JP 2015071914A JP 2015071914 A JP2015071914 A JP 2015071914A JP 2016192694 A JP2016192694 A JP 2016192694A
Authority
JP
Japan
Prior art keywords
data
stream
received
offset value
value
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.)
Granted
Application number
JP2015071914A
Other languages
Japanese (ja)
Other versions
JP6477155B2 (en
Inventor
啓史 山本
Hiroshi Yamamoto
啓史 山本
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2015071914A priority Critical patent/JP6477155B2/en
Publication of JP2016192694A publication Critical patent/JP2016192694A/en
Application granted granted Critical
Publication of JP6477155B2 publication Critical patent/JP6477155B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

【課題】複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部の負荷や必要なメモリ容量を削減することができるストリーム処理装置を提供する。【解決手段】実施形態のストリーム処理装置1は、ストリームデータを受信するチャンネルごとに設けられている複数のストリームバッファ11と、複数のストリームバッファ11から同じタイミングで読み出したストリームデータを用いてデータ処理を行うデータ処理部10と、を備えている。それぞれのストリームバッファ11は、受信したストリームデータを先入れ先出し方式で記憶するFIFO12(FIFOメモリ)と、FIFO12へ受信したストリームデータを書き込むタイミングを調整することで各チャンネルのストリームデータを同期させる同期回路21とによって構成されている。【選択図】図5Provided is a stream processing apparatus capable of reducing a load on a data processing unit and a necessary memory capacity in a configuration for processing using stream data received by a plurality of channels. A stream processing apparatus according to an embodiment performs data processing using a plurality of stream buffers provided for each channel that receives stream data, and stream data read from the plurality of stream buffers at the same timing. And a data processing unit 10 for performing the above. Each stream buffer 11 includes a FIFO 12 (FIFO memory) that stores received stream data by a first-in first-out method, and a synchronization circuit 21 that synchronizes the stream data of each channel by adjusting the timing of writing the received stream data to the FIFO 12. It is constituted by. [Selection] Figure 5

Description

本発明は、連続的に受信されるストリームデータを処理するストリーム処理装置に関する。   The present invention relates to a stream processing apparatus that processes continuously received stream data.

従来、例えば音楽データや映像データ、あるいはセンサ等から出力されるデータなど、連続的に受信されるストリームデータを処理するストリーム処理装置がある。このようなストリーム処理装置は、ストリームデータを連続的に受信することから、受信したストリームデータを例えば先入れ先出し方式で記憶するFIFOメモリで構成されたバッファに一時的にストリームデータを記憶し、記憶されているストリームを読み出してデータ処理部で処理している(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, there are stream processing apparatuses that process continuously received stream data such as music data, video data, or data output from a sensor. Since such a stream processing apparatus continuously receives stream data, the stream data is temporarily stored in a buffer constituted by a FIFO memory that stores the received stream data by, for example, a first-in first-out method. The stream is read and processed by the data processing unit (see, for example, Patent Document 1).

特開2011−23799号公報JP 2011-23799 A

しかしながら、複数のチャンネルで受信したストリームデータを用いて処理する場合には、チャンネル間でストリームデータを受信するタイミングにずれが生じることがあり、処理対象となるストリームデータをデータ処理部で同期させる必要があった。その結果、データ処理部の負荷が大きくなったり、必要なメモリ容量が大きくなったりするという問題があった。   However, when processing using stream data received on multiple channels, there may be a difference in the timing of receiving stream data between channels, and it is necessary to synchronize the stream data to be processed by the data processing unit. was there. As a result, there is a problem that the load on the data processing unit increases and the required memory capacity increases.

本発明は、上記した事情に鑑みてなされたものであり、その目的は、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部の負荷や必要なメモリ容量を削減することができるストリーム処理装置を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to reduce the load on the data processing unit and the required memory capacity in a configuration in which processing is performed using stream data received on a plurality of channels. An object of the present invention is to provide a stream processing apparatus that can

請求項1に記載した発明によれば、ストリーム処理装置は、ストリームデータを受信するチャンネルごとに設けられている複数のストリームバッファと、複数のストリームバッファから同じタイミングで読み出したストリームデータを用いてデータ処理を行うデータ処理部と、を備えている。そして、それぞれのストリームバッファは、受信したストリームデータを先入れ先出し方式で記憶するFIFOメモリと、FIFOメモリへ受信したストリームデータを書き込むタイミングを調整することで各チャンネルのストリームデータを同期させる同期回路とによって構成されている。   According to the first aspect of the present invention, the stream processing device uses a plurality of stream buffers provided for each channel that receives stream data, and stream data read from the plurality of stream buffers at the same timing. And a data processing unit that performs processing. Each stream buffer includes a FIFO memory that stores the received stream data in a first-in first-out manner, and a synchronization circuit that synchronizes the stream data of each channel by adjusting the timing of writing the received stream data to the FIFO memory. Has been.

これにより、データ処理部においては、各ストリームデータの同期させるソフトウェア的な同期処理を行う必要がない。そして、ソフトウェア的な同期処理を行う必要が無いことからデータ処理部の負荷が増大することはなく、また、同期処理のためのメモリ容量を確保する必要も無い。したがって、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部の負荷や必要なメモリ容量を削減することができる。   As a result, the data processing unit does not need to perform software synchronization processing for synchronizing each stream data. Since there is no need to perform software-like synchronization processing, the load on the data processing unit does not increase, and it is not necessary to secure a memory capacity for synchronization processing. Therefore, in a configuration in which processing is performed using stream data received through a plurality of channels, the load on the data processing unit and the required memory capacity can be reduced.

第1実施形態によるストリーム処理装置を適用したデータ処理システムの構成を模式的に示す図The figure which shows typically the structure of the data processing system to which the stream processing apparatus by 1st Embodiment is applied. センサの検出点の例を模式的に示す図The figure which shows the example of the detection point of a sensor typically ストリームデータに生じるずれを模式的に示す図The figure which shows the gap which occurs in the stream data typically 比較例としての従来型ストリーム処理装置の電気的構成を模式的に示す図The figure which shows typically the electric constitution of the conventional stream processing apparatus as a comparative example ストリーム処理装置の電気的構成を模式的に示す図The figure which shows typically the electric constitution of a stream processing apparatus ストリームバッファの電気的構成を模式的に示す図The figure which shows the electric constitution of the stream buffer typically ストリームバッファの動作態様を模式的に示す図The figure which shows the operation mode of the stream buffer typically 他のチャンネルのストリームバッファの動作態様を模式的に示す図The figure which shows the operation | movement aspect of the stream buffer of another channel typically ストリーム処理装置の動作態様を模式的に示す図The figure which shows the operation | movement aspect of a stream processing apparatus typically 第2実施形態によるストリームデータに生じるずれを模式的に示す図The figure which shows typically the deviation which arises in the stream data by 2nd Embodiment ストリームバッファの電気的構成を模式的に示す図The figure which shows the electric constitution of the stream buffer typically ストリームバッファの動作態様を模式的に示す図The figure which shows the operation mode of the stream buffer typically ストリーム処理装置の動作態様を模式的に示す図The figure which shows the operation | movement aspect of a stream processing apparatus typically 第3実施形態によるストリームバッファの電気的構成を模式的に示す図The figure which shows typically the electric constitution of the stream buffer by 3rd Embodiment. 第4実施形態におけるストリームバッファの動作態様を模式的に示す図The figure which shows typically the operation | movement aspect of the stream buffer in 4th Embodiment. トリームバッファの電気的構成を模式的に示す図Diagram showing the electrical configuration of the stream buffer 第5実施形態におけるストリームバッファの動作態様を模式的に示す図The figure which shows typically the operation | movement aspect of the stream buffer in 5th Embodiment. トリームバッファの電気的構成を模式的に示す図Diagram showing the electrical configuration of the stream buffer 第6実施形態におけるストリームバッファの動作態様を模式的に示す図The figure which shows typically the operation | movement aspect of the stream buffer in 6th Embodiment. トリームバッファの電気的構成を模式的に示す図Diagram showing the electrical configuration of the stream buffer

以下、本発明の複数の実施形態について図面を参照しながら説明する。なお、各実施形態において実質的に共通する部位には同一符号を付し、その詳細な説明は省略する。
(第1実施形態)
以下、第1実施形態について、図1から図9を参照しながら説明する。
Hereinafter, a plurality of embodiments of the present invention will be described with reference to the drawings. In addition, the same code | symbol is attached | subjected to the site | part substantially common in each embodiment, and the detailed description is abbreviate | omitted.
(First embodiment)
Hereinafter, the first embodiment will be described with reference to FIGS. 1 to 9.

図1に示すように、本実施形態のストリーム処理装置1は、センサユニット2から出力されるストリームデータを受信して処理する。このセンサユニット2は、複数個、例えば本実施形態では4個のセンサ2A〜センサ2Dを備えており、各センサ2A〜2Dからそれぞれストリームデータが出力される。以下、便宜的に、センサ2Aから出力されるストリームデータをチャンネル0(CH[0])のストリームデータと称し、同様に、センサ2B〜2Dから出力されるストリームデータをそれぞれチャンネル1〜3(CH[1]〜CH[3])のストリームデータとも称して説明する。   As shown in FIG. 1, the stream processing apparatus 1 according to the present embodiment receives and processes stream data output from the sensor unit 2. The sensor unit 2 includes a plurality of, for example, four sensors 2A to 2D in this embodiment, and stream data is output from each of the sensors 2A to 2D. Hereinafter, for convenience, the stream data output from the sensor 2A is referred to as channel 0 (CH [0]) stream data, and similarly, the stream data output from the sensors 2B to 2D is referred to as channels 1 to 3 (CH [1] to CH [3]) will also be described as stream data.

各センサ2A〜2Dは、本実施形態ではいわゆるレーザ距離計を想定しており、図2に示すように、センサユニット2を中心として矢印Rにて示す走査方向に向かって、360°の範囲を水平方向に走査する。そして、各センサ2A〜2Dは、各測定点P0〜Pk(kは任意の整数)における対象物(図示省略)までの距離を計測し、その計測結果をストリームデータとして出力する。つまり、各センサ2A〜2Dは、各測定点P0〜Pkの計測結果を、時系列で順次出力する。なお、センサユニット2は、必ずしも360°の全周を計測する必要は無いし、計測される各測定点P0〜Pkの数(k)は、任意に設定することができる。   Each of the sensors 2A to 2D assumes a so-called laser distance meter in the present embodiment. As shown in FIG. 2, the sensor unit 2A has a 360 ° range in the scanning direction indicated by the arrow R with the sensor unit 2 as the center. Scan horizontally. And each sensor 2A-2D measures the distance to the target object (illustration omitted) in each measurement point P0-Pk (k is arbitrary integers), and outputs the measurement result as stream data. That is, the sensors 2A to 2D sequentially output the measurement results of the measurement points P0 to Pk in time series. The sensor unit 2 is not necessarily required to measure the entire circumference of 360 °, and the number (k) of the measurement points P0 to Pk to be measured can be arbitrarily set.

そして、ストリーム処理装置1は、各センサ2A〜2Dから出力されるストリームデータ、つまり、本実施形態では各高さの計測結果にもとづいて、例えば障害物等の物体を検出するデータ処理を行う。
さて、ストリーム処理装置1は、各測定点P0〜Pkにおける物体を検出する必要があることから、基本的には、同一の測定点に対する検出結果を用いてデータ処理を行うことになる。しかし、各センサ2A〜2Dは、それぞれ異なる位置に設けられるため、設置時の取り付け誤差や、電源がオンされてからストリームデータを出力するまでの起動時間の個体差等により、各ストリームデータ間にずれが生じることがある。
The stream processing apparatus 1 performs data processing for detecting, for example, an object such as an obstacle based on the stream data output from each of the sensors 2A to 2D, that is, the measurement result of each height in the present embodiment.
Now, since the stream processing apparatus 1 needs to detect an object at each of the measurement points P0 to Pk, basically, the data processing is performed using the detection result for the same measurement point. However, since the sensors 2A to 2D are provided at different positions, due to an installation error at the time of installation, individual differences in activation time from when the power is turned on until stream data is output, etc. Deviation may occur.

具体的には、図3に示すように、例えばCH[1]のストリームデータの「3」(測定点P3のデータを意味している)を便宜上の基準データとした場合、CH[0]のストリームデータは、基準データから2データ(2つの測定点)分のずれが生じている。また、CH[2]のストリームデータは、基準データから3データ(3つの測定点)分のずれが生じている。また、CH[4]のストリームデータは、基準データから1データ(1つの測定点)分のずれが生じているとともに、データそのものが時間td分だけずれている。   Specifically, as shown in FIG. 3, for example, when “3” (meaning data of the measurement point P3) of the stream data of CH [1] is used as the reference data for convenience, the data of CH [0] The stream data has a deviation of 2 data (2 measurement points) from the reference data. Further, the stream data of CH [2] has a deviation of three data (three measurement points) from the reference data. Further, the stream data of CH [4] has a shift of one data (one measurement point) from the reference data, and the data itself is shifted by the time td.

このように、複数のチャンネルからストリームデータを受信する場合には、上記したような例えば3データ分のずれなどの計測位置のずれ(以下、便宜的に空間的なずれとも称する)や、時間td分のずれ(以下、便宜的に時間的なずれとも称する)が生じることがある。   As described above, when stream data is received from a plurality of channels, for example, the measurement position shift (hereinafter also referred to as a spatial shift for convenience) such as the shift of three data as described above, or the time td. There may be a minute shift (hereinafter also referred to as a time shift for convenience).

さて、図4に比較例として示すような従来型の装置(以下、便宜的に従来型ストリーム処理装置100と称する)は、データ処理を行う従来型データ処理部101と、ストリームデータを一時的に記憶するFIFOメモリ(図4には、FIFO102と示す)を備えている。この従来型ストリーム処理装置100では、ストリームデータは、受信されるごとに時系列で順次FIFO102に記憶される。なお、図4に示している四角系の枠で囲んだ0、1・・・5等の数値は、上記した測定点の位置(P0、P1、・・・P5等)に対応するデータであることを示している。   A conventional apparatus (hereinafter referred to as a conventional stream processing apparatus 100 for the sake of convenience) as shown in FIG. 4 as a comparative example temporarily stores the stream data and a conventional data processing unit 101 that performs data processing. A FIFO memory (indicated as FIFO 102 in FIG. 4) is provided. In the conventional stream processing apparatus 100, stream data is sequentially stored in the FIFO 102 in time series every time it is received. Note that the numerical values such as 0, 1,... 5 enclosed in a square frame shown in FIG. 4 are data corresponding to the positions of the measurement points described above (P0, P1,... P5, etc.). It is shown that.

この場合、上記した時間的なずれはFIFO102で吸収されるものの、従来型データ処理部101では、同じタイミングで受信した各チャンネルのストリームデータが例えば「1」、「3」、「0」、「2」であった場合、FIFO102から読み出したストリームデータも「1」、「3」、「0」、「2」になる。つまり、上記した空間的なずれは、FIFO102では吸収することができなかった、その結果、空間的なずれが生じているストリームデータを処理するためには、まず各ストリームデータを同期させるための同期処理をソフトウェア的に行う必要があり、その同期処理および同期処理のためにメモリ容量を必要とすることから、負荷やメモリ容量の増大を招いていた。そこで、本実施形態のストリーム処理装置1は、以下のようにして負荷および必要とするメモリ容量の低減を図っている。   In this case, although the time lag described above is absorbed by the FIFO 102, the conventional data processing unit 101 receives the stream data of each channel received at the same timing, for example, “1”, “3”, “0”, “ In the case of “2”, the stream data read from the FIFO 102 is also “1”, “3”, “0”, and “2”. That is, the above-described spatial deviation cannot be absorbed by the FIFO 102. As a result, in order to process stream data in which a spatial deviation occurs, first, synchronization for synchronizing the stream data is performed. Since it is necessary to perform processing in software, and the memory capacity is required for the synchronization process and the synchronization process, the load and the memory capacity are increased. Therefore, the stream processing apparatus 1 according to the present embodiment reduces the load and the required memory capacity as follows.

本実施形態のストリーム処理装置1は、図5に示すように、データ処理部10と、各チャンネルに対応して設けられている複数個(n個)のストリームバッファ11とを備えている。なお、ストリームバッファ11の数は、任意に設定すればよい。
データ処理部10は、図示しないCPU、ROMおよびRAM等を有するマイクロコンピュータで構成されており、ROM等に記憶されているプログラムを実行することで、ストリーム処理装置1を制御する。
As shown in FIG. 5, the stream processing apparatus 1 of the present embodiment includes a data processing unit 10 and a plurality (n) of stream buffers 11 provided corresponding to each channel. The number of stream buffers 11 may be set arbitrarily.
The data processing unit 10 is configured by a microcomputer having a CPU, a ROM, a RAM, and the like (not shown), and controls the stream processing device 1 by executing a program stored in the ROM or the like.

各ストリームバッファ11は、受信したストリームデータを先入れ先出し方式で記憶するFIFO12(FIFOメモリに相当する)と、受信したストリームデータをFIFO12へ書き込むタイミングを調整して各チャンネルのストリームデータを同期させる同期回路13を備えている。   Each stream buffer 11 includes a FIFO 12 (corresponding to a FIFO memory) that stores received stream data in a first-in first-out manner, and a synchronization circuit 13 that synchronizes the stream data of each channel by adjusting the timing of writing the received stream data to the FIFO 12. It has.

この同期回路13は、図6に示すように、オフセットレジスタ14、減算器15、およびゲート回路16を備えている。つまり、同期回路13は、論理回路等のハードウェアで基本的に実現されているとともに、その動作がデータ処理部10から独立して行われる構成となっている。   As shown in FIG. 6, the synchronization circuit 13 includes an offset register 14, a subtracter 15, and a gate circuit 16. That is, the synchronization circuit 13 is basically realized by hardware such as a logic circuit and the operation is performed independently from the data processing unit 10.

オフセットレジスタ14は、他のチャンネルのストリームデータとのずれに相当するオフセット値が設定される。このオフセット値は、ストリーム処理装置1が設置される際の校正作業(キャリブレーション作業)時に設定される。具体的には、各センサ2A〜2Dの検査する際に、その空間的なずれが測定され、そのずれを示す値がオフセット値として設定される。本実施形態では、あるチャンネルを基準とした場合において、他のチャンネルのストリームデータがどの程度遅れて受信されているかに基づいて、オフセット値が設定される。   The offset register 14 is set with an offset value corresponding to a deviation from the stream data of other channels. This offset value is set at the time of calibration work (calibration work) when the stream processing apparatus 1 is installed. Specifically, when the sensors 2A to 2D are inspected, the spatial deviation is measured, and a value indicating the deviation is set as an offset value. In the present embodiment, when a certain channel is used as a reference, an offset value is set based on how late the stream data of another channel is received.

このため、例えば図3に例示したような空間的なずれが測定された場合、CH[0]に対応するストリームバッファ11のオフセットレジスタ14には、オフセット値として2が設定される。同様に、CH[1]の場合にはオフセット値として0が設定され、CH[2]の場合にはオフセット値として3が設定され、CH[3]の場合にはオフセット値として1が設定される。なお、各オフセット値は、同期回路に記憶させる構成としてもよいし、ストリーム処理装置1が起動するごとにデータ処理部10等から与える構成としてもよい。   For this reason, for example, when the spatial deviation as illustrated in FIG. 3 is measured, 2 is set as the offset value in the offset register 14 of the stream buffer 11 corresponding to CH [0]. Similarly, 0 is set as the offset value in the case of CH [1], 3 is set as the offset value in the case of CH [2], and 1 is set as the offset value in the case of CH [3]. The Each offset value may be stored in the synchronization circuit, or may be provided from the data processing unit 10 or the like every time the stream processing apparatus 1 is activated.

減算器15は、ストリームデータを受信するタイミングに合わせて、オフセットレジスタ14に設定されたオフセット値を減算する。具体的には、例えばCH[0]の場合、減算器15は、オフセット値を2→1→0のように1ずつ減算する。なお、図示は省略するが、オフセットレジスタ14にはストリームデータの周期に対応するクロック信号が入力されており、減算器15による減算が有効化されている状態では、つまり、そのクロックに応じて減算が行われることになる。   The subtracter 15 subtracts the offset value set in the offset register 14 in accordance with the timing of receiving the stream data. Specifically, for example, in the case of CH [0], the subtracter 15 subtracts the offset value by 1 such as 2 → 1 → 0. Although not shown, a clock signal corresponding to the stream data cycle is input to the offset register 14 and the subtraction by the subtracter 15 is enabled, that is, the subtraction is performed according to the clock. Will be done.

ゲート回路16は、オフセットレジスタ14のオフセット値が予め定められている基準値(本実施形態では、0)と一致しない場合には、減算器15によるオフセット値の減算を有効化するとともに、受信したストリームデータのFIFO12への書き込みを規制する。一方、ゲート回路16は、オフセットレジスタ14のオフセット値が基準値(0)と一致する場合には、減算器15によるオフセット値の減算を無効化するとともに、受信したストリームデータのFIFO12への書き込みを許可する。この同期回路13は、比較器17と、2つのANDゲート18、19により構成されている。   When the offset value of the offset register 14 does not match a predetermined reference value (0 in this embodiment), the gate circuit 16 validates and receives the subtraction of the offset value by the subtracter 15. The writing of the stream data to the FIFO 12 is restricted. On the other hand, when the offset value of the offset register 14 matches the reference value (0), the gate circuit 16 invalidates the subtraction of the offset value by the subtractor 15 and writes the received stream data to the FIFO 12. To give permission. The synchronization circuit 13 includes a comparator 17 and two AND gates 18 and 19.

次に、上記した構成の作用について、同期回路13の詳細とともに説明する。
まず、本実施形態で対象とするストリームデータのデータ形式について説明する。ストリームデータは、データ本体(図6には、S_DATAと示す)と、データが存在することを示すデータ有効信号(図6には、S_ENと示す)とが受信される。データ有効信号は、Hレベルであるとき有効なデータが存在することを示し、Lレベルであるとき有効なデータが存在しないことを示す信号である。
Next, the operation of the above configuration will be described together with details of the synchronization circuit 13.
First, the data format of stream data targeted in this embodiment will be described. As for the stream data, a data body (indicated as S_DATA in FIG. 6) and a data valid signal (indicated as S_EN in FIG. 6) indicating that the data exists are received. The data valid signal is a signal that indicates that valid data exists when it is at the H level, and that there is no valid data when it is at the L level.

受信されるストリームデータのうちデータ本体(S_DATA)は、FIFO12のデータ入力(図6では、DATA_INと示す)に接続されている。また、データ有効信号(S_EN)は、ゲート回路16のANDゲート19の一方の入力端子に接続されている。
ANDゲート19は、他方の入力端子が比較器17に接続されている。この比較器17は、オフセットレジスタ14の現在のオフセット値と基準値(0)とを比較し、両者が一致する場合にはHレベル、両者が一致しない場合にはLレベルを出力する。一方、ANDゲート19は、比較器17の出力とデータ有効信号とがともにHレベルであるとき、Hレベルを出力する。
Of the received stream data, the data body (S_DATA) is connected to the data input (indicated as DATA_IN in FIG. 6) of the FIFO 12. The data valid signal (S_EN) is connected to one input terminal of the AND gate 19 of the gate circuit 16.
The other input terminal of the AND gate 19 is connected to the comparator 17. The comparator 17 compares the current offset value of the offset register 14 with the reference value (0), and outputs an H level if they match, and an L level if they do not match. On the other hand, AND gate 19 outputs H level when both the output of comparator 17 and the data valid signal are at H level.

このとき、FIFO12は、書き込み許可信号(図6では、WR_ENと示す)がオンされると、つまり、ANDゲート19の出力がHレベルになると、書き込みが許可される。また、FIFO12は、書き込み許可信号がオフされると、つまり、ANDゲート19の出力がLレベルになると、書き込みが規制される。このように、ANDゲート19は、FIFO12の書き込み許可信号をオン/オフすることで、ストリームデータのFIFO12への書き込みを制御している。   At this time, the FIFO 12 is permitted to write when a write permission signal (indicated as WR_EN in FIG. 6) is turned on, that is, when the output of the AND gate 19 becomes H level. Further, when the write permission signal is turned off, that is, when the output of the AND gate 19 becomes L level, the FIFO 12 is restricted from being written. In this manner, the AND gate 19 controls the writing of the stream data to the FIFO 12 by turning on / off the write permission signal of the FIFO 12.

ゲート回路16のもう一方のANDゲート18は、データ有効信号(S_EN)と比較器17の反転出力とが入力されている。このため、ANDゲート18は、オフセットレジスタ14の現在のオフセット値が基準値(0)と一致せず、且つ、データ有効信号(S_EN)がHレベルのとき、Hレベルを出力する。このANDゲート18の出力は、オフセットレジスタ14の更新有効信号(図6ではENと示す)として機能する。このため、ANDゲート18の出力がHレベルのとき、オフセット値の更新が許可される。より具体的に言えば、オフセット値が0ではなく、且つ、ストリームデータを受信したタイミングで、減算器15による減算が有効化され、オフセット値の更新が行われる。   The other AND gate 18 of the gate circuit 16 receives the data valid signal (S_EN) and the inverted output of the comparator 17. Therefore, the AND gate 18 outputs the H level when the current offset value of the offset register 14 does not match the reference value (0) and the data valid signal (S_EN) is at the H level. The output of the AND gate 18 functions as an update valid signal (denoted as EN in FIG. 6) of the offset register 14. For this reason, when the output of the AND gate 18 is at the H level, updating of the offset value is permitted. More specifically, at the timing when the offset value is not 0 and stream data is received, subtraction by the subtractor 15 is validated, and the offset value is updated.

一方、ANDゲート18は、一旦オフセット値が0まで減算されると、それ以降は、ストリームデータの受信にかかわらずLレベルを出力することになる。つまり、本実施形態においてオフセット値が減算されるのは、ストリームデータの受信が開始された当初の期間になる。   On the other hand, once the offset value is subtracted to 0, the AND gate 18 outputs L level regardless of reception of stream data thereafter. That is, in the present embodiment, the offset value is subtracted in the initial period when the reception of the stream data is started.

次に、このような同期回路13を有するストリームバッファ11の動作態様の詳細について説明する。なお、各チャンネルの同期回路13は実質的に同様の動作を行うことから、ここでは、図7に示すようにCH[0]を例にして詳細を説明する。
図7に示すストリームデータは、図3に示した4つのストリームデータのうちCH[0]のストリームデータに対応しており、基準データ(CH[1]のストリームデータの「3」のデータ)に対して2データ分のずれが生じているものである。また、説明の簡略化のために、図7に示す時刻T1〜時刻T6までの間ではデータ処理部10によるFIFO12からのデータの読み出しは行われていないものとする。
Next, details of the operation mode of the stream buffer 11 having such a synchronization circuit 13 will be described. Since the synchronization circuit 13 of each channel performs substantially the same operation, here, the details will be described using CH [0] as an example as shown in FIG.
The stream data shown in FIG. 7 corresponds to the stream data of CH [0] among the four stream data shown in FIG. 3, and is the reference data (data “3” of the stream data of CH [1]). On the other hand, there is a shift of two data. For simplification of explanation, it is assumed that data is not read from the FIFO 12 by the data processing unit 10 from time T1 to time T6 shown in FIG.

CH[0]のストリームデータを受信するストリームバッファ11は、時刻T0において受信準備が完了し、オフセット値として空間的なずれを示す2が設定されたとする(図3参照)。なお、CH[0]のストリームデータの受信態様は、時刻T0より後の時刻T1において測定点P1のデータ(図7には1と示す)が受信され、時刻T2において測定点P2のデータ(図7には1と示す)が受信され、時刻T3において測定点P3のデータ(図7には2と示す)が受信され、時刻T4において測定点P4のデータ(図7には3と示す)が受信され、時刻T5において測定点P5のデータ(図7には4と示す)が受信され、時刻T6において測定点P6のデータ(図7には5と示す)が受信されるものとする。以下、測定点P1のデータを、便宜的に「1」のデータとも称する。   The stream buffer 11 that receives the stream data of CH [0] is ready for reception at time T0, and 2 indicating a spatial deviation is set as the offset value (see FIG. 3). Note that the reception mode of the stream data of CH [0] is that data at the measurement point P1 (shown as 1 in FIG. 7) is received at time T1 after the time T0, and data at the measurement point P2 (FIG. 7 is indicated as 1), data at measurement point P3 (indicated as 2 in FIG. 7) is received at time T3, and data at measurement point P4 (indicated as 3 in FIG. 7) is received at time T4. Assume that data at a measurement point P5 (shown as 4 in FIG. 7) is received at time T5, and data at a measurement point P6 (shown as 5 in FIG. 7) is received at time T6. Hereinafter, the data of the measurement point P1 is also referred to as “1” data for convenience.

この場合、同期回路13は、時刻T1において「1」のデータが受信されると、オフセット値(2)と基準値(0)とが一致しないことから、比較器17の出力がLレベルになり、ANDゲート18の出力がHレベルになることで、減算器15による減算が有効化される。これにより、オフセットレジスタ14に設定されているオフセット値が減算され、2→1に更新される。このとき、ANDゲート19の出力はLレベルであるので、FIFO12への書き込みは規制される。つまり、時刻T1で受信した「1」のデータは、FIFO12には書き込まれない。   In this case, when the data “1” is received at time T1, the synchronization circuit 13 does not match the offset value (2) and the reference value (0), so the output of the comparator 17 becomes L level. The subtraction by the subtracter 15 is validated when the output of the AND gate 18 becomes H level. As a result, the offset value set in the offset register 14 is subtracted and updated from 2 to 1. At this time, since the output of the AND gate 19 is at the L level, writing to the FIFO 12 is restricted. In other words, the data “1” received at time T1 is not written to the FIFO 12.

次に、時刻T2において「2」のデータが受信されると、同期回路13では、受信した時点におけるオフセット値(1)と基準値(0)とが一致しないことから、減算器15による減算が有効化されてオフセット値が1→0に更新されるとともに、「2」のデータのFIFO12への書き込みが規制される。このため、時刻T2で受信した「2」のデータも、FIFO12には書き込まれない。   Next, when data “2” is received at time T2, the synchronization circuit 13 does not match the offset value (1) and the reference value (0) at the time of reception. When enabled, the offset value is updated from 1 to 0, and writing of data “2” into the FIFO 12 is restricted. For this reason, the data “2” received at time T 2 is not written into the FIFO 12.

さて、時刻T3において「3」のデータが受信されると、同期回路13では、受信した時点におけるオフセット値(0)と基準値(0)とが一致することから、ANDゲート18の出力がLレベルになり、減算器15による減算が無効化される。そのため、以降は、オフセット値の更新が行われなくなる。その一方、ANDゲート19の出力はHレベルになることから、FIFO12への書き込みは許可される。このため、時刻T3で受信した「3」のデータは、FIFO12に記憶されることになる。   When the data “3” is received at time T3, the synchronization circuit 13 matches the offset value (0) and the reference value (0) at the time of reception, so that the output of the AND gate 18 is L Level, and the subtraction by the subtractor 15 is invalidated. Therefore, thereafter, the offset value is not updated. On the other hand, since the output of the AND gate 19 becomes the H level, writing to the FIFO 12 is permitted. Therefore, the data “3” received at time T 3 is stored in the FIFO 12.

そして、時刻T4〜時刻T6においても、同様にオフセット値(0)と基準値(0)とが一致することから、FIFO12への書き込みが許可される。その結果、時刻T6におけるFIFO12の記憶態様としては、読み出し側(データ処理部10側)の先頭つまり最も先に書き込まれ、且つ、最も先に読み出されるデータとして「3」のデータが記憶され、その次に「4」のデータ、「5」のデータ、「6」のデータが時系列で順次記憶されることになる。   Similarly, from time T4 to time T6, the offset value (0) and the reference value (0) coincide with each other, so that writing to the FIFO 12 is permitted. As a result, as the storage mode of the FIFO 12 at time T6, the data “3” is stored as the data that is written at the beginning, that is, the earliest on the reading side (the data processing unit 10 side) and that is read out first. Next, the data “4”, the data “5”, and the data “6” are sequentially stored in time series.

これにより、FIFO12に記憶された状態において各チャンネルの同期がとれ、データ処理部10が同じタイミングで読み出したデータは、同じ測定点(図2参照)を示すデータになる。
このように、ストリームバッファ11は、受信準備が完了すると、オフセット値(今回は2)に対応する数のデータ(「1」のデータと「2」のデータの2つ)がキャンセルされ、FIFO12に最初に書き込まれるデータが「3」のデータ、つまりは、基準データと同じ測定点のデータになるように、ストリームデータを書き込むタイミングを調整して同期させている。
Thereby, the channels are synchronized in the state stored in the FIFO 12, and the data read by the data processing unit 10 at the same timing becomes data indicating the same measurement point (see FIG. 2).
In this way, when the reception preparation is completed, the stream buffer 11 cancels the number of data corresponding to the offset value (2 at this time) (two data “1” and “2”) and stores the data in the FIFO 12. The timing at which the stream data is written is adjusted and synchronized so that the data to be written first is “3”, that is, data at the same measurement point as the reference data.

また、他のチャンネルのストリームバッファ11も、同様である。具体的には、図8に示すように、CH[1]のストリームバッファ11では、自身のチャンネルが基準データであることからオフセット値には0が設定され(図3参照)、時刻T0で受信準備が完了したとすると、最初に受信したデータ(図8では「3」のデータ)からFIFO12への書き込みが許可される。このため、FIFO12には、「3」のデータが先頭に記憶され、続いて「4」のデータとなるように時系列で順次データが記憶される。   The same applies to the stream buffers 11 of other channels. Specifically, as shown in FIG. 8, in the CH [1] stream buffer 11, since its own channel is the reference data, the offset value is set to 0 (see FIG. 3) and received at time T0. If the preparation is completed, writing to the FIFO 12 from the first received data (data “3” in FIG. 8) is permitted. Therefore, data “3” is stored in the FIFO 12 at the head, and then data is sequentially stored in time series so that the data becomes “4”.

また、CH[2]のストリームバッファ11では、オフセット値には3が設定されることから(図3参照)、最初に受信したデータ(「0」のデータ)から3データ分ずれた「3」のデータがFIFO12の先頭に記憶される。同様に、CH[3]のストリームバッファ11では、オフセット値には1が設定されることから(図3参照)、最初に受信したデータ(「2」のデータ)から1データ分ずれた「1」のデータがFIFO12の先頭に記憶される。   Further, in the stream buffer 11 of CH [2], since the offset value is set to 3 (see FIG. 3), “3” shifted by 3 data from the first received data (“0” data). Are stored at the head of the FIFO 12. Similarly, in the CH [3] stream buffer 11, since the offset value is set to 1 (see FIG. 3), “1” shifted by 1 data from the first received data (data “2”). Is stored at the head of the FIFO 12.

このように、本実施形態のストリーム処理装置1では、図9に示したように受信準備が完了してから最初に受信したデータがCH[0]では「1」のデータ、CH[1]では「3」のデータ、CH[2]では「0」のデータ、CH[3]では「2」のデータのように各チャンネルでずれが生じている場合であっても、各ストリームバッファ11においてチャンネル間の同期がとられる。その結果、FIFO12には空間的なずれが無いデータが記憶され、データ処理部10は、同期処理を行わなくても、ずれの無いデータを用いてデータ処理を行うことができる。   As described above, in the stream processing apparatus 1 of the present embodiment, as shown in FIG. 9, the first received data after completion of reception preparation is “1” data in CH [0], and in CH [1]. Even if there is a shift in each channel, such as “3” data, “0” data in CH [2], and “2” data in CH [3], the channel in each stream buffer 11 Are synchronized. As a result, data without spatial deviation is stored in the FIFO 12, and the data processing unit 10 can perform data processing using data without deviation without performing synchronization processing.

以上説明した実施形態によれば、次のような効果を得ることができる。
ストリーム処理装置1は、ストリームデータを受信するチャンネルごとに設けられている複数のストリームバッファ11と、複数のストリームバッファ11から同じタイミングで読み出したストリームデータを用いてデータ処理を行うデータ処理部10と、を備えている。そして、それぞれのストリームバッファ11は、受信したストリームデータを先入れ先出し方式で記憶するFIFO12(FIFOメモリ)と、FIFO12へ受信したストリームデータを書き込むタイミングを調整することで各チャンネルのストリームデータを同期させる同期回路13と、によって構成されている。
According to the embodiment described above, the following effects can be obtained.
The stream processing apparatus 1 includes a plurality of stream buffers 11 provided for each channel that receives stream data, and a data processing unit 10 that performs data processing using the stream data read from the plurality of stream buffers 11 at the same timing; It is equipped with. Each stream buffer 11 has a FIFO 12 (FIFO memory) that stores received stream data in a first-in first-out manner, and a synchronization circuit that synchronizes the stream data of each channel by adjusting the timing of writing the received stream data to the FIFO 12. 13.

このため、データ処理部10においては、各ストリームデータを同期させるためのソフトウェア的な同期処理を行う必要がない。そして、ソフトウェア的な同期処理を行う必要が無いことからデータ処理部10の負荷が増大することはなく、また、同期処理のためのメモリ容量を確保する必要も無い。したがって、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。   Therefore, the data processing unit 10 does not need to perform software synchronization processing for synchronizing each stream data. Since there is no need to perform software synchronization processing, the load on the data processing unit 10 does not increase, and it is not necessary to secure a memory capacity for synchronization processing. Therefore, in a configuration in which processing is performed using stream data received through a plurality of channels, the load on the data processing unit 10 and the required memory capacity can be reduced.

また、本実施形態の場合、同期回路13は、他のチャンネルのストリームデータとのずれに相当するオフセット値が設定されるオフセットレジスタ14と、ストリームデータを受信するタイミングに合わせてオフセットレジスタ14に設定されたオフセット値を減算する減算器15と、オフセットレジスタ14のオフセット値が予め定められている基準値と一致しない場合には、減算器15によるオフセット値の減算を有効化するとともに受信したストリームデータのFIFO12への書き込みを規制する一方、オフセットレジスタ14のオフセット値が基準値と一致する場合には、減算器15によるオフセット値の減算を無効化するとともに受信したストリームデータのFIFO12への書き込みを許可するゲート回路16と、により構成されている。
これにより、同期回路13を簡単な構成で実現することができるとともに、データ処理部10から独立して作動するハードウェアで実現していることから、処理やメモリ容量の増大を招くことがない。
In the case of the present embodiment, the synchronization circuit 13 sets the offset register 14 in which an offset value corresponding to a deviation from the stream data of other channels is set, and the offset register 14 in accordance with the timing of receiving the stream data. If the offset value of the offset register 14 and the offset value of the offset register 14 do not match a predetermined reference value, the subtraction of the offset value by the subtractor 15 is enabled and the received stream data When the offset value of the offset register 14 matches the reference value, the subtraction of the offset value by the subtractor 15 is invalidated and the received stream data is allowed to be written to the FIFO 12. And a gate circuit 16 to be configured It has been.
As a result, the synchronization circuit 13 can be realized with a simple configuration and is realized by hardware that operates independently from the data processing unit 10, so that the processing and the memory capacity are not increased.

(第2実施形態)
以下、第2実施形態について、図10から図15を参照しながら説明する。
第1実施形態の場合、基準データに対して他のチャンネルのストリームデータがどの程度遅れて受信されるのかに基づいてオフセット値が設定した。これに対して、本実施形態の場合、基準データに対して他のチャンネルのストリームデータがどの程度進んで受信されるかに基づいてオフセット値を設定する。
(Second Embodiment)
Hereinafter, the second embodiment will be described with reference to FIGS. 10 to 15.
In the case of the first embodiment, the offset value is set based on how late the stream data of other channels are received with respect to the reference data. On the other hand, in the case of the present embodiment, the offset value is set based on how far stream data of other channels is received with respect to the reference data.

図10に示すように、本実施形態では、CH[2]のストリームデータを基準データとして採用する。なお、この図10に示す受信態様は、第1実施形態の受信態様(図3参照)と同一の態様になっている。
この図10においてCH[2]の「3」のデータを基準データとした場合、CH[0]の「3」のデータは、基準データよりも1データ分進んで受信されている。同様に、CH[1]の「3」のデータは、基準データよりも3データ分進んで受信されており、CH[3]の「3」のデータは、基準データよりも2データ分進んで受信されている。
As shown in FIG. 10, in this embodiment, the stream data of CH [2] is adopted as reference data. The reception mode shown in FIG. 10 is the same as the reception mode (see FIG. 3) of the first embodiment.
In FIG. 10, when data “3” of CH [2] is used as reference data, data “3” of CH [0] is received one data ahead of the reference data. Similarly, the data “3” of CH [1] is received by three data ahead of the reference data, and the data “3” of CH [3] is two data ahead of the reference data. Has been received.

このため、図4に示したような従来型ストリーム処理装置100の場合には、時刻T10で受信準備が完了したとすると、FIFO12には、読み出し側の先頭では各チャンネルのデータが「1」、「3」、「0」、「2」のようにずれが生じることになる。
そこで、本実施形態では、基準データよりも進んで受信されるデータの数をオフセット値に設定することでチャンネル間を同期させるとともに、同期がとれていない期間をダミーデータで補填する。
For this reason, in the case of the conventional stream processing apparatus 100 as shown in FIG. 4, if the preparation for reception is completed at time T10, the data of each channel is “1” at the beginning of the reading side in the FIFO 12. Deviations such as “3”, “0”, and “2” occur.
Therefore, in the present embodiment, the channels are synchronized by setting the number of data received ahead of the reference data as an offset value, and a period of non-synchronization is compensated with dummy data.

図11に示すように、本実施形態のストリームバッファ20は、同期回路21を備えている。この同期回路21は、オフセットレジスタ14、加算器22、ゲート回路23、およびダミーデータバッファ24を備えている。つまり、同期回路21は、論理回路等のハードウェアで基本的に実現されているとともに、その動作がデータ処理部10から独立して行われる構成となっている。   As shown in FIG. 11, the stream buffer 20 of this embodiment includes a synchronization circuit 21. The synchronization circuit 21 includes an offset register 14, an adder 22, a gate circuit 23, and a dummy data buffer 24. That is, the synchronization circuit 21 is basically realized by hardware such as a logic circuit and the operation is performed independently from the data processing unit 10.

オフセットレジスタ14は、他のチャンネルのストリームデータとのずれに相当するオフセット値が、例えばキャリブレーション作業時等に設定される。オフセット値は、基準データに対するずれを示す値であり、図10に示した受信態様の場合、CH[0]のオフセット値には−1、CH[1]のオフセット値には−3、CH[2]のオフセット値には0、CH[3]のオフセット値には−2がそれぞれ設定されることになる。   In the offset register 14, an offset value corresponding to a deviation from the stream data of other channels is set, for example, during calibration work. The offset value is a value indicating a deviation from the reference data. In the case of the reception mode illustrated in FIG. 10, the offset value of CH [0] is −1, the offset value of CH [1] is −3, and CH [ The offset value of 2] is set to 0, and the offset value of CH [3] is set to -2.

加算器22は、オフセットレジスタ14に設定されたオフセット値を加算する。具体的には、例えばCH[0]の場合、オフセット値を−1→0のように1ずつ加算する。
ゲート回路23は、オフセットレジスタ14のオフセット値が予め定められている基準値(本実施形態では0)と一致しない場合には、加算器22によるオフセット値の加算を有効化するとともに、FIFO12に書き込むデータをダミーデータバッファ24に記憶されているダミーデータに切り替える一方、オフセットレジスタ14のオフセット値が基準値と一致する場合には、加算器22によるオフセット値の加算を無効化するとともに、FIFO12に書き込むデータをストリームデータに切り替える。この同期回路21は、比較器17、セレクタ25、ORゲート26およびNOTゲート27により構成されている。
The adder 22 adds the offset value set in the offset register 14. Specifically, for example, in the case of CH [0], the offset value is incremented by 1 such as −1 → 0.
When the offset value of the offset register 14 does not match a predetermined reference value (0 in the present embodiment), the gate circuit 23 enables addition of the offset value by the adder 22 and writes it to the FIFO 12. When the data is switched to the dummy data stored in the dummy data buffer 24 and the offset value of the offset register 14 matches the reference value, the addition of the offset value by the adder 22 is invalidated and written to the FIFO 12. Switch data to stream data. The synchronization circuit 21 includes a comparator 17, a selector 25, an OR gate 26, and a NOT gate 27.

ダミーデータバッファ24は、各チャンネルの同期がとれていない期間においてストリームデータの代わりにFIFO12に書き込まれるダミーデータ(値=X)を記憶している。なお、本実施形態では、1種類のダミーデータが記憶されている。このダミーデータバッファ24は、不揮発性の記憶手段で構成してもよいが、揮発性の記憶手段で構成して、起動時等にデータ処理部10等からダミーデータを設定するようにしてもよい。また、ダミーデータの値(X)は、ダミーデータであることを識別可能な値に設定するとよい。   The dummy data buffer 24 stores dummy data (value = X) to be written to the FIFO 12 instead of stream data in a period in which the channels are not synchronized. In the present embodiment, one type of dummy data is stored. The dummy data buffer 24 may be configured by a nonvolatile storage unit, but may be configured by a volatile storage unit so that dummy data is set from the data processing unit 10 or the like at the time of startup or the like. . Further, the value (X) of the dummy data may be set to a value that can be identified as dummy data.

次に、上記した構成の作用について、同期回路21の詳細とともに説明する。
受信したストリームデータのデータ本体(S_DATA)は、セレクタ25のH入力側(図11にはHと示す)に接続されている。このセレクタ25のL入力側には、ダミーデータバッファ24が接続されている。そして、セレクタ25の出力は、FIFO12のデータ入力(DATA_IN)に接続されている。このセレクタ25は、比較器17によって切り替えられる。
Next, the operation of the above configuration will be described together with details of the synchronization circuit 21. FIG.
The data body (S_DATA) of the received stream data is connected to the H input side (indicated as H in FIG. 11) of the selector 25. A dummy data buffer 24 is connected to the L input side of the selector 25. The output of the selector 25 is connected to the data input (DATA_IN) of the FIFO 12. The selector 25 is switched by the comparator 17.

比較器17は、オフセットレジスタ14のオフセット値が基準値(本実施形態では0)と一致する場合にはHレベルを出力する一方、オフセット値が基準値と一致しない場合にはLレベルを出力する。このため、FIFO12に書き込まれるデータは、オフセット値が基準値と一致するか否かによって、ストリームデータまたはダミーデータのいずれかに切り替えられる。   The comparator 17 outputs an H level when the offset value of the offset register 14 matches the reference value (0 in this embodiment), and outputs an L level when the offset value does not match the reference value. . For this reason, the data written in the FIFO 12 is switched to either stream data or dummy data depending on whether or not the offset value matches the reference value.

このとき、FIFO12の書き込み許可信号(WR_EN)はORゲート26によって生成される。このORゲート26は、データ有効信号(S_EN)と比較器17の反転出力とが入力されているため、ダミーデータ側に切り替えられている場合であっても、つまり、比較器17がLレベルを出力している場合であっても、データ有効信号(S_EN)がHレベルになればFIFO12への書き込みが許可される。   At this time, the write enable signal (WR_EN) of the FIFO 12 is generated by the OR gate 26. Since the data valid signal (S_EN) and the inverted output of the comparator 17 are input to the OR gate 26, even if the OR gate 26 is switched to the dummy data side, that is, the comparator 17 is at the L level. Even in the case of outputting, writing to the FIFO 12 is permitted if the data valid signal (S_EN) becomes H level.

また、ダミーデータ側に切り替えられている場合には、つまり、比較器17がLレベルを出力してNOTゲート27からはHレベルが出力されている場合には、オフセットレジスタ14の更新有効信号(EN)がHレベルであることから、加算器22によるオフセット値の更新が有効化される。
次に、このような同期回路21を有するストリームバッファ20の動作態様の詳細について、図12を参照しながら説明する。なお、各チャンネルの同期回路21は実質的に同様の動作を行うことから、ここでは、CH[0]を例にして説明する。
Further, when the data is switched to the dummy data side, that is, when the comparator 17 outputs the L level and the NOT gate 27 outputs the H level, the update valid signal ( Since EN) is at the H level, updating of the offset value by the adder 22 is validated.
Next, details of the operation mode of the stream buffer 20 having such a synchronization circuit 21 will be described with reference to FIG. Since the synchronization circuit 21 of each channel performs substantially the same operation, description will be given here by taking CH [0] as an example.

図12に示すストリームデータは、図10に示した4つのストリームデータのうちCH[0]のストリームデータに対応しており、基準データ(CH[2]のストリームデータの「3」のデータ)に対して1データ分のずれが生じているものである。なお、説明の簡略化のために、図12に示す時刻T10〜時刻T16までの間ではデータ処理部10によるFIFO12からのデータの読み出しは行われていないものとする。   The stream data shown in FIG. 12 corresponds to the stream data of CH [0] among the four stream data shown in FIG. 10, and the reference data (data “3” of the stream data of CH [2]) On the other hand, a shift of one data has occurred. For simplification of explanation, it is assumed that the data processing unit 10 does not read data from the FIFO 12 between time T10 and time T16 shown in FIG.

CH[0]のストリームデータを受信するストリームバッファ11は、時刻T10において受信準備が完了すると、基準データよりも1データ分進んでデータが受信されることから、オフセット値として空間的なずれを示す−1が設定される。なお、CH[0]でのストリームデータの受信態様は、時刻T10より後の時刻T11において「1」のデータが受信され、時刻T12において「2」のデータが受信され、時刻T13において「3」のデータが受信され、時刻T14において「4」のデータが受信され、時刻T15において「5」のデータが受信され、時刻T16において「6」のデータが受信されるものとする。   When the stream buffer 11 that receives the stream data of CH [0] is ready for reception at time T10, the data is received by one data ahead of the reference data, and thus shows a spatial deviation as an offset value. -1 is set. Note that the reception mode of the stream data on CH [0] is that data “1” is received at time T11 after time T10, data “2” is received at time T12, and “3” is received at time T13. The data “4” is received at time T14, the data “5” is received at time T15, and the data “6” is received at time T16.

同期回路21の動作態様としては、オフセット値が設定されると、設定されたオフセット値(−1)と基準値(0)とが一致しないことから、比較器17の出力がLレベルになり、NOTゲート27の出力がHレベルになって加算器22による加算が有効化される。このとき、比較器17の出力は反転されてORゲート26に入力されることから、FIFO12の書き込み有効信号(WR_EN)はHレベルになる。つまり、同期回路21は、ダミーデータの書き込みを許可する。また、このとき、同期回路21は、セレクタ25がダミーデータ側になっていることから、FIFO12には、ダミーデータ(X)が書き込まれる。   As an operation mode of the synchronization circuit 21, when the offset value is set, the set offset value (−1) and the reference value (0) do not match, so the output of the comparator 17 becomes L level, The output of the NOT gate 27 becomes H level, and the addition by the adder 22 is validated. At this time, since the output of the comparator 17 is inverted and input to the OR gate 26, the write enable signal (WR_EN) of the FIFO 12 becomes H level. That is, the synchronization circuit 21 permits writing of dummy data. At this time, since the selector 25 is on the dummy data side, the synchronization circuit 21 writes the dummy data (X) in the FIFO 12.

そして、同期回路21は、オフセット値が基準値になるまで、オフセット値の加算およびダミーデータの書き込みを繰り返す。このとき、オフセット値が加算(更新)されるごとに、ダミーデータが書き込まれる。なお、CH[0]の場合、最初に設定されたオフセット値が−1であることから、同期回路21は、1つのダミーデータをFIFO12に書き込むことになる。また、同期回路21は、オフセット値が基準値になると以降は加算が無効化されることから、それ以上のダミーデータの書き込みは行わない。   Then, the synchronization circuit 21 repeats addition of the offset value and writing of dummy data until the offset value becomes the reference value. At this time, dummy data is written each time the offset value is added (updated). In the case of CH [0], since the offset value set first is −1, the synchronization circuit 21 writes one dummy data in the FIFO 12. Further, since the addition is invalidated after the offset value becomes the reference value, the synchronization circuit 21 does not write any more dummy data.

その後、時刻T11において「1」のデータが受信されると、同期回路21は、オフセット値が既に基準値になっていることから、セレクタ25が受信したストリームデータ側になっており、ストリームデータがFIFO12に書き込まれることになる。同様に、時刻T12〜T16においてそれぞれデータが受信されると、同期回路13は、オフセット値が基準値であることから、それぞれの時刻でFIFO12への書き込みを許可する。   Thereafter, when data “1” is received at time T11, the synchronization circuit 21 is on the stream data side received by the selector 25 because the offset value has already become the reference value, and the stream data is It is written in the FIFO 12. Similarly, when data is received at times T12 to T16, the synchronization circuit 13 permits writing to the FIFO 12 at each time because the offset value is a reference value.

その結果、例えば時刻T16におけるFIFO12の記憶態様としては、読み出し側の先頭から順にダミーデータ(X)、「1」のデータ、「2」のデータ、「3」のデータ、「4」のデータ、「5」のデータ、「6」のデータのように、ダミーデータと時系列で受信したデータが記憶される。   As a result, for example, as the storage mode of the FIFO 12 at time T16, the dummy data (X), the data “1”, the data “2”, the data “3”, the data “4”, in order from the head on the reading side, Dummy data and data received in time series, such as “5” data and “6” data, are stored.

同様に、オフセット値として−3が設定されたCH[1]の場合、FIFO12に3つのダミーデータ(X)が記憶された後、時刻T11で受信した「3」のデータ(図10参照)から順に時系列でストリームデータが記憶される。また、オフセット値として0が設定されたCH[2]の場合、ダミーデータは記憶されず、時刻T11に受信した「0」のデータから順に時系列でストリームデータが記憶され、オフセット値として−2が設定されたCH[3]の場合、FIFO12に2つのダミーデータ(X)が記憶された後、時刻T11に受信した「2」のデータから順に時系列でストリームデータが記憶される。   Similarly, in the case of CH [1] in which −3 is set as the offset value, from the data “3” (see FIG. 10) received at time T11 after three dummy data (X) are stored in the FIFO 12. Stream data is stored in time series. Further, in the case of CH [2] in which 0 is set as the offset value, dummy data is not stored, stream data is stored in time series in order from the data “0” received at time T11, and −2 as the offset value. In the case of CH [3] in which is set, after the two dummy data (X) are stored in the FIFO 12, the stream data is stored in chronological order from the data “2” received at time T11.

これにより、図13に示すように、FIFO12に記憶された状態において各チャンネルを同期させることができ、データ処理部10が同じタイミングで読み出すデータは、同じ測定点(図2参照)を示すデータになる。
このように、本実施形態では、図10に示したように受信準備が完了してから最初に受信したデータがCH[0]では「1」のデータ、CH[1]では「3」のデータ、CH[2]では「0」のデータ、CH[3]では「2」のデータのように各チャンネルでずれが生じている場合であっても、FIFO12に記憶した時点でチャンネル間を同期させることができる。このため、データ処理部10において各チャンネルを同期させるための同期処理を行う必要はない。
As a result, as shown in FIG. 13, each channel can be synchronized in the state stored in the FIFO 12, and the data read by the data processing unit 10 at the same timing is the data indicating the same measurement point (see FIG. 2). Become.
Thus, in the present embodiment, as shown in FIG. 10, the first received data after completion of reception preparation is “1” data for CH [0], and “3” data for CH [1]. , CH [2] is “0” data, and CH [3] is “2” data, even when there is a shift in each channel, the channels are synchronized when stored in the FIFO 12. be able to. For this reason, it is not necessary to perform a synchronization process for synchronizing each channel in the data processing unit 10.

以上説明した実施形態によれば次のような効果を得ることができる。
ストリーム処理装置1は、ストリームバッファ20により各チャンネル間を同期させることができるため、FIFO12には空間的なずれが無いデータが記憶され、データ処理部10は、同期処理を行わなくても、ずれの無いデータを用いてデータ処理を行うことができる。したがって、上記した第1実施形態と同様に、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。
According to the embodiment described above, the following effects can be obtained.
Since the stream processing apparatus 1 can synchronize each channel by the stream buffer 20, the FIFO 12 stores data having no spatial deviation, and the data processing unit 10 can perform the deviation without performing the synchronization process. Data processing can be performed using data with no data. Therefore, as in the first embodiment described above, the load on the data processing unit 10 and the required memory capacity can be reduced in a configuration in which processing is performed using stream data received on a plurality of channels.

また、本実施形態のストリーム処理装置1の同期回路21は、オフセットレジスタ14と、オフセットレジスタ14に設定されたオフセット値を加算する加算器22と、ダミーデータを記憶するダミーデータバッファ24と、オフセットレジスタ14のオフセット値が予め定められている基準値と一致しない場合には、加算器22によるオフセット値の加算を有効化するとともに、FIFO12に書き込むデータをダミーデータバッファ24に記憶されているダミーデータに切り替える一方、オフセットレジスタ14のオフセット値が基準値と一致する場合には、加算器22によるオフセット値の加算を無効化するとともに、FIFO12に書き込むデータを受信したストリームデータに切り替えるゲート回路23とを備えている。   The synchronization circuit 21 of the stream processing apparatus 1 according to the present embodiment includes an offset register 14, an adder 22 that adds the offset value set in the offset register 14, a dummy data buffer 24 that stores dummy data, and an offset When the offset value of the register 14 does not match a predetermined reference value, the addition of the offset value by the adder 22 is validated and the data to be written to the FIFO 12 is stored in the dummy data buffer 24. On the other hand, when the offset value of the offset register 14 matches the reference value, the addition of the offset value by the adder 22 is invalidated and the gate circuit 23 that switches the data to be written to the FIFO 12 to the received stream data is provided. I have.

これにより、同期回路21を簡単な構成で実現することができるとともに、データ処理部10から独立して作動するハードウェアで実現していることから、処理やメモリ容量の増大を招くことがない。   As a result, the synchronization circuit 21 can be realized with a simple configuration and is realized by hardware that operates independently from the data processing unit 10, so that an increase in processing and memory capacity is not caused.

(第3実施形態)
以下、第3実施形態について、図14を参照しながら説明する。第3実施形態では、実質的に、第1実施形態と第2実施形態とを組み合わせた構成となっている。
図14に示すように、本実施形態のストリーム処理装置1のストリームバッファ30の同期回路31は、オフセットレジスタ14、ダウンカウンタ型同期回路32、アップカウンタ型同期回路33、セレクタ34、および比較器35を備えている。
(Third embodiment)
Hereinafter, the third embodiment will be described with reference to FIG. In the third embodiment, the first embodiment is substantially combined with the second embodiment.
As shown in FIG. 14, the synchronization circuit 31 of the stream buffer 30 of the stream processing apparatus 1 of the present embodiment includes an offset register 14, a down counter synchronization circuit 32, an up counter synchronization circuit 33, a selector 34, and a comparator 35. It has.

ダウンカウンタ型同期回路32は、実質的に第1実施形態の同期回路13に相当するものであり、最初に設定されたオフセット値を減算し、当該オフセット値に応じてFIFO12への書き込みを制御することで、各チャンネルを同期させるものである。つまり、ダウンカウンタ型同期回路32は、オフセット値分の要素を削除する要素を削除することで各チャンネルを同期させる要素削除型の構成になっている。本実施形態の場合、削除する要素としては、後述するように受信したストリームデータである。   The down counter type synchronization circuit 32 substantially corresponds to the synchronization circuit 13 of the first embodiment, and subtracts the offset value set first, and controls writing to the FIFO 12 according to the offset value. Thus, each channel is synchronized. That is, the down counter type synchronization circuit 32 has an element deletion type configuration in which each channel is synchronized by deleting an element for deleting an element corresponding to the offset value. In this embodiment, the element to be deleted is received stream data as will be described later.

一方、アップカウンタ型同期回路33は、実質的に第2実施形態の同期回路21に相当するものであり、最初に設定されたオフセット値を加算し、当該オフセット値に応じてFIFO12への書き込みを制御することで、各チャンネルを同期させるものである。つまり、アップカウンタ型同期回路33は、オフセット値分の要素を追加する要素を削除することで各チャンネルを同期させる要素追加型の構成になっている。本実施形態の場合、挿入する要素としては、後述するようにダミーデータである。なお、後述する第5実施形態では、挿入する要素として受信したストリームデータデータを採用している。   On the other hand, the up-counter type synchronization circuit 33 substantially corresponds to the synchronization circuit 21 of the second embodiment, adds the offset value set first, and writes to the FIFO 12 according to the offset value. By controlling, each channel is synchronized. That is, the up-counter type synchronization circuit 33 has an element addition type configuration in which each channel is synchronized by deleting an element for adding an element corresponding to an offset value. In this embodiment, the element to be inserted is dummy data as will be described later. In the fifth embodiment to be described later, the received stream data data is adopted as an element to be inserted.

同期回路31は、オフセット値を比較する比較器35からの出力に応じて切り替わるセレクタ34によって、ダウンカウンタ型同期回路32およびアップカウンタ型同期回路33のいずれを同期に用いるかを切り替える。換言すると、同期回路31は、最初に設定したオフセット値の正負に応じて、FIFO12へストリームデータを書き込む際の経路を、ダウンカウンタ型同期回路32またはアップカウンタ型同期回路33のいずれに切り替える。   The synchronization circuit 31 switches which one of the down counter type synchronization circuit 32 and the up counter type synchronization circuit 33 is used for synchronization by a selector 34 that switches according to the output from the comparator 35 that compares the offset values. In other words, the synchronization circuit 31 switches the path for writing stream data to the FIFO 12 to either the down-counter synchronization circuit 32 or the up-counter synchronization circuit 33 according to the sign of the offset value initially set.

セレクタ34を切り替える比較器35は、オフセットレジスタ14のオフセット値と0とを比較し、オフセット値が0より小さければLレベルを出力し、オフセット値が0以上であればHレベルを出力する。そして、セレクタ34は、比較器35がLレベルを出力した場合には、つまり、最初に設定されたオフセット値が負の値である場合には、用いる回路をアップカウンタ型同期回路33側に切り替える。一方、セレクタ34は、比較器35がHレベルを出力した場合には、つまり、最初に設定されたオフセット値が正の値である場合には、用いる回路をダウンカウンタ型同期回路32側に切り替える。   A comparator 35 that switches the selector 34 compares the offset value of the offset register 14 with 0, and outputs an L level if the offset value is smaller than 0, and outputs an H level if the offset value is 0 or more. The selector 34 switches the circuit to be used to the up-counter type synchronization circuit 33 side when the comparator 35 outputs an L level, that is, when the initially set offset value is a negative value. . On the other hand, when the comparator 35 outputs the H level, that is, when the offset value set first is a positive value, the selector 34 switches the circuit to be used to the down counter type synchronization circuit 32 side. .

このため、負のオフセット値が設定された場合には、上記した第2実施形態と同様に、オフセット値が基準値(本実施形態では0)になるまで、オフセット値の加算およびFIFO12へのダミーデータの書き込みが行われる一方、オフセット値が基準値になると、ストリームデータがFIFO12へ書き込まれるようになる。これにより、上記した図12や図13に示したような態様で、ダミーデータおよびストリームデータがFIFO12に記憶されて、各チャンネル間を同期させることができる。   For this reason, when a negative offset value is set, as in the second embodiment described above, addition of the offset value and dummy operation to the FIFO 12 until the offset value reaches the reference value (0 in the present embodiment). On the other hand, when the data is written, when the offset value becomes the reference value, the stream data is written to the FIFO 12. As a result, dummy data and stream data are stored in the FIFO 12 in the manner shown in FIGS. 12 and 13 described above, and the channels can be synchronized.

これに対して、正のオフセット値が設定された場合には、上記した第1実施形態と同様に、オフセット値が基準値(本実施形態では0)になるまで、オフセット値の減算およびFIFO12への書き込みが規制される一方、オフセット値が基準値になると、FIFO12への書き込みが許可される。これにより、上記した図7〜9に示したような態様で、ストリームデータがFIFO12に記憶されて、各チャンネル間を同期させることができる。   On the other hand, when a positive offset value is set, the offset value is subtracted to the FIFO 12 until the offset value reaches the reference value (0 in the present embodiment), as in the first embodiment. When the offset value reaches the reference value, writing to the FIFO 12 is permitted. As a result, the stream data is stored in the FIFO 12 in the manner shown in FIGS. 7 to 9 and the channels can be synchronized.

このように、本実施形態の構成であっても、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。また、上記した第1実施形態および第2実施形態と同様に、同期回路31を簡単な構成で実現することができるとともに、データ処理部10から独立して作動するハードウェアで実現していることから、処理やメモリ容量の増大を招くことがない。
また、本実施形態のようにダウンカウンタ型同期回路32とアップカウンタ型同期回路33とを設け、オフセット値の正負におうじて自動的に用いる回路を切り替えることにより、汎用性を向上させることができる。
As described above, even in the configuration of the present embodiment, the load on the data processing unit 10 and the necessary memory capacity can be reduced in the configuration in which processing is performed using stream data received through a plurality of channels. Further, similar to the first embodiment and the second embodiment described above, the synchronization circuit 31 can be realized with a simple configuration and realized with hardware that operates independently from the data processing unit 10. Therefore, processing and memory capacity are not increased.
Moreover, versatility can be improved by providing the down counter type synchronizing circuit 32 and the up counter type synchronizing circuit 33 as in the present embodiment, and automatically switching the circuit to be used depending on whether the offset value is positive or negative. .

(第4実施形態)
以下、第4実施形態について、図15および図16を参照しながら説明する。なお、本実施形態は、上記した第2実施形態を拡張した構成となっている。
(Fourth embodiment)
Hereinafter, the fourth embodiment will be described with reference to FIGS. 15 and 16. Note that the present embodiment has a configuration obtained by extending the second embodiment described above.

まず、ストリームデータの受信態様について説明する。本実施形態の場合、ストリームデータには、データの順序を表すインデックス値(以下、INDEX値と称する)が付された状態で受信される。そのため、ストリームデータを受信すれば、時系列的に正しく送信されているか否かを把握することができる。なお、INDEX値は、例えば時刻を示す値(時間的な位置を示す値)や通し番号、あるいは図1に示した測定点(空間的な位置を示す値)などを採用することができる。本実施形態では、測定点をINDEX値として採用している。   First, the reception mode of stream data will be described. In this embodiment, the stream data is received with an index value (hereinafter referred to as an INDEX value) indicating the order of the data. Therefore, if stream data is received, it can be determined whether or not the data is transmitted correctly in time series. As the INDEX value, for example, a value indicating time (a value indicating a temporal position), a serial number, or a measurement point (a value indicating a spatial position) shown in FIG. 1 can be adopted. In the present embodiment, the measurement point is adopted as the INDEX value.

さて、図15に示すように、時刻T30において「1」のデータ(INDEX値=1のデータ)が受信され、時刻T31において「2」のデータ(INDEX値=2のデータ)が受信され、時刻T32において「3」のデータ(INDEX値=3のデータ)が受信され、時刻T33において「5」のデータ(INDEX値=5のデータ)が受信され、時刻T34において「6」のデータ(INDEX値=6のデータ)が受信され、時刻T35において「7」のデータ(INDEX値=7のデータ)が受信されるとする。   As shown in FIG. 15, data “1” (data with INDEX value = 1) is received at time T30, and data “2” (data with INDEX value = 2) is received at time T31. At T32, data “3” (INDEX value = 3) is received, data “5” (INDEX value = 5) is received at time T33, and data “6” (INDEX value) is received at time T34. = 6) is received, and data “7” (data of INDEX value = 7) is received at time T35.

つまり、この受信態様では、受信経路の障害やノイズあるいは出力側(例えばセンサユニット2側)の故障等のなんらかの要因によって、INDEX値=4のデータが無い状態でストリームデータが受信されることになる。
この場合、上記した第2実施形態等のように最初に各チャンネルを同期させたとしても、動作中に同期がとれなくなる要因(INDEX値=4のデータの欠落)が生じていることから、受信したストリームデータをそのままFIFO12に書き込むと、他のチャンネルとの同期がとれなくなる。そこで、本実施形態では、データの欠落等によりINDEX値が不連続となる状況が発生した場合には、以下のようにして各チャンネルの同期をとっている。
That is, in this reception mode, stream data is received in a state where there is no data with the INDEX value = 4 due to a failure in the reception path, noise, or a failure on the output side (for example, the sensor unit 2 side). .
In this case, even if each channel is first synchronized as in the second embodiment described above, there is a factor that causes synchronization to be lost during operation (lost data with INDEX value = 4). If the stream data is written in the FIFO 12 as it is, it cannot be synchronized with other channels. Therefore, in this embodiment, when a situation where the INDEX value becomes discontinuous due to data loss or the like occurs, the channels are synchronized as follows.

図16に示すように、本実施形態のストリーム処理装置1のストリームバッファ40は、同期回路41とFIFO12とを備えている。この同期回路41は、実質的に第2実施形態の同期回路21と同様の構成(以下、便宜的に書き込み制御ブロックとも称する)に加えて、インデックスバッファ42(42a、42b)、および演算器43を備えている。   As shown in FIG. 16, the stream buffer 40 of the stream processing apparatus 1 of this embodiment includes a synchronization circuit 41 and a FIFO 12. The synchronization circuit 41 has substantially the same configuration as the synchronization circuit 21 of the second embodiment (hereinafter also referred to as a write control block for convenience), an index buffer 42 (42a, 42b), and an arithmetic unit 43. It has.

インデックスバッファ42は、連続して受信した少なくとも2つ以上のストリームデータのインデックス値を記憶する。本実施形態の場合、受信したストリームデータのINDEX値は、一方のインデックスバッファ42aに書き込まれ、その際、インデックスバッファ42aに書き込まれていた前回のINDEX値は、インデックスバッファ42bに書き込まれる。このため、インデックスバッファ42aとインデックスバッファ42bに書き込まれているINDEX値を比較することにより、INDEX値が連続しているか否かを判定することができる。   The index buffer 42 stores index values of at least two or more stream data received successively. In the case of the present embodiment, the INDEX value of the received stream data is written to one index buffer 42a, and the previous INDEX value written to the index buffer 42a is written to the index buffer 42b. For this reason, by comparing the INDEX values written in the index buffer 42a and the index buffer 42b, it can be determined whether or not the INDEX values are continuous.

演算器43は、直近の2つのストリームデータのINDEX値を記憶しているインデックスバッファ42(42a、42b)のINDEX値に基づいて、オフセットレジスタ14に設定するオフセット値を演算する。本実施形態の場合、演算器43は、インデックスバッファ42aに書き込まれているINDEX値(以下、便宜的にN番目のINDEX値と称する)と、インデックスバッファ42bに書き込まれているINDEX値(以下、便宜的にN−1番目のINDEX値と称する)とに基づいて、それらの差分値+1の値を、オフセット値として演算する。   The computing unit 43 computes an offset value to be set in the offset register 14 based on the INDEX value of the index buffer 42 (42a, 42b) storing the INDEX values of the two most recent stream data. In the case of the present embodiment, the computing unit 43 includes an INDEX value written in the index buffer 42a (hereinafter referred to as the Nth INDEX value for convenience) and an INDEX value written in the index buffer 42b (hereinafter referred to as “the INDEX value”). For the sake of convenience, the difference value + 1 is calculated as an offset value based on the (N−1th INDEX value).

具体的には、演算器43は、例えばN番目のINDEX値が「5」であり、N−1番目のINDEX値が「4」であった場合、4−5+1=0をオフセット値として演算する。また、演算器43は、後述するようにN番目のINDEX値が「5」であり、N−1番目のINDEX値が「3」であった場合には、3−5+1=−1をオフセット値として演算する。そして、同期回路41は、演算器43で演算したオフセット値をオフセットレジスタ14に設定する。   Specifically, for example, when the Nth INDEX value is “5” and the N−1th INDEX value is “4”, the calculator 43 calculates 4-5 + 1 = 0 as an offset value. . Further, as will be described later, when the Nth INDEX value is “5” and the N−1th INDEX value is “3”, the arithmetic unit 43 sets 3-5 + 1 = −1 as an offset value. Calculate as Then, the synchronization circuit 41 sets the offset value calculated by the calculator 43 in the offset register 14.

次に上記した構成の作用について説明する。
図15に示すように、時刻T30において「1」のデータを受信し、時刻T31において「2」のデータを受信した場合、演算器43により演算されるオフセット値は0−1+1=0となる。この場合、同期回路41の動作態様は、オフセット値が基準値(本実施形態では0)と一致することから、書き込み制御ブロックにおいて受信したストリームデータのFIFO12への書き込みが許可される。また、時刻T32において「3」のデータを受信した場合も、演算されるオフセット値が0になることから、受信したストリームデータがFIFO12に書き込まれることになる。
Next, the operation of the above configuration will be described.
As shown in FIG. 15, when data “1” is received at time T30 and data “2” is received at time T31, the offset value calculated by the calculator 43 is 0-1 + 1 = 0. In this case, the operation mode of the synchronization circuit 41 is that the offset value matches the reference value (0 in this embodiment), so that the writing of the stream data received in the write control block to the FIFO 12 is permitted. Also, when the data “3” is received at time T32, the calculated offset value is 0, and thus the received stream data is written in the FIFO 12.

さて、時刻T33において「5」のデータを受信した場合、オフセット値は、3−5+1=−1として演算される。そして、−1のオフセット値がオフセットレジスタ14に設定されることで、上記した第2実施形態と同様に、セレクタ25によってFIFO12のデータ入力がダミーデータバッファ24側に切り替えられ、ファミーデータ(X)がFIFO12に書き込まれる。このとき、オフセット値が加算されて0になる。このため、受信した「5」のデータが引き続いてFIFO12に書き込まれる。   When the data “5” is received at time T33, the offset value is calculated as 3-5 + 1 = −1. Then, by setting the offset value of −1 in the offset register 14, the data input of the FIFO 12 is switched to the dummy data buffer 24 side by the selector 25, as in the second embodiment described above, and the family data (X) Is written into the FIFO 12. At this time, the offset value is added to zero. For this reason, the received data “5” is subsequently written to the FIFO 12.

その後、時刻T34において「6」のデータを受信した場合は、演算されるオフセット値が0になることから、受信したストリームデータがFIFO12に書き込まれる。また、時刻T35において「7」のデータを受信した場合も、演算されるオフセット値が0になることから、受信したストリームデータがFIFO12に書き込まれる。   Thereafter, when the data “6” is received at time T34, the calculated offset value becomes 0, and thus the received stream data is written into the FIFO 12. Also, when the data “7” is received at time T 35, the calculated offset value is 0, and thus the received stream data is written into the FIFO 12.

このような同期回路41の動作によって、例えば時刻T35の時点では、FIFO12の記憶態様は、読み出し側の先頭から順に「1」のデータ、「2」のデータ、「3」のデータ、ダミーデータ、「5」のデータ、「6」のデータ、「7」のデータが記憶されることになる。つまり、例えば「4」のデータが欠落している場合であれば、その欠落は、ダミーデータによって補填される。   By such an operation of the synchronization circuit 41, for example, at time T35, the storage mode of the FIFO 12 is “1” data, “2” data, “3” data, dummy data, in order from the head on the reading side. Data “5”, data “6”, and data “7” are stored. That is, for example, if “4” data is missing, the missing data is compensated by dummy data.

これにより、データが欠落したチャンネルと他のチャンネルとの間にずれが生じることが防止される。すなわち、各チャンネル間を同期させることができる。なお、図15ではCH[0]を例示しているが、他のチャンネルについても同様である。
このように、本実施形態の構成であっても、上記した第2実施形態等と同様に、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。
As a result, it is possible to prevent a shift between the channel in which data is lost and another channel. That is, the channels can be synchronized. Although FIG. 15 illustrates CH [0], the same applies to other channels.
As described above, even in the configuration of the present embodiment, as in the second embodiment described above, in the configuration in which processing is performed using stream data received by a plurality of channels, the load on the data processing unit 10 and necessary Memory capacity can be reduced.

また、本実施形態の場合、INDEX値に基づいてデータの欠落を検出し、データが欠落した場合には、欠落したデータ分のダミーデータをFIFO12に記憶させている。これにより、連続的にストリームデータを受信している動作中においても、各チャンネル間でデータにずれが生じることが防止され、各チャンネル間を同期させることができる。   In the case of the present embodiment, the lack of data is detected based on the INDEX value. When data is missing, dummy data for the missing data is stored in the FIFO 12. Thereby, even during the operation of receiving stream data continuously, it is possible to prevent the data from being shifted between the channels and to synchronize the channels.

(第5実施形態)
以下、第5実施形態について、図17および図18を参照しながら説明する。なお、本実施形態は、上記した第4実施形態を拡張した構成となっているため、重複する部分の詳細な説明は省略する。
(Fifth embodiment)
Hereinafter, the fifth embodiment will be described with reference to FIGS. 17 and 18. In addition, since this embodiment becomes a structure which expanded above-described 4th Embodiment, detailed description of the overlapping part is abbreviate | omitted.

本実施形態のストリームデータの受信態様は、図17に示すように実質的に第4実施形態と同様のものであり、時刻T40において「1」のデータが受信され、時刻T41において「2」のデータが受信され、時刻T42において「3」のデータが受信され、時刻T43において「5」のデータが受信され、時刻T44において「6」のデータが受信され、時刻T45において「7」のデータが受信されるものとする。また、ストリームデータにはINDEX値が付されているものとする。また、本実施形態では、測定点がINDEX値として付されている。   As shown in FIG. 17, the stream data reception mode of this embodiment is substantially the same as that of the fourth embodiment. Data “1” is received at time T40 and “2” is received at time T41. Data is received, data “3” is received at time T42, data “5” is received at time T43, data “6” is received at time T44, and data “7” is received at time T45. It shall be received. Further, it is assumed that the INDEX value is attached to the stream data. In the present embodiment, the measurement points are assigned as INDEX values.

この場合、「4」のデータが欠落していることになるが、「3」のデータは「4」のデータの近傍の測定結果(図2参照)であることから、「3」のデータと「4」のデータとは概ね近似したデータになるものと推測される。なお、データが近似するか否かはストリームデータの種類によっても異なるが、例えば温度センサ等から出力されるデータであれば、概ね近似すると考えられる。   In this case, the data “4” is missing, but the data “3” is a measurement result (see FIG. 2) in the vicinity of the data “4”. It is presumed that the data “4” is approximate data. Whether or not the data approximates depends on the type of stream data. For example, data output from a temperature sensor or the like is considered to be approximately approximate.

さて、上記した第2実施形態等のように最初に各チャンネルを同期させたとしても、動作中に同期がとれなくなる要因(INDEX値=4のデータの欠落)が生じていることから、受信したストリームデータをそのままFIFO12に書き込むと、他のチャンネルとの同期がとれなくなる。つまり、本実施形態でいえば、異なる測定点のデータが、同一測定点のデータとしてデータ処理されてしまう。   Now, even if each channel is first synchronized as in the second embodiment described above, there is a cause of loss of synchronization during operation (data loss of INDEX value = 4). If stream data is written in the FIFO 12 as it is, synchronization with other channels cannot be achieved. That is, in the present embodiment, data of different measurement points is processed as data of the same measurement point.

そこで、本実施形態では、データの欠落等によりINDEX値が不連続となる状況が発生した場合には、以下のようにして各チャンネルを同期させている。より詳細には、連続して受信した少なくとも2つ以上のストリームデータのインデックス値の差分値が2以上である場合、差分値に相当する要素を挿入することで、各チャンネルのストリームデータを同期させている。本実施形態では、要素として、受信したストリームデータを採用している。   Therefore, in the present embodiment, when a situation in which the INDEX value becomes discontinuous due to data loss or the like occurs, the channels are synchronized as follows. More specifically, when the difference value between the index values of at least two or more stream data received continuously is 2 or more, the stream data of each channel is synchronized by inserting an element corresponding to the difference value. ing. In the present embodiment, the received stream data is adopted as an element.

図17に示すように、本実施形態のストリーム処理装置1のストリームバッファ50は、同期回路51とFIFO12とを備えている。この同期回路51は、実質的に第4実施形態の同期回路41と同様の構成(以下、便宜的に書き込み制御ブロックと称する)に加えて、2つのデータバッファ52(52a、52b)、セレクタ53、および比較器54を備えている。   As shown in FIG. 17, the stream buffer 50 of the stream processing apparatus 1 of this embodiment includes a synchronization circuit 51 and a FIFO 12. The synchronization circuit 51 has substantially the same configuration as the synchronization circuit 41 of the fourth embodiment (hereinafter referred to as a write control block for convenience), two data buffers 52 (52a and 52b), and a selector 53. , And a comparator 54.

データバッファ52は、連続して受信した少なくとも2つ以上のストリームデータを記憶する。本実施形態の場合、受信したストリームデータは、一方のデータバッファ52aに書き込まれ、その際、データバッファ52aに書き込まれていた前回のデータは、データバッファ52bに書き込まれる。このため、データバッファ52aとデータバッファ52bには、連続して受信された2つのデータが記憶されることになる。以下、データバッファ52aに書き込まれているデータを便宜的にD[N]とも称し、データバッファ52bに書き込まれているデータを便宜的にD[N−1]とも称する。   The data buffer 52 stores at least two or more stream data received successively. In the case of this embodiment, the received stream data is written in one data buffer 52a, and the previous data written in the data buffer 52a is written in the data buffer 52b. For this reason, two data received successively are stored in the data buffer 52a and the data buffer 52b. Hereinafter, the data written to the data buffer 52a is also referred to as D [N] for convenience, and the data written to the data buffer 52b is also referred to as D [N-1] for convenience.

セレクタ53は、FIFO12のデータ入力を、書き込み制御ブロック側とデータバッファ52側とに切り替える。この切り替えは、比較器54により行われる。この比較器54は、インデックスバッファ42a、42bのINDEX値を比較し、INDEX値の差が2以上である場合に、データバッファ52側に切り替える。   The selector 53 switches the data input of the FIFO 12 between the write control block side and the data buffer 52 side. This switching is performed by the comparator 54. The comparator 54 compares the INDEX values of the index buffers 42a and 42b and switches to the data buffer 52 side when the difference between the INDEX values is 2 or more.

次に上記した構成の作用について説明する。
図17に示すように、本実施形態のストリームデータの受信態様は、上記した第4実施形態と同一である。そのため、詳細な説明は省略するが、時刻T40から時刻T42の期間では演算器43によって演算されるオフセット値が0になるので、FIFO12には受信したストリームデータが書き込まれる。
Next, the operation of the above configuration will be described.
As shown in FIG. 17, the stream data reception mode of this embodiment is the same as that of the fourth embodiment described above. Therefore, although detailed description is omitted, since the offset value calculated by the calculator 43 is 0 during the period from time T40 to time T42, the received stream data is written in the FIFO 12.

さて、時刻T43において「5」のデータを受信した場合、オフセット値は、3−5+1=−1として演算されるため、セレクタ25によって経路がダミーデータバッファ24側に切り替えられる。   When the data “5” is received at time T43, the offset value is calculated as 3-5 + 1 = −1. Therefore, the selector 25 switches the path to the dummy data buffer 24 side.

ただし、INDEX値の差分が2以上であるので、つまり、欠落したデータが存在するので、セレクタ53により、FIFO12のデータ入力は、データバッファ52側に切り替えられる。この時刻T43の時点では、データバッファ52aには時刻T43に受信した「5」のデータが記憶され、データバッファ52bには時刻T42に受信した「3」のデータが記憶されている。このため、FIFO12には、データバッファ52bに記憶されている「3」のデータが書き込まれる。そして、「3」のデータが書き込まれた時点でオフセット値が0になることから、受信した「5」のデータが続いてFIFO12に書き込まれる。   However, since the difference between the INDEX values is 2 or more, that is, there is missing data, the selector 53 switches the data input of the FIFO 12 to the data buffer 52 side. At time T43, data “5” received at time T43 is stored in the data buffer 52a, and data “3” received at time T42 is stored in the data buffer 52b. Therefore, the data “3” stored in the data buffer 52 b is written into the FIFO 12. Since the offset value becomes 0 when the data “3” is written, the received data “5” is subsequently written to the FIFO 12.

その後、時刻T44や時刻T45においては、演算されるオフセット値が0であり、INDEX値の差分も1であることから、受信した「6」のデータや「7」のデータがそのままFIFO12に書き込まれる。
このような同期回路51の動作によって、例えば時刻T45の時点では、FIFO12の記憶態様は、読み出し側の先頭から順に「1」のデータ、「2」のデータ、「3」のデータ、「3」のデータ、「5」のデータ、「6」のデータ、「7」のデータが記憶されることになる。つまり、例えば「4」のデータが欠落している場合であれば、その欠落は、直近に受信し、INDEXの差分が1となっている「3」のデータにより補填される。
After that, at time T44 and time T45, the calculated offset value is 0 and the difference between the INDEX values is 1. Therefore, the received “6” data and “7” data are written in the FIFO 12 as they are. .
By such an operation of the synchronizing circuit 51, for example, at the time T45, the storage mode of the FIFO 12 is “1” data, “2” data, “3” data, “3” in order from the head on the reading side. Data, “5” data, “6” data, and “7” data are stored. That is, for example, if the data “4” is missing, the missing data is compensated for by the data “3” that is received most recently and the INDEX difference is 1.

これにより、データが欠落したチャンネルと他のチャンネルとの間にずれが生じることが防止される。すなわち、各チャンネル間を同期させることができる。なお、図17ではCH[0]を例示しているが、他のチャンネルについても同様である。
このように、本実施形態の構成であっても、上記した第4実施形態等と同様に、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。また、INDEX値に基づいてデータの欠落を検出しているので、連続的にストリームデータを受信している動作中においても、各チャンネル間でデータにずれが生じることが防止される。
そして、本実施形態の場合、例えば「4」のデータが欠落した場合にはそれに近似すると推測される「3」のデータで補填するので、ストリームデータの種類によっては、そのままデータ処理に用いることができる。
As a result, it is possible to prevent a shift between the channel in which data is lost and another channel. That is, the channels can be synchronized. Although FIG. 17 illustrates CH [0], the same applies to other channels.
As described above, even in the configuration of the present embodiment, in the configuration in which processing is performed using stream data received through a plurality of channels, as in the fourth embodiment described above, the load on the data processing unit 10 and necessary Memory capacity can be reduced. In addition, since the data loss is detected based on the INDEX value, it is possible to prevent the data from being shifted between the channels even during the operation of continuously receiving the stream data.
In the case of the present embodiment, for example, when the data “4” is missing, it is compensated with the data “3” that is estimated to approximate it. Depending on the type of stream data, it can be used as it is for data processing. it can.

(第6実施形態)
以下、第6実施形態について、図19および図20を参照しながら説明する。なお、以下では上記した第1実施形態のようなダウンカウンタ型の同期回路と組み合わせた例を示すが、第2〜第5実施形態のようなアップカウンタ型の同期回路と組み合わせてもよい。
(Sixth embodiment)
Hereinafter, the sixth embodiment will be described with reference to FIGS. 19 and 20. In the following, an example of combination with a down-counter type synchronization circuit as in the first embodiment is shown, but it may be combined with an up-counter type synchronization circuit as in the second to fifth embodiments.

図19に示すように、本実施形態のストリームデータの受信態様は、時刻T50において「1」のデータが受信され、時刻T51において「2」のデータが受信され、時刻T52において「3」のデータが受信され、時刻T54において「4」のデータが受信され、時刻T54において再度「4」のデータが受信され、時刻T55において「5」のデータが受信され、時刻T56において「6」のデータが受信されるものとする。また、ストリームデータにはINDEX値が付されているものとする。また、本実施形態では、測定点がINDEX値として付されている。   As shown in FIG. 19, in the stream data reception mode of this embodiment, data “1” is received at time T50, data “2” is received at time T51, and data “3” is received at time T52. "4" data is received at time T54, "4" data is received again at time T54, "5" data is received at time T55, and "6" data is received at time T56. It shall be received. Further, it is assumed that the INDEX value is attached to the stream data. In the present embodiment, the measurement points are assigned as INDEX values.

この場合、「4」のデータを重複して受信していることから、そのままFIFO12に書き込むと、他のチャンネルとの同期がとれなくなる。つまり、本実施形態でいえば、異なる測定点のデータが、同一測定点のデータとしてデータ処理されてしまう。
そこで、本実施形態では、データの重複によりINDEX値が不連続となる状況が発生した場合には、以下のようにして各チャンネルを同期させている。
図20に示すように、本実施形態のストリーム処理装置1のストリームバッファ60は、同期回路61とFIFO12とを備えている。この同期回路51は、実質的に第1実施形態のダウンカウンタ型の同期回路13と同様の構成(以下、便宜的に書き込み制御ブロックと称する)に加えて、2つのインデックスバッファ42(42a、42b)、比較器62、ANDゲート63を備えている。
In this case, since the data “4” is received in duplicate, if it is written to the FIFO 12 as it is, it cannot be synchronized with other channels. That is, in the present embodiment, data of different measurement points is processed as data of the same measurement point.
Therefore, in the present embodiment, when a situation occurs in which the INDEX value becomes discontinuous due to data duplication, the channels are synchronized as follows.
As shown in FIG. 20, the stream buffer 60 of the stream processing apparatus 1 according to the present embodiment includes a synchronization circuit 61 and a FIFO 12. The synchronization circuit 51 has two index buffers 42 (42a, 42b) in addition to the configuration substantially the same as the down counter type synchronization circuit 13 of the first embodiment (hereinafter referred to as a write control block for convenience). ), A comparator 62, and an AND gate 63.

インデックスバッファ42は、実質的に第3実施形態と同一の作動をするものであり、連続して受信した少なくとも2つ以上のストリームデータのインデックス値を記憶する。また、受信したストリームデータのINDEX値は、一方のインデックスバッファ42aに書き込まれ、その際、インデックスバッファ42aに書き込まれていた前回のINDEX値は、インデックスバッファ42bに書き込まれる。
比較器62は、インデックスバッファ42aに書き込まれているINDEX値とインデックスバッファ42bに書き込まれているINDEX値とを比較し、両者が一致する場合にはHレベルを出力する一方、両者が一致しない場合にはLレベルを出力する。
The index buffer 42 operates substantially the same as in the third embodiment, and stores index values of at least two or more stream data received successively. The INDEX value of the received stream data is written into one index buffer 42a, and the previous INDEX value written in the index buffer 42a is written in the index buffer 42b.
The comparator 62 compares the INDEX value written in the index buffer 42a with the INDEX value written in the index buffer 42b, and outputs an H level when the two match, while the two do not match. Outputs an L level.

この比較器62の出力は、反転されてANDゲート63に入力されている。また、ANDゲート63には、書き込み制御ブロックのANDゲート19の出力が入力される。なお、ANDゲート19の出力は、第1実施形態で説明しているので詳細は省略するが、オフセット値が基準値(本実施形態では0)と一致すればデータ有効信号(S_EN)に応じてHレベルになり、オフセット値と基準値とが一致しなければデータ有効信号(S_EN)が入力されてもLレベルになる。このANDゲート63の出力は、FIFO12の書き込み許可信号(WR_EN)に接続されている。   The output of the comparator 62 is inverted and input to the AND gate 63. Further, the output of the AND gate 19 of the write control block is input to the AND gate 63. The output of the AND gate 19 has been described in the first embodiment and will not be described in detail. However, if the offset value matches the reference value (0 in this embodiment), the data valid signal (S_EN) is used. If the offset value and the reference value do not coincide with each other, the signal level becomes the L level even if the data valid signal (S_EN) is input. The output of the AND gate 63 is connected to the write enable signal (WR_EN) of the FIFO 12.

そのため、同期回路61では、インデックスバッファ42a、42bに同一のINDEX値が記憶されている場合には、FIFO12の書き込み許可信号(WR_EN)がLレベルとなり、FIFO12への書き込みが規制される。
次に上記した構成の作用について説明する。
同期回路61は、図19に示す受信態様の場合、時刻T50〜時刻T53の期間では、連続して受信したストリームデータのINDEX値(本実施形態では、測定点)が同一ではないので、受信したストリームデータがFIFO12に書き込まれることになる。
Therefore, in the synchronization circuit 61, when the same INDEX value is stored in the index buffers 42a and 42b, the write permission signal (WR_EN) of the FIFO 12 becomes L level, and writing to the FIFO 12 is restricted.
Next, the operation of the above configuration will be described.
In the case of the reception mode shown in FIG. 19, the synchronization circuit 61 has received the INDEX values (measurement points in the present embodiment) of the stream data continuously received during the period from time T50 to time T53. Stream data is written to the FIFO 12.

これに対して、同期回路61は、時刻T54において「4」のデータを受信した場合、その前の時刻T53においもて同一のINDEX値となる「4」のデータを受信していることから、時刻T54で受信した「4」のデータの書き込みを規制する。
その後、同期回路61は、時刻T55において「5」のデータを受信すると、INDEX値が同一でないことから、FIFO12への書き込みを許可する。また、時刻T56において「6」のデータを受信した場合も、INDEX値が同一でないことから、FIFO12への書き込みが許可される。
On the other hand, when the data of “4” is received at time T54, the synchronization circuit 61 receives data of “4” having the same INDEX value at the previous time T53. The writing of the data “4” received at time T54 is restricted.
After that, when the data of “5” is received at time T55, the synchronization circuit 61 permits writing to the FIFO 12 because the INDEX values are not the same. Also, when data “6” is received at time T56, since the INDEX values are not the same, writing to the FIFO 12 is permitted.

このような同期回路61の動作によって、例えば時刻T56の時点では、FIFO12の記憶態様は、読み出し側の先頭から順に「1」のデータ、「2」のデータ、「3」のデータ、「4」のデータ、「5」のデータ、「6」のデータが記憶されることになる。つまり、例えば「4」のデータが重複していた場合には、重複したデータの書き込みが規制され、そのデータはキャンセル(破棄)される。   By such an operation of the synchronizing circuit 61, for example, at the time T56, the storage mode of the FIFO 12 is “1” data, “2” data, “3” data, “4” in order from the head on the reading side. Data, “5” data, and “6” data are stored. That is, for example, when the data “4” is duplicated, writing of the duplicated data is restricted, and the data is canceled (discarded).

これにより、データが重複するような場合において他のチャンネルとの間にずれが生じることが防止される。すなわち、各チャンネル間を同期させることができる。なお、図19ではCH[0]を例示しているが、他のチャンネルについても同様である。
このように、本実施形態の構成であっても、上記した第2実施形態等と同様に、複数のチャンネルで受信したストリームデータを用いて処理する構成において、データ処理部10の負荷や必要なメモリ容量を削減することができる。
As a result, in the case where data overlaps, it is possible to prevent a deviation from occurring with other channels. That is, the channels can be synchronized. Although FIG. 19 illustrates CH [0], the same applies to other channels.
As described above, even in the configuration of the present embodiment, as in the second embodiment described above, in the configuration in which processing is performed using stream data received by a plurality of channels, the load on the data processing unit 10 and necessary Memory capacity can be reduced.

また、本実施形態の同期回路61は、2つのインデックスバッファ42(42a、42b)を有し、受信したストリームデータのインデックス値とその直前に受信したストリームデータのインデックス値とが一致する場合には、今回受信したストリームデータのFIFO12への書き込みを規制する。これにより、連続的にストリームデータを受信している動作中においてデータが重複したような場合であっても、各チャンネル間でデータの順序にずれが生じることが防止される。したがって、各チャンネル間を同期させることができる。   In addition, the synchronization circuit 61 of the present embodiment has two index buffers 42 (42a and 42b), and when the index value of the received stream data matches the index value of the stream data received immediately before it. The writing of the stream data received this time to the FIFO 12 is restricted. Thereby, even if the data is duplicated during the operation of continuously receiving the stream data, it is possible to prevent the data order from being shifted between the channels. Therefore, the channels can be synchronized.

(その他の実施形態)
本発明は、上記した実施形態で例示したものに限定されるものではなく、その要旨を逸脱しない範囲で任意に変形あるいは拡張することができる。
実施形態で例示したハードウェア構成は、要部を機能的に示したものであり、これに限定されない。例えば、FIFO12へ書き込むための詳細なタイミングの制御等も勿論行われている。つまり、各実施形態で示したそれぞれの同期回路は、実質的に同様の処理ができれば、異なる論理回路で実現してもよい。また、各信号の出力レベルやその極性は、実施形態で例示したものに限定されない。例えば、有効/無効を切り替える信号レベルは実施形態とは逆の極性であってもよい。勿論、極性が異なる場合には、その極性に応じた論理回路を用いればよい。
(Other embodiments)
The present invention is not limited to those exemplified in the above-described embodiments, and can be arbitrarily modified or expanded without departing from the gist thereof.
The hardware configuration exemplified in the embodiment is a functional view of the main part, and is not limited to this. For example, detailed timing control for writing to the FIFO 12 is also performed. That is, each synchronization circuit shown in each embodiment may be realized by different logic circuits as long as substantially the same processing can be performed. Further, the output level of each signal and its polarity are not limited to those exemplified in the embodiment. For example, the signal level for switching between valid / invalid may have the opposite polarity to the embodiment. Of course, when the polarities are different, a logic circuit corresponding to the polarities may be used.

各実施形態で例示したインデックスバッファ42およびデータバッファ52の数は一例であり、2つ以上の各データを記憶することができればこれに限定されない。
ストリームデータは、連続的に受信されるものであればよく、映像データや音楽データ等であってもよい。
The numbers of the index buffers 42 and the data buffers 52 exemplified in each embodiment are examples, and are not limited to this as long as two or more pieces of data can be stored.
The stream data only needs to be continuously received, and may be video data, music data, or the like.

図面中、1はストリーム処理装置、11、20、30、40、50、60はストリームバッファ、13、21、31、41、51、61は同期回路、12はFIFO、14はオフセットレジスタ、15は減算器、16、23はゲート回路、22は加算器、24はダミーデータバッファ、32はダウンカウンタ型同期回路、33はアップカウンタ型同期回路、42、42a、42bはインデックスバッファ、43は演算器、52、52a、52bはデータバッファ、54は比較器を示す。   In the drawing, 1 is a stream processing device, 11, 20, 30, 40, 50, 60 are stream buffers, 13, 21, 31, 41, 51, 61 are synchronization circuits, 12 is a FIFO, 14 is an offset register, 15 is Subtractors 16 and 23 are gate circuits, 22 is an adder, 24 is a dummy data buffer, 32 is a down counter type synchronization circuit, 33 is an up counter type synchronization circuit, 42, 42a and 42b are index buffers, and 43 is an arithmetic unit 52, 52a and 52b are data buffers, and 54 is a comparator.

Claims (9)

ストリームデータを受信するチャンネルごとに設けられている複数のストリームバッファ(11、20、30、40、50、60)と、
複数の前記ストリームバッファ(11、20、30、40、50、60)から同じタイミングで読み出したストリームデータを用いてデータ処理を行うデータ処理部(10)と、を備え、
それぞれの前記ストリームバッファ(11、20、30、40、50、60)は、
受信したストリームデータを先入れ先出し方式で記憶するFIFOメモリ(12)と、
前記FIFOメモリ(12)へ受信したストリームデータを書き込むタイミングを調整することで各チャンネルのストリームデータを同期させる同期回路(13、21、31、32、33、41、51、61)と、によって構成されていることを特徴とするストリーム処理装置。
A plurality of stream buffers (11, 20, 30, 40, 50, 60) provided for each channel for receiving stream data;
A data processing unit (10) that performs data processing using stream data read from the plurality of stream buffers (11, 20, 30, 40, 50, 60) at the same timing,
Each of the stream buffers (11, 20, 30, 40, 50, 60)
A FIFO memory (12) for storing received stream data in a first-in first-out manner;
And a synchronization circuit (13, 21, 31, 32, 33, 41, 51, 61) that synchronizes the stream data of each channel by adjusting the timing of writing the received stream data to the FIFO memory (12). A stream processing apparatus.
前記同期回路(13)は、
他のチャンネルのストリームデータとのずれに相当するオフセット値が設定されるオフセットレジスタ(14)と、
前記オフセットレジスタ(14)に設定されたオフセット値を減算する減算器(15)と、
前記オフセットレジスタ(14)のオフセット値が予め定められている基準値と一致しない場合には、前記減算器(15)によるオフセット値の減算を有効化するとともに、前記FIFOメモリ(12)の書き込みを規制する一方、前記オフセットレジスタ(14)のオフセット値が前記基準値と一致する場合には、前記減算器(15)によるオフセット値の減算を無効化するとともに、前記FIFOメモリ(12)の書き込みを許可するゲート回路(16)と、
により構成されていることを特徴とする請求項1記載のストリーム処理装置。
The synchronization circuit (13)
An offset register (14) in which an offset value corresponding to a deviation from the stream data of other channels is set;
A subtractor (15) for subtracting the offset value set in the offset register (14);
When the offset value of the offset register (14) does not match a predetermined reference value, the subtraction of the offset value by the subtracter (15) is enabled and the FIFO memory (12) is written. On the other hand, when the offset value of the offset register (14) matches the reference value, the subtraction of the offset value by the subtracter (15) is invalidated and the FIFO memory (12) is written. An enabling gate circuit (16);
The stream processing apparatus according to claim 1, comprising:
前記同期回路(13、21)は、
各チャンネル間でのストリームデータのずれに相当するオフセット値が設定されるオフセットレジスタ(14)と、
前記オフセットレジスタ(14)に設定されたオフセット値を加算する加算器(22)と、
ダミーデータを記憶するダミーデータバッファ(24)と、を有し、
前記オフセットレジスタ(14)のオフセット値が予め定められている基準値と一致しない場合には、前記加算器(22)によるオフセット値の加算を有効化するとともに、前記FIFOメモリ(12)に書き込むデータを前記ダミーデータバッファ(24)に記憶されているダミーデータに切り替える一方、前記オフセットレジスタ(14)のオフセット値が前記基準値と一致する場合には、前記加算器(22)によるオフセット値の加算を無効化するとともに、前記FIFOメモリ(12)に書き込むデータを受信したストリームデータに切り替えるゲート回路(23)と、
により構成されていることを特徴とする請求項1記載のストリーム処理装置。
The synchronization circuit (13, 21)
An offset register (14) in which an offset value corresponding to the deviation of the stream data between the channels is set;
An adder (22) for adding the offset value set in the offset register (14);
A dummy data buffer (24) for storing dummy data;
When the offset value of the offset register (14) does not match a predetermined reference value, the addition of the offset value by the adder (22) is validated and the data to be written to the FIFO memory (12) Is switched to the dummy data stored in the dummy data buffer (24), while the offset value of the offset register (14) matches the reference value, the addition of the offset value by the adder (22) And a gate circuit (23) for switching the data to be written to the FIFO memory (12) to the received stream data,
The stream processing apparatus according to claim 1, comprising:
前記同期回路(31)は、
各チャンネル間でのストリームデータのずれに相当するオフセット値が設定されるオフセットレジスタ(14)と、
前記オフセットレジスタ(14)に設定されたオフセット値分の要素を削除することで各チャンネルを同期させるダウンカウンタ型同期回路(32)と、
前記オフセットレジスタ(14)に設定されたオフセット値分の要素を挿入することで各チャンネルを同期させるアップカウンタ型同期回路(33)と、
前記オフセットレジスタ(14)に設定される前記オフセット値の正負に応じて、FIFOメモリ(12)にデータを書き込む際に用いる回路を、前記ダウンカウンタ型同期回路(32)または前記アップカウンタ型同期回路(33)のいずれかに切り替える切替器(34)と、
により構成されていることを特徴とする請求項1記載のストリーム処理装置。
The synchronization circuit (31)
An offset register (14) in which an offset value corresponding to the deviation of the stream data between the channels is set;
A down counter type synchronization circuit (32) for synchronizing each channel by deleting elements corresponding to the offset value set in the offset register (14);
An up-counter type synchronization circuit (33) for synchronizing each channel by inserting elements corresponding to the offset value set in the offset register (14);
A circuit used when writing data into the FIFO memory (12) according to the sign of the offset value set in the offset register (14) is the down counter type synchronizing circuit (32) or the up counter type synchronizing circuit. A switch (34) for switching to any of (33);
The stream processing apparatus according to claim 1, comprising:
前記ダウンカウンタ型同期回路(32)は、前記オフセットレジスタ(14)のオフセット値が予め定められている基準値と一致しない場合には、前記減算器(15)によるオフセット値の減算を有効化するとともに、受信したストリームデータの前記FIFOメモリ(12)への書き込みを規制することで前記要素としての受信したストリームデータを削除する一方、前記オフセットレジスタ(14)のオフセット値が前記基準値と一致する場合には、前記減算器(15)によるオフセット値の減算を無効化するとともに、受信したストリームデータを前記FIFOメモリ(12)へ書き込みを許可し、
前記アップカウンタ型同期回路(33)は、前記オフセットレジスタ(14)のオフセット値が予め定められている基準値と一致しない場合には、前記加算器(22)によるオフセット値の加算を有効化するとともに、受信したストリームデータの代わりにダミーデータバッファ(24)に記憶されているダミーデータを前記FIFOメモリ(12)に書き込むことで前記要素としてのダミーデータを挿入する一方、前記オフセットレジスタ(14)のオフセット値が前記基準値と一致する場合には、前記加算器(22)によるオフセット値の加算を無効化するとともに、受信したストリームデータの前記FIFOメモリ(12)へ書き込みを許可することを特徴とする請求項4記載のストリーム処理装置。
The down counter type synchronization circuit (32) validates the subtraction of the offset value by the subtracter (15) when the offset value of the offset register (14) does not match a predetermined reference value. At the same time, the stream data received as the element is deleted by restricting the writing of the received stream data to the FIFO memory (12), while the offset value of the offset register (14) matches the reference value. In this case, the subtraction of the offset value by the subtracter (15) is invalidated, and the received stream data is allowed to be written to the FIFO memory (12).
The up-counter synchronization circuit (33) validates the addition of the offset value by the adder (22) when the offset value of the offset register (14) does not match a predetermined reference value. At the same time, dummy data as the element is inserted by writing dummy data stored in the dummy data buffer (24) in the FIFO memory (12) instead of the received stream data, while the offset register (14) Is equal to the reference value, the addition of the offset value by the adder (22) is invalidated and the received stream data is allowed to be written to the FIFO memory (12). The stream processing apparatus according to claim 4.
ストリームデータは、データの順序を表すインデック値を含んでおり、
前記同期回路(21、31、41)は、連続して受信した少なくとも2つ以上のストリームデータのインデックス値を記憶するインデックスバッファ(42)と、前記インデックスバッファ(42)に記憶されているインデックス値に基づいて前記オフセットレジスタ(14)に設定するオフセット値を演算する演算器(43)とを有し、前記演算器(43)で演算したオフセット値を前記オフセットレジスタ(14)に設定することを特徴とする請求項3から5のいずれか一項記載のストリーム処理装置。
The stream data includes an index value indicating the order of data,
The synchronization circuit (21, 31, 41) includes an index buffer (42) for storing index values of at least two or more stream data received in succession, and an index value stored in the index buffer (42). A calculation unit (43) for calculating an offset value to be set in the offset register (14) based on the offset value, and setting the offset value calculated by the calculation unit (43) in the offset register (14). The stream processing apparatus according to claim 3, wherein the stream processing apparatus is characterized in that:
ストリームデータは、データの順序を表すインデック値を含んでおり、
前記同期回路(21、31、41、51)は、連続して受信した少なくとも2つ以上のストリームデータのインデックス値の差分値が2以上である場合、差分値に相当する要素を挿入することで、各チャンネルのストリームデータを同期させることを特徴とする請求項3から6のいずれか一項記載のストリーム処理装置。
The stream data includes an index value indicating the order of data,
The synchronization circuit (21, 31, 41, 51) inserts an element corresponding to the difference value when the difference value of the index values of at least two or more stream data received successively is 2 or more. The stream processing apparatus according to claim 3, wherein the stream data of each channel is synchronized.
前記同期回路(21、31、41、51)は、連続して受信した少なくとも2つ以上のストリームデータのインデックス値を記憶するインデックスバッファ(42)と、連続して受信した少なくとも2つ以上のストリームデータを記憶するデータバッファ(52)と、前記インデックスバッファ(42)に記憶されているインデックス値を比較して差分を検出する比較器(54)とを有し、前記インデックスバッファ(42)に記憶されているインデックス値の差分が2以上であった場合、前記要素として、前記データバッファ(52)に記憶されているストリームデータのうち差分が1となる直近のストリームデータを前記FIFOメモリ(12)に書き込むことを特徴とする請求項7記載のストリーム処理装置。   The synchronization circuit (21, 31, 41, 51) includes an index buffer (42) for storing index values of at least two or more stream data continuously received, and at least two or more streams received continuously. A data buffer (52) for storing data and a comparator (54) for comparing the index values stored in the index buffer (42) to detect a difference are stored in the index buffer (42). If the difference between the index values is 2 or more, the latest stream data having a difference of 1 among the stream data stored in the data buffer (52) as the element is the FIFO memory (12). The stream processing apparatus according to claim 7, wherein the stream processing apparatus writes data to the stream. ストリームデータは、データの順序を表すインデック値を含んでおり、
前記同期回路(13、21、31、32、33、41、51、61)は、連続して受信した少なくとも2つ以上のストリームデータのインデックス値を記憶するインデックスバッファ(42)を有し、受信したストリームデータのインデックス値とその直前に受信したストリームデータのインデックス値とが一致する場合には、今回受信したストリームデータの前記FIFOメモリ(12)への書き込みを規制することを特徴とする請求項1から8のいずれか一項記載のストリーム処理装置。
The stream data includes an index value indicating the order of data,
The synchronization circuit (13, 21, 31, 32, 33, 41, 51, 61) includes an index buffer (42) for storing an index value of at least two or more stream data received in succession. When the index value of the stream data received matches the index value of the stream data received immediately before, the writing of the stream data received this time to the FIFO memory (12) is restricted. The stream processing apparatus according to any one of 1 to 8.
JP2015071914A 2015-03-31 2015-03-31 Stream processing device Active JP6477155B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015071914A JP6477155B2 (en) 2015-03-31 2015-03-31 Stream processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015071914A JP6477155B2 (en) 2015-03-31 2015-03-31 Stream processing device

Publications (2)

Publication Number Publication Date
JP2016192694A true JP2016192694A (en) 2016-11-10
JP6477155B2 JP6477155B2 (en) 2019-03-06

Family

ID=57247141

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015071914A Active JP6477155B2 (en) 2015-03-31 2015-03-31 Stream processing device

Country Status (1)

Country Link
JP (1) JP6477155B2 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56146324A (en) * 1980-04-15 1981-11-13 Fujitsu Ltd Pulse delaying circuit
JPH01221958A (en) * 1988-03-01 1989-09-05 Oki Electric Ind Co Ltd Interpolation circuit for defective packet
JPH03250834A (en) * 1990-02-28 1991-11-08 Fujitsu Ltd Method for detecting and correcting mis-delivery of missing of cell
JPH04154211A (en) * 1990-10-17 1992-05-27 Ando Electric Co Ltd Timing pulse delay circuit
JP2005159578A (en) * 2003-11-21 2005-06-16 Toshiba Corp Serial data communication system with multiple data transmission paths
US7454537B1 (en) * 2004-04-22 2008-11-18 Altera Corporation Synchronization and channel deskewing circuitry for multi-channel serial links
JP2009027275A (en) * 2007-07-17 2009-02-05 Mitsubishi Electric Corp Communication device and source clock recovery method
WO2014046742A1 (en) * 2012-09-24 2014-03-27 Xilinx, Inc. Clock domain boundary crossing using an asynchronous buffer
JP2014068321A (en) * 2012-09-27 2014-04-17 Nec Access Technica Ltd Transfer device, communication system, transfer method, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56146324A (en) * 1980-04-15 1981-11-13 Fujitsu Ltd Pulse delaying circuit
JPH01221958A (en) * 1988-03-01 1989-09-05 Oki Electric Ind Co Ltd Interpolation circuit for defective packet
JPH03250834A (en) * 1990-02-28 1991-11-08 Fujitsu Ltd Method for detecting and correcting mis-delivery of missing of cell
JPH04154211A (en) * 1990-10-17 1992-05-27 Ando Electric Co Ltd Timing pulse delay circuit
JP2005159578A (en) * 2003-11-21 2005-06-16 Toshiba Corp Serial data communication system with multiple data transmission paths
US7454537B1 (en) * 2004-04-22 2008-11-18 Altera Corporation Synchronization and channel deskewing circuitry for multi-channel serial links
JP2009027275A (en) * 2007-07-17 2009-02-05 Mitsubishi Electric Corp Communication device and source clock recovery method
WO2014046742A1 (en) * 2012-09-24 2014-03-27 Xilinx, Inc. Clock domain boundary crossing using an asynchronous buffer
JP2014068321A (en) * 2012-09-27 2014-04-17 Nec Access Technica Ltd Transfer device, communication system, transfer method, and program

Also Published As

Publication number Publication date
JP6477155B2 (en) 2019-03-06

Similar Documents

Publication Publication Date Title
US10892840B2 (en) Method and apparatus for TDMA slot synchronization and calibration of master and slave
US10051158B2 (en) Control apparatus for image pickup apparatus
JP2006203448A (en) In-vehicle stereo camera device
TWI559684B (en) A matrix phase detector
JP6477155B2 (en) Stream processing device
US20160139625A1 (en) Distributed timer subsystem across multiple devices
US9047184B2 (en) Processing error detection within pipeline circuitry
US11340732B2 (en) Noise avoiding device and method, and noise compensation device and method in touch-sensing panel
WO2023088255A1 (en) Time precision improving method and apparatus, module, and vehicle-mounted system
CA3014595C (en) Method and apparatus for tdma slot synchronization and calibration of master and slave
TWI487269B (en) Phase interpolation device and phase interpolation method
JP6856481B2 (en) Frame synchronization device and frequency difference detection method
KR100410789B1 (en) Synchronous reproduction circuit
US11294760B2 (en) Methods and apparatus for a temporal synchronization unit
US10924091B2 (en) Immediate fail detect clock domain crossing synchronizer
US9880961B2 (en) Asynchronous bridge circuitry and a method of transferring data using asynchronous bridge circuitry
US20170090464A1 (en) Numerical control system having synchronous control function between units
JP4335961B1 (en) Test circuit
KR100328822B1 (en) Noise cancelling apparatus for mouse controller
KR20230101406A (en) Controller system for vehicle and time synchronization method thereof
KR0162766B1 (en) System of calculating the effective depth in fifo architecture
WO2022249818A1 (en) Security device and security method
JP5742334B2 (en) Data transfer system, data transfer device, and data transfer method
JP5187618B2 (en) Counter device
JP3338237B2 (en) Synchronous playback circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170718

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180606

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180619

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180821

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181221

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190121

R151 Written notification of patent or utility model registration

Ref document number: 6477155

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250