JP2008021040A - Bus master circuit, bus control method and computer program - Google Patents

Bus master circuit, bus control method and computer program Download PDF

Info

Publication number
JP2008021040A
JP2008021040A JP2006190907A JP2006190907A JP2008021040A JP 2008021040 A JP2008021040 A JP 2008021040A JP 2006190907 A JP2006190907 A JP 2006190907A JP 2006190907 A JP2006190907 A JP 2006190907A JP 2008021040 A JP2008021040 A JP 2008021040A
Authority
JP
Japan
Prior art keywords
bus
hardware
signal
state
register
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
JP2006190907A
Other languages
Japanese (ja)
Other versions
JP2008021040A5 (en
Inventor
Shiori Wakino
しおり 脇野
Masahiro Ito
正博 伊藤
裕介 ▲高▼山
Yusuke Takayama
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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2006190907A priority Critical patent/JP2008021040A/en
Publication of JP2008021040A publication Critical patent/JP2008021040A/en
Publication of JP2008021040A5 publication Critical patent/JP2008021040A5/ja
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve processing speed in detecting the status of hardware connected to a bus, and to suppress the increase of the area of this system. <P>SOLUTION: A status detection block 206 detects data quantity in the FIFO of an external communication module 203. A condition decision block 207 decides whether or not the generation conditions of an interrupt signal 217 are satisfied based on the detection result of the status detection block 206. When it is decided that the generation conditions of the interrupt signal 217 are satisfied, an interrupt signal generation block 208 generates an interrupt signal 217, and outputs it to a CPU 201. The CPU 201 performs predetermined processing based on the interrupt signal 217. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、バスマスタ回路、バス制御方法、及びコンピュータプログラムに関し、特に、バスに接続されたハードウェアの状態を検出するために用いて好適なものである。   The present invention relates to a bus master circuit, a bus control method, and a computer program, and is particularly suitable for use in detecting the state of hardware connected to a bus.

一般にプロセッサと1つ以上のハードウェアとが接続されたバスを備えたシステムLSIでは、ハードウェアを制御するために、プロセッサがハードウェアの状態を把握し、そのハードウェアの状態に応じてそのハードウェア又はその他のハードウェアを制御する。
プロセッサがハードウェアの状態を把握する手法として、ハードウェアの内部状態を示すレジスタをハードウェアの内部に設け、プロセッサがレジスタを継続的に監視することによってハードウェアの内部状態を知るポーリング手法がある。尚、以下の説明では、レジスタを監視することをポーリングと称する。また、ハードウェアの内部でレジスタの状態が予め決められた状態になったときに、ハードウェアがプロセッサに割り込み信号を通知する割り込み通知手法も用いられている。特許文献1には、通信周期内の任意のクロック数で割り込み信号を発生させるレジスタの設定値と、サイクルタイマ回路の設定値とを比較器で比較し、比較器が出力する指令を受け取ると割り込み信号をCPUに出力する割り込み発生回路が記載されている。この割り込み発生回路では、ノイズ等が発生してもホストCPUに与える割り込み信号が発生するようにしている。
In general, in a system LSI having a bus to which a processor and one or more hardware are connected, in order to control the hardware, the processor grasps the state of the hardware, and the hardware according to the state of the hardware. Hardware or other hardware.
As a method for the processor to grasp the hardware state, there is a polling method in which a register indicating the internal state of the hardware is provided in the hardware, and the processor continuously monitors the register to know the internal state of the hardware. . In the following description, monitoring a register is referred to as polling. An interrupt notification method is also used in which the hardware notifies the processor of an interrupt signal when the register state in the hardware reaches a predetermined state. In Patent Document 1, a register setting value for generating an interrupt signal at an arbitrary number of clocks within a communication cycle is compared with a setting value for a cycle timer circuit by a comparator, and an interrupt is issued when a command output from the comparator is received. An interrupt generation circuit for outputting a signal to a CPU is described. This interrupt generation circuit generates an interrupt signal to be given to the host CPU even if noise or the like occurs.

プロセッサは、前述したどちらかの手法を用いてハードウェアの内部状態を検出し、そのハードウェアの内部状態に応じてハードウェアを制御していた。
ハードウェアの内部状態を示すレジスタをプロセッサがポーリングする手法では、レジスタをリードするコマンドをプロセッサが継続的に何度も発行するため、プロセッサに多大な負荷がかかる。従って、割り込み通知手法が一般的に使われる。
The processor detects the internal state of the hardware using one of the methods described above, and controls the hardware according to the internal state of the hardware.
In the method in which the processor polls a register indicating the internal state of the hardware, the processor continuously issues a command to read the register many times, and thus a heavy load is applied to the processor. Therefore, the interrupt notification method is generally used.

しかしながら、あらゆる状況において割り込み通知手法を使用できるわけではない。例えば、ハードウェアの内部状態が設計段階では想定していなかった状態になったために、ハードウェアが割り込み信号をプロセッサに通知できない場合、プロセッサは、ポーリングを行ってハードウェアの内部状態を検出し、ハードウェアを制御する必要がある。また、バグ等によりハードウェアが意図した割り込み処理を行えない場合も同様に、プロセッサがポーリングを行ってハードウェアを制御する必要がある。
このような不都合を解消するために、バックアップ用のサブプロセッサを設け、サブプロセッサがポーリングを行ってハードウェアの内部状態を検出し、検出したハードウェアの内部状態をメインプロセッサに通知してハードウェアを制御する手法も採られてきた。
However, the interrupt notification technique cannot be used in all situations. For example, if the hardware cannot notify the processor of an interrupt signal because the hardware internal state has not been assumed at the design stage, the processor performs polling to detect the hardware internal state, You need to control the hardware. Similarly, when the hardware cannot perform the interrupt processing intended by the hardware due to a bug or the like, the processor needs to perform polling to control the hardware.
In order to solve such inconvenience, a sub processor for backup is provided, and the sub processor performs polling to detect the internal state of the hardware, and notifies the main processor of the detected internal state of the hardware. A method for controlling the above has also been adopted.

特開2002−185469号公報JP 2002-185469 A

しかしながら、前述したサブプロセッサを用いてハードウェアの内部状態を検出する手法では、次のような不都合があった。
まず、サブプロセッサは、リセットが解除された後に、実行するプログラムのコードをROM等から読み出すブート処理が必要になる。従って、システムの起動に時間がかかる上に、プログラムを格納するためのメモリ領域が必要となる。
However, the method for detecting the internal state of the hardware using the sub-processor described above has the following disadvantages.
First, after the reset is released, the sub processor needs a boot process for reading the code of the program to be executed from the ROM or the like. Therefore, it takes time to start the system, and a memory area for storing the program is required.

また、メインプロセッサとサブプロセッサとの通信(マルチプロセッサ間通信)が必要となる。従って、双方のプロセッサが使用できる共有メモリを確保しなければならない。共有メモリには、サブプロセッサからメインプロセッサへの処理依頼メッセージを格納する領域と、その処理依頼に対するメインプロセッサからサブプロセッサへの応答メッセージを格納する領域とが必要になる。更に共有メモリには、メインプロセッサからサブプロセッサへの処理依頼メッセージを格納する領域と、その処理依頼に対するサブプロセッサからメインプロセッサへの応答メッセージを格納する領域も必要になる。   Further, communication (inter-multiprocessor communication) between the main processor and the sub processor is required. Therefore, a shared memory that can be used by both processors must be secured. The shared memory requires an area for storing a processing request message from the sub processor to the main processor and an area for storing a response message from the main processor to the sub processor in response to the processing request. Further, the shared memory also requires an area for storing a processing request message from the main processor to the sub processor and an area for storing a response message from the sub processor to the main processor in response to the processing request.

サブプロセッサからメインプロセッサへの処理依頼をする場合、サブプロセッサは、メインプロセッサへの処理依頼メッセージ格納領域(共有メモリ)に、メインプロセッサへの処理依頼メッセージを書き込んで、メインプロセッサに対して割り込み通知を行う。通常プロセッサはスレーブインターフェースを備えない。従って、この割り込み通知をクリアする場合、メインプロセッサは、サブプロセッサへの処理依頼メッセージ格納領域(共有メモリ)に、サブプロセッサへの処理依頼メッセージを書き込んで、サブプロセッサに対して割り込み通知を行う。このような割り込みクリアのシーケンスは、割り込みクリアレジスタをクリアして行う通常の処理に比べると処理時間がかかる。   When making a processing request from the sub processor to the main processor, the sub processor writes the processing request message to the main processor in the processing request message storage area (shared memory) to the main processor, and notifies the main processor of an interrupt. I do. Usually the processor does not have a slave interface. Therefore, when clearing this interrupt notification, the main processor writes the processing request message for the sub processor in the processing request message storage area (shared memory) for the sub processor, and notifies the sub processor of the interrupt. Such an interrupt clear sequence takes more processing time than normal processing performed by clearing the interrupt clear register.

また、コストを削減するシステムLSIにおいては、例えば面積の小さな8ビットマイコンであっても、サブプロセッサを設けたことによるシステムLSIの面積の増加は好ましくない。更に、サブプロセッサを設けると、サブプロセッサ本体に加えて、サブプロセッサがプログラムを実行するためのワークメモリ領域等のハードウェアリソースが必要になる。このようなハードウェアリソースは、システムLSIの面積が増加する要因となる。   Further, in the system LSI for reducing the cost, for example, even if the area is an 8-bit microcomputer, an increase in the area of the system LSI due to the provision of the sub processor is not preferable. Further, when the sub processor is provided, in addition to the sub processor main body, hardware resources such as a work memory area for the sub processor to execute the program are required. Such hardware resources become a factor that increases the area of the system LSI.

本発明はこのような問題点に鑑み、バスに接続されたハードウェアの状態を検出する際の処理速度を向上させると共に、システムの面積の増加を抑えるようにすることを目的とする。   The present invention has been made in view of such problems, and it is an object of the present invention to improve the processing speed when detecting the state of hardware connected to a bus and suppress an increase in the area of the system.

本発明のバスマスタ回路は、プロセッサ及び1つ以上のハードウェアとバスを介して相互に接続されたバスマスタ回路であって、前記バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出手段と、前記検出手段により検出されたハードウェアの状態を判別する判別手段と、前記判別手段により判別されたハードウェアの状態に基づいて制御信号を生成する生成手段と、前記生成手段により生成された制御信号を前記バスに出力する出力手段とを有することを特徴とする。   The bus master circuit of the present invention is a bus master circuit that is mutually connected via a bus with a processor and one or more hardware, and is connected to each other via the bus by accessing the bus as a bus master. Detection means for detecting a hardware state, determination means for determining the hardware state detected by the detection means, and generation means for generating a control signal based on the hardware state determined by the determination means And output means for outputting the control signal generated by the generating means to the bus.

本発明のバス制御方法は、バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出ステップと、前記検出ステップにより検出されたハードウェアの状態を判別する判別ステップと、前記判別ステップにより判別されたハードウェアの状態に基づいて制御信号を生成する生成ステップと、前記生成ステップにより生成された制御信号を前記バスに出力する出力ステップとを有することを特徴とする。   The bus control method according to the present invention includes a detection step of accessing a bus as a bus master and detecting a state of hardware connected to each other via the bus, and determining a hardware state detected by the detection step. And a generating step for generating a control signal based on a hardware state determined by the determining step, and an output step for outputting the control signal generated by the generating step to the bus. Features.

本発明のコンピュータプログラムは、バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出ステップと、前記検出ステップにより検出されたハードウェアの状態を判別する判別ステップと、前記判別ステップにより判別されたハードウェアの状態に基づいて制御信号を生成する生成ステップと、前記生成ステップにより生成された制御信号を前記バスに出力する出力ステップとをコンピュータに実行させることを特徴とする。   A computer program according to the present invention accesses a bus as a bus master, detects a state of hardware connected to each other via the bus, and determines a hardware state detected by the detection step Causing the computer to execute a determination step, a generation step for generating a control signal based on the hardware state determined in the determination step, and an output step for outputting the control signal generated in the generation step to the bus It is characterized by that.

本発明によれば、バスにバスマスタとしてアクセスして、ハードウェアの状態を検出し、検出したハードウェアの状態に基づいて制御信号を生成して出力するようにした。従って、プロセッサがハードウェアの状態を検出する必要がなくなるので、プロセッサの負荷を削減することと、ハードウェアの状態を検出する際の動作速度を向上させることと、システムの面積の増加を抑えることとを実現することが可能になる。   According to the present invention, the bus is accessed as a bus master, the hardware state is detected, and the control signal is generated and output based on the detected hardware state. This eliminates the need for the processor to detect the hardware status, thus reducing the load on the processor, improving the operating speed when detecting the hardware status, and suppressing an increase in system area. Can be realized.

また、本発明の他の特徴によれば、ハードウェアの状態に基づいて、そのハードウェアと異なる第2のハードウェアの動作に関わる制御信号を生成し、生成した制御信号を、バスを介して第2のハードウェアに出力するようにした。従って、プロセッサへの割り込み処理を行わずにハードウェアモジュールの動作を制御することが可能になる。   According to another aspect of the invention, based on the state of the hardware, a control signal related to the operation of the second hardware different from the hardware is generated, and the generated control signal is transmitted via the bus. Output to the second hardware. Therefore, it is possible to control the operation of the hardware module without performing interrupt processing to the processor.

また、本発明のその他の特徴によれば、ハードウェアの状態に基づいて、プロセッサへ供給されるクロックを制御するための制御信号を生成するようにした。従って、例えば、プロセッサが停止している状況においても、ハードウェアの動作を制御することが可能になる。   According to another feature of the present invention, a control signal for controlling a clock supplied to the processor is generated based on a hardware state. Therefore, for example, even when the processor is stopped, the hardware operation can be controlled.

また、本発明のその他の特徴によれば、ハードウェアの状態を検出する間隔をあけるようにしたので、バスの負荷を軽減することが可能になる。
更に、本発明のその他の特徴によれば、ハードウェアの状態を検出する間隔をプログラマブルに設定可能にしたので、ハードウェアの状態の検出頻度を調整することが可能になる。
In addition, according to another feature of the present invention, the interval for detecting the hardware state is provided, so that the load on the bus can be reduced.
Furthermore, according to the other feature of the present invention, since the interval for detecting the hardware state can be set in a programmable manner, the detection frequency of the hardware state can be adjusted.

また、本発明のその他の特徴によれば、制御信号の出力先のアドレスと、制御信号に含めるデータとをプログラマブルに設定可能にしたので、様々なハードウェアを様々な形態で制御することが可能になる。   In addition, according to another feature of the present invention, the output destination address of the control signal and the data included in the control signal can be set in a programmable manner, so that various hardware can be controlled in various forms. become.

また、本発明のその他の特徴によれば、状態を検出するハードウェアのアドレスをプログラマブルに設定可能にしたので、様々なハードウェアの状態を検出することが可能になる。
また、本発明のその他の特徴によれば、ハードウェアの状態を判別するための条件をプログラマブルに設定可能にしたので、様々な条件でハードウェアの状態を判別することが可能になる。
According to another feature of the present invention, the hardware address for detecting the state can be set in a programmable manner, so that various hardware states can be detected.
According to another feature of the present invention, the condition for determining the hardware state can be set in a programmable manner, so that the hardware state can be determined under various conditions.

(第1の実施形態)
以下に、図面を参照しながら、本発明の第1の実施形態について説明する。
まず、本実施形態のバスマスタ回路の基本構成を説明する。図1は、バスマスタ回路の基本構成の一例を示す図である。
図1において、バスマスタ回路101は、バスマスタ機能ブロック102、状態検出ブロック103、条件判定ブロック104、ハードウェア制御ブロック105、制御レジスタ群106、及びバススレーブ機能ブロック107を有する。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.
First, the basic configuration of the bus master circuit of this embodiment will be described. FIG. 1 is a diagram illustrating an example of a basic configuration of a bus master circuit.
In FIG. 1, the bus master circuit 101 includes a bus master function block 102, a state detection block 103, a condition determination block 104, a hardware control block 105, a control register group 106, and a bus slave function block 107.

バスマスタ機能ブロック102は、システムバス108のバスプロトコルに従って、バスマスタとしてシステムバス108にアクセス(バスアクセス)するためのマスタインターフェースのブロックである。
状態検出ブロック103は、システムバス108に接続されたハードウェアの内部状態を表示するレジスタの設定を読み出すことを、バスマスタ機能ブロック102に継続的に要求する。以下の説明では、この要求を必要に応じてリード要求と称する。また、システムバス108に接続されたハードウェアの内部状態を表示するレジスタの設定を、必要に応じてリードデータと称する。そして、状態検出ブロック103は、リード要求に基づいてバスマスタ機能ブロック102が取得したリードデータを受け取る。また、状態検出ブロック103は、システムバス108に接続されたハードウェアの内部状態を表示するレジスタのアドレスや、ポーリングを行う間隔等、バスマスタ回路101が行うポーリングを制御する。
The bus master function block 102 is a master interface block for accessing the system bus 108 as a bus master (bus access) in accordance with the bus protocol of the system bus 108.
The state detection block 103 continuously requests the bus master function block 102 to read the setting of the register that displays the internal state of the hardware connected to the system bus 108. In the following description, this request is referred to as a read request as necessary. The setting of a register that displays the internal state of the hardware connected to the system bus 108 is referred to as read data as necessary. Then, the state detection block 103 receives the read data acquired by the bus master function block 102 based on the read request. The state detection block 103 controls polling performed by the bus master circuit 101, such as the address of a register that displays the internal state of the hardware connected to the system bus 108 and the polling interval.

条件判定ブロック104は、状態検出ブロック103からリードデータを受け取り、受け取ったリードデータと判定条件とを比較して、条件を満たしているか否かを判定するブロックである。そして、条件判定ブロック104は、判定した条件を満たしているか否かを示す条件判定フラグを生成する。
ハードウェア制御ブロック105は、条件判定ブロック104から条件判定フラグを受け取り、受け取った条件判定フラグに基づき、システムバス108に接続されたプロセッサやハードウェアを制御するための制御信号を生成するブロックである。
The condition determination block 104 is a block that receives read data from the state detection block 103 and compares the received read data with a determination condition to determine whether the condition is satisfied. Then, the condition determination block 104 generates a condition determination flag indicating whether or not the determined condition is satisfied.
The hardware control block 105 is a block that receives a condition determination flag from the condition determination block 104 and generates a control signal for controlling a processor and hardware connected to the system bus 108 based on the received condition determination flag. .

制御レジスタ群106は、バスマスタ回路101の動作設定を行うレジスタ群である。このレジスタ群は、例えば、システムバス108に接続されたCPU等によってプログラマブルに設定される。
バススレーブ機能ブロック107は、システムバス108に接続されたCPU等が制御レジスタ群106にアクセスするためのインターフェースである。このバススレーブ機能ブロック107は、システムバス108のバスプロトコルに従って、バススレーブとしてシステムバス108とアクセス(バスアクセス)するためのスレーブインターフェースのブロックである。
The control register group 106 is a register group for setting the operation of the bus master circuit 101. This register group is set in a programmable manner by a CPU connected to the system bus 108, for example.
The bus slave function block 107 is an interface for a CPU or the like connected to the system bus 108 to access the control register group 106. The bus slave function block 107 is a block of a slave interface for accessing (bus access) the system bus 108 as a bus slave according to the bus protocol of the system bus 108.

次に、システムバス108に接続されたハードウェアの内部状態を表示するレジスタを、バスマスタ回路101を用いてポーリングし、ポーリングした結果に基づいて、プロセッサやハードウェアを制御する手法の具体例を詳細に述べる。ここでは、バスマスタ回路101の要件の一つであるハードウェア制御ブロック105を、システムバス108に接続されたCPUに対する割り込み信号を生成する機能を有する割り込み信号生成ブロックで構成する場合を例に挙げて説明する。   Next, a specific example of a method of polling a register that displays the internal state of hardware connected to the system bus 108 using the bus master circuit 101 and controlling the processor and hardware based on the polled result is detailed. In the following. Here, as an example, the hardware control block 105, which is one of the requirements of the bus master circuit 101, is configured by an interrupt signal generation block having a function of generating an interrupt signal for the CPU connected to the system bus 108. explain.

図2は、CPUに対する割り込み信号を生成するバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。
図2において、システムLSIは、CPU201、バスマスタ回路202、外部通信モジュール203、及びシステムバス108を備えて構成される。尚、システムLSIには、これら以外に、例えばROMやRAM等も存在している。
バスマスタ回路202は、バスマスタ機能ブロック205、状態検出ブロック206、条件判定ブロック207、割り込み信号生成ブロック208、制御レジスタ群209、及びバススレーブ機能ブロック210を有する。このバスマスタ回路202は、割り込み信号(interrupt)217を生成し、生成した割り込み信号217を、システムバス108を介してCPU201に送信する。
FIG. 2 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit that generates an interrupt signal for the CPU.
In FIG. 2, the system LSI includes a CPU 201, a bus master circuit 202, an external communication module 203, and a system bus 108. In addition to these, the system LSI also includes, for example, a ROM and a RAM.
The bus master circuit 202 includes a bus master function block 205, a state detection block 206, a condition determination block 207, an interrupt signal generation block 208, a control register group 209, and a bus slave function block 210. The bus master circuit 202 generates an interrupt signal (interrupt) 217 and transmits the generated interrupt signal 217 to the CPU 201 via the system bus 108.

バスマスタ機能ブロック205は、システムバス108のバスプロトコルに従って、バスマスタとしてシステムバス108とアクセス(バスアクセス)するためのマスタインターフェースのブロックである。
状態検出ブロック206は、バスマスタ機能ブロック205にリード要求を行うリード要求制御ブロック206aと、バスマスタ機能ブロック205からリードデータを受信するレジスタ(DataReg)206bとを有する。また、状態検出ブロック206は、制御レジスタ群209から信号(En、Sts_Addr)221、222を受け取る。尚、信号(En、Sts_Addr)221、222の詳細については後述する。
The bus master function block 205 is a master interface block for accessing (bus access) the system bus 108 as a bus master according to the bus protocol of the system bus 108.
The state detection block 206 includes a read request control block 206a that makes a read request to the bus master function block 205, and a register (DataReg) 206b that receives read data from the bus master function block 205. The state detection block 206 receives signals (En, Sts_Addr) 221 and 222 from the control register group 209. Details of the signals (En, Sts_Addr) 221 and 222 will be described later.

リード要求制御機能ブロック206aは、バスマスタ機能ブロック205とのインターフェースを有する。このリード要求制御機能ブロック206aは、リードリクエスト信号(req)232とアクセス終了信号(done)233とのハンドシェークで、アドレス信号(addr)231とリードデータ(rdata)234との受け渡しを行う。   The read request control function block 206 a has an interface with the bus master function block 205. The read request control function block 206a transfers the address signal (addr) 231 and the read data (rdata) 234 by handshaking the read request signal (req) 232 and the access end signal (done) 233.

制御レジスタ群209のポーリング制御レジスタ211から送信された信号(En)221がポーリングの開始を示すものであるとき(En=0x1のとき)、リード要求制御機能ブロック206aは、バスマスタ機能ブロック205にリード要求を行う。具体的にリード要求制御機能ブロック206aは、ポーリングするターゲットとなるレジスタのアドレスを、ターゲットアドレスレジスタ212から出力された信号(Sts_Addr)222から読み取る。そして、リード要求制御機能ブロック206aは、リードリクエスト信号(req)232とアクセスアドレス信号(addr)231とをバスマスタ機能ブロック205に発行する。   When the signal (En) 221 transmitted from the polling control register 211 of the control register group 209 indicates the start of polling (when En = 0x1), the read request control function block 206a reads the bus master function block 205. Make a request. Specifically, the read request control function block 206a reads the address of the register to be polled from the signal (Sts_Addr) 222 output from the target address register 212. Then, the read request control function block 206 a issues a read request signal (req) 232 and an access address signal (addr) 231 to the bus master function block 205.

また、リード要求制御機能ブロック206aは、アクセス終了信号(done)233とリードデータ(rdata)234とをバスマスタ機能ブロック205から受信する。リード要求制御機能ブロック206aは、受信したリードデータ(rdata)234を内部のレジスタ206bに格納する。尚、制御レジスタ群209のポーリング制御レジスタ211から送信された信号(En)221がポーリングの開始を示すものでないときは(En=0x0のときは)、リード要求制御機能ブロック206aは、リード要求を行わない。   Further, the read request control function block 206 a receives the access end signal (done) 233 and the read data (rdata) 234 from the bus master function block 205. The read request control function block 206a stores the received read data (rdata) 234 in the internal register 206b. When the signal (En) 221 transmitted from the polling control register 211 of the control register group 209 does not indicate the start of polling (when En = 0x0), the read request control function block 206a issues a read request. Not performed.

条件判定ブロック207は、状態検出ブロック206からレジスタ206bの出力信号(data)241を受け取り、その出力信号(data)241(すなわちリードデータ)と判定条件とを比較し、条件を満たしているか否かを判定するブロックである。そして、条件判定ブロック207は、判定した条件を満たしているか否かを示す条件判定フラグの信号(flag)242を生成する。また、条件判定ブロック207は、制御レジスタ群209の判定データレジスタ223から信号(Cond_Val)223を、判定マスクレジスタ214から信号(Cond_Mask)224を受け取る。尚、信号(Cond_Val、Cond_Mask)223、224の詳細については後述する。   The condition determination block 207 receives the output signal (data) 241 of the register 206b from the state detection block 206, compares the output signal (data) 241 (that is, read data) with the determination condition, and determines whether the condition is satisfied. This is a block for determining. Then, the condition determination block 207 generates a condition determination flag signal (flag) 242 indicating whether or not the determined condition is satisfied. The condition determination block 207 also receives a signal (Cond_Val) 223 from the determination data register 223 of the control register group 209 and a signal (Cond_Mask) 224 from the determination mask register 214. Details of the signals (Cond_Val, Cond_Mask) 223, 224 will be described later.

図3は、条件判定ブロック207の構成の一例を示す図である。
図3において、比較器501は、排他的NOR回路で構成される。信号(raw_flag)511a〜511cは、信号(data)241a〜241cと、信号(Cond_Val)223a〜223cとのビット毎の比較の結果である。この比較の結果、信号(data)241a〜241cと、信号(Cond_Val)223a〜223cとが一致すれば、信号(raw_flag)511として「1」が出力される。一方、信号(data)241a〜241cと、信号(Cond_Val)223a〜223cとが不一致であれば、信号(raw_flag)511として「0」が出力される。
FIG. 3 is a diagram illustrating an example of the configuration of the condition determination block 207.
In FIG. 3, the comparator 501 is composed of an exclusive NOR circuit. Signals (raw_flag) 511a to 511c are the results of bit-by-bit comparison between signals (data) 241a to 241c and signals (Cond_Val) 223a to 223c. As a result of the comparison, if the signals (data) 241a to 241c match the signals (Cond_Val) 223a to 223c, “1” is output as the signal (raw_flag) 511. On the other hand, if the signals (data) 241a to 241c and the signals (Cond_Val) 223a to 223c do not match, “0” is output as the signal (raw_flag) 511.

セレクタ502は、比較器501から出力された信号(raw_flag)511と、マスクデータである信号(Cond_Mask)224とを選択する。セレクタ502は、信号(Cond_Mask)224が「1」のときに、その信号(Cond_Mask)224を出力し、信号(raw_flag)511はマスクされる。一方、信号(Cond_Mask)224が「0」のとき、セレクタ502は、信号(raw_flag)511を出力する。論理積回路503は、セレクタ502から出力された信号の全ビットの論理積を演算する。論理積回路503は、演算した結果に基づく条件判定フラグを信号(flag)242として割り込み信号生成ブロック208に出力する。条件判定フラグは、信号(Cond_Mask)224でマスクされたビット以外の信号(raw_flag)511が全て「1」のときに「1」となり、それ以外のときには「0」となる。   The selector 502 selects the signal (raw_flag) 511 output from the comparator 501 and the signal (Cond_Mask) 224 that is mask data. When the signal (Cond_Mask) 224 is “1”, the selector 502 outputs the signal (Cond_Mask) 224 and the signal (raw_flag) 511 is masked. On the other hand, when the signal (Cond_Mask) 224 is “0”, the selector 502 outputs a signal (raw_flag) 511. The logical product circuit 503 calculates the logical product of all the bits of the signal output from the selector 502. The AND circuit 503 outputs a condition determination flag based on the calculated result to the interrupt signal generation block 208 as a signal (flag) 242. The condition determination flag is “1” when all the signals (raw_flag) 511 other than the bits masked by the signal (Cond_Mask) 224 are “1”, and “0” otherwise.

図2に説明を戻し、割り込み信号生成ブロック208は、条件判定ブロック207から条件判定フラグの信号(flag)242を受け取り、割り込み信号(interrupt)217を生成するブロックである。また、制御レジスタ群209の信号生成制御レジスタ215から信号(Polarity)225を、クリアレジスタ216から信号(Clear)226を受け取る。尚、信号(Polarity、Clear)225、226の詳細については後述する。   Returning to FIG. 2, the interrupt signal generation block 208 is a block that receives the condition determination flag signal (flag) 242 from the condition determination block 207 and generates an interrupt signal (interrupt) 217. Further, a signal (Polarity) 225 is received from the signal generation control register 215 of the control register group 209, and a signal (Clear) 226 is received from the clear register 216. The details of the signals (Polarity, Clear) 225, 226 will be described later.

図4は、割り込み信号生成ブロック208の構成の一例を示す図である。
図4において、割り込み信号制御部601は、条件判定フラグの信号(flag)242から、正論理の割り込み信号(int)611を生成する。具体的に、クリアレジスタ216からの信号(Clear)226が「0」である場合、割り込み信号制御部601は、条件判定フラグの信号(flag)242から、正論理の割り込み信号(int)611を生成する(int=1)。一方、クリアレジスタ216からの信号(Clear)226が「0」である場合に、割り込み信号制御部601は、正論理の割り込み信号(int)611をネゲートする(int=0)。
FIG. 4 is a diagram illustrating an example of the configuration of the interrupt signal generation block 208.
In FIG. 4, the interrupt signal control unit 601 generates a positive logic interrupt signal (int) 611 from the condition determination flag signal (flag) 242. Specifically, when the signal (Clear) 226 from the clear register 216 is “0”, the interrupt signal control unit 601 generates a positive logic interrupt signal (int) 611 from the condition determination flag signal (flag) 242. Generate (int = 1). On the other hand, when the signal (Clear) 226 from the clear register 216 is “0”, the interrupt signal control unit 601 negates the positive logic interrupt signal (int) 611 (int = 0).

セレクタ602は、割り込み信号制御部601から出力された割り込み信号(int)611の極性を選択する。セレクタ602は、信号(Polarity)225が「0」のとき、割り込み信号(interrupt)217として正論理の割り込み信号(int)611を出力する。一方、信号(Polarity)225が「1」のとき、セレクタ602は、割り込み信号(interrupt)217として正論理の割り込み信号(int)611を反転させた負論理の割り込み信号を出力する。   The selector 602 selects the polarity of the interrupt signal (int) 611 output from the interrupt signal control unit 601. The selector 602 outputs a positive logic interrupt signal (int) 611 as the interrupt signal (interrupt) 217 when the signal (Polarity) 225 is “0”. On the other hand, when the signal (Polarity) 225 is “1”, the selector 602 outputs a negative logic interrupt signal obtained by inverting the positive logic interrupt signal (int) 611 as the interrupt signal (interrupt) 217.

図2に説明を戻し、制御レジスタ群209は、状態検出ブロック206、条件判定ブロック207、及び割り込み信号生成ブロック208の動作を制御する信号のソースレジスタを有するブロックである。CPU201が各レジスタ211〜216の設定をプログラマブルに行う。
ポーリング制御レジスタ211は、ポーリングのスタート及びストップを制御するものであり、ポーリングのスタート、ストップを示す信号(En)221を状態検出ブロック206に出力する。図5(a)に、ポーリング制御レジスタ211の仕様の一例を示す。図5(a)において、Bitsはビット構成を示し、Nameは信号名を示し、Accessは属性を示し、Functionは機能を示す。ここで、属性のRはリードを示し、Wはライトを示す。ポーリング制御レジスタ211の0ビット目Enが「1」に設定されると、ポーリングをスタートさせる。すなわち、ポーリング制御レジスタ211は、「0x1」を示す信号(En)221を状態検出ブロック206に出力する。一方、ポーリング制御レジスタ211の0ビット目Enが「0」に設定されると、ポーリングをストップさせる。すなわち、ポーリング制御レジスタ211は、「0x0」を示す信号(En)221を状態検出ブロック206に出力する。
Returning to FIG. 2, the control register group 209 is a block having source registers for signals that control operations of the state detection block 206, the condition determination block 207, and the interrupt signal generation block 208. The CPU 201 performs setting of the registers 211 to 216 in a programmable manner.
The polling control register 211 controls the start and stop of polling, and outputs a signal (En) 221 indicating the start and stop of polling to the state detection block 206. FIG. 5A shows an example of the specification of the polling control register 211. In FIG. 5A, Bits indicates a bit configuration, Name indicates a signal name, Access indicates an attribute, and Function indicates a function. Here, the attribute R indicates read, and W indicates write. When the 0th bit En of the polling control register 211 is set to “1”, polling is started. That is, the polling control register 211 outputs a signal (En) 221 indicating “0x1” to the state detection block 206. On the other hand, when the 0th bit En of the polling control register 211 is set to “0”, the polling is stopped. That is, the polling control register 211 outputs a signal (En) 221 indicating “0x0” to the state detection block 206.

ターゲットアドレスレジスタ212は、ポーリングするターゲットのレジスタ(例えばFIFOデータポインタレジスタ204)のアドレスを設定するものであり、そのアドレスを示す信号(Sts_Addr)222を状態検出ブロック206に出力する。図5(b)に、ターゲットアドレスレジスタ212の仕様の一例を示す。図5(b)に示すように、本実施形態では、信号(Sts_Addr)222を32ビットの構成としている。また、信号(Sts_Addr)222のビット幅を、使用するシステムバス108のアドレス幅と同じにしている。   The target address register 212 sets an address of a polling target register (for example, the FIFO data pointer register 204), and outputs a signal (Sts_Addr) 222 indicating the address to the state detection block 206. FIG. 5B shows an example of the specification of the target address register 212. As shown in FIG. 5B, in this embodiment, the signal (Sts_Addr) 222 has a 32-bit configuration. Further, the bit width of the signal (Sts_Addr) 222 is made the same as the address width of the system bus 108 to be used.

判定データレジスタ213は、条件判定ブロック207における比較条件となるデータを設定するためのものであり、比較条件となるデータを示す信号(Cond_Val)223を条件判定ブロック207に出力する。図5(c)に、判定データレジスタ213の仕様の一例を示す。図5(c)に示すように、本実施形態では、信号(Cond_Val)223を32ビットの構成としている。また、信号(Cond_Val)223のビット幅を、使用するシステムバス108のデータ幅と同じにしている。   The determination data register 213 is for setting data as a comparison condition in the condition determination block 207, and outputs a signal (Cond_Val) 223 indicating data as a comparison condition to the condition determination block 207. FIG. 5C shows an example of the specification of the determination data register 213. As shown in FIG. 5C, in this embodiment, the signal (Cond_Val) 223 has a 32-bit configuration. The bit width of the signal (Cond_Val) 223 is the same as the data width of the system bus 108 to be used.

判定データマスクレジスタ214は、条件判定をマスクするビットをビット毎に設定するためのものであり、その設定を示す信号(Cond_Mask)224を条件判定ブロック207に出力する。図5(d)に、判定データマスクレジスタ214の仕様の一例を示す。図5(d)に示すように、本実施形態では、信号(Cond_Mask)224を32ビットの構成としている。信号(Cond_Mask)224のビット幅を、使用するシステムバス108のデータ幅と同じにしている。図3に示したように、本実施形態では、信号(Cond_Mask)224を用いて、条件判定をマスクするビットをビット毎にマスクする。また、前述したように、該当するビットに対応する信号(Cond_Mask)224に「1」が設定されると、そのビットにおける条件判定がマスクされる。   The determination data mask register 214 is for setting a bit for masking the condition determination for each bit, and outputs a signal (Cond_Mask) 224 indicating the setting to the condition determination block 207. FIG. 5D shows an example of the specification of the determination data mask register 214. As shown in FIG. 5D, in this embodiment, the signal (Cond_Mask) 224 has a 32-bit configuration. The bit width of the signal (Cond_Mask) 224 is the same as the data width of the system bus 108 to be used. As shown in FIG. 3, in this embodiment, a signal (Cond_Mask) 224 is used to mask a bit for masking condition determination for each bit. Further, as described above, when “1” is set in the signal (Cond_Mask) 224 corresponding to the corresponding bit, the condition determination for that bit is masked.

信号生成制御レジスタ215は、生成する割り込み信号(interrupt)217を制御するためのものであり、信号(Polarity)225を割り込み信号生成ブロック208に出力する。図5(e)に、信号生成制御レジスタ215の仕様の一例を示す。図5(e)に示すように、信号生成制御レジスタ215の0ビット目Polarityが「0」に設定されると、正論理の割り込み信号217が生成され、「1」に設定されると、負論理の割り込み信号217が生成される(図4を参照)。   The signal generation control register 215 is for controlling an interrupt signal (interrupt) 217 to be generated, and outputs a signal (Polarity) 225 to the interrupt signal generation block 208. FIG. 5E shows an example of the specification of the signal generation control register 215. As shown in FIG. 5E, when the 0th bit Polarity of the signal generation control register 215 is set to “0”, a positive logic interrupt signal 217 is generated, and when it is set to “1”, it is negative. A logical interrupt signal 217 is generated (see FIG. 4).

クリアレジスタ216は、割り込み信号217をクリアするためのものであり、信号(Clear)226を割り込み信号生成ブロック208に出力する。図5(f)に、割り込みクリアレジスタ216の仕様の一例を示す。割り込みクリアレジスタ216の0ビット目Clearが「1」に設定されると、割り込み信号217がクリアされる。そして、割り込み信号217がクリアされると、割り込みクリアレジスタ216の0ビット目Clearは、自動的に「0」に戻る。   The clear register 216 is for clearing the interrupt signal 217, and outputs a signal (Clear) 226 to the interrupt signal generation block 208. FIG. 5F shows an example of the specification of the interrupt clear register 216. When the 0th bit Clear of the interrupt clear register 216 is set to “1”, the interrupt signal 217 is cleared. When the interrupt signal 217 is cleared, the 0th bit Clear of the interrupt clear register 216 automatically returns to “0”.

バススレーブ機能ブロック210は、CPU201が制御レジスタ群209にアクセスするためのインターフェースである。このバススレーブ機能ブロック210は、システムバス108のバスプロトコルに従って、バススレーブとしてシステムバス108とアクセス(バスアクセス)するためのスレーブインターフェースのブロックである。   The bus slave function block 210 is an interface for the CPU 201 to access the control register group 209. The bus slave function block 210 is a slave interface block for accessing (bus access) the system bus 108 as a bus slave in accordance with the bus protocol of the system bus 108.

外部通信モジュール203は、外部からのデータを送受信するブロックであり、データ受信用に1byte、16段のFIFO(First-In First-Out)を内蔵する。本実施形態では、FIFOに存在するデータ数を示すデータポインタレジスタ204が、アドレス「0xA000_0000」にマッピングされているとする。
図6は、データポインタレジスタ204の仕様の一例を示す図である。図6に示すように、4ビットのデータでFIFOに存在するデータ数を示し、データポインタレジスタ204の値は、「0x0」から「0xf」まで変化する。データポインタレジスタ204は、データを受信して、FIFOがフルになり、データポインタレジスタ204の値が「0xf」になると、正論理の割り込み信号(int_full)218を、システムバス108を介してCPU201に通知する。
The external communication module 203 is a block for transmitting and receiving data from the outside, and incorporates a 1-byte, 16-stage FIFO (First-In First-Out) for data reception. In the present embodiment, it is assumed that the data pointer register 204 indicating the number of data existing in the FIFO is mapped to the address “0xA000_0000”.
FIG. 6 is a diagram illustrating an example of the specification of the data pointer register 204. As shown in FIG. 6, the number of data existing in the FIFO is indicated by 4-bit data, and the value of the data pointer register 204 changes from “0x0” to “0xf”. The data pointer register 204 receives data, and when the FIFO becomes full and the value of the data pointer register 204 becomes “0xf”, a positive logic interrupt signal (int_full) 218 is sent to the CPU 201 via the system bus 108. Notice.

次に、図2に示すシステムLSIの動作の一例について説明する。ここでは、バスマスタ回路202が、外部通信モジュール203のFIFOがフルになる一歩手前の状態(すなわち、データポインタレジスタ204の値が「0xe」となったこと)を検出して割り込み信号217を生成する場合を例に挙げて説明する。   Next, an example of the operation of the system LSI shown in FIG. 2 will be described. Here, the bus master circuit 202 detects the state one step before the FIFO of the external communication module 203 becomes full (that is, the value of the data pointer register 204 becomes “0xe”), and generates the interrupt signal 217. A case will be described as an example.

まず、CPU201は、ポーリングするFIFOデータポインタレジスタ204のアドレス「0xA000_0000」をターゲットアドレスレジスタ212に設定する。これにより、ターゲットアドレスレジスタ212から出力される信号(Sts_Addr)222は、「0xA000_0000」を示す信号となる(Sts_Addr=0xA000_0000)。
次に、CPU201は、条件判定ブロック207における比較条件となるデータとして「0xe」を判定データレジスタ213に設定する。これにより、判定データレジスタ213から出力される信号(Cond_Val)223は、「0xe」を示す信号となる(Cond_Val=0xe)。
First, the CPU 201 sets the address “0xA000_0000” of the FIFO data pointer register 204 to be polled in the target address register 212. Accordingly, the signal (Sts_Addr) 222 output from the target address register 212 becomes a signal indicating “0xA000_0000” (Sts_Addr = 0xA000_0000).
Next, the CPU 201 sets “0xe” in the determination data register 213 as data that serves as a comparison condition in the condition determination block 207. As a result, the signal (Cond_Val) 223 output from the determination data register 213 becomes a signal indicating “0xe” (Cond_Val = 0xe).

またここでは、条件判定ブロック207で比較を行うデータは4ビットであるので、それ以外のビットの比較を行う必要はない。従って、その比較を行わないビットをマスクするために、CPU201は、「0xffff_fff0」を判定マスクレジスタ214に設定する。これにより、判定マスクレジスタ214から出力される信号(Cond_Mask)224は、「0xffff_fff0」を示す信号となる(Cond_Mask=0xffff_fff0)。   Here, since the data to be compared in the condition determination block 207 is 4 bits, it is not necessary to compare other bits. Therefore, the CPU 201 sets “0xffff_fff0” in the determination mask register 214 in order to mask the bits that are not compared. As a result, the signal (Cond_Mask) 224 output from the determination mask register 214 becomes a signal indicating “0xffff_fff0” (Cond_Mask = 0xffff_fff0).

次に、CPU201は、信号生成制御レジスタ215に「0x0」を設定する。これにより、信号生成制御レジスタ215から出力される信号225は、「0x0」を示す信号となる(Porality=0x0)。そして、CPU201は、ポーリング制御レジスタ211に「0x1」を設定する。これにより、ポーリング制御レジスタ211から状態検出ブロック206に出力される信号221は、「0x1」となり(En=0x1)、ポーリングがスタートする。   Next, the CPU 201 sets “0x0” in the signal generation control register 215. As a result, the signal 225 output from the signal generation control register 215 is a signal indicating “0x0” (Porality = 0x0). Then, the CPU 201 sets “0x1” in the polling control register 211. As a result, the signal 221 output from the polling control register 211 to the state detection block 206 becomes “0x1” (En = 0x1), and polling starts.

ポーリングがスタートすると、状態検出ブロック206はバスマスタ機能ブロック205にリード要求を行う。ここで、図7のフローチャートを参照しながら、バスマスタ機能ブロック205にリード要求を行う際の状態検出ブロック206の動作の一例を説明する。
まず、ステップS701において、リード要求制御機能ブロック206aは、ポーリング制御レジスタ211から出力された信号(En)221が「1」であるか否かを判断し、ポーリングをスタートする状態であるか否かを判断する。この判断の結果、ポーリングをスタートする状態でなければ、処理を終了する。一方、ポーリングをスタートする状態であれば、ステップS702に進む。
When polling starts, the state detection block 206 makes a read request to the bus master function block 205. Here, an example of the operation of the state detection block 206 when a read request is made to the bus master function block 205 will be described with reference to the flowchart of FIG.
First, in step S701, the read request control function block 206a determines whether or not the signal (En) 221 output from the polling control register 211 is “1” and whether or not polling is started. Judging. As a result of this determination, if the polling is not started, the process is terminated. On the other hand, if polling is started, the process proceeds to step S702.

ステップS702に進むと、リード要求制御機能ブロック206aは、ターゲットアドレスレジスタ212の設定値「0xA000_0000」をアドレス信号(addr)231とする。更にリード要求制御機能ブロック206aは、リードリクエスト信号(req)232をアサート(assert)する。すなわち、「1」を示すリードリクエスト信号(req)232をバスマスタ機能ブロック205に出力する(req=1)。   In step S702, the read request control function block 206a sets the set value “0xA000_0000” of the target address register 212 as the address signal (addr) 231. Further, the read request control function block 206a asserts a read request signal (req) 232. That is, a read request signal (req) 232 indicating “1” is output to the bus master function block 205 (req = 1).

次に、ステップS703において、リード要求制御機能ブロック206aは、アクセス終了信号(done)233がアサートされたか否かを判断する。すなわち、バスマスタ機能ブロック205から送信されたアクセス終了信号(done)233が「1」であるか否かを判断する。この判断の結果、アクセス終了信号(done)233がアサートされない場合(バスマスタ機能ブロック205から送信されたアクセス終了信号(done)233が「1」でない場合)には、処理を終了する。一方、アクセス終了信号(done)233がアサートされた場合(バスマスタ機能ブロック205から送信されたアクセス終了信号(done)233が「1」の場合)には、ステップS704に進む。   Next, in step S703, the read request control function block 206a determines whether or not the access end signal (done) 233 is asserted. That is, it is determined whether or not the access end signal (done) 233 transmitted from the bus master function block 205 is “1”. As a result of the determination, when the access end signal (done) 233 is not asserted (when the access end signal (done) 233 transmitted from the bus master function block 205 is not “1”), the processing is ended. On the other hand, when the access end signal (done) 233 is asserted (when the access end signal (done) 233 transmitted from the bus master function block 205 is “1”), the process proceeds to step S704.

ステップS704に進むと、リード要求制御機能ブロック206aは、リードリクエスト信号(req)232をネゲート(negate)する。すなわち、「0」を示すリードリクエスト信号(req)232をバスマスタ機能ブロック205に出力する(req=0)。
次に、ステップS705において、リード要求制御機能ブロック206aは、バスマスタ機能ブロック205から出力されたリードデータ(rdata)234と、レジスタ206bに設定されているリードデータとを比較する。そして、リード要求制御機能ブロック206aは、リードデータに変化があるか否かを判断する。この判断の結果、リードデータに変化がない場合には処理を終了する。一方、リードデータに変化がある場合には、ステップS706に進む。ステップS706に進むと、リード要求制御機能ブロック206aは、バス機能ブロック205から出力されたリードデータ(rdata)234の値を、レジスタ206bに設定する。
In step S704, the read request control function block 206a negates the read request signal (req) 232. That is, a read request signal (req) 232 indicating “0” is output to the bus master function block 205 (req = 0).
In step S705, the read request control function block 206a compares the read data (rdata) 234 output from the bus master function block 205 with the read data set in the register 206b. Then, the read request control function block 206a determines whether there is a change in the read data. If the result of this determination is that there is no change in the read data, the process is terminated. On the other hand, if there is a change in the read data, the process proceeds to step S706. In step S706, the read request control function block 206a sets the value of the read data (rdata) 234 output from the bus function block 205 in the register 206b.

図2に説明を戻し、外部通信モジュール203に内蔵されているFIFOにデータが溜まっていくと、レジスタ206bの値は、「0x0、0x1、・・・」と変化する。従って、条件判定ブロック207が入力する信号(data)241も、「0x0、0x1、・・・」と変化する。ここで、判定マスクレジスタ214から出力される信号(Cond_Mask)224は、「0xffff_fff0」である(Cond_Mask=0xffff_fff0)。従って、条件判定ブロック207が出力する条件判定フラグの信号(flag)242は、以下の(1)式が成り立つ間は「0」となる(flag=0)。また、条件判定フラグの信号(flag)242は、以下の(2)式が成り立つ間(すなわち、信号(data)241が「0xe」を示している間)は「1」となる(flag=1)。
data[3:0]≠Cond_Val[3:0] ・・・(1)
data[3:0]=Cond_Val[3:0] ・・・(2)
Returning to FIG. 2, when data accumulates in the FIFO built in the external communication module 203, the value of the register 206b changes to “0x0, 0x1,...”. Therefore, the signal (data) 241 input by the condition determination block 207 also changes to “0x0, 0x1,...”. Here, the signal (Cond_Mask) 224 output from the determination mask register 214 is “0xffff_fff0” (Cond_Mask = 0xffff_fff0). Therefore, the condition determination flag signal (flag) 242 output from the condition determination block 207 is “0” (flag = 0) while the following expression (1) is satisfied. The signal (flag) 242 of the condition determination flag is “1” while the following expression (2) is satisfied (that is, while the signal (data) 241 indicates “0xe”) (flag = 1 ).
data [3: 0] ≠ Cond_Val [3: 0] (1)
data [3: 0] = Cond_Val [3: 0] (2)

条件判定フラグの信号(flag)242が「1」になると(flag=1)、割り込み信号生成ブロック208の割り込み信号制御部601は正論理の割り込み信号(int)611を生成する(int=1)。ここで、図8のフローチャートを参照しながら、割り込み信号生成ブロック208の動作の一例を説明する。   When the condition determination flag signal (flag) 242 becomes “1” (flag = 1), the interrupt signal control unit 601 of the interrupt signal generation block 208 generates a positive logic interrupt signal (int) 611 (int = 1). . Here, an example of the operation of the interrupt signal generation block 208 will be described with reference to the flowchart of FIG.

まず、ステップS801において、割り込み信号制御部601は、条件判定フラグの信号(flag)242が立ち上がりエッジを有しているか否かを判断する。この判断の結果し、条件判定フラグの信号(flag)242が立ち上がりエッジを有していない場合には、ステップS802を省略して後述するステップS803に進む。一方、条件判定フラグの信号(flag)242が立ち上がりエッジを有している場合には、ステップS802に進む。   First, in step S801, the interrupt signal control unit 601 determines whether or not the condition determination flag signal (flag) 242 has a rising edge. As a result of this determination, if the condition determination flag signal (flag) 242 does not have a rising edge, the process skips step S802 and proceeds to step S803 described later. On the other hand, if the condition determination flag signal (flag) 242 has a rising edge, the process proceeds to step S802.

ステップS802に進むと、割り込み信号制御部601は、正論理の割り込み信号(int)をアサートする(int=1)。
次に、ステップS803において、割り込み信号制御部601は、クリアレジスタ216からの信号(Clear)226がアサートされているか否か(クリアレジスタ216からの信号(Clear)226が「1」であるか否か)を判断する。この判断の結果、クリアレジスタ216からの信号(Clear)226がアサートされていない場合(クリアレジスタ216からの信号(Clear)226が「1」でない場合)には、処理を終了する。一方、クリアレジスタ216からの信号(Clear)226がアサートされている場合(クリアレジスタ216からの信号(Clear)226が「1」である場合)には、ステップS804に進む。
In step S802, the interrupt signal control unit 601 asserts a positive logic interrupt signal (int) (int = 1).
In step S803, the interrupt signal control unit 601 determines whether the signal (Clear) 226 from the clear register 216 is asserted (whether the signal (Clear) 226 from the clear register 216 is “1”). Or). As a result of this determination, when the signal (Clear) 226 from the clear register 216 is not asserted (when the signal (Clear) 226 from the clear register 216 is not “1”), the processing ends. On the other hand, when the signal (Clear) 226 from the clear register 216 is asserted (when the signal (Clear) 226 from the clear register 216 is “1”), the process proceeds to step S804.

ステップS804に進むと、割り込み信号生成ブロック208は、正論理の割り込み信号(int)611と、クリアレジスタ216からの信号(Clear)226とをネゲートする(int=0、Clear=0)。   In step S804, the interrupt signal generation block 208 negates the positive logic interrupt signal (int) 611 and the signal (Clear) 226 from the clear register 216 (int = 0, Clear = 0).

図2に説明を戻し、クリアレジスタ216からの信号(Clear)226が「0」である場合には、割り込み信号制御部601は、正論理の割り込み信号(int)611を出力する(int=1)。ここでは、信号生成制御レジスタ215から出力された信号(Polarity)225が「0」に設定されている(Polarity=0x0)。従って、セレクタ602は、割り込み信号(interrupt)217として、正論理の割り込み信号(int)611を選択する。そして、セレクタ602は、「1」を示す割り込み信号(interrupt)217を、システムバス108を介してCPU201に出力する。   Returning to FIG. 2, when the signal (Clear) 226 from the clear register 216 is “0”, the interrupt signal control unit 601 outputs a positive logic interrupt signal (int) 611 (int = 1). ). Here, the signal (Polarity) 225 output from the signal generation control register 215 is set to “0” (Polarity = 0x0). Accordingly, the selector 602 selects the positive logic interrupt signal (int) 611 as the interrupt signal (interrupt) 217. Then, the selector 602 outputs an interrupt signal (interrupt) 217 indicating “1” to the CPU 201 via the system bus 108.

CPU201は、割り込み信号生成ブロック208から出力された割り込み信号(interrupt)217による割り込み通知を受けて、外部通信モジュール203に内蔵されているFIFOがフルになる一歩手前の状態で、所定の処理を行う。そして、CPU201は、割り込みをクリアする。割り込みのクリアは、割り込みクリアレジスタ216に「0x1」を設定することにより行われる。割り込みクリアレジスタ216に「0x1」が設定されると(Clear=0x1)、割り込み信号制御部601は、図8のフローチャートに従い、正論理の割り込み信号(int)611をネゲートする。これにより、「0」を示す割り込み信号(interrupt)217が出力され、割り込みがクリアされる。   The CPU 201 receives an interrupt notification from the interrupt signal (interrupt) 217 output from the interrupt signal generation block 208, and performs a predetermined process in a state just before the FIFO built in the external communication module 203 becomes full. . Then, the CPU 201 clears the interrupt. The interrupt is cleared by setting “0x1” in the interrupt clear register 216. When “0x1” is set in the interrupt clear register 216 (Clear = 0x1), the interrupt signal control unit 601 negates the positive logic interrupt signal (int) 611 according to the flowchart of FIG. As a result, an interrupt signal (interrupt) 217 indicating “0” is output and the interrupt is cleared.

以上のように本実施形態では、状態検出ブロック206が、外部通信モジュール203のFIFOにおけるデータ量を検出する。状態検出ブロック206の検出結果に基づいて、条件判定ブロック207が、割り込み信号217の生成条件を満たしているか否かを判定する。割り込み信号217の生成条件を満たしている場合に、割り込み信号生成ブロック208は、割り込み信号217を生成してCPU201に出力する。CPU201は、この割り込み信号217に基づいて、所定の処理を行う。   As described above, in the present embodiment, the state detection block 206 detects the data amount in the FIFO of the external communication module 203. Based on the detection result of the state detection block 206, the condition determination block 207 determines whether or not the generation condition of the interrupt signal 217 is satisfied. When the generation condition of the interrupt signal 217 is satisfied, the interrupt signal generation block 208 generates the interrupt signal 217 and outputs it to the CPU 201. The CPU 201 performs predetermined processing based on the interrupt signal 217.

従って、従来ではCPU201がポーリングを行って外部通信モジュール203の内部状態を検出しなければならない場合であっても、バスマスタ回路202がCPU201の代わりにポーリングを行い、CPU201に割り込み通知を行える。これにより、CPU201の負荷を削減できると共に、外部通信モジュール203の内部状態を検出する際の処理速度を向上させることができる。更に、プロセッサ(CPU)を複数設ける必要がないので、外部通信モジュール203の内部状態を検出するためのハードウェア(例えば複数のプロセッサの共有メモリ)によってシステムLSIの面積が増加することを防止できる。この他、状態検出ブロック206が状態の検出を行うハードウェアのアドレスと、条件判定ブロック207によって判定される条件とをプログラマブルに設定するようにしたので、様々なハードウェアの状態を様々な条件で判別することが可能となる。   Therefore, conventionally, even when the CPU 201 has to poll and detect the internal state of the external communication module 203, the bus master circuit 202 can perform polling instead of the CPU 201 and notify the CPU 201 of an interrupt. Thereby, the load on the CPU 201 can be reduced and the processing speed when detecting the internal state of the external communication module 203 can be improved. Furthermore, since it is not necessary to provide a plurality of processors (CPUs), it is possible to prevent the area of the system LSI from increasing due to hardware (for example, shared memory of a plurality of processors) for detecting the internal state of the external communication module 203. In addition, since the hardware address where the state detection block 206 detects the state and the condition determined by the condition determination block 207 are set programmably, various hardware states can be set under various conditions. It becomes possible to discriminate.

尚、本実施形態では、バスマスタ回路202がポーリングする対象のハードウェアを外部通信モジュール203としたが、バスマスタ回路202がポーリングする対象はこれに限定されない。すなわち、ハードウェア内部に内部状態を表示するレジスタを備えたハードウェアモジュールであれば、どのようなハードウェアであってもポーリングする対象とすることができる。
また、CPU201は、各レジスタ211〜216に対してプログラマブルに設定を行うので、各レジスタ211〜216への設定の順番は、前述したものに限定されない。
In this embodiment, the hardware to be polled by the bus master circuit 202 is the external communication module 203, but the object to be polled by the bus master circuit 202 is not limited to this. That is, any hardware module provided with a register for displaying an internal state inside the hardware can be polled.
In addition, since the CPU 201 performs setting for each of the registers 211 to 216 in a programmable manner, the order of setting for each of the registers 211 to 216 is not limited to that described above.

(第2の実施形態)
次に、本発明の第2の実施形態を説明する。本実施形態は、前述した第1の実施形態に、ポーリングするタイミングを調整する構成を追加したものである。従って、本実施形態の説明において、前述した第1の実施形態と同一の部分については、図1〜図8に付した符号と同一の符号を付す等して詳細な説明を省略する。尚、本実施形態でも、第1の実施形態と同様に、図1のハードウェア制御ブロック105を、システムバス108に接続されたCPU201に対する割り込み信号を生成する機能を有する割り込み信号生成ブロックで構成する場合を例に挙げて説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In this embodiment, a configuration for adjusting the polling timing is added to the first embodiment described above. Therefore, in the description of the present embodiment, the same parts as those in the first embodiment described above are denoted by the same reference numerals as those in FIGS. In this embodiment as well, as in the first embodiment, the hardware control block 105 of FIG. 1 is configured with an interrupt signal generation block having a function of generating an interrupt signal for the CPU 201 connected to the system bus 108. A case will be described as an example.

図9は、CPUに対する割り込み信号を生成するバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。
バスマスタ回路202は、バスマスタ機能ブロック205、状態検出ブロック2206、条件判定ブロック207、制御信号生成ブロックとして割り込み信号生成ブロック208、制御レジスタ群2209、及びバススレーブ機能ブロック210を内蔵する。
FIG. 9 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit that generates an interrupt signal for the CPU.
The bus master circuit 202 includes a bus master function block 205, a state detection block 2206, a condition determination block 207, an interrupt signal generation block 208 as a control signal generation block, a control register group 2209, and a bus slave function block 210.

状態検出ブロック2206は、第1の実施形態で説明したリード要求制御ブロック206a及びレジスタ(DataReg)206bと、ポーリング周期を計測するタイマー機能ブロック206cとを有する。
タイマー機能ブロック206cは、制御レジスタ群2209のポーリング周期設定レジスタ2217から、ポーリングを周期的に行うか否かを示す信号(Cyc_En)2227bを受け取る。また、タイマー機能ブロック206cは、ポーリングを周期的に行う場合には、その周期を示す信号(Cyc_Range)2227aを受け取る。尚、これらの信号(Cyc_Range、Cyc_En)2227の詳細については後述する。タイマー機能ブロック206cは、ポーリング周期設定レジスタ2217から出力された信号(Cyc_En)2227bが「0x1」を示すものである場合、リードリクエスト信号(req)232をアサートする間隔をタイマーで制御する。これにより、ポーリングの要求を周期的に行うことが可能になる。
The state detection block 2206 includes the read request control block 206a and the register (DataReg) 206b described in the first embodiment, and a timer function block 206c that measures a polling period.
The timer function block 206c receives a signal (Cyc_En) 2227b indicating whether or not to perform polling periodically from the polling cycle setting register 2217 of the control register group 2209. When the polling is performed periodically, the timer function block 206c receives a signal (Cyc_Range) 2227a indicating the period. The details of these signals (Cyc_Range, Cyc_En) 2227 will be described later. When the signal (Cyc_En) 2227b output from the polling cycle setting register 2217 indicates “0x1”, the timer function block 206c controls the interval at which the read request signal (req) 232 is asserted with a timer. This makes it possible to make a polling request periodically.

制御レジスタ群2209は、状態検出ブロック2206、条件判定ブロック207、及び割り込み信号生成ブロック208の動作を制御する信号のソースレジスタを有するブロックである。CPU201が各レジスタ211〜216、2217の設定をプログラマブルに行う。   The control register group 2209 is a block having source registers for signals that control the operations of the state detection block 2206, the condition determination block 207, and the interrupt signal generation block 208. The CPU 201 performs setting of the registers 211 to 216 and 2217 in a programmable manner.

前述したように、ポーリング周期設定レジスタ2217は、ポーリングの周期設定を行うためのものであり、信号(Cyc_Range)2227a及び信号(Cyc_En)2227bを状態検出ブロック2206に出力する。図10は、ポーリング周期設定レジスタ2217の仕様の一例を示す図である。ポーリング周期設定レジスタ2217の0ビット目Cyc_Enが「1」に設定されると、周期的にポーリングを行う周期ポーリング動作モードとなる。また、ポーリング周期設定レジスタ2217の0ビット目Cyc_Enが「0」に設定されると、周期的でない通常のポーリングを行う通常ポーリング動作モードとなる。ポーリング周期設定レジスタ2217の0ビット目Cyc_Enを「1」に設定して周期ポーリング動作モードとする場合、ポーリング周期設定レジスタ2217の4〜31ビット目Cyc_Rangeにポーリングを行う周期が設定される。具体的にポーリング周期設定レジスタ2217の4〜31ビット目Cyc_Rangeにはポーリングする間隔として空けたい分のサイクル数が設定される。   As described above, the polling cycle setting register 2217 is for setting the polling cycle, and outputs the signal (Cyc_Range) 2227a and the signal (Cyc_En) 2227b to the state detection block 2206. FIG. 10 is a diagram illustrating an example of the specification of the polling cycle setting register 2217. When the 0th bit Cyc_En of the polling cycle setting register 2217 is set to “1”, a cycle polling operation mode in which polling is performed periodically is set. Further, when the 0th bit Cyc_En of the polling cycle setting register 2217 is set to “0”, a normal polling operation mode in which normal non-periodic polling is performed is set. When the 0th bit Cyc_En of the polling cycle setting register 2217 is set to “1” to set the cycle polling operation mode, the 4th to 31st bit Cyc_Range of the polling cycle setting register 2217 is set to the polling cycle. Specifically, in the 4th to 31st bits Cyc_Range of the polling cycle setting register 2217, the number of cycles to be set as the polling interval is set.

次に、図9に示すシステムLSIの動作の一例について説明する。尚、本実施形態においても、外部通信モジュール203は、16段のFIFO(First-In First-Out)を内蔵するものとする。また、FIFOに存在するデータ数を示すデータポインタレジスタ204が、アドレス「0xA000_0000」にマッピングされているとする。また、バスマスタ回路2202が、外部通信モジュール203のFIFOがフルになる一歩手前の状態(すなわち、データポインタレジスタ204の値が「0xe」となったこと)を検出して割り込み信号217を生成するものとする。更に、状態検出ブロック2206が行うポーリングは3サイクル間隔で行われるものとする。   Next, an example of the operation of the system LSI shown in FIG. 9 will be described. Also in this embodiment, the external communication module 203 includes a 16-stage FIFO (First-In First-Out). Further, it is assumed that the data pointer register 204 indicating the number of data existing in the FIFO is mapped to the address “0xA000_0000”. Also, the bus master circuit 2202 detects the state one step before the FIFO of the external communication module 203 becomes full (that is, the value of the data pointer register 204 becomes “0xe”) and generates an interrupt signal 217 And Further, it is assumed that polling performed by the state detection block 2206 is performed at intervals of three cycles.

まず、CPU201は、ポーリングするFIFOデータポインタレジスタ204のアドレス「0xA000_0000」をターゲットアドレスレジスタ212に設定する。
次に、CPU201は、条件判定ブロック207における比較条件となるデータとして「0xe」を判定データレジスタ213に設定する。
First, the CPU 201 sets the address “0xA000_0000” of the FIFO data pointer register 204 to be polled in the target address register 212.
Next, the CPU 201 sets “0xe” in the determination data register 213 as data that serves as a comparison condition in the condition determination block 207.

またここでは、条件判定ブロック207で比較を行うデータは4ビットであるので、それ以外のビットの比較を行う必要はない。従って、その比較を行わないビットをマスクするために、CPU201は、「0xffff_fff0」を判定マスクレジスタ214に設定する。
次に、CPU201は、信号生成制御レジスタ215に「0x0」を設定する。
Here, since the data to be compared in the condition determination block 207 is 4 bits, it is not necessary to compare other bits. Therefore, the CPU 201 sets “0xffff_fff0” in the determination mask register 214 in order to mask the bits that are not compared.
Next, the CPU 201 sets “0x0” in the signal generation control register 215.

更にここでは、3サイクル周期でポーリングを行うので、CPU201は、ポーリング周期設定レジスタ2217に「0x31」を設定する。これにより、ポーリング周期設定レジスタ2217から出力される信号(Cyc_Range)2227aは、「0x3」を示す信号となる(Cyc_Range=0x3)。また、信号(Cyc_En)2227bは、「0x1」を示す信号となる(Cyc_En=0x1)。
そして、CPU201は、ポーリング制御レジスタ211に「0x1」を設定して、ポーリングをスタートさせる。
Further, here, since polling is performed in a cycle of 3 cycles, the CPU 201 sets “0x31” in the polling cycle setting register 2217. As a result, the signal (Cyc_Range) 2227a output from the polling cycle setting register 2217 becomes a signal indicating “0x3” (Cyc_Range = 0x3). The signal (Cyc_En) 2227b is a signal indicating “0x1” (Cyc_En = 0x1).
Then, the CPU 201 sets “0x1” in the polling control register 211 to start polling.

ポーリングがスタートすると、状態検出ブロック206はバスマスタ機能ブロック205にリード要求を行う。ここで、図11のフローチャートを参照しながら、バスマスタ機能ブロック205にリード要求を行う際の状態検出ブロック2206の動作の一例を説明する。   When polling starts, the state detection block 206 makes a read request to the bus master function block 205. Here, an example of the operation of the state detection block 2206 when making a read request to the bus master function block 205 will be described with reference to the flowchart of FIG.

まず、ステップS1101〜S1106は、図7に示したステップS701〜706と同じである。すなわち、状態検出ブロック206は、ポーリングをスタートする状態であるか否かを判断する(ステップS1101)。そして、ポーリングをスタートする状態であれば、リード要求制御機能ブロック206aは、ターゲットアドレスレジスタ212の設定値「0xA000_0000」をアドレス信号(addr)231とする。更に、リード要求制御機能ブロック206aは、リードリクエスト信号(req)232をアサート(assert)する(ステップS1102)。   First, steps S1101 to S1106 are the same as steps S701 to 706 shown in FIG. That is, the state detection block 206 determines whether or not it is in a state of starting polling (step S1101). When the polling is started, the read request control function block 206a sets the set value “0xA000_0000” of the target address register 212 as the address signal (addr) 231. Further, the read request control function block 206a asserts the read request signal (req) 232 (step S1102).

次に、リード要求制御機能ブロック206aは、アクセス終了信号(done)233がアサートされたか否かを判断する(ステップS1103)。そして、アクセス終了信号(done)233がアサートされた場合、リード要求制御機能ブロック206aは、リードリクエスト信号(req)232をネゲート(negate)する(ステップS1104)。   Next, the read request control function block 206a determines whether or not the access end signal (done) 233 has been asserted (step S1103). When the access end signal (done) 233 is asserted, the read request control function block 206a negates the read request signal (req) 232 (step S1104).

次に、リード要求制御機能ブロック206aは、リードデータに変化があるか否かを判断する(ステップS1105)。この判断の結果、リードデータに変化がない場合にはステップS1106を省略して後述するステップS1107に進む。一方、リードデータに変化がある場合には、リード要求制御機能ブロック206aは、バス機能ブロック205から出力されたリードデータ(rdata)234の値を、レジスタ206bに設定する。   Next, the read request control function block 206a determines whether or not there is a change in the read data (step S1105). If the result of this determination is that there is no change in the read data, step S1106 is omitted and processing proceeds to step S1107 described later. On the other hand, when there is a change in the read data, the read request control function block 206a sets the value of the read data (rdata) 234 output from the bus function block 205 in the register 206b.

そして、ステップS1107に進むと、リード要求制御機能ブロック206aは、ポーリング周期設定レジスタ2217から出力された信号(Cyc_En)2227bの値を参照する。そして、リード要求制御機能ブロック206aは、動作モードが、周期ポーリング動作モード及び通常ポーリング動作モードの何れであるのかを判断する。この判断の結果、動作モードが通常ポーリング動作モードである場合には、処理を終了する。一方、動作モードが周期ポーリング動作モードである場合には、ステップS1108に進む。   In step S1107, the read request control function block 206a refers to the value of the signal (Cyc_En) 2227b output from the polling cycle setting register 2217. Then, the read request control function block 206a determines whether the operation mode is the periodic polling operation mode or the normal polling operation mode. As a result of this determination, when the operation mode is the normal polling operation mode, the process is terminated. On the other hand, when the operation mode is the periodic polling operation mode, the process proceeds to step S1108.

ステップS1108に進むと、リード要求制御機能ブロック206aは、タイマー機能ブロック206cから信号(expired)2243がアサートされるまで待機する。すなわち、リード要求制御機能ブロック206aは、タイマー機能ブロック206cから、「1」を示す信号(expired)2243が出力されるまで待機する(expired=1)。
ここで、図12にタイミングチャートを参照しながら、次のポーリングの要求を3サイクル待たせる際の状態検出ブロック2206の動作の一例を説明する。
バスマスタ機能ブロック205からのアクセス終了信号(done)233を状態検出ブロック2206が受け取ると、次の処理を行う。すなわち、タイマー機能ブロック206cは、ポーリング周期設定レジスタ2217に設定されたサイクル数だけ、タイマーの値(timer)2244のデクリメントを開始する。
In step S1108, the read request control function block 206a waits until a signal (expired) 2243 is asserted from the timer function block 206c. That is, the read request control function block 206a waits until a signal (expired) 2243 indicating “1” is output from the timer function block 206c (expired = 1).
Here, an example of the operation of the state detection block 2206 when waiting for the next polling request for 3 cycles will be described with reference to the timing chart of FIG.
When the status detection block 2206 receives the access end signal (done) 233 from the bus master function block 205, the following processing is performed. That is, the timer function block 206 c starts decrementing the timer value (timer) 2244 by the number of cycles set in the polling period setting register 2217.

その後、タイマーの値(timer)2244が「0」になると、タイマー機能ブロック206cは、信号(expired)2243を1サイクルだけアサートする。信号(expired)2243がアサートされると、状態検出ブロック2206は、次のリードリクエスト信号(req)232をアサートする。これによりポーリングを行うことが可能となる。
尚、ポーリング周期設定レジスタ2217から出力された信号(Cyc_En)2227bが「0x0」の場合(Cyc_En=0x0)、状態検出ブロック2206は、このような周期的なポーリングを行わない。すなわち、状態検出ブロック2206は、アクセス終了信号(done)233がアサートされたらすぐに連続して次のポーリングの要求を発行する。
After that, when the timer value (timer) 2244 becomes “0”, the timer function block 206c asserts the signal (expired) 2243 for one cycle. When the signal (expired) 2243 is asserted, the state detection block 2206 asserts the next read request signal (req) 232. This makes it possible to perform polling.
If the signal (Cyc_En) 2227b output from the polling cycle setting register 2217 is “0x0” (Cyc_En = 0x0), the state detection block 2206 does not perform such periodic polling. That is, the state detection block 2206 issues the next polling request continuously as soon as the access end signal (done) 233 is asserted.

図9に説明を戻し、外部通信モジュール203に内蔵されているFIFOにデータが溜まっていくと、レジスタ206bの値は、「0x0、0x1、・・・」と変化する。従って、条件判定ブロック207が入力する信号(data)241も、「0x0、0x1、・・・」と変化する。ここで、判定マスクレジスタ214から出力される信号(Cond_Mask)224は、「0xffff_fff0」である(Cond_Mask=0xffff_fff0)。従って、条件判定ブロック207が出力する条件判定フラグの信号(flag)242は、前記(1)式が成り立つ間は「0」となる(flag=0)。また、条件判定フラグの信号(flag)242は、前記(2)式が成り立つ間(すなわち、信号(data)241が「0xe」を示している間)は「1」となる(flag=1)。   Returning to FIG. 9, when data accumulates in the FIFO built in the external communication module 203, the value of the register 206b changes to “0x0, 0x1,...”. Therefore, the signal (data) 241 input by the condition determination block 207 also changes to “0x0, 0x1,...”. Here, the signal (Cond_Mask) 224 output from the determination mask register 214 is “0xffff_fff0” (Cond_Mask = 0xffff_fff0). Therefore, the signal (flag) 242 of the condition determination flag output from the condition determination block 207 is “0” (flag = 0) while the expression (1) is satisfied. The signal (flag) 242 of the condition determination flag is “1” while the above expression (2) is satisfied (that is, while the signal (data) 241 indicates “0xe”) (flag = 1). .

条件判定フラグの信号(flag)242が「1」になると(flag=1)、割り込み信号生成ブロック208の割り込み信号制御部601は正論理の割り込み信号(int)611を生成する(int=1)。尚、割り込み信号生成ブロック208の詳細な動作は、第1の実施形態で説明した通りである(図8を参照)。   When the condition determination flag signal (flag) 242 becomes “1” (flag = 1), the interrupt signal control unit 601 of the interrupt signal generation block 208 generates a positive logic interrupt signal (int) 611 (int = 1). . The detailed operation of the interrupt signal generation block 208 is as described in the first embodiment (see FIG. 8).

そして、クリアレジスタ216からの信号(Clear)226が「0」である場合、割り込み信号制御部601は、正論理の割り込み信号(int)611を出力する(int=1)。ここでは、信号生成制御レジスタ215から信号(Polarity)225が「0」に設定されている(Polarity=0x0)。従って、セレクタ602は、割り込み信号(interrupt)217として、正論理の割り込み信号(int)611を選択する。そして、セレクタ602は、「1」を示す割り込み信号(interrupt)217を、システムバス108を介してCPU201に出力する。   When the signal (Clear) 226 from the clear register 216 is “0”, the interrupt signal control unit 601 outputs a positive logic interrupt signal (int) 611 (int = 1). Here, the signal (Polarity) 225 is set to “0” from the signal generation control register 215 (Polarity = 0x0). Accordingly, the selector 602 selects the positive logic interrupt signal (int) 611 as the interrupt signal (interrupt) 217. Then, the selector 602 outputs an interrupt signal (interrupt) 217 indicating “1” to the CPU 201 via the system bus 108.

CPU201は、割り込み信号生成ブロック208から出力された割り込み信号(interrupt)217による割り込み通知を受けて、外部通信モジュール203に内蔵されているFIFOがフルになる一歩手前の状態で、所定の処理を行う。そして、CPU201は、割り込みをクリアする。割り込みのクリアは、割り込みクリアレジスタ216に「0x1」を設定することにより行われる。割り込みクリアレジスタ216に「0x1」が設定されると(Clear=0x1)、割り込み信号制御部601は、図8のフローチャートに従い、正論理の割り込み信号(int)611をネゲートする。これにより、「0」を示す割り込み信号(interrupt)217が出力され、割り込みがクリアされる。   The CPU 201 receives an interrupt notification from the interrupt signal (interrupt) 217 output from the interrupt signal generation block 208, and performs a predetermined process in a state just before the FIFO built in the external communication module 203 becomes full. . Then, the CPU 201 clears the interrupt. The interrupt is cleared by setting “0x1” in the interrupt clear register 216. When “0x1” is set in the interrupt clear register 216 (Clear = 0x1), the interrupt signal control unit 601 negates the positive logic interrupt signal (int) 611 according to the flowchart of FIG. As a result, an interrupt signal (interrupt) 217 indicating “0” is output and the interrupt is cleared.

以上のように本実施形態では、タイマー機能ブロック206cを用いて、ポーリング周期設定レジスタ2217に設定されている周期でポーリングの要求を行うようにした。従って、第1の実施形態で説明した効果に加え、システムバス108にかかる負荷をより軽減できるという効果を有する。
また、ポーリングの要求を行う周期をプログラマブルに設定するようにしたので、システムに応じてポーリング要求頻度を調整することができる。
尚、本実施形態では、周期的にポーリングの要求を行うようにしたが、ポーリングの要求が時間的に間隔を有して行われれば、必ずしも周期的にポーリングの要求を行う必要はない(すなわち、ポーリングの要求を行う間隔は一定でなくてもよい)。
As described above, in the present embodiment, the timer function block 206c is used to make a polling request at the period set in the polling period setting register 2217. Therefore, in addition to the effect described in the first embodiment, the load on the system bus 108 can be further reduced.
In addition, since the period for performing the polling request is set programmably, the polling request frequency can be adjusted according to the system.
In this embodiment, the polling request is periodically made. However, if the polling request is made at intervals, it is not always necessary to make the polling request periodically (that is, The interval at which polling requests are made may not be constant).

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。前述した第1及び第2の実施形態では、外部通信モジュール203の内部状態に応じて、バスマスタ回路202がCPU201に割り込み信号を通知するようにした。これに対し、本実施形態では、バスマスタ回路が、ポーリングを行ったハードウェアの内部状態に応じて、ポーリングを行っていない他のハードウェアへアクセスするようにしている。このように、本実施形態と前述した第1及び第2の実施形態とは、バスマスタ回路の構成の一部、バスマスタ回路がポーリングするハードウェア、及びポーリングを行った後にバスマスタ回路がアクセスするハードウェアとが異なる。従って、本実施形態の説明において、前述した第1及び第2の実施形態と同一の部分については、図1〜図12に付した符号と同一の符号を付す等して詳細な説明を省略する。尚、本実施形態では、図1に示したハードウェア制御ブロック105を、クロック制御モジュールのレジスタの設定を行うバス転送制御ブロックで構成する場合を例に挙げて説明する。
(Third embodiment)
Next, a third embodiment of the present invention will be described. In the first and second embodiments described above, the bus master circuit 202 notifies the CPU 201 of an interrupt signal according to the internal state of the external communication module 203. On the other hand, in the present embodiment, the bus master circuit accesses other hardware that has not been polled according to the internal state of the hardware that has been polled. As described above, this embodiment and the first and second embodiments described above are a part of the configuration of the bus master circuit, hardware that the bus master circuit polls, and hardware that the bus master circuit accesses after polling. Is different. Therefore, in the description of the present embodiment, the same parts as those in the first and second embodiments described above are denoted by the same reference numerals as those in FIGS. . In the present embodiment, the case where the hardware control block 105 shown in FIG. 1 is configured by a bus transfer control block for setting a register of the clock control module will be described as an example.

図13は、クロック制御モジュールのレジスタの設定を行うバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。
図13において、システムLSIは、CPU201、バスマスタ回路3202、ポート制御モジュール1203、及びクロック制御モジュール1205を備えて構成される。
バスマスタ回路3202は、バスマスタ機能ブロック3205、状態検出ブロック206、条件判定ブロック207、バス転送制御ブロック1208、制御レジスタ群3209、及びバススレーブ機能ブロック210を内蔵する。本実施形態では、バス転送制御ブロック1208が、クロック制御モジュール1205のレジスタの設定を行う。
FIG. 13 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit for setting a register of the clock control module.
In FIG. 13, the system LSI includes a CPU 201, a bus master circuit 3202, a port control module 1203, and a clock control module 1205.
The bus master circuit 3202 includes a bus master function block 3205, a state detection block 206, a condition determination block 207, a bus transfer control block 1208, a control register group 3209, and a bus slave function block 210. In the present embodiment, the bus transfer control block 1208 sets the registers of the clock control module 1205.

バスマスタ機能ブロック3205は、システムバス108のバスプロトコルに従って、バスマスタとしてシステムバス108とアクセス(バスアクセス)するためのマスタインターフェースのブロックである。   The bus master function block 3205 is a master interface block for accessing (bus access) the system bus 108 as a bus master according to the bus protocol of the system bus 108.

状態検出ブロック206は、前述したように、システムバスに接続されたハードウェアの内部状態を検出する。本実施形態では、状態検出ブロック206は、ポートステータスレジスタ1205の内部状態を検出する。
条件判定ブロック207は、前述したように、状態検出ブロック206の検出結果に基づいて、条件を満たしているか否かを判定する。本実施形態では、条件判定ブロック207は、クロックコントロールレジスタ1206へ書き込みを行うための条件を満たしているか否かを判定する。
As described above, the state detection block 206 detects the internal state of the hardware connected to the system bus. In the present embodiment, the state detection block 206 detects the internal state of the port status register 1205.
As described above, the condition determination block 207 determines whether the condition is satisfied based on the detection result of the state detection block 206. In this embodiment, the condition determination block 207 determines whether or not a condition for writing to the clock control register 1206 is satisfied.

バス転送制御ブロック1208は、条件判定ブロック207から、条件判定フラグの信号(flag)242の立ち上がりエッジを受け取り、バスマスタ機能ブロック3205に、クロックコントロールレジスタ1206への書き込み要求を行う。以下の説明では、クロックコントロールレジスタ1206への書き込み要求を必要に応じてライト転送の要求と称する。   The bus transfer control block 1208 receives the rising edge of the condition determination flag signal (flag) 242 from the condition determination block 207, and issues a write request to the clock control register 1206 to the bus master function block 3205. In the following description, a write request to the clock control register 1206 is referred to as a write transfer request as necessary.

バス転送制御ブロック1208は、バスマスタ機能ブロック3205とのインターフェースを有する。バス転送制御ブロック1208は、ライトリクエスト信号(req)3232とアクセス終了信号(done)3233のハンドシェークで、アドレス信号(addr)3231とライトデータ(wdata)3234をバスマスタ機能ブロック3235に渡す。また、バス転送制御ブロック1208は、制御レジスタ群209から、信号(Trf_Addr、Trf_Val)3216、3217を受け取る。この信号(Trf_Addr、Trf_Val)3216、3217の詳細については後述する。更に、バス転送制御ブロック1208は、状態検出ブロック206によるポーリング動作を停止させる場合に、ポーリング制御レジスタ211へ信号(Clear)3226を出力する。   The bus transfer control block 1208 has an interface with the bus master function block 3205. The bus transfer control block 1208 passes the address signal (addr) 3231 and the write data (wdata) 3234 to the bus master function block 3235 by handshaking the write request signal (req) 3232 and the access end signal (done) 3233. The bus transfer control block 1208 receives signals (Trf_Addr, Trf_Val) 3216 and 3217 from the control register group 209. Details of these signals (Trf_Addr, Trf_Val) 3216, 3217 will be described later. Further, the bus transfer control block 1208 outputs a signal (Clear) 3226 to the polling control register 211 when the polling operation by the state detection block 206 is stopped.

制御レジスタ群3209は、状態検出ブロック206、条件判定ブロック207、及びバス転送制御ブロック1208の動作を制御する信号のソースレジスタを有するブロックである。CPU201が各レジスタ212〜214、1216〜1218の設定をプログラマブルに行う。   The control register group 3209 is a block having a source register of signals for controlling operations of the state detection block 206, the condition determination block 207, and the bus transfer control block 1208. The CPU 201 performs setting of the registers 212 to 214 and 1216 to 1218 in a programmable manner.

ポーリング制御レジスタ1218は、ポーリングのスタート及びストップを制御するためのものであり、ポーリングのスタート、ストップを示す信号(En)221を状態検出ブロック206に出力する。ポーリング制御レジスタ1218の仕様は、図5(a)に示したポーリング制御レジスタ211と同じである。ただし、ポーリング制御レジスタ1218は、バス転送制御ブロック1208から信号(Clear)3226を受け取った場合にも、ポーリングをストップさせる。すなわち、ポーリング制御レジスタ1218は、「0x0」を示す信号(En)221を状態検出ブロック206に出力する。   The polling control register 1218 is for controlling the start and stop of polling, and outputs a signal (En) 221 indicating the start and stop of polling to the state detection block 206. The specification of the polling control register 1218 is the same as that of the polling control register 211 shown in FIG. However, the polling control register 1218 also stops polling when it receives a signal (Clear) 3226 from the bus transfer control block 1208. That is, the polling control register 1218 outputs a signal (En) 221 indicating “0x0” to the state detection block 206.

ターゲットアドレスレジスタ212は、前述したように、ポーリングするターゲットとなるレジスタのアドレスを設定するためのものであり、その仕様は、図5(b)に示した通りである。本実施形態では、ターゲットアドレスレジスタ212は、図13に示すポートステータスレジスタ1204のアドレスを設定する。
判定データレジスタ213は、前述したように、条件判定ブロック207における比較条件となるデータを設定するためのものであり、その仕様は、図5(c)に示した通りである。
判定データマスクレジスタ214は、前述したように、条件判定をマスクするビットをビット毎に設定するためのものであり、その仕様は、図5(d)に示した通りである。
As described above, the target address register 212 is for setting the address of a register to be polled, and its specification is as shown in FIG. In the present embodiment, the target address register 212 sets the address of the port status register 1204 shown in FIG.
As described above, the determination data register 213 is used to set data as a comparison condition in the condition determination block 207, and its specification is as shown in FIG.
As described above, the determination data mask register 214 is for setting bits for masking condition determination for each bit, and the specification is as shown in FIG.

転送アドレスレジスタ1216は、ポーリングを行うモジュールとは異なるモジュールのレジスタであって、データの書き換え対象となるレジスタのアドレスを設定するものである。この転送アドレスレジスタ1216は、そのアドレスを示す信号(Trf_Addr)3216をバス転送制御ブロック1208に出力する。図14(a)に、転送アドレスレジスタ1216の仕様の一例を示す。図14(a)に示すように、本実施形態では、信号(Trf_Addr)3216を32ビットの構成としている。また、信号(Trf_Addr)3216のビット幅を、使用するシステムバス108のアドレス幅と同じにしている。   The transfer address register 1216 is a register of a module different from the module that performs polling, and sets the address of a register to be rewritten. The transfer address register 1216 outputs a signal (Trf_Addr) 3216 indicating the address to the bus transfer control block 1208. FIG. 14A shows an example of the specification of the transfer address register 1216. As shown in FIG. 14A, in this embodiment, the signal (Trf_Addr) 3216 has a 32-bit configuration. Further, the bit width of the signal (Trf_Addr) 3216 is made the same as the address width of the system bus 108 to be used.

転送データレジスタ1217は、データの書き換え対象のレジスタに書き込むデータを設定するものである。この転送データレジスタ1217は、そのデータを示す信号(Trf_Val)3217をバス転送制御ブロック1208に出力する。図14(b)に、転送データレジスタ1217の仕様の一例をに示す。図14(b)に示すように、本実施形態では、信号(Trf_Val)3217を32ビットの構成としている。また、信号(Trf_Val)3217のビット幅を、使用するシステムバス108のデータ幅と同じにしている。
バススレーブ機能ブロック210は、前述したように、CPU201が制御レジスタ群209にアクセスするためのインターフェースである。
The transfer data register 1217 sets data to be written in a register to be rewritten. The transfer data register 1217 outputs a signal (Trf_Val) 3217 indicating the data to the bus transfer control block 1208. FIG. 14B shows an example of the specification of the transfer data register 1217. As shown in FIG. 14B, in this embodiment, the signal (Trf_Val) 3217 has a 32-bit configuration. Further, the bit width of the signal (Trf_Val) 3217 is made the same as the data width of the system bus 108 to be used.
As described above, the bus slave function block 210 is an interface for the CPU 201 to access the control register group 209.

ポート制御モジュール1203は、システムLSIの外部端子において汎用ポートとして割り当てられているポートの制御を行う。このポート制御モジュール1203は、外部端子の状態を示すポートステータスレジスタ1204を持つ。本実施形態では、ポートステータスレジスタ1204が、アドレス「0xA010_0000」にマッピングされているとする。図15(a)は、ポートステータスレジスタ1204の仕様の一例を示す図である。図15(a)に示すように、0ビット目〜7ビット目P0_Sts〜P7_Stsのそれぞれにおいて、外部端子P0〜P7の状態をポートステータスレジスタ1204から読み出すことができる。尚、ポートステータスレジスタ1204の設定は、例えばCPU201によってプログラマブルに行われる。   The port control module 1203 controls a port assigned as a general-purpose port at an external terminal of the system LSI. The port control module 1203 has a port status register 1204 indicating the state of the external terminal. In the present embodiment, it is assumed that the port status register 1204 is mapped to the address “0xA010_0000”. FIG. 15A is a diagram illustrating an example of the specification of the port status register 1204. As shown in FIG. 15A, the states of the external terminals P0 to P7 can be read from the port status register 1204 in each of the 0th to 7th bits P0_Sts to P7_Sts. Note that the setting of the port status register 1204 is programmable by the CPU 201, for example.

クロック制御モジュール1205は、システムLSIの各モジュールに供給されるクロックの制御を行う。このクロック制御モジュール1205は、各モジュールのクロックの設定を行うクロックコントロールレジスタ1206を持つ。本実施形態では、クロックコントロールレジスタ1206が、アドレス「0xA020_0000」にマッピングされているとする。   The clock control module 1205 controls the clock supplied to each module of the system LSI. The clock control module 1205 has a clock control register 1206 for setting the clock of each module. In this embodiment, it is assumed that the clock control register 1206 is mapped to the address “0xA020_0000”.

図15(b)は、クロックコントロールレジスタ1206の仕様の一例を示す図である。図15(b)に示すように、0ビット目CPU_clkに「1」が設定されると、CPU201にクロックが供給される。一方、0ビット目CPU_clkに「0」が設定されると、CPU201にクロックが供給されなくなる。尚、システムの起動時には、0ビット目CPU_clkに「1」が設定され、CPU201にクロックが供給された状態になる。
また、1〜2ビット目CPU_clk_frqに「0」が設定されると、CPU201のクロックの周波数は1MHzとなる。同様に、1〜2ビット目CPU_clk_frqに「1」が設定されると8MHz、「2」が設定されると64MHz、「3」が設定されると128MHzとなる。
FIG. 15B is a diagram illustrating an example of the specification of the clock control register 1206. As shown in FIG. 15B, when “1” is set in the 0th bit CPU_clk, a clock is supplied to the CPU 201. On the other hand, when “0” is set in the 0th bit CPU_clk, the clock is not supplied to the CPU 201. When the system is activated, “0” is set in the CPU_clk of the 0th bit, and a clock is supplied to the CPU 201.
When “0” is set in the CPU_clk_frq for the first and second bits, the clock frequency of the CPU 201 is 1 MHz. Similarly, when “1” is set in the CPU_clk_frq of the first and second bits, 8 MHz is set, 64 MHz is set when “2” is set, and 128 MHz is set when “3” is set.

次に、図14に示すシステムLSIの動作の一例について説明する。ここでは、CPU201のクロックを停止させて、低消費電力状態へシステムを移行させた後、外部端子の状態をポーリングして通常動作状態へ復帰させる場合を例に挙げて説明する。尚、通常動作状態への復帰は、外部端子P6、P7に対する設定が共に「1」になったときに行うとする。   Next, an example of the operation of the system LSI shown in FIG. 14 will be described. Here, the case where the clock of the CPU 201 is stopped and the system is shifted to the low power consumption state, and then the state of the external terminal is polled to return to the normal operation state will be described as an example. Note that the return to the normal operation state is performed when both the settings for the external terminals P6 and P7 are "1".

まず、CPU201は、バスマスタ回路202の制御レジスタ群209に対する設定を行う。具体的にCPU201は、ポーリングする対象であるポートステータスレジスタ1204のアドレス「0xA010_0000」をターゲットアドレスレジスタ212に設定する。これにより、ターゲットアドレスレジスタ212から出力される信号(Sts_Addr)222は、「0xA010_0000」を示す信号となる(Sts_Addr=0xA000_0000)。
次に、CPU201は、条件判定ブロック207における比較条件となるデータとして「0xc0」を判定データレジスタ213に設定する。これにより、判定データレジスタから出力される信号(Cond_Val)223は、「0xc0」を示す信号となる(Cond_Val=0xc0)。
First, the CPU 201 performs setting for the control register group 209 of the bus master circuit 202. Specifically, the CPU 201 sets the address “0xA010_0000” of the port status register 1204 to be polled in the target address register 212. As a result, the signal (Sts_Addr) 222 output from the target address register 212 becomes a signal indicating “0xA010_0000” (Sts_Addr = 0xA000_0000).
Next, the CPU 201 sets “0xc0” in the determination data register 213 as data that serves as a comparison condition in the condition determination block 207. As a result, the signal (Cond_Val) 223 output from the determination data register is a signal indicating “0xc0” (Cond_Val = 0xc0).

また、条件判定ブロック207で比較を行うデータは、6ビット目と7ビット目の2ビットであるので、それ以外のビットの比較を行う必要はない。従って、その比較を行わないビットをマスクするために、CPU201は、「0xffff_ff3f」を判定マスクレジスタ214に設定する。これにより、判定マスクレジスタ214から出力される信号(Cond_Mask)224は、「0xffff_ff3f」を示す信号となる(Cond_Mask=0xffff_ff3f)。   Further, since the data to be compared in the condition determination block 207 is 2 bits of the 6th bit and the 7th bit, it is not necessary to compare other bits. Therefore, the CPU 201 sets “0xffff_ff3f” in the determination mask register 214 in order to mask the bits that are not compared. As a result, the signal (Cond_Mask) 224 output from the determination mask register 214 becomes a signal indicating “0xffff_ff3f” (Cond_Mask = 0xffff_ff3f).

そして、CPU201は、データの書き換え対象となるクロックコントロールレジスタ1206のアドレス「0xA020_0000」を転送アドレスレジスタ1216に設定する。これにより、クロックコントロールレジスタ1206から出力される信号(Trf_Addr)3216は、「0xA020_0000」を示す信号となる(Trf_Addr=0xA020_0000)。
次に、CPU201は、CPU201へクロックを供給し、クロック周波数を1MHzにするデータ「0x1」を転送データレジスタ1217に設定する。これにより、転送データレジスタ1217から出力される信号(Trf_Val)3217は、「0x1」となる(Trf_Val=0x1)。
そして、CPU201は、ポーリング制御レジスタ211に「0x1」を設定する。これにより、ポーリング制御レジスタ211から出力される信号221は、「0x1」となり(En=0x1)、ポーリングがスタートする。
Then, the CPU 201 sets the address “0xA020_0000” of the clock control register 1206 to be rewritten data in the transfer address register 1216. Thus, the signal (Trf_Addr) 3216 output from the clock control register 1206 becomes a signal indicating “0xA020_0000” (Trf_Addr = 0xA020_0000).
Next, the CPU 201 supplies a clock to the CPU 201 and sets data “0x1” for setting the clock frequency to 1 MHz in the transfer data register 1217. As a result, the signal (Trf_Val) 3217 output from the transfer data register 1217 becomes “0x1” (Trf_Val = 0x1).
Then, the CPU 201 sets “0x1” in the polling control register 211. As a result, the signal 221 output from the polling control register 211 becomes “0x1” (En = 0x1), and polling starts.

その後、CPU201は、バスマスタ回路202を動作させた後、クロックコントロールレジスタ1206の0ビット目CPU_clkを「0」に設定する。そうすると、CPU201へクロックが供給されなくなり、低消費電力状態へ移行する。   Thereafter, after operating the bus master circuit 202, the CPU 201 sets the CPU_clk of the 0th bit of the clock control register 1206 to “0”. Then, the clock is not supplied to the CPU 201 and the state shifts to a low power consumption state.

ポーリング制御レジスタ211から出力された信号(En)221が「0x1」になると(En=0x1)、状態検出ブロック206は、バスマスタ機能ブロック205にリード要求を行う。状態検出ブロック206がバスマスタ機能ブロック205にリード要求を行う際の動作は、図7に示した通りである。   When the signal (En) 221 output from the polling control register 211 becomes “0x1” (En = 0x1), the state detection block 206 makes a read request to the bus master function block 205. The operation when the state detection block 206 makes a read request to the bus master function block 205 is as shown in FIG.

そして、バスマスタ機能ブロック3205によるポートステータスレジスタ1204のポーリングの結果によって得られる外部端子P0〜P7の変化に応じて、レジスタ206bの値は、「0x13、0x19、・・・」と変化する。従って、条件判定ブロック207が入力する信号(data)241も、「0x13、0x19、・・・」と変化する。ここで、判定マスクレジスタ214から出力される信号(Cond_Mask)224は、「0xffff_ff3f」である(Cond_Mask=0xffff_ff3f)。従って、条件判定ブロック207が出力する条件判定フラグの信号(flag)242は、以下の(3)式が成り立つ間は「0」であり(flag=0)、以下の(4)式が成り立つ間は「1」となる(flag=1)。
data[7:6]≠Cond_Val[7:6] ・・・(3)
data[7:6]=Cond_Val[7:6](data[7:6]=b11(2進数)) ・・・(4)
Then, the value of the register 206b changes to “0x13, 0x19,...” According to the change of the external terminals P0 to P7 obtained as a result of the polling of the port status register 1204 by the bus master function block 3205. Therefore, the signal (data) 241 input by the condition determination block 207 also changes to “0x13, 0x19,...”. Here, the signal (Cond_Mask) 224 output from the determination mask register 214 is “0xffff_ff3f” (Cond_Mask = 0xffff_ff3f). Accordingly, the signal (flag) 242 of the condition determination flag output by the condition determination block 207 is “0” (flag = 0) while the following expression (3) is satisfied, and while the following expression (4) is satisfied Becomes “1” (flag = 1).
data [7: 6] ≠ Cond_Val [7: 6] (3)
data [7: 6] = Cond_Val [7: 6] (data [7: 6] = b11 (binary number)) (4)

条件判定フラグの信号(flag)242が「1」になると(flag=1)、バス転送制御ブロック1208は、バスマスタ機能ブロック205にライト転送の要求を行うと共に、信号(Clear)3226をポーリング制御レジスタ211へ出力する。ここで、図16のフローチャートを参照しながら、バスマスタ機能ブロック205へのライト転送の要求と、ポーリング制御レジスタ211への信号(Clear)3226の出力とを行う際のバス転送制御ブロック1208の動作の一例を説明する。   When the signal (flag) 242 of the condition determination flag becomes “1” (flag = 1), the bus transfer control block 1208 makes a write transfer request to the bus master function block 205 and also sends the signal (Clear) 3226 to the polling control register. To 211. Here, referring to the flowchart of FIG. 16, the operation of the bus transfer control block 1208 when a request for write transfer to the bus master function block 205 and the output of the signal (Clear) 3226 to the polling control register 211 are performed. An example will be described.

まず、ステップS1601において、バス転送制御ブロック1208は、条件判定フラグの信号(flag)242が立ち上がりエッジを有しているか否かを判断する。この判断の結果、条件判定フラグの信号(flag)242が立ち上がりエッジを有していない場合には、条件判定フラグの信号(flag)242が立ち上がりエッジを有するまで待機する。一方、条件判定フラグの信号(flag)242が立ち上がりエッジを有している場合には、ステップS1602に進む。   First, in step S1601, the bus transfer control block 1208 determines whether or not the condition determination flag signal (flag) 242 has a rising edge. As a result of the determination, if the condition determination flag signal (flag) 242 does not have a rising edge, the process waits until the condition determination flag signal (flag) 242 has a rising edge. On the other hand, if the condition determination flag signal (flag) 242 has a rising edge, the process advances to step S1602.

ステップS1602に進むと、バス転送制御ブロック1208は、ポーリング動作を停止させるために、信号(Clear)3226をポーリング制御レジスタ1218に出力する。
次に、ステップS1602において、バス転送制御ブロック1208は、転送アドレスレジスタ212の設定値「0xA020_0000」をアドレス信号(addr)に含める。また、バス転送制御ブロック1208は、ライトデータ(wdata)3234に転送データレジスタの設定値「0x1」を含める。そして、バス転送制御ブロック1208は、ライトリクエスト信号(req)3232をアサートする(req=1)。すなわち、バス転送制御ブロック1208は、「1」を示すライトリクエスト信号(req)3232をバスマスタ機能ブロック3205に出力する。これにより、バス転送制御ブロック1208からバスマスタ機能ブロック205へ、ライト転送の要求がなされる。
In step S1602, the bus transfer control block 1208 outputs a signal (Clear) 3226 to the polling control register 1218 in order to stop the polling operation.
Next, in step S1602, the bus transfer control block 1208 includes the set value “0xA020_0000” of the transfer address register 212 in the address signal (addr). The bus transfer control block 1208 includes the set value “0x1” of the transfer data register in the write data (wdata) 3234. Then, the bus transfer control block 1208 asserts a write request signal (req) 3232 (req = 1). That is, the bus transfer control block 1208 outputs a write request signal (req) 3232 indicating “1” to the bus master function block 3205. As a result, a write transfer request is made from the bus transfer control block 1208 to the bus master function block 205.

次に、ステップS1604において、バス転送制御ブロック1208は、アクセス終了信号(done)3233がアサートされたか否かを判断する。すなわち、バス転送制御ブロック1208は、バスマスタ機能ブロック205から送信されたアクセス終了信号(done)3233が「1」であるか否かを判断する。この判断の結果、アクセス終了信号(done)3233がアサートされない場合(バスマスタ機能ブロック3205から送信されたアクセス終了信号(done)3233が「1」でない場合)には、アサートされるまで待機する。一方、アクセス終了信号(done)3233がアサートされた場合(バスマスタ機能ブロック3205から送信されたアクセス終了信号(done)3233が「1」の場合)には、ステップS1605に進む。   Next, in step S1604, the bus transfer control block 1208 determines whether or not the access end signal (done) 3233 has been asserted. That is, the bus transfer control block 1208 determines whether or not the access end signal (done) 3233 transmitted from the bus master function block 205 is “1”. As a result of this determination, when the access end signal (done) 3233 is not asserted (when the access end signal (done) 3233 transmitted from the bus master function block 3205 is not “1”), the process waits until it is asserted. On the other hand, when the access end signal (done) 3233 is asserted (when the access end signal (done) 3233 transmitted from the bus master function block 3205 is “1”), the process proceeds to step S1605.

ステップS1605に進むと、バス転送制御ブロック1208は、リードリクエスト信号(req)3232をネゲート(negate)する。すなわち、バス転送制御ブロック1208は、「0」を示すリードリクエスト信号(req)3232をバスマスタ機能ブロック3205に出力する(req=0)。   In step S1605, the bus transfer control block 1208 negates the read request signal (req) 3232. That is, the bus transfer control block 1208 outputs a read request signal (req) 3232 indicating “0” to the bus master function block 3205 (req = 0).

以上のようにしてバス転送制御ブロック1208からバスマスタ機能ブロック3205になされたライト転送の要求により、バスマスタ機能ブロック3205は、クロック制御モジュール1205にライト転送を行う。そうすると、クロックコントロールレジスタ1206に「0x1」が設定され、CPU201に1MHzのクロックが供給され、通常動作状態へ復帰する。   In response to the write transfer request made from the bus transfer control block 1208 to the bus master function block 3205 as described above, the bus master function block 3205 performs write transfer to the clock control module 1205. Then, “0x1” is set in the clock control register 1206, a 1 MHz clock is supplied to the CPU 201, and the normal operation state is restored.

以上のように本実施形態では、状態検出ブロック3206が、ポートステータスレジスタ1204の設定をポーリングし、外部端子P0〜P7の状態を検出する。状態検出ブロック3206の検出結果に基づいて、条件判定ブロック207は、低消費電力状態から通常動作状態にシステムを復帰させるための条件を満たしているか否かを判定する。低消費電力状態から通常動作状態にシステムを復帰させるための条件を満たすと、バス転送制御ブロック1208は、クロックコントロールレジスタ1206への書き込み要求(ライト転送の要求)をバスマスタ機能ブロック3205に行う。バスマスタ機能ブロック3205は、バス転送制御ブロック1208からなされたライト転送の要求に従って、クロックコントロールレジスタ1206の書き換え指示(ライト転送)を行う。クロック制御モジュール1205は、クロックコントロールレジスタ1206は、ライト転送に従ってクロックコントロールレジスタ1206の設定値を変更する。そうすると、CPU201は、その変更に従って、低消費電力状態から通常動作状態にシステムを復帰させる。   As described above, in this embodiment, the state detection block 3206 polls the setting of the port status register 1204 and detects the states of the external terminals P0 to P7. Based on the detection result of the state detection block 3206, the condition determination block 207 determines whether or not a condition for returning the system from the low power consumption state to the normal operation state is satisfied. When the condition for returning the system from the low power consumption state to the normal operation state is satisfied, the bus transfer control block 1208 makes a write request (write transfer request) to the clock control register 1206 to the bus master function block 3205. The bus master function block 3205 issues a rewrite instruction (write transfer) to the clock control register 1206 in accordance with the write transfer request made from the bus transfer control block 1208. In the clock control module 1205, the clock control register 1206 changes the set value of the clock control register 1206 according to the write transfer. Then, the CPU 201 returns the system from the low power consumption state to the normal operation state according to the change.

以上のようにすることによって、バスマスタ回路3202は、低消費電力状態でCPU201が停止している状況でも、CPU201に代わりにポートステータスレジスタ1204をポーリングして通常動作状態へ復帰する条件が成立したことを検出できる。そして、バスマスタ回路3202がクロックコントロールレジスタ1206の設定を行うことができる。従って、CPU201への割り込み処理を行わずにクロックコントロールレジスタ1206の設定を行って、通常動作状態へ復帰させることができる。これにより、CPU201の負荷を削減できると共に、ポート制御モジュール1203(ポートステータスレジスタ1204)の内部状態を検出する際の処理速度を向上させることができる。更に、プロセッサ(CPU)を複数設ける必要がないので、ポート制御モジュール1203(ポートステータスレジスタ1204)の内部状態を検出するためのハードウェアによってシステムLSIの面積が増加することを防止できる。この他、データの書き換え対象となるレジスタのアドレスと、データの内容とをプログラマブルに設定するようにしたので、様々なハードウェアを様々な形態で制御することが可能になる。   As a result, the bus master circuit 3202 satisfies the condition that the port status register 1204 is polled instead of the CPU 201 to return to the normal operation state even when the CPU 201 is stopped in the low power consumption state. Can be detected. Then, the bus master circuit 3202 can set the clock control register 1206. Accordingly, the clock control register 1206 can be set without performing interrupt processing to the CPU 201 to return to the normal operation state. Thus, the load on the CPU 201 can be reduced and the processing speed when detecting the internal state of the port control module 1203 (port status register 1204) can be improved. Further, since it is not necessary to provide a plurality of processors (CPUs), it is possible to prevent the area of the system LSI from being increased by hardware for detecting the internal state of the port control module 1203 (port status register 1204). In addition, since the address of the register to be rewritten and the contents of the data are set in a programmable manner, various hardware can be controlled in various forms.

尚、本実施形態では、バスマスタ回路3202がポーリングする対象のハードウェアをポート制御モジュール1203としたが、第1及び第2の実施形態と同様に、バスマスタ回路3202がポーリングする対象はこれに限定されない。すなわち、ハードウェア内部に内部状態を表示するレジスタを備えたハードウェアモジュールであれば、どのようなハードウェアであってもポーリングする対象とすることができる。   In this embodiment, the hardware to be polled by the bus master circuit 3202 is the port control module 1203. However, as in the first and second embodiments, the object to be polled by the bus master circuit 3202 is not limited to this. . That is, any hardware module provided with a register for displaying an internal state inside the hardware can be polled.

また、本実施形態では、設定対象のレジスタをクロック制御モジュール1205内のクロックコントロールレジスタ1206としたが、設定対象のレジスタはこれに限定されない。すなわち、バス転送により設定が可能なレジスタを有するハードウェアモジュールであれば、どのようなハードウェアモジュール内のレジスタであっても設定対象とすることができる。   In this embodiment, the setting target register is the clock control register 1206 in the clock control module 1205. However, the setting target register is not limited to this. That is, any hardware module having a register that can be set by bus transfer can be set as a register in any hardware module.

また、本実施形態では、バス転送制御ブロック1208がライト転送をバスマスタ機能ブロック3205に要求するようにしたが、必ずしもライト転送を要求しなくてもよい。例えば、ハードウェアモジュールの内部状態の読み出しの要求(リード転送の要求)を行ってもよい。また、リード転送を行うことによって読み出されたデータに応じて所定のビットを対象に操作を行ったデータの書き込みの要求(read-modify-write転送の要求)を行ってもよい。また、通常動作状態時にCPU201がプログラマブルにクロックコントロールレジスタ1206の設定を行えるようにしてもよい。
また、転送アドレスレジスタ1216及び転送データレジスタ1217を複数設け、バス転送制御ブロック1208が複数のレジスタを設定対象としてライト要求等を行えるようにしてもよい。
In this embodiment, the bus transfer control block 1208 requests write transfer from the bus master function block 3205. However, it is not always necessary to request write transfer. For example, a request for reading the internal state of the hardware module (read transfer request) may be made. In addition, a data write request (read-modify-write transfer request) may be performed by performing an operation on a predetermined bit according to data read by performing read transfer. Further, the CPU 201 may be able to set the clock control register 1206 in a programmable manner during the normal operation state.
A plurality of transfer address registers 1216 and transfer data registers 1217 may be provided so that the bus transfer control block 1208 can perform a write request or the like with a plurality of registers as setting targets.

また、第2の実施形態と同様に、ポーリング周期設定レジスタ2217とタイマー機能ブロック206cとを設け、ポーリング周期設定レジスタ2217に設定されている周期でポーリングの要求を行うようにしてもよい。このようにすれば、システムバス108にかかる負荷をより軽減することができる。
また、本実施形態では、転送方向レジスタを更に設け、この転送方向レジスタを用いることにより転送方向をプログラマブルに設定することもできる。
Similarly to the second embodiment, a polling cycle setting register 2217 and a timer function block 206c may be provided so that polling is requested at a cycle set in the polling cycle setting register 2217. In this way, the load on the system bus 108 can be further reduced.
In this embodiment, a transfer direction register is further provided, and the transfer direction can be set programmable by using this transfer direction register.

(本発明の他の実施形態)
前述した実施形態の機能を実現するべく各種のデバイスを動作させるように、該各種デバイスと接続された装置あるいはシステム内のコンピュータに対し、前記実施形態の機能を実現するためのソフトウェアのプログラムコードを供給してもよい。そのシステムあるいは装置のコンピュータ(CPUあるいはMPU)に格納されたプログラムに従って前記各種デバイスを動作させることによって実施したものも、本発明の範疇に含まれる。
(Other embodiments of the present invention)
In order to operate various devices to realize the functions of the above-described embodiments, program codes of software for realizing the functions of the above-described embodiments are provided to an apparatus or a computer in the system connected to the various devices. You may supply. What was implemented by operating said various devices according to the program stored in the computer (CPU or MPU) of the system or apparatus is also included in the category of the present invention.

また、この場合、前記ソフトウェアのプログラムコード自体が前述した実施形態の機能を実現することになる。また、そのプログラムコード自体、及びそのプログラムコードをコンピュータに供給するための手段、例えば、かかるプログラムコードを格納した記録媒体は本発明を構成する。かかるプログラムコードを記憶する記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。   In this case, the program code of the software itself realizes the functions of the above-described embodiment. The program code itself and means for supplying the program code to a computer, for example, a recording medium storing the program code constitute the present invention. As a recording medium for storing the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

また、コンピュータが供給されたプログラムコードを実行することにより、前述の実施形態の機能が実現されるだけでない。そのプログラムコードがコンピュータにおいて稼働しているオペレーティングシステムあるいは他のアプリケーションソフト等と共同して前述の実施形態の機能が実現される場合にもかかるプログラムコードは本発明の実施形態に含まれることは言うまでもない。   Further, the functions of the above-described embodiments are not only realized by executing the program code supplied by the computer. It goes without saying that the program code is also included in the embodiment of the present invention even when the function of the above-described embodiment is realized in cooperation with an operating system or other application software running on the computer. Yes.

さらに、供給されたプログラムコードがコンピュータの機能拡張ボードに備わるメモリに格納された後、そのプログラムコードの指示に基づいてその機能拡張ボードに備わるCPUが実際の処理の一部または全部を行う。その処理によって前述した実施形態の機能が実現される場合にも本発明に含まれることは言うまでもない。
また、供給されたプログラムコードがコンピュータに接続された機能拡張ユニットに備わるメモリに格納された後、そのプログラムコードの指示に基づいて機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う。その処理によって前述した実施形態の機能が実現される場合にも本発明に含まれることは言うまでもない。
Further, after the supplied program code is stored in the memory provided in the function expansion board of the computer, the CPU provided in the function expansion board performs part or all of the actual processing based on the instruction of the program code. Needless to say, the present invention includes the case where the functions of the above-described embodiments are realized by the processing.
Further, after the supplied program code is stored in the memory provided in the function expansion unit connected to the computer, the CPU or the like provided in the function expansion unit performs part or all of the actual processing based on the instruction of the program code. Do. Needless to say, the present invention includes the case where the functions of the above-described embodiments are realized by the processing.

なお、前述した各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。   Note that each of the above-described embodiments is merely a specific example for carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. . That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

本発明の第1の実施形態を示し、バスマスタ回路の基本構成の一例を示す図である。1 is a diagram illustrating an example of a basic configuration of a bus master circuit according to a first embodiment of this invention. FIG. 本発明の第1の実施形態を示し、CPUに対する割り込み信号を生成するバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。1 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit that generates an interrupt signal for a CPU according to the first embodiment of this invention. FIG. 本発明の第1の実施形態を示し、条件判定ブロックの構成の一例を示す図である。It is a figure which shows the 1st Embodiment of this invention and shows an example of a structure of a condition determination block. 本発明の第1の実施形態を示し、割り込み信号生成ブロックの構成の一例を示す図である。It is a figure which shows the 1st Embodiment of this invention and shows an example of a structure of the interrupt signal generation block. 本発明の第1の実施形態を示し、制御レジスタ群の仕様の一例を示す図である。It is a figure which shows the 1st Embodiment of this invention and shows an example of the specification of a control register group. 本発明の第1の実施形態を示し、データポインタレジスタの仕様の一例を示す図である。It is a figure which shows the 1st Embodiment of this invention and shows an example of the specification of a data pointer register. 本発明の第1の実施形態を示し、バスマスタ機能ブロックにリード要求を行う際の状態検出ブロックの動作の一例を説明するフローチャートである。5 is a flowchart illustrating an example of an operation of a state detection block when a read request is made to the bus master functional block according to the first embodiment of this invention. 本発明の第1の実施形態を示し、割り込み信号生成ブロックの動作の一例を説明するフローチャートである。5 is a flowchart illustrating an example of an operation of an interrupt signal generation block according to the first embodiment of this invention. 本発明の第2の実施形態を示し、CPUに対する割り込み信号を生成するバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。FIG. 10 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit that generates an interrupt signal for a CPU according to the second embodiment of this invention. 本発明の第2の実施形態を示し、ポーリング周期設定レジスタの仕様の一例を示す図である。It is a figure which shows the 2nd Embodiment of this invention and shows an example of the specification of a polling period setting register. 本発明の第2の実施形態を示し、バスマスタ機能ブロックにリード要求を行う際の状態検出ブロックの動作の一例を説明するフローチャートである。10 is a flowchart illustrating an example of an operation of a state detection block when a read request is made to a bus master function block according to the second embodiment of this invention. 本発明の第2の実施形態を示し、次のポーリングの要求を3サイクル待たせる際の状態検出ブロックの動作の一例を説明するタイミングチャートである。It is a timing chart which shows the 2nd Embodiment of this invention and demonstrates an example of the operation | movement of a state detection block at the time of making the next polling request wait for 3 cycles. 本発明の第3の実施形態を示し、クロック制御モジュールのレジスタの設定を行うバスマスタ回路を備えたシステムLSIの構成の一例を示す図である。FIG. 10 is a diagram illustrating an example of a configuration of a system LSI including a bus master circuit that performs setting of a register of a clock control module according to a third embodiment of this invention. 本発明の第3の実施形態を示し、転送アドレスレジスタの仕様の一例と、転送データレジスタの仕様の一例とを示す図である。It is a figure which shows the 3rd Embodiment of this invention and shows an example of the specification of a transfer address register, and an example of the specification of a transfer data register. 本発明の第3の実施形態を示し、ポートステータスレジスタの仕様の一例と、クロックコントロールレジスタの仕様の一例とを示す図である。It is a figure which shows the 3rd Embodiment of this invention and shows an example of the specification of a port status register, and an example of the specification of a clock control register. 本発明の第3の実施形態を示し、バスマスタ機能ブロックへのライト転送の要求と、ポーリング制御レジスタへの信号(Clear)の出力とを行う際のバス転送制御ブロックの動作の一例を説明するフローチャートである。The flowchart which shows the 3rd Embodiment of this invention and demonstrates an example of operation | movement of the bus transfer control block at the time of performing the request | requirement of the write transfer to a bus master functional block, and the output of the signal (Clear) to a polling control register It is.

符号の説明Explanation of symbols

101、202、2202、3202 バスマスタ回路
102、205、3205 バスマスタ機能ブロック
103、206、2206 状態検出ブロック
104、207 条件判定ブロック
105 ハードウェア制御ブロック
106、209、2209、3209 制御レジスタ群
107、210 バススレーブ機能ブロック
108 システムバス
201 CPU
203 外部通信モジュール
204 FIFOデータポインタレジスタ
208 割り込み信号生成ブロック
1203 ポート制御モジュール
1204 ポートステータスレジスタ
1205 クロック制御モジュール
1206 クロックコントロールレジスタ
1208 バス転送制御ブロック
101, 202, 2202, 3202 Bus master circuit 102, 205, 3205 Bus master function block 103, 206, 2206 Status detection block 104, 207 Condition determination block 105 Hardware control block 106, 209, 2209, 3209 Control register group 107, 210 Bus Slave function block 108 System bus 201 CPU
203 External Communication Module 204 FIFO Data Pointer Register 208 Interrupt Signal Generation Block 1203 Port Control Module 1204 Port Status Register 1205 Clock Control Module 1206 Clock Control Register 1208 Bus Transfer Control Block

Claims (23)

プロセッサ及び1つ以上のハードウェアとバスを介して相互に接続されたバスマスタ回路であって、
前記バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出手段と、
前記検出手段により検出されたハードウェアの状態を判別する判別手段と、
前記判別手段により判別されたハードウェアの状態に基づいて制御信号を生成する生成手段と、
前記生成手段により生成された制御信号を前記バスに出力する出力手段とを有することを特徴とするバスマスタ回路。
A bus master circuit interconnected with a processor and one or more hardware via a bus,
Detecting means for accessing the bus as a bus master and detecting a state of hardware connected to each other via the bus;
Discriminating means for discriminating the state of the hardware detected by the detecting means;
Generating means for generating a control signal based on the hardware state determined by the determining means;
An output means for outputting the control signal generated by the generating means to the bus.
前記生成手段は、前記判別手段により判別されたハードウェアの状態に基づいて、前記バスを介して相互に接続されたプロセッサに対する割り込み信号を生成し、
前記出力手段は、前記生成手段により生成された割り込み信号を、前記バスを介して、前記プロセッサに出力することを特徴とする請求項1に記載のバスマスタ回路。
The generation unit generates an interrupt signal for processors connected to each other via the bus based on the hardware state determined by the determination unit;
The bus master circuit according to claim 1, wherein the output unit outputs the interrupt signal generated by the generation unit to the processor via the bus.
前記生成手段は、前記判別手段により判別されたハードウェアの状態に基づいて、そのハードウェアと異なる第2のハードウェアの動作に関わる制御信号を生成し、
前記出力手段は、前記生成手段により生成された制御信号を、前記バスを介して、前記第2のハードウェアに出力することを特徴とする請求項1に記載のバスマスタ回路。
The generation unit generates a control signal related to the operation of the second hardware different from the hardware based on the hardware state determined by the determination unit;
The bus master circuit according to claim 1, wherein the output unit outputs the control signal generated by the generation unit to the second hardware via the bus.
前記生成手段は、前記判別手段により判別されたハードウェアの状態に基づいて、前記バスを介して相互に接続されたプロセッサへ供給されるクロックを制御するための制御信号を生成することを特徴とする請求項3に記載のバスマスタ回路。   The generation unit generates a control signal for controlling a clock supplied to processors connected to each other via the bus based on a hardware state determined by the determination unit. The bus master circuit according to claim 3. 前記検出手段は、バスを介して相互に接続されたハードウェアの状態を、間隔をあけて検出することを特徴とする請求項1〜4の何れか1項に記載のバスマスタ回路。   5. The bus master circuit according to claim 1, wherein the detection unit detects a state of hardware connected to each other via a bus at an interval. 前記バスを介して相互に接続されたハードウェアの状態を検出する間隔がプログラマブルに設定される間隔設定手段を有し、
前記検出手段は、バスを介して相互に接続されたハードウェアの状態を前記間隔設定手段に設定された間隔で検出することを特徴とする請求項5に記載のバスマスタ回路。
An interval setting means in which an interval for detecting the state of hardware connected to each other via the bus is set in a programmable manner;
6. The bus master circuit according to claim 5, wherein the detection unit detects a state of hardware connected to each other via a bus at an interval set in the interval setting unit.
前記出力手段は、前記生成手段により生成された制御信号を、予め設定された内容に従って、前記バスにアクセスすることを特徴とする請求項1〜6の何れか1項に記載のバスマスタ回路。   The bus master circuit according to claim 1, wherein the output unit accesses the bus according to a preset content of a control signal generated by the generation unit. 前記制御信号の出力先のアドレスがプログラマブルに設定される出力先アドレス設定手段と、
前記制御信号に含めるデータがプログラマブルに設定されるデータ設定手段とを有し、
前記生成手段は、前記データ設定手段に設定されたデータを含む制御信号を生成し、
前記出力手段は、前記バスを介して、前記出力先アドレス設定手段に設定されたアドレスに、前記生成手段により生成された制御信号を出力することを特徴とする請求項7に記載のバスマスタ回路。
Output destination address setting means in which an output destination address of the control signal is set in a programmable manner;
Data setting means in which data included in the control signal is set in a programmable manner;
The generating means generates a control signal including data set in the data setting means,
8. The bus master circuit according to claim 7, wherein the output unit outputs the control signal generated by the generation unit to the address set in the output destination address setting unit via the bus.
前記データ設定手段に設定されたデータの転送方向がプログラマブルに設定される転送方向設定手段を有することを特徴とする請求項8に記載のバスマスタ回路。   9. The bus master circuit according to claim 8, further comprising: a transfer direction setting unit that programmably sets a data transfer direction set in the data setting unit. 前記検出手段により検出されるハードウェアのアドレスがプログラマブルに設定されるハードウェアアドレス設定手段を有し、
前記検出手段は、前記ハードウェアアドレス設定手段に設定されたアドレスのハードウェアの状態を検出することを特徴とする請求項1〜9の何れか1項に記載のバスマスタ回路。
A hardware address setting unit in which a hardware address detected by the detection unit is set in a programmable manner;
The bus master circuit according to claim 1, wherein the detection unit detects a hardware state of an address set in the hardware address setting unit.
前記検出手段により検出されたハードウェアの状態を判別するための条件がプログラマブルに設定される条件設定手段を有し、
前記判別手段は、前記検出手段により検出されたハードウェアの状態が、前記条件設定手段に設定された条件に該当するか否かを判別することを特徴とする請求項1〜10の何れか1項に記載のバスマスタ回路。
Having condition setting means in which a condition for determining the state of the hardware detected by the detection means is set in a programmable manner;
11. The determination unit according to claim 1, wherein the determination unit determines whether a hardware state detected by the detection unit corresponds to a condition set in the condition setting unit. The bus master circuit according to item.
バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出ステップと、
前記検出ステップにより検出されたハードウェアの状態を判別する判別ステップと、
前記判別ステップにより判別されたハードウェアの状態に基づいて制御信号を生成する生成ステップと、
前記生成ステップにより生成された制御信号を前記バスに出力する出力ステップとを有することを特徴とするバス制御方法。
A detection step of accessing the bus as a bus master and detecting the state of hardware interconnected via the bus;
A determination step of determining the state of the hardware detected by the detection step;
A generation step of generating a control signal based on the hardware state determined by the determination step;
A bus control method comprising: an output step of outputting the control signal generated in the generation step to the bus.
前記生成ステップは、前記判別ステップにより判別されたハードウェアの状態に基づいて、前記バスを介して相互に接続されたプロセッサに対する割り込み信号を生成し、
前記出力ステップは、前記生成ステップにより生成された割り込み信号を、前記バスを介して、前記プロセッサに出力することを特徴とする請求項12に記載のバス制御方法。
The generation step generates an interrupt signal for processors connected to each other via the bus based on the hardware state determined by the determination step;
13. The bus control method according to claim 12, wherein the output step outputs the interrupt signal generated by the generation step to the processor via the bus.
前記生成ステップは、前記判別ステップにより判別されたハードウェアの状態に基づいて、そのハードウェアと異なる第2のハードウェアの動作に関わる制御信号を生成し、
前記出力ステップは、前記生成ステップにより生成された制御信号を、前記バスを介して、前記第2のハードウェアに出力することを特徴とする請求項12に記載のバス制御方法。
The generation step generates a control signal related to the operation of second hardware different from the hardware based on the hardware state determined by the determination step;
13. The bus control method according to claim 12, wherein the output step outputs the control signal generated by the generation step to the second hardware via the bus.
前記生成ステップは、前記判別ステップにより判別されたハードウェアの状態に基づいて、前記バスを介して相互に接続されたプロセッサへ供給されるクロックを制御するための制御信号を生成することを特徴とする請求項14に記載のバス制御方法。   The generation step generates a control signal for controlling a clock supplied to processors connected to each other via the bus based on a hardware state determined by the determination step. The bus control method according to claim 14. 前記検出ステップは、バスを介して相互に接続されたハードウェアの状態を、間隔をあけて検出することを特徴とする請求項12〜15の何れか1項に記載のバス制御方法。   The bus control method according to any one of claims 12 to 15, wherein the detecting step detects a state of hardware connected to each other via a bus at an interval. 前記バスを介して相互に接続されたハードウェアの状態を検出する間隔をプログラマブルに設定する間隔設定ステップを有し、
前記検出ステップは、バスを介して相互に接続されたハードウェアの状態を前記間隔設定ステップにより設定された間隔で検出することを特徴とする請求項16に記載のバス制御方法。
An interval setting step for programmably setting an interval for detecting the state of hardware connected to each other via the bus;
17. The bus control method according to claim 16, wherein the detecting step detects a state of hardware connected to each other via a bus at an interval set by the interval setting step.
前記出力ステップは、前記生成ステップにより生成された制御信号を、予め設定された内容に従って、前記バスにアクセスすることを特徴とする請求項12〜17の何れか1項に記載のバス制御方法。   18. The bus control method according to claim 12, wherein the output step accesses the bus according to a preset content of the control signal generated in the generation step. 前記制御信号の出力先のアドレスをプログラマブルに設定する出力先アドレス設定ステップと、
前記制御信号に含めるデータをプログラマブルに設定するデータ設定ステップとを有し、
前記生成ステップは、前記データ設定ステップにより設定されたデータを含む制御信号を生成し、
前記出力ステップは、前記バスを介して、前記出力先アドレス設定ステップにより設定されたアドレスに、前記生成ステップにより生成された制御信号を出力することを特徴とする請求項18に記載のバス制御方法。
An output destination address setting step for programmably setting an output destination address of the control signal;
A data setting step for programmably setting data included in the control signal,
The generation step generates a control signal including the data set by the data setting step,
19. The bus control method according to claim 18, wherein the output step outputs the control signal generated by the generation step to the address set by the output destination address setting step via the bus. .
前記データ設定ステップにより設定されたデータの転送方向をプログラマブルに設定する転送方向設定ステップを有することを特徴とする請求項19に記載のバス制御方法。   20. The bus control method according to claim 19, further comprising a transfer direction setting step for programmably setting the transfer direction of the data set by the data setting step. 前記検出ステップにより検出されるハードウェアのアドレスをプログラマブルに設定するハードウェアアドレス設定ステップを有し、
前記検出ステップは、前記ハードウェアアドレス設定ステップにより設定されたアドレスのハードウェアの状態を検出することを特徴とする請求項12〜20の何れか1項に記載のバス制御方法。
A hardware address setting step for programmably setting a hardware address detected by the detection step;
21. The bus control method according to claim 12, wherein the detecting step detects a hardware state of the address set by the hardware address setting step.
前記検出ステップにより検出されたハードウェアの状態を判別するための条件をプログラマブルに設定する条件設定ステップを有し、
前記判別ステップは、前記検出ステップにより検出されたハードウェアの状態が、前記条件設定ステップにより設定された条件に該当するか否かを判別することを特徴とする請求項12〜21の何れか1項に記載のバス制御方法。
A condition setting step for programmably setting a condition for determining the state of the hardware detected by the detection step;
The determination step determines whether or not the hardware state detected by the detection step corresponds to the condition set by the condition setting step. The bus control method according to item.
バスにバスマスタとしてアクセスして、前記バスを介して相互に接続されたハードウェアの状態を検出する検出ステップと、
前記検出ステップにより検出されたハードウェアの状態を判別する判別ステップと、
前記判別ステップにより判別されたハードウェアの状態に基づいて制御信号を生成する生成ステップと、
前記生成ステップにより生成された制御信号を前記バスに出力する出力ステップとをコンピュータに実行させることを特徴とするコンピュータプログラム。
A detection step of accessing the bus as a bus master and detecting the state of hardware interconnected via the bus;
A determination step of determining the state of the hardware detected by the detection step;
A generation step of generating a control signal based on the hardware state determined by the determination step;
A computer program causing a computer to execute an output step of outputting the control signal generated in the generation step to the bus.
JP2006190907A 2006-07-11 2006-07-11 Bus master circuit, bus control method and computer program Pending JP2008021040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006190907A JP2008021040A (en) 2006-07-11 2006-07-11 Bus master circuit, bus control method and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006190907A JP2008021040A (en) 2006-07-11 2006-07-11 Bus master circuit, bus control method and computer program

Publications (2)

Publication Number Publication Date
JP2008021040A true JP2008021040A (en) 2008-01-31
JP2008021040A5 JP2008021040A5 (en) 2009-08-27

Family

ID=39076929

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006190907A Pending JP2008021040A (en) 2006-07-11 2006-07-11 Bus master circuit, bus control method and computer program

Country Status (1)

Country Link
JP (1) JP2008021040A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041534A (en) * 2011-08-19 2013-02-28 Fujitsu Semiconductor Ltd Semiconductor integrated circuit and interruption generation method
JP2013041402A (en) * 2011-08-15 2013-02-28 Fujitsu Semiconductor Ltd Semiconductor integrated circuit and circuit state monitoring circuit

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6198467A (en) * 1984-10-19 1986-05-16 Fujitsu Ltd Register arrangement
JPS6222171A (en) * 1985-07-23 1987-01-30 Oki Electric Ind Co Ltd Control system for inter-processor communication
JPH04256247A (en) * 1991-02-08 1992-09-10 Fujitsu Ltd Polling interval controller and its control method
JPH05100993A (en) * 1991-10-07 1993-04-23 Mitsubishi Electric Corp Signal line sharing system
JPH06332846A (en) * 1993-05-24 1994-12-02 Fuji Xerox Co Ltd Bus repeater
JPH10307788A (en) * 1997-05-07 1998-11-17 Fujitsu Ltd Bus bridge
JPH11102340A (en) * 1997-09-25 1999-04-13 Fuji Electric Co Ltd Processor system and bus access method therefor
JP2002007227A (en) * 2000-06-20 2002-01-11 Nec Corp Universal slot device, device, slot priority method, and device priority method
JP2002007316A (en) * 2000-06-19 2002-01-11 Niigata Fuji Xerox Manufacturing Co Ltd Low power consumption computer system
JP2002175269A (en) * 2000-09-29 2002-06-21 Lucent Technol Inc Extended bridge device for i2c bus and method
JP2004070642A (en) * 2002-08-06 2004-03-04 Fujitsu Access Ltd Communication system for performing data transfer through shared memory
JP2004213407A (en) * 2003-01-06 2004-07-29 Sony Corp Information processing device and method, storage medium and program
JP2004287838A (en) * 2003-03-20 2004-10-14 Ricoh Co Ltd Interrupt controller, interrupt control method, device with interrupt controller, interrupt control program, and recording medium
JP2005228188A (en) * 2004-02-16 2005-08-25 Kyocera Mita Corp Information processing system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6198467A (en) * 1984-10-19 1986-05-16 Fujitsu Ltd Register arrangement
JPS6222171A (en) * 1985-07-23 1987-01-30 Oki Electric Ind Co Ltd Control system for inter-processor communication
JPH04256247A (en) * 1991-02-08 1992-09-10 Fujitsu Ltd Polling interval controller and its control method
JPH05100993A (en) * 1991-10-07 1993-04-23 Mitsubishi Electric Corp Signal line sharing system
JPH06332846A (en) * 1993-05-24 1994-12-02 Fuji Xerox Co Ltd Bus repeater
JPH10307788A (en) * 1997-05-07 1998-11-17 Fujitsu Ltd Bus bridge
JPH11102340A (en) * 1997-09-25 1999-04-13 Fuji Electric Co Ltd Processor system and bus access method therefor
JP2002007316A (en) * 2000-06-19 2002-01-11 Niigata Fuji Xerox Manufacturing Co Ltd Low power consumption computer system
JP2002007227A (en) * 2000-06-20 2002-01-11 Nec Corp Universal slot device, device, slot priority method, and device priority method
JP2002175269A (en) * 2000-09-29 2002-06-21 Lucent Technol Inc Extended bridge device for i2c bus and method
JP2004070642A (en) * 2002-08-06 2004-03-04 Fujitsu Access Ltd Communication system for performing data transfer through shared memory
JP2004213407A (en) * 2003-01-06 2004-07-29 Sony Corp Information processing device and method, storage medium and program
JP2004287838A (en) * 2003-03-20 2004-10-14 Ricoh Co Ltd Interrupt controller, interrupt control method, device with interrupt controller, interrupt control program, and recording medium
JP2005228188A (en) * 2004-02-16 2005-08-25 Kyocera Mita Corp Information processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041402A (en) * 2011-08-15 2013-02-28 Fujitsu Semiconductor Ltd Semiconductor integrated circuit and circuit state monitoring circuit
JP2013041534A (en) * 2011-08-19 2013-02-28 Fujitsu Semiconductor Ltd Semiconductor integrated circuit and interruption generation method

Similar Documents

Publication Publication Date Title
US10649935B2 (en) Deferred inter-processor interrupts
US9542152B2 (en) System-on-chip and application processor including FIFO buffer and mobile device comprising the same
US7783817B2 (en) Method and apparatus for conditional broadcast of barrier operations
WO2005119465A1 (en) Data processing unit and bus arbitration unit
US20150039803A1 (en) Data transfer apparatus, data transfer method, and data transfer program
CN110858188A (en) Multiprocessor system with distributed mailbox structure and communication method thereof
CN113468097B (en) Data exchange method based on system on chip
US7779174B2 (en) Method and apparatus for dynamically changing burst length using direct memory access control
JP2007058716A (en) Data transfer bus system
US20070038795A1 (en) Asynchronous bus interface and processing method thereof
US6738837B1 (en) Digital system with split transaction memory access
US20050138255A1 (en) Method and apparatus for reducing interrupt latency by dynamic buffer sizing
JP2008021040A (en) Bus master circuit, bus control method and computer program
JP3824122B2 (en) DMA device
JP2006268753A (en) Dma circuit and computer system
US20110197008A1 (en) Card host lsi and set device including the lsi
US10503471B2 (en) Electronic devices and operation methods of the same
JP2000163310A (en) Microprocessor
JP2011070372A (en) Dma transmission control device
JP2003309564A (en) Microcomputer system and transceiver used therefor
WO2002093392A1 (en) Data processor
US11630790B1 (en) Integrated circuit and interrupt-handling method of sensing device
US11841782B2 (en) Semiconductor device and debugging system
JP6260394B2 (en) Processing system
JP2001084143A (en) Information processor

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090710

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110608

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110810

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110927

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130424