JP2013120587A - Serial transfer device and serial transfer method - Google Patents

Serial transfer device and serial transfer method Download PDF

Info

Publication number
JP2013120587A
JP2013120587A JP2011269757A JP2011269757A JP2013120587A JP 2013120587 A JP2013120587 A JP 2013120587A JP 2011269757 A JP2011269757 A JP 2011269757A JP 2011269757 A JP2011269757 A JP 2011269757A JP 2013120587 A JP2013120587 A JP 2013120587A
Authority
JP
Japan
Prior art keywords
serial
data
transmission
reception
transfer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011269757A
Other languages
Japanese (ja)
Inventor
Koichi Tada
公一 多田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Engineering Ltd
Original Assignee
NEC Engineering Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2011269757A priority Critical patent/JP2013120587A/en
Publication of JP2013120587A publication Critical patent/JP2013120587A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve data transfer performance by simplifying a configuration of a device and preventing complication of a logic circuit.SOLUTION: A serial transfer device 1 includes: shared memory 3 capable of random access storing parallel data; a serial transfer unit 2 which converts between the parallel data and serial data, and transmits/receives data between an external device and a shared memory 3; and a DMA control circuit 20 which controls so that the serial transfer unit 2 transmits/receives the data by a DMA transfer. The serial transfer unit 2 includes: a plurality of serial transmission/reception circuits 10 which transmits/receives the serial data for the external device; a memory control circuit 30 which controls access for the shared memory 3 by the plurality of serial transmission/reception circuits 10; and a cyclic counter 40 which cyclically outputs a predetermined value by synchronizing a predetermined synchronization signal. The plurality of serial transmission/reception circuits 10 transmits/receives the serial data for the external device according to an output value from the cyclic counter 40.

Description

本発明は、シリアル転送装置及びシリアル転送方法に関し、特に、DMA(ダイレクトメモリアクセス)転送を用いた場合の転送装置及び転送方法に関する。   The present invention relates to a serial transfer device and a serial transfer method, and more particularly to a transfer device and a transfer method when DMA (direct memory access) transfer is used.

従来、転送装置に設けられたメモリと外部の周辺装置との間でデータ転送を行う場合には、中央処理装置(CPU:Central Processing Unit)を介さずにデータ転送を行うDMA転送を用いてシリアルデータ転送が行われる(例えば、特許文献1)。この場合には、メモリからのパラレルデータをシリアルデータに変換して周辺装置に転送すると共に、周辺装置からのシリアルデータをパラレルデータに変換してメモリに転送するため、シフトレジスタが設けられている。   Conventionally, when data transfer is performed between a memory provided in a transfer device and an external peripheral device, serial transfer is performed using DMA transfer in which data transfer is performed without using a central processing unit (CPU). Data transfer is performed (for example, Patent Document 1). In this case, a shift register is provided to convert parallel data from the memory into serial data and transfer it to the peripheral device, and to convert serial data from the peripheral device into parallel data and transfer it to the memory. .

最近では、複数の周辺装置との間でシリアルデータ転送が可能なシリアル転送装置が実用化されている。このようなシリアル転送装置には、複数のシリアルインタフェースに対応する複数のシリアルポートと、各々のシリアルポートに対応するシフトレジスタとが設けられる。また、シリアル転送装置には、複数のシフトレジスタ間のデータ伝送に用いるための共有メモリが設けられると共に、上述したシフトレジスタとシリアルデータ転送を制御する機能とを有する複数のシリアル送受信回路が設けられる。   Recently, serial transfer devices capable of transferring serial data to and from a plurality of peripheral devices have been put into practical use. Such a serial transfer device is provided with a plurality of serial ports corresponding to a plurality of serial interfaces and a shift register corresponding to each serial port. The serial transfer device is provided with a shared memory for use in data transmission between a plurality of shift registers, and a plurality of serial transmission / reception circuits having the above-described shift register and a function for controlling serial data transfer. .

このようなシリアル転送装置により複数の周辺装置に対してデータを送信する場合には、各シリアル送受信回路が送信するデータを共有メモリから読み出し、データを受信する場合には、受信したデータを供給メモリに書き込む。   When data is transmitted to a plurality of peripheral devices by such a serial transfer device, the data transmitted by each serial transmission / reception circuit is read from the shared memory, and when data is received, the received data is supplied to the supply memory. Write to.

しかし、複数のシリアル送受信回路が同時に供給メモリに対してアクセスすると、競合が生じる虞がある。そこで、このような競合を回避するために、近年、様々な方法が提案され、具体的には、以下に示す第1〜第4の方法等が提案されている。   However, if a plurality of serial transmission / reception circuits access the supply memory at the same time, there is a risk of contention. In order to avoid such competition, various methods have been proposed in recent years, and specifically, the following first to fourth methods have been proposed.

第1の方法は、例えば図14に示すように、シリアル転送部200、共有メモリ300及びCPU400で構成されたシリアル転送装置100において、シリアル転送部200に設けられたシリアル送受信回路110A、110B、110C、・・・110Nとメモリ制御回路130との間に、データを保持するバッファ150A、150B、150C、・・・150Nを設けると共に、各シリアル送受信回路110の優先順位を決定する調停回路140を設ける方法である。   As shown in FIG. 14, for example, in the first method, in the serial transfer device 100 including the serial transfer unit 200, the shared memory 300, and the CPU 400, serial transmission / reception circuits 110A, 110B, and 110C provided in the serial transfer unit 200 are used. ,..., 110N and the memory control circuit 130 are provided with buffers 150A, 150B, 150C,... 150N that hold data, and an arbitration circuit 140 that determines the priority of each serial transmission / reception circuit 110 is provided. Is the method.

シリアル転送装置100においてデータを送信する場合には、予め共有メモリ300から読み出されたパラレルデータをバッファ150A、150B、150C、・・・150Nに保持し、送信中にデータが不足しないようにする。   When data is transmitted in the serial transfer device 100, the parallel data read from the shared memory 300 in advance is held in the buffers 150A, 150B, 150C,... 150N so that the data does not run out during transmission. .

また、データを受信する場合には、シリアル送受信回路110A、110B、110C、・・・110Nで受信したシリアルデータをパラレルデータに変換した後、バッファ150A、150B、150C、・・・150Nに保持し、共有メモリ300がアクセス可能になるまで待機する。これにより、共有メモリ300へのアクセス待ちによるデータ溢れを防止する。   When data is received, serial data received by the serial transmission / reception circuits 110A, 110B, 110C,... 110N is converted into parallel data, and then stored in the buffers 150A, 150B, 150C,. And wait until the shared memory 300 becomes accessible. As a result, data overflow due to waiting for access to the shared memory 300 is prevented.

ここで、共有メモリ300に対するアクセスは、調停回路140によって優先順位が決定され、優先順位の高いシリアル送受信回路に対して共有メモリ300へのアクセスが許可される。これにより、共有メモリ300に対するアクセスの競合を防ぐことができる。   Here, the priority order of access to the shared memory 300 is determined by the arbitration circuit 140, and access to the shared memory 300 is permitted to the serial transmission / reception circuit having a higher priority order. As a result, contention for access to the shared memory 300 can be prevented.

第2の方法は、例えば図15に示すように、シリアル転送部200’、共有メモリ300及びCPU400で構成されたシリアル転送装置100’において、図14に示すシリアル転送部200からバッファ150A、150B、150C、・・・150Nを除いた方法である。   For example, as shown in FIG. 15, the second method uses a serial transfer device 100 ′ composed of a serial transfer unit 200 ′, a shared memory 300, and a CPU 400, and the serial transfer unit 200 shown in FIG. This is a method excluding 150C,.

シリアル転送装置100’においてデータの送受信を行う場合、調停回路140により優先順位が決定され、所定のシリアル送受信回路は、データの送信又は受信が完了するまで共有メモリ300を占有し、他のシリアル送受信回路は、共有メモリ300に対してアクセスすることができない。そして、所定のシリアル送受信回路による送信又は受信が完了すると、調停回路140により決定された順序に従って、他のシリアル送受信回路によるデータの送信又は受信を実行する。第2の方法では、図16に示すように、シリアル送受信回路110A、110B、110C、・・・110Fが順番にデータの送信又は受信を実行する。   When data transmission / reception is performed in the serial transfer device 100 ′, the priority order is determined by the arbitration circuit 140, and the predetermined serial transmission / reception circuit occupies the shared memory 300 until transmission or reception of data is completed, and other serial transmission / reception circuits. The circuit cannot access the shared memory 300. When transmission or reception by a predetermined serial transmission / reception circuit is completed, transmission or reception of data by another serial transmission / reception circuit is executed according to the order determined by the arbitration circuit 140. In the second method, as shown in FIG. 16, serial transmission / reception circuits 110A, 110B, 110C,... 110F execute data transmission or reception in order.

第3の方法は、例えば特許文献2に記載されているように、1つのシリアル送受信回路のみで複数ポートのシリアル送受信を兼用する方法である。この方法においても、第2の方法と同様に、各ポート毎に順番にデータの送信又は受信を実行する。   The third method, for example, as described in Patent Document 2, is a method in which only a single serial transmission / reception circuit is used for serial transmission / reception of a plurality of ports. In this method, as in the second method, data transmission or reception is executed in order for each port.

第4の方法は、例えば特許文献3に記載されているように、ポートとバッファ間に相互接続マトリクスと呼ばれる特殊な回路を設ける方法であり、すべてのポートが送信又は受信を一意的に行う。   The fourth method is a method in which a special circuit called an interconnection matrix is provided between a port and a buffer as described in, for example, Patent Document 3, and all ports perform transmission or reception uniquely.

特開平2−73445号公報Japanese Patent Laid-Open No. 2-73445 特開平8−194662号公報Japanese Patent Laid-Open No. 8-194462 特開平9−502828号公報JP-A-9-502828

しかしながら、第1の方法では、各シリアル送受信回路に対応するバッファを設ける必要があるため、ハードウェアが増大し、コストの増大や設計・製造が不可能となる虞があるという問題があった。   However, in the first method, since it is necessary to provide a buffer corresponding to each serial transmission / reception circuit, there is a problem that hardware increases, and there is a possibility that the cost may increase, and design / manufacturing may become impossible.

また、各シリアル送受信回路による共有メモリに対するアクセスの競合を防ぐために、各シリアル送受信回路の優先順位を決定する調停回路が必要となるため、論理回路が複雑化し、設計時における品質の確保が困難となり、設計工数の増大や設計期間の長大が生じるという問題があった。   In addition, an arbitration circuit that determines the priority of each serial transmission / reception circuit is required to prevent contention of access to the shared memory by each serial transmission / reception circuit, which complicates the logic circuit and makes it difficult to ensure quality during design. There is a problem that an increase in design man-hours and a long design period occur.

第2及び第3の方法では、所定のシリアル送受信回路又はポートが共有メモリを占有し、各シリアル送受信回路又は各ポート毎に順番にデータの送受信を行う。そのため、データの送受信を行うシリアル送受信回路又はポート以外のシリアル送受信回路又はポートは、待機状態となり、装置全体としてのデータ転送に時間を要することになり、データ転送性能が低下するという問題があった。   In the second and third methods, a predetermined serial transmission / reception circuit or port occupies the shared memory, and data is transmitted / received in order for each serial transmission / reception circuit or each port. Therefore, the serial transmission / reception circuit or port other than the serial transmission / reception circuit or port that transmits / receives data is in a standby state, which requires time for data transfer as a whole device, and there is a problem that the data transfer performance deteriorates. .

第4の方法では、すべてのポートを送信状態としてデータ転送を行い、転送が完了するとすべてのポートを受信状態としてデータ転送を行うため、複数のポートにおける動作が一意的な方向となり、送信又は受信動作をポート毎に任意に設定することができない。そのため、送信実行中は受信待機状態となり、また、受信実行中は送信待機状態となるなど、転送の待機状態が増加するため、データ転送性能が低下するという問題があった。   In the fourth method, data transfer is performed with all ports in the transmission state, and when the transfer is completed, data transfer is performed with all ports in the reception state. The operation cannot be set arbitrarily for each port. For this reason, there is a problem that the data transfer performance deteriorates because the transfer standby state increases, such as the reception standby state during transmission execution and the transmission standby state during reception execution.

そこで、本発明は、上記従来の技術における問題点に鑑みてなされたものであって、ハードウェアの増大を防止しつつ装置の構成を簡略化すると共に、論理回路の複雑化を防止し、データ転送性能を向上させることが可能なシリアル転送装置及びシリアル転送方法を提供することを目的とする。   Therefore, the present invention has been made in view of the problems in the above-described conventional technology, and while simplifying the configuration of the device while preventing an increase in hardware, the complexity of the logic circuit is prevented, and the data An object of the present invention is to provide a serial transfer device and a serial transfer method capable of improving transfer performance.

上記目的を達成するため、本発明は、パラレルデータを記憶するランダムアクセス可能な共有メモリと、前記パラレルデータとシリアルデータとの変換を行い、外部装置及び前記共有メモリの間におけるデータの送受信を行うシリアル転送回路と、前記シリアル転送回路によるデータの送受信をDMA転送により行うように制御するDMA転送制御回路とを備えるシリアル転送装置であって、前記シリアル転送回路は、前記外部装置に対するシリアルデータの送受信を行う複数のシリアル送受信回路と、前記複数のシリアル送受信回路による前記共有メモリに対するアクセスを制御するメモリ制御回路と、所定の同期信号に同期して所定の値を循環的に出力する循環カウンタとを有し、前記複数のシリアル送受信回路は、前記循環カウンタからの出力値に応じて前記外部装置に対する前記シリアルデータの送受信を行うことを特徴とする。   To achieve the above object, the present invention performs a random access shared memory for storing parallel data, converts the parallel data and serial data, and transmits / receives data between an external device and the shared memory. A serial transfer device comprising: a serial transfer circuit; and a DMA transfer control circuit for controlling data transmission / reception by the serial transfer circuit by DMA transfer, wherein the serial transfer circuit transmits / receives serial data to / from the external device A plurality of serial transmission / reception circuits, a memory control circuit that controls access to the shared memory by the plurality of serial transmission / reception circuits, and a circulation counter that cyclically outputs a predetermined value in synchronization with a predetermined synchronization signal And the plurality of serial transmission / reception circuits are the circulation counters And performing transmission and reception of the serial data to said external device in response to the output value.

そして、本発明によれば、循環カウンタからの出力値に応じて外部装置に対するシリアルデータの送受信を行うため、複数のシリアル送受信回路による送受信動作を並列的に行うことができ、データの転送性能を向上させることが可能になる。   According to the present invention, since serial data is transmitted / received to / from an external device in accordance with the output value from the circulation counter, transmission / reception operations by a plurality of serial transmission / reception circuits can be performed in parallel, and data transfer performance can be improved. It becomes possible to improve.

上記シリアル転送装置において、前記複数のシリアル送受信回路は、予め固有の回路番号が設定され、前記循環カウンタから出力される値と、前記回路番号とが一致した場合に送受信動作を行うことができる。   In the serial transfer device, the plurality of serial transmission / reception circuits can perform transmission / reception operations when a unique circuit number is set in advance and the value output from the circulation counter matches the circuit number.

上記シリアル転送装置において、前記DMA転送制御回路は、前記複数のシリアル送受信回路による前記外部装置からのデータの受信動作を、前記循環カウンタの値に応じて前記シリアル送受信回路毎に異なるタイミングで実行させると共に、前記複数のシリアル送受信回路による前記外部装置に対するデータの送信動作を、前記循環カウンタの値に応じて前記シリアル送受信回路毎に異なるタイミングで実行させるように制御することができる。これにより、共有メモリに対する書き込み動作及び読み出し動作の競合を防ぐことが可能になる。   In the serial transfer device, the DMA transfer control circuit causes the plurality of serial transmission / reception circuits to receive data from the external device at different timings for each serial transmission / reception circuit in accordance with the value of the circulation counter. At the same time, the data transmission operation to the external device by the plurality of serial transmission / reception circuits can be controlled to be executed at different timings for each serial transmission / reception circuit in accordance with the value of the circulation counter. As a result, it is possible to prevent contention between the write operation and the read operation with respect to the shared memory.

上記シリアル転送装置において、前記シリアル転送回路は、前記外部装置から受信したシリアルデータが前記共有メモリのアクセス可能な量に達した時点で、前記共有メモリに対して書き込み動作を行うことができる。これにより、シリアルデータの受信動作中における受信データの溢れを防ぎ、受信動作を継続して行うことが可能になる。   In the serial transfer device, the serial transfer circuit can perform a write operation on the shared memory when the serial data received from the external device reaches an accessible amount of the shared memory. This prevents overflow of received data during the serial data receiving operation and allows the receiving operation to be continued.

上記シリアル転送装置において、前記シリアル転送回路は、前記外部装置に対して送信するシリアルデータの量が前記共有メモリから読み出した量に達する前に、前記共有メモリからの読み出し動作を行うことができる。
これにより、シリアルデータの送信動作中における送信データの不足を防ぎ、送信動作を継続して行うことが可能になる。
In the serial transfer device, the serial transfer circuit can perform a read operation from the shared memory before the amount of serial data transmitted to the external device reaches the amount read from the shared memory.
As a result, it is possible to prevent a shortage of transmission data during the serial data transmission operation and to continue the transmission operation.

また、本発明は、共有メモリに記憶されたパラレルデータと外部装置に対して送受信するためのシリアルデータとの変換を複数のシリアル送受信回路により行い、外部装置及び前記共有メモリの間におけるデータの送受信をDMA転送を用いて行うシリアル転送方法であって、所定の同期信号に同期して所定の値を循環的に出力する循環カウンタからの出力値に応じて、該出力値に対応する前記シリアル送受信回路により前記外部装置に対する前記シリアルデータの送受信を行うことを特徴とする。本発明は、前記発明と同様に、外部装置に対する複数の送受信動作を並列的に行うことができ、データの転送性能を向上させることが可能になる。   Further, the present invention performs conversion between parallel data stored in the shared memory and serial data for transmission / reception to / from an external device by a plurality of serial transmission / reception circuits, and transmits / receives data between the external device and the shared memory. Serial transfer method using DMA transfer, wherein the serial transmission and reception corresponding to the output value according to an output value from a cyclic counter that cyclically outputs a predetermined value in synchronization with a predetermined synchronization signal A serial circuit transmits and receives the serial data to and from the external device. In the present invention, a plurality of transmission / reception operations with respect to an external device can be performed in parallel as in the above-described invention, and the data transfer performance can be improved.

以上のように、本発明によれば、ハードウェアの増大を防止しつつ装置の構成を簡略化すると共に、論理回路の複雑化を防止し、データ転送性能を向上させることが可能になる。   As described above, according to the present invention, it is possible to simplify the configuration of the apparatus while preventing an increase in hardware, prevent the complexity of the logic circuit, and improve the data transfer performance.

本発明に係るシリアル転送装置の第1の実施形態を示すブロック図である。1 is a block diagram showing a first embodiment of a serial transfer device according to the present invention. シリアル送受信回路の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a serial transmission / reception circuit. DMA制御回路の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a DMA control circuit. メモリ制御回路の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a memory control circuit. メモリ制御回路が共有メモリに対してアクセスを行うタイミングについて説明するためのタイミングチャートである。6 is a timing chart for explaining the timing at which the memory control circuit accesses the shared memory. シリアル送受信回路の処理の流れについて説明するためのフローチャートである。It is a flowchart for demonstrating the flow of a process of a serial transmission / reception circuit. 単体のシリアル送受信回路においてデータを送信する場合について説明するためのタイミングチャートである。It is a timing chart for demonstrating the case where data are transmitted in a single serial transmission / reception circuit. 単体のシリアル送受信回路においてデータを受信する場合について説明するためのタイミングチャートである。It is a timing chart for demonstrating the case where a single serial transmission / reception circuit receives data. すべてのシリアル送受信回路がデータの送受信を行う場合の一例について説明するためのタイミングチャートである。It is a timing chart for demonstrating an example in case all the serial transmission / reception circuits transmit / receive data. すべてのシリアル送受信回路がデータの送受信を行う場合の他の例について説明するためのタイミングチャートである。It is a timing chart for demonstrating the other example when all the serial transmission / reception circuits transmit / receive data. すべてのシリアル送受信回路がデータの送受信を行う場合の他の例について説明するためのタイミングチャートである。It is a timing chart for demonstrating the other example when all the serial transmission / reception circuits transmit / receive data. 共有メモリに対するアクセスについて説明するための略線図である。It is a basic diagram for demonstrating access with respect to a shared memory. 本発明に係るシリアル転送装置の第2の実施形態を示すブロック図である。It is a block diagram which shows 2nd Embodiment of the serial transfer apparatus which concerns on this invention. 従来のシリアル転送装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the conventional serial transfer apparatus. 従来のシリアル転送装置の構成の他の例を示すブロック図である。It is a block diagram which shows the other example of a structure of the conventional serial transfer apparatus. 従来のシリアル送受信回路によるデータ転送について説明するためのタイミングチャートである。It is a timing chart for demonstrating the data transfer by the conventional serial transmission / reception circuit.

次に、本発明を実施するための形態について、図面を参照しながら詳細に説明する。   Next, an embodiment for carrying out the present invention will be described in detail with reference to the drawings.

図1は、本発明に係るシリアル転送装置の第1の実施形態を示し、このシリアル転送装置1は、外部に設けられた周辺装置(以下、「外部装置」とする)との間でデータの送受信を行うシリアル転送部2と、シリアル転送用のデータを保持し、ランダムアクセスが可能な共有メモリ3と、各部を制御し、シリアル転送部2に設けられた後述するDMA制御回路に対して各種のコマンドを書き込むCPU4とを備える。   FIG. 1 shows a first embodiment of a serial transfer device according to the present invention. This serial transfer device 1 exchanges data with peripheral devices (hereinafter referred to as “external devices”) provided outside. A serial transfer unit 2 that performs transmission / reception, a shared memory 3 that holds serial transfer data and can be randomly accessed, and controls each unit, and various types of DMA control circuits (described later) provided in the serial transfer unit 2 CPU 4 for writing the above command.

シリアル転送部2は、複数のシリアル送受信回路10A、10B、10C、・・・10N、DMA制御回路20、メモリ制御回路30及び循環カウンタ40を備え、シリアル送受信回路10A、10B、10C、・・・10N及びメモリ制御回路30がバスで接続される。尚、シリアル送受信回路10A、10B、10C、・・・10Nは、各々が同等の機能を有するため、以下の説明において特に区別する必要がない場合には、「シリアル送受信回路10」として説明する。   The serial transfer unit 2 includes a plurality of serial transmission / reception circuits 10A, 10B, 10C,... 10N, a DMA control circuit 20, a memory control circuit 30, and a circulation counter 40. The serial transmission / reception circuits 10A, 10B, 10C,. 10N and the memory control circuit 30 are connected by a bus. The serial transmission / reception circuits 10A, 10B, 10C,..., 10N have the same functions, and are described as “serial transmission / reception circuit 10” unless they need to be distinguished in the following description.

シリアル送受信回路10は、シリアルインタフェースを介して外部装置と接続される。シリアル送受信回路10は、外部装置に対してデータを送信する場合に、メモリ制御回路30を介して共有メモリ3から読み出されたパラレルデータをシリアルデータに変換する。また、シリアル送受信回路10は、外部装置からデータを受信した場合に、受信したシリアルデータをパラレルデータに変換する。   The serial transmission / reception circuit 10 is connected to an external device via a serial interface. The serial transmission / reception circuit 10 converts parallel data read from the shared memory 3 via the memory control circuit 30 into serial data when transmitting data to an external device. The serial transmission / reception circuit 10 converts the received serial data into parallel data when data is received from an external device.

DMA制御回路20は、CPUバス6によってCPU4と接続され、CPUバス6を介してCPU4から供給される書き込み命令に基づき、各シリアル送受信回路10を制御する。メモリ制御回路30は、メモリバス5によって共有メモリ3と接続され、バスを介して各シリアル送受信回路10から受け取ったリクエストに基づき、共有メモリ3に対するデータの読み出し(Read)及び書き込み(Write)を制御する。   The DMA control circuit 20 is connected to the CPU 4 via the CPU bus 6 and controls each serial transmission / reception circuit 10 based on a write command supplied from the CPU 4 via the CPU bus 6. The memory control circuit 30 is connected to the shared memory 3 via the memory bus 5 and controls data read (Read) and write (Write) to the shared memory 3 based on a request received from each serial transmission / reception circuit 10 via the bus. To do.

循環カウンタ40は、各シリアル送受信回路10の動作タイミングを同期させるための制御信号である循環カウンタ信号を生成する。この循環カウンタ信号は、シリアル転送部2全体の動作タイミングとなるシリアルクロック(CLK)のタイミングに応じて値が循環的に変化する信号である。   The circulation counter 40 generates a circulation counter signal that is a control signal for synchronizing the operation timing of each serial transmission / reception circuit 10. This cyclic counter signal is a signal whose value cyclically changes in accordance with the timing of the serial clock (CLK) that is the operation timing of the entire serial transfer unit 2.

次に、シリアル送受信回路10、DMA制御回路20及びメモリ制御回路30の詳細な構成について、図2〜図4を参照して説明する。シリアル送受信回路10は、図2に示すように、パラレルデータ及びシリアルデータの相互変換を行うシフトレジスタ11と、シフトレジスタ11及び後述するIOバッファ13の動作を制御するシリアル制御回路12と、外部装置に対するデータの送受信を行うIOバッファ13と、シリアル送受信回路10に固有な番号を設定する回路番号クランプ論理部14と、バッファ15A〜15Cとを備える。   Next, detailed configurations of the serial transmission / reception circuit 10, the DMA control circuit 20, and the memory control circuit 30 will be described with reference to FIGS. As shown in FIG. 2, the serial transmission / reception circuit 10 includes a shift register 11 that performs mutual conversion between parallel data and serial data, a serial control circuit 12 that controls operations of the shift register 11 and an IO buffer 13 described later, and an external device. An IO buffer 13 for transmitting / receiving data to / from the circuit, a circuit number clamp logic unit 14 for setting a unique number for the serial transmission / reception circuit 10, and buffers 15A to 15C.

シフトレジスタ11は、シリアル制御回路12から供給された後述するデータLoad信号及びデータShift信号に基づき、メモリ制御回路30を介して共有メモリ3から供給されたパラレルデータであるReadデータを、シリアルデータである出力データに変換し、IOバッファ13に供給する。また、シフトレジスタ11は、データLoad信号及びデータShift信号に基づき、IOバッファ13を介して外部装置から供給されたシリアルデータである入力データを、パラレルデータであるWriteデータに変換し、メモリ制御回路30に供給する。   The shift register 11 converts Read data, which is parallel data supplied from the shared memory 3 via the memory control circuit 30, into serial data based on a data load signal and a data shift signal described later supplied from the serial control circuit 12. It is converted into certain output data and supplied to the IO buffer 13. The shift register 11 converts the input data, which is serial data supplied from the external device via the IO buffer 13, into the write data, which is parallel data, based on the data load signal and the data shift signal. 30.

シリアル制御回路12は、DMA制御回路20から供給される転送制御信号と、循環カウンタ40から供給される循環カウンタ信号とに基づき、シフトレジスタ11においてReadデータをロードするためのデータLoad信号と、シフトレジスタ11をシフトさせてパラレルデータをシリアルデータに変換して出力するためのデータShift信号とを生成し、シフトレジスタ11に対して供給する。尚、転送制御信号の詳細については、後述する。   Based on the transfer control signal supplied from the DMA control circuit 20 and the cyclic counter signal supplied from the circulation counter 40, the serial control circuit 12 shifts the data load signal for loading the read data in the shift register 11 and the shift The register 11 is shifted to generate a data shift signal for converting parallel data into serial data and outputting the serial data, and supplies the generated data to the shift register 11. Details of the transfer control signal will be described later.

また、シリアル制御回路12は、IOバッファ13の入出力方向を制御するためのIO制御信号を生成し、IOバッファ13に対して供給する。さらに、シリアル制御回路12は、共有メモリ3に対する読み出し要求を示すReadリクエスト信号、書き込み要求を示すWriteリクエスト信号、及び共有メモリ3のアクセスするアドレスを示すメモリアドレス信号を生成し、メモリ制御回路30に対して供給する。さらにまた、シリアル制御回路12は、外部装置を制御するための制御信号であるイネーブル信号、転送クロック(CLK)信号及び入出力モード信号を生成する。生成された各種の制御信号は、バッファ15A〜15Cを介して外部装置に供給される。   The serial control circuit 12 generates an IO control signal for controlling the input / output direction of the IO buffer 13 and supplies the IO control signal to the IO buffer 13. Further, the serial control circuit 12 generates a read request signal indicating a read request to the shared memory 3, a write request signal indicating a write request, and a memory address signal indicating an address to be accessed by the shared memory 3, and sends it to the memory control circuit 30. To supply. Furthermore, the serial control circuit 12 generates an enable signal, a transfer clock (CLK) signal, and an input / output mode signal that are control signals for controlling the external device. The various generated control signals are supplied to the external device via the buffers 15A to 15C.

IOバッファ13は、シリアル制御回路12から供給されたIO制御信号に基づきデータの入出力方向が制御される。外部装置に対してデータを送信する場合、IOバッファ13は、シフトレジスタ11から供給された出力データ(シリアルデータ)を入出力データとして出力する。また、外部装置からデータを受信する場合、IOバッファ13は、外部装置から供給された入出力データを入力データ(シリアルデータ)としてシフトレジスタ11に供給する。   The IO buffer 13 controls the data input / output direction based on the IO control signal supplied from the serial control circuit 12. When transmitting data to an external device, the IO buffer 13 outputs the output data (serial data) supplied from the shift register 11 as input / output data. When receiving data from an external device, the IO buffer 13 supplies input / output data supplied from the external device to the shift register 11 as input data (serial data).

回路番号クランプ論理部14は、シリアル送受信回路10に固有な番号が予め設定され、この固有な番号を示す回路番号クランプ信号を生成し、シリアル制御回路12に供給する。   The circuit number clamp logic unit 14 is preset with a number unique to the serial transmission / reception circuit 10, generates a circuit number clamp signal indicating the unique number, and supplies the circuit number clamp signal to the serial control circuit 12.

DMA制御回路20は、図3に示すように、アドレスデコーダ21、ANDゲート22A、・・・、22N及び制御レジスタ23A、・・・、23Nを備える。   As shown in FIG. 3, the DMA control circuit 20 includes an address decoder 21, AND gates 22A,..., 22N and control registers 23A,.

アドレスデコーダ21は、CPU4から供給された、後述する制御レジスタ23A、・・・、23Nのアドレスを示すCPUアドレスをデコードし、ANDゲート22A、・・・、22Nに出力する。   The address decoder 21 decodes a CPU address indicating an address of a later-described control register 23A,..., 23N supplied from the CPU 4 and outputs the decoded CPU address to the AND gates 22A,.

ANDゲート22A、・・・、22Nは、シリアル送受信回路10の数に対応して設けられる。ANDゲート22A、・・・、22Nは、アドレスデコーダ21から供給された出力信号と、CPU4から供給された、後述するCPUデータの書き込みパルスを示すCPU書き込みパルスとの論理積を演算し、CPUアドレスが示すアドレスに該当する制御レジスタ23A、・・・、23Nの書き込み信号を生成する。   AND gates 22A,..., 22N are provided corresponding to the number of serial transmission / reception circuits 10. The AND gates 22A,..., 22N calculate the logical product of the output signal supplied from the address decoder 21 and the CPU write pulse supplied from the CPU 4 and indicating a CPU data write pulse to be described later. , 23N is generated corresponding to the address indicated by.

制御レジスタ23A、・・・、23Nは、シリアル送受信回路10の数に対応して設けられる。制御レジスタ23A、・・・、23Nは、CPU4からの書き込みデータを示すCPUデータと、ANDゲート22A、・・・、22Nから供給された書き込み信号とに基づき、転送有効フラグ、送受信モード及び転送サイズに関する情報を含む制御情報を保持し、この制御情報を含む転送制御信号を、対応するシリアル送受信回路10に対して供給する。   The control registers 23A,..., 23N are provided corresponding to the number of serial transmission / reception circuits 10. The control registers 23A,..., 23N are based on CPU data indicating write data from the CPU 4 and write signals supplied from the AND gates 22A,. The control information including the information regarding is held, and the transfer control signal including the control information is supplied to the corresponding serial transmission / reception circuit 10.

メモリ制御回路30は、図4に示すように、セレクタ31a〜31d、アドレスレジスタ32a、Readレジスタ32b、Writeレジスタ32c、Writeイネーブルレジスタ32d、Readイネーブルレジスタ32e、バッファ33A〜33C、バッファ34A及び34Bを備える。   As shown in FIG. 4, the memory control circuit 30 includes selectors 31a to 31d, an address register 32a, a read register 32b, a write register 32c, a write enable register 32d, a read enable register 32e, buffers 33A to 33C, and buffers 34A and 34B. Prepare.

セレクタ31aは、各シリアル送受信回路10から供給された各々のメモリアドレス信号から所定のメモリアドレス信号を選択し、アドレスレジスタ32aに供給する。セレクタ31bは、各シリアル送受信回路10から供給された各々のWriteデータから所定のWriteデータを選択し、Writeレジスタ32cに供給する。   The selector 31a selects a predetermined memory address signal from each memory address signal supplied from each serial transmission / reception circuit 10, and supplies it to the address register 32a. The selector 31b selects predetermined write data from each write data supplied from each serial transmission / reception circuit 10, and supplies it to the write register 32c.

セレクタ31cは、各シリアル送受信回路10から供給された各々のWriteリクエスト信号から所定のWriteリクエスト信号を選択し、Writeイネーブルレジスタ32dに供給する。セレクタ31dは、各シリアル送受信回路10から供給された各々のReadリクエスト信号から所定のReadリクエスト信号を選択し、Readイネーブルレジスタ32eに供給する。   The selector 31c selects a predetermined write request signal from each write request signal supplied from each serial transmission / reception circuit 10, and supplies it to the write enable register 32d. The selector 31d selects a predetermined Read request signal from each Read request signal supplied from each serial transmission / reception circuit 10, and supplies it to the Read enable register 32e.

アドレスレジスタ32aは、セレクタ31aから供給されたメモリアドレス信号が示す、共有メモリ3にアクセスするためのアドレスを保持し、保持されたアドレスをバッファ33Aを介して共有メモリ3に供給する。Readレジスタ32bは、バッファ33Bを介して共有メモリ3から供給されたReadデータを保持し、後述するReadイネーブル信号を出力したシリアル送受信回路10に対して供給する。Writeレジスタ32cは、セレクタ31bから供給され、共有メモリ3に書き込むためのWriteデータを保持し、保持されたWriteデータをバッファ33Cを介して共有メモリ3に供給する。   The address register 32a holds an address for accessing the shared memory 3 indicated by the memory address signal supplied from the selector 31a, and supplies the held address to the shared memory 3 via the buffer 33A. The Read register 32b holds the Read data supplied from the shared memory 3 via the buffer 33B, and supplies it to the serial transmission / reception circuit 10 that outputs a Read enable signal described later. The write register 32c is supplied from the selector 31b, holds write data for writing to the shared memory 3, and supplies the held write data to the shared memory 3 via the buffer 33C.

Writeイネーブルレジスタ32dは、セレクタ31cから供給されたWriteリクエスト信号を、共有メモリ3にアクセスするためのWriteイネーブル信号として保持し、保持されたWriteイネーブル信号をバッファ34Aを介して共有メモリ3に供給する。Readイネーブルレジスタ32eは、セレクタ31dから供給されたReadリクエスト信号を、共有メモリ3にアクセスするためのReadイネーブル信号として保持し、保持されたReadイネーブル信号をバッファ34Bを介して共有メモリ3に供給する。   The write enable register 32d holds the write request signal supplied from the selector 31c as a write enable signal for accessing the shared memory 3, and supplies the held write enable signal to the shared memory 3 via the buffer 34A. . The Read enable register 32e holds the Read request signal supplied from the selector 31d as a Read enable signal for accessing the shared memory 3, and supplies the held Read enable signal to the shared memory 3 via the buffer 34B. .

次に、上記構成を有するシリアル転送装置1の動作について説明する。まず、シリアル転送装置1全体の概略的な動作について、図1を参照して説明する。シリアル転送装置1において、CPU4がDMA制御回路20に対してデータの送信要求を行うと、各シリアル送受信回路10は、メモリ制御回路30を介して共有メモリ3にアクセスし、パラレルデータを読み出す。
そして、シリアル送受信回路10は、読み出したパラレルデータをシリアルデータに変換し、接続された外部装置に対して送信する。
Next, the operation of the serial transfer device 1 having the above configuration will be described. First, a schematic operation of the entire serial transfer device 1 will be described with reference to FIG. In the serial transfer device 1, when the CPU 4 makes a data transmission request to the DMA control circuit 20, each serial transmission / reception circuit 10 accesses the shared memory 3 via the memory control circuit 30 and reads parallel data.
The serial transmission / reception circuit 10 converts the read parallel data into serial data and transmits the serial data to the connected external device.

また、CPU4がDMA制御回路20に対してデータの受信要求を行うと、各シリアル送受信回路10は、外部装置からシリアルデータを受信し、パラレルデータに変換する。そして、シリアル送受信回路10は、変換されたパラレルデータを、メモリ制御回路30を介して共有メモリ3に書き込む。   When the CPU 4 requests the DMA control circuit 20 to receive data, each serial transmission / reception circuit 10 receives serial data from an external device and converts it into parallel data. Then, the serial transmission / reception circuit 10 writes the converted parallel data into the shared memory 3 via the memory control circuit 30.

このとき、各シリアル送受信回路10におけるシリアルデータの送信及び受信タイミングは、循環カウンタ40から出力される循環カウンタ信号が示す値によって制御され、循環カウンタ値に対応するシリアル送受信回路10は、シリアルデータの送信及び受信を開始する。   At this time, the transmission / reception timing of serial data in each serial transmission / reception circuit 10 is controlled by the value indicated by the circulation counter signal output from the circulation counter 40. The serial transmission / reception circuit 10 corresponding to the circulation counter value Start transmission and reception.

次に、DMA制御回路20の動作について、図1及び図3を参照して説明する。図1に示すように、データ送信時において、CPUバス6を介してCPU4からのシリアルデータの送信を開始させるコマンド(図3のCPUデータ、CPU書き込みパルス及びCPUアドレス)がDMA制御回路20に供給されると、DMA制御回路20は、アドレスデコーダ21によりCPUアドレスをデコードする。そして、ANDゲート22A、・・・、22NによりCPU書き込みパルスに同期して、データ送信を行うシリアル送受信回路10に対応する制御レジスタ23A、・・・、23NにCPUデータを書き込む。   Next, the operation of the DMA control circuit 20 will be described with reference to FIGS. As shown in FIG. 1, during data transmission, a command (CPU data, CPU write pulse and CPU address in FIG. 3) for starting transmission of serial data from the CPU 4 is supplied to the DMA control circuit 20 via the CPU bus 6. Then, the DMA control circuit 20 decodes the CPU address by the address decoder 21. Then, the CPU data is written to the control registers 23A,..., 23N corresponding to the serial transmission / reception circuit 10 that performs data transmission in synchronization with the CPU write pulse by the AND gates 22A,.

制御レジスタ23A、・・・、23Nは、転送有効フラグ、送受信モード及び転送するデータサイズを示す転送サイズに関する情報を含む制御情報を保持する。保持された制御情報は、転送制御信号としてシリアル送受信回路10に供給される。   The control registers 23A,..., 23N hold control information including information relating to a transfer valid flag, a transmission / reception mode, and a transfer size indicating a data size to be transferred. The held control information is supplied to the serial transmission / reception circuit 10 as a transfer control signal.

次に、メモリ制御回路30の動作について、図1、図4及び図5を参照して説明する。シリアル送受信回路10から共有メモリ3に対する書き込み要求であるWriteリクエスト信号が供給された場合、メモリ制御回路30は、書き込み要求を出力したシリアル送受信回路10から供給されたメモリアドレス信号をセレクタ31aで選択し、アドレスレジスタ32aにロードする。また、メモリ制御回路30は、書き込み要求を出力したシリアル送受信回路10から供給されたWriteデータをセレクタ31bで選択し、Writeレジスタ32cにロードする。さらに、メモリ制御回路30は、シリアル送受信回路10から供給されたWriteリクエスト信号に対してセレクタ31cで論理和を演算し、Writeイネーブルレジスタ32dにロードする。   Next, the operation of the memory control circuit 30 will be described with reference to FIG. 1, FIG. 4, and FIG. When a write request signal that is a write request to the shared memory 3 is supplied from the serial transmission / reception circuit 10, the memory control circuit 30 selects the memory address signal supplied from the serial transmission / reception circuit 10 that has output the write request by the selector 31a. The address register 32a is loaded. Further, the memory control circuit 30 selects the write data supplied from the serial transmission / reception circuit 10 that has output the write request by the selector 31b, and loads the write data into the write register 32c. Further, the memory control circuit 30 calculates a logical sum of the write request signal supplied from the serial transmission / reception circuit 10 by the selector 31c and loads the logical sum into the write enable register 32d.

そして、メモリ制御回路30は、Writeイネーブルレジスタ32dから出力されるWriteイネーブル信号をアサートし、共有メモリ3におけるアドレスレジスタ32aから出力されるアドレスに対して、Writeレジスタ32cから出力されるWriteデータを書き込む。   Then, the memory control circuit 30 asserts the write enable signal output from the write enable register 32d, and writes the write data output from the write register 32c to the address output from the address register 32a in the shared memory 3. .

一方、シリアル送受信回路10から共有メモリ3に対する読み出し要求であるReadリクエスト信号が供給された場合、メモリ制御回路30は、読み出し要求を出力したシリアル送受信回路10から供給されたメモリアドレス信号をセレクタ31aで選択し、アドレスレジスタ32aにロードする。また、メモリ制御回路30は、シリアル送受信回路10から供給されたReadリクエスト信号に対してセレクタ31dで論理和を演算し、Readイネーブルレジスタ32eにロードする。   On the other hand, when a Read request signal that is a read request to the shared memory 3 is supplied from the serial transmission / reception circuit 10, the memory control circuit 30 uses the selector 31a to receive the memory address signal supplied from the serial transmission / reception circuit 10 that has output the read request. Select and load into address register 32a. Further, the memory control circuit 30 calculates a logical sum with the selector 31d with respect to the Read request signal supplied from the serial transmission / reception circuit 10, and loads it into the Read enable register 32e.

そして、メモリ制御回路30は、Readイネーブルレジスタ32eから出力されるReadイネーブル信号をアサートし、共有メモリ3におけるアドレスレジスタ32aから出力されるアドレスからReadデータを読み出してReadレジスタ32bにロードし、要求元のシリアル送受信回路10に対してReadデータを供給する。   Then, the memory control circuit 30 asserts the Read enable signal output from the Read enable register 32e, reads the Read data from the address output from the address register 32a in the shared memory 3, and loads it into the Read register 32b. Read data is supplied to the serial transmission / reception circuit 10.

図5は、メモリ制御回路30が共有メモリ3に対してアクセスを行うタイミングを示すタイミングチャートを示す。「シリアルCLK」は、シリアル転送を行う際に用いられるクロックである。「MEM CLK」は、メモリ制御回路30のクロックであり、シリアルCLKよりも高速となるように設定され、この例においては、シリアルCLKの周波数に対して2倍の周波数に設定される。   FIG. 5 is a timing chart showing the timing at which the memory control circuit 30 accesses the shared memory 3. “Serial CLK” is a clock used for serial transfer. “MEM CLK” is a clock of the memory control circuit 30 and is set to be faster than the serial CLK. In this example, the frequency is set to twice the frequency of the serial CLK.

「MEMアドレス」は、アドレスレジスタ32aにロードされたアドレスの種類を示す。この例においては、「Writeアドレス」が書き込みアドレスを示し、「Readアドレス」が読み出しアドレスを示す。   “MEM address” indicates the type of address loaded in the address register 32a. In this example, “Write address” indicates a write address, and “Read address” indicates a read address.

「MEM Readイネーブル」は、共有メモリ3に対する読み出しが有効であるか否かを示す信号であり、この信号の立ち下がりから立ち上がりまでが有効であることを示す。「MEM Writeイネーブル」は、共有メモリ3に対する書き込みが有効であるか否かを示す信号であり、この信号の立ち下がりから立ち上がりまでが有効であることを示す。「MEM Readデータ」は、共有メモリ3からデータを読み出すタイミングを示し、「MEM Writeデータ」は、共有メモリ3からデータを読み出すタイミングを示す。   “MEM Read enable” is a signal indicating whether or not reading to the shared memory 3 is valid, and indicates that this signal is valid from the falling edge to the rising edge. “MEM Write Enable” is a signal indicating whether or not writing to the shared memory 3 is valid, and indicates that this signal is valid from the falling edge to the rising edge. “MEM Read data” indicates the timing for reading data from the shared memory 3, and “MEM Write data” indicates the timing for reading data from the shared memory 3.

すなわち、この例においては、書き込み又は読み出しが有効であるタイミングがシリアルCLKの波形に同期しており、タイミングT1からT3までの期間が共有メモリ3に対してデータを書き込むタイミングとなり、タイミングT3からT5までの期間が共有メモリ3からデータを読み出すタイミングとなる。   That is, in this example, the timing at which writing or reading is valid is synchronized with the waveform of the serial CLK, and the period from timing T1 to T3 is the timing for writing data to the shared memory 3, and from timing T3 to T5 The period until is the timing for reading data from the shared memory 3.

尚、シリアル転送装置1全体を動作させるためのシステムクロックは、シリアルCLKとは異なる信号であり、特に図示されていないが、システムクロック及びシリアルCLKに同一の信号を用いてもよい。   Note that the system clock for operating the entire serial transfer device 1 is a signal different from the serial CLK, and although not particularly shown, the same signal may be used for the system clock and the serial CLK.

次に、シリアル送受信回路10における送信及び受信動作について、図6に示すフローチャートを参照して説明する。尚、以下では、説明を容易とするため、複数のシリアル送受信回路10A、10B、10C、・・・10Nのうちいずれか1つのシリアル送受信回路10で送信及び受信動作を行う場合を例にとって説明する。   Next, transmission and reception operations in the serial transmission / reception circuit 10 will be described with reference to a flowchart shown in FIG. In the following, for ease of explanation, a case where transmission and reception operations are performed by any one of the plurality of serial transmission / reception circuits 10A, 10B, 10C,. .

まず、メモリ制御回路30から供給される転送制御信号に含まれる転送有効フラグの値に基づき、データを転送するか否かが判断される(ステップS1)。転送有効フラグは、データの転送が行われる場合に値が「1」となる情報である。有効フラグの値が「1」である場合(ステップS1:Yes)には、処理がステップS2に移行する。一方、有効フラグの値が「1」以外である場合(ステップS1:No)には、処理がステップS1に戻り、再度、有効フラグの値に基づいてデータ転送の有無が判断される。   First, based on the value of the transfer valid flag included in the transfer control signal supplied from the memory control circuit 30, it is determined whether or not to transfer data (step S1). The transfer valid flag is information whose value is “1” when data transfer is performed. If the value of the valid flag is “1” (step S1: Yes), the process proceeds to step S2. On the other hand, when the value of the valid flag is other than “1” (step S1: No), the process returns to step S1, and the presence / absence of data transfer is determined again based on the value of the valid flag.

次に、ステップS2において、転送制御信号に含まれる送受信モードを示す情報に基づき、動作モードが送信モードであるか、又は受信モードであるかが判断される。動作モードが「送信モード」である場合(ステップS2:送信)には、処理がステップS3に移行し、循環カウンタ40から供給される循環カウンタ信号と、回路番号クランプ論理部14から供給される回路番号クランプ信号とに基づき、2つの信号が一致するか否かが判断される(ステップS3)。   Next, in step S2, it is determined whether the operation mode is the transmission mode or the reception mode based on the information indicating the transmission / reception mode included in the transfer control signal. When the operation mode is “transmission mode” (step S2: transmission), the process proceeds to step S3, where the circulation counter signal supplied from the circulation counter 40 and the circuit supplied from the circuit number clamp logic unit 14 are processed. Based on the number clamp signal, it is determined whether or not the two signals match (step S3).

循環カウンタ信号及び回路番号クランプ信号が一致すると判断された場合(ステップS3:Yes)には、処理がステップS4に移行し、一致しないと判断された場合(ステップS3:No)には、再度、循環カウンタ信号及び回路番号クランプ信号が一致するか否かが判断される。   When it is determined that the circulation counter signal and the circuit number clamp signal match (step S3: Yes), the process proceeds to step S4. When it is determined that they do not match (step S3: No), again, It is determined whether or not the circulation counter signal and the circuit number clamp signal match.

ステップS4では、図2のシリアル制御回路12によってReadリクエスト信号がアサートされると共に、メモリアドレス信号が出力される。そして、データLoad信号がアサートされ、シフトレジスタ11にReadデータ(パラレルデータ)における1ワード分がロードされる。   In step S4, the read request signal is asserted and the memory address signal is output by the serial control circuit 12 of FIG. Then, the data load signal is asserted, and the shift register 11 is loaded with one word in the read data (parallel data).

ステップS5では、シリアル制御回路12によってデータShift信号がアサートされ、シフトレジスタ11が1ビットだけシフトされて出力データ(シリアルデータ)として出力される。このとき、シリアル制御回路12からIOバッファ13に対してIO制御信号が供給され、IOバッファ13は、シフトレジスタ11からの出力データを外部装置に対して送信する。また、シリアル制御回路12によって外部装置に対するイネーブル信号がアサートされ、出力モードを示す入出力モード信号及び転送CLK信号と共に外部装置に対して送信される。   In step S5, the data shift signal is asserted by the serial control circuit 12, and the shift register 11 is shifted by 1 bit and output as output data (serial data). At this time, an IO control signal is supplied from the serial control circuit 12 to the IO buffer 13, and the IO buffer 13 transmits output data from the shift register 11 to the external device. Also, an enable signal for the external device is asserted by the serial control circuit 12 and transmitted to the external device together with the input / output mode signal indicating the output mode and the transfer CLK signal.

次に、シフトレジスタ11にロードされたReadデータにおける1ワードの最後の1ビットが出力されたか否かが判断される(ステップS6)。最後の1ビットが出力されていないと判断された場合(ステップS6:No)には、処理がステップS5に戻り、次の1ビットが出力され、以降、最後の1ビットが出力されるまで順次ステップS5の処理が行われる。   Next, it is determined whether or not the last 1 bit of one word in the Read data loaded in the shift register 11 has been output (step S6). If it is determined that the last 1 bit has not been output (step S6: No), the process returns to step S5, the next 1 bit is output, and thereafter, until the last 1 bit is output. The process of step S5 is performed.

一方、最後の1ビットが出力されたと判断された場合(ステップS6:Yes)には、処理がステップS7に移行し、メモリ制御回路30から供給される転送制御信号に含まれる転送サイズを示す情報と、実際に転送したデータ数とに基づき、転送サイズ分のデータ転送が終了したか否かが判断される(ステップS7)。転送サイズと転送データ数とが一致したと判断された場合(ステップS7:Yes)には、一連の処理が終了する。   On the other hand, when it is determined that the last one bit has been output (step S6: Yes), the process proceeds to step S7, and information indicating the transfer size included in the transfer control signal supplied from the memory control circuit 30 Whether or not the data transfer for the transfer size has been completed is determined based on the actual number of transferred data (step S7). When it is determined that the transfer size matches the number of transfer data (step S7: Yes), a series of processing ends.

また、転送サイズよりも転送データ数が少なく、転送サイズと転送データ数とが一致しないと判断された場合(ステップS7:No)には、処理がステップS4に戻り、共有メモリ3からReadデータにおける次の1ワード分のデータがロードされる。   If it is determined that the transfer data number is smaller than the transfer size and the transfer size and the transfer data number do not match (step S7: No), the process returns to step S4, and the read data from the shared memory 3 is read. The next one word of data is loaded.

一方、ステップS2において、動作モードが「受信モード」である場合(ステップS2:受信)には、処理がステップS8に移行し、循環カウンタ40から供給される循環カウンタ信号と、回路番号クランプ論理部14から供給される回路番号クランプ信号とに基づき、2つの信号が一致するか否かが判断される(ステップS8)。   On the other hand, when the operation mode is “reception mode” in step S2 (step S2: reception), the process proceeds to step S8, where the circulation counter signal supplied from the circulation counter 40 and the circuit number clamp logic unit Whether the two signals match is determined based on the circuit number clamp signal supplied from 14 (step S8).

循環カウンタ信号及び回路番号クランプ信号が一致すると判断された場合(ステップS8:Yes)には、処理がステップS9に移行し、一致しないと判断された場合(ステップS8:No)には、再度、循環カウンタ信号及び回路番号クランプ信号が一致するか否かが判断される。   When it is determined that the circulation counter signal and the circuit number clamp signal match (step S8: Yes), the process proceeds to step S9, and when it is determined that they do not match (step S8: No), again, It is determined whether or not the circulation counter signal and the circuit number clamp signal match.

ステップS9では、図2のシリアル制御回路12によって外部装置に対するイネーブル信号がアサートされ、入力モードを示す入出力モード信号及び転送CLK信号と共に外部装置に対して送信される。また、シリアル制御回路12からIOバッファ13に対してIO制御信号が供給され、IOバッファ13は、外部装置からの入力データ(シリアルデータ)をシフトレジスタ11に対して供給する。そして、シリアル制御回路12によってデータShift信号がアサートされ、シフトレジスタ11が1ビットだけシフトされて入力データ(シリアルデータ)が入力される。   In step S9, the enable signal for the external device is asserted by the serial control circuit 12 of FIG. 2, and is transmitted to the external device together with the input / output mode signal indicating the input mode and the transfer CLK signal. Also, an IO control signal is supplied from the serial control circuit 12 to the IO buffer 13, and the IO buffer 13 supplies input data (serial data) from an external device to the shift register 11. The data shift signal is asserted by the serial control circuit 12, the shift register 11 is shifted by 1 bit, and input data (serial data) is input.

次に、ステップS10において、1ワード分の入力データの転送が終了したか否かが判断される。1ワード分のデータ転送が終了したと判断された場合(ステップS10:Yes)には、処理がステップS11に移行し、シリアル制御回路12によりWriteリクエスト信号がアサートされると共にメモリアドレス信号が出力され、シフトレジスタ11からWriteデータ(パラレルデータ)が出力される。   Next, in step S10, it is determined whether or not the transfer of input data for one word has been completed. If it is determined that the data transfer for one word has been completed (step S10: Yes), the process proceeds to step S11, the write request signal is asserted by the serial control circuit 12, and the memory address signal is output. Write data (parallel data) is output from the shift register 11.

一方、ステップS10において、1ワード分のデータ転送が終了していないと判断された場合(ステップS10:No)には、処理がステップS9に戻り、次の1ビットが入力される。   On the other hand, if it is determined in step S10 that the data transfer for one word has not been completed (step S10: No), the process returns to step S9, and the next 1 bit is input.

次に、メモリ制御回路30から供給される転送制御信号に含まれる転送サイズを示す情報と、実際に転送したデータ数とに基づき、転送サイズ分のデータ転送が終了したか否かが判断される(ステップS12)。転送サイズと転送データ数とが一致したと判断された場合(ステップS12:Yes)には、一連の処理が終了する。一方、転送サイズよりも転送データ数が少なく、転送サイズと転送データ数とが一致しないと判断された場合(ステップS12:No)には、処理がステップS9に戻る。   Next, based on the information indicating the transfer size included in the transfer control signal supplied from the memory control circuit 30 and the number of actually transferred data, it is determined whether or not the data transfer for the transfer size has been completed. (Step S12). If it is determined that the transfer size matches the number of transfer data (step S12: Yes), a series of processing ends. On the other hand, when it is determined that the number of transfer data is smaller than the transfer size and the transfer size does not match the number of transfer data (step S12: No), the process returns to step S9.

図7は、単体のシリアル送受信回路10においてデータを送信する場合のタイミングチャートの一例を示す。尚、この例では、シリアル送受信回路10の回路番号が「1」であり、2ワード分のデータを送信する場合について説明する。   FIG. 7 shows an example of a timing chart when data is transmitted in the single serial transmission / reception circuit 10. In this example, a case where the circuit number of the serial transmission / reception circuit 10 is “1” and data of two words is transmitted will be described.

この例では、図6のステップS3に示す循環カウンタ判別処理について、循環カウンタ40から出力される循環カウンタ信号の値と、回路番号クランプ論理部14から出力される回路番号クランプ信号の値とがタイミングT2で一致するため、次のタイミングT3で、ステップS4による共有メモリ3からの1ワード分のデータ読み出し処理が行われる。   In this example, the value of the circulation counter signal output from the circulation counter 40 and the value of the circuit number clamp signal output from the circuit number clamp logic unit 14 are timings for the circulation counter determination process shown in step S3 of FIG. Since they match at T2, at the next timing T3, data reading processing for one word from the shared memory 3 in step S4 is performed.

そして、次のタイミングT4〜T19で、読み出された1ワード分のデータに基づくシリアルデータD0〜D7が出力される。このとき、ステップS6による最後の1ビット判別処理、並びにデータサイズ分の転送終了判別処理は、タイミングT17で行われる。この例では、2ワード分のデータを送信し、この時点では、2ワード目のデータの送信が行われていないため、処理がステップS4に戻る。   At the next timings T4 to T19, serial data D0 to D7 based on the read data for one word are output. At this time, the final 1-bit determination process in step S6 and the transfer end determination process for the data size are performed at timing T17. In this example, data for two words is transmitted, and at this point in time, data for the second word is not transmitted, so the process returns to step S4.

そして、タイミングT19で、次の2ワード目のデータ読み出し処理が行われ、タイミングT20〜T35で、読み出された2ワード目のデータに基づくシリアルデータD8〜D15が出力される。このとき、ステップS6による最後の1ビット判別処理、並びにデータサイズ分の転送終了判別処理は、タイミングT33で行われる。この例では、この時点で2ワード分のデータ送信が行われたため、タイミングT36で、一連の処理が終了する。   Then, at the timing T19, the data reading process for the next second word is performed, and at the timings T20 to T35, serial data D8 to D15 based on the read second word data are output. At this time, the final 1-bit determination process in step S6 and the transfer end determination process for the data size are performed at timing T33. In this example, since data transmission for two words has been performed at this time, a series of processing ends at timing T36.

図8は、単体のシリアル送受信回路10においてデータを受信する場合のタイミングチャートの一例を示す。この例では、図6のステップS8に示す循環カウンタ判別処理について、循環カウンタ40から出力される循環カウンタ信号の値と、回路番号クランプ論理部14から出力される回路番号クランプ信号の値とがタイミングT2で一致するため、タイミングT4〜T19で、ステップS9によるシリアルデータD0〜D7の入力処理が行われる。   FIG. 8 shows an example of a timing chart when data is received by a single serial transmission / reception circuit 10. In this example, the value of the circulation counter signal output from the circulation counter 40 and the value of the circuit number clamp signal output from the circuit number clamp logic unit 14 are timings for the circulation counter determination process shown in step S8 of FIG. Since they coincide at T2, the input processing of the serial data D0 to D7 in step S9 is performed at timings T4 to T19.

このとき、1ワード転送の終了処理がタイミングT19で行われ、ステップS11によるシリアルデータから変換された1ワード分のパラレルデータの共有メモリ3に対する書き込み処理が行われると共に、ステップS12によるデータサイズ分の転送終了判別処理が行われる。この例では、2ワード分のデータを受信し、この時点では、2ワード目のデータの受信が行われていないため、処理がステップS9に戻る。   At this time, the end processing of one word transfer is performed at timing T19, the writing processing of the parallel data for one word converted from the serial data in step S11 to the shared memory 3 is performed, and the data size corresponding to the data size in step S12 is performed. A transfer end determination process is performed. In this example, data for two words is received, and at this time, data for the second word has not been received, so the process returns to step S9.

そして、タイミングT20〜T35で、次の2ワード目のデータに対応するシリアルデータD8〜D15の入力処理が行われる。1ワード転送の終了処理がタイミングT35で行われ、シリアルデータから変換された1ワード分のパラレルデータの共有メモリ3に対する書き込み処理が行われると共に、データサイズ分の転送終了判別処理が行われる。この例では、この時点で2ワード分のデータ受信が行われたため、タイミングT36で、一連の処理が終了する。   Then, at timings T20 to T35, input processing of serial data D8 to D15 corresponding to the next second word data is performed. A one-word transfer end process is performed at timing T35, a one-word parallel data converted from serial data is written to the shared memory 3, and a transfer end determination process for the data size is performed. In this example, since data reception for two words has been performed at this time, a series of processing ends at timing T36.

次に、すべてのシリアル送受信回路10がデータの送受信を行う場合について説明する。以下では、6台のシリアル送受信回路10A〜10Fを用いてデータの送受信を行う場合を例にとり、各々のシリアル送受信回路10A〜10Fにおける回路番号を「1」〜「6」とした場合について説明する。   Next, a case where all the serial transmission / reception circuits 10 transmit / receive data will be described. Hereinafter, a case where data transmission / reception is performed using six serial transmission / reception circuits 10A to 10F will be described as an example, and a case where the circuit numbers in the serial transmission / reception circuits 10A to 10F are “1” to “6” will be described. .

まず、第1の例として、シリアル送受信回路10A〜10Cが2ワード分のデータを送信し、シリアル送受信回路10D〜10Fが2ワード分のデータを受信する場合について、図9を参照して説明する。   First, as a first example, a case where serial transmission / reception circuits 10A to 10C transmit data for two words and serial transmission / reception circuits 10D to 10F receive data for two words will be described with reference to FIG. .

図9に示すように、循環カウンタ40から出力される循環カウンタ信号の値が「1」となるタイミングT2で、シリアル送受信回路10Aが動作を開始する。そして、シリアル送受信回路10Aは、タイミングT3で、共有メモリ3からの1ワード分のパラレルデータを読み出し、タイミングT4〜T19で、読み出したパラレルデータを変換したシリアルデータD0〜D7を送信する。   As illustrated in FIG. 9, the serial transmission / reception circuit 10 </ b> A starts operating at a timing T <b> 2 when the value of the circulation counter signal output from the circulation counter 40 becomes “1”. Then, the serial transmission / reception circuit 10A reads parallel data for one word from the shared memory 3 at timing T3, and transmits serial data D0 to D7 obtained by converting the read parallel data at timings T4 to T19.

ここで、タイミングT18は、1ワード分のシリアルデータを送信する場合における最後の1ビットを送信するタイミングであり、この例では、2ワード分のデータを転送する。そのため、シリアル送受信回路10Aは、次のタイミングT19で再度共有メモリ3に対してアクセスし、次の1ワード分のパラレルデータを読み出し、タイミングT20〜T35で、読み出したパラレルデータを変換したシリアルデータD8〜D15を送信する。   Here, the timing T18 is a timing for transmitting the last one bit when transmitting serial data for one word. In this example, data for two words is transferred. Therefore, the serial transmission / reception circuit 10A accesses the shared memory 3 again at the next timing T19, reads the next one word of parallel data, and converts the read parallel data at the timing T20 to T35. -D15 is transmitted.

このとき、タイミングT34は、2ワード目のシリアルデータにおける最後の1ビットを送信するタイミングであるため、シリアル送受信回路10Aは、タイミングT36でデータ転送を終了する。   At this time, since the timing T34 is a timing for transmitting the last one bit of the serial data of the second word, the serial transmission / reception circuit 10A ends the data transfer at the timing T36.

また、循環カウンタ信号の値が「2」となるタイミングT4で、シリアル送受信回路10Bが動作を開始し、シリアル送受信回路10Aと同様に、タイミングT5で共有メモリ3からの1ワード分のパラレルデータを読み出し、タイミングT6〜T21でシリアルデータD0〜D7を送信する。   Further, the serial transmission / reception circuit 10B starts operation at timing T4 when the value of the circulation counter signal becomes “2”, and parallel data for one word from the shared memory 3 is received at timing T5 in the same manner as the serial transmission / reception circuit 10A. Read, serial data D0 to D7 are transmitted at timings T6 to T21.

ここで、タイミングT20は、1ワード分のシリアルデータを送信する場合における最後の1ビットを送信するタイミングであり、この例では、2ワード分のデータを転送する。そのため、シリアル送受信回路10Bは、次のタイミングT21で再度共有メモリ3に対してアクセスして次の1ワード分のパラレルデータを読み出し、タイミングT22〜T37でシリアルデータD8〜D15を送信する。   Here, the timing T20 is a timing for transmitting the last one bit when serial data for one word is transmitted. In this example, data for two words is transferred. Therefore, the serial transmission / reception circuit 10B accesses the shared memory 3 again at the next timing T21, reads the parallel data for the next one word, and transmits the serial data D8 to D15 at the timings T22 to T37.

このとき、タイミングT36は、2ワード目のシリアルデータにおける最後の1ビットを送信するタイミングであるため、シリアル送受信回路10Bは、タイミングT38でデータ転送を終了する。   At this time, since the timing T36 is a timing for transmitting the last one bit of the serial data of the second word, the serial transmission / reception circuit 10B ends the data transfer at the timing T38.

さらに、循環カウンタ信号の値が「3」となるタイミングT6で、シリアル送受信回路10Cが動作を開始し、シリアル送受信回路10A及び10Bと同様に、タイミングT7で共有メモリ3からの1ワード分のパラレルデータを読み出し、タイミングT8〜T23でシリアルデータD0〜D7を送信する。   Further, the serial transmission / reception circuit 10C starts operation at timing T6 when the value of the circulation counter signal becomes “3”, and in parallel with the serial transmission / reception circuits 10A and 10B, parallel processing for one word from the shared memory 3 is performed at timing T7. Data is read and serial data D0 to D7 are transmitted at timings T8 to T23.

ここで、タイミングT22は、1ワード分のシリアルデータを送信する場合における最後の1ビットを送信するタイミングであり、この例では、2ワード分のデータを転送する。そのため、シリアル送受信回路10Cは、次のタイミングT23で再度共有メモリ3に対してアクセスして次の1ワード分のパラレルデータを読み出し、タイミングT24〜T39でシリアルデータD8〜D15を送信する。   Here, the timing T22 is a timing for transmitting the last one bit when transmitting serial data for one word, and in this example, data for two words is transferred. Therefore, the serial transmission / reception circuit 10C accesses the shared memory 3 again at the next timing T23, reads the next one word of parallel data, and transmits the serial data D8 to D15 at the timings T24 to T39.

このとき、タイミングT38は、2ワード目のシリアルデータにおける最後の1ビットを送信するタイミングであるため、シリアル送受信回路10Cは、タイミングT40でデータ転送を終了する。   At this time, since the timing T38 is a timing for transmitting the last one bit of the serial data of the second word, the serial transmission / reception circuit 10C ends the data transfer at the timing T40.

一方、循環カウンタ信号の値が「4」となるタイミングT8で、シリアル送受信回路10Dが動作を開始し、タイミングT10〜T25で、シリアルデータD0〜D7を受信する。ここで、タイミングT25は、1ワード分のシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃う。そのため、シリアル送受信回路10Dは、タイミングT26で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込む。   On the other hand, the serial transmission / reception circuit 10D starts operating at timing T8 when the value of the circulation counter signal becomes “4”, and receives serial data D0 to D7 at timings T10 to T25. Here, the timing T25 is a timing for receiving the last one bit in the serial data for one word, and the data for one word is prepared by receiving the last one bit. Therefore, the serial transmission / reception circuit 10D accesses the shared memory 3 at timing T26 and writes parallel data for one word obtained by converting serial data.

さらに、この例では、2ワード分のデータを受信するため、タイミングT26〜T41で、次の2ワード目に対応するシリアルデータD8〜D15を受信する。そして、タイミングT41は、2ワード目に対応するシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃う。そのため、シリアル送受信回路10Dは、タイミングT42で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込み、データ転送を終了する。   Furthermore, in this example, since data for two words is received, serial data D8 to D15 corresponding to the next second word are received at timings T26 to T41. Timing T41 is a timing for receiving the last 1 bit in the serial data corresponding to the second word. By receiving the last 1 bit, data for one word is prepared. Therefore, the serial transmission / reception circuit 10D accesses the shared memory 3 at timing T42, writes parallel data for one word obtained by converting serial data, and ends the data transfer.

また、循環カウンタ信号の値が「5」となるタイミングT10で、シリアル送受信回路10Eが動作を開始し、シリアル送受信回路10Eと同様に、タイミングT12〜T27で、シリアルデータD0〜D7を受信する。ここで、タイミングT27は、1ワード分のシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃う。そのため、シリアル送受信回路10Eは、タイミングT28で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込むと共に、タイミングT28〜T43で、次の2ワード目に対応するシリアルデータD8〜D15を受信する。   Further, the serial transmission / reception circuit 10E starts operation at timing T10 when the value of the circulation counter signal becomes “5”, and serial data D0 to D7 are received at timings T12 to T27, similarly to the serial transmission / reception circuit 10E. Here, the timing T27 is a timing for receiving the last 1 bit in the serial data for one word, and the data for one word is prepared by receiving the last 1 bit. Therefore, the serial transmission / reception circuit 10E accesses the shared memory 3 at the timing T28, writes the parallel data for one word obtained by converting the serial data, and at the timing T28 to T43, the serial corresponding to the next second word. Data D8 to D15 are received.

そして、タイミングT43は、2ワード目に対応するシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃うため、シリアル送受信回路10Eは、タイミングT44で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込み、データ転送を終了する。   The timing T43 is a timing for receiving the last 1 bit in the serial data corresponding to the second word. Since the last 1 bit is received, data for one word is prepared. At time T44, the shared memory 3 is accessed, parallel data for one word converted from serial data is written, and the data transfer is completed.

さらに、循環カウンタ信号の値が「6」となるタイミングT12で、シリアル送受信回路10Fが動作を開始し、シリアル送受信回路10D及び10Eと同様に、タイミングT14〜T29で、シリアルデータD0〜D7を受信する。ここで、タイミングT29は、1ワード分のシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃う。そのため、シリアル送受信回路10Fは、タイミングT30で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込むと共に、タイミングT30〜T45で、次の2ワード目に対応するシリアルデータD8〜D15を受信する。   Further, the serial transmission / reception circuit 10F starts operation at the timing T12 when the value of the circulation counter signal becomes “6”, and receives the serial data D0 to D7 at the timings T14 to T29 similarly to the serial transmission / reception circuits 10D and 10E. To do. Here, the timing T29 is a timing for receiving the last 1 bit in the serial data for 1 word, and the data for 1 word is prepared by receiving the last 1 bit. Therefore, the serial transmission / reception circuit 10F accesses the shared memory 3 at the timing T30, writes parallel data for one word obtained by converting the serial data, and at the timing T30 to T45, the serial corresponding to the next second word. Data D8 to D15 are received.

そして、タイミングT45は、2ワード目に対応するシリアルデータにおける最後の1ビットを受信するタイミングであり、最後の1ビットを受信することにより、1ワード分のデータが揃うため、シリアル送受信回路10Fは、タイミングT46で共有メモリ3に対してアクセスし、シリアルデータを変換した1ワード分のパラレルデータを書き込み、データ転送を終了する。   The timing T45 is a timing for receiving the last 1 bit in the serial data corresponding to the second word. Since the last 1 bit is received, data for one word is prepared. At time T46, the shared memory 3 is accessed, parallel data for one word converted from serial data is written, and the data transfer is completed.

次に、第2の例として、シリアル送受信回路10A、10C及び10Eが2ワード分のデータを送信し、シリアル送受信回路10B、10D及び10Fが2ワード分のデータを受信する場合について、図10を参照して説明する。   Next, as a second example, FIG. 10 shows a case where the serial transmission / reception circuits 10A, 10C, and 10E transmit data for two words and the serial transmission / reception circuits 10B, 10D, and 10F receive data for two words. The description will be given with reference.

第2の例においても、上述した第1の例と同様に、各シリアル送受信回路10においてデータの送受信が行われる。ここで、図10に示すように、シリアル送受信回路10Bは、タイミングT21で1ワード分のデータが揃うため、タイミングT22で共有メモリ3に対してアクセスし、1ワード分のパラレルデータを書き込む。一方、シリアル送受信回路10Cは、タイミングT22で、シリアルデータの最後の1ビットを送信し、次のタイミングT23で共有メモリ3に対してアクセスし、次の2ワード目のデータを読み出す。   Also in the second example, data transmission / reception is performed in each serial transmission / reception circuit 10 as in the first example described above. Here, as shown in FIG. 10, the serial transmission / reception circuit 10B accesses the shared memory 3 and writes parallel data for one word at timing T22 because data for one word is prepared at timing T21. On the other hand, the serial transmission / reception circuit 10C transmits the last one bit of the serial data at timing T22, accesses the shared memory 3 at the next timing T23, and reads the data of the next second word.

このとき、タイミングT22及びT23は、循環カウンタ40のタイミング単位で考えた場合に同一タイミングとなるため、シリアル送受信回路10B及び10Cは、共有メモリ3に対して同時にアクセスすることになるが、タイミングT22では、シリアル送受信回路10Bによる書き込み動作であり、タイミングT23では、シリアル送受信回路10Cによる読み出し動作であるため、共有メモリ3に対する競合は発生しない。   At this time, since the timings T22 and T23 are the same timing when considered in the timing unit of the circulation counter 40, the serial transmission / reception circuits 10B and 10C access the shared memory 3 at the same time. Then, since the write operation is performed by the serial transmission / reception circuit 10B and the read operation is performed by the serial transmission / reception circuit 10C at the timing T23, the contention with the shared memory 3 does not occur.

これは、シリアル送受信回路10Dによる書き込み動作と、シリアル送受信回路10Eによる読み出し動作とによって共有メモリ3に対するアクセスが同時に行われるタイミングT26及びT27の場合も同様である。   The same applies to timings T26 and T27 in which access to the shared memory 3 is simultaneously performed by the write operation by the serial transmission / reception circuit 10D and the read operation by the serial transmission / reception circuit 10E.

次に、第3の例として、シリアル送受信回路10毎に異なる転送サイズのデータの送受信を行う場合について、図11を参照して説明する。この例では、シリアル送受信回路10A〜10Cがデータを送信し、シリアル送受信回路10D〜10Fがデータを受信すると共に、シリアル送受信回路10Bが3ワード分、シリアル送受信回路10Dが4ワード分、それ以外のシリアル送受信回路10A、10C、10E及び10Fが1ワード分のデータ転送を行うものとする。   Next, as a third example, a case where data having a different transfer size is transmitted / received for each serial transmission / reception circuit 10 will be described with reference to FIG. In this example, the serial transmission / reception circuits 10A to 10C transmit data, the serial transmission / reception circuits 10D to 10F receive data, the serial transmission / reception circuit 10B has three words, the serial transmission / reception circuit 10D has four words, and the others. Assume that the serial transmission / reception circuits 10A, 10C, 10E, and 10F transfer data for one word.

この場合、シリアル送受信回路10A〜10Fによるデータの送受信は、上述した第1及び第2の例と同様に行われる。   In this case, data transmission / reception by the serial transmission / reception circuits 10A to 10F is performed in the same manner as in the first and second examples described above.

シリアル送受信回路10Aは、転送終了後、循環カウンタ40からの循環カウンタ値が「1」となるタイミングT35で共有メモリ3に対してアクセスし、タイミングT36でシリアルデータD0〜D7の送信を行う。このとき、シリアル送受信回路10Bは、シリアルデータD0〜D23の送信を継続しているが、共有メモリ3に対するアクセスがタイミングT37で行われるので、シリアル送受信回路10A及び10Bによる共有メモリ3に対するアクセスの競合は発生しない。   After completion of the transfer, the serial transmission / reception circuit 10A accesses the shared memory 3 at the timing T35 when the circulation counter value from the circulation counter 40 becomes “1”, and transmits the serial data D0 to D7 at the timing T36. At this time, the serial transmission / reception circuit 10B continues to transmit the serial data D0 to D23. However, since access to the shared memory 3 is performed at timing T37, contention for access to the shared memory 3 by the serial transmission / reception circuits 10A and 10B. Does not occur.

また、シリアル送受信回路10Eは、転送終了後、循環カウンタ40からの循環カウンタ値が「6」となるタイミングT44からシリアルデータの受信を開始し、タイミングT60でシリアルデータを変換したパラレルデータの共有メモリ3に対する書き込みを行う。このとき、シリアル送受信回路10Dは、データの転送を継続しているが、共有メモリ3に対するアクセスがタイミングT58で行われるので、シリアル送受信回路10D及び10Eによる共有メモリ3に対するアクセスの競合は発生しない。   Further, the serial transmission / reception circuit 10E starts receiving serial data from the timing T44 when the circulation counter value from the circulation counter 40 becomes “6” after the transfer is completed, and the parallel data shared memory obtained by converting the serial data at the timing T60. 3 is written. At this time, the serial transmission / reception circuit 10D continues to transfer data. However, since access to the shared memory 3 is performed at timing T58, there is no contention for access to the shared memory 3 by the serial transmission / reception circuits 10D and 10E.

次に、第3の例における共有メモリ3に対するアクセスについて、図12に示すメモリマップを参照して説明する。尚、図12において、アドレスの数値の直後に記載された「h」は、直前の数値が16進数表記であることを示す。   Next, access to the shared memory 3 in the third example will be described with reference to the memory map shown in FIG. In FIG. 12, “h” described immediately after the numerical value of the address indicates that the numerical value immediately before is in hexadecimal notation.

図12に示すメモリマップにおいて、例えば、シリアル送受信回路10Aは、アドレス「0100h」〜「0200h」を使用し、1ワード分のデータを転送する際のアクセス毎に、アドレスを1だけインクリメントする。   In the memory map shown in FIG. 12, for example, the serial transmission / reception circuit 10A uses addresses “0100h” to “0200h” and increments the address by 1 for each access when transferring data for one word.

同様に、シリアル送受信回路10Bは、アドレス「0200h」〜「0300h」を使用し、シリアル送受信回路10Cは、アドレス「0300h」〜「0400h」を使用する。また、シリアル送受信回路10Dは、アドレス「0400h」〜「0700h」を使用し、シリアル送受信回路10Eは、アドレス「0700h」〜「0800h」を使用する。さらに、シリアル送受信回路10Fは、アドレス「0800h」〜「0900h」を使用する。   Similarly, the serial transmission / reception circuit 10B uses addresses “0200h” to “0300h”, and the serial transmission / reception circuit 10C uses addresses “0300h” to “0400h”. The serial transmission / reception circuit 10D uses addresses “0400h” to “0700h”, and the serial transmission / reception circuit 10E uses addresses “0700h” to “0800h”. Further, the serial transmission / reception circuit 10F uses addresses “0800h” to “0900h”.

ここで、シリアル送受信回路10Dは、転送するデータ量が他のシリアル送受信回路と比較して多いため、メモリ領域を多く確保している。このように、各シリアル送受信回路10によって転送するデータ量に応じて、任意にメモリマップを構成することができる。   Here, the serial transmission / reception circuit 10D has a large memory area because the amount of data to be transferred is larger than that of other serial transmission / reception circuits. Thus, a memory map can be arbitrarily configured according to the amount of data transferred by each serial transmission / reception circuit 10.

以上のように、第1の実施形態によれば、循環カウンタの値に応じて複数のシリアル送受信回路を並列的に動作させるため、データの転送性能を向上させることができる。また、シリアル送受信回路を並列的に動作させる際に、共有メモリに対する書き込み動作と読み出し動作とによる競合を防ぎ、複数のシリアル送受信回路による送受信を任意に設定することができるため、データ転送の際の待ち時間を削減することができ、データの転送性能を向上させることができる。   As described above, according to the first embodiment, since the plurality of serial transmission / reception circuits are operated in parallel according to the value of the circulation counter, the data transfer performance can be improved. In addition, when operating serial transmission / reception circuits in parallel, contention between the write operation and read operation to the shared memory can be prevented, and transmission / reception by a plurality of serial transmission / reception circuits can be arbitrarily set. The waiting time can be reduced, and the data transfer performance can be improved.

さらに、共有メモリに対する競合を防ぐようにするため、従来必要とされた各シリアル送受信回路に設けられたバッファを省略することができる。これにより、装置のハードウェアを削減することができる。さらにまた、循環カウンタに基づき、複数のシリアル送受信回路による送受信動作を制御するため、従来設けられた調停回路を省略することができ、論理回路を簡略化することができる。   Furthermore, in order to prevent contention for the shared memory, the buffer provided in each serial transmission / reception circuit that has been conventionally required can be omitted. Thereby, the hardware of the apparatus can be reduced. Furthermore, since transmission / reception operations by a plurality of serial transmission / reception circuits are controlled based on the circulation counter, the conventionally provided arbitration circuit can be omitted, and the logic circuit can be simplified.

次に、本発明に係るシリアル転送装置の第2の実施形態について説明する。この第2の実施形態によるシリアル転送装置1’では、共有メモリ3をデュアルポートRAMで構成し、2つのメモリバス5A及び5Bでアクセス可能なように構成する。   Next, a second embodiment of the serial transfer device according to the present invention will be described. In the serial transfer device 1 ′ according to the second embodiment, the shared memory 3 is configured by a dual port RAM so that it can be accessed by two memory buses 5 </ b> A and 5 </ b> B.

シリアル転送部2’は、第1の実施形態におけるメモリ制御回路30に代えて、メモリ制御回路30A及び30Bを備え、例えば、複数のシリアル送受信回路10のうち半分ずつを制御する。これにより、共有メモリ3に対して2系統の同時アクセスが許可されるため、2系統によるデータの送受信を同時に行うことができる。   The serial transfer unit 2 ′ includes memory control circuits 30 </ b> A and 30 </ b> B instead of the memory control circuit 30 in the first embodiment, and controls, for example, half of the plurality of serial transmission / reception circuits 10. Thereby, since simultaneous access of two systems to the shared memory 3 is permitted, data transmission / reception by the two systems can be performed simultaneously.

尚、メモリ制御回路30A及び30Bに割り当てるシリアル送受信回路10は、例えば、転送データ長に応じて設定してもよい。具体的には、例えば、メモリ制御回路30Aに対しては、転送データ長が長いシリアル送受信回路10を割り当て、メモリ制御回路30Bに対しては、転送データ長が短いシリアル送受信回路10を割り当てるようにしてもよい。   The serial transmission / reception circuit 10 assigned to the memory control circuits 30A and 30B may be set according to the transfer data length, for example. Specifically, for example, the serial transmission / reception circuit 10 having a long transfer data length is assigned to the memory control circuit 30A, and the serial transmission / reception circuit 10 having a short transfer data length is assigned to the memory control circuit 30B. May be.

また、各シリアル送受信回路10がアクセスする共有メモリ3のアドレスは、互いに排他的であるため、デュアルポートRAMの同一アドレスアクセスのような制限のある動作が行われることはない。   Further, since the addresses of the shared memory 3 accessed by the serial transmission / reception circuits 10 are mutually exclusive, a limited operation such as the same address access of the dual port RAM is not performed.

以上のように、第2の実施形態によれば、2つのメモリ制御回路を設けると共に、共有メモリを2系統のアクセスが可能なようにするため、共有メモリに対する2系統の同時アクセスが可能になる。   As described above, according to the second embodiment, two memory control circuits are provided and the shared memory can be accessed in two systems, so that two systems can access the shared memory simultaneously. .

また、共有メモリに対して2系統の同時アクセスが可能になるため、シリアル送受信回路の数が増加した場合でも、全体としてのデータ転送性能を向上させることができる。具体的には、例えば、最も早いデータ転送開始を0サイクル目とすると、最も遅いデータ転送開始のサイクルを従来の半分に短縮することができる。   In addition, since two systems can simultaneously access the shared memory, the overall data transfer performance can be improved even when the number of serial transmission / reception circuits increases. Specifically, for example, assuming that the earliest data transfer start is the 0th cycle, the latest data transfer start cycle can be shortened to half that of the prior art.

以上、本発明の第1及び第2の実施形態について説明したが、本発明は、上記構成に限定されるものではなく、特許請求の範囲に記載された発明の範囲内で種々の変更が可能である。例えば、共有メモリ3のデータ幅を広くし、1アクセス分のデータを2ワード以上としてもよい。   Although the first and second embodiments of the present invention have been described above, the present invention is not limited to the above-described configuration, and various modifications are possible within the scope of the invention described in the claims. It is. For example, the data width of the shared memory 3 may be widened and the data for one access may be 2 words or more.

1、1’ シリアル転送装置
2、2’ シリアル転送部
3 共有メモリ
4 CPU
5(5A、5B) メモリバス
6 CPUバス
10(10A、10B、10C、10D、10E、10F、・・・、10N) シリアル送受信回路
11 シフトレジスタ
12 シリアル制御回路
13 IOバッファ
14 回路番号クランプ論理部
15(15A、15B、15C) バッファ
20 DMA制御回路
21 アドレスデコーダ
22(22A、・・・、22N) ANDゲート
23(23A、・・・、23N) 制御レジスタ
30(30A、30B) メモリ制御回路
31(31a、31b、31c、31d) セレクタ
32a アドレスレジスタ
32b Readレジスタ
32c Writeレジスタ
32d Writeイネーブルレジスタ
32e Readイネーブルレジスタ
33(33A、33B、33C) バッファ
34(34A、34B) バッファ
40 循環カウンタ
1, 1 'serial transfer device 2, 2' serial transfer unit 3 shared memory 4 CPU
5 (5A, 5B) Memory bus 6 CPU bus 10 (10A, 10B, 10C, 10D, 10E, 10F,..., 10N) Serial transmission / reception circuit 11 Shift register 12 Serial control circuit 13 IO buffer 14 Circuit number clamp logic unit 15 (15A, 15B, 15C) Buffer 20 DMA control circuit 21 Address decoder 22 (22A,..., 22N) AND gate 23 (23A,..., 23N) Control register 30 (30A, 30B) Memory control circuit 31 (31a, 31b, 31c, 31d) Selector 32a Address register 32b Read register 32c Write register 32d Write enable register 32e Read enable register 33 (33A, 33B, 33C) Buffer 34 (34A, 34B) Buffer 4 Circulation counter

Claims (6)

パラレルデータを記憶するランダムアクセス可能な共有メモリと、前記パラレルデータとシリアルデータとの変換を行い、外部装置及び前記共有メモリの間におけるデータの送受信を行うシリアル転送回路と、前記シリアル転送回路によるデータの送受信をDMA転送により行うように制御するDMA転送制御回路とを備えるシリアル転送装置であって、
前記シリアル転送回路は、
前記外部装置に対するシリアルデータの送受信を行う複数のシリアル送受信回路と、
前記複数のシリアル送受信回路による前記共有メモリに対するアクセスを制御するメモリ制御回路と、
所定の同期信号に同期して所定の値を循環的に出力する循環カウンタとを有し、
前記複数のシリアル送受信回路は、前記循環カウンタからの出力値に応じて前記外部装置に対する前記シリアルデータの送受信を行うことを特徴とするシリアル転送装置。
Randomly accessible shared memory for storing parallel data, a serial transfer circuit that converts the parallel data and serial data, and transmits and receives data between the external device and the shared memory, and data by the serial transfer circuit A DMA transfer control circuit for controlling the transmission / reception of data to be performed by DMA transfer,
The serial transfer circuit is
A plurality of serial transmission / reception circuits for transmitting / receiving serial data to / from the external device;
A memory control circuit for controlling access to the shared memory by the plurality of serial transmission / reception circuits;
A circulation counter that cyclically outputs a predetermined value in synchronization with a predetermined synchronization signal;
The serial transfer device, wherein the plurality of serial transmission / reception circuits perform transmission / reception of the serial data to / from the external device in accordance with an output value from the circulation counter.
前記複数のシリアル送受信回路は、予め固有の回路番号が設定され、前記循環カウンタから出力される値と、前記回路番号とが一致した場合に送受信動作を行うことを特徴とする請求項1に記載のシリアル転送装置。   2. The plurality of serial transmission / reception circuits are set with a unique circuit number in advance, and perform a transmission / reception operation when a value output from the circulation counter matches the circuit number. Serial transfer device. 前記DMA転送制御回路は、前記複数のシリアル送受信回路による前記外部装置からのデータの受信動作を、前記循環カウンタの値に応じて前記シリアル送受信回路毎に異なるタイミングで実行させると共に、前記複数のシリアル送受信回路による前記外部装置に対するデータの送信動作を、前記循環カウンタの値に応じて前記シリアル送受信回路毎に異なるタイミングで実行させるように制御することを特徴とする請求項1又は2に記載のシリアル転送装置。   The DMA transfer control circuit performs a data reception operation from the external device by the plurality of serial transmission / reception circuits at different timings for each of the serial transmission / reception circuits according to the value of the circulation counter, and the plurality of serial transmission / reception circuits. 3. The serial according to claim 1, wherein a transmission operation of data to the external device by the transmission / reception circuit is controlled to be executed at a different timing for each serial transmission / reception circuit according to a value of the circulation counter. Transfer device. 前記シリアル転送回路は、前記外部装置から受信したシリアルデータが前記共有メモリのアクセス可能な量に達した時点で、前記共有メモリに対して書き込み動作を行うことを特徴とする請求項1、2又は3に記載のシリアル転送装置。   The serial transfer circuit performs a write operation on the shared memory when serial data received from the external device reaches an accessible amount of the shared memory. 3. The serial transfer device according to 3. 前記シリアル転送回路は、前記外部装置に対して送信するシリアルデータの量が前記共有メモリから読み出した量に達する前に、前記共有メモリからの読み出し動作を行うことを特徴とする請求項1乃至4のいずれかに記載のシリアル転送装置。   5. The serial transfer circuit performs a read operation from the shared memory before an amount of serial data to be transmitted to the external device reaches an amount read from the shared memory. The serial transfer device according to any one of the above. 共有メモリに記憶されたパラレルデータと外部装置に対して送受信するためのシリアルデータとの変換を複数のシリアル送受信回路により行い、外部装置及び前記共有メモリの間におけるデータの送受信をDMA転送を用いて行うシリアル転送方法であって、
所定の同期信号に同期して所定の値を循環的に出力する循環カウンタからの出力値に応じて、該出力値に対応する前記シリアル送受信回路により前記外部装置に対する前記シリアルデータの送受信を行うことを特徴とするシリアル転送方法。
Conversion between parallel data stored in the shared memory and serial data for transmission / reception to / from an external device is performed by a plurality of serial transmission / reception circuits, and data transmission / reception between the external device and the shared memory is performed using DMA transfer. A serial transfer method to perform,
In accordance with an output value from a circulation counter that cyclically outputs a predetermined value in synchronization with a predetermined synchronization signal, the serial transmission / reception circuit corresponding to the output value transmits / receives the serial data to / from the external device. A serial transfer method characterized by the above.
JP2011269757A 2011-12-09 2011-12-09 Serial transfer device and serial transfer method Pending JP2013120587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011269757A JP2013120587A (en) 2011-12-09 2011-12-09 Serial transfer device and serial transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011269757A JP2013120587A (en) 2011-12-09 2011-12-09 Serial transfer device and serial transfer method

Publications (1)

Publication Number Publication Date
JP2013120587A true JP2013120587A (en) 2013-06-17

Family

ID=48773179

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011269757A Pending JP2013120587A (en) 2011-12-09 2011-12-09 Serial transfer device and serial transfer method

Country Status (1)

Country Link
JP (1) JP2013120587A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020187659A (en) * 2019-05-16 2020-11-19 オムロン株式会社 Information processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020187659A (en) * 2019-05-16 2020-11-19 オムロン株式会社 Information processing apparatus
JP7226084B2 (en) 2019-05-16 2023-02-21 オムロン株式会社 Information processing equipment

Similar Documents

Publication Publication Date Title
US4967398A (en) Read/write random access memory with data prefetch
US10657039B2 (en) Control device for a motor vehicle
US9508409B2 (en) Apparatuses and methods for implementing masked write commands
EP3082048B1 (en) Memory configured to provide simultaneous read/write access to multiple banks
KR100631778B1 (en) Data buffer circuit, interface circuit and control method thereof
US9015272B2 (en) Microcomputer
US9798492B2 (en) Semiconductor device including a plurality of function blocks
US20150177816A1 (en) Semiconductor integrated circuit apparatus
US9772957B2 (en) Processor and method for accessing memory
US9767054B2 (en) Data transfer control device and memory-containing device
JP2001118387A (en) Synchronizing type semiconductor memory
US20110314197A1 (en) Data processing system
JP2013120587A (en) Serial transfer device and serial transfer method
KR102206313B1 (en) System interconnect and operating method of system interconnect
JP2006164070A5 (en)
JP2004127305A (en) Memory controller
US8462561B2 (en) System and method for interfacing burst mode devices and page mode devices
US6493775B2 (en) Control for timed access of devices to a system bus
JP6493044B2 (en) Multiprocessor system
US8402233B2 (en) Method and apparatus for high throughput mass storage device interface in a microprocessor for handheld systems
US20120140573A1 (en) Semiconductor memory device and method of operating the same
JP5433156B2 (en) Memory control circuit
US11797462B2 (en) Arithmetic processing device and memory access method
US8462167B2 (en) Memory access control circuit and image processing system
JP6725970B2 (en) Multiprocessor system