JP2007206878A - Clock synchronous serial interface circuit - Google Patents

Clock synchronous serial interface circuit Download PDF

Info

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
Application number
JP2006023476A
Other languages
Japanese (ja)
Inventor
Hiroki Okubo
博樹 大久保
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2006023476A priority Critical patent/JP2007206878A/en
Publication of JP2007206878A publication Critical patent/JP2007206878A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To transmit and receive serial data with a master device having a different transmitting and receiving format. <P>SOLUTION: An interface circuit 103 is a clock synchronous serial interface circuit provided in a peripheral device 102 of a system for transmitting a serial clock from a CPU 101 to the peripheral device 102 and transmitting and receiving serial data containing address information of the peripheral device 102 and data information by the serial clock. The interface circuit 103 determines the transmitting format of serial data of the CPU 101 based on the state of a predetermined bit of the serial data by a mode selection part 201 or the like. The serial data is received according to the transmitting format of the CPU 101 by a S/P conversion part 204. <P>COPYRIGHT: (C)2007,JPO&INPIT

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, Patent Document 1 below) And 2).

たとえば、下記特許文献1にかかるシリアル伝送装置は、スレーブアドレス選択部によって、マスターコントローラからのブロック選択信号に基づいて、第1または第2のスレーブアドレス選択部のいずれかを選択して出力する。そして、比較部によって、スレーブアドレス検出部によって検出されたスレーブアドレスと、スレーブアドレス選択部から供給されたスレーブアドレスを比較し、結果を出力する。   For example, the serial transmission apparatus according to Patent Document 1 below selects and outputs either the first or second slave address selection unit based on the block selection signal from the master controller by the slave address selection unit. Then, the comparison unit compares the slave address detected by the slave address detection unit with the slave address supplied from the slave address selection unit, and outputs the result.

また、下記特許文献2にかかるクロック同期式シリアルインターフェイス回路は、マスターからスレーブへシリアルクロックを送出する際に、シリアル信号送受の相手となるスレーブを、スレーブセレクト信号によって選択するシステムにおいて、スレーブ側に設けられるクロック同期式シリアルインターフェイス回路である。   In addition, the clock synchronous serial interface circuit according to Patent Document 2 described below is a system that selects a slave that is a serial signal transmission / reception partner by a slave select signal when transmitting a serial clock from a master to a slave. It is a clock synchronous serial interface circuit provided.

具体的には、マスターが送出するシリアルクロックの極性を、スレーブセレクト信号に基づいて自動的に判別するシリアルクロック極性判別回路と、極性判別回路の判別結果に基づいて、マスターから受け取ったシリアルクロックから当該スレーブが必要とする種類のクロックを生成するクロック生成部とを備えている。   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.

特開2000−172635号公報JP 2000-172635 A 特開2000−010917号公報JP 2000-010917 A

しかしながら、上述した従来技術によれば、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 claim 1 sends a serial clock from a master device to a slave device, and the address of the slave device by the serial clock. A clock synchronous serial interface circuit provided in the slave device of a system for transmitting and receiving serial data including information and data information, and transmitted from the master device based on a predetermined bit state of the serial data Determining means for determining the transmission format of the serial data; and receiving means for receiving the serial data in accordance with the transmission format determined by the determining means.

この請求項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 data transfer system 100 according to the embodiment will be described. FIG. 1 is an explanatory diagram of a system configuration of a data transfer system 100 according to the embodiment. The data transfer system 100 according to the embodiment includes a CPU 101 (101a to 101c) as a master device and a peripheral device 102 as a slave device. The peripheral device 102 includes an interface circuit 103 and a device body 104. A plurality of CPUs 101 and peripheral devices 102 are provided, and data is transferred between the respective CPUs 101 and the peripheral devices 102.

インターフェイス回路103は、マスター装置(CPU101)からスレーブ装置(周辺デバイス102)にシリアルクロックを送出し、シリアルクロックによって周辺デバイス102のアドレス情報とデータ情報とを含むシリアルデータの送受信をおこなうクロック同期式シリアルインターフェイス回路である。   The interface circuit 103 transmits a serial clock from the master device (CPU 101) to the slave device (peripheral device 102), and transmits and receives serial data including address information and data information of the peripheral device 102 by the serial clock. It is an interface circuit.

インターフェイス回路103は、シリアルクロックおよびシリアルデータ以外の2つの異なる信号を、それぞれCPU101から供給するとともに、周辺デバイス102にシリアルクロックとは独立したクロックを与えることによって、CPU101から周辺デバイス102へのライトタイミングの制御をおこなう。このとき、転送されるシリアルデータの特定ビットの状態によって、CPU101の送信フォーマットを特定し、特定したCPU101の送信フォーマットに合わせたシリアルデータ受信回路とを有する。   The interface circuit 103 supplies two different signals other than the serial clock and serial data from the CPU 101, and gives a write timing from the CPU 101 to the peripheral device 102 by giving the peripheral device 102 a clock independent of the serial clock. Control. At this time, the CPU 101 specifies the transmission format of the CPU 101 according to the state of the specific bit of the serial data to be transferred, and has a serial data receiving circuit that matches the specified transmission format of the CPU 101.

本実施の形態において、データがシリアル転送される周辺デバイス102は、最大13bitのアドレス空間、1アドレス16bit構成のレジスタを持つものとする。また、シリアル転送においては、通常はCPU101からの送信フォーマットを考慮して、シリアルクロックに同期して8bit(1byte)単位のデータが転送されるものとする。   In this embodiment, it is assumed that the peripheral device 102 to which data is serially transferred has a register having a maximum 13-bit address space and a 1-address 16-bit configuration. In serial transfer, data in units of 8 bits (1 byte) is normally transferred in synchronization with a serial clock in consideration of a transmission format from the CPU 101.

この構成において、CPU101からデータがシリアル転送される場合、最初の16bit(2byte)においては、13bitアドレスデータに加えて、リード/ライトの識別bit、パリティbitなどを付加したデータをCPU101で設定して転送する。その後、アドレスポインタに対応する16bitデータを、つぎの16bit(2byte)データとして周辺デバイス102に転送する。   In this configuration, when data is serially transferred from the CPU 101, in the first 16 bits (2 bytes), the CPU 101 sets data including a read / write identification bit, a parity bit, etc. in addition to the 13-bit address data. Forward. Thereafter, the 16-bit data corresponding to the address pointer is transferred to the peripheral device 102 as the next 16-bit (2 bytes) data.

つぎに、インターフェイス回路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 interface circuit 103 will be described. FIG. 2 is a block diagram showing a circuit configuration of the interface circuit 103. The interface circuit 103 includes a mode selection unit 201, F / F 202 (202a, 202b), serial counter 203, S / P conversion unit 204, selector 205 (205a to 205c), address / data generation unit 206, register group 207, P / S converter 208 and abnormality detector 209. In addition, the specific operation | movement of each part is demonstrated with reference to FIGS.

(データ転送時のデータフォーマットおよびタイミングチャート)
つづいて、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 CPU 101 to the peripheral device 102 will be described as an example in which data: 012356757h is serially transferred. Data transfer includes a little endian method in which data is recorded / transmitted in order from the least significant byte of data divided every 1 byte, and a big endian method in which data is recorded / transmitted in order from the most significant byte.

まず、リトルエンディアン方式でデータを転送する場合について説明する。図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 internal address 301, word data 302, byte data 303, CPU transfer order 304, and transfer data 305 to peripheral devices.

また、図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 / reception clock 401 and transmission / reception data 402 are shown. In the transmission / reception data 402, data 421 is 1-byte data and indicates 23 × h (see FIG. 3). Data 422 is data of the second byte and indicates 01 × h. Similarly, data 423 is the 3rd byte data, 67 × h, and data 424 is the 4th byte data, indicating 45 × h. The horizontal axis represents time t.

リトルエンディアン方式のCPU101から周辺デバイス102にデータ:01234567hをシリアル転送する場合、その転送順序は、23h→01h→67h→45hとなる。   When serially transferring data: 012356757h from the little-endian CPU 101 to the peripheral device 102, the transfer order is 23h → 01h → 67h → 45h.

つぎに、ビッグエンディアン方式でデータを転送する場合について説明する。図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 internal address 501, word data 502, byte data 503, CPU transfer order 504, and transfer data 505 to peripheral devices.

また、図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 / reception clock 601 and transmission / reception data 602 are shown. In the transmission / reception data 602, data 621 is 1-byte data and indicates 01 × h (see FIG. 5). Data 622 is data of the second byte and indicates 23 × h. Similarly, data 623 is the 3rd byte data and indicates 45 × h, and data 624 is the 4th byte data and indicates 67 × h. The horizontal axis represents time t.

ビッグエンディアン方式のCPU101から周辺デバイス102にデータ:01234567hをシリアル転送する場合、その転送順序は、01h→23h→45h→67hとなる。   When the data: 0123567h is serially transferred from the big endian CPU 101 to the peripheral device 102, the transfer order is 01h → 23h → 45h → 67h.

このように、送信フォーマットが異なる複数のCPU101から周辺デバイス102にデータを転送するには、周辺デバイス102でCPU101の送信フォーマット(エンディアンなど)を合わせる必要がある。本実施の形態では、周辺デバイス102に送信フォーマットを合わせるインターフェイス回路103を設け、複数のCPU101からのデータ送信に対応できるようにしている。   As described above, in order to transfer data from a plurality of CPUs 101 having different transmission formats to the peripheral device 102, it is necessary for the peripheral device 102 to match the transmission format (endian etc.) of the CPU 101. In this embodiment, an interface circuit 103 that matches the transmission format is provided in the peripheral device 102 so that it can cope with data transmission from a plurality of CPUs 101.

つぎに、各送信フォーマットに対するインターフェイス回路103の同期転送について説明する。まず、リトルエンディアン方式のCPU101(以下、CPU101aという)からのクロック同期シリアルデータ転送について説明する。図7は、リトルエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。なお、以下図7〜図9に示すタイミングチャートは、CPU101(CPU101a〜101c)から周辺デバイス102のアドレス0123番地に「4567h」をライトする場合を示している。   Next, synchronous transfer of the interface circuit 103 for each transmission format will be described. First, the clock synchronous serial data transfer from the little endian CPU 101 (hereinafter referred to as CPU 101a) will be described. FIG. 7 is a timing chart in the case of performing clock synchronous serial data transfer by the little endian method. The timing charts shown in FIGS. 7 to 9 below show a case where “4567h” is written from the CPU 101 (CPU 101a to 101c) to the address 0123 of the peripheral device 102.

図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 peripheral device 102 is assumed to be an address space 13 bit, 1 address 16 bit configuration, and one register write operation is performed by 8 bits × 4 serial transfers according to the transmission format from the CPU 101a. At this time, among the remaining 3 bits at the time of 13-bit address transfer, 1 bit is set as an RW bit for separating read / write by the peripheral device 102, and the remaining 2 bits are transferred as 0 as unused bits.

つぎに、ビッグエンディアン方式の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 CPU 101b) will be described. FIG. 8 is a timing chart in the case of performing clock synchronous serial data transfer by the big endian method. 8, the peripheral device chip select signal (SYCS_N) 801, serial clock (CLK_SY) 802, serial transfer data (SYDI_N) 803, and serial transfer data (SYDO_N) 804 from the peripheral device are the same as FIG. A continuous write mode signal (SYHS_N) 805 to be described later is shown.

この場合もリトルエンディアン方式のCPU101の場合と同様に、周辺デバイス102のレジスタ構成は、アドレス空間13bit、1アドレス16bit構成とし、CPU101bからの送信フォーマットに従って、8bit×4回のシリアル転送で1回のレジスタライト動作がおこなわれるものとする。   In this case as well, as in the case of the little endian CPU 101, the register configuration of the peripheral device 102 has an address space of 13 bits and an address of 16 bits. According to the transmission format from the CPU 101b, 8 bits × 4 serial transfers are performed once. Assume that a register write operation is performed.

さらに、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 CPU 101c) different from the CPU 101b will be described. Unlike the CPU 101b, the CPU 101c performs one register write operation by serial transfer of 32 bits × one time for the peripheral device 102 having an address space of 13 bits and 1 address of 16 bits.

図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 CPU 101c performs one register write operation by serial transfer of 32 bits × one time for the peripheral device 102 having the address space of 13 bits and 1 address of 16 bits. At this time, the remaining 3 bits at the time of 13-bit address transfer are 1 bit as an RW bit that separates read / write by the peripheral device 102, and the remaining 2 bits are transferred as 0 as an unused bit. However, as shown in FIG. Differently, the data is exchanged every 8 bits and transferred from the CPU 101c.

なお、図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 SYCS_N 701, 801, 901 and SYHS_N 705, 805, 905 are serially transferred from the CPU 101 in synchronization with CLK_SY 702, 802, 902, SYCS_N = L and SYHS_N = H. Shall be controlled. Here, _N of the signal line is defined as a name meaning low active.

(インターフェイス回路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 interface circuit 103 shown in FIG. 2 will be described. First, the mode selection unit 201 receives the chip select signal (SYCS_N) of the peripheral device 102 and the serial data (SYDI_N) from the CPU 101 in synchronization with the serial clock (CLK_SY). A normal write / read mode state and a continuous write mode state are generated by each signal obtained by ANDing the continuous write mode signals.

ここで、通常のライト/リードモード状態は、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 peripheral device 102.

F/F202aは、SYCS_N信号のネゲートエッジをCLK_REFで同期して、シリアルカウンタ203および周辺デバイス102のリード時に用いられるP/S変換部208のリセット信号を生成する。SYCS_N信号のネゲートエッジを用いることで、CPU101からの1回のシリアルデータ(アドレス情報+データ)転送ごとにカウンタがクリアされ、周辺デバイス102の内部回路を初期化することができる。   The F / F 202a generates a reset signal of the P / S conversion unit 208 used when reading the serial counter 203 and the peripheral device 102 in synchronization with the negated edge of the SYCS_N signal by CLK_REF. By using the negated edge of the SYCS_N signal, the counter is cleared each time serial data (address information + data) is transferred from the CPU 101, and the internal circuit of the peripheral device 102 can be initialized.

CPU101からのシリアルデータ(SYDI_N)は、シリアルクロック同期で入力されると、シリアルカウンタ203で内部カウンタを起動し、同時にS/P変換部204で、入力ビット数分のパラレルデータに変換される。ここで、周辺デバイス102のレジスタへのデータ書き込みは、シリアルクロックとは独立したクロックによるライトパルスを生成しておこなう。この独立したクロックとは、周辺デバイス102のリファレンスクロックである。   When the serial data (SYDI_N) from the CPU 101 is input in synchronization with the serial clock, the serial counter 203 starts the internal counter, and at the same time, the S / P converter 204 converts it into parallel data corresponding to the number of input bits. Here, data writing to the register of the peripheral device 102 is performed by generating a write pulse based on a clock independent of the serial clock. This independent clock is a reference clock of the peripheral device 102.

図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 peripheral device 102 from the little-endian CPU 101.

図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 CLK_REF frequency 1004, a wren pulse 1005, and a register address determination timing 1006. A shift data determination timing 1007 and an n-address data determination timing 1008 are shown.

周辺デバイス102のリファレンスクロックは、電源ONの間は一定の周波数で停止することなく与えられる。元のシリアルクロックでライトパルスを生成しない理由としては、CPU101で一定bit数を送信するごとにシリアルクロックを停止(High状態)する制御が発生する場合があり、このクロック停止によって、所望のレジスタへのライトタイミングの遅れが発生したり、あるいはライトし損なうなど、タイミング上制約が発生することが考えられるためである。   The reference clock of the peripheral device 102 is given without stopping at a constant frequency while the power is on. The reason why the write pulse is not generated with the original serial clock is that the CPU 101 may be controlled to stop the serial clock (High state) every time a certain number of bits are transmitted. This is because there may be a timing restriction such as a write timing delay or a write failure.

図10では、リトルエンディアン方式のCPU101からのシリアルデータ転送であるので、シリアルデータは13bitアドレスであり、16bitデータは図10に示したようなタイミングで入力される。これを、周辺デバイス102のアドレス・データ生成部206でデータを入れ替え、通常ライトか連続ライトかをセレクタ205bで選択する。   In FIG. 10, since serial data is transferred from the little-endian CPU 101, the serial data is a 13-bit address, and the 16-bit data is input at the timing shown in FIG. The data is exchanged by the address / data generation unit 206 of the peripheral device 102, and the selector 205b selects normal writing or continuous writing.

そして、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 / F 202b by a wren pulse generated synchronously from the reference clock. Here, in order to obtain a margin for timing control, CLK_REF frequency> CLK_SY frequency. As described above, in order to receive data from the CPU 101 having a different endian method, the serial / parallel conversion (S / P conversion) data configuration in the peripheral device 102 needs to be matched with the transmission format of the CPU 101.

そこで、どちらのエンディアン方式のCPU101であっても、周辺デバイス102で選択が可能となるような固有データを、CPU101から転送する。そして、周辺デバイス102でそのデータを受信した時に、CPU101の選択回路、および、データ送信フォーマット切り替え回路であるセレクタ205が起動するような構成としている。   Therefore, the CPU 101 transfers unique data that can be selected by the peripheral device 102 regardless of which endian CPU 101 is used. When the peripheral device 102 receives the data, the selection circuit of the CPU 101 and the selector 205 which is a data transmission format switching circuit are activated.

つづいて、前述した各エンディアン方式のCPU101a〜101cを周辺デバイス102のディフォルト選択設定とした時に、エンディアン方式の異なるCPU101を選択してシリアルデータ転送をおこなう場合について説明する。はじめに、リトルエンディアン方式のCPU101aをディフォルト選択設定として、ビッグエンディアン方式のCPU101bを選択する場合について説明する。   Next, a case where the CPU 101a to 101c of each endian system is set as the default selection setting of the peripheral device 102 and the CPU 101 having a different endian system is selected and serial data transfer is performed will be described. First, a case where the little endian CPU 101a is selected as the default selection setting and the big endian CPU 101b is selected will be described.

図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 peripheral device 102.

図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 state 1104 of the CPU 101a, the asserted state 1105 of the CPU 101b, Serial transfer data (SYDO_N) 1106 and continuous write mode signal (SYHS_N) 1107 are shown. For convenience of description, in the following drawings, the asserted state of the CPU 101a is represented as CPU101 <a>, the asserted state of the CPU101b is represented as CPU101 <b>, and the asserted state of the CPU101c is represented as CPU101 <c>.

CPU101aからのシリアル転送データ(SYDI_N)1103は、シリアルクロック(CLK_SY)1102の立ち下がりエッジに同期して入力されるものとし、以下のような手順でCPU選択回路を起動させる。   The serial transfer data (SYDI_N) 1103 from the CPU 101a is input in synchronization with the falling edge of the serial clock (CLK_SY) 1102, and the CPU selection circuit is activated in the following procedure.

まず、CPU101aから周辺デバイス102に、「FFFEh」をライトする。つぎに、後続の16bitデータとしてダミーデータを転送する。RW bit=1は従来通りであるが、通常ライト時に余りの2つのbitを0としていた部分については、それぞれ1を与えて周辺デバイス102に転送する。   First, “FFFEh” is written from the CPU 101 a to the peripheral device 102. Next, dummy data is transferred as subsequent 16-bit data. RW bit = 1 is the same as in the past, but for the portions in which the remaining two bits are set to 0 during normal writing, 1 is assigned to each portion and transferred to the peripheral device 102.

つまり、CPU101を選択するための転送時のみ、余りbitに1を与えて転送することによって、従来のライト転送と区別する。これにより、周辺デバイス102のシリアルデータ受信フォーマットが、ディフォルトのCPU101aからCPU101bに変更され、つぎの転送からは、後述する図12の説明に従って、CPU101bからのシリアルデータを受信することが可能となる。また、このとき、図2のセレクタ205aでは、状態信号のアサートがCPU101aからCPU101bへと変化する。   In other words, only the transfer for selecting the CPU 101 is distinguished from the conventional write transfer by giving the extra bit 1 for transfer. As a result, the serial data reception format of the peripheral device 102 is changed from the default CPU 101a to the CPU 101b, and the serial data from the CPU 101b can be received from the next transfer according to the description of FIG. At this time, in the selector 205a of FIG. 2, the assertion of the state signal changes from the CPU 101a to the CPU 101b.

つぎに、リトルエンディアン方式のCPU101aをディフォルト選択設定として、32biーt転送のビッグエンディアン方式のCPU101cを選択する場合について説明する。   Next, a case will be described in which the little-endian CPU 101a is set as the default selection setting and the 32-bit transfer big-endian CPU 101c is selected.

図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 peripheral device 102.

図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 state 1204 of the CPU 101a, assert state of the CPU 101c 1205, serial transfer data (SYDO_N) 1206 from the peripheral device, and continuous write mode signal (SYHS_N) 1207 are shown.

図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 CPU 101a to the peripheral device. Next, dummy data is transferred as subsequent 16-bit data. At this time, the transfer format is switched from the CPU 101a to the CPU 101c (the assertion of the status signal changes from the CPU 101a to the CPU 101c). Therefore, as shown in FIG. 9, serial data from the CPU 101c can be received.

以上の手順によって、各エンディアン方式のCPU101a〜101cを周辺デバイス102のディフォルト選択設定とした時に、エンディアン方式の異なるCPU101を選択してシリアルデータ転送をおこなう。他のCPU101どうしの組み合わせも同様に、デフォルトのCPU101からのシリアルデータを周辺デバイスに転送し、CPU101を選択する。   With the above procedure, when the endian CPUs 101a to 101c are set as the default selection of the peripheral device 102, the CPU 101 having a different endian system is selected to perform serial data transfer. Similarly, the combination of other CPUs 101 transfers the serial data from the default CPU 101 to the peripheral device and selects the CPU 101.

図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 peripheral device 102.

また、図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 peripheral device 102.

また、図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 peripheral device 102.

図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 peripheral device 102.

図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, CPU 101 asserted states 1304, 1305, 1404, 1405, 1504, 1505, 1604, 1605, serial transfer data (SYDO_N) 1306, 1406, 1506, 1606 from peripheral devices Write mode signals (SYHS_N) 1307, 1407, 1507, and 1607 are shown.

図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 CPU 101 is a transmission format selection operation, and the value of the subsequent 4-bit data (“Fh” “ Eh "etc.) to identify the CPU 101 transmission format.

インターフェイス回路103は、CPU101から周辺デバイス102への最初の12bitのデータを用いて通常ライト/CPU選択を判定し、続く4bitのデータを用いて、CPU101a〜CPU101cのいずれかを選択することとしている。なお、リード時のタイミングに関しては、CPU101の選択制御は起動せず、通常のまま動作をおこなう。   The interface circuit 103 determines normal write / CPU selection using the first 12 bits of data from the CPU 101 to the peripheral device 102, and selects any of the CPUs 101a to 101c using the subsequent 4 bits of data. Regarding the timing at the time of reading, the selection control of the CPU 101 is not started, and the operation is performed as usual.

このように、転送されたシリアルデータを周辺デバイス102で判別することによって、CPU101の送信フォーマットを特定する。そして、特定されたフォーマットに合わせたシフト回路を周辺デバイス102で選択することとしている。なお、周辺デバイス102は、CPU101aをディフォルト選択としているため、もし、CPU101aからCPU101b、あるいはCPU101cを選択後、CPU101aに戻したい場合は、図13および図14に示した送信フォーマットによって、周辺デバイス102に固有のシリアルデータを転送すればよい。   As described above, the transmission format of the CPU 101 is specified by determining the transferred serial data by the peripheral device 102. The peripheral device 102 selects a shift circuit that matches the specified format. Since the peripheral device 102 selects the CPU 101a as a default selection, if the CPU 101a selects the CPU 101b or the CPU 101c and then returns to the CPU 101a, the peripheral device 102 uses the transmission format shown in FIGS. It is only necessary to transfer unique serial data.

つぎに、周辺デバイス102からCPU101へとデータを出力する場合について説明する。図17は、周辺デバイスからリトルエンディアン方式のCPUにリードデータを出力する場合のシリアル転送データのタイミングチャートである。本タイミングチャートは、周辺デバイス102のアドレス0123番地のデータをリトルエンディアン方式のCPU101aにリードする場合を示している。   Next, a case where data is output from the peripheral device 102 to the CPU 101 will be described. FIG. 17 is a timing chart of serial transfer data when read data is output from a peripheral device to a little endian CPU. This timing chart shows a case where the data at address 0123 of the peripheral device 102 is read to the little-endian CPU 101a.

また、図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 peripheral device 102 is read to the big-endian CPU 101a.

図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 / S conversion unit 208 in FIG. 2). This is in consideration of the reception format of the CPU 101 that receives the read data. Further, a register flag for exchanging read data in units of 8 bits may be provided for debugging the peripheral device 102 or the like. This can also be applied when serial data is written from the CPU 101 to the peripheral device 102.

また、図17および図18において、CPU101へのシリアルデータ送信回路に、クロックエッジの選択手段を設けてもよい。具体的には、周辺デバイス102の内部レジスタに、シリアルクロックのエッジ選択用レジスタフラグを設け、任意の送受信フォーマットのCPU101に対して、シリアルクロックのいずれかのエッジを用いてシリアルデータを転送するようにする。   17 and 18, the serial data transmission circuit to the CPU 101 may be provided with clock edge selection means. Specifically, a serial clock edge selection register flag is provided in the internal register of the peripheral device 102 so that serial data is transferred to the CPU 101 having an arbitrary transmission / reception format using one of the edges of the serial clock. To.

このようにして、CPU101の変更に伴って、周辺デバイス102のレジスタフラグの設定をおこなえば、容易に動作の切り替えをすることができる(図2のセレクタ205c参照)。この場合、フラグのディフォルト設定値は、最初に設定されるCPU101の動作エッジに合わせておく。図17では、CPU101への出力を、シリアルクロックの立ち下がりエッジでおこなっている。また、図18は、CPU101への出力を、シリアルクロックの立ち上がりエッジでおこなっている。   In this way, if the register flag of the peripheral device 102 is set in accordance with the change of the CPU 101, the operation can be easily switched (see the selector 205c in FIG. 2). In this case, the default setting value of the flag is matched with the operation edge of the CPU 101 set first. In FIG. 17, the output to the CPU 101 is performed at the falling edge of the serial clock. In FIG. 18, output to the CPU 101 is performed at the rising edge of the serial clock.

また、CPU101から転送されるアドレス情報は、周辺デバイス102のアドレス空間を構成するビット数よりも大きいものとし、剰余となるアドレス情報のビットの状態に応じて、周辺デバイス102の共有アドレスを構成する領域に、CPU101からのデータ情報を同時に書き込むこととしてもよい。   Further, the address information transferred from the CPU 101 is larger than the number of bits constituting the address space of the peripheral device 102, and constitutes the shared address of the peripheral device 102 according to the state of the bits of the address information as a remainder. Data information from the CPU 101 may be simultaneously written in the area.

図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, register address 1904, chip select 1905, reference clock (CLK_REF) 1906, wren of peripheral devices. A pulse 1907, data 1908, serial read data (SYDO_N) 1909, and continuous write mode signal (SYHS_N) 1910 are shown.

図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 CPU 101 to the peripheral device 102 whose address space is configured with add [11: 0]. The add [12] bit is a bit in an area not normally used in data transfer from the CPU 101 to the peripheral device 102, and is set to 0.

一方、フルカラーの画像形成装置などに用いられる周辺デバイス102は、各色に対応させるため、1つの周辺デバイス102の内部に色ごとの領域を確保し、共通のアドレス空間には、それぞれ同一機能のレジスタを配置することがある。たとえば、Y(イエロー)、M(マゼンタ)、C(シアン)、BK(ブラック)に各対応するγ補正テーブルデータを、add[11:0]のうちの任意のアドレスに配置する。   On the other hand, the peripheral device 102 used in a full-color image forming apparatus or the like secures an area for each color in one peripheral device 102 so as to correspond to each color, and registers of the same function are provided in a common address space. May be placed. For example, γ correction table data corresponding to Y (yellow), M (magenta), C (cyan), and BK (black) is arranged at an arbitrary address of add [11: 0].

通常、これらのテーブルデータを設定する際は、CPU101からそれぞれのブロックごとにシリアルデータを転送する方法が一般的であるが、これでは、同一データを設定する場合などは、データ転送に色の数に相当する4倍の時間がかかってしまう。このため、CPU101からの剰余ビットであるadd[12]ビットを1に設定することにより、共通機能のレジスタに同一データを一度にライトする。   Normally, when setting these table data, a method of transferring serial data from the CPU 101 for each block is generally used. However, in this case, when setting the same data, the number of colors is used for data transfer. It takes four times as much time. Therefore, by setting the add [12] bit, which is a surplus bit from the CPU 101, to 1, the same data is written to the common function register at a time.

図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 CPU 101. Since the detected bit state is 1, chip select of four registers of cs00XX, cs01XX, cs02XX, and cs03XX are asserted simultaneously.

これにより、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 peripheral device 102 by one serial data transfer, thereby shortening the communication time. Note that if it is not necessary to write simultaneously at the same time, the add [12] bit may be returned to 0 and data may be transmitted from the CPU 101 as usual.

また、2つの信号の論理レベルの組み合わせによって、CPU101から周辺デバイス102にデータ情報を連続転送する選択回路を設け、連続転送時の周辺デバイス102の内部アドレスを、シリアルクロックによって生成される特定のカウンタ値に同期して更新することとしてもよい。具体的には、周辺デバイス102内部の任意のレジスタアドレスから自動的にインクリメントしていき、CPU101からの連続データ転送(16bit単位)に対応する手段を与える。   In addition, a selection circuit for continuously transferring data information from the CPU 101 to the peripheral device 102 according to the combination of the logic levels of the two signals is provided, and the internal address of the peripheral device 102 at the time of continuous transfer is a specific counter generated by a serial clock. It may be updated in synchronization with the value. Specifically, it automatically increments from an arbitrary register address in the peripheral device 102, and provides means corresponding to continuous data transfer (in units of 16 bits) from the CPU 101.

図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, serial counter value 2004, address 2005, serial read data (SYDO_N) 2006, A continuous write mode signal (SYHS_N) 2007 is shown respectively.

図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 peripheral device 102. As described above, the chip select signal is controlled as SYCS_N, and the continuous write mode signals are controlled as SYCS_N = L and SYHS_N = H. At this time, the peripheral device 102 holds the address value = n transferred from the CPU 101.

ここで、インターフェイス回路103は、通常ライトモードを連続ライトモードに切り替えるが、CPU101で、SYCS_N=L,SYHS_N=Lと信号レベルの設定を変更する。また、周辺デバイス102のアドレス=nに相当するデータに続いて、CPU101からの16bitのシリアルデータは、以降n+1,n+2,・・・と連続で周辺デバイス102にライトされる。   Here, the interface circuit 103 switches the normal write mode to the continuous write mode, but the CPU 101 changes the signal level setting to SYCS_N = L and SYHS_N = L. Further, following the data corresponding to the address = n of the peripheral device 102, the 16-bit serial data from the CPU 101 is subsequently written to the peripheral device 102 successively as n + 1, n + 2,.

なお、アドレスのインクリメントタイミングは、シリアルデータの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 CPU 101 in the little endian format.

ただし、F/F202bからレジスタ群207へ出力されるライトパルス信号(wren)は、リファレンスクロックによって同期化されたパルス信号を用いるため、シリアルクロックとの間で非同期の関係が生じる。さらに、互いのクロック周波数の比率によって、たとえば、リファレンスクロック周波数よりシリアルクロック周波数が大きい場合、アドレスをインクリメントするタイミングの方が、ライトパルス信号(wren)を生成するタイミングよりも早くなり、n番地にライトすべきデータが、n+1番地にライトされてしまう場合もある。   However, since the write pulse signal (wren) output from the F / F 202b to the register group 207 uses a pulse signal synchronized with the reference clock, there is an asynchronous relationship with the serial clock. Further, depending on the ratio of the clock frequencies to each other, for example, when the serial clock frequency is larger than the reference clock frequency, the timing of incrementing the address is earlier than the timing of generating the write pulse signal (wren), and the address n is increased. Data to be written may be written at address n + 1.

このような場合、互いの周波数比に応じて、アドレスインクリメントのタイミングを任意に変更するレジスタフラグなどを設けておくか、十分にタイミングマージンを取って、レジスタアドレスの自動インクリメントをおこなえばよい。   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 abnormality detection unit 209 detects an abnormal state of the serial clock and two different control signals (a peripheral device chip select signal and a continuous transfer control signal) using a clock independent of the serial clock. Further, when an abnormality is detected during serial data transfer from the CPU 101, the abnormality detection unit 209 stops the serial data transmission / reception operation between the CPU 101 and the peripheral device 102 and notifies the abnormal state.

具体的には、異常検出部209は、シリアルクロックや、2つの制御信号(周辺デバイスのチップセレクト信号および連続転送制御信号)の波形異常(クロック抜け、ノイズ)などを検出し、転送時のシリアルデータのパリティエラー以外の異常を検出する。   Specifically, the abnormality detection unit 209 detects a serial clock or a waveform abnormality (clock loss, noise) of two control signals (chip select signal and continuous transfer control signal of a peripheral device) and the like, and performs serial transfer. Detects errors other than data parity errors.

図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, serial counter value 2104, reference clock (CLK_REF) 2105, holding counter value 2106 of the peripheral device are shown. , An abnormality detection pulse 2107, a wren pulse 2108, a serial read data (SYDO_N) 2109, and a continuous write mode signal (SYHS_N) 2110 are shown.

図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 / F 202b (wren pulse generation unit) that starts operation at the next rising edge of CLK_SY after serial counter = 1fh (31) does not operate, and the write operation to the 0123h address register is performed. It will not be.

このため、インターフェイス回路103では、1回のライト動作に必要なシリアルクロックのパルス数をあらかじめ記憶しておく。そして、実際の1回の転送処理が終了するごと(本実施の形態では、チップセレクト信号:SYCS_Nのネゲートエッジを検出)に、リファレンスクロック(CLK_REF)でシリアルクロック(CLK_SY)の数をカウントし、あらかじめ記録された記録値と比較する。この比較結果が異なった時に異常と判断し、異常検出部209は、CPU101に異常状態信号を送出する。   Therefore, the interface circuit 103 stores in advance the number of serial clock pulses required for one write operation. Then, every time one actual transfer process is completed (in this embodiment, the negate edge of the chip select signal: SYCS_N is detected), the number of serial clocks (CLK_SY) is counted with the reference clock (CLK_REF), Compare with pre-recorded values. When the comparison results are different, it is determined that there is an abnormality, and the abnormality detection unit 209 sends an abnormal state signal to the CPU 101.

図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, serial counter value 2204, reference clock (CLK_REF). 2205, holding counter value 2206, abnormality detection pulse 2207, wren pulse 2208, serial read data (SYDO_N) 2209, and continuous write mode signal (SYHS_N) 2210 are shown.

なお、シリアルクロック(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 abnormality detection unit 209 detects an abnormality due to generation of an extra clock such as noise or missing clock. Under the detected abnormal state, data writing to the peripheral device 102 is not performed, and the CPU 101 is notified of the abnormal state. This configuration is applied during a register read operation from the peripheral device 102 to the CPU 101.

また、チップセレクト信号(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 peripheral device 102 is not performed, and an abnormal state is notified to the CPU 101 at the same time.

以上のように、異常検出部209で図22のような異常タイミングを検出することによって、一般的なパリティエラー以外での状態異常に対するエラー処理に対応することができる。なお、異常検出部209は、前述のように各入力信号の状態変化を保持し、それを正常な状態と比較することで異常と判断できる構成であれば、他の信号を用いて異常を検出してもよい。   As described above, by detecting the abnormality timing as shown in FIG. 22 by the abnormality detection unit 209, it is possible to cope with error processing for a state abnormality other than a general parity error. As described above, the abnormality detection unit 209 detects the abnormality using other signals if it is configured to hold the change in the state of each input signal and compare it with the normal state. May be.

なお、本実施の形態では、周辺デバイス102で選択すべきCPU101を3種類としたが、CPU101からのシリアルデータの組み合わせと、特定すべきCPU101の認識条件を考慮することによって、3種類以上の種類のCPU101を選択することもできる。これにより、より拡張性の高いシステムの構築が可能となる。また、本実施の形態では、CPU101のエンディアン方式は、主にリトルエンディアン方式の場合について説明したが、ビッグエンディアン方式や他の方式のCPU101に関しても、同様に適用することができ、さらに、フルカラー画像形成装置などの機器に対しても実施することができる。   In this embodiment, the CPU 101 to be selected by the peripheral device 102 is set to three types. However, considering the combination of serial data from the CPU 101 and the recognition conditions of the CPU 101 to be specified, there are three or more types. The CPU 101 can also be selected. This makes it possible to construct a system with higher expandability. In the present embodiment, the endian method of the CPU 101 is mainly described in the case of the little endian method. However, the present invention can be similarly applied to the CPU 101 of the big endian method and other methods, and further, a full-color image. It can also be carried out on equipment such as a forming apparatus.

以上説明したように、本実施の形態にかかるクロック同期式シリアルインターフェイス回路によれば、マスター装置の送受信フォーマットに合わせてシリアルデータを送受信することによって、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のシステム構成を示す説明図である。It is explanatory drawing which shows the system configuration | structure of the data transfer system 100 concerning embodiment. インターフェイス回路103の回路構成を示すブロック図である。3 is a block diagram showing a circuit configuration of an interface circuit 103. FIG. リトルエンディアン方式でシリアルデータ転送をおこなう場合のデータフォーマットを示す説明図である。It is explanatory drawing which shows the data format in the case of performing serial data transfer by a little endian system. リトルエンディアン方式でシリアルデータ転送をおこなう場合のタイミングチャートである。It is a timing chart in the case of performing serial data transfer by a little endian system. ビッグエンディアン方式でシリアルデータ転送をおこなう場合のデータフォーマットを示す説明図である。It is explanatory drawing which shows the data format in the case of performing serial data transfer by a big endian system. ビッグエンディアン方式でシリアルデータ転送をおこなう場合のタイミングチャートである。It is a timing chart in the case of performing serial data transfer by a big endian system. リトルエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。It is a timing chart in the case of performing clock synchronous serial data transfer by a little endian system. ビッグエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。It is a timing chart in the case of performing clock synchronous serial data transfer by a big endian system. ビッグエンディアン方式でクロック同期シリアルデータ転送をおこなう場合のタイミングチャートである。It is a timing chart in the case of performing clock synchronous serial data transfer by a big endian system. リファレンスクロックを使用したライトパルス生成時のタイミングチャートである。6 is a timing chart when a write pulse is generated using a reference clock. ディフォルトがリトルエンディアン方式の時に、ビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。10 is a timing chart of serial transfer data when a big endian CPU is selected when a default is a little endian system. ディフォルトがリトルエンディアン方式の時に、32bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。10 is a timing chart of serial transfer data when a 32-bit transfer big-endian CPU is selected when the default is a little-endian method. ディフォルトが32bit転送のビッグエンディアン方式の時に、リトルエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。FIG. 6 is a timing chart of serial transfer data when a little endian CPU is selected when a default is a big endian method of 32-bit transfer. ディフォルトが32bit転送のビッグエンディアン方式の時に、8bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。FIG. 10 is a timing chart of serial transfer data when a CPU of an 8-bit transfer big endian method is selected when a default is a big endian method of 32 bit transfer. ディフォルトがビッグエンディアン方式の時に、リトルエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。6 is a timing chart of serial transfer data when a little endian CPU is selected when the default is a big endian system. ディフォルトが8bit転送のビッグエンディアン方式の時に、32bit転送のビッグエンディアン方式のCPUを選択する場合のシリアル転送データのタイミングチャートである。FIG. 10 is a timing chart of serial transfer data when a 32-bit transfer big endian CPU is selected when the default is an 8-bit transfer big endian method. 周辺デバイスからリトルエンディアン方式のCPUにリードデータを出力する場合のシリアル転送データのタイミングチャートである。6 is a timing chart of serial transfer data when read data is output from a peripheral device to a little endian CPU. 周辺デバイスからビッグエンディアン方式のCPUにリードデータを出力する場合のシリアル転送データのタイミングチャートである。6 is a timing chart of serial transfer data when read data is output from a peripheral device to a big endian CPU. リトルエンディアン方式のCPUからレジスタへ同時ライトする場合のタイミングチャートである。6 is a timing chart in the case of simultaneous writing from a little endian CPU to a register. リトルエンディアン方式のCPUからレジスタへ高速ライトする場合のタイミングチャートである。7 is a timing chart when writing data from a little endian CPU to a register at high speed. リトルエンディアン方式のCPUから周辺デバイスへの正常なライトタイミングを示すタイミングチャートである。6 is a timing chart illustrating normal write timing from a little endian CPU to a peripheral device. リトルエンディアン方式のCPUから周辺デバイスへの異常なライトタイミングを示すタイミングチャートである。6 is a timing chart showing abnormal write timing from a little endian CPU to a peripheral device.

符号の説明Explanation of symbols

100 データ転送システム
101 CPU
102 周辺デバイス
103 インターフェイス回路
201 モード選択部
202a,202b F/F
203 シリアルカウンタ
204 S/P変換部
205a〜205c セレクタ
206 アドレス・データ生成部
207 レジスタ群
208 P/S変換部
209 異常検出部

100 data transfer system 101 CPU
102 Peripheral device 103 Interface circuit 201 Mode selection unit 202a, 202b F / F
203 Serial Counter 204 S / P Converter 205a to 205c Selector 206 Address / Data Generator 207 Register Group 208 P / S Converter 209 Abnormality Detector

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:
前記送信手段は、前記シリアルクロックのうち前記シリアルデータの送信タイミングを示すクロックエッジを選択可能なことを特徴とする請求項2に記載のクロック同期式シリアルインターフェイス回路。   3. The clock synchronous serial interface circuit according to claim 2, wherein the transmission means can select a clock edge indicating a transmission timing of the serial data from the serial clock. マスター装置からスレーブ装置へシリアルクロックを送出するとともに、前記シリアルクロックによって前記スレーブ装置のアドレス情報とデータ情報とを含むシリアルデータを送受信するシステムの前記スレーブ装置に設けられるクロック同期式シリアルインターフェイス回路であって、
前記アドレス情報が前記スレーブ装置のアドレス空間を構成するビット数よりも大きい場合に、剰余となる前記アドレス情報のビットの状態に基づいて、前記スレーブ装置内部の共有アドレスを構成する領域に前記データ情報を同時に書き込む書込手段を備えることを特徴とするクロック同期式シリアルインターフェイス回路。
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:

JP2006023476A 2006-01-31 2006-01-31 Clock synchronous serial interface circuit Pending JP2007206878A (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014021444A (en) * 2012-07-23 2014-02-03 Canon Inc Information processing system

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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