JP2007206878A - Clock synchronous serial interface circuit - Google Patents
Clock synchronous serial interface circuit Download PDFInfo
- Publication number
- JP2007206878A JP2007206878A JP2006023476A JP2006023476A JP2007206878A JP 2007206878 A JP2007206878 A JP 2007206878A JP 2006023476 A JP2006023476 A JP 2006023476A JP 2006023476 A JP2006023476 A JP 2006023476A JP 2007206878 A JP2007206878 A JP 2007206878A
- Authority
- JP
- Japan
- Prior art keywords
- serial
- data
- clock
- cpu
- interface circuit
- 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
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Communication Control (AREA)
Abstract
Description
この発明は、マスター装置からスレーブ装置へシリアルクロックを送出し、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するクロック同期式シリアルインターフェイス回路に関する。 The present invention relates to a clock synchronous serial interface circuit which transmits a serial clock from a master device to a slave device and transmits / receives serial data including address information and data information of the slave device by the serial clock.
従来、メモリなどの周辺デバイスをCPUに接続する場合、CPUがマスター装置となり、周辺デバイスがスレーブ装置として動作するシステムが構成される。このようなシステムにおいては、マスター装置が同期のためのシリアルクロックをスレーブ装置に供給するとともに、CPUマスター装置はシリアル信号の送受先となるスレーブ装置をセレクト信号によって選択する(たとえば、下記特許文献1および2参照。)。
Conventionally, when a peripheral device such as a memory is connected to a CPU, a system is configured in which the CPU serves as a master device and the peripheral device operates as a slave device. In such a system, the master device supplies a serial clock for synchronization to the slave device, and the CPU master device selects a slave device to which the serial signal is transmitted and received by a select signal (for example,
たとえば、下記特許文献1にかかるシリアル伝送装置は、スレーブアドレス選択部によって、マスターコントローラからのブロック選択信号に基づいて、第1または第2のスレーブアドレス選択部のいずれかを選択して出力する。そして、比較部によって、スレーブアドレス検出部によって検出されたスレーブアドレスと、スレーブアドレス選択部から供給されたスレーブアドレスを比較し、結果を出力する。
For example, the serial transmission apparatus according to
また、下記特許文献2にかかるクロック同期式シリアルインターフェイス回路は、マスターからスレーブへシリアルクロックを送出する際に、シリアル信号送受の相手となるスレーブを、スレーブセレクト信号によって選択するシステムにおいて、スレーブ側に設けられるクロック同期式シリアルインターフェイス回路である。
In addition, the clock synchronous serial interface circuit according to
具体的には、マスターが送出するシリアルクロックの極性を、スレーブセレクト信号に基づいて自動的に判別するシリアルクロック極性判別回路と、極性判別回路の判別結果に基づいて、マスターから受け取ったシリアルクロックから当該スレーブが必要とする種類のクロックを生成するクロック生成部とを備えている。 Specifically, the serial clock polarity discriminating circuit that automatically discriminates the polarity of the serial clock sent by the master based on the slave select signal and the serial clock received from the master based on the discrimination result of the polarity discriminating circuit A clock generation unit that generates a type of clock required by the slave.
しかしながら、上述した従来技術によれば、1つのスレーブデバイスに対して、複数種類のマスター装置からのアクセスが可能なインターフェイス変換機能を有する構成ではないため、複数種類のマスター装置に対しては、それぞれ固有のインターフェイスを持ち合わせるシリアル伝送装置、ならびにシリアルインターフェイス回路が必要であるという問題点がある。 However, according to the above-described prior art, since it is not a configuration having an interface conversion function that allows access from a plurality of types of master devices to one slave device, There is a problem that a serial transmission device having a unique interface and a serial interface circuit are necessary.
また、スレーブデバイスにおいて、マスターデバイスからの転送データを複数のアドレス空間に同時に書き込む構成を備えていないものがある場合や、マスターデバイスから連続でスレーブデバイスへデータを書き込む際の制御信号の制御をソフトウェアでおこなうなど、システム制御の面で解決すべき問題点がある。 Also, some slave devices do not have a configuration for writing transfer data from the master device to multiple address spaces at the same time, or control the control signal when writing data from the master device to the slave device continuously by software. There are problems to be solved in terms of system control.
この発明は、上述した従来技術による問題点を解消するため、異なる送受信フォーマットを有する複数のマスター装置とのシリアルデータの送受信に、効率的に対応できるクロック同期式シリアルインターフェイス回路を提供することを目的とする。 An object of the present invention is to provide a clock synchronous serial interface circuit that can efficiently cope with serial data transmission / reception with a plurality of master devices having different transmission / reception formats in order to eliminate the above-described problems caused by the prior art. And
上述した課題を解決し、目的を達成するため、請求項1の発明にかかるクロック同期式シリアルインターフェイス回路は、マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、前記シリアルデータのうち所定のビットの状態に基づいて、前記マスター装置から送出される前記シリアルデータの送信フォーマットを判別する判別手段と、前記判別手段によって判別された前記送信フォーマットに合わせて前記シリアルデータを受信する受信手段と、を備えることを特徴とする。
In order to solve the above-described problems and achieve the object, a clock synchronous serial interface circuit according to the invention of
この請求項1の発明によれば、マスター装置の送信フォーマットに合わせてシリアルデータを受信する受信手段を有することによって、1つのスレーブ装置で、複数のマスター装置の送信フォーマットに対応させることが可能となり、システムの拡張性を広げることができる。また、送信フォーマットに合わせて複数のスレーブ装置を揃える必要がなく、システムの運営においてコストダウンを図ることができる。 According to the first aspect of the invention, by having the receiving means for receiving the serial data in accordance with the transmission format of the master device, it becomes possible for one slave device to correspond to the transmission formats of a plurality of master devices. , Can expand the expandability of the system. Further, it is not necessary to prepare a plurality of slave devices according to the transmission format, and the cost can be reduced in the operation of the system.
また、請求項2の発明にかかるクロック同期式シリアルインターフェイス回路は、マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、前記シリアルデータのうち所定のビットの状態に基づいて、前記マスター装置の前記シリアルデータの受信フォーマットを判別する判別手段と、前記判別手段によって判別された前記受信フォーマットに合わせて前記シリアルデータを送信する送信手段と、を備えることを特徴とする。 According to a second aspect of the present invention, a clock synchronous serial interface circuit transmits a serial clock from a master device to a slave device, and transmits and receives serial data including address information and data information of the slave device by the serial clock. A clock-synchronous serial interface circuit provided in the slave device of the system for determining, based on a state of a predetermined bit of the serial data, a determination means for determining a reception format of the serial data of the master device; Transmission means for transmitting the serial data in accordance with the reception format determined by the determination means.
この請求項2の発明によれば、マスター装置の受信フォーマットに合わせてシリアルデータを送信する送信手段を有することによって、1つのスレーブ装置で、複数のマスター装置の受信フォーマットに対応させることが可能となり、システムの拡張性を広げることができる。また、受信フォーマットに合わせて複数のスレーブ装置を揃える必要がなく、システムの運営においてコストダウンを図ることができる。 According to the second aspect of the invention, by having the transmission means for transmitting the serial data in accordance with the reception format of the master device, it becomes possible for one slave device to correspond to the reception formats of a plurality of master devices. , Can expand the expandability of the system. Further, it is not necessary to prepare a plurality of slave devices according to the reception format, and the cost can be reduced in the operation of the system.
また、請求項3の発明にかかるクロック同期式シリアルインターフェイス回路は、請求項2に記載の発明において、前記送信手段は、前記シリアルクロックのうち前記シリアルデータの送信タイミングを示すクロックエッジを選択可能なことを特徴とする。 According to a third aspect of the present invention, there is provided the clock synchronous serial interface circuit according to the second aspect, wherein the transmission means can select a clock edge indicating a transmission timing of the serial data from the serial clock. It is characterized by that.
この請求項3の発明によれば、送信手段でクロックエッジを選択可能なことによって、マスター装置の受信フォーマットに応じた回路を自由に設定でき、システムの拡張性をさらに向上させることができる。 According to the third aspect of the present invention, since the clock edge can be selected by the transmission means, a circuit corresponding to the reception format of the master device can be freely set, and the expandability of the system can be further improved.
また、請求項4の発明にかかるクロック同期式シリアルインターフェイス回路は、マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、前記アドレス情報が前記スレーブ装置のアドレス空間を構成するビット数よりも大きい場合に、剰余となる前記アドレス情報のビットの状態に基づいて、前記スレーブ装置内部の共有アドレスを構成する領域に前記データ情報を同時に書き込む書込手段を備えることを特徴とする。 According to a fourth aspect of the present invention, there is provided a clock synchronous serial interface circuit which transmits a serial clock from a master device to a slave device and transmits / receives serial data including address information and data information of the slave device by the serial clock. A state of a bit of the address information that is a remainder when the address information is larger than the number of bits constituting the address space of the slave device. And writing means for simultaneously writing the data information in an area constituting a shared address in the slave device.
この請求項4の発明によれば、スレーブ装置内部の共有アドレスを構成する領域に、マスター装置からのデータ情報を同時に書き込むことによって、フルカラーの画像データなど、容量が大きいデータを扱う場合においてコマンド設定時間を短縮するなど、データ処置効率を向上させることができる。 According to the fourth aspect of the present invention, command setting is performed when handling large-capacity data, such as full-color image data, by simultaneously writing data information from the master device in the area constituting the shared address in the slave device. Data processing efficiency can be improved, such as shortening time.
また、請求項5の発明にかかるクロック同期式シリアルインターフェイス回路は、マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、前記シリアルクロックおよび前記シリアルデータ以外の2つの信号を前記マスター装置から取得する取得手段と、前記取得手段によって取得された前記2つの信号の論理レベルの組み合わせに基づいて、前記マスター装置から送出された前記データ情報を連続転送するか否かを判断する判断手段と、前記判断手段によって連続転送すると判断された場合、前記スレーブ装置内部のアドレスを前記シリアルクロックによって生成される所定のカウンタ値に同期して更新する更新手段と、を備えることを特徴とする。 According to a fifth aspect of the present invention, there is provided a clock synchronous serial interface circuit which transmits a serial clock from a master device to a slave device and transmits / receives serial data including address information and data information of the slave device by the serial clock. A clock synchronous serial interface circuit provided in the slave device of the system to acquire two signals other than the serial clock and the serial data from the master device, and the acquisition unit Based on a combination of logic levels of two signals, a determination means for determining whether or not to continuously transfer the data information sent from the master device; and when the determination means determines that continuous transfer is to be performed, the slave Dress And updating means for updating an internal address in synchronization with a predetermined counter value generated by the serial clock, characterized in that it comprises a.
この請求項5の発明によれば、連続転送時のスレーブ装置内部のアドレスを、シリアルクロックによって生成される特定のカウンタ値に同期して更新することによって、スレーブ装置へのデータ転送時間を飛躍的に短縮し、シリアルデータの通信時間のマージンを拡大することができる。 According to the fifth aspect of the present invention, the data transfer time to the slave device is drastically improved by updating the address in the slave device at the time of continuous transfer in synchronization with the specific counter value generated by the serial clock. To reduce the serial data communication time margin.
また、請求項6の発明にかかるクロック同期式シリアルインターフェイス回路は、マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、前記シリアルクロックおよび前記シリアルデータ以外の2つの信号を前記マスター装置から取得する取得手段と、前記取得手段によって取得された前記2つの信号に基づいて、前記マスター装置から送出された前記シリアルデータのライトタイミングを制御する制御クロックを生成する生成手段と、前記シリアルクロックおよび前記2つの信号の異常状態を前記制御クロックの状態に基づいてそれぞれ検出する検出手段と、前記検出手段によって異常を検出した場合、前記マスター装置との間での前記シリアルデータの送受信動作を停止する停止手段と、前記検出手段によって異常を検出した場合、前記異常状態を報知する報知手段と、を備えることを特徴とする。 According to a sixth aspect of the present invention, there is provided a clock synchronous serial interface circuit which transmits a serial clock from a master device to a slave device and transmits / receives serial data including address information and data information of the slave device by the serial clock. A clock synchronous serial interface circuit provided in the slave device of the system to acquire two signals other than the serial clock and the serial data from the master device, and the acquisition unit Based on two signals, generation means for generating a control clock for controlling the write timing of the serial data sent from the master device, and abnormal states of the serial clock and the two signals are indicated by the control clock. Detecting means for detecting each based on the status of the network, and when detecting the abnormality by the detecting means, stopping means for stopping the serial data transmission / reception operation with the master device, and detecting the abnormality by the detecting means. And an informing means for informing the abnormal state when detected.
この請求項6の発明によれば、シリアルデータの転送期間中に異常を検出した場合は、マスター装置とスレーブ装置間でのシリアルデータ送受信動作を停止するとともに、異常状態を通知する。これにより、シリアルコマンドインターフェイスの各信号線に何らかの異常が発生しても、直ちにそれを検出し、同時にマスター装置への通知をおこなうため、システムや装置の暴走といった異常動作を未然に防止することができる。 According to the sixth aspect of the present invention, when an abnormality is detected during the serial data transfer period, the serial data transmission / reception operation between the master device and the slave device is stopped and the abnormal state is notified. As a result, even if any abnormality occurs in each signal line of the serial command interface, it is detected immediately and notified to the master device at the same time, so that abnormal operation such as runaway of the system or device can be prevented in advance. it can.
本発明にかかるクロック同期式シリアルインターフェイス回路によれば、異なる送受信フォーマットを有する複数のマスター装置とのシリアルデータの送受信に、効率的に対応することができる。 The clock synchronous serial interface circuit according to the present invention can efficiently cope with serial data transmission / reception with a plurality of master devices having different transmission / reception formats.
以下に添付図面を参照して、この発明にかかるクロック同期式シリアルインターフェイス回路の好適な実施の形態を詳細に説明する。 Exemplary embodiments of a clock synchronous serial interface circuit according to the present invention will be explained below in detail with reference to the accompanying drawings.
(実施の形態)
(データ転送システムのシステム構成)
はじめに、実施の形態にかかるデータ転送システム100のシステム構成について説明する。図1は、実施の形態にかかるデータ転送システム100のシステム構成を示す説明図である。実施の形態にかかるデータ転送システム100は、マスター装置としてのCPU101(101a〜101c)と、スレーブ装置としての周辺デバイス102によって構成される。また、周辺デバイス102は、インターフェイス回路103およびデバイス本体104とによって構成される。CPU101および周辺デバイス102は、それぞれ複数設けられ、それぞれのCPU101と周辺デバイス102との間で、データの転送がおこなわれている。
(Embodiment)
(System configuration of data transfer system)
First, the system configuration of the
インターフェイス回路103は、マスター装置(CPU101)からスレーブ装置(周辺デバイス102)にシリアルクロックを送出し、シリアルクロックによって周辺デバイス102のアドレス情報とデータ情報とを含むシリアルデータの送受信をおこなうクロック同期式シリアルインターフェイス回路である。
The
インターフェイス回路103は、シリアルクロックおよびシリアルデータ以外の2つの異なる信号を、それぞれCPU101から供給するとともに、周辺デバイス102にシリアルクロックとは独立したクロックを与えることによって、CPU101から周辺デバイス102へのライトタイミングの制御をおこなう。このとき、転送されるシリアルデータの特定ビットの状態によって、CPU101の送信フォーマットを特定し、特定したCPU101の送信フォーマットに合わせたシリアルデータ受信回路とを有する。
The
本実施の形態において、データがシリアル転送される周辺デバイス102は、最大13bitのアドレス空間、1アドレス16bit構成のレジスタを持つものとする。また、シリアル転送においては、通常はCPU101からの送信フォーマットを考慮して、シリアルクロックに同期して8bit(1byte)単位のデータが転送されるものとする。
In this embodiment, it is assumed that the
この構成において、CPU101からデータがシリアル転送される場合、最初の16bit(2byte)においては、13bitアドレスデータに加えて、リード/ライトの識別bit、パリティbitなどを付加したデータをCPU101で設定して転送する。その後、アドレスポインタに対応する16bitデータを、つぎの16bit(2byte)データとして周辺デバイス102に転送する。
In this configuration, when data is serially transferred from the
つぎに、インターフェイス回路103の回路構成について説明する。図2は、インターフェイス回路103の回路構成を示すブロック図である。インターフェイス回路103は、モード選択部201、F/F202(202a,202b)、シリアルカウンタ203、S/P変換部204、セレクタ205(205a〜205c)、アドレス・データ生成部206、レジスタ群207、P/S変換部208、異常検出部209によって構成される。なお、各部の具体的な動作については、図10〜図22を参照して説明する。
Next, the circuit configuration of the
(データ転送時のデータフォーマットおよびタイミングチャート)
つづいて、CPU101から周辺デバイス102にデータを転送する際のデータフォーマットおよびタイミングチャートについて、データ:01234567hをシリアル転送する場合を例として説明する。データの転送には、1byteごとに分割したデータのうち最下位のバイトから順番に記録・送信するリトルエンディアン方式と、最上位のバイトから順番に記録・送信するビッグエンディアン方式とがある。
(Data format and timing chart during data transfer)
Next, a data format and timing chart when data is transferred from the
まず、リトルエンディアン方式でデータを転送する場合について説明する。図3は、リトルエンディアン方式でシリアルデータ転送をおこなう場合のデータフォーマットを示す説明図である。また、図4は、リトルエンディアン方式でシリアルデータ転送をおこなう場合のタイミングチャートである。 First, a case where data is transferred by the little endian method will be described. FIG. 3 is an explanatory diagram showing a data format when serial data transfer is performed by the little endian method. FIG. 4 is a timing chart when serial data transfer is performed in a little endian manner.
図3のデータフォーマット表には、CPU内部アドレス301、ワードデータ302、バイトデータ303、CPU転送順序304、周辺デバイスへの転送データ305がそれぞれ示されている。
The data format table of FIG. 3 shows the CPU
また、図4のタイミングチャートには、送受信クロック401および送受信データ402が示されている。送受信データ402において、データ421は1byte目のデータであり、23×hを示す(図3参照)。データ422は2byte目のデータであり、01×hを示す。同様に、データ423は3byte目のデータであり、67×hを、データ424は4byte目のデータであり、45×hをそれぞれ示す。なお、横軸は時刻tである。
In the timing chart of FIG. 4, a transmission /
リトルエンディアン方式のCPU101から周辺デバイス102にデータ:01234567hをシリアル転送する場合、その転送順序は、23h→01h→67h→45hとなる。
When serially transferring data: 012356757h from the little-
つぎに、ビッグエンディアン方式でデータを転送する場合について説明する。図5は、ビッグエンディアン方式でシリアルデータ転送をおこなう場合のデータフォーマットを示す説明図である。また、図6は、ビッグエンディアン方式でシリアルデータ転送をおこなう場合のタイミングチャートである。 Next, a case where data is transferred by the big endian method will be described. FIG. 5 is an explanatory diagram showing a data format when serial data transfer is performed by the big endian method. FIG. 6 is a timing chart when serial data transfer is performed by the big endian method.
図5のデータフォーマット表には、CPU内部アドレス501、ワードデータ502、バイトデータ503、CPU転送順序504、周辺デバイスへの転送データ505がそれぞれ示されている。
The data format table of FIG. 5 shows the CPU
また、図6のタイミングチャートには、送受信クロック601および送受信データ602が示されている。送受信データ602において、データ621は1byte目のデータであり、01×hを示す(図5参照)。データ622は2byte目のデータであり、23×hを示す。同様に、データ623は3byte目のデータであり、45×hを、データ624は4byte目のデータであり、67×hをそれぞれ示す。なお、横軸は時刻tである。
In the timing chart of FIG. 6, a transmission /
ビッグエンディアン方式のCPU101から周辺デバイス102にデータ:01234567hをシリアル転送する場合、その転送順序は、01h→23h→45h→67hとなる。
When the data: 0123567h is serially transferred from the big
このように、送信フォーマットが異なる複数のCPU101から周辺デバイス102にデータを転送するには、周辺デバイス102でCPU101の送信フォーマット(エンディアンなど)を合わせる必要がある。本実施の形態では、周辺デバイス102に送信フォーマットを合わせるインターフェイス回路103を設け、複数のCPU101からのデータ送信に対応できるようにしている。
As described above, in order to transfer data from a plurality of
つぎに、各送信フォーマットに対するインターフェイス回路103の同期転送について説明する。まず、リトルエンディアン方式のCPU101(以下、CPU101aという)からのクロック同期シリアルデータ転送について説明する。図7は、リトルエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。なお、以下図7〜図9に示すタイミングチャートは、CPU101(CPU101a〜101c)から周辺デバイス102のアドレス0123番地に「4567h」をライトする場合を示している。
Next, synchronous transfer of the
図7のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)701、シリアルクロック(CLK_SY)702、シリアル転送データ(SYDI_N)703、周辺デバイスからのシリアル転送データ(SYDO_N)704、後述する連続ライトモード信号(SYHS_N)705が示されている。 In the timing chart of FIG. 7, the peripheral device chip select signal (SYCS_N) 701, serial clock (CLK_SY) 702, serial transfer data (SYDI_N) 703, serial transfer data (SYDO_N) 704 from the peripheral device, and continuous write described later. A mode signal (SYHS_N) 705 is shown.
周辺デバイス102のレジスタ構成は、アドレス空間13bit、1アドレス16bit構成とし、CPU101aからの送信フォーマットに従って、8bit×4回のシリアル転送で1回のレジスタライト動作がおこなわれるものとする。このとき、13bitアドレス転送時の残り3bitのうち、1bitを周辺デバイス102でリード/ライトを切り分けるRWbitとし、残りの2bitは未使用bitとして0を転送する。
The register configuration of the
つぎに、ビッグエンディアン方式のCPU101(以下、CPU101bという)からのクロック同期シリアルデータ転送について説明する。図8は、ビッグエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。図8のタイミングチャートには、図7と同様に周辺デバイスのチップセレクト信号(SYCS_N)801、シリアルクロック(CLK_SY)802、シリアル転送データ(SYDI_N)803、周辺デバイスからのシリアル転送データ(SYDO_N)804、後述する連続ライトモード信号(SYHS_N)805が示されている。
Next, clock-synchronized serial data transfer from the big-endian CPU 101 (hereinafter referred to as
この場合もリトルエンディアン方式のCPU101の場合と同様に、周辺デバイス102のレジスタ構成は、アドレス空間13bit、1アドレス16bit構成とし、CPU101bからの送信フォーマットに従って、8bit×4回のシリアル転送で1回のレジスタライト動作がおこなわれるものとする。
In this case as well, as in the case of the little
さらに、CPU101bとは別のビッグエンディアン方式のCPU101(以下、CPU101cという)からのクロック同期シリアルデータ転送について説明する。CPU101cは、CPU101bと異なり、アドレス空間13bit、1アドレス16bit構成の周辺デバイス102に対し、32bit×1回のシリアル転送で1回のレジスタライト動作をおこなうものとする。
Further, a clock-synchronized serial data transfer from a big-endian CPU 101 (hereinafter referred to as
図9は、ビッグエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。図9のタイミングチャートには、図7および図8と同様に周辺デバイスのチップセレクト信号(SYCS_N)901、シリアルクロック(CLK_SY)902、シリアル転送データ(SYDI_N)903、周辺デバイスからのシリアル転送データ(SYDO_N)904、後述する連続ライトモード信号(SYHS_N)905が示されている。 FIG. 9 is a timing chart in the case of performing clock synchronous serial data transfer by the big endian method. 9 is similar to FIGS. 7 and 8, the peripheral device chip select signal (SYCS_N) 901, serial clock (CLK_SY) 902, serial transfer data (SYDI_N) 903, and serial transfer data from the peripheral device ( SYDO_N) 904 and a continuous write mode signal (SYHS_N) 905 described later are shown.
前述のようにCPU101cは、アドレス空間13bit、1アドレス16bit構成の周辺デバイス102に対し、32bit×1回のシリアル転送で1回のレジスタライト動作をおこなう。このとき、13bitアドレス転送時の残りの3bitは、1bitを周辺デバイス102でリード/ライトを切り分けるRW bitとし、残りの2bitについては未使用bitとして0を転送するが、図7に示した場合と異なり、8bitごとにデータを入れ替えてCPU101cから転送されることになる。
As described above, the
なお、図7〜図9のいずれにおいても、SYCS_N701,801,901およびSYHS_N705,805,905が、CLK_SY702,802,902に同期してCPU101からシリアル転送される時、SYCS_N=L,SYHS_N=Hとして制御するものとする。ここで、信号線の_Nはローアクティブを意味する名称と定義する。
7 to 9, when
(インターフェイス回路103の動作)
つぎに、図2に示したインターフェイス回路103の各構成の動作について説明する。まず、モード選択部201は、CPU101から、シリアルクロック(CLK_SY)に同期して、シリアルデータ(SYDI_N)が周辺デバイス102にクロック同期入力された際に、周辺デバイス102のチップセレクト信号(SYCS_N)および連続ライトモード信号の論理積をとった各信号で、通常のライト/リードモード状態、および、連続ライトモード状態を生成する。
(Operation of interface circuit 103)
Next, the operation of each component of the
ここで、通常のライト/リードモード状態は、SYCS_N=L,SYHS_N=Hとする。また、連続ライトモード状態は、SYCS_N=L,SYHS_N=Lとする。これらは、シリアルクロックが周辺デバイス102に与えられている期間中、有効な信号とする。
Here, the normal write / read mode state is SYCS_N = L, SYHS_N = H. The continuous write mode state is SYCS_N = L and SYHS_N = L. These are valid signals during the period when the serial clock is applied to the
F/F202aは、SYCS_N信号のネゲートエッジをCLK_REFで同期して、シリアルカウンタ203および周辺デバイス102のリード時に用いられるP/S変換部208のリセット信号を生成する。SYCS_N信号のネゲートエッジを用いることで、CPU101からの1回のシリアルデータ(アドレス情報+データ)転送ごとにカウンタがクリアされ、周辺デバイス102の内部回路を初期化することができる。
The F /
CPU101からのシリアルデータ(SYDI_N)は、シリアルクロック同期で入力されると、シリアルカウンタ203で内部カウンタを起動し、同時にS/P変換部204で、入力ビット数分のパラレルデータに変換される。ここで、周辺デバイス102のレジスタへのデータ書き込みは、シリアルクロックとは独立したクロックによるライトパルスを生成しておこなう。この独立したクロックとは、周辺デバイス102のリファレンスクロックである。
When the serial data (SYDI_N) from the
図10は、リファレンスクロックを使用したライトパルス生成時のタイミングチャートである。なお、図10に示すタイミングチャートは、リトルエンディアン方式のCPU101から周辺デバイス102のアドレス0123番地に「4567h」をライトする場合を示している。
FIG. 10 is a timing chart when a write pulse is generated using a reference clock. The timing chart shown in FIG. 10 shows a case where “4567h” is written to the address 0123 of the
図10のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)1001、シリアルクロック(CLK_SY)1002、シリアル転送データ(SYDI_N)1003、CLK_REF周波数1004、wrenパルス1005、およびレジスタアドレスの決定タイミング1006、シフトデータの決定タイミング1007、n番地データの決定タイミング1008が示されている。
10 includes a chip select signal (SYCS_N) 1001, a serial clock (CLK_SY) 1002, serial transfer data (SYDI_N) 1003, a
周辺デバイス102のリファレンスクロックは、電源ONの間は一定の周波数で停止することなく与えられる。元のシリアルクロックでライトパルスを生成しない理由としては、CPU101で一定bit数を送信するごとにシリアルクロックを停止(High状態)する制御が発生する場合があり、このクロック停止によって、所望のレジスタへのライトタイミングの遅れが発生したり、あるいはライトし損なうなど、タイミング上制約が発生することが考えられるためである。
The reference clock of the
図10では、リトルエンディアン方式のCPU101からのシリアルデータ転送であるので、シリアルデータは13bitアドレスであり、16bitデータは図10に示したようなタイミングで入力される。これを、周辺デバイス102のアドレス・データ生成部206でデータを入れ替え、通常ライトか連続ライトかをセレクタ205bで選択する。
In FIG. 10, since serial data is transferred from the little-
そして、F/F202bによって、リファレンスクロックから同期生成したwrenパルスによって、4567hデータをレジスタ群207の所望のアドレス(=0123h番地)にライトする。なお、ここでは、タイミング制御のマージンを取るために、CLK_REF周波数>CLK_SY周波数としている。このように、エンディアン方式の異なるCPU101からのデータを受信するには、周辺デバイス102でのシリアル/パラレル変換(S/P変換)データ構成を、CPU101の送信フォーマットに合わせる必要がある。
Then, the 4567h data is written to a desired address (address 0123h) of the register group 207 by the F /
そこで、どちらのエンディアン方式のCPU101であっても、周辺デバイス102で選択が可能となるような固有データを、CPU101から転送する。そして、周辺デバイス102でそのデータを受信した時に、CPU101の選択回路、および、データ送信フォーマット切り替え回路であるセレクタ205が起動するような構成としている。
Therefore, the
つづいて、前述した各エンディアン方式のCPU101a〜101cを周辺デバイス102のディフォルト選択設定とした時に、エンディアン方式の異なるCPU101を選択してシリアルデータ転送をおこなう場合について説明する。はじめに、リトルエンディアン方式のCPU101aをディフォルト選択設定として、ビッグエンディアン方式のCPU101bを選択する場合について説明する。
Next, a case where the
図11は、ディフォルトがリトルエンディアン方式の時に、ビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFEh」を書き込む場合を示している。
FIG. 11 is a timing chart of serial transfer data when a big-endian CPU is selected when the default is a little-endian system. This timing chart shows a case where “FFFEh” is written to the
図11のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)1101、シリアルクロック(CLK_SY)1102、シリアル転送データ(SYDI_N)1103、CPU101aのアサート状態1104、CPU101bのアサート状態1105、周辺デバイスからのシリアル転送データ(SYDO_N)1106、連続ライトモード信号(SYHS_N)1107が示されている。なお、表記の便宜上、以降の図中において、CPU101aのアサート状態をCPU101<a>、CPU101bのアサート状態をCPU101<b>、CPU101cのアサート状態をCPU101<c>とそれぞれ表記する。
In the timing chart of FIG. 11, the chip select signal (SYCS_N) 1101 of the peripheral device, the serial clock (CLK_SY) 1102, the serial transfer data (SYDI_N) 1103, the asserted
CPU101aからのシリアル転送データ(SYDI_N)1103は、シリアルクロック(CLK_SY)1102の立ち下がりエッジに同期して入力されるものとし、以下のような手順でCPU選択回路を起動させる。
The serial transfer data (SYDI_N) 1103 from the
まず、CPU101aから周辺デバイス102に、「FFFEh」をライトする。つぎに、後続の16bitデータとしてダミーデータを転送する。RW bit=1は従来通りであるが、通常ライト時に余りの2つのbitを0としていた部分については、それぞれ1を与えて周辺デバイス102に転送する。
First, “FFFEh” is written from the
つまり、CPU101を選択するための転送時のみ、余りbitに1を与えて転送することによって、従来のライト転送と区別する。これにより、周辺デバイス102のシリアルデータ受信フォーマットが、ディフォルトのCPU101aからCPU101bに変更され、つぎの転送からは、後述する図12の説明に従って、CPU101bからのシリアルデータを受信することが可能となる。また、このとき、図2のセレクタ205aでは、状態信号のアサートがCPU101aからCPU101bへと変化する。
In other words, only the transfer for selecting the
つぎに、リトルエンディアン方式のCPU101aをディフォルト選択設定として、32biーt転送のビッグエンディアン方式のCPU101cを選択する場合について説明する。
Next, a case will be described in which the little-
図12は、ディフォルトがリトルエンディアン方式の時に、32bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFCh」を書き込む場合を示している。
FIG. 12 is a timing chart of serial transfer data when a 32-bit transfer big endian CPU is selected when the default is the little endian method. This timing chart shows a case where “FFFCh” is written to the
図12のタイミングチャートには、図11と同様に、周辺デバイスのチップセレクト信号(SYCS_N)1201、シリアルクロック(CLK_SY)1202、シリアル転送データ(SYDI_N)1203、CPU101aのアサート状態1204、CPU101cのアサート状態1205、周辺デバイスからのシリアル転送データ(SYDO_N)1206、連続ライトモード信号(SYHS_N)1207が示されている。
In the timing chart of FIG. 12, similarly to FIG. 11, the chip select signal (SYCS_N) 1201, serial clock (CLK_SY) 1202, serial transfer data (SYDI_N) 1203 of the peripheral device, assert
図12に示す場合も図11と同様に、まず、CPU101aから周辺デバイス102に、「FFFCh」をライトする。つぎに、後続の16bitデータとしてダミーデータを転送する。このとき、転送フォーマットは、CPU101aからCPU101cへと切り替わっている(状態信号のアサートがCPU101aからCPU101cへと変化する)。このため、図9に示したように、CPU101cからのシリアルデータを受信することが可能となる。
Also in the case shown in FIG. 12, as in FIG. 11, first, “FFFCh” is written from the
以上の手順によって、各エンディアン方式のCPU101a〜101cを周辺デバイス102のディフォルト選択設定とした時に、エンディアン方式の異なるCPU101を選択してシリアルデータ転送をおこなう。他のCPU101どうしの組み合わせも同様に、デフォルトのCPU101からのシリアルデータを周辺デバイスに転送し、CPU101を選択する。
With the above procedure, when the
図13は、ディフォルトが32bit転送のビッグエンディアン方式の時に、リトルエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFDh」を書き込む場合を示している。
FIG. 13 is a timing chart of serial transfer data when the little endian CPU is selected when the default is the big endian method of 32-bit transfer. This timing chart shows a case where “FFFDh” is written in the
また、図14は、ディフォルトが32bit転送のビッグエンディアン方式の時に、8bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFCh」を書き込む場合を示している。
FIG. 14 is a timing chart of serial transfer data in the case of selecting a big-endian CPU of 8-bit transfer when the default is a big-endian method of 32-bit transfer. This timing chart shows a case where “FFFCh” is written to the
また、図15は、ディフォルトがビッグエンディアン方式の時に、リトルエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFFh」を書き込む場合を示している。
FIG. 15 is a timing chart of serial transfer data when a little endian CPU is selected when the default is the big endian system. This timing chart shows a case where “FFFFh” is written to the
図16は、ディフォルトが8bit転送のビッグエンディアン方式の時に、32bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102に「FFFCh」を書き込む場合を示している。
FIG. 16 is a timing chart of serial transfer data when a 32-bit transfer big-endian CPU is selected when the default is a big-endian method of 8-bit transfer. This timing chart shows a case where “FFFCh” is written to the
図13〜図16のタイミングチャートには、図12と同様に、周辺デバイスのチップセレクト信号(SYCS_N)1301,1401,1501,1601、シリアルクロック(CLK_SY)1302,1402,1502,1602、シリアル転送データ(SYDI_N)1303,1403,1503,1603、CPU101のアサート状態1304,1305,1404,1405,1504,1505,1604,1605、周辺デバイスからのシリアル転送データ(SYDO_N)1306,1406,1506,1606、連続ライトモード信号(SYHS_N)1307,1407,1507,1607がそれぞれ示されている。
In the timing charts of FIGS. 13 to 16, as in FIG. 12, peripheral device chip select signals (SYCS_N) 1301, 1401, 1501, 1601, serial clocks (CLK_SY) 1302, 1402, 1502, 1602, serial transfer data (SYDI_N) 1303, 1403, 1503, 1603,
図11〜図16に示すように、周辺デバイスへのシリアルデータの先頭12bitが「FFFh」である時、CPU101の送信フォーマット選択動作であることを検出し、続く4bitデータの値(「Fh」「Eh」など)によってどのCPU101の送信フォーマットであるかを特定する。
As shown in FIGS. 11 to 16, when the first 12 bits of serial data to the peripheral device is “FFFh”, it is detected that the
インターフェイス回路103は、CPU101から周辺デバイス102への最初の12bitのデータを用いて通常ライト/CPU選択を判定し、続く4bitのデータを用いて、CPU101a〜CPU101cのいずれかを選択することとしている。なお、リード時のタイミングに関しては、CPU101の選択制御は起動せず、通常のまま動作をおこなう。
The
このように、転送されたシリアルデータを周辺デバイス102で判別することによって、CPU101の送信フォーマットを特定する。そして、特定されたフォーマットに合わせたシフト回路を周辺デバイス102で選択することとしている。なお、周辺デバイス102は、CPU101aをディフォルト選択としているため、もし、CPU101aからCPU101b、あるいはCPU101cを選択後、CPU101aに戻したい場合は、図13および図14に示した送信フォーマットによって、周辺デバイス102に固有のシリアルデータを転送すればよい。
As described above, the transmission format of the
つぎに、周辺デバイス102からCPU101へとデータを出力する場合について説明する。図17は、周辺デバイスからリトルエンディアン方式のCPUにリードデータを出力する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102のアドレス0123番地のデータをリトルエンディアン方式のCPU101aにリードする場合を示している。
Next, a case where data is output from the
また、図18は、周辺デバイスからビッグエンディアン方式のCPUにリードデータを出力する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102のアドレス0123番地のデータをビッグエンディアン方式のCPU101aにリードする場合を示している。
FIG. 18 is a timing chart of serial transfer data when read data is output from a peripheral device to a big endian CPU. This timing chart shows a case where the data at the address 0123 of the
図17および図18のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)1701,1801、シリアルクロック(CLK_SY)1702,1802、シリアル転送データ(SYDI_N)1703,1803、シリアルリードデータ(SYDO_N)1704,1804、連続ライトモード信号(SYHS_N)1705,1805が、それぞれ示されている。 17 and 18, the peripheral device chip select signals (SYCS_N) 1701 and 1801, serial clocks (CLK_SY) 1702 and 1802, serial transfer data (SYDI_N) 1703 and 1803, and serial read data (SYDO_N) 1704 are shown. , 1804, and continuous write mode signals (SYHS_N) 1705, 1805, respectively.
図17と図18とを対比すると、シリアルリードデータ(SYDO_N)1704,1804を8bit単位で入れ替えている(図2のP/S変換部208参照)。これは、リードデータを受け取るCPU101の受信フォーマットを考慮したものである。さらに、周辺デバイス102のデバッグ用などに、リードデータを8bit単位で入れ替えをおこなうレジスタフラグを設けておいてもよい。これは、CPU101から周辺デバイス102にシリアルデータをライトする場合にも適用できる。
17 and FIG. 18 are compared, serial read data (SYDO_N) 1704 and 1804 are exchanged in units of 8 bits (see P /
また、図17および図18において、CPU101へのシリアルデータ送信回路に、クロックエッジの選択手段を設けてもよい。具体的には、周辺デバイス102の内部レジスタに、シリアルクロックのエッジ選択用レジスタフラグを設け、任意の送受信フォーマットのCPU101に対して、シリアルクロックのいずれかのエッジを用いてシリアルデータを転送するようにする。
17 and 18, the serial data transmission circuit to the
このようにして、CPU101の変更に伴って、周辺デバイス102のレジスタフラグの設定をおこなえば、容易に動作の切り替えをすることができる(図2のセレクタ205c参照)。この場合、フラグのディフォルト設定値は、最初に設定されるCPU101の動作エッジに合わせておく。図17では、CPU101への出力を、シリアルクロックの立ち下がりエッジでおこなっている。また、図18は、CPU101への出力を、シリアルクロックの立ち上がりエッジでおこなっている。
In this way, if the register flag of the
また、CPU101から転送されるアドレス情報は、周辺デバイス102のアドレス空間を構成するビット数よりも大きいものとし、剰余となるアドレス情報のビットの状態に応じて、周辺デバイス102の共有アドレスを構成する領域に、CPU101からのデータ情報を同時に書き込むこととしてもよい。
Further, the address information transferred from the
図19は、リトルエンディアン方式のCPUからレジスタへ同時ライトする場合のタイミングチャートである。図19のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)1901、シリアルクロック(CLK_SY)1902、シリアル転送データ(SYDI_N)1903、レジスタアドレス1904、チップセレクト1905、リファレンスクロック(CLK_REF)1906、wrenパルス1907、データ1908、シリアルリードデータ(SYDO_N)1909、連続ライトモード信号(SYHS_N)1910が、それぞれ示されている。
FIG. 19 is a timing chart for simultaneous writing from a little endian CPU to a register. The timing chart of FIG. 19 shows a chip select signal (SYCS_N) 1901, serial clock (CLK_SY) 1902, serial transfer data (SYDI_N) 1903,
図19に示すように、アドレス空間がadd[11:0]で構成される周辺デバイス102に対して、add[12]ビットをCPU101から剰余ビットとして与える。このadd[12]ビットは、CPU101から周辺デバイス102へのデータ転送では、通常使用しない領域のビットであるため、0に設定しておく。
As shown in FIG. 19, add [12] bits are given as surplus bits from the
一方、フルカラーの画像形成装置などに用いられる周辺デバイス102は、各色に対応させるため、1つの周辺デバイス102の内部に色ごとの領域を確保し、共通のアドレス空間には、それぞれ同一機能のレジスタを配置することがある。たとえば、Y(イエロー)、M(マゼンタ)、C(シアン)、BK(ブラック)に各対応するγ補正テーブルデータを、add[11:0]のうちの任意のアドレスに配置する。
On the other hand, the
通常、これらのテーブルデータを設定する際は、CPU101からそれぞれのブロックごとにシリアルデータを転送する方法が一般的であるが、これでは、同一データを設定する場合などは、データ転送に色の数に相当する4倍の時間がかかってしまう。このため、CPU101からの剰余ビットであるadd[12]ビットを1に設定することにより、共通機能のレジスタに同一データを一度にライトする。
Normally, when setting these table data, a method of transferring serial data from the
図19に示すように、10XXhのアドレス情報をCPU101から転送することによって、図2のレジスタ群207の内部でadd[12]ビット状態を検出する。検出されるビット状態は、1であることから、cs00XX,cs01XX,cs02XX,cs03XXの4つのレジスタのチップセレクトを同時にアサートする。
As shown in FIG. 19, the add [12] bit state is detected in the register group 207 of FIG. 2 by transferring the address information of 10XXh from the
これにより、wrenパルスのアサートでライトデータをラッチし、1回のシリアルデータ転送で、周辺デバイス102の4つのレジスタ空間にデータを書き込むことができ、通信時間の短縮を図ることができる。なお、一度に同時に書き込む必要がない場合は、通常通り、add[12]ビットを0に戻して、CPU101からデータを送信すればよい。
As a result, write data can be latched by asserting the wren pulse, and data can be written into the four register spaces of the
また、2つの信号の論理レベルの組み合わせによって、CPU101から周辺デバイス102にデータ情報を連続転送する選択回路を設け、連続転送時の周辺デバイス102の内部アドレスを、シリアルクロックによって生成される特定のカウンタ値に同期して更新することとしてもよい。具体的には、周辺デバイス102内部の任意のレジスタアドレスから自動的にインクリメントしていき、CPU101からの連続データ転送(16bit単位)に対応する手段を与える。
In addition, a selection circuit for continuously transferring data information from the
図20は、リトルエンディアン方式のCPUからレジスタへ高速ライトする場合のタイミングチャートである。図20のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)2001、シリアルクロック(CLK_SY)2002、シリアル転送データ(SYDI_N)2003、シリアルカウンタ値2004、アドレス2005、シリアルリードデータ(SYDO_N)2006、連続ライトモード信号(SYHS_N)2007が、それぞれ示されている。
FIG. 20 is a timing chart in the case where high-speed writing is performed from a little endian CPU to a register. The timing chart of FIG. 20 includes peripheral device chip select signal (SYCS_N) 2001, serial clock (CLK_SY) 2002, serial transfer data (SYDI_N) 2003,
図20に示すように、まず周辺デバイス102の任意のアドレス(n番地)に通常のライト動作をおこなうために、シリアル転送をおこなう。先に説明したように、チップセレクト信号はSYCS_N、連続ライトモード信号はSYCS_N=L,SYHS_N=Hとして制御されている。このとき、周辺デバイス102では、CPU101から転送されたアドレス値=nが保持される。
As shown in FIG. 20, first, serial transfer is performed in order to perform a normal write operation to an arbitrary address (address n) of the
ここで、インターフェイス回路103は、通常ライトモードを連続ライトモードに切り替えるが、CPU101で、SYCS_N=L,SYHS_N=Lと信号レベルの設定を変更する。また、周辺デバイス102のアドレス=nに相当するデータに続いて、CPU101からの16bitのシリアルデータは、以降n+1,n+2,・・・と連続で周辺デバイス102にライトされる。
Here, the
なお、アドレスのインクリメントタイミングは、シリアルデータの16bit転送の間に動作する内部カウンタ(たとえば、シリアルクロック同期のカウンタであれば、0からFまでの間)の任意の値で実行すればよい。図20では、リトルエンディアン形式のCPU101からの連続ライトデータに対して、シリアルカウンタが604=05hを検出した後、直近のCLK_SYの立ち上がりエッジで、内部アドレスを自動インクリメントする例を示している。
The address increment timing may be executed with an arbitrary value of an internal counter (for example, between 0 and F in the case of a serial clock synchronous counter) that operates during 16-bit transfer of serial data. FIG. 20 shows an example in which the internal address is automatically incremented at the latest rising edge of CLK_SY after the serial counter detects 604 = 05h for the continuous write data from the
ただし、F/F202bからレジスタ群207へ出力されるライトパルス信号(wren)は、リファレンスクロックによって同期化されたパルス信号を用いるため、シリアルクロックとの間で非同期の関係が生じる。さらに、互いのクロック周波数の比率によって、たとえば、リファレンスクロック周波数よりシリアルクロック周波数が大きい場合、アドレスをインクリメントするタイミングの方が、ライトパルス信号(wren)を生成するタイミングよりも早くなり、n番地にライトすべきデータが、n+1番地にライトされてしまう場合もある。
However, since the write pulse signal (wren) output from the F /
このような場合、互いの周波数比に応じて、アドレスインクリメントのタイミングを任意に変更するレジスタフラグなどを設けておくか、十分にタイミングマージンを取って、レジスタアドレスの自動インクリメントをおこなえばよい。 In such a case, a register flag or the like for arbitrarily changing the address increment timing may be provided according to the frequency ratio of each other, or the register address may be automatically incremented with a sufficient timing margin.
また、異常検出部209は、シリアルクロックおよび2つの異なる制御信号(周辺デバイスのチップセレクト信号および連続転送制御信号)の異常状態を、それぞれシリアルクロックとは独立したクロックで検出する。さらに、異常検出部209は、CPU101からのシリアルデータ転送中に異常を検出した場合、CPU101と周辺デバイス102との間のシリアルデータ送受信動作を停止するとともに、異常状態を通知する。
In addition, the
具体的には、異常検出部209は、シリアルクロックや、2つの制御信号(周辺デバイスのチップセレクト信号および連続転送制御信号)の波形異常(クロック抜け、ノイズ)などを検出し、転送時のシリアルデータのパリティエラー以外の異常を検出する。
Specifically, the
図21は、リトルエンディアン方式のCPUから周辺デバイスへの正常なライトタイミングを示すタイミングチャートである。図21のタイミングチャートには、周辺デバイスのチップセレクト信号(SYCS_N)2101、シリアルクロック(CLK_SY)2102、シリアル転送データ(SYDI_N)2103、シリアルカウンタ値2104、リファレンスクロック(CLK_REF)2105、保持カウンタ値2106、異常検出パルス2107、wrenパルス2108、シリアルリードデータ(SYDO_N)2109、連続ライトモード信号(SYHS_N)2110が、それぞれ示されている。
FIG. 21 is a timing chart showing normal write timing from a little endian CPU to a peripheral device. In the timing chart of FIG. 21, the chip select signal (SYCS_N) 2101, serial clock (CLK_SY) 2102, serial transfer data (SYDI_N) 2103,
図21に示すように、たとえば、周辺デバイス102へのライト動作中にシリアルクロックに抜けが発生した場合(図21中のPで示す部分)、内部のシフト動作が正常におこなわれず、シリアルカウンタが誤った値となる。その結果、本来であれば、シリアルカウンタ=1fh(31)のつぎのCLK_SYの立ち上がりで動作が開始されるF/F202b(wrenパルス生成部)が動作せず、0123h番地レジスタへのライト動作がおこなわれないこととなってしまう。
As shown in FIG. 21, for example, when a missing serial clock occurs during a write operation to the peripheral device 102 (part indicated by P in FIG. 21), the internal shift operation is not performed normally, and the serial counter is Incorrect value. As a result, the F /
このため、インターフェイス回路103では、1回のライト動作に必要なシリアルクロックのパルス数をあらかじめ記憶しておく。そして、実際の1回の転送処理が終了するごと(本実施の形態では、チップセレクト信号:SYCS_Nのネゲートエッジを検出)に、リファレンスクロック(CLK_REF)でシリアルクロック(CLK_SY)の数をカウントし、あらかじめ記録された記録値と比較する。この比較結果が異なった時に異常と判断し、異常検出部209は、CPU101に異常状態信号を送出する。
Therefore, the
図22は、リトルエンディアン方式のCPUから周辺デバイスへの異常なライトタイミングを示すタイミングチャートである。図22のタイミングチャートには、図21と同様に、周辺デバイスのチップセレクト信号(SYCS_N)2201、シリアルクロック(CLK_SY)2202、シリアル転送データ(SYDI_N)2203、シリアルカウンタ値2204、リファレンスクロック(CLK_REF)2205、保持カウンタ値2206、異常検出パルス2207、wrenパルス2208、シリアルリードデータ(SYDO_N)2209、連続ライトモード信号(SYHS_N)2210が、それぞれ示されている。
FIG. 22 is a timing chart showing abnormal write timing from a little endian CPU to a peripheral device. In the timing chart of FIG. 22, similarly to FIG. 21, peripheral device chip select signal (SYCS_N) 2201, serial clock (CLK_SY) 2202, serial transfer data (SYDI_N) 2203,
なお、シリアルクロック(CLK_SY)のカウント方法は、その立ち上がり、あるいは立ち下がりエッジを、リファレンスクロック(CLK_REF)でカウントすればよく、上述した方法に限定されるものではない。 Note that the serial clock (CLK_SY) counting method is not limited to the above-described method, as long as the rising or falling edge is counted by the reference clock (CLK_REF).
以上のように、異常検出部209は、ノイズなどの余分なクロックの発生や、クロック抜けなどによる異常を検出する。検出された異常状態下では、周辺デバイス102へのデータ書き込みはおこなわず、あわせてCPU101に異常状態を通知する。この構成は、周辺デバイス102からCPU101へのレジスタリード動作時において適用される。
As described above, the
また、チップセレクト信号(SYCS_N)、および、連続ライトモード信号(SYHS_N)は、通常のライト/リード動作、連続ライト動作のようにモード判別をおこなうために使用されている。このため、これらの信号に異常が発生した場合、内部シリアルカウンタの初期化、あるいは、内部シリアルカウンタの遷移の異常が発生する。その結果、通常ライト/リード、および、連続ライトモードの各モード遷移が正常に機能しないこととなる。 Further, the chip select signal (SYCS_N) and the continuous write mode signal (SYHS_N) are used for mode discrimination like a normal write / read operation and a continuous write operation. Therefore, when an abnormality occurs in these signals, an internal serial counter initialization or an internal serial counter transition abnormality occurs. As a result, each mode transition of normal write / read and continuous write mode does not function normally.
従って、前述した制御信号に異常が発生したことを検出する方法として、シリアルクロック(CLK_SY)と同様に、1回の転送処理の終了前に、チップセレクト信号(SYCS_N)、連続ライトモード信号(SYHS_N)のレベルに変化があった場合は、異常と判断するように制御する。そして、クロック抜けの場合と同様に、周辺デバイス102へのデータ書き込みはおこなわず、あわせてCPU101に異常状態を通知する。
Therefore, as a method for detecting the occurrence of an abnormality in the control signal, the chip select signal (SYCS_N), the continuous write mode signal (SYHS_N), and the like before the end of one transfer process, as with the serial clock (CLK_SY). If there is a change in the level of), control is performed so that it is determined to be abnormal. Then, as in the case of missing clock, data writing to the
以上のように、異常検出部209で図22のような異常タイミングを検出することによって、一般的なパリティエラー以外での状態異常に対するエラー処理に対応することができる。なお、異常検出部209は、前述のように各入力信号の状態変化を保持し、それを正常な状態と比較することで異常と判断できる構成であれば、他の信号を用いて異常を検出してもよい。
As described above, by detecting the abnormality timing as shown in FIG. 22 by the
なお、本実施の形態では、周辺デバイス102で選択すべきCPU101を3種類としたが、CPU101からのシリアルデータの組み合わせと、特定すべきCPU101の認識条件を考慮することによって、3種類以上の種類のCPU101を選択することもできる。これにより、より拡張性の高いシステムの構築が可能となる。また、本実施の形態では、CPU101のエンディアン方式は、主にリトルエンディアン方式の場合について説明したが、ビッグエンディアン方式や他の方式のCPU101に関しても、同様に適用することができ、さらに、フルカラー画像形成装置などの機器に対しても実施することができる。
In this embodiment, the
以上説明したように、本実施の形態にかかるクロック同期式シリアルインターフェイス回路によれば、マスター装置の送受信フォーマットに合わせてシリアルデータを送受信することによって、1つのスレーブ装置で、複数のマスター装置の送受信フォーマットに対応させることが可能となり、システムの拡張性を広げることができる。また、送受信フォーマットに合わせて複数のスレーブ装置を揃える必要がなく、システムの運営においてコストダウンを図ることができる。 As described above, according to the clock synchronous serial interface circuit according to the present embodiment, a single slave device transmits and receives a plurality of master devices by transmitting and receiving serial data according to the transmission and reception format of the master device. It becomes possible to correspond to the format, and the expandability of the system can be expanded. Further, it is not necessary to prepare a plurality of slave devices according to the transmission / reception format, and the cost can be reduced in the operation of the system.
また、シリアルクロックのクロックエッジを選択可能なことによって、マスター装置の送受信フォーマットに応じた回路を自由に設定でき、システムの拡張性をさらに向上させることができる。 Further, since the clock edge of the serial clock can be selected, a circuit corresponding to the transmission / reception format of the master device can be freely set, and the expandability of the system can be further improved.
また、スレーブ装置内部の共有アドレスを構成する領域に、マスター装置からのデータ情報を同時に書き込むことによって、フルカラーの画像データなど、容量が大きいデータを扱う場合においてコマンド設定時間を短縮するなど、データ処置効率を向上させることができる。 In addition, data processing such as shortening the command setting time when handling large data such as full-color image data by simultaneously writing data information from the master device to the area constituting the shared address inside the slave device Efficiency can be improved.
シリアルデータの転送期間中に異常を検出した場合は、マスター装置とスレーブ装置間でのシリアルデータ送受信動作を停止するとともに、異常状態を通知する。これにより、シリアルコマンドインターフェイスの各信号線に何らかの異常が発生しても、直ちにそれを検出し、同時にマスター装置への通知をおこなうため、システムや装置の暴走といった異常動作を未然に防止することができる。 When an abnormality is detected during the serial data transfer period, the serial data transmission / reception operation between the master device and the slave device is stopped and an abnormal state is notified. As a result, even if any abnormality occurs in each signal line of the serial command interface, it is detected immediately and notified to the master device at the same time, so that abnormal operation such as runaway of the system or device can be prevented in advance. it can.
以上のように、本発明にかかるクロック同期式シリアルインターフェイス回路は、異なる送受信フォーマットを有するマスター装置とのデータ送受信に有用であり、特に、デジタルフルカラープリンタ、デジタルフルカラー複写機、デジタル複合機などの画像形成装置、および通信装置に適している。 As described above, the clock synchronous serial interface circuit according to the present invention is useful for data transmission / reception with a master apparatus having different transmission / reception formats, and in particular, images of digital full-color printers, digital full-color copiers, digital multifunction peripherals, and the like. Suitable for forming apparatus and communication apparatus.
100 データ転送システム
101 CPU
102 周辺デバイス
103 インターフェイス回路
201 モード選択部
202a,202b F/F
203 シリアルカウンタ
204 S/P変換部
205a〜205c セレクタ
206 アドレス・データ生成部
207 レジスタ群
208 P/S変換部
209 異常検出部
100
102
203 Serial Counter 204 S /
Claims (6)
前記シリアルデータのうち所定のビットの状態に基づいて、前記マスター装置から送出される前記シリアルデータの送信フォーマットを判別する判別手段と、
前記判別手段によって判別された前記送信フォーマットに合わせて前記シリアルデータを受信する受信手段と、
を備えることを特徴とするクロック同期式シリアルインターフェイス回路。 A clock synchronous serial interface circuit provided in the slave device of the system that transmits a serial clock from the master device to the slave device and transmits and receives serial data including address information and data information of the slave device by the serial clock. And
A determination unit that determines a transmission format of the serial data transmitted from the master device based on a predetermined bit state of the serial data;
Receiving means for receiving the serial data in accordance with the transmission format determined by the determining means;
A clock synchronous serial interface circuit comprising:
前記シリアルデータのうち所定のビットの状態に基づいて、前記マスター装置の前記シリアルデータの受信フォーマットを判別する判別手段と、
前記判別手段によって判別された前記受信フォーマットに合わせて前記シリアルデータを送信する送信手段と、
を備えることを特徴とするクロック同期式シリアルインターフェイス回路。 A clock synchronous serial interface circuit provided in the slave device of the system that transmits a serial clock from the master device to the slave device and transmits and receives serial data including address information and data information of the slave device by the serial clock. And
Based on a state of a predetermined bit of the serial data, a determination unit that determines a reception format of the serial data of the master device;
Transmitting means for transmitting the serial data in accordance with the reception format determined by the determining means;
A clock synchronous serial interface circuit comprising:
前記アドレス情報が前記スレーブ装置のアドレス空間を構成するビット数よりも大きい場合に、剰余となる前記アドレス情報のビットの状態に基づいて、前記スレーブ装置内部の共有アドレスを構成する領域に前記データ情報を同時に書き込む書込手段を備えることを特徴とするクロック同期式シリアルインターフェイス回路。 A clock synchronous serial interface circuit provided in the slave device of the system that transmits a serial clock from the master device to the slave device and transmits and receives serial data including address information and data information of the slave device by the serial clock. And
When the address information is larger than the number of bits constituting the address space of the slave device, the data information is stored in an area constituting the shared address inside the slave device based on the bit state of the address information serving as a remainder. A clock synchronous serial interface circuit comprising a writing means for simultaneously writing
前記シリアルクロックおよび前記シリアルデータ以外の2つの信号を前記マスター装置から取得する取得手段と、
前記取得手段によって取得された前記2つの信号の論理レベルの組み合わせに基づいて、前記マスター装置から送出された前記データ情報を連続転送するか否かを判断する判断手段と、
前記判断手段によって連続転送すると判断された場合、前記スレーブ装置内部のアドレスを前記シリアルクロックによって生成される所定のカウンタ値に同期して更新する更新手段と、
を備えることを特徴とするクロック同期式シリアルインターフェイス回路。 A clock synchronous serial interface circuit provided in the slave device of the system that transmits a serial clock from the master device to the slave device and transmits and receives serial data including address information and data information of the slave device by the serial clock. And
Obtaining means for obtaining two signals other than the serial clock and the serial data from the master device;
Determining means for determining whether to continuously transfer the data information sent from the master device based on a combination of logic levels of the two signals acquired by the acquiring means;
An update means for updating an address in the slave device in synchronization with a predetermined counter value generated by the serial clock when it is determined by the determination means to be continuously transferred;
A clock synchronous serial interface circuit comprising:
前記シリアルクロックおよび前記シリアルデータ以外の2つの信号を前記マスター装置から取得する取得手段と、
前記取得手段によって取得された前記2つの信号に基づいて、前記マスター装置から送出された前記シリアルデータのライトタイミングを制御する制御クロックを生成する生成手段と、
前記シリアルクロックおよび前記2つの信号の異常状態を前記制御クロックの状態に基づいてそれぞれ検出する検出手段と、
前記検出手段によって異常を検出した場合、前記マスター装置との間での前記シリアルデータの送受信動作を停止する停止手段と、
前記検出手段によって異常を検出した場合、前記異常状態を報知する報知手段と、
を備えることを特徴とするクロック同期式シリアルインターフェイス回路。
A clock synchronous serial interface circuit provided in the slave device of the system that transmits a serial clock from the master device to the slave device and transmits and receives serial data including address information and data information of the slave device by the serial clock. And
Obtaining means for obtaining two signals other than the serial clock and the serial data from the master device;
Generating means for generating a control clock for controlling the write timing of the serial data sent from the master device based on the two signals acquired by the acquiring means;
Detecting means for detecting abnormal states of the serial clock and the two signals based on the state of the control clock;
When detecting an abnormality by the detection means, a stop means for stopping the transmission / reception operation of the serial data with the master device,
In the case where an abnormality is detected by the detection means, an informing means for informing the abnormal state;
A clock synchronous serial interface circuit comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006023476A JP2007206878A (en) | 2006-01-31 | 2006-01-31 | Clock synchronous serial interface circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006023476A JP2007206878A (en) | 2006-01-31 | 2006-01-31 | Clock synchronous serial interface circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007206878A true JP2007206878A (en) | 2007-08-16 |
Family
ID=38486312
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006023476A Pending JP2007206878A (en) | 2006-01-31 | 2006-01-31 | Clock synchronous serial interface circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007206878A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014021444A (en) * | 2012-07-23 | 2014-02-03 | Canon Inc | Information processing system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003309576A (en) * | 2002-04-16 | 2003-10-31 | Sony Corp | Apparatus for data transmission, method therefor and data conversion apparatus |
JP2005250681A (en) * | 2004-03-02 | 2005-09-15 | Sanyo Electric Co Ltd | Data transfer memory and module |
-
2006
- 2006-01-31 JP JP2006023476A patent/JP2007206878A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003309576A (en) * | 2002-04-16 | 2003-10-31 | Sony Corp | Apparatus for data transmission, method therefor and data conversion apparatus |
JP2005250681A (en) * | 2004-03-02 | 2005-09-15 | Sanyo Electric Co Ltd | Data transfer memory and module |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014021444A (en) * | 2012-07-23 | 2014-02-03 | Canon Inc | Information processing system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102339267B (en) | I2C address is changed | |
US6233635B1 (en) | Diagnostic/control system using a multi-level I2C bus | |
US5619722A (en) | Addressable communication port expander | |
EP2778941B1 (en) | Address translation in i2c data communications system | |
GB1581836A (en) | Cpu-i/o bus interface for a data processing system | |
US7340544B2 (en) | Method of using bus and bus interface | |
US5634013A (en) | Bus bridge address translator | |
US6931468B2 (en) | Method and apparatus for addressing multiple devices simultaneously over a data bus | |
JP4160068B2 (en) | Digital programming interface between baseband processor and radio frequency integrated module | |
JP2007206878A (en) | Clock synchronous serial interface circuit | |
EP3739463B1 (en) | Circuit for asynchronous data transfer | |
JP3459075B2 (en) | Synchronous serial bus method | |
US6216189B1 (en) | Error master detector | |
US8245089B2 (en) | Transmission device, image data transmission system and transmission method | |
US20050216646A1 (en) | Arbitration method of a bus bridge | |
JP3536777B2 (en) | Asynchronous system data transfer circuit and asynchronous system data transfer method | |
US5586272A (en) | Asynchronous data transfers among a plurality of computer devices | |
KR100295683B1 (en) | General call acknowledge apparatus and method for inter-integrated circuit | |
JP2007079964A (en) | Information processing apparatus and method for acquiring bus use right | |
JP2007025880A (en) | Data transfer method | |
US6901472B2 (en) | Data-processing unit with a circuit arrangement for connecting a first communications bus with a second communications bus | |
JP2845768B2 (en) | Time information synchronization device | |
JP2001134525A (en) | Id generating device | |
JP2625396B2 (en) | Receive data processing device | |
CN118210746A (en) | Microcontroller and sequence peripheral interface system using same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090121 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20090730 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110510 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110711 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120313 |