JP2009163531A - Interruption management mechanism and microcomputer - Google Patents

Interruption management mechanism and microcomputer Download PDF

Info

Publication number
JP2009163531A
JP2009163531A JP2008000990A JP2008000990A JP2009163531A JP 2009163531 A JP2009163531 A JP 2009163531A JP 2008000990 A JP2008000990 A JP 2008000990A JP 2008000990 A JP2008000990 A JP 2008000990A JP 2009163531 A JP2009163531 A JP 2009163531A
Authority
JP
Japan
Prior art keywords
register
interrupt
transmission
cpu
spi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2008000990A
Other languages
Japanese (ja)
Inventor
Hideaki Tomatsuri
英明 戸祭
Masanori Akashi
昌訓 明石
Atsushi Fujita
藤田  淳
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.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2008000990A priority Critical patent/JP2009163531A/en
Publication of JP2009163531A publication Critical patent/JP2009163531A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the number of execution times of interruption processing in a CPU and to improve the processing efficiency of the CPU. <P>SOLUTION: In a microcomputer (10) for executing data transfer between the CPU (20) and a memory (60) through a serial interface (50), an interruption management mechanism (40) for managing an interruption request of the serial interface (50) includes state transition circuits (42f, 42g) and an interruption request issue circuit (42). The state transition circuits (42f, 42g) transit their states according to a sort of the interruption request and the number of issues in accordance with the issue of the interruption request from the serial interface (50). The interruption request issue circuit (42) issues an interruption request to the CPU (20) when the states of the state transition circuits (42f, 42g) are transited to prescribed states. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、割り込み管理機構およびマイクロコンピュータに関する。   The present invention relates to an interrupt management mechanism and a microcomputer.

シリアルインタフェース対応型メモリ(1ビットのデータ入出力部を有するメモリ)を搭載したマイクロコンピュータにおいては、メモリに対してライトアクセス/リードアクセスを実施するための回路としてシリアル通信回路(シリアルインタフェース)が搭載されており、シリアル通信回路を介してCPU(Central Processing Unit)およびメモリ間のデータ転送が実施される。シリアル通信回路は、メモリに対するアクセスの際に、「コマンド送信動作」、「アドレス送信動作」、「データ送信動作/データ受信動作」の順序で動作状態を遷移させるシーケンス動作を実施し、動作状態を遷移させる度にCPUに対して割り込み要求を発行する。従って、シリアルインタフェース対応型メモリを搭載したマイクロコンピュータにおいては、CPUおよびメモリ間のデータ転送の際に、CPUにより割り込み処理が何度も実行されることになる。   In a microcomputer equipped with a serial interface compatible memory (memory having a 1-bit data input / output unit), a serial communication circuit (serial interface) is installed as a circuit for performing write access / read access to the memory. Data transfer between a CPU (Central Processing Unit) and a memory is performed via a serial communication circuit. When accessing the memory, the serial communication circuit performs a sequence operation for changing the operation state in the order of “command transmission operation”, “address transmission operation”, “data transmission operation / data reception operation”, and changes the operation state. Each time a transition is made, an interrupt request is issued to the CPU. Therefore, in a microcomputer equipped with a serial interface compatible memory, interrupt processing is repeatedly executed by the CPU during data transfer between the CPU and the memory.

なお、本発明に関連する先行技術文献としては、例えば、特許文献1、2が挙げられる。特許文献1には、マイクロコンピュータに関して、マイクロコンピュータ間のデータ転送を高速に且つ効率よく実施するための技術が開示されている。また、特許文献2には、DMA(Direct Memory Access)コントローラに関して、転送情報の設定回数を低減し、DMA転送を効率よく実施するための技術が開示されている。
特開平4−169955号公報 特開2003−256356号公報
In addition, as a prior art document relevant to this invention, patent document 1, 2 is mentioned, for example. Japanese Patent Application Laid-Open No. 2004-228561 discloses a technique for performing data transfer between microcomputers at high speed and efficiently with respect to the microcomputer. Patent Document 2 discloses a technique for efficiently executing DMA transfer by reducing the number of times transfer information is set for a DMA (Direct Memory Access) controller.
Japanese Patent Laid-Open No. 4-169955 JP 2003-256356 A

シリアルインタフェース対応型メモリを搭載したマイクロコンピュータでは、CPUおよびメモリ間のデータ転送の際に、シリアル通信回路により割り込み要求が発行される度にCPUが割り込み処理を実施する必要があるため、CPUが本来実行すべき処理に専念できずにCPUの処理効率が低下するという問題があった。   In a microcomputer equipped with a serial interface compatible memory, the CPU needs to execute an interrupt process every time an interrupt request is issued by the serial communication circuit when transferring data between the CPU and the memory. There is a problem in that the processing efficiency of the CPU is lowered because the processing to be executed cannot be concentrated.

本発明は、このような問題点に鑑みてなされたものであり、CPUおよびメモリ間のデータ転送がシリアルインタフェースを介して実施されるマイクロコンピュータにおいてCPUの割り込み処理の実施回数を低減してCPUの処理効率を向上させることを目的とする。   The present invention has been made in view of such problems, and in a microcomputer in which data transfer between a CPU and a memory is performed via a serial interface, the number of CPU interrupt processing executions is reduced to reduce the CPU. It aims at improving processing efficiency.

割り込み管理機構は、CPUおよびメモリ間のデータ転送がシリアルインタフェースを介して実施されるマイクロコンピュータにおいてシリアルインタフェースの割り込み要求を管理する割り込み管理機構であって、状態遷移回路と、割り込み要求発行回路とを備える。状態遷移回路は、シリアルインタフェースが割り込み要求を発行するのに伴って、その割り込み要求の種類および発行回数に応じて状態が遷移する。割り込み要求発行回路は、状態遷移回路が所定の状態に遷移するのに伴って、CPUに割り込み要求を発行する。   The interrupt management mechanism is an interrupt management mechanism that manages an interrupt request of a serial interface in a microcomputer in which data transfer between the CPU and the memory is performed via the serial interface, and includes a state transition circuit and an interrupt request issue circuit. Prepare. In the state transition circuit, as the serial interface issues an interrupt request, the state transitions according to the type of interrupt request and the number of times it is issued. The interrupt request issue circuit issues an interrupt request to the CPU as the state transition circuit changes to a predetermined state.

例えば、状態遷移回路は、第1および第2レジスタと、第1および第2カウンタとを備える。第1レジスタは、シリアルインタフェースにおけるメモリへのアクセス時の状態遷移回数を示す情報を保持する。第2レジスタは、シリアルインタフェースにおけるメモリへのアクセス時のデータ転送回数を示す情報を保持する。第1カウンタは、シリアルインタフェースの状態遷移に伴う割り込み要求の発行回数をカウントする。第2カウンタは、第1カウンタのカウント動作が第1レジスタの情報に対応する回数実施された後、シリアルインタフェースのデータ転送に伴う割り込み要求の発行回数をカウントする。割り込み要求発行回路は、第2カウンタのカウント動作が第2レジスタの情報に対応する回数実施されるのに伴って、CPUに割り込み要求を発行する。   For example, the state transition circuit includes first and second registers and first and second counters. The first register holds information indicating the number of state transitions when accessing the memory in the serial interface. The second register holds information indicating the number of data transfers at the time of accessing the memory in the serial interface. The first counter counts the number of times an interrupt request is issued due to the state transition of the serial interface. The second counter counts the number of issuance of interrupt requests accompanying the data transfer of the serial interface after the count operation of the first counter is performed the number of times corresponding to the information in the first register. The interrupt request issuing circuit issues an interrupt request to the CPU as the count operation of the second counter is performed a number of times corresponding to the information in the second register.

CPUおよびメモリ間のデータ転送がシリアルインタフェースを介して実施されるマイクロコンピュータにおいて、CPUの割り込み処理の実施回数を低減することができ、CPUの処理効率の向上を実現できる。   In a microcomputer in which data transfer between the CPU and the memory is performed via a serial interface, the number of CPU interrupt processes can be reduced, and the CPU processing efficiency can be improved.

以下、本発明の実施形態について図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態を示している。マイクロコンピュータ10は、CPU20、割り込みコントローラ30、ISU(Interrupt Scheduling Unit)40、SPI(Serial Peripheral Interface)50およびSPI対応型メモリ60を備えて構成されている。   FIG. 1 shows an embodiment of the present invention. The microcomputer 10 includes a CPU 20, an interrupt controller 30, an ISU (Interrupt Scheduling Unit) 40, an SPI (Serial Peripheral Interface) 50, and an SPI-compatible memory 60.

CPU20は、プログラムメモリ(図示せず)に格納されたプログラムに従って各種処理を実行する。割り込みコントローラ30は、割り込み信号IRQT、IRQRを含む複数の割り込み信号のいずれかが活性化されると、活性化された割り込み信号に対して予め割り当てられた割り込み番号をCPU20に通知するとともに、割り込み処理の実行をCPU20に要求する。これにより、CPU20において、割り込みコントローラ30から通知された割り込み番号に対応する割り込み処理が実行される。   The CPU 20 executes various processes according to a program stored in a program memory (not shown). When any one of the plurality of interrupt signals including the interrupt signals IRQT and IRQR is activated, the interrupt controller 30 notifies the CPU 20 of an interrupt number assigned in advance to the activated interrupt signal and performs interrupt processing. Is requested to the CPU 20. As a result, the CPU 20 executes the interrupt process corresponding to the interrupt number notified from the interrupt controller 30.

ISU40は、送受信部41および制御部42を備えて構成されている。送受信部41は、送信バッファ41aおよび受信バッファ41bを備えて構成されている。送受信部41は、CPU20による送信バッファ41aへのライトアクセスに伴って、CPU20からシステムバスBUSを介して供給されるデータを送信バッファ41aに格納する。送受信部41は、CPU20による受信バッファ41bへのリードアクセスに伴って、受信バッファ41bに格納されているデータをCPU20にシステムバスBUSを介して供給する。また、送受信部41は、制御部42の指示に従って、SPI50内のレジスタに対してライトアクセス/リードアクセスを実施する。送受信部41は、SPI50内のレジスタに対するライトアクセスの際に、送信バッファ41aに格納されているデータをライトデータとしてSPI50に供給する。送受信部41は、SPI50内のレジスタに対するリードアクセスの際に、SPI50から供給されるリードデータを受信バッファ41bに格納する。なお、送受信部41は、送信バッファ41aに格納されているデータがSPI50内のレジスタ(モード設定レジスタ52aなど)を設定するためのデータであることを認識すると、SPI50内のレジスタを設定すべくライトアクセスを実施する。   The ISU 40 includes a transmission / reception unit 41 and a control unit 42. The transmission / reception unit 41 includes a transmission buffer 41a and a reception buffer 41b. The transmission / reception unit 41 stores data supplied from the CPU 20 via the system bus BUS in the transmission buffer 41a in accordance with the write access to the transmission buffer 41a by the CPU 20. The transmission / reception unit 41 supplies the data stored in the reception buffer 41b to the CPU 20 via the system bus BUS in accordance with the read access to the reception buffer 41b by the CPU 20. Further, the transmission / reception unit 41 performs write access / read access to the registers in the SPI 50 in accordance with instructions from the control unit 42. The transmission / reception unit 41 supplies the data stored in the transmission buffer 41a to the SPI 50 as write data at the time of write access to the register in the SPI 50. The transmission / reception unit 41 stores the read data supplied from the SPI 50 in the reception buffer 41b at the time of read access to the register in the SPI 50. When the transmission / reception unit 41 recognizes that the data stored in the transmission buffer 41a is data for setting a register (such as the mode setting register 52a) in the SPI 50, the transmission / reception unit 41 writes to set the register in the SPI 50. Implement access.

制御部42は、転送設定レジスタ42a、ステート管理カウンタ42fおよび転送回数カウンタ42gを備えて構成されている。転送設定レジスタ32aは、CPU20によりアクセス可能なレジスタであり、転送開始ビット42b、割り込み設定ビット42c、転送シーケンス設定ビット42dおよび転送データ長設定ビット42eを有している。転送開始ビット42bは、ISU40の動作開始を指示するためのビットである。例えば、転送開始ビット42bは、ISU40の動作を開始させる場合に“1”に設定される。割り込み設定ビット42cは、転送回数カウンタ42gのカウント要因として割り込み信号IRQTS、IRQRSのいずれかを設定するためのビットである。例えば、割り込み設定ビット42cは、転送回数カウンタ42gのカウント要因として割り込み信号IRQTSを設定する場合に“0”に設定され、転送回数カウンタ42gのカウント要因として割り込み信号IRQRSを設定する場合に“1”に設定される。転送シーケンス設定ビット42dは、SPI50におけるメモリ60へのアクセス時の状態遷移回数を設定するためのビットである。例えば、転送シーケンス設定ビット42dは、SPI50においてメモリ60に対するアクセスの際に「コマンド送信動作」、「上位アドレス送信動作」、「データ送信動作/データ受信動作」の順序で動作状態を遷移させるシーケンス動作が実施される場合に(SPI50におけるメモリ60へのアクセス時の状態遷移回数が2である場合に)“0”に設定される。また、転送シーケンス設定ビット42dは、SPI50においてメモリ60に対するアクセスの際に「コマンド送信動作」、「上位アドレス送信動作」、「下位アドレス送信動作」、「データ送信動作/データ受信動作」の順序で動作状態を遷移させるシーケンス動作が実施される場合に(SPI50におけるメモリ60へのアクセス時の状態遷移回数が3である場合に)“1”に設定される。転送データ長設定ビット42eは、SPI50のデータ送信動作/データ受信動作におけるSPI50およびメモリ60間の転送データ長(SPI50およびメモリ60間のデータ転送回数に相当)を設定するためのビットである。例えば、転送データ長設定ビット42eは、SPI50のデータ送信動作/データ受信動作におけるSPI50およびメモリ60間の転送データ長が1バイトである場合に“0”に設定され、SPI50のデータ送信動作/データ受信動作におけるSPI50およびメモリ60間の転送データ長が2バイトである場合に“1”に設定される。   The control unit 42 includes a transfer setting register 42a, a state management counter 42f, and a transfer count counter 42g. The transfer setting register 32a is a register accessible by the CPU 20, and includes a transfer start bit 42b, an interrupt setting bit 42c, a transfer sequence setting bit 42d, and a transfer data length setting bit 42e. The transfer start bit 42b is a bit for instructing the operation start of the ISU 40. For example, the transfer start bit 42b is set to “1” when the operation of the ISU 40 is started. The interrupt setting bit 42c is a bit for setting one of the interrupt signals IRQTS and IRQRS as a count factor of the transfer number counter 42g. For example, the interrupt setting bit 42c is set to “0” when the interrupt signal IRQTS is set as the count factor of the transfer count counter 42g, and “1” when the interrupt signal IRQRS is set as the count factor of the transfer count counter 42g. Set to The transfer sequence setting bit 42d is a bit for setting the number of state transitions when accessing the memory 60 in the SPI 50. For example, the transfer sequence setting bit 42d is a sequence operation that changes the operation state in the order of "command transmission operation", "upper address transmission operation", and "data transmission operation / data reception operation" when accessing the memory 60 in the SPI 50. Is set to “0” (when the number of state transitions when accessing the memory 60 in the SPI 50 is 2). The transfer sequence setting bit 42d is in the order of "command transmission operation", "upper address transmission operation", "lower address transmission operation", and "data transmission operation / data reception operation" when accessing the memory 60 in the SPI 50. It is set to “1” when a sequence operation for changing the operation state is performed (when the number of state transitions when accessing the memory 60 in the SPI 50 is 3). The transfer data length setting bit 42e is a bit for setting the transfer data length between the SPI 50 and the memory 60 (corresponding to the number of data transfers between the SPI 50 and the memory 60) in the data transmission operation / data reception operation of the SPI 50. For example, the transfer data length setting bit 42e is set to “0” when the transfer data length between the SPI 50 and the memory 60 in the data transmission operation / data reception operation of the SPI 50 is 1 byte, and the data transmission operation / data of the SPI 50 is set. It is set to “1” when the transfer data length between the SPI 50 and the memory 60 in the reception operation is 2 bytes.

ステート管理カウンタ42fは、転送開始ビット42bが“1”に設定されるのに伴って転送シーケンス設定ビット42dの設定値に対応するSPI50の状態遷移回数をカウンタ値として設定する。具体的には、ステート管理カウンタ42fは、転送シーケンス設定ビット42dが“0”に設定されている場合には、転送開始ビット42bが“1”に設定されるのに伴ってカウンタ値を2に設定し、転送シーケンス設定ビット42dが“1”に設定されている場合には、転送開始ビット42bが“1”に設定されるのに伴ってカウンタ値を3に設定する。そして、ステート管理カウンタ42fは、割り込み信号IRQTSが活性化される度にダウンカウント動作を実施し、カウンタ値が0になった時点でダウンカウント動作を停止する。   The state management counter 42f sets, as a counter value, the number of state transitions of the SPI 50 corresponding to the set value of the transfer sequence setting bit 42d as the transfer start bit 42b is set to “1”. Specifically, when the transfer sequence setting bit 42d is set to “0”, the state management counter 42f sets the counter value to 2 as the transfer start bit 42b is set to “1”. When the transfer sequence setting bit 42d is set to “1”, the counter value is set to 3 as the transfer start bit 42b is set to “1”. The state management counter 42f performs a down-count operation every time the interrupt signal IRQTS is activated, and stops the down-count operation when the counter value becomes zero.

転送回数カウンタ42gは、転送開始ビット42bが“1”に設定されるのに伴って転送データ長設定ビット32eの設定値に対応するSPI50およびメモリ間60間の転送データ長(バイト数)をカウンタ値として設定する。具体的には、転送回数カウンタ42gは、転送データ長設定ビット42eが“0”に設定されている場合には、転送開始ビット42bが“1”に設定されるのに伴ってカウント値を1に設定し、転送データ長設定ビット42eが“1”に設定されている場合には、転送開始ビット42bが“1”に設定されるのに伴ってカウント値を2に設定する。そして、転送回数カウンタ42gは、ステート管理カウンタ42fがダウンカウント動作を停止した後、割り込み信号IRQTS、IRQRSの中で割り込み設定ビット42cにより設定されている方が活性化される度にダウンカウント動作を実施し、カウンタ値が0になった時点でダウンカウント動作を停止する。   The transfer counter 42g counts the transfer data length (number of bytes) between the SPI 50 and the memory 60 corresponding to the set value of the transfer data length setting bit 32e as the transfer start bit 42b is set to "1". Set as a value. Specifically, when the transfer data length setting bit 42e is set to “0”, the transfer number counter 42g sets the count value to 1 as the transfer start bit 42b is set to “1”. When the transfer data length setting bit 42e is set to “1”, the count value is set to 2 as the transfer start bit 42b is set to “1”. Then, the transfer count counter 42g performs the down-count operation every time the one set by the interrupt setting bit 42c in the interrupt signals IRQTS and IRQRS is activated after the state management counter 42f stops the down-count operation. The countdown operation is stopped when the counter value reaches zero.

制御部42は、転送開始ビット42bが“1”に設定されるのに伴って、SPI50内の送信レジスタ51aに対するライトアクセスを送受信部41に指示する。制御部42は、割り込み設定ビット42cにより転送回数カウンタ42gのカウント要因として割り込み信号IRQTSが設定されている場合、ステート管理カウンタ42fあるいは転送回数カウンタ42gがダウンカウント動作を実施するのに伴って、SPI50内の送信レジスタ51aに対するライトアクセスを送受信部41に指示する。また、制御部42は、割り込み設定ビット42cにより転送回数カウンタ42gのカウント要因として割り込み信号IRQRSが設定されている場合、ステート管理カウンタ42fがダウンカウント動作を実施するのに伴って、ステート管理カウンタ42fのカウンタ値が0でなければSPI50内の送信レジスタ51aに対するライトアクセスを送受信部41に指示し、ステート管理カウンタ42fのカウンタ値が0であればSPI50の動作モードを切り替えるべくSPI50内のモード設定レジスタ52aに対するライトアクセスを指示する。制御部42は、割り込み設定ビット42cにより転送回数カウンタ42gのカウント要因として割り込み信号IRQRSが設定されている場合、転送回数カウンタ42gがダウンカウント動作を実施するのに伴って、SPI50内の受信レジスタ51bに対するリードアクセスを送受信部41に指示する。更に、制御部42は、転送回数カウンタ42gがダウンカウント動作を停止するのに伴って(転送回数カウンタ42gのカウンタ値が0になるのに伴って)、割り込み設定ビット42cにより転送回数カウンタ42gのカウント要因として割り込み信号IRQTSが設定されていれば割り込み信号IRQTを活性化させ、割り込み設定ビット42cにより転送回数カウンタ42gのカウント要因として割り込み信号IRQRSが設定されていれば割り込み信号IRQRを活性化させる。   As the transfer start bit 42b is set to “1”, the control unit 42 instructs the transmission / reception unit 41 to perform a write access to the transmission register 51a in the SPI 50. When the interrupt signal IRQTS is set as the count factor of the transfer count counter 42g by the interrupt setting bit 42c, the control unit 42 executes the SPI 50 as the state management counter 42f or the transfer count counter 42g performs the down-count operation. The transmission / reception unit 41 is instructed to perform write access to the transmission register 51a. Further, when the interrupt signal IRQRS is set as the count factor of the transfer counter 42g by the interrupt setting bit 42c, the control unit 42 performs the state management counter 42f as the state management counter 42f performs the down-counting operation. If the counter value of the SPI 50 is not 0, a write access to the transmission register 51a in the SPI 50 is instructed to the transmission / reception unit 41. A write access to 52a is instructed. When the interrupt signal IRQRS is set as the count factor of the transfer number counter 42g by the interrupt setting bit 42c, the control unit 42 receives the reception register 51b in the SPI 50 as the transfer number counter 42g performs the down-count operation. Is instructed to the transmission / reception unit 41. Further, as the transfer counter 42g stops the down-counting operation (as the counter value of the transfer counter 42g becomes 0), the control unit 42 sets the transfer counter 42g by the interrupt setting bit 42c. If the interrupt signal IRQTS is set as the count factor, the interrupt signal IRQT is activated, and if the interrupt signal IRQRS is set as the count factor of the transfer count counter 42g by the interrupt setting bit 42c, the interrupt signal IRQR is activated.

SPI50は、送受信部51および制御部52を備えて構成されている。送受信部51は、送信レジスタ51a、受信レジスタ51bおよびシフトレジスタ51cを備えて構成されている。ここでは、送信レジスタ51a、受信レジスタ51bおよびシフトレジスタ51cが8ビットレジスタとして構成されているものとする。送受信部51は、ISU40による送信レジスタ51aへのライトアクセスに伴って、ISU40から供給されるデータを送信レジスタ51aに格納する。送受信部51は、制御部52の指示に従って、送信レジスタ51aに格納されているデータをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次供給する。また、送受信部51は、制御部52の指示に従って、シフトレジスタ51cのシフト動作によりシリアルデータSIを順次取り込み、シフトレジスタ51に8ビット分のデータを取り込んだ時点でシフトレジスタ51cに格納されているデータを受信レジスタ51bに転送する。送受信部51は、ISU40による受信レジスタ51bへのリードアクセスに伴って、受信レジスタ51bに格納されているデータをISU40に供給する。   The SPI 50 includes a transmission / reception unit 51 and a control unit 52. The transmission / reception unit 51 includes a transmission register 51a, a reception register 51b, and a shift register 51c. Here, it is assumed that the transmission register 51a, the reception register 51b, and the shift register 51c are configured as 8-bit registers. The transmission / reception unit 51 stores the data supplied from the ISU 40 in the transmission register 51a in accordance with the write access to the transmission register 51a by the ISU 40. The transmission / reception unit 51 transfers the data stored in the transmission register 51a to the shift register 51c in accordance with an instruction from the control unit 52, and sequentially supplies the serial data SO to the memory 60 by the shift operation of the shift register 51c. Further, the transmission / reception unit 51 sequentially fetches the serial data SI by the shift operation of the shift register 51c according to the instruction of the control unit 52, and stores the 8-bit data in the shift register 51 and stores it in the shift register 51c. Data is transferred to the reception register 51b. The transmission / reception unit 51 supplies the data stored in the reception register 51b to the ISU 40 along with the read access to the reception register 51b by the ISU 40.

制御部52は、モード設定レジスタ52a、クロック発生部52bおよび割り込み発生部52cを備えて構成されている。モード設定レジスタ52aは、ISU40によりアクセス可能であり、SPI50の動作モード(送信モード/受信モード)を設定するためのレジスタである。例えば、モード設定レジスタ52aは、SPI50を送信モードに設定する場合に“0”に設定され、SPI50を受信モードに設定する場合に“1”に設定される。クロック発生部52bは、シリアルデータSO、SIの遷移タイミングを規定するクロックSCKを発生させる。割り込み発生部52cは、送受信部51において送信レジスタ51aからシフトレジスタ51cにデータが転送されるのに伴って割り込み信号IRQTSを活性化させ、送受信部51においてシフトレジスタ51cから受信レジスタ51bにデータが転送されるのに伴って割り込み信号IRQRSを活性化させる。なお、制御部52は、モード設定レジスタ52aによりSPI50が送信モードに設定されている場合に送信レジスタ51aからシフトレジスタ51cへのデータ転送を送受信部51に指示し、モード設定レジスタ52aによりSPI50が受信モードに設定されている場合にシフトレジスタ51cから受信レジスタ51bへのデータ転送を送受信部51に指示する。   The control unit 52 includes a mode setting register 52a, a clock generation unit 52b, and an interrupt generation unit 52c. The mode setting register 52a is accessible by the ISU 40 and is a register for setting the operation mode (transmission mode / reception mode) of the SPI 50. For example, the mode setting register 52a is set to “0” when the SPI 50 is set to the transmission mode, and is set to “1” when the SPI 50 is set to the reception mode. The clock generator 52b generates a clock SCK that defines the transition timing of the serial data SO and SI. The interrupt generation unit 52c activates the interrupt signal IRQTS as data is transferred from the transmission register 51a to the shift register 51c in the transmission / reception unit 51, and data is transferred from the shift register 51c to the reception register 51b in the transmission / reception unit 51. As a result, the interrupt signal IRQRS is activated. The control unit 52 instructs the transmission / reception unit 51 to transfer data from the transmission register 51a to the shift register 51c when the SPI 50 is set to the transmission mode by the mode setting register 52a, and the SPI 50 is received by the mode setting register 52a. When the mode is set, the transmission / reception unit 51 is instructed to transfer data from the shift register 51c to the reception register 51b.

メモリ60は、シリアルデータSOにおける先頭の8ビットコマンドがライトコマンドであると判断すると、後続の16ビットアドレスに対応する16個のメモリセルに後続の16ビットデータを順次ライトする。また、メモリ60は、シリアルデータSOにおける先頭の8ビットコマンドがリードコマンドであると判断すると、後続の16ビットアドレスに対応する16個のメモリセルの保持データをリードしてシリアルデータSIとしてSPI50に順次供給する。   When determining that the first 8-bit command in the serial data SO is a write command, the memory 60 sequentially writes subsequent 16-bit data to 16 memory cells corresponding to the subsequent 16-bit address. Further, when the memory 60 determines that the first 8-bit command in the serial data SO is a read command, the memory 60 reads the data held in 16 memory cells corresponding to the subsequent 16-bit address and sends it to the SPI 50 as serial data SI. Supply sequentially.

図2は、図1のマイクロコンピュータにおけるCPUからメモリへのデータ転送動作を示している。なお、図2の動作では、SPI50におけるメモリ60へのアクセス時の状態遷移回数が3であり、SPI50のデータ送信動作におけるSPI50およびメモリ60間の転送データ長が2バイトであるものとする。   FIG. 2 shows a data transfer operation from the CPU to the memory in the microcomputer of FIG. In the operation of FIG. 2, it is assumed that the number of state transitions when accessing the memory 60 in the SPI 50 is 3, and the transfer data length between the SPI 50 and the memory 60 in the data transmission operation of the SPI 50 is 2 bytes.

まず、CPU20は、システムバスBUSを介したライトアクセスにより、ISU40内のレジスタ(転送設定レジスタ42aなど)を設定する(ステップ101)。このとき、ISU40の制御部42において、割り込み設定ビット42cが“0”に設定され、転送シーケンス設定ビット42dが“1”に設定され、転送データ長設定ビット42eが“1”に設定される。   First, the CPU 20 sets a register (such as the transfer setting register 42a) in the ISU 40 by a write access via the system bus BUS (step 101). At this time, in the control unit 42 of the ISU 40, the interrupt setting bit 42c is set to “0”, the transfer sequence setting bit 42d is set to “1”, and the transfer data length setting bit 42e is set to “1”.

次に、CPU20は、システムバスBUSを介したライトアクセスにより、SPI50内のレジスタ(モード設定レジスタ52aなど)を設定するためのデータをISU40内の送信バッファ41aに格納する(ステップ102)。ISU40の送受信部41は、送信バッファ41aに格納されたデータがSPI50内のレジスタを設定するためのデータであることを認識すると、そのデータを用いたライトアクセスにより、SPI50内のレジスタを設定する(ステップ111)。このとき、SPI50内のモード設定レジスタ52aが“0”に設定される。   Next, the CPU 20 stores data for setting a register (such as the mode setting register 52a) in the SPI 50 in the transmission buffer 41a in the ISU 40 by write access via the system bus BUS (step 102). When the transmission / reception unit 41 of the ISU 40 recognizes that the data stored in the transmission buffer 41a is data for setting a register in the SPI 50, it sets the register in the SPI 50 by write access using the data ( Step 111). At this time, the mode setting register 52a in the SPI 50 is set to “0”.

続いて、CPU20は、システムバスBUSを介したライトアクセスにより、コマンド(ライトコマンド)、上位アドレス、下位アドレス、1番目のデータおよび2番目のデータをISU40内の送信バッファ41aに順次格納する(ステップ103)。   Subsequently, the CPU 20 sequentially stores the command (write command), upper address, lower address, first data, and second data in the transmission buffer 41a in the ISU 40 by write access via the system bus BUS (step S40). 103).

そして、CPU20は、システムバスBUSを介したライトアクセスにより、ISU40内の転送開始ビット42bを“1”に設定する(ステップ104)。これにより、ISU40の制御部42は、ステート管理カウンタ42fのカウンタ値CNTAを3に設定するとともに、転送回数カウンタ42gのカウンタ値CNTBを2に設定し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納されたコマンドをSPI50内の送信レジスタ51aに格納する(ステップ112)。SPI50の送受信部51は、送信レジスタ51aに格納されたコマンドをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cにコマンドが転送されるのに伴って割り込み信号IRQTSを活性化させる(ステップ121)。   Then, the CPU 20 sets the transfer start bit 42b in the ISU 40 to “1” by write access via the system bus BUS (step 104). Thereby, the control unit 42 of the ISU 40 sets the counter value CNTA of the state management counter 42f to 3 and sets the counter value CNTB of the transfer count counter 42g to 2, and the transmission / reception unit 41 of the ISU 40 performs write access. The command stored in the transmission buffer 41a is stored in the transmission register 51a in the SPI 50 (step 112). The transmission / reception unit 51 of the SPI 50 transfers the command stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 In 51, the interrupt signal IRQTS is activated as the command is transferred from the transmission register 51a to the shift register 51c (step 121).

割り込み信号IRQTSが活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された上位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ113)。SPI50の送受信部51は、送信レジスタ51aに格納された上位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに上位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ122)。   When the interrupt signal IRQTS is activated, the state management counter 42f in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 converts the upper address stored in the transmission buffer 41a in the SPI 50 by write access. The data is stored in the transmission register 51a (step 113). The transmission / reception unit 51 of the SPI 50 transfers the upper address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the upper address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 122).

割り込み信号IRQTSが再度活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された下位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ114)。SPI50の送受信部51は、送信レジスタ51aに格納された下位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに下位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ123)。   When the interrupt signal IRQTS is activated again, the state management counter 42f in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 stores the lower address stored in the transmission buffer 41a in the SPI 50 by write access. Is stored in the transmission register 51a (step 114). The transmission / reception unit 51 of the SPI 50 transfers the lower address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the lower address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 123).

割り込み信号IRQTSが再度活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された1番目のデータをSPI50内の送信レジスタ51aに格納する(ステップ115)。このとき、ISU40内のステート管理カウンタ42fは、カウンタ値CNTAが0であるため、ダウンカウント動作を停止する。SPI50の送受信部51は、送信レジスタ51aに格納された1番目のデータをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに1番目のデータが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ124)。   When the interrupt signal IRQTS is activated again, the state management counter 42f in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 receives the first data stored in the transmission buffer 41a by write access. The data is stored in the transmission register 51a in the SPI 50 (step 115). At this time, the state management counter 42f in the ISU 40 stops the down-counting operation because the counter value CNTA is 0. The transmission / reception unit 51 of the SPI 50 transfers the first data stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 Then, as the first data is transferred from the transmission register 51a to the shift register 51c in the transmission / reception unit 51, the interrupt signal IRQTS is activated again (step 124).

割り込み信号IRQTSが再度活性化されると、ISU40内のステート管理カウンタ42fがダウンカウント動作を停止しているため、ISU40内の転送回数カウンタ42gがダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された2番目のデータをSPI50内の送信レジスタ51aに格納する(ステップ116)。SPI50の送受信部51は、送信レジスタ51aに格納されている2番目のデータをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに2番目のデータが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ125)。   When the interrupt signal IRQTS is activated again, the state management counter 42f in the ISU 40 stops the down-counting operation. Therefore, the transfer number counter 42g in the ISU 40 performs the down-counting operation, and the transmission / reception unit 41 of the ISU 40 By the write access, the second data stored in the transmission buffer 41a is stored in the transmission register 51a in the SPI 50 (step 116). The transmission / reception unit 51 of the SPI 50 transfers the second data stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c, and the control unit 52 of the SPI 50 The transmitter / receiver 51 activates the interrupt signal IRQTS again as the second data is transferred from the transmission register 51a to the shift register 51c (step 125).

割り込み信号IRQTSが再度活性化されると、ISU40内の転送回数カウンタ42gは、ダウンカウント動作を実施する(ステップ117)。このとき、ISU40内の転送回数カウンタ42gは、カウンタ値CNTBが0であるため、ダウンカウント動作を停止する。ISU40の制御部42は、転送回数カウンタ42gがダウンカウント動作を停止するのに伴って割り込み信号IRQTを活性化させる(ステップ117)。割り込み信号IRQTが活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行する(ステップ105)。これにより、CPU20からメモリ60へのデータ転送が完了する。   When the interrupt signal IRQTS is activated again, the transfer counter 42g in the ISU 40 performs a down-count operation (step 117). At this time, since the counter value CNTB is 0, the transfer count counter 42g in the ISU 40 stops the down-counting operation. The control unit 42 of the ISU 40 activates the interrupt signal IRQT as the transfer number counter 42g stops the down-counting operation (Step 117). When the interrupt signal IRQT is activated, the CPU 20 executes a process of resetting an interrupt flag in the interrupt process (step 105). Thereby, the data transfer from the CPU 20 to the memory 60 is completed.

図3は、図1のマイクロコンピュータにおけるメモリからCPUへのデータ転送動作を示している。なお、図3の動作では、SPI50におけるメモリ60へのアクセス時の状態遷移回数が3であり、SPI50のデータ受信動作におけるSPI50およびメモリ60間の転送データ長が2バイトであるものとする。   FIG. 3 shows a data transfer operation from the memory to the CPU in the microcomputer of FIG. In the operation of FIG. 3, it is assumed that the number of state transitions when accessing the memory 60 in the SPI 50 is 3, and the transfer data length between the SPI 50 and the memory 60 in the data receiving operation of the SPI 50 is 2 bytes.

まず、CPU20は、システムバスBUSを介したライトアクセスにより、ISU40内のレジスタ(転送設定レジスタ42aなど)を設定する(ステップ201)。このとき、ISU40の制御部42において、割り込み設定ビット42cが“1”に設定され、転送シーケンス設定ビット42dが“1”に設定され、転送データ長設定ビット42eが“1”に設定される。   First, the CPU 20 sets a register (such as the transfer setting register 42a) in the ISU 40 by a write access via the system bus BUS (step 201). At this time, in the control unit 42 of the ISU 40, the interrupt setting bit 42c is set to “1”, the transfer sequence setting bit 42d is set to “1”, and the transfer data length setting bit 42e is set to “1”.

次に、CPU20は、システムバスBUSを介したライトアクセスにより、SPI50内のレジスタ(モード設定レジスタ52aなど)を設定するためのデータをISU40内の送信バッファ41aに格納する(ステップ202)。ISU40の送受信部41は、送信バッファ41aに格納されたデータがSPI50内のレジスタを設定するためのデータであることを認識すると、そのデータを用いたライトアクセスにより、SPI50内のレジスタを設定する(ステップ211)。このとき、SPI50内のモード設定レジスタ52aが“0”に設定される。   Next, the CPU 20 stores data for setting a register (such as the mode setting register 52a) in the SPI 50 in the transmission buffer 41a in the ISU 40 by write access via the system bus BUS (step 202). When the transmission / reception unit 41 of the ISU 40 recognizes that the data stored in the transmission buffer 41a is data for setting a register in the SPI 50, it sets the register in the SPI 50 by write access using the data ( Step 211). At this time, the mode setting register 52a in the SPI 50 is set to “0”.

続いて、CPU20は、システムバスBUSを介したライトアクセスにより、コマンド(リードコマンド)、上位アドレスおよび下位アドレスをISU40内の送信バッファ41aに順次格納する(ステップ203)。   Subsequently, the CPU 20 sequentially stores the command (read command), upper address, and lower address in the transmission buffer 41a in the ISU 40 by write access via the system bus BUS (step 203).

そして、CPU20は、システムバスBUSを介したライトアクセスにより、ISU40内の転送開始ビット42bを“1”に設定する(ステップ204)。これにより、ISU40の制御部42は、ステート管理カウンタ42fのカウンタ値CNTAを3に設定するとともに、転送回数カウンタ42gのカウンタ値CNTBを2に設定し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納されたコマンドをSPI50内の送信レジスタ51aに格納する(ステップ212)。SPI50の送受信部51は、送信レジスタ51aに格納されたコマンドをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cにコマンドが転送されるのに伴って割り込み信号IRQTSを活性化させる(ステップ221)。   Then, the CPU 20 sets the transfer start bit 42b in the ISU 40 to “1” by write access via the system bus BUS (step 204). Thereby, the control unit 42 of the ISU 40 sets the counter value CNTA of the state management counter 42f to 3 and sets the counter value CNTB of the transfer count counter 42g to 2, and the transmission / reception unit 41 of the ISU 40 performs write access. The command stored in the transmission buffer 41a is stored in the transmission register 51a in the SPI 50 (step 212). The transmission / reception unit 51 of the SPI 50 transfers the command stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 In 51, the interrupt signal IRQTS is activated as the command is transferred from the transmission register 51a to the shift register 51c (step 221).

割り込み信号IRQTSが活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された上位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ213)。SPI50の送受信部51は、送信レジスタ51aに格納された上位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに上位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ222)。   When the interrupt signal IRQTS is activated, the state management counter 42f in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 converts the upper address stored in the transmission buffer 41a in the SPI 50 by write access. The data is stored in the transmission register 51a (step 213). The transmission / reception unit 51 of the SPI 50 transfers the upper address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the upper address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 222).

割り込み信号IRQTSが再度活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施し、ISU40の送受信部41は、ライトアクセスにより、送信バッファ41aに格納された下位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ214)。SPI50の送受信部51は、送信レジスタ51aに格納された下位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに下位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ223)。   When the interrupt signal IRQTS is activated again, the state management counter 42f in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 stores the lower address stored in the transmission buffer 41a in the SPI 50 by write access. Is stored in the transmission register 51a (step 214). The transmission / reception unit 51 of the SPI 50 transfers the lower address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the lower address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 223).

割り込み信号IRQTSが再度活性化されると、ISU40内のステート管理カウンタ42fは、ダウンカウント動作を実施する(ステップ215)。このとき、ISU40内のステート管理カウンタ42fは、カウンタ値CNTAが0であるため、ダウンカウント動作を停止する。ISU40の送受信部41は、ステート管理カウンタ42fのカウンタ値CNTAが0であるため、SPI50の動作モードを送信モードから受信モードに切り替えるために、ライトアクセスにより、SPI50内のモード設定レジスタ52aを“1”に設定する(ステップ215)。   When the interrupt signal IRQTS is activated again, the state management counter 42f in the ISU 40 performs a down count operation (step 215). At this time, the state management counter 42f in the ISU 40 stops the down-counting operation because the counter value CNTA is 0. Since the counter value CNTA of the state management counter 42f is 0, the transmission / reception unit 41 of the ISU 40 sets the mode setting register 52a in the SPI 50 to “1” by write access in order to switch the operation mode of the SPI 50 from the transmission mode to the reception mode. "(Step 215).

この後、SPI50の送受信部51は、シフトレジスタ51cのシフト動作によりメモリ60から供給されるシリアルデータSIを順次取り込み、シフトレジスタ51cに8ビット分のデータを取り込んだ時点で送信レジスタ51aに格納されている受信データを1番目のデータとして受信レジスタ51bに転送し、SPI50の制御部52は、送受信部51においてシフトレジスタ51cから受信レジスタ51bに1番目のデータが転送されるのに伴って割り込み信号IRQRSを活性化させる(ステップ224)。   Thereafter, the transmission / reception unit 51 of the SPI 50 sequentially takes in the serial data SI supplied from the memory 60 by the shift operation of the shift register 51c, and when the 8-bit data is taken into the shift register 51c, it is stored in the transmission register 51a. The received data is transferred to the reception register 51b as the first data, and the control unit 52 of the SPI 50 transmits an interrupt signal as the first data is transferred from the shift register 51c to the reception register 51b in the transmission / reception unit 51. IRQRS is activated (step 224).

割り込み信号IRQRSが活性化されると、ISU40内の転送回数カウンタ42gは、ダウンカウント動作を実施し、ISU40の送受信部41は、リードアクセスにより、SPI50内の受信レジスタ51bに格納された1番目のデータを受信バッファ41bに格納する(ステップ216)。   When the interrupt signal IRQRS is activated, the transfer count counter 42g in the ISU 40 performs a down-counting operation, and the transmission / reception unit 41 of the ISU 40 performs the first access stored in the reception register 51b in the SPI 50 by read access. Data is stored in the reception buffer 41b (step 216).

そして、SPI50の送受信部51は、シフトレジスタ51cのシフト動作によりメモリ60から供給されるシリアルデータSIを順次取り込み、シフトレジスタ51cに8ビット分のデータを取り込んだ時点で送信レジスタ51aに格納されている受信データを2番目のデータとして受信レジスタ51bに転送し、SPI50の制御部52は、送受信部51においてシフトレジスタ51cから受信レジスタ51bに2番目のデータが転送されるのに伴って割り込み信号IRQRSを再度活性化させる(ステップ225)。   The transmission / reception unit 51 of the SPI 50 sequentially takes in the serial data SI supplied from the memory 60 by the shift operation of the shift register 51c, and when the 8-bit data is taken into the shift register 51c, it is stored in the transmission register 51a. The received data is transferred to the reception register 51b as the second data, and the control unit 52 of the SPI 50 transmits the interrupt signal IRQRS as the second data is transferred from the shift register 51c to the reception register 51b in the transmission / reception unit 51. Is activated again (step 225).

割り込み信号IRQRSが再度活性化されると、ISU40内の転送回数カウンタ42gは、ダウンカウント動作を実施し、ISU40の送受信部41は、リードアクセスにより、SPI50内の受信レジスタ51bに格納された2番目のデータを受信バッファ41bに格納する(ステップ217)。このとき、ISU40内の転送回数カウンタ42gは、カウンタ値CNTBが0であるため、ダウンカウント動作を停止する。ISU40の制御部42は、転送回数カウンタ42gがダウンカウント動作を停止するのに伴って割り込み信号IRQRを活性化させる(ステップ217)。   When the interrupt signal IRQRS is activated again, the transfer count counter 42g in the ISU 40 performs a down-count operation, and the transmission / reception unit 41 of the ISU 40 performs the second access stored in the reception register 51b in the SPI 50 by read access. Are stored in the reception buffer 41b (step 217). At this time, since the counter value CNTB is 0, the transfer count counter 42g in the ISU 40 stops the down-counting operation. The control unit 42 of the ISU 40 activates the interrupt signal IRQR as the transfer number counter 42g stops the down-counting operation (Step 217).

割り込み信号IRQRが活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したリードアクセスにより、ISU40内の受信バッファ41bに格納された1番目のデータおよび2番目のデータを順次取得する(ステップ205)。これにより、メモリ60からCPU20へのデータ転送が完了する。   When the interrupt signal IRQR is activated, the CPU 20 executes a process for resetting an interrupt flag in the interrupt process, and then stores the 1 stored in the reception buffer 41b in the ISU 40 by a read access via the system bus BUS. The first data and the second data are obtained sequentially (step 205). Thereby, the data transfer from the memory 60 to the CPU 20 is completed.

図4は、従来のマイクロコンピュータにおけるCPUからメモリのデータ転送動作を示している。なお、従来のマイクロコンピュータとは、図1のマイクロコンピュータ10において、ISU40を取り除き、割り込み信号IRQT、IRQRに代えて割り込み信号IRQTS、IRQRSを割り込みコントローラ30に供給するとともに、SPI50をシステムバスBUSに接続して構成されたものである。また、図4の動作では、SPI50におけるメモリ60へのアクセス時の状態遷移回数が3であり、SPI50のデータ送信動作におけるSPI50およびメモリ60間の転送データ長が2バイトであるものとする。   FIG. 4 shows the data transfer operation from the CPU to the memory in the conventional microcomputer. Note that the conventional microcomputer is the same as the microcomputer 10 of FIG. 1, except that the ISU 40 is removed, the interrupt signals IRQTS and IRQRS are supplied to the interrupt controller 30 instead of the interrupt signals IRQT and IRQR, and the SPI 50 is connected to the system bus BUS. It is configured as follows. In the operation of FIG. 4, it is assumed that the number of state transitions when accessing the memory 60 in the SPI 50 is 3, and the transfer data length between the SPI 50 and the memory 60 in the data transmission operation of the SPI 50 is 2 bytes.

まず、CPU20は、システムバスBUSを介したライトアクセスにより、SPI50内のレジスタ(モード設定レジスタ52aなど)を設定する(ステップ301)。このとき、SPI50内のモード設定レジスタ52aが“0”に設定される。   First, the CPU 20 sets a register (such as a mode setting register 52a) in the SPI 50 by a write access via the system bus BUS (step 301). At this time, the mode setting register 52a in the SPI 50 is set to “0”.

そして、CPU20は、システムバスBUSを介したライトアクセスにより、コマンド(ライトコマンド)をSPI50内の送信レジスタ51aに格納する(ステップ302)。SPI50の送受信部51は、送信レジスタ51aに格納されたコマンドをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cにコマンドが転送されるのに伴って割り込み信号IRQTSを活性化させる(ステップ321)。   Then, the CPU 20 stores the command (write command) in the transmission register 51a in the SPI 50 by write access via the system bus BUS (step 302). The transmission / reception unit 51 of the SPI 50 transfers the command stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 In 51, the interrupt signal IRQTS is activated as the command is transferred from the transmission register 51a to the shift register 51c (step 321).

割り込み信号IRQTSが活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、上位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ303)。SPI50の送受信部51は、送信レジスタ51aに格納された上位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに上位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ322)。   When the interrupt signal IRQTS is activated, the CPU 20 executes processing for resetting the interrupt flag in the interrupt processing, and then stores the upper address in the transmission register 51a in the SPI 50 by write access via the system bus BUS. (Step 303). The transmission / reception unit 51 of the SPI 50 transfers the upper address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the higher address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 322).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、下位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ304)。SPI50の送受信部51は、送信レジスタ51aに格納された下位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに下位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ323)。   When the interrupt signal IRQTS is activated again, the CPU 20 executes a process for resetting an interrupt flag in the interrupt process, and then writes a lower address to the transmission register 51a in the SPI 50 by a write access via the system bus BUS. Store (step 304). The transmission / reception unit 51 of the SPI 50 transfers the lower address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the lower address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 323).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、1番目のデータをSPI50内の送信レジスタ51aに格納する(ステップ305)。SPI50の送受信部51は、送信レジスタ51aに格納された1番目のデータをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに1番目のデータが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ324)。   When the interrupt signal IRQTS is activated again, the CPU 20 executes processing for resetting an interrupt flag in the interrupt processing, and then writes the first data to the transmission register in the SPI 50 by write access via the system bus BUS. 51a is stored (step 305). The transmission / reception unit 51 of the SPI 50 transfers the first data stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 Then, as the first data is transferred from the transmission register 51a to the shift register 51c in the transmission / reception unit 51, the interrupt signal IRQTS is activated again (step 324).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、2番目のデータをSPI50内の送信レジスタ51aに格納する(ステップ306)。SPI50の送受信部51は、送信レジスタ51aに格納された2番目のデータをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに2番目のデータが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ325)。   When the interrupt signal IRQTS is activated again, the CPU 20 executes processing for resetting the interrupt flag in the interrupt processing, and then transfers the second data to the transmission register in the SPI 50 by write access via the system bus BUS. 51a is stored (step 306). The transmission / reception unit 51 of the SPI 50 transfers the second data stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c, and the control unit 52 of the SPI 50 As the second data is transferred from the transmission register 51a to the shift register 51c in the transmission / reception unit 51, the interrupt signal IRQTS is activated again (step 325).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行する(ステップ307)。これにより、CPU20からメモリ60へのデータ転送が完了する。   When the interrupt signal IRQTS is activated again, the CPU 20 executes a process of resetting an interrupt flag in the interrupt process (step 307). Thereby, the data transfer from the CPU 20 to the memory 60 is completed.

図5は、従来のマイクロコンピュータにおけるCPUからメモリのデータ転送動作を示している。なお、図5の動作では、SPI50におけるメモリ60へのアクセス時の状態遷移回数が3であり、SPI50のデータ受信動作におけるSPI50およびメモリ60間の転送データ長が2バイトであるものとする。   FIG. 5 shows a data transfer operation from a CPU to a memory in a conventional microcomputer. In the operation of FIG. 5, it is assumed that the number of state transitions when accessing the memory 60 in the SPI 50 is 3, and the transfer data length between the SPI 50 and the memory 60 in the data receiving operation of the SPI 50 is 2 bytes.

まず、CPU20は、システムバスBUSを介したライトアクセスにより、SPI50内のレジスタ(モード設定レジスタ52aなど)を設定する(ステップ401)。このとき、SPI50内のモード設定レジスタ52aが“0”に設定される。   First, the CPU 20 sets a register (such as a mode setting register 52a) in the SPI 50 by a write access via the system bus BUS (step 401). At this time, the mode setting register 52a in the SPI 50 is set to “0”.

そして、CPU20は、システムバスBUSを介したライトアクセスにより、コマンド(リードコマンド)をSPI50内の送信レジスタ51aに格納する(ステップ402)。SPI50の送受信部51は、送信レジスタ51aに格納されたコマンドをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cにコマンドが転送されるのに伴って割り込み信号IRQTSを活性化させる(ステップ421)。   Then, the CPU 20 stores the command (read command) in the transmission register 51a in the SPI 50 by write access via the system bus BUS (step 402). The transmission / reception unit 51 of the SPI 50 transfers the command stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 In 51, the interrupt signal IRQTS is activated as the command is transferred from the transmission register 51a to the shift register 51c (step 421).

割り込み信号IRQTSが活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、上位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ403)。SPI50の送受信部51は、送信レジスタ51aに格納された上位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに上位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ422)。   When the interrupt signal IRQTS is activated, the CPU 20 executes processing for resetting the interrupt flag in the interrupt processing, and then stores the upper address in the transmission register 51a in the SPI 50 by write access via the system bus BUS. (Step 403). The transmission / reception unit 51 of the SPI 50 transfers the upper address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the higher address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 422).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したライトアクセスにより、下位アドレスをSPI50内の送信レジスタ51aに格納する(ステップ404)。SPI50の送受信部51は、送信レジスタ51aに格納された下位アドレスをシフトレジスタ51cに転送してシフトレジスタ51cのシフト動作によりシリアルデータSOとしてメモリ60に順次送信し、SPI50の制御部52は、送受信部51において送信レジスタ51aからシフトレジスタ51cに下位アドレスが転送されるのに伴って割り込み信号IRQTSを再度活性化させる(ステップ423)。   When the interrupt signal IRQTS is activated again, the CPU 20 executes a process for resetting an interrupt flag in the interrupt process, and then writes a lower address to the transmission register 51a in the SPI 50 by a write access via the system bus BUS. Store (step 404). The transmission / reception unit 51 of the SPI 50 transfers the lower address stored in the transmission register 51a to the shift register 51c and sequentially transmits it to the memory 60 as serial data SO by the shift operation of the shift register 51c. The control unit 52 of the SPI 50 As the lower address is transferred from the transmission register 51a to the shift register 51c in the unit 51, the interrupt signal IRQTS is activated again (step 423).

割り込み信号IRQTSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、SPI50の動作モードを送信モードから受信モードに切り替えるために、システムバスBUSを介したライトアクセスにより、SPI50内のモード設定レジスタ52aを“1”に設定する(ステップ405)。   When the interrupt signal IRQTS is activated again, the CPU 20 executes processing for resetting the interrupt flag in the interrupt processing, and then switches the operation mode of the SPI 50 from the transmission mode to the reception mode via the system bus BUS. As a result of the write access, the mode setting register 52a in the SPI 50 is set to “1” (step 405).

この後、SPI50の送受信部51は、シフトレジスタ51cのシフト動作によりメモリ60から供給されるシリアルデータSIを順次取り込み、シフトレジスタ51cに8ビット分のデータを取り込んだ時点で送信レジスタ51aに格納されている受信データを1番目のデータとして受信レジスタ51bに転送し、SPI50の制御部52は、送受信部51においてシフトレジスタ51cから受信レジスタ51bに1番目のデータが転送されるのに伴って割り込み信号IRQRSを活性化させる(ステップ424)。   Thereafter, the transmission / reception unit 51 of the SPI 50 sequentially takes in the serial data SI supplied from the memory 60 by the shift operation of the shift register 51c, and when the 8-bit data is taken into the shift register 51c, it is stored in the transmission register 51a. The received data is transferred to the reception register 51b as the first data, and the control unit 52 of the SPI 50 transmits an interrupt signal as the first data is transferred from the shift register 51c to the reception register 51b in the transmission / reception unit 51. IRQRS is activated (step 424).

割り込み信号IRQRSが活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したリードアクセスにより、SPI50内の受信レジスタ51bに格納された1番目のデータを取得する(ステップ406)。   When the interrupt signal IRQRS is activated, the CPU 20 executes a process of resetting an interrupt flag in the interrupt process, and then stores 1 stored in the reception register 51b in the SPI 50 by read access via the system bus BUS. The second data is acquired (step 406).

そして、SPI50の送受信部51は、シフトレジスタ51cのシフト動作によりメモリ60から供給されるシリアルデータSIを順次取り込み、シフトレジスタ51cに8ビット分のデータを取り込んだ時点で送信レジスタ51aに格納されている受信データを2番目のデータとして受信レジスタ51bに転送し、SPI50の制御部52は、送受信部51においてシフトレジスタ51cから受信レジスタ51bに2番目のデータが転送されるのに伴って割り込み信号IRQRSを再度活性化させる(ステップ425)。   The transmission / reception unit 51 of the SPI 50 sequentially takes in the serial data SI supplied from the memory 60 by the shift operation of the shift register 51c, and when the 8-bit data is taken into the shift register 51c, it is stored in the transmission register 51a. The received data is transferred to the reception register 51b as the second data, and the control unit 52 of the SPI 50 transmits the interrupt signal IRQRS as the second data is transferred from the shift register 51c to the reception register 51b in the transmission / reception unit 51. Is activated again (step 425).

割り込み信号IRQRSが再度活性化されると、CPU20は、割り込み処理において、割り込みフラグをリセットする処理などを実行した後、システムバスBUSを介したリードアクセスにより、SPI50内の受信レジスタ51bに格納された2番目のデータを取得する(ステップ407)。これにより、メモリ60からCPU20へのデータ転送が完了する。   When the interrupt signal IRQRS is activated again, the CPU 20 executes a process for resetting an interrupt flag in the interrupt process, and then stored in the reception register 51b in the SPI 50 by a read access via the system bus BUS. Second data is acquired (step 407). Thereby, the data transfer from the memory 60 to the CPU 20 is completed.

以上のように、従来のマイクロコンピュータでは、CPU20およびメモリ60間のデータ転送の際に、SPI50により発行される全ての割り込み要求がCPU20(割り込みコントローラ30)に通知されるため、CPU20は割り込み処理を5回も実施しなければならない。このため、CPU20が本来実行すべき処理に専念できずにCPU20の処理効率が著しく低下してしまう。これに対して、本発明の一実施形態におけるマイクロコンピュータ10(図1)では、CPU20およびメモリ60間のデータ転送の際に、SPI50により発行される割り込み要求がISU40にて管理され、SPI50により最後に発行される割り込み要求のみがCPU20(割り込みコントローラ30)に通知されるため、CPU20は割り込み処理を1回だけ実施すればよい。このため、CPU20を本来実行すべき処理に専念させることができ、CPU20の処理効率を大幅に向上させることが可能である。また、ISU40を設置するのに伴ってCPU20、割り込みコントローラ30およびSPI50におけるインタフェース部分を変更する必要はないため、CPU20の処理効率の向上を容易に実現することができる。   As described above, in the conventional microcomputer, all interrupt requests issued by the SPI 50 are notified to the CPU 20 (interrupt controller 30) when transferring data between the CPU 20 and the memory 60, so the CPU 20 performs interrupt processing. Must be carried out 5 times. For this reason, the CPU 20 cannot concentrate on the processing that should be originally executed, and the processing efficiency of the CPU 20 is significantly reduced. On the other hand, in the microcomputer 10 (FIG. 1) according to the embodiment of the present invention, the interrupt request issued by the SPI 50 is managed by the ISU 40 during the data transfer between the CPU 20 and the memory 60. Only the interrupt request issued to the CPU 20 is notified to the CPU 20 (interrupt controller 30), so the CPU 20 only needs to execute the interrupt process once. For this reason, the CPU 20 can be devoted to the processing to be originally executed, and the processing efficiency of the CPU 20 can be greatly improved. Further, since it is not necessary to change the interface portion in the CPU 20, the interrupt controller 30 and the SPI 50 with the installation of the ISU 40, the processing efficiency of the CPU 20 can be easily improved.

以上、本発明について詳細に説明してきたが、前述の実施形態は発明の一例に過ぎず、本発明はこれに限定されるものではない。本発明を逸脱しない範囲で変形可能であることは明らかである。   Although the present invention has been described in detail above, the above-described embodiment is merely an example of the present invention, and the present invention is not limited to this. Obviously, modifications can be made without departing from the scope of the present invention.

本発明の一実施形態を示す説明図である。It is explanatory drawing which shows one Embodiment of this invention. 図1のマイクロコンピュータにおけるCPUからメモリへのデータ転送動作を示す説明図である。It is explanatory drawing which shows the data transfer operation | movement from CPU to memory in the microcomputer of FIG. 図1のマイクロコンピュータにおけるメモリからCPUへのデータ転送動作を示す説明図である。It is explanatory drawing which shows the data transfer operation | movement from memory to CPU in the microcomputer of FIG. 従来のマイクロコンピュータにおけるCPUからメモリへのデータ転送動作を示す説明図である。It is explanatory drawing which shows the data transfer operation | movement from CPU to memory in the conventional microcomputer. 従来のマイクロコンピュータにおけるメモリからCPUへのデータ転送動作を示す説明図である。It is explanatory drawing which shows the data transfer operation | movement from memory to CPU in the conventional microcomputer.

符号の説明Explanation of symbols

10‥マイクロコンピュータ;20‥CPU;30‥割り込みコントローラ;40‥ISU;41‥送受信部;41a‥送信バッファ;41b‥受信バッファ;42‥制御部;42a‥転送設定レジスタ;42b‥転送開始ビット;42c‥割り込み設定ビット;42d‥転送シーケンス設定ビット;42e‥転送データ長設定ビット;42f‥ステート管理カウンタ;42g‥転送回数カウンタ;50‥SPI;51‥送受信部;51a‥送信レジスタ;51b‥受信レジスタ;51c‥シフトレジスタ;52‥制御部;52a‥モード設定レジスタ;52b‥クロック発生部;52c‥割り込み発生部;60‥メモリ;BUS‥システムバス;IRQR、IRQRS、IRQT、IRQTS‥割り込み信号;SCK‥クロック;SI、SO‥シリアルデータ DESCRIPTION OF SYMBOLS 10 ... Microcomputer; 20 ... CPU; 30 ... Interrupt controller; 40 ... ISU; 41 ... Transmission / reception part; 41a ... Transmission buffer; 41b ... Reception buffer; 42 ... Control part; 42a ... Transfer setting register; 42c. Interrupt setting bit; 42d Transfer sequence setting bit; 42e Transfer data length setting bit; 42f State management counter; 42g Transfer count counter; 50 SPI; 51 Transmission / reception unit; Register 51c Shift register 52 Control unit 52a Mode setting register 52b Clock generation unit 52c Interrupt generation unit 60 Memory BUS System bus IRQR, IRQRS, IRQT, IRQTS Interrupt signal; SCK: Clock; SI, S ‥ serial data

Claims (5)

CPUおよびメモリ間のデータ転送がシリアルインタフェースを介して実施されるマイクロコンピュータにおいて前記シリアルインタフェースの割り込み要求を管理する割り込み管理機構であって、
前記シリアルインタフェースが割り込み要求を発行するのに伴って、その割り込み要求の種類および発行回数に応じて状態が遷移する状態遷移回路と、
前記状態遷移回路が所定の状態に遷移するのに伴って、前記CPUに割り込み要求を発行する割り込み要求発行回路とを備えることを特徴とする割り込み管理機構。
An interrupt management mechanism for managing an interrupt request of the serial interface in a microcomputer in which data transfer between a CPU and a memory is performed via a serial interface,
As the serial interface issues an interrupt request, a state transition circuit whose state transitions according to the type of interrupt request and the number of times it is issued,
An interrupt management mechanism comprising: an interrupt request issuance circuit that issues an interrupt request to the CPU when the state transition circuit transits to a predetermined state.
請求項1に記載の割り込み管理機構において、
前記状態遷移回路は、
前記シリアルインタフェースにおける前記メモリへのアクセス時の状態遷移回数を示す情報を保持する第1レジスタと、
前記シリアルインタフェースにおける前記メモリへのアクセス時のデータ転送回数を示す情報を保持する第2レジスタと、
前記シリアルインタフェースの状態遷移に伴う割り込み要求の発行回数をカウントする第1カウンタと、
前記第1カウンタのカウント動作が前記第1レジスタの情報に対応する回数実施された後、前記シリアルインタフェースのデータ転送に伴う割り込み要求の発行回数をカウントする第2カウンタとを備え、
前記割り込み要求発行回路は、前記第2カウンタのカウント動作が前記第2レジスタの情報に対応する回数実施されるのに伴って、前記CPUに割り込み要求を発行することを特徴とする割り込み管理機構。
In the interrupt management mechanism according to claim 1,
The state transition circuit includes:
A first register holding information indicating the number of state transitions when accessing the memory in the serial interface;
A second register for holding information indicating the number of times of data transfer at the time of accessing the memory in the serial interface;
A first counter that counts the number of times an interrupt request is issued in accordance with the state transition of the serial interface;
A second counter that counts the number of issuance of interrupt requests accompanying data transfer of the serial interface after the count operation of the first counter is performed a number of times corresponding to the information in the first register;
The interrupt request issuing circuit issues an interrupt request to the CPU as the count operation of the second counter is performed a number of times corresponding to information in the second register.
請求項2に記載の割り込み管理機構において、
前記シリアルインタフェースのデータ転送に伴う割り込み要求は、前記シリアルインタフェースから前記メモリへのデータ転送に伴う第1割り込み要求と、前記メモリから前記シリアルインタフェースへのデータ転送に伴う第2割り込み要求とを含み、
前記状態遷移回路は、前記第1割り込み要求および前記第2割り込み要求のいずれかを示す情報を保持する第3レジスタを備え、
前記第2カウンタは、前記第1割り込み要求および前記第2割り込み要求の中で前記第3レジスタの情報に対応する割り込み要求の発行回数をカウントすることを特徴とする割り込み管理機構。
In the interrupt management mechanism according to claim 2,
The interrupt request accompanying data transfer of the serial interface includes a first interrupt request accompanying data transfer from the serial interface to the memory, and a second interrupt request accompanying data transfer from the memory to the serial interface,
The state transition circuit includes a third register that holds information indicating either the first interrupt request or the second interrupt request,
The interrupt management mechanism, wherein the second counter counts the number of times an interrupt request corresponding to information in the third register is issued in the first interrupt request and the second interrupt request.
請求項1に記載の割り込み管理機構において、
前記CPUの書き込み要求に応答して前記CPUの出力データを格納し、前記状態遷移回路の状態に応じて格納データを前記シリアルインタフェースに出力する第1バッファと、
前記状態遷移回路の状態に応じて前記シリアルインタフェースの出力データを格納し、前記CPUの読み出し要求に応答して格納データを前記CPUに出力する第2バッファとを備えることを特徴とする割り込み管理機構。
In the interrupt management mechanism according to claim 1,
A first buffer that stores output data of the CPU in response to a write request of the CPU and outputs the stored data to the serial interface according to a state of the state transition circuit;
An interrupt management mechanism comprising: a second buffer for storing output data of the serial interface according to a state of the state transition circuit and outputting the stored data to the CPU in response to a read request of the CPU .
CPUおよびメモリ間のデータ転送がシリアルインタフェースを介して実施されるマイクロコンピュータであって、
請求項1〜請求項4のいずれかに記載の割り込み管理機構を備えることを特徴とするマイクロコンピュータ。
A microcomputer in which data transfer between a CPU and a memory is performed via a serial interface,
A microcomputer comprising the interrupt management mechanism according to any one of claims 1 to 4.
JP2008000990A 2008-01-08 2008-01-08 Interruption management mechanism and microcomputer Withdrawn JP2009163531A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008000990A JP2009163531A (en) 2008-01-08 2008-01-08 Interruption management mechanism and microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008000990A JP2009163531A (en) 2008-01-08 2008-01-08 Interruption management mechanism and microcomputer

Publications (1)

Publication Number Publication Date
JP2009163531A true JP2009163531A (en) 2009-07-23

Family

ID=40966072

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008000990A Withdrawn JP2009163531A (en) 2008-01-08 2008-01-08 Interruption management mechanism and microcomputer

Country Status (1)

Country Link
JP (1) JP2009163531A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012003325A (en) * 2010-06-14 2012-01-05 Fujitsu Ltd Computer system and interruption request processing method
JP2016528588A (en) * 2013-06-12 2016-09-15 クアルコム,インコーポレイテッド Camera control interface expansion bus
US20230097776A1 (en) * 2021-09-28 2023-03-30 Canon Kabushiki Kaisha Image forming apparatus and control method of image forming apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012003325A (en) * 2010-06-14 2012-01-05 Fujitsu Ltd Computer system and interruption request processing method
JP2016528588A (en) * 2013-06-12 2016-09-15 クアルコム,インコーポレイテッド Camera control interface expansion bus
US20230097776A1 (en) * 2021-09-28 2023-03-30 Canon Kabushiki Kaisha Image forming apparatus and control method of image forming apparatus
US11838477B2 (en) * 2021-09-28 2023-12-05 Canon Kabushiki Kaisha Image forming apparatus and control method of image forming apparatus

Similar Documents

Publication Publication Date Title
JP4182801B2 (en) Multi-processor system
EP2165254A1 (en) Synchronisation in a multithreaded processor
US10409749B2 (en) Semiconductor device and system provided with a communication interface
KR20220028120A (en) Hardware acceleration-based SPI interface automatic reading control system and method
JP2012043031A (en) Shared cache memory device
JP5304815B2 (en) Microcomputer
JP2009163531A (en) Interruption management mechanism and microcomputer
US20130311699A1 (en) Operations using direct memory access
US20090320034A1 (en) Data processing apparatus
WO2017036101A1 (en) Method and device for updating register
WO2009098737A1 (en) External device access apparatus, its controlling method and system lsi
US7130946B2 (en) Configuration and method having a first device and a second device connected to the first device through a cross bar
JP6070600B2 (en) Microcomputer
KR100606163B1 (en) Direct memory access device, system and method for transmitting and receiving data through direct memory access device
JP6416488B2 (en) Semiconductor device
JP2009116445A (en) Programmable controller capable of executing a plurality of sequence programs in parallel
JPH0876876A (en) Clock supply control circuit of microprocessor
JP4609540B2 (en) Multi-processor system
JP2009289232A (en) Semiconductor integrated circuit
JP2003099397A (en) Data processing system
JP2002373145A (en) Direct memory access device
CN115658601A (en) Multi-core processor system and control method thereof
JP5387155B2 (en) DMA transfer control device and DMA transfer control method
JP2020149214A (en) Semiconductor device and debugging system
JPH06332842A (en) Direct memory access control circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110405