JP2007052721A - Synchronous serial interface circuit - Google Patents
Synchronous serial interface circuit Download PDFInfo
- Publication number
- JP2007052721A JP2007052721A JP2005238787A JP2005238787A JP2007052721A JP 2007052721 A JP2007052721 A JP 2007052721A JP 2005238787 A JP2005238787 A JP 2005238787A JP 2005238787 A JP2005238787 A JP 2005238787A JP 2007052721 A JP2007052721 A JP 2007052721A
- Authority
- JP
- Japan
- Prior art keywords
- data
- fifo
- serial
- byte
- reception
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は同期シリアルインタフェース回路に関し、特にFIFOの幅と深さを調節する機能を簡素に実現する技術に関する。 The present invention relates to a synchronous serial interface circuit, and more particularly to a technique for simply realizing a function of adjusting the width and depth of a FIFO.
コンピュータとその周辺装置、あるいはコンピュータ間を接続するシリアル通信フォーマットには様々な種類が存在する。一般にその通信フォーマットで扱うデータ長は最小単位である1バイトの整数倍である。 There are various types of serial communication formats for connecting a computer and its peripheral devices or between computers. In general, the data length handled in the communication format is an integral multiple of 1 byte which is the minimum unit.
従来のシリアルインタフェースは特定の通信フォーマットに従ったデータ長を処理する回路構造を有していたが、LSIの大規模化、ソフトウェア資産の共有化の観点から様々な通信フォーマットに対応する汎用的なシリアルインタフェースが登場してきた。 The conventional serial interface has a circuit structure that processes the data length according to a specific communication format. However, it is a general-purpose device that supports various communication formats from the viewpoint of increasing the scale of LSI and sharing software assets. Serial interface has appeared.
ところが汎用的なシリアルインタフェースが扱うことのできるデータ長は複数の通信フォーマットの最大値に合わせる必要があるため、データ長の小さな通信フォーマットを使用する際に、特にFIFOを搭載するシリアルインタフェースでは内部の資源に使用されない領域が存在してしまう。 However, the data length that can be handled by a general-purpose serial interface needs to be adjusted to the maximum value of multiple communication formats. Therefore, when using a communication format with a small data length, a serial interface equipped with a FIFO is used. There are areas that are not used for resources.
ここでFIFOの資源を有効活用する技術として特許文献1のような技術がある。この技術は複数のレジスタをポインタ管理することによりFIFOの深度と幅を調節し、FIFOを可変幅データ転送に対応させるものである。 Here, there is a technique as disclosed in Patent Document 1 as a technique for effectively utilizing FIFO resources. This technique adjusts the depth and width of the FIFO by managing pointers in a plurality of registers, and makes the FIFO compatible with variable width data transfer.
また、特許文献2に開示された技術では、データバス幅を拡張してFIFO資源を有効活用した際に、本来有効でない端数のバイトが余分なデータとして送信されてしまうという問題の解決策として、シリアルインタフェースに送信データのサイズを通知して送信制御を行っている。
汎用的なシリアルインタフェースでは扱うデータ長によってFIFOの幅と深さを調整できる機能は有益であるが、必要なデータ単位が1バイトであることを考慮すると、奇数/偶数という単純な制御を行う特許文献1のようなFIFO構造は必ずしも適当ではない。また、FIFOのデータ管理をポインタで行う構成ではFIFOの制御回路の面積が大きくなってしまうという問題がある。なお、全二重通信をサポートするには、データバス幅未満のデータの転送において、特許文献2のように送信時のみではなく受信時においてもデータの処理方法を確立する必要がある。 In general-purpose serial interface, the function that can adjust the width and depth of the FIFO according to the data length handled is useful, but considering that the required data unit is 1 byte, a patent that performs simple control of odd / even The FIFO structure as in Document 1 is not always appropriate. In addition, there is a problem that the area of the FIFO control circuit becomes large in the configuration in which the FIFO data management is performed by the pointer. In order to support full-duplex communication, it is necessary to establish a data processing method not only at the time of transmission but also at the time of reception as in Patent Document 2 in the transfer of data less than the data bus width.
本発明は、シリアル通信に用いるFIFOにおいて1バイト単位でのデータ処理が可能でかつFIFOの幅と深さを調節する機能をより簡素に実現する同期シリアルインタフェース回路を提供することを目的とする。 An object of the present invention is to provide a synchronous serial interface circuit capable of processing data in units of 1 byte in a FIFO used for serial communication and more simply realizing a function of adjusting the width and depth of the FIFO.
本発明は、送信データを蓄積する送信FIFOと、受信データを蓄積する受信FIFOと、前記送信FIFOが出力する4バイトのデータを、2バイトまたは1バイトに分割した単位でデータを出力、または4バイトのデータのまま出力するデータ分割制御部と、前記データ分割制御部が出力するデータをシリアルデータに変換して出力するパラレル/シリアル変換部と、受信したデータをパラレルデータに変換して出力するシリアル/パラレル変換部と、前記シリアル/パラレル変換部が出力する2バイトまたは1バイトのデータを4バイトに結合し前記受信FIFOに対して4バイト単位で、または前記シリアル/パラレル変換部が出力する4バイトのデータをそのまま前記受信FIFOに対して送出するデータ結合制御部とを備える。本発明において、前記送信FIFOがシフトレジスタ構造または前記受信FIFOがシフトレジスタ構造である。 In the present invention, a transmission FIFO for storing transmission data, a reception FIFO for storing reception data, and 4-byte data output from the transmission FIFO are output in units of 2 bytes or 1 byte, or 4 A data division control unit that outputs byte data as it is, a parallel / serial conversion unit that converts the data output from the data division control unit into serial data and outputs the data, and converts the received data into parallel data for output The serial / parallel converter and the 2-byte or 1-byte data output from the serial / parallel converter are combined into 4 bytes and output to the reception FIFO in units of 4 bytes or output from the serial / parallel converter. And a data combination control unit that transmits the 4-byte data as it is to the reception FIFO. In the present invention, the transmission FIFO has a shift register structure or the reception FIFO has a shift register structure.
上記構成によれば、送信FIFOが出力する送信データをデータ分割制御部により1バイトにまで分割することができ、またデータ結合制御部により1バイトからの受信データを結合して受信FIFOに入力することができるため、1バイト単位でのデータ処理が可能でかつFIFOの幅と深さを調節する機能を簡素に実現することができる。 According to the above configuration, the transmission data output from the transmission FIFO can be divided into 1 byte by the data division control unit, and the reception data from 1 byte is combined by the data combination control unit and input to the reception FIFO. Therefore, data processing can be performed in units of 1 byte, and the function of adjusting the width and depth of the FIFO can be simply realized.
本発明において、受信データ数をカウントする受信ワードカウンタを備え、前記データ結合制御部は、前記受信データ数が予め設定された指定値と一致したときに、前記シリアル/パラレル変換部から受け取り結合したデータが4バイト未満である場合にダミーデータを付与して4バイトのデータを構成し、前記受信FIFOに4バイト単位でデータを送出する。 In the present invention, a reception word counter for counting the number of received data is provided, and the data combination control unit receives and combines from the serial / parallel conversion unit when the number of received data matches a predetermined value set in advance. When the data is less than 4 bytes, dummy data is added to form 4 bytes of data, and the data is sent to the reception FIFO in units of 4 bytes.
本発明において、受信データの終端を認識する端子を備え、前記データ結合制御部は、前記端子の認識動作を検出したときに、前記シリアル/パラレル変換部から受け取り結合したデータが4バイト未満である場合にダミーデータを付与して4バイトのデータを構成し、前記受信FIFOに4バイト単位でデータを送出する。 In the present invention, a terminal for recognizing the end of received data is provided, and the data combination control unit receives and combines data from the serial / parallel conversion unit when the terminal recognition operation is detected, and is less than 4 bytes. In this case, dummy data is added to form 4-byte data, and the data is sent to the reception FIFO in units of 4 bytes.
本発明において、一定時間受信が行われていないことを検出する受信タイムアウトカウンタを備え、前記データ結合制御部は、前記受信タイムアウトカウンタが一定時間受信が行われていないことを検出したときに、前記シリアル/パラレル変換部から受け取り結合したデータが4バイト未満である場合にダミーデータを付与して4バイトのデータを構成し、前記受信FIFOに4バイト単位でデータを送出する。 In the present invention, comprising a reception timeout counter that detects that reception for a certain period of time is not performed, the data combination control unit, when the reception timeout counter detects that reception is not performed for a certain period of time, When the data received and combined from the serial / parallel converter is less than 4 bytes, dummy data is added to form 4-byte data, and the data is sent to the reception FIFO in units of 4 bytes.
上記構成によれば、受信データの終了を検出する機能を備え、受信データの終了を検出したときに、データ結合制御部の内部で結合したデータが4バイト未満である場合にはダミーデータを付与して4バイトのデータを構成することができるため、受信時におけるデータバス幅未満のデータの処理が可能となる。 According to the above configuration, the function of detecting the end of received data is provided. When the end of received data is detected, dummy data is added if the data combined inside the data combination control unit is less than 4 bytes. As a result, data of less than the data bus width at the time of reception can be processed.
本発明によれば、シリアル通信に用いるFIFOにおいて1バイト単位でのデータ処理が可能でかつFIFOの幅と深さを調節する機能を簡素に実現することができる。 According to the present invention, it is possible to process data in units of 1 byte in a FIFO used for serial communication, and to simply realize a function of adjusting the width and depth of the FIFO.
図1は本発明の一実施の形態にかかる同期シリアルインタフェースの構成を示す図である。図1において、100は同期シリアルインタフェース回路、101はレジスタ制御ブロック、102は送信FIFO、103はデータ分割制御部、105はパラレル/シリアル変換部、112は受信FIFO、113はデータ結合制御部、115はシリアル/パラレル変換部、120は内部バスである。 FIG. 1 is a diagram showing a configuration of a synchronous serial interface according to an embodiment of the present invention. In FIG. 1, 100 is a synchronous serial interface circuit, 101 is a register control block, 102 is a transmission FIFO, 103 is a data division control unit, 105 is a parallel / serial conversion unit, 112 is a reception FIFO, 113 is a data combination control unit, 115 Is a serial / parallel converter, and 120 is an internal bus.
上記構成において、まずシリアルデータの送信時の形態について説明する。図示されないCPUはレジスタ制御ブロック101に送信形態の設定を行う。CPUまたは図示されないDMAは内部バス120を介して送信FIFO102へデータを書き込む。この内部バス120は例えば32ビット幅を有する。
In the above configuration, a mode at the time of transmitting serial data will be described first. A CPU (not shown) sets a transmission form in the
送信FIFO102は書き込まれたデータをデータ分割制御部103に送る。データ分割制御部103はレジスタ制御ブロック101に設定されたデータ分割パラメータ104に従ってデータを1バイト、2バイト、4バイトに分割し、パラレル/シリアル変換部105に送る。パラレル/シリアル変換部105はデータをシリアル変換し、外部へ送信する。
The transmission FIFO 102 sends the written data to the data
次にシリアルデータの受信時の形態について説明する。CPUはレジスタ制御ブロック101に受信形態の設定を行う。外部からのシリアルデータはシリアル/パラレル変換部115に入力される。シリアル/パラレル変換部115はデータをパラレル変換し、データ結合制御部113に送る。
Next, a mode when receiving serial data will be described. The CPU sets the reception mode in the
データ結合制御部113はレジスタ制御ブロック101に設定されたデータ結合パラメータ114に従って1バイト、2バイトのデータを4バイトに結合し、4バイトのデータはそのままで、受信FIFO112へ送る。CPUまたはDMAは受信FIFO112からデータを読み出す。
The data
図2はデータ分割制御部103の構成を示す図である。データ分割制御部103は送信FIFO102から32ビットのパラレルデータ200を受け取る。さらに、データ分割制御部103はデータをパラレル/シリアル変換部105に送るとともに、データ分割パラメータ104に従い、データ分割制御部103内のデータをシフトする。このときのシフト動作は次のようになる。
FIG. 2 is a diagram illustrating a configuration of the data
データ分割制御部103を構成する内部バッファ103a、103b、103c、103dはそれぞれ8ビットのバッファである。4バイトから1バイトへの分割時は、データ分割制御部103がパラレル/シリアル変換部105へデータを出力すると、内部バッファ103bのデータが内部バッファ103aにシフトし、内部バッファ103cのデータが内部バッファ103bにシフトし、内部バッファ103dのデータが内部バッファ103cにシフトする。
The
シリアル転送が終了すると、データ分割制御部103はシフト後のデータ201をパラレル/シリアル変換部105へ送る。この動作を繰り返し、内部バッファ103dのデータが内部バッファ103aまでシフトされ、さらにデータ201がパラレル/シリアル変換部105へ送られると、内部バッファ103a〜103dのデータは32ビットのパラレルデータ200に置き換わる。
When the serial transfer is completed, the data
4バイトから2バイトへの分割時は、データ分割制御部103がパラレル/シリアル変換部105へデータを出力すると、内部バッファ103cのデータが内部バッファ103aにシフトし、内部バッファ103dのデータが内部バッファ103bにシフトする。
At the time of division from 4 bytes to 2 bytes, when the data
シリアル転送が終了すると、データ分割制御部103はシフト後のデータ201をパラレル/シリアル変換部105へ送る。このシフト後のデータ201がパラレル/シリアル変換部105へ送られると、内部バッファ103a〜103dのデータは32ビットのパラレルデータ200に置き換わる。
When the serial transfer is completed, the data
このときパラレル/シリアル変換部105には常に32ビットのデータが入力されるが、レジスタ制御ブロック101から出力される送信データパラメータ203に従い、必要なデータのみを送信し、不要なデータは破棄する構成となっている。
At this time, 32-bit data is always input to the parallel /
図3はデータ結合制御部113の構成を示す図である。シリアル/パラレル変換部115はシリアルデータ302を受信し、パラレルデータに変換し、データ結合制御部113へ送る。データ結合制御部113は入力データ301をデータ結合パラメータ114に従いシフトする。このときのシフト動作は次のようになる。
FIG. 3 is a diagram illustrating the configuration of the data
データ結合制御部113を構成する内部バッファ113a、113b、113c、113dはそれぞれ8ビットのバッファである。1バイトから4バイトへの結合時は、シリアル/パラレル変換部115が出力するデータは内部バッファ113dを更新する。内部バッファ113dに書き込まれたデータは内部バッファ113c、113b、113aの順にシフトし、内部バッファ113aに到達すると次データの入力を待機する。
The
次にシリアル/パラレル変換部115からデータが出力されると、同様にバッファ113dを更新する。内部バッファ113dに書き込まれたデータは内部バッファ113c、113bの順にシフトし、内部バッファ113bに到達すると次データの入力を待機する。
Next, when data is output from the serial /
次にシリアル/パラレル変換部115からデータが出力されると、同様にバッファ113dを更新する。内部バッファ113dに書き込まれたデータは内部バッファ113cにシフトし次データの入力を待機する。
Next, when data is output from the serial /
次にシリアル/パラレル変換部115からデータが出力されると、同様にバッファ113dを更新し、内部バッファ113a〜113dを結合した32ビットのパラレルデータ300を受信FIFO112に対して出力する。
Next, when data is output from the serial /
2バイトから4バイトへの結合時は、シリアル/パラレル変換部115が出力するデータは内部バッファ113cおよび113dを更新する。内部バッファ113cおよび113dに書き込まれたデータはそれぞれ内部バッファ113aおよび113bにシフトし、次データの入力を待機する。
When combining from 2 bytes to 4 bytes, the data output from the serial /
次にシリアル/パラレル変換部115からデータが出力されると、同様にバッファ113cおよび113dを更新し、内部バッファ113a〜113dを結合した32ビットのパラレルデータ300を受信FIFO112に対して出力する。
Next, when data is output from the serial /
図4は従来技術によるポインタ管理方式のFIFO構造を示す図である。FIFOを構成するバッファ400〜415はそれぞれ16ビットの幅を有する。出力するデータを決定するセレクタ416は16to1セレクタとなる。
FIG. 4 is a view showing a FIFO structure of a pointer management method according to the prior art. Each of the
図5は本発明の同期シリアルインタフェースにおける送信FIFOおよび受信FIFOの構成を示す図である。送信FIFO102は32ビット幅のバッファ500〜506で構成されている。またそれぞれのバッファは1ビットのフラグ510〜516を具備している。また、受信FIFO112は32ビット幅のバッファ520〜526で構成されている。またそれぞれのバッファは1ビットのフラグ530〜536を具備している。
FIG. 5 is a diagram showing a configuration of a transmission FIFO and a reception FIFO in the synchronous serial interface of the present invention. The
送信時は、CPUまたはDMAにより送信FIFO102にライトを行うと、バッファ500およびフラグ510が更新される。送信FIFO102はシフトレジスタで構成されており、バッファ500およびフラグ510の内容はバッファ501およびフラグ511にシフトする。このシフト動作を繰り返し、ライトしたデータがバッファ506に到達するとデータ分割制御部103に出力する。
At the time of transmission, when the CPU or DMA writes to the
受信時は、データ結合制御部113が受信FIFO112にライトを行うと、バッファ526およびフラグ536が更新される。受信FIFO112はシフトレジスタで構成されており、バッファ526およびフラグ536の内容はバッファ525およびフラグ535にシフトする。このシフト動作を繰り返し、ライトしたデータがバッファ520に到達するとデータはCPUまたはDMAから読み出し可能となる。
At the time of reception, when the data
図6は本発明の同期シリアルインタフェースにおいて、4バイトに満たない受信データの処理方法を示す図である。 FIG. 6 is a diagram showing a method of processing received data less than 4 bytes in the synchronous serial interface of the present invention.
通常、データ結合制御部113は内部バッファ113a〜113dの全てにデータが入力されるまで受信FIFOへ32ビットパラレルデータ300を出力しないが、データ受信終了信号600がアクティブになると、データの結合中で次データの入力待ち状態であっても、空き領域にダミーデータを埋めて受信FIFOへ32ビットパラレルデータ300を出力する。
Normally, the data
例えば内部バッファ113aおよび113bにデータが存在した場合に、通常はデータ結合制御部113は残りの2バイトのデータが入力されるまで32ビットパラレルデータ300を出力しないが、データ受信終了信号600がアクティブになると、内部バッファ113cおよび113dをダミーデータで埋め、32ビットパラレルデータ300を受信FIFOへ出力する。
For example, when data exists in the
このデータ受信終了信号600は次の場合にアクティブになる。第1に、受信したデータ数をカウントする受信ワードカウンタ601を有し、指定量のデータを受信すると終端通知信号602をアサートする。受信ワードカウンタ601に設定する値はパラメータ化されており、自由に設定できる。
This data
第2に、データを受信していない期間を検出するタイムアウトカウンタ603を有し、一定時間受信動作が行われなくなると終端通知信号604をアサートする。タイムアウトカウンタ603に設定する値はパラメータ化されており、自由に設定できる。
Second, it has a
第3に、受信データの終端を認識するための端子605を有し、この端子605から入力される終端通知信号606がデータ受信信号600をアサートする。セレクタ607は終端通知信号602、604、606を選択し、データ結合制御部113に対してデータ受信終了信号600をアサートする。
Thirdly, a terminal 605 for recognizing the end of received data is provided, and the
本発明の同期シリアルインタフェースは、データの分割/結合機能を搭載し、回路面積を抑えた構成のため、モバイル用LSIの汎用シリアルインタフェース等として有用である。 The synchronous serial interface of the present invention is useful as a general-purpose serial interface of a mobile LSI because it has a data division / combination function and a reduced circuit area.
100 同期シリアルインタフェース回路
101 レジスタ制御ブロック
102 送信FIFO
103 データ分割制御部
104 データ分割パラメータ
105 パラレル/シリアル変換部
112 受信FIFO
113 データ結合制御部
114 データ結合パラメータ
115 シリアル/パラレル変換部
120 内部バス
100 Synchronous
103 Data
113 Data
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005238787A JP2007052721A (en) | 2005-08-19 | 2005-08-19 | Synchronous serial interface circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005238787A JP2007052721A (en) | 2005-08-19 | 2005-08-19 | Synchronous serial interface circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007052721A true JP2007052721A (en) | 2007-03-01 |
Family
ID=37917104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005238787A Withdrawn JP2007052721A (en) | 2005-08-19 | 2005-08-19 | Synchronous serial interface circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007052721A (en) |
-
2005
- 2005-08-19 JP JP2005238787A patent/JP2007052721A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1705577B1 (en) | Data transfer control device and electronic instrument | |
US9996488B2 (en) | I3C high data rate (HDR) always-on image sensor 8-bit operation indicator and buffer over threshold indicator | |
US20030074502A1 (en) | Communication between two embedded processors | |
US20090006711A1 (en) | Device, System and Method of Utilizing PCI Express Packets Having Modified Headers | |
EP0239937A2 (en) | Serial communications controller | |
US20090003335A1 (en) | Device, System and Method of Fragmentation of PCI Express Packets | |
CN101061468A (en) | System, method, and apparatus for extended serial peripheral interface | |
US5958024A (en) | System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver | |
KR20160065206A (en) | Camera control interface slave device to slave device communication | |
TW201841530A (en) | System and method of sending data via additional secondary data lines on a bus | |
EP2312457A2 (en) | Data processing apparatus, data processing method and computer-readable medium | |
US7191262B2 (en) | High-throughput UART interfaces | |
US20160283342A1 (en) | Apparatus of wireless gigabit display extension (wde) device | |
US7028111B2 (en) | Bus system and bus interface for connection to a bus | |
US7058747B2 (en) | Bus system and bus interface for connection to a bus | |
JP3780419B2 (en) | Data transfer control device and electronic device | |
US20060184708A1 (en) | Host controller device and method | |
EP2017741B1 (en) | System,processor,apparatus and method for inter-processor communication | |
JP4385247B2 (en) | Integrated circuit and information processing apparatus | |
JP2007052721A (en) | Synchronous serial interface circuit | |
JP2005504393A (en) | Bus system and bus interface | |
CN107391406B (en) | Microprocessor for protocol processing and protocol processing method | |
CN101047721B (en) | Method for data filter process using DMA controller | |
US11822501B2 (en) | Bus protocol for multiple chipsets | |
JP4716001B2 (en) | Communication system between CPUs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20071113 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071120 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081104 |