JP2008077125A - Interface circuit - Google Patents

Interface circuit Download PDF

Info

Publication number
JP2008077125A
JP2008077125A JP2006251989A JP2006251989A JP2008077125A JP 2008077125 A JP2008077125 A JP 2008077125A JP 2006251989 A JP2006251989 A JP 2006251989A JP 2006251989 A JP2006251989 A JP 2006251989A JP 2008077125 A JP2008077125 A JP 2008077125A
Authority
JP
Japan
Prior art keywords
data
register
circuit
signal
cpu
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.)
Abandoned
Application number
JP2006251989A
Other languages
Japanese (ja)
Inventor
Masanao Onozuka
昌修 小野塚
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.)
Seiko Precision Inc
Original Assignee
Seiko Precision Inc
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 Seiko Precision Inc filed Critical Seiko Precision Inc
Priority to JP2006251989A priority Critical patent/JP2008077125A/en
Publication of JP2008077125A publication Critical patent/JP2008077125A/en
Abandoned legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To allow output of data in processing units for lowering a load of post processing. <P>SOLUTION: Reference data corresponding to known data such as a preamble and a header included in transmission data are stored in an FIFO register 12, and by using a comparison circuit 13, the reference data are sequentially compared with data of a shift register 11. When agreement is detected, data of the shift register 11 are written into the data register 13, and the transmission data are allowed to be read in processing units by the CPU 3. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、インターフェース回路に関し、特に無線回路等からなる通信LSI(Large Scale Integration)からシリアル通信されるデータを所定のビット数単位でCPU(Central Processing Unit)に渡すインターフェース回路に関するものである。   The present invention relates to an interface circuit, and more particularly to an interface circuit that transfers data serially communicated from a communication LSI (Large Scale Integration) composed of a radio circuit or the like to a CPU (Central Processing Unit) in a predetermined number of bits.

現在、特許文献1に開示される技術のように、通信LSIとCPUとの間の通信形式として同期シリアル通信が利用されている。同期シリアル通信は、例えば、図8に示すように通信LSI81とCPU82との間をクロック信号線81aとデータ信号線81bとを含む2線以上の信号線で接続し、クロック信号線81aのクロック信号に同期してデータ信号線81bのデータ信号の状態を変化させてデータをビット毎に伝送するもので、特許文献2に開示されるように慣用技術である。特許文献1に開示されるシリアル通信のためのシリアルインターフェース回路は、特許文献2に開示されるようにCPUによって実現される。   Currently, as in the technique disclosed in Patent Document 1, synchronous serial communication is used as a communication format between the communication LSI and the CPU. In the synchronous serial communication, for example, as shown in FIG. 8, the communication LSI 81 and the CPU 82 are connected by two or more signal lines including the clock signal line 81a and the data signal line 81b, and the clock signal of the clock signal line 81a is connected. The data signal is transmitted on a bit-by-bit basis by changing the state of the data signal on the data signal line 81b. This is a conventional technique as disclosed in Patent Document 2. The serial interface circuit for serial communication disclosed in Patent Document 1 is realized by a CPU as disclosed in Patent Document 2.

通信LSI81とCPU82との組み合わせによるデータ通信の動作は次の通りとなる。通信LSI81からクロック信号に同期した送信データが出力され、クロック信号の立ち上り(又は立下りの所定の一方)に同期してデータ信号線81bのデータ信号の状態を1ビットずつCPU82の内部のレジスタに取り込む。CPU82は、送信データを所定のビット数、例えば、8ビットが揃った時点で処理する。この種の同期シリアル通信では、送信データの先頭に付加した既知のビットパターンのデータにより同期を取り、その後、順次例えば8ビット毎に送信データを取り出して効率的に処理する。   Data communication operation by the combination of the communication LSI 81 and the CPU 82 is as follows. Transmission data synchronized with the clock signal is output from the communication LSI 81, and the state of the data signal on the data signal line 81b is stored bit by bit in a register inside the CPU 82 in synchronization with the rising edge (or one of the falling edges) of the clock signal. take in. The CPU 82 processes the transmission data when a predetermined number of bits, for example, 8 bits are prepared. In this type of synchronous serial communication, synchronization is established by data of a known bit pattern added to the head of transmission data, and then transmission data is sequentially extracted, for example, every 8 bits, and processed efficiently.

特に、通信LSI81としては無線回路83を備えたものがあり、無線回路83等による無線通信では、有線通信と比較すると、混信やノイズなどの影響によって送信データのビットが欠落する危険性が高く、例えば、特許文献3に開示されるように、送信データの先頭に複数のバイト列からなる用途別の所定(既知)のデータを付加して通信を行う。これらのデータは、プリアンブル、ヘッダ等と称され、用途毎に異なるデータとしてこれによって個々の通信を判別して通信が可能としてある。無線通信の場合には、同時に複数の無線送信機から送信データが送信されると、混信、ノイズ等の影響により送信データのビット欠落が発生しやすく、また、多種類の無線送信機をそれぞれ判別するために、複数のバイト列からなるプリアンブル、ヘッダ等を利用するのである。
特開平5−336121号公報 特開昭62−103745号公報 特開平11−220469号公報
In particular, there is a communication LSI 81 that includes a wireless circuit 83. In wireless communication using the wireless circuit 83 or the like, there is a high risk that bits of transmission data may be lost due to influence of interference or noise, compared to wired communication. For example, as disclosed in Patent Document 3, communication is performed by adding predetermined (known) data for each application consisting of a plurality of byte sequences to the head of transmission data. These data are referred to as a preamble, a header, and the like, and can be communicated by determining individual communication as different data for each application. In the case of wireless communication, if transmission data is transmitted from multiple wireless transmitters at the same time, bits of the transmission data are likely to be lost due to interference, noise, etc., and multiple types of wireless transmitters can be identified. In order to do this, a preamble, a header, etc. composed of a plurality of byte sequences are used.
JP-A-5-336121 Japanese Patent Laid-Open No. 62-103745 Japanese Patent Laid-Open No. 11-220469

複数のバイト列からなるプリアンブル、ヘッダ等の判別処理は、CPU82に内蔵の同期通信回路を介してRAM(Random Access Memory)等の作業領域に取り込み、CPU82の処理により所定のプリアンブルと一致するか否か1ビットずつ比較してプリアンブル、ヘッダ等を検出する。プリアンブル、ヘッダ等は所定の処理単位、例えば、8ビット(1バイト)で構成される。これは、CPU82にとっては高負荷の処理となる。   Whether the preamble, header, or the like composed of a plurality of byte strings is taken into a work area such as a RAM (Random Access Memory) via a synchronous communication circuit built in the CPU 82, and whether or not it matches a predetermined preamble by the processing of the CPU 82 Or, the preamble, header, etc. are detected by comparing bit by bit. The preamble, header, and the like are configured by a predetermined processing unit, for example, 8 bits (1 byte). This is a high-load process for the CPU 82.

また、同期通信回路は、所定の処理単位の8ビット分のレジスタを有するシフトレジスタに一旦送信データを蓄え、8ビット単位で作業領域に出力するものであるため、送信データをこのビット単位で作業領域に読み出すこととなる。プリアンブルか否かの一致処理はシフトレジスタのデータを作業領域に読み出して1ビットずつプリアンブルと比較して、プリアンブルとの一致箇所を検出する。   The synchronous communication circuit temporarily stores transmission data in a shift register having a register for 8 bits in a predetermined processing unit, and outputs it to the work area in units of 8 bits. It will read to the area. In the coincidence process of whether or not it is a preamble, the shift register data is read into the work area and compared with the preamble bit by bit to detect a coincidence with the preamble.

先頭の位置を特定した後は、送信データを8ビット受ける毎に割り込み処理を行い、送信データを8ビット単位で後処理のために作業領域に格納する。   After specifying the head position, interrupt processing is performed every time 8 bits of transmission data is received, and the transmission data is stored in the work area for post-processing in units of 8 bits.

ここで、プリアンブルの一部の欠落等により、プリアンブルの末尾(LSB:Less Significant Bit)が検出されることがあり、換言すれば、それに続くデータの先頭(MSB:Most Significant Bit)の位置が特定されたときにシフトレジスタにデータの先頭が既に入力されていることがあり、データの先頭がシフトレジスタに対してビットずれをもって格納されることとなる。   Here, the end of the preamble (LSB: Less Significant Bit) may be detected due to a part of the preamble missing, in other words, the position of the head of the subsequent data (MSB: Most Significant Bit) is specified. When this is done, the beginning of the data may already be input to the shift register, and the beginning of the data is stored with a bit shift with respect to the shift register.

このビットずれはその後の総ての送信データについて及ぶため、その後もシフトレジスタに送信データが8ビット入力される毎に割り込み処理を行い、同様にビットシフトして8ビット単位で送信データを格納する。ビットシフト処理では、複数のビット単位に渡る送信データに対してシフト演算を施すものとなるため、処理が煩雑となる。   Since this bit shift extends to all subsequent transmission data, interrupt processing is performed every time 8 bits of transmission data are input to the shift register, and the transmission data is stored in units of 8 bits after being similarly bit-shifted. . In the bit shift process, a shift operation is performed on transmission data over a plurality of bit units, so the process becomes complicated.

例として図9には、送信データ91、92、93として、末尾のプリアンブルとしての“10101011(ABH(末尾のHは、これが16進数表記であることを示す、以下同様))”、プリアンブルに続く“10110001(B1H)”、“10110010(B2H)”を送り、上記のビットずれが2ビットの場合を示してある。図9の(a)にはプリアンブルを示す。図9の(b)には送信データ91、92、93が送信されてシフトレジスタに入力される状態を示し、各ビットは同図の左(上位側)から順に送信される。図9の(c)は、割り込み処理毎のシフトレジスタのデータの状態を示してあり、データの先頭の位置を特定したタイミングを前回の状態として、そこから送信データが8ビット入力される毎の状態を示してある。   As an example, in FIG. 9, transmission data 91, 92, 93 are followed by “10101011 (ABH (H at the end indicates that this is a hexadecimal notation, the same applies hereinafter)”) as the end preamble. “10110001 (B1H)” and “10110010 (B2H)” are sent, and the above-described bit shift is 2 bits. FIG. 9A shows a preamble. FIG. 9B shows a state in which transmission data 91, 92, and 93 are transmitted and input to the shift register, and each bit is transmitted in order from the left (upper side) in FIG. (C) of FIG. 9 shows the data state of the shift register for each interrupt process. The timing at which the position of the head of the data is specified is set to the previous state, and transmission data is input every 8 bits from there. The state is shown.

同図の場合、送信データ92を後処理のために作業領域に格納する処理では、例えば、図9の(d)に示すように、プリアンブルに続くビット列“10”の2ビットと、その後続のビット列の上位6ビット“110001”とに基づくシフト演算と論理和とを組み合わせて“10110001”を得ている。このように8ビット入力される毎の割り込み処理では、今回の割り込み処理の際にシフトレジスタにデータの末尾が含まれるデータを得るとすれば、作業領域に保持した前回の割り込み処理の際のシフトレジスタの内容を左に(上位側に)6ビットだけシフトし、今回の割り込み処理の際のシフトレジスタの内容を右に(下位側に)2ビットだけシフトし、これらの論理和をとることによって目的の送信データを得ている。このようにCPUによる割り込み処理は煩雑なものとなり、これも、CPU82にとっては高負荷の処理となっている。   In the case of the figure, in the process of storing the transmission data 92 in the work area for post-processing, for example, as shown in (d) of FIG. 9, two bits of the bit string “10” following the preamble and the subsequent bits “10110001” is obtained by combining the shift operation based on the upper 6 bits “110001” of the bit string and the logical sum. As described above, in the interrupt process every time 8 bits are input, if data including the end of data is obtained in the shift register in the current interrupt process, the shift in the previous interrupt process held in the work area is obtained. By shifting the contents of the register to the left (upper side) by 6 bits, shifting the contents of the shift register at the time of this interrupt processing by 2 bits to the right (lower side), and taking these logical sums The target transmission data is obtained. As described above, the interrupt processing by the CPU is complicated, and this is also a high-load processing for the CPU 82.

そこで、本発明の目的は、CPUの負荷を軽減することにある。   Accordingly, an object of the present invention is to reduce the load on the CPU.

上記目的を達成するため、本発明のインターフェース回路は、
第1の回路からシリアル通信にて入力される送信データを第2の回路に中継するインターフェース回路であって、
前記送信データの処理単位となる所定のビット数分のレジスタを有し、前記送信データを1ビットずつ取り込む、シフトレジスタと、
前記送信データの処理単位となる所定のビット数分のレジスタを各段に有し、前記送信データに含まれるプリアンブル、ヘッダ等の既知のデータに対応する参照データを前記所定の処理単位で順次格納するFIFOレジスタと、
前記シフトレジスタに格納された前記送信データと、前記FIFOレジスタの出力段に格納された前記参照データとを比較し、前記送信データと前記参照データとの一致を検出する比較回路と、
第2の回路により読み出されるものであり、前記比較回路により一致検出がされたときに、前記シフトレジスタに格納された前記送信データが書き込まれるデータレジスタと、
を備えたことを特徴とする。
In order to achieve the above object, the interface circuit of the present invention comprises:
An interface circuit that relays transmission data input from a first circuit through serial communication to a second circuit,
A shift register having a register for a predetermined number of bits as a processing unit of the transmission data, and capturing the transmission data bit by bit;
Each stage has a register for a predetermined number of bits as a processing unit of the transmission data, and sequentially stores reference data corresponding to known data such as a preamble and a header included in the transmission data in the predetermined processing unit. A FIFO register to
A comparison circuit that compares the transmission data stored in the shift register with the reference data stored in the output stage of the FIFO register, and detects a match between the transmission data and the reference data;
A data register that is read by the second circuit and to which the transmission data stored in the shift register is written when coincidence is detected by the comparison circuit;
It is provided with.

ここで、前記第2の回路は、制御回路を含み、前記制御回路は、前記比較回路により一致検出がされたときに前記FIFOレジスタに格納する前記参照データを更新することが好ましい。   Here, it is preferable that the second circuit includes a control circuit, and the control circuit updates the reference data stored in the FIFO register when coincidence is detected by the comparison circuit.

また、前記データレジスタは、前記シフトレジスタに格納された前記送信データが書き込まれたときにこの書き込みがされたことを示すデータ入力信号を前記第2の回路に出力し、前記制御回路は、前記データレジスタから前記データ入力信号を受けたときに前記FIFOレジスタに格納する前記参照データの変更を指示することも好ましい。   The data register outputs to the second circuit a data input signal indicating that the data is written when the transmission data stored in the shift register is written, and the control circuit It is also preferable to instruct the change of the reference data stored in the FIFO register when the data input signal is received from the data register.

また、前記制御回路の制御により、前記更新毎に、前記FIFOレジスタの各段のレジスタに格納された前記参照データを次段のレジスタへと送り、前記FIFOレジスタの入力段が空となったときには新たな前記参照データを入力することも好ましい。   In addition, when the control circuit controls each time the update is performed, the reference data stored in the register of each stage of the FIFO register is sent to the register of the next stage, and the input stage of the FIFO register becomes empty It is also preferable to input new reference data.

また、前記第1の回路は無線回路を含むことも好ましい。   The first circuit preferably includes a radio circuit.

本発明のインターフェース回路によれば、プリアンブル、ヘッダ等の既知のデータを検出し、所定の処理単位でデータを出力可能としたのでCPUによる処理を簡素化することが可能となる。   According to the interface circuit of the present invention, since known data such as a preamble and a header are detected and data can be output in a predetermined processing unit, the processing by the CPU can be simplified.

以下、この発明の実施の形態に係るインターフェース回路について説明する。   The interface circuit according to the embodiment of the present invention will be described below.

図1に示すように、本発明の実施の形態に係るインターフェース回路1は、通信LSI2と、CPU3との間に設けられ、通信LSI2から出力される同期シリアル通信によって送られたデータを受信し、このデータを所定の処理単位で内部のデータレジスタに格納し、この内容をCPU3が読み取ることによって、CPU3は所定の処理単位、本例では8ビットずつ、データの受信する構成となっている。   As shown in FIG. 1, the interface circuit 1 according to the embodiment of the present invention is provided between the communication LSI 2 and the CPU 3, receives data sent by synchronous serial communication output from the communication LSI 2, This data is stored in an internal data register in a predetermined processing unit, and the content is read by the CPU 3, whereby the CPU 3 is configured to receive data in a predetermined processing unit, in this example, 8 bits at a time.

インターフェース回路1は、通信LSI2からのクロック信号線2aとデータ信号線2bとに接続されたシフトレジスタ11を備える。シフトレジスタ11は、所定の処理単位の8ビットに対応する図示しない8段のレジスタからなるシフトレジスタであり、クロック信号線2aのクロック信号の立ち上りに同期してデータ信号線2bのデータ信号の“H”レベル、“L”レベルで示される送信データを入力段のレジスタから1ビットずつ取り込むとともに、前段のレジスタから後段のレジスタへと取り込んだデータをシフトする。また、各レジスタに格納したデータはデータ信号線11a、11bを介してそれぞれ後述する比較回路、データレジスタにパラレルに出力される。   The interface circuit 1 includes a shift register 11 connected to the clock signal line 2a and the data signal line 2b from the communication LSI 2. The shift register 11 is a shift register including an 8-stage register (not shown) corresponding to 8 bits of a predetermined processing unit, and the data signal “2” of the data signal line 2 b is synchronized with the rising edge of the clock signal of the clock signal line 2 a. The transmission data indicated by the “H” level and the “L” level is fetched bit by bit from the input stage register, and the data fetched from the previous stage register to the subsequent stage register is shifted. Further, the data stored in each register is output in parallel to the later-described comparison circuit and data register via the data signal lines 11a and 11b, respectively.

FIFO(First-In First-Out)レジスタ12は、入力段のレジスタとしてのインプットレジスタ12aと、出力段のレジスタとしてコンペアレジスタ12bとからなる。インプットレジスタ12a、コンペアレジスタ12bは、送信データの処理単位となる所定のビット数、本例では8ビット分のレジスタである。インプットレジスタ12a、コンペアレジスタ12bには、プリアンブル、ヘッダ等の検出対象となる既知のデータが順次格納される。インプットレジスタ12aには、CPU3からパラレルに送られたデータが書き込まれ、コンペアレジスタ12bには、先にインプットレジスタ12aに格納されたデータがデータ線12cを介してパラレルに送られて書き込まれる。コンペアレジスタ12bに書き込まれたデータは、データ線12dを介して比較回路にパラレルに出力される。   The first-in first-out (FIFO) register 12 includes an input register 12a as an input stage register and a compare register 12b as an output stage register. The input register 12a and the compare register 12b are registers for a predetermined number of bits, which is a processing unit of transmission data, in this example, 8 bits. In the input register 12a and the compare register 12b, known data to be detected such as a preamble and a header are sequentially stored. The data sent in parallel from the CPU 3 is written in the input register 12a, and the data previously stored in the input register 12a is sent in parallel via the data line 12c and written in the compare register 12b. The data written in the compare register 12b is output in parallel to the comparison circuit via the data line 12d.

比較回路13は、データ信号線11aを介してシフトレジスタ11の各レジスタに格納されたデータをパラレルに受け、データ信号線12dを介してコンペアレジスタ12bに格納されたデータをパラレルに受ける。比較回路13は、クロック信号線2aを介してクロック信号を受けており、クロック信号に同期してこれらのデータを比較し、両データが一致したときには信号線13aを介して一致信号をCPU3に送り、両データが一致しなかったときには信号線13bを介して不一致信号をCPU3に送る。また、両データが一致したときには信号線13cを介してデータ出力信号をシフトレジスタ11に送る。シフトレジスタ11は、データ出力信号を受けると、信号線11bを介して各レジスタに格納したデータをデータレジスタに送る。   The comparison circuit 13 receives data stored in each register of the shift register 11 via the data signal line 11a in parallel, and receives data stored in the compare register 12b via the data signal line 12d in parallel. The comparison circuit 13 receives a clock signal via the clock signal line 2a, compares these data in synchronization with the clock signal, and sends a coincidence signal to the CPU 3 via the signal line 13a when both data coincide. When the two data do not match, a mismatch signal is sent to the CPU 3 via the signal line 13b. When both data match, a data output signal is sent to the shift register 11 via the signal line 13c. When receiving the data output signal, the shift register 11 sends the data stored in each register to the data register via the signal line 11b.

データレジスタ14は、データ出力信号が送られたときにデータ信号線11bを介してシフトレジスタ11の各レジスタに格納された値が並列に書き込まれるレジスタで、処理単位の8ビットのデータが格納される。データレジスタ14は、データを格納すると、信号線14aを介してCPU3に対してデータ入力信号を出力する。これにより、CPU3は、データ入力信号に応答し、データ信号線14bを介してデータレジスタ14に格納されたデータの各ビットを並列に読み出すことが可能となる。   The data register 14 is a register in which the values stored in the respective registers of the shift register 11 are written in parallel via the data signal line 11b when a data output signal is sent, and stores 8-bit data of a processing unit. The When data is stored, the data register 14 outputs a data input signal to the CPU 3 via the signal line 14a. Thus, the CPU 3 can read in parallel each bit of the data stored in the data register 14 via the data signal line 14b in response to the data input signal.

リセット回路15は、信号線3bを介したCPU3の制御によってインターフェース回路1をリセットするものであり、これによりシフトレジスタ11のデータ、データレジスタ14のデータ等が総て“0”にリセットされる。   The reset circuit 15 resets the interface circuit 1 under the control of the CPU 3 via the signal line 3b, whereby the data in the shift register 11 and the data in the data register 14 are all reset to “0”.

通信LSI2は、図示しないRF受信部、RF送信部、復調部、変調部、同期シリアル通信部等からなる無線回路21を備え、無線信号から復調したデータをクロック信号線2aのクロック信号に同期して、データ信号線2bのデータ信号として出力する。   The communication LSI 2 includes a radio circuit 21 including an RF receiver, an RF transmitter, a demodulator, a modulator, a synchronous serial communication unit, etc. (not shown), and synchronizes data demodulated from the radio signal with the clock signal of the clock signal line 2a. And output as a data signal of the data signal line 2b.

CPU3は、データレジスタ13を介してシフトレジスタ11に入力されたデータを読み取る。また、CPU3は、FIFOレジスタ12、比較回路13、データレジスタ14から送られる各信号に基づいてインターフェース回路1を制御する。   The CPU 3 reads data input to the shift register 11 via the data register 13. Further, the CPU 3 controls the interface circuit 1 based on each signal sent from the FIFO register 12, the comparison circuit 13, and the data register 14.

次に実施形態に係るインターフェース回路1の動作を説明する。図2、図3、図4は、それぞれCPU3、FIFOレジスタ11、比較回路13aの動作説明のためのフローチャートであり、また、図5は図4のフローチャートの一部の処理を示すものであり、これらを参照して説明する。   Next, the operation of the interface circuit 1 according to the embodiment will be described. 2, 3, and 4 are flowcharts for explaining the operation of the CPU 3, the FIFO register 11, and the comparison circuit 13 a, respectively, and FIG. 5 shows a part of the flowchart of FIG. 4. This will be described with reference to these.

ここでは、インターフェース回路1を介して通信LSI2からCPU3へと送信される送信データの内検出すべきデータを、“00001001(09H)”のプリアンブルと、これに続く、“01011010(5AH)”のヘッダとして説明する。   In this example, data to be detected among transmission data transmitted from the communication LSI 2 to the CPU 3 via the interface circuit 1 is a “00000101 (09H)” preamble, followed by a “01011010 (5AH)” header. Will be described.

通信LSI2とCPU3との間の通信を開始するため、CPU3は図2に示すように、先ずリセット信号をインターフェース回路1に送りこれをリセットする(ステップ21)。   In order to start communication between the communication LSI 2 and the CPU 3, as shown in FIG. 2, the CPU 3 first sends a reset signal to the interface circuit 1 to reset it (step 21).

インターフェース回路1は、リセット回路15を介してリセット信号を受けて各レジスタに格納された値を“0”にクリアする。FIFOレジスタ12では、図3に示すようにリセット信号が受ける(ステップ31)と、各レジスタに格納された値を“0”にクリアし、レジスタエンプティ信号を“1”にセットして信号線12eを介してCPU3に送る(ステップ32)。なお、ステップ31の“No”の場合のような各ループ処理は適当な期間を超えてされた場合、エラーとして動作を終了するものとする。   The interface circuit 1 receives the reset signal via the reset circuit 15 and clears the value stored in each register to “0”. When the FIFO register 12 receives a reset signal as shown in FIG. 3 (step 31), the value stored in each register is cleared to "0", the register empty signal is set to "1", and the signal line 12e (Step 32). It should be noted that when each loop process as in the case of “No” in step 31 exceeds an appropriate period, the operation is terminated as an error.

CPU3は、FIFOレジスタ12に書き込むプリアンブル、ヘッダ等に対応する参照データの有無を判定する(ステップ22)。CPU3は、ここで書き込むべき参照データが有れば、FIFOレジスタ12に書き込み可能か否かをレジスタエンプティ信号により判定する(ステップ23)。CPU3は、レジスタエンプティ信号が“1”にセットされていれば、FIFOレジスタ12に参照データを書き込む(ステップ24)。CPU3は、先ず、先頭の参照データとしてプリアンブルに対応する“09H”を、データ線3aを介してFIFOレジスタ12に送る。   The CPU 3 determines the presence or absence of reference data corresponding to the preamble, header, etc. to be written to the FIFO register 12 (step 22). If there is reference data to be written here, the CPU 3 determines whether or not writing to the FIFO register 12 is possible by a register empty signal (step 23). If the register empty signal is set to “1”, the CPU 3 writes the reference data to the FIFO register 12 (step 24). First, the CPU 3 sends “09H” corresponding to the preamble as the first reference data to the FIFO register 12 via the data line 3a.

次にCPU3は、比較回路13からの一致信号の有無を判定する(ステップ25)が、ここでは未だ比較回路13の処理は行われておらず、これを受けていない。この場合、CPU3は、比較回路13からの不一致信号の有無を判定し(ステップ26)、ステップ22の処理に戻る。   Next, the CPU 3 determines whether or not there is a coincidence signal from the comparison circuit 13 (step 25), but here, the processing of the comparison circuit 13 has not yet been performed and has not been received. In this case, the CPU 3 determines whether or not there is a mismatch signal from the comparison circuit 13 (step 26), and returns to the processing of step 22.

FIFOレジスタ12はレジスタエンプティ信号のセットの後に参照データの書き込みの有無を判定しており(ステップ33)、参照データを受け取ると、これをインプットレジスタ12aに書き込む(ステップ34)。FIFOレジスタ12は、この書込みに続いてレジスタエンプティ信号を“0”にクリアするとともに、検出動作状態を示すために比較終了信号を“0”にクリアする。   The FIFO register 12 determines whether or not reference data is written after the register empty signal is set (step 33). When the reference data is received, it is written to the input register 12a (step 34). Following this write, the FIFO register 12 clears the register empty signal to “0” and clears the comparison end signal to “0” to indicate the detection operation state.

次にFIFOレジスタ12は、インプットレジスタ12aに書き込まれた参照データをコンペアレジスタ12bに書き込む(ステップ35)。この書込みに続いてインプットレジスタ12aをクリアするとともに、レジスタエンプティ信号を“1”にセットする。   Next, the FIFO register 12 writes the reference data written in the input register 12a into the compare register 12b (step 35). Following this writing, the input register 12a is cleared and the register empty signal is set to "1".

CPU3は、レジスタエンプティ信号が“1”にセットされていると(ステップ23)、先に書き込んだ参照データの次の参照データであるヘッダに対応する“5AH”を、データ線3aを介してFIFOレジスタ12に送る(ステップ24)。   When the register empty signal is set to “1” (step 23), the CPU 3 sends “5AH” corresponding to the header which is the reference data next to the previously written reference data to the FIFO via the data line 3a. The data is sent to the register 12 (step 24).

FIFOレジスタ12はコンペアレジスタへの書込みの後に参照データの書き込みの有無を判定しており(ステップ36)、データ線3aを介して参照データを受けると、これをインプットレジスタ12aに書き込む(ステップ37)。FIFOレジスタ12は、この書込みに続いてレジスタエンプティ信号を“0”にクリアする。   The FIFO register 12 determines whether or not reference data is written after writing to the compare register (step 36). When the reference data is received via the data line 3a, it is written to the input register 12a (step 37). . Following this write, the FIFO register 12 clears the register empty signal to “0”.

ここまでの処理により、コンペアレジスタ12b、インプットレジスタ12aにはそれぞれプリアンブルに対応する参照データ“00001001”、これに続くヘッダに対応する参照データ“01011010”が格納される。また、ここまでの処理に要する期間は、クロック信号線2aのクロック信号の立ち上りの周期に比べて十分短く、ここまでの処理は比較回路13がシフトレジスタ11のデータとコンペアレジスタ12bのデータとの比較を開始する前に終わる。   Through the processing up to this point, the reference register “0000101” corresponding to the preamble and the reference data “01011010” corresponding to the subsequent header are stored in the compare register 12b and the input register 12a, respectively. Further, the period required for the processing so far is sufficiently shorter than the rising cycle of the clock signal of the clock signal line 2a, and the processing so far is performed by the comparison circuit 13 between the data of the shift register 11 and the data of the compare register 12b. End before starting the comparison.

図4に示すように、比較回路13は、比較終了信号が“0”にクリアされていることを判定し(ステップ41)、処理を開始し、クロック信号の立ち上りを待つ(ステップ42)。   As shown in FIG. 4, the comparison circuit 13 determines that the comparison end signal is cleared to “0” (step 41), starts processing, and waits for the rising edge of the clock signal (step 42).

図6の(a)から(d)に示すように、クロック信号線2aのクロック信号の立ち上がりに同期してシフトレジスタ11は、既存のデータの各ビットを上位側(MSBの側)に1ビットだけシフトさせるとともに、データ信号線2bのデータ信号の“H”レベルを“1”に対応させ、データ信号の“L”レベルを“0”に対応させて送られる送信データを入力段(LSB)となるレジスタから1ビットずつ取り込む。   As shown in FIGS. 6A to 6D, in synchronization with the rising edge of the clock signal on the clock signal line 2a, the shift register 11 sets each bit of the existing data to 1 bit on the upper side (MSB side). And the transmission data sent in correspondence with the “H” level of the data signal on the data signal line 2 b corresponding to “1” and the “L” level of the data signal corresponding to “0” is input stage (LSB) Is fetched bit by bit from the register.

比較回路13は、クロック信号の立ち上りに同期して、シフトレジスタ11に格納されたデータと、コンペアレジスタ12bに格納された先頭の参照データとを比較する(ステップ43)。比較回路13は、データの一致が検出された否かを判定しており(ステップ44)、データの一致が検出されないとステップ42に戻る。比較回路13は、クロック信号の立ち上り毎に、シフトレジスタ11に格納されたデータと、コンペアレジスタ12bに格納された先頭の参照データとの一致を検出するまで比較動作を繰り返すことになる。   The comparison circuit 13 compares the data stored in the shift register 11 with the head reference data stored in the compare register 12b in synchronization with the rising edge of the clock signal (step 43). The comparison circuit 13 determines whether or not a data match is detected (step 44). If no data match is detected, the comparison circuit 13 returns to step 42. Each time the clock signal rises, the comparison circuit 13 repeats the comparison operation until it detects a match between the data stored in the shift register 11 and the head reference data stored in the compare register 12b.

図6の(d)に示すように、シフトレジスタ11に格納されたデータと、コンペアレジスタ12bに格納された先頭の参照データとが一致すると、比較回路13は、一致信号を“1”にセットして信号線13aを介してCPU3、FIFOレジスタ12に送る(ステップ45)。比較回路13は、これと同時にデータ出力信号を“1”にセットして信号線13cを介してシフトレジスタ11に送るとともに、クロック信号の立ち上りに同期してカウントアップする図示しないビットカウンタのカウント値を“0”にクリアする。   As shown in FIG. 6D, when the data stored in the shift register 11 and the head reference data stored in the compare register 12b match, the comparison circuit 13 sets the match signal to “1”. Then, the data is sent to the CPU 3 and the FIFO register 12 through the signal line 13a (step 45). At the same time, the comparison circuit 13 sets the data output signal to “1” and sends it to the shift register 11 via the signal line 13c, and counts up a bit counter (not shown) that counts up in synchronization with the rising edge of the clock signal. Is cleared to “0”.

シフトレジスタ11は、データ出力信号を受けると、格納しているデータをデータ信号線11bを介してデータレジスタ14に送る。データレジスタ14は、シフトレジスタ11からのデータを格納すると、信号線14aを介してCPU3に対してデータ入力信号を出力する。   When receiving the data output signal, the shift register 11 sends the stored data to the data register 14 via the data signal line 11b. When the data register 14 stores the data from the shift register 11, it outputs a data input signal to the CPU 3 via the signal line 14a.

CPU3は、一致信号を受けると(ステップ25)、データレジスタ14からのデータ入力信号の有無を判定する(ステップ27)。CPU3は、一致信号の直後にデータ入力信号を受けており、これに応答してデータ信号線14bを介してデータレジスタ14からデータを読み取る(ステップ28)。次にCPU3は、FIFOレジスタ12から信号線12fを介して送られる比較終了信号の有無を判定し、つまり、比較終了信号が“1”にセットされているか、“0”にクリアされているかを判定しており(ステップ29)、比較終了信号が“0”にクリアされている、換言すれば、未だFIFOレジスタ12に比較すべき参照データがあるときには、ステップ22の処理に戻る。なお、ここでのステップ22の処理では、本例では参照データを2つとして説明しているので、既にFIFOレジスタ12に送るべき参照データはなく、ステップ25の処理に移る。   When receiving the coincidence signal (step 25), the CPU 3 determines whether or not there is a data input signal from the data register 14 (step 27). The CPU 3 receives the data input signal immediately after the coincidence signal, and in response to this, reads data from the data register 14 via the data signal line 14b (step 28). Next, the CPU 3 determines whether or not there is a comparison end signal sent from the FIFO register 12 via the signal line 12f, that is, whether the comparison end signal is set to “1” or cleared to “0”. If it is determined (step 29) and the comparison end signal is cleared to "0", in other words, if there is still reference data to be compared in the FIFO register 12, the process returns to step 22. In the process of step 22 here, since the reference data is described as two in this example, there is no reference data to be sent to the FIFO register 12, and the process proceeds to step 25.

FIFOレジスタ12は、一致信号を受けると(ステップ38)、コンペアレジスタ12bのデータを“0”にクリアする(ステップ39)。このとき、各レジスタが格納するデータは、図6の(e)に示すようになる。次にFIFOレジスタ12は、レジスタエンプティ信号が“1”にセットされているか否か判定する(ステップ3A)。FIFOレジスタ12は、レジスタエンプティ信号が“1”にセットされていない、つまり、次に比較すべき参照データがインプットレジスタ12aあれば、その参照データをコンペアレジスタ12bに書き込む(ステップ3B)。FIFOレジスタ12は、これに続いてインプットレジスタ12aのデータを“0”にクリアするとともに、レジスタエンプティ信号を“1”にセットする。このとき、各レジスタが格納するデータは、図6の(f)に示すようになる。   When receiving the coincidence signal (step 38), the FIFO register 12 clears the data in the compare register 12b to “0” (step 39). At this time, the data stored in each register is as shown in FIG. Next, the FIFO register 12 determines whether or not the register empty signal is set to “1” (step 3A). The FIFO register 12 writes the reference data to the compare register 12b if the register empty signal is not set to "1", that is, if the reference data to be compared next is the input register 12a (step 3B). Following this, the FIFO register 12 clears the data in the input register 12a to “0” and sets the register empty signal to “1”. At this time, the data stored in each register is as shown in FIG.

コンペアレジスタ12bへの書込みの後にFIFOレジスタ12は、ステップ36の書込みの有無を判定する処理に戻る。このとき、CPU3にはFIFOレジスタ12に書き込むべき参照データを送り終えているとすると、FIFOレジスタ12は、ステップ38の一致信号の有無を判定する処理に移る。   After writing to the compare register 12b, the FIFO register 12 returns to the process of determining the presence / absence of writing in step 36. At this time, assuming that the reference data to be written to the FIFO register 12 has been sent to the CPU 3, the FIFO register 12 proceeds to a process of determining the presence or absence of a coincidence signal in step 38.

比較回路13は、ステップ45の処理で一致信号のセット、データ出力信号のセット、ビットカウンタのクリアを行った後に、CPU3と同様に比較終了信号の有無を判定し(ステップ46)、比較終了信号が無い、換言すれば、比較終了信号が“0”にクリアされていれば、クロック信号の立ち上りを待つ(ステップ47)。   The comparison circuit 13 sets the coincidence signal, sets the data output signal, and clears the bit counter in the process of step 45, and then determines whether or not there is a comparison end signal in the same manner as the CPU 3 (step 46). In other words, if the comparison end signal is cleared to “0”, it waits for the rising edge of the clock signal (step 47).

クロック信号の立ち上がりを契機としてステップ44の処理で先頭の参照データについて一致が検出されてからここまでの処理は、次のクロック信号の立ち上がりの前に終わる。   The processing up to this point after the coincidence of the first reference data is detected in the processing of step 44 in response to the rise of the clock signal ends before the rise of the next clock signal.

次にクロック信号が立ち上がると、比較回路13は図示しない内部のビットカウンタのカウント値を1つ増加させる(ステップ48)。次に比較回路13はカウント値が所定の値“8(1000B)”であるか否かを判定し(ステップ49)、所定の値“8”でなければ、ステップ47の処理に戻り、次のクロック信号の立ち上りを待つ。このようにして比較回路13はクロック信号の立ち上りに同期してカウントアップしてカウント値が所定の値“8”となると、換言すれば、前回の一致信号の発生後に8ビット分のデータがシフトレジスタ11に入力されると、シフトレジスタ11に格納されたデータと、コンペアレジスタ12bに格納された参照データとを比較する(ステップ4A)。比較回路13は、これらデータの一致が検出されたか否か判定しており(ステップ44)、データが一致していれば、ステップ45の処理に戻り、一致信号とデータ出力信号とを発生させるとともにビットカウンタをクリアする。これにより、シフトレジスタ11のデータはデータレジスタ14に送られ、データ入力信号を受けたCPU3によってそこから読み出し可能となる。   Next, when the clock signal rises, the comparison circuit 13 increases the count value of an internal bit counter (not shown) by one (step 48). Next, the comparison circuit 13 determines whether or not the count value is a predetermined value “8 (1000B)” (step 49). If the count value is not the predetermined value “8”, the process returns to step 47, where Wait for the rising edge of the clock signal. In this way, the comparison circuit 13 counts up in synchronization with the rising edge of the clock signal, and when the count value reaches the predetermined value “8”, in other words, the data for 8 bits is shifted after the previous coincidence signal is generated. When input to the register 11, the data stored in the shift register 11 is compared with the reference data stored in the compare register 12b (step 4A). The comparison circuit 13 determines whether or not coincidence of these data is detected (step 44). If the data coincides, the process returns to step 45 to generate a coincidence signal and a data output signal. Clear the bit counter. As a result, the data in the shift register 11 is sent to the data register 14 and can be read therefrom by the CPU 3 that has received the data input signal.

FIFOレジスタ12は、一致信号を受けると(ステップ38)、ステップ39の処理にてコンペアレジスタ12bのデータをクリアした後、ステップ3Aの処理でレジスタエンプティ信号がセットされているか否か判定する。ここでは、図6の(f)に示すようにインプットレジスタ12aのデータはクリアされ、レジスタエンプティ信号が“1”にセットされているので、FIFOレジスタ12は、レジスタエンプティ信号がセットされていると判定する。この場合、FIFOレジスタ12は、比較終了信号を“1”にセットして信号線12fを介してCPU3と比較回路13とに送る(ステップ3C)。これにより、FIFOレジスタ12は、比較終了信号のセットにより比較すべき参照データは尽きて比較処理は終了したことをこれらの回路に送り、その動作を終了する。   When receiving the coincidence signal (step 38), the FIFO register 12 clears the data in the compare register 12b in the process of step 39, and then determines whether or not the register empty signal is set in the process of step 3A. Here, as shown in FIG. 6 (f), the data in the input register 12a is cleared and the register empty signal is set to “1”, so that the FIFO register 12 has the register empty signal set. judge. In this case, the FIFO register 12 sets the comparison end signal to “1” and sends it to the CPU 3 and the comparison circuit 13 via the signal line 12f (step 3C). As a result, the FIFO register 12 sends to the circuits that the reference data to be compared is exhausted by the set of the comparison end signal and the comparison processing is completed, and ends its operation.

一方CPU3は、一致信号を受け(ステップ25)、データ入力信号を受け(ステップ27)、送信データを読み取り(ステップ28)、比較終了信号の有無を判定する(ステップ29)。CPU3は、比較終了信号が有る、換言すれば“1”とセットされていると判定すると、通信終了とするか否かを判定し(ステップ2A)、通信が継続していれば、データ入力信号を待って(ステップ2B)、これを受ける毎にデータレジスタ14から送信データを読み取る(ステップ2C)。なお、ステップ2Aの処理で通信終了と判定した場合、そのことを示す信号を図示しない信号線を介して比較回路13に送り、通信処理を終了する。   On the other hand, the CPU 3 receives the coincidence signal (step 25), receives the data input signal (step 27), reads the transmission data (step 28), and determines whether there is a comparison end signal (step 29). When the CPU 3 determines that there is a comparison end signal, in other words, “1” is set, it determines whether or not to end communication (step 2A), and if communication is continued, the data input signal. (Step 2B), each time it is received, the transmission data is read from the data register 14 (step 2C). If it is determined in step 2A that communication is terminated, a signal indicating that is sent to the comparison circuit 13 via a signal line (not shown), and the communication process is terminated.

比較回路13は、一致信号をセットした後にCPU3と同様に比較終了信号の有無を判定する(ステップ45)。ここで、比較回路13は、比較終了信号が有ると判定すると、CPU3から通信終了を示す信号を受けたか否かを判定し(ステップ4D)、通信が継続していれば、参照データと比較されたヘッダの後続の送信データについて処理を行う(ステップ4E)。この後続の送信データ処理は、図5のフローチャートに示す。   After setting the coincidence signal, the comparison circuit 13 determines the presence / absence of a comparison end signal in the same manner as the CPU 3 (step 45). When the comparison circuit 13 determines that there is a comparison end signal, it determines whether or not it has received a signal indicating the end of communication from the CPU 3 (step 4D). If the communication continues, it is compared with the reference data. The transmission data subsequent to the header is processed (step 4E). This subsequent transmission data processing is shown in the flowchart of FIG.

後続の送信データ処理では、比較回路13は、ビットカウンタとして動作し、クロック信号の立ち上りを待って(ステップ51)、その立ち上り毎にカウントアップし(ステップ52)、カウント値が所定の値“8”となる(ステップ53)毎に、データ出力信号をセットしてカウント値を“0”にクリアする。これにより、最後の参照データに対する一致信号の発生後についても、8ビット分のデータがシフトレジスタ11に入力される毎にデータ出力信号がシフトレジスタ11に送られ、シフトレジスタ11のデータはデータレジスタ14に送られ、データ入力信号を受けたCPU3によってそこから読み出し可能となる。   In the subsequent transmission data processing, the comparison circuit 13 operates as a bit counter, waits for the rising edge of the clock signal (step 51), counts up at each rising edge (step 52), and the count value is a predetermined value “8”. Every time "" (step 53), the data output signal is set and the count value is cleared to "0". Thus, even after the coincidence signal with respect to the last reference data is generated, the data output signal is sent to the shift register 11 every time 8-bit data is input to the shift register 11, and the data in the shift register 11 is stored in the data register. The CPU 3 that has received the data input signal can read out the data.

また、比較回路13は、上述のステップ4Bの処理でシフトレジスタ11に格納されたデータと、コンペアレジスタ12bに格納された参照データとが一致していないと判定すると、不一致信号を“1”にセットして信号線13bを介してCPU3に送る。   If the comparison circuit 13 determines that the data stored in the shift register 11 and the reference data stored in the compare register 12b do not match in the process of step 4B, the comparison signal is set to “1”. It is set and sent to the CPU 3 via the signal line 13b.

CPU3は、ステップ26の処理で不一致信号有りと判定すると、ステップ21の処理に戻ってリセット信号21をインターフェース回路1に送りこれをリセットする。つまり、不一致信号があったときには通信を最初からやり直すこととなる。   If the CPU 3 determines in step 26 that there is a mismatch signal, it returns to step 21 and sends a reset signal 21 to the interface circuit 1 to reset it. That is, when there is a mismatch signal, communication is restarted from the beginning.

以上のようにインターフェース回路1及びCPU3を組み合わせた構成による通信では、プリアンブルに対応する先頭の参照データ、プリアンブルに続くヘッダに対応する参照データを所定の処理単位でFIFOレジスタ12に順次格納して、その出力段のレジスタであるコンペアレジスタ12bに格納されたデータと、送信データを受けるシフトレジスタ11に格納されたデータとを比較し、これらの一致したときにシフトレジスタ11のデータを所定の処理単位でデータレジスタ14に格納し、これをCPU3から読み取るように構成している。このため、上記構成により、CPU3のプリアンブル、ヘッダ等を検出するための負荷を抑えることができる。加えて、CPU3において、送信データを所定の処理単位に整えるためのシフト処理を行う必要がなく、その分CPU3の負荷も抑えられている。   As described above, in the communication using the configuration in which the interface circuit 1 and the CPU 3 are combined, the head reference data corresponding to the preamble and the reference data corresponding to the header following the preamble are sequentially stored in the FIFO register 12 in a predetermined processing unit. The data stored in the compare register 12b, which is the output stage register, is compared with the data stored in the shift register 11 that receives the transmission data, and when they match, the data in the shift register 11 is transferred to a predetermined processing unit. Are stored in the data register 14 and read from the CPU 3. For this reason, with the above configuration, it is possible to suppress a load for detecting the preamble, header, and the like of the CPU 3. In addition, it is not necessary for the CPU 3 to perform a shift process for arranging transmission data into a predetermined processing unit, and the load on the CPU 3 is also reduced accordingly.

また、先頭の参照データについては、シフトレジスタ11にデータが1ビット入力される毎にシフトレジスタ11のデータと比較するようにし、この後の参照データについては、シフトレジスタ11にデータが所定の処理単位である8ビット入力される毎にシフトレジスタ11のデータと比較するようにしてある。これによれば、確実に先頭の参照データに対応する送信データを補足でき、その後は処理の負荷を抑えることが可能となっている。   The first reference data is compared with the data in the shift register 11 every time one bit of data is input to the shift register 11, and the reference data after this is processed in a predetermined process in the shift register 11. Every time 8 bits as a unit is input, it is compared with the data of the shift register 11. According to this, it is possible to reliably supplement the transmission data corresponding to the head reference data, and thereafter to reduce the processing load.

また、上述の説明では便宜上参照データを2つとして述べたが、本発明はこれに限るものではない。例えば、図7に示すように目的の通信パターン毎に参照データを定めたテーブルをCPU3の図示しない不揮発性メモリに用意して、3つの以上の参照データを使用しても良い。   In the above description, the reference data is described as two for convenience, but the present invention is not limited to this. For example, as shown in FIG. 7, a table defining reference data for each target communication pattern may be prepared in a nonvolatile memory (not shown) of the CPU 3 and three or more reference data may be used.

また、上述の説明では一致信号と不一致信号とを別の信号線を介してCPU3に送る構成を採っているが、本発明はこれに限るものではない。例えば、一致信号のみを用いるとして、一致信号のない状態を不一致信号のある状態とすれば、上述の処理において、CPU3のステップ26の処理を、既に一致信号を受けているか否かの判定処理に変更し、比較回路13のステップ4Cの処理を省くように変更すればよい。   In the above description, a configuration is employed in which the coincidence signal and the disagreement signal are sent to the CPU 3 via different signal lines, but the present invention is not limited to this. For example, assuming that only the coincidence signal is used and the state where there is no coincidence signal is the state where there is a disagreement signal, the process of step 26 of the CPU 3 in the above-described process is a process for determining whether or not a coincidence signal has been received. What is necessary is just to change so that the process of step 4C of the comparison circuit 13 may be omitted.

また、上述の説明では、FIFOレジスタ12を2段のレジスタで構成したが、本発明はこれに限るものではなく3段以上のレジスタで構成しても良い。その場合、上述の処理において、FIFOレジスタ12のステップ35、36、37で扱うレジスタエンプティ信号はインプットレジスタ12aに対応する入力段のレジスタがクリアされているか否かを示すものとし、ステップ3Aで扱うレジスタエンプティ信号は、コンペアレジスタ12bに対応する出力段から一つ入力段側のレジスタがクリアされているか否かを示すものとすればよい。   In the above description, the FIFO register 12 is configured with two stages of registers. However, the present invention is not limited to this and may be configured with registers of three or more stages. In that case, in the above processing, the register empty signal handled in steps 35, 36, and 37 of the FIFO register 12 indicates whether or not the register of the input stage corresponding to the input register 12a is cleared, and is handled in step 3A. The register empty signal may indicate whether or not one input stage side register is cleared from the output stage corresponding to the compare register 12b.

また、本発明は、上述の実施形態に限るものではなく、インターフェース回路1の機能を通信LSIまたはCPU3に持たせるようにしてもよい。   The present invention is not limited to the above-described embodiment, and the function of the interface circuit 1 may be provided to the communication LSI or the CPU 3.

本発明の実施の形態にかかるインターフェース回路の構成を示すブロック図である。It is a block diagram which shows the structure of the interface circuit concerning embodiment of this invention. 本発明の実施の形態にかかるインターフェース回路の動作説明、特にCPUの動作説明のためのフローチャート。5 is a flowchart for explaining the operation of the interface circuit according to the embodiment of the present invention, particularly for explaining the operation of the CPU. 本発明の実施の形態にかかるインターフェース回路の動作説明、特にFIFOレジスタの動作説明のためのフローチャート。5 is a flowchart for explaining the operation of the interface circuit according to the embodiment of the present invention, particularly for explaining the operation of the FIFO register. 本発明の実施の形態にかかるインターフェース回路の動作説明、特に比較回路の動作説明のためのフローチャート。6 is a flowchart for explaining the operation of the interface circuit according to the embodiment of the present invention, particularly for explaining the operation of the comparison circuit. 本発明の実施の形態にかかるインターフェース回路の動作説明、特に比較回路の動作説明のためのフローチャート。6 is a flowchart for explaining the operation of the interface circuit according to the embodiment of the present invention, particularly for explaining the operation of the comparison circuit. 各レジスタに格納されたデータを説明するブロック図である。It is a block diagram explaining the data stored in each register. 参照データの例を説明する説明図である。It is explanatory drawing explaining the example of reference data. 従来のインターフェース回路を説明するブロック図である。It is a block diagram explaining the conventional interface circuit. 従来のインターフェース回路の動作を説明する説明図である。It is explanatory drawing explaining operation | movement of the conventional interface circuit.

符号の説明Explanation of symbols

1 インターフェース回路
2 通信LSI(第1の回路)
3 CPU(第2の回路、制御回路)
11 シフトレジスタ
12 FIFOレジスタ
13 比較回路
14 データレジスタ
1 Interface Circuit 2 Communication LSI (First Circuit)
3 CPU (second circuit, control circuit)
11 Shift register 12 FIFO register 13 Comparison circuit 14 Data register

Claims (5)

第1の回路からシリアル通信にて入力される送信データを第2の回路に中継するインターフェース回路であって、
前記送信データの処理単位となる所定のビット数分のレジスタを有し、前記送信データを1ビットずつ取り込む、シフトレジスタと、
前記送信データの処理単位となる所定のビット数分のレジスタを各段に有し、前記送信データに含まれるプリアンブル、ヘッダ等の既知のデータに対応する参照データを前記所定の処理単位で順次格納するFIFOレジスタと、
前記シフトレジスタに格納された前記送信データと、前記FIFOレジスタの出力段に格納された前記参照データとを比較し、前記送信データと前記参照データとの一致を検出する比較回路と、
第2の回路により読み出されるものであり、前記比較回路により一致検出がされたときに、前記シフトレジスタに格納された前記送信データが書き込まれるデータレジスタと、
を備えたことを特徴とするインターフェース回路。
An interface circuit that relays transmission data input from a first circuit through serial communication to a second circuit,
A shift register having a register for a predetermined number of bits as a processing unit of the transmission data, and capturing the transmission data bit by bit;
Each stage has a register for a predetermined number of bits as a processing unit of the transmission data, and sequentially stores reference data corresponding to known data such as a preamble and a header included in the transmission data in the predetermined processing unit. A FIFO register to
A comparison circuit that compares the transmission data stored in the shift register with the reference data stored in the output stage of the FIFO register, and detects a match between the transmission data and the reference data;
A data register that is read by the second circuit and to which the transmission data stored in the shift register is written when coincidence is detected by the comparison circuit;
An interface circuit characterized by comprising:
前記第2の回路は、制御回路を含み、
前記制御回路は、前記比較回路により一致検出がされたときに前記FIFOレジスタに格納する前記参照データを更新することを特徴とする請求項1に記載のインターフェース回路。
The second circuit includes a control circuit;
The interface circuit according to claim 1, wherein the control circuit updates the reference data stored in the FIFO register when coincidence is detected by the comparison circuit.
前記データレジスタは、前記シフトレジスタに格納された前記送信データが書き込まれたときにこの書き込みがされたことを示すデータ入力信号を前記第2の回路に出力し、
前記制御回路は、前記データレジスタから前記データ入力信号を受けたときに前記FIFOレジスタに格納する前記参照データの変更を指示することを特徴とする請求項1又は請求項2に記載のインターフェース回路。
The data register outputs a data input signal indicating that the data has been written to the second circuit when the transmission data stored in the shift register is written,
The interface circuit according to claim 1, wherein the control circuit instructs to change the reference data stored in the FIFO register when receiving the data input signal from the data register.
前記制御回路の制御により、前記更新毎に、前記FIFOレジスタの各段のレジスタに格納された前記参照データを次段のレジスタへと送り、前記FIFOレジスタの入力段が空となったときには新たな前記参照データを入力することを特徴とする請求項2又は請求項3に記載のインターフェース回路。 Under the control of the control circuit, each time the update is performed, the reference data stored in the register at each stage of the FIFO register is sent to the register at the next stage, and when the input stage of the FIFO register becomes empty, a new one is sent. The interface circuit according to claim 2 or 3, wherein the reference data is input. 前記第1の回路は無線回路を含むことを特徴とする請求項1乃至請求項4の何れかに記載のインターフェース回路。 The interface circuit according to claim 1, wherein the first circuit includes a radio circuit.
JP2006251989A 2006-09-19 2006-09-19 Interface circuit Abandoned JP2008077125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006251989A JP2008077125A (en) 2006-09-19 2006-09-19 Interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006251989A JP2008077125A (en) 2006-09-19 2006-09-19 Interface circuit

Publications (1)

Publication Number Publication Date
JP2008077125A true JP2008077125A (en) 2008-04-03

Family

ID=39349152

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006251989A Abandoned JP2008077125A (en) 2006-09-19 2006-09-19 Interface circuit

Country Status (1)

Country Link
JP (1) JP2008077125A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601187B2 (en) 2009-06-26 2013-12-03 Renesas Electronics Corporation Semiconductor device and serial interface circuit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04220831A (en) * 1990-12-20 1992-08-11 Fujitsu Ltd General-purpose format synchronizing device
JPH06314307A (en) * 1992-08-10 1994-11-08 Fujitsu F I P Kk Key ward collation/retrieval processing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04220831A (en) * 1990-12-20 1992-08-11 Fujitsu Ltd General-purpose format synchronizing device
JPH06314307A (en) * 1992-08-10 1994-11-08 Fujitsu F I P Kk Key ward collation/retrieval processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601187B2 (en) 2009-06-26 2013-12-03 Renesas Electronics Corporation Semiconductor device and serial interface circuit

Similar Documents

Publication Publication Date Title
US8184026B2 (en) Mobile industry processor interface
KR101470989B1 (en) Method, apparatus, and system for automatic data aligner for multiple serial receivers
JPS6359294B2 (en)
JP5936030B2 (en) Information processing apparatus, information processing method, and program
JP2982731B2 (en) Synchronous signal detection method
US9058266B2 (en) Deskew apparatus and method for peripheral component interconnect express
JP2008077125A (en) Interface circuit
JP4012907B2 (en) Asynchronous transmission method and circuit thereof
US8711018B2 (en) Providing a feedback loop in a low latency serial interconnect architecture
JP2008077124A (en) Interface circuit
JP4593677B2 (en) Clock transfer device and clock transfer method
JP3579039B2 (en) Error correction circuit using cyclic code
JP5802488B2 (en) Receiver
WO1996007254A1 (en) Receiver
JP2010193217A (en) Relay device, and relay method of relay device
JP4199031B2 (en) Communication level detector
JP3754998B2 (en) Information processing device
JP3118829B2 (en) Communication preamble detection device
JP4094396B2 (en) Serial data communication apparatus and method
KR100386558B1 (en) fast detection method for data rate
JP2007258995A (en) Apparatus for adjusting phase of data signal, and semiconductor device
JP2002344435A (en) Bit pattern synchronization circuit
JP2016092632A (en) Data transmission/reception system, data transmission device, data reception device, data transmission/reception method, and program
JP5548744B2 (en) Signal converter
JP2007233636A (en) Data transfer device and data transfer method

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20080509

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Effective date: 20110114

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110125

A762 Written abandonment of application

Effective date: 20110210

Free format text: JAPANESE INTERMEDIATE CODE: A762