JP2003036241A - Wait cycle control device and wait cycle control method - Google Patents

Wait cycle control device and wait cycle control method

Info

Publication number
JP2003036241A
JP2003036241A JP2001224482A JP2001224482A JP2003036241A JP 2003036241 A JP2003036241 A JP 2003036241A JP 2001224482 A JP2001224482 A JP 2001224482A JP 2001224482 A JP2001224482 A JP 2001224482A JP 2003036241 A JP2003036241 A JP 2003036241A
Authority
JP
Japan
Prior art keywords
wait
external device
data
cycle control
time
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
JP2001224482A
Other languages
Japanese (ja)
Inventor
Atsushi Kawabe
厚志 河辺
Soji Hori
聡司 堀
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001224482A priority Critical patent/JP2003036241A/en
Publication of JP2003036241A publication Critical patent/JP2003036241A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To make it unnecessary to rewrite a program for changing an external device and changing the operating frequency of a processor by automatically setting an optimum number of wait cycles in an access to the external device without a data acknowledge signal. SOLUTION: In starting up a micro computer, a cycle number counter 105 counts the number of clock cycles for the period from the starting point of reading data from an external device to the time at which the data is fixed, the value of the count at the moment when the read data is fixed is automatically loaded to a wait cycle number setting register 106 to set the number of wait cycles to the read of data from the external device, and thereafter the external device is accessed based on the optimized number of wait cycles.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータ等、外部デバイスからのデータの読み出しに際して
ウェイトサイクルを用いてタイミングを制御する装置
が、データアクノリッジ信号を持たない外部デバイスを
アクセスする場合に、ウェイトサイクル数を最適に制御
するためのウェイトサイクル制御装置およびウェイトサ
イクル制御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a wait cycle when an apparatus for controlling the timing using a wait cycle when reading data from an external device such as a microcomputer accesses an external device that does not have a data acknowledge signal. The present invention relates to a wait cycle control device and a wait cycle control method for optimally controlling the number of cycles.

【0002】[0002]

【従来の技術】従来、マイクロコンピュータ等のCPU
が外部デバイスをアクセスする場合、データアクノリッ
ジ信号を出力するデバイスに対しては、そのデータアク
ノリッジ信号をCPUが認識してアクセスサイクルを終
了するハンドシェークモードが用いられ、データアクノ
リッジ信号を持たないデバイスについては、あらかじめ
プログラムで外部デバイスに対するウェイトサイクル数
を設定する固定ウェイトモードが用いられてきた。
2. Description of the Related Art Conventionally, a CPU such as a microcomputer
When the device accesses an external device, the handshake mode in which the CPU recognizes the data acknowledge signal and ends the access cycle is used for the device that outputs the data acknowledge signal, and for the device that does not have the data acknowledge signal, , A fixed wait mode has been used in which a program sets the number of wait cycles for an external device in advance.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、固定ウ
ェイトモードでは、外部デバイスの変更等の理由でウェ
イトサイクル数を変更する必要が生じた場合に、プログ
ラム上でウェイトサイクル数の設定を書き換える必要が
あり、ROM内蔵品ではそのためのマスク修正が必要に
なる。また、消費電力抑制等の理由でマイクロコンピュ
ータの動作クロック周波数を変更したい場合について
も、プログラム上でウェイトサイクル数の設定を書き換
える必要があり、CPUの処理速度を常に最適化したシ
ステムを構築するのは非常に困難であった。
However, in the fixed wait mode, when it is necessary to change the number of wait cycles due to a change in external device, it is necessary to rewrite the setting of the number of wait cycles in the program. For products with built-in ROM, it is necessary to modify the mask for that purpose. Also, when it is desired to change the operating clock frequency of the microcomputer for reasons such as power consumption reduction, it is necessary to rewrite the setting of the number of wait cycles on the program, and a system in which the processing speed of the CPU is always optimized is constructed. Was very difficult.

【0004】本発明は上記の問題点を解決するものであ
り、外部デバイスからのデータの読み出しに際してウェ
イトサイクルを用いてタイミングを制御するマイクロコ
ンピュータ等の装置において、データアクノリッジ信号
を持たない外部デバイスの変更等によりウェイトサイク
ル数を変更したい場合に、最適なウェイトサイクル数を
自動的に設定し、プログラムの書き換えを不要にするウ
ェイトサイクル制御装置およびウェイトサイクル制御方
法を提供することを目的とする。
The present invention solves the above-mentioned problems, and in an apparatus such as a microcomputer which controls the timing using a wait cycle when reading data from an external device, the external device not having a data acknowledge signal is used. An object of the present invention is to provide a wait cycle control device and a wait cycle control method that automatically set the optimum number of wait cycles when it is desired to change the number of wait cycles due to changes or the like and do not require program rewriting.

【0005】さらに、本発明はマイクロコンピュータ等
の動作中にクロック周波数を変更する場合にも、データ
アクノリッジ信号を持たない外部デバイスからのデータ
の読み出しに際して最適なウェイトサイクル数を自動的
に設定するウェイトサイクル制御装置およびウェイトサ
イクル制御方法を提供することを目的とする。
Further, according to the present invention, even when the clock frequency is changed during the operation of the microcomputer or the like, the wait number for automatically setting the optimum wait cycle number when reading the data from the external device having no data acknowledge signal. An object is to provide a cycle control device and a wait cycle control method.

【0006】[0006]

【課題を解決するための手段】本発明の請求項1に係る
ウェイトサイクル制御装置は、ウェイトサイクルを用い
て外部デバイスからのデータの読み出しタイミングを制
御する装置において、外部デバイスからのデータの読み
出し開始時点からそのデータが確定する時点までに要す
るクロックサイクル数をカウントするサイクル数カウン
タ(サイクル素カウンタ105)と、外部デバイスから
のデータの読み出しに対するウェイトサイクル数を設定
するウェイト数設定レジスタ(ウェイト数設定レジスタ
106)と、を具備し、初期設定時に外部デバイスから
のデータの読み出しに際して得られたサイクル数カウン
タの値をウェイト数設定レジスタに設定するものであ
る。
A wait cycle control device according to claim 1 of the present invention is a device for controlling a timing of reading data from an external device by using a wait cycle, to start reading data from an external device. A cycle number counter (cycle prime counter 105) that counts the number of clock cycles required from the time to the time when the data is determined, and a wait number setting register (wait number setting) that sets the number of wait cycles for reading data from an external device Register 106), and sets the value of the cycle number counter obtained at the time of reading the data from the external device at the time of initial setting in the wait number setting register.

【0007】請求項1記載のウェイトサイクル制御装置
によれば、初期設定時に、外部デバイスからのデータの
読み出しに必要なウェイトサイクル数をサイクル数カウ
ンタを用いて計測し、この値をウェイト数設定レジスタ
に設定することにより、外部デバイスの変更等によりア
クセスサイクル数を変更したい場合にも最適なウェイト
サイクル数を自動的に設定することができるので、プロ
グラムを書き換える必要が無くなる。
According to the wait cycle control device of the first aspect, at the time of initial setting, the number of wait cycles required for reading data from the external device is measured by using the cycle number counter, and this value is set. By setting to, it is possible to automatically set the optimum number of wait cycles even when it is desired to change the number of access cycles due to the change of the external device, so that it is not necessary to rewrite the program.

【0008】本発明の請求項2に係るウェイトサイクル
制御装置は、請求項1記載のウェイトサイクル制御装置
において、前記初期設定時が、前記外部デバイスからの
最初のデータの読み出し時を含むものである。
A wait cycle control device according to a second aspect of the present invention is the wait cycle control device according to the first aspect, wherein the initial setting time includes a first data read time from the external device.

【0009】請求項2記載のウェイトサイクル制御装置
によれば、外部デバイスからの最初のデータの読み出し
時に、最適なウェイトサイクル数がウェイト数設定レジ
スタに自動的に設定されるので、以降の外部デバイスの
アクセスにおいて最適な性能を得ることができる。
According to the wait cycle control device of the second aspect, the optimum number of wait cycles is automatically set in the wait number setting register when the first data is read from the external device. Optimal performance can be obtained in the access of.

【0010】本発明の請求項3に係るウェイトサイクル
制御装置は、請求項1または2記載のウェイトサイクル
制御装置において、複数の外部デバイスが接続されてい
る場合に、前記ウェイト数設定レジスタを前記複数のそ
れぞれの外部デバイスに対応させて複数具備し、前記初
期設定時が、前記それぞれの外部デバイスからの最初の
データの読み出し時を含むものである。
A wait cycle control device according to a third aspect of the present invention is the wait cycle control device according to the first or second aspect, wherein when a plurality of external devices are connected, the wait number setting registers are set to the plurality of wait number setting registers. A plurality of them are provided corresponding to the respective external devices, and the initial setting time includes the reading time of the first data from the respective external devices.

【0011】請求項3記載のウェイトサイクル制御装置
によれば、それぞれの外部デバイスからの最初のデータ
の読み出し時に、それぞれの外部デバイスに対する最適
なウェイトサイクル数がそれぞれのウェイト数設定レジ
スタに自動的に設定されるので、以降のそれぞれの外部
デバイスのアクセスにおいて最適な性能を得ることがで
きる。
According to the wait cycle control device of the third aspect, the optimum wait cycle number for each external device is automatically set in each wait number setting register when the first data is read from each external device. Since it is set, optimum performance can be obtained in subsequent access to each external device.

【0012】本発明の請求項4に係るウェイトサイクル
制御装置は、請求項1から3のうちいずれか一項記載の
ウェイトサイクル制御装置において、この装置の動作周
波数を制御する割り込み機能を有する場合に、前記初期
設定時が、前記動作周波数を制御する割り込みの発生時
を含むものである。
A wait cycle control device according to a fourth aspect of the present invention is the wait cycle control device according to any one of the first to third aspects, wherein the wait cycle control device has an interrupt function for controlling an operating frequency of the device. The initial setting includes the occurrence of an interrupt that controls the operating frequency.

【0013】請求項4記載のウェイトサイクル制御装置
によれば、動作中にクロック周波数が変更になる場合で
も、これを要求する割り込み信号に応じて外部デバイス
からのデータの読み出しを行うことにより、外部デバイ
スからのデータの読み出しに必要なウェイトサイクル数
をサイクル数カウンタを用いて計測し、この値をウェイ
ト数設定レジスタに設定することで、最適なウェイトサ
イクル数が自動的に設定されるので、変更された動作ク
ロック周波数に応じて常に最適化されるシステムを構築
することができる。
According to the wait cycle control device of the fourth aspect, even if the clock frequency is changed during operation, the data is read from the external device according to the interrupt signal requesting the change, so that the external device Measure the number of wait cycles required to read data from the device using the cycle number counter, and set this value in the wait number setting register to automatically set the optimum number of wait cycles. It is possible to build a system that is always optimized according to the selected operating clock frequency.

【0014】本発明の請求項5に係るウェイトサイクル
制御方法は、ウェイトサイクルを用いて外部デバイスか
らのデータの読み出しタイミングを制御する装置におい
て、初期設定時に、前記外部デバイスからのデータの読
み出し開始時点から前記データが確定する時点までに要
するクロックサイクル数をカウントし、前記カウントさ
れたクロックサイクル数を前記外部デバイスからのデー
タの読み出しに対するウェイトサイクル数として設定す
るものである。
In a wait cycle control method according to a fifth aspect of the present invention, in a device for controlling the timing of reading data from an external device by using a wait cycle, at the time of initial setting, the point of starting the reading of data from the external device is started. To counting the number of clock cycles required until the data is determined, and setting the counted number of clock cycles as the number of wait cycles for reading data from the external device.

【0015】請求項5記載のウェイトサイクル制御方法
によれば、初期設定時に、外部デバイスからのデータの
読み出しに必要なウェイトサイクル数を計測し、この値
を外部デバイスからのデータの読み出しに対するウェイ
トサイクル数として設定することにより、外部デバイス
の変更等によりアクセスサイクルを変更したい場合にも
最適なウェイトサイクル数を自動的に設定することがで
きるので、プログラムを書き換える必要が無くなる。
According to the wait cycle control method of the fifth aspect, the number of wait cycles required for reading data from the external device is measured at the time of initialization, and this value is used as the wait cycle for reading data from the external device. By setting the number as a number, it is possible to automatically set the optimum number of wait cycles even when it is desired to change the access cycle due to the change of the external device, so that it is not necessary to rewrite the program.

【0016】本発明の請求項6に係るウェイトサイクル
制御方法は、請求項5記載のウェイトサイクル制御方法
において、前記初期設定時が、前記外部デバイスからの
最初のデータの読み出し時を含むものである。
A wait cycle control method according to a sixth aspect of the present invention is the wait cycle control method according to the fifth aspect, wherein the initial setting time includes a first data read time from the external device.

【0017】請求項6記載のウェイトサイクル制御方法
によれば、外部デバイスからの最初のデータの読み出し
時に、この外部デバイスに対する最適なウェイトサイク
ル数が自動的に設定されるので、以降の外部デバイスの
アクセスにおいて最適な性能を得ることができる。
According to the wait cycle control method of the sixth aspect, when the first data is read from the external device, the optimum number of wait cycles for this external device is automatically set. Optimal performance can be obtained in access.

【0018】本発明の請求項7に係るウェイトサイクル
制御方法は、請求項5または6記載のウェイトサイクル
制御方法において、複数の外部デバイスが接続されてい
る場合に、前記初期設定時が、前記複数の外部デバイス
のそれぞれからの最初のデータの読み出し時を含み、前
記複数のデバイスのそれぞれに対応させてそれぞれのウ
ェイト数を設定するものである。
A wait cycle control method according to a seventh aspect of the present invention is the wait cycle control method according to the fifth or sixth aspect, wherein when a plurality of external devices are connected, the initialization time is the plurality of times. The number of waits is set corresponding to each of the plurality of devices including the time of reading the first data from each of the external devices.

【0019】請求項7記載のウェイトサイクル制御方法
によれば、それぞれの外部デバイスからの最初のデータ
の読み出し時に、それぞれの外部デバイスに対する最適
なウェイトサイクル数が自動的に設定されるので、以降
のそれぞれの外部デバイスのアクセスにおいて最適な性
能を得ることができる。
According to the wait cycle control method of the seventh aspect, the optimum number of wait cycles for each external device is automatically set when the first data is read from each external device. Optimal performance can be obtained in accessing each external device.

【0020】本発明の請求項8に係るウェイトサイクル
制御方法は、請求項5から7のうちいずれか一項記載の
ウェイトサイクル制御方法において、ウェイトサイクル
を用いて外部デバイスからのデータの読み出しタイミン
グを制御する装置が、その装置自身の動作周波数を制御
する割り込み機能を有する場合に、前記初期設定時は、
前記動作周波数を制御する割り込みの発生時を含むもの
である。
A wait cycle control method according to an eighth aspect of the present invention is the wait cycle control method according to any one of the fifth to seventh aspects, in which a wait cycle is used to read data from an external device. When the device to be controlled has an interrupt function for controlling the operating frequency of the device itself, at the time of the initial setting,
This includes the occurrence of an interrupt that controls the operating frequency.

【0021】請求項8記載のウェイトサイクル制御方法
によれば、動作中にクロック周波数が変更になる場合で
も、これを要求する割り込み信号に応じて外部デバイス
からのデータの読み出しを行うことにより、外部デバイ
スからのデータの読み出しに必要なウェイトサイクル数
を計測し、この値をウェイトサイクル数として設定する
ことで、最適なウェイトサイクル数が自動的に設定され
るので、動作中にクロック周波数に応じて常に最適化さ
れるシステムを構築することができる。
According to the wait cycle control method of the eighth aspect, even if the clock frequency is changed during operation, the data is read from the external device according to the interrupt signal requesting the change, so that the external device By measuring the number of wait cycles required to read data from the device and setting this value as the number of wait cycles, the optimum number of wait cycles is automatically set, so depending on the clock frequency during operation. It is possible to build a system that is always optimized.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。 (実施の形態1)図1は本発明の実施の形態1に係るウ
ェイトサイクル制御装置の構成を示すブロック図であ
る。図1において、101はCPUとROMを内蔵する
マイクロコンピュータ、102はCPU、103はRO
M、104はデータアクノリッジ信号を持たない外部デ
バイス、105はサイクル数カウンタ、106はウェイ
ト数設定レジスタである。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. (Embodiment 1) FIG. 1 is a block diagram showing a configuration of a wait cycle control device according to Embodiment 1 of the present invention. In FIG. 1, 101 is a microcomputer incorporating a CPU and ROM, 102 is a CPU, and 103 is an RO.
M and 104 are external devices that do not have a data acknowledge signal, 105 is a cycle number counter, and 106 is a wait number setting register.

【0023】図2は、本発明の実施の形態1に係るウェ
イトサイクル制御装置における外部デバイスのアクセス
制御を説明するタイミング図である。以下、図1および
図2を参照して本実施の形態の動作を説明する。
FIG. 2 is a timing chart for explaining access control of the external device in the wait cycle control device according to the first embodiment of the present invention. The operation of this embodiment will be described below with reference to FIGS. 1 and 2.

【0024】図1のように構成されたウェイトサイクル
制御装置において、マイクロコンピュータ101の起動
時に、CPU102は内蔵ROM103に書かれたプロ
グラムにより外部デバイス104の読み出しを行う。
In the wait cycle control device configured as shown in FIG. 1, when the microcomputer 101 is activated, the CPU 102 reads the external device 104 by the program written in the built-in ROM 103.

【0025】ウェイト数設定レジスタ106には、外部
デバイス104が割り付けられているアドレス空間にお
いて、この外部デバイスからのデータの読み出しに対す
るウェイトサイクル数が設定される。初期リセット後に
は、ウェイト数設定レジスタ106には初期値として十
分大きな値が設定される。
In the wait number setting register 106, the number of wait cycles for reading data from the external device is set in the address space to which the external device 104 is assigned. After the initial reset, a sufficiently large value is set as the initial value in the wait number setting register 106.

【0026】図2において、サイクル数カウンタ105
は、外部デバイスからのデータの読み出し開始時点T0
から、そのデータが“H”または“L”にすべて確定す
る時点T1までに要するクロックサイクル数をカウント
する。読み出しデータの確定が判断された時点T1にお
けるサイクル数カウンタ105の値は、ウェイト数設定
レジスタ106に自動的にロードされ、以降はその最適
化されたウェイトサイクル数でこの外部デバイスをアク
セスするようになる。
In FIG. 2, the cycle number counter 105
Is the start time T0 of reading data from the external device.
From this, the number of clock cycles required until the time T1 when the data are all fixed to "H" or "L" is counted. The value of the cycle number counter 105 at the time point T1 when it is determined that the read data is determined is automatically loaded into the wait number setting register 106, and thereafter, this external device is accessed with the optimized wait cycle number. Become.

【0027】この回路構成は、複数の外部デバイスが接
続されている場合にも同様の構成をとることができる。
その場合は、複数のそれぞれの外部デバイスに対応させ
て複数のウェイト数設定レジスタを設け、それぞれの外
部デバイスからの最初のデータの読み出し時に、その外
部デバイスからのデータの読み出し開始時点からデータ
が確定する時点までに要するクロックサイクル数をカウ
ントし、この値をそれぞれのウェイト数設定レジスタに
設定する。
This circuit configuration can take the same configuration even when a plurality of external devices are connected.
In that case, multiple wait number setting registers are provided corresponding to each external device, and when the first data is read from each external device, the data is fixed from the time when the data is read from that external device. The number of clock cycles required up to the point of time is counted, and this value is set in each wait number setting register.

【0028】以上のように、本実施の形態では、外部デ
バイスからのデータの読み出し開始時点から、読み出し
たデータの値が確定する時点までのサイクル数をカウン
トするサイクル数カウンタ回路105を追加するだけ
で、外部デバイスの能力によらず常に最適なウェイト数
でのアクセスが可能となる。また、外部デバイスの変更
によるウェイト数設定プログラムの変更も不要になり、
ROM変更のためのマスク修正が発生することも無いの
でマスク費用を抑えることができる。
As described above, in this embodiment, only the cycle number counter circuit 105 for counting the number of cycles from the start of reading data from the external device to the time when the value of the read data is fixed is added. Thus, it is possible to always access with the optimum number of waits regardless of the capabilities of the external device. Also, it is no longer necessary to change the wait number setting program by changing the external device,
Since mask correction for ROM change does not occur, mask cost can be suppressed.

【0029】(実施の形態2)図3は本発明の実施の形
態2に係るウェイトサイクル制御装置の構成を示すブロ
ック図である。図3において、301はCPUとROM
を内蔵するマイクロコンピュータ、302はCPU、3
03はROM、304はデータアクノリッジ信号を持た
ない外部デバイス、305はサイクル数カウンタ、30
6はウェイト数設定レジスタ、307はマイクロコンピ
ュータ301に低消費電力モードにすることを要求する
割り込み信号を出力する外部デバイスである。
(Second Embodiment) FIG. 3 is a block diagram showing a configuration of a wait cycle control device according to a second embodiment of the present invention. In FIG. 3, 301 is a CPU and ROM
A microcomputer with a built-in CPU, 302 is a CPU, 3
03 is a ROM, 304 is an external device that does not have a data acknowledge signal, 305 is a cycle number counter, and 30
6 is a wait number setting register, and 307 is an external device that outputs an interrupt signal requesting the microcomputer 301 to enter the low power consumption mode.

【0030】図3における機能ブロック301から30
6は、それぞれ図1における機能ブロック101から1
06に同順に対応し、それぞれ対応する機能ブロックと
同等の役割と機能を有する。外部デバイス307は、マ
イクロコンピュータ301を低消費電力モードにするた
めに、その動作クロック周波数の変更を要求する割り込
み信号出力を備えている。
Functional blocks 301 to 30 in FIG.
6 are functional blocks 101 to 1 in FIG. 1, respectively.
06 in the same order, and each has the same role and function as the corresponding functional block. The external device 307 is provided with an interrupt signal output for requesting a change of its operating clock frequency in order to put the microcomputer 301 into the low power consumption mode.

【0031】CPU302がしばらく処理をする必要が
ない場合は、外部デバイス307が割り込みを発生し、
マイクロコンピュータ301に低消費電力モードに入る
ように要求する。割り込みを受けたCPU302は、ク
ロック周波数を落とし、マイクロコンピュータ301を
低消費電力状態にする。
When the CPU 302 does not need to process for a while, the external device 307 generates an interrupt,
Request the microcomputer 301 to enter the low power consumption mode. The CPU 302 that has received the interrupt lowers the clock frequency and puts the microcomputer 301 into a low power consumption state.

【0032】ROM303に書かれた低消費電力モード
入りを要求する割り込み処理ルーチンには、外部デバイ
ス304の読み出しを行うようなプログラムが含まれて
いる。割り込みに伴う外部デバイス304の読み出しに
おいて、サイクル数カウンタ305は、読み出し開始時
点からデータの値が確定する時点までのサイクル数をカ
ウントする。このカウント値がウェイト数設定レジスタ
306に自動的にロードされ、以降はその最適化された
ウェイトサイクル数でこの外部デバイスをアクセスする
ようになる。
The interrupt processing routine written in the ROM 303 for requesting entry into the low power consumption mode includes a program for reading the external device 304. In the reading of the external device 304 due to the interrupt, the cycle number counter 305 counts the number of cycles from the reading start time to the time when the data value is determined. This count value is automatically loaded into the wait number setting register 306, and thereafter, this external device is accessed with the optimized wait cycle number.

【0033】マイクロコンピュータ301が低消費電力
モードから通常モードに復帰する場合にも、外部デバイ
ス307から動作クロック周波数の変更を要求する割り
込み信号が出力され、同様の処理が行なわれる。その結
果、外部デバイス304に対するウェイサイクル数が瞬
時に最適化される。
Even when the microcomputer 301 returns from the low power consumption mode to the normal mode, the external device 307 outputs an interrupt signal requesting a change of the operation clock frequency, and the same processing is performed. As a result, the number of way cycles for the external device 304 is instantly optimized.

【0034】以上のように、本実施の形態では、外部デ
バイスからのデータの読み出し開始時点から読み出した
データの値が確定するまでのサイクル数をカウントする
サイクル数カウンタ305を備えたマイクロコンピュー
タと、低消費電力モード要求割り込みを発生する外部デ
バイス207とを含むシステムを構成することで、動作
クロック周波数が切り換わった場合にもウェイトサイク
ル数が常に最適化され、プログラムを書き換えることな
くCPUの処理速度が常に最適化されるシステムを構築
することができる。
As described above, in this embodiment, the microcomputer provided with the cycle number counter 305 for counting the number of cycles from the start of reading the data from the external device to the establishment of the value of the read data, By configuring the system including the external device 207 that generates the low power consumption mode request interrupt, the number of wait cycles is always optimized even when the operating clock frequency is switched, and the processing speed of the CPU can be improved without rewriting the program. It is possible to build a system that is always optimized.

【0035】[0035]

【発明の効果】以上説明したように、本発明によれば、
若干の回路を追加するだけで、外部デバイスに対するア
クセスサイクル数を変更したい場合に、最適なウェイト
サイクル数が自動的に設定されるので、プログラムを書
き換える必要が無くなり、外部デバイスの能力によらず
同一ROMを使用することが可能となる。また、動作中
にクロック周波数が変更になる場合にも、常にCPUの
処理速度が最適化されるシステムを構築することが可能
となる。
As described above, according to the present invention,
When you want to change the number of access cycles to an external device by adding a few circuits, the optimum number of wait cycles is automatically set, so there is no need to rewrite the program, and the same number is maintained regardless of the capabilities of the external device. It becomes possible to use the ROM. Further, it is possible to construct a system in which the processing speed of the CPU is always optimized even when the clock frequency is changed during operation.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施の形態1に係るウェイトサイクル
制御装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a wait cycle control device according to a first embodiment of the present invention.

【図2】本発明の実施の形態1に係るウェイトサイクル
制御装置における外部デバイスのアクセス制御を説明す
るタイミング図である。
FIG. 2 is a timing diagram illustrating access control of an external device in the wait cycle control device according to the first embodiment of the present invention.

【図3】本発明の実施の形態2に係るウェイトサイクル
制御装置の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a wait cycle control device according to a second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

101、301 マイクロコンピュータ 102、302 CPU 103、303 ROM 104、304 外部デバイス 105、305 サイクル数カウンタ 106、306 ウェイト数設定レジスタ 307 動作クロック周波数の変更要求割り込みを出力
する外部デバイス
101, 301 Microcomputer 102, 302 CPU 103, 303 ROM 104, 304 External device 105, 305 Cycle number counter 106, 306 Wait number setting register 307 External device that outputs operation clock frequency change request interrupt

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B033 AA10 BC02 BF02 5B060 CC02 5B061 BA02 CC09 RR03 SS03 5B077 GG05 GG22 GG25 GG32 MM02   ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 5B033 AA10 BC02 BF02                 5B060 CC02                 5B061 BA02 CC09 RR03 SS03                 5B077 GG05 GG22 GG25 GG32 MM02

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 ウェイトサイクルを用いて外部デバイス
からのデータの読み出しタイミングを制御する装置にお
いて、 前記外部デバイスからのデータの読み出し開始時点から
前記データが確定する時点までに要するクロックサイク
ル数をカウントするサイクル数カウンタと、 前記外部デバイスからのデータの読み出しに対するウェ
イトサイクル数を設定するウェイト数設定レジスタと、
を具備し、 初期設定時に前記外部デバイスからのデータの読み出し
に際して得られたサイクル数カウンタの値を前記ウェイ
ト数設定レジスタに設定することを特徴とするウェイト
サイクル制御装置。
1. An apparatus for controlling a timing of reading data from an external device by using a wait cycle, wherein the number of clock cycles required from the start of reading data from the external device to the time when the data is determined is counted. A cycle number counter, a wait number setting register for setting the number of wait cycles for reading data from the external device,
A wait cycle control apparatus comprising: a wait number setting register, wherein a value of a cycle number counter obtained at the time of reading data from the external device at the time of initial setting is set in the wait number setting register.
【請求項2】 前記初期設定時が、前記外部デバイスか
らの最初のデータの読み出し時を含むことを特徴とする
請求項1記載のウェイトサイクル制御装置。
2. The wait cycle control device according to claim 1, wherein the initial setting time includes a first data read time from the external device.
【請求項3】 複数の外部デバイスが接続されている場
合に、前記ウェイト数設定レジスタを前記複数のそれぞ
れの外部デバイスに対応させて複数具備し、前記初期設
定時が、前記それぞれの外部デバイスからの最初のデー
タの読み出し時を含むことを特徴とする請求項1または
2記載のウェイトサイクル制御装置。
3. When a plurality of external devices are connected, the plurality of wait number setting registers are provided in correspondence with the plurality of respective external devices, and at the time of the initial setting, the respective external devices are connected to each other. 3. The wait cycle control device according to claim 1, further comprising the time of reading the first data of the above.
【請求項4】 前記ウェイトサイクルを用いて外部デバ
イスからのデータの読み出しタイミングを制御する装置
の動作周波数を制御する割り込み機能を有する場合に、
前記初期設定時が、前記動作周波数を制御する割り込み
の発生時を含むことを特徴とする請求項1から3のうち
いずれか一項記載のウェイトサイクル制御装置。
4. When an interrupt function for controlling an operating frequency of an apparatus for controlling a timing of reading data from an external device using the wait cycle is provided,
4. The wait cycle control device according to claim 1, wherein the initialization time includes the occurrence of an interrupt that controls the operating frequency.
【請求項5】 ウェイトサイクルを用いて外部デバイス
からのデータの読み出しタイミングを制御する装置にお
いて、 初期設定時に、前記外部デバイスからのデータの読み出
し開始時点から前記データが確定する時点までに要する
クロックサイクル数をカウントし、前記カウントされた
クロックサイクル数を前記外部デバイスからのデータの
読み出しに対するウェイトサイクル数として設定するこ
とを特徴とするウェイトサイクル制御方法。
5. An apparatus for controlling a timing of reading data from an external device using a wait cycle, wherein a clock cycle required from a start time of reading data from the external device to a time point at which the data is determined at initialization. A wait cycle control method, wherein the number of clock cycles is counted and the counted number of clock cycles is set as the number of wait cycles for reading data from the external device.
【請求項6】 前記初期設定時が、前記外部デバイスか
らの最初のデータの読み出し時を含むことを特徴とする
請求項5記載のウェイトサイクル制御方法。
6. The wait cycle control method according to claim 5, wherein the initial setting time includes a first data read time from the external device.
【請求項7】 複数の外部デバイスが接続されている場
合に、前記初期設定時は、前記複数の外部デバイスのそ
れぞれからの最初のデータの読み出し時を含み、前記複
数のデバイスのそれぞれに対応させてそれぞれのウェイ
ト数を設定することを特徴とする請求項5または6記載
のウェイトサイクル制御方法。
7. When a plurality of external devices are connected, the initial setting includes reading of first data from each of the plurality of external devices, and corresponding to each of the plurality of devices. 7. The wait cycle control method according to claim 5 or 6, characterized in that the number of waits is set respectively.
【請求項8】 前記ウェイトサイクルを用いて外部デバ
イスからのデータの読み出しタイミングを制御する装置
の動作周波数を制御する割り込み機能を有する場合に、
前記初期設定時が、前記動作周波数を制御する割り込み
の発生時を含むことを特徴とする請求項5から7のうち
いずれか一項記載のウェイトサイクル制御方法。
8. An interrupt function for controlling an operating frequency of an apparatus for controlling a timing of reading data from an external device using the wait cycle,
8. The wait cycle control method according to claim 5, wherein the initialization time includes the occurrence of an interrupt that controls the operating frequency.
JP2001224482A 2001-07-25 2001-07-25 Wait cycle control device and wait cycle control method Pending JP2003036241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001224482A JP2003036241A (en) 2001-07-25 2001-07-25 Wait cycle control device and wait cycle control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001224482A JP2003036241A (en) 2001-07-25 2001-07-25 Wait cycle control device and wait cycle control method

Publications (1)

Publication Number Publication Date
JP2003036241A true JP2003036241A (en) 2003-02-07

Family

ID=19057630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001224482A Pending JP2003036241A (en) 2001-07-25 2001-07-25 Wait cycle control device and wait cycle control method

Country Status (1)

Country Link
JP (1) JP2003036241A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140093531A (en) * 2013-01-18 2014-07-28 삼성전자주식회사 Method for processing dynamic frequency scaling and integrated circuit adopting the same
JP2015070954A (en) * 2013-10-03 2015-04-16 株式会社エルイーテック Wait insertion to processor
WO2023155165A1 (en) * 2022-02-18 2023-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for performing periodic task

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140093531A (en) * 2013-01-18 2014-07-28 삼성전자주식회사 Method for processing dynamic frequency scaling and integrated circuit adopting the same
KR102083499B1 (en) * 2013-01-18 2020-03-02 삼성전자 주식회사 Method for processing dynamic frequency scaling and integrated circuit adopting the same
JP2015070954A (en) * 2013-10-03 2015-04-16 株式会社エルイーテック Wait insertion to processor
WO2023155165A1 (en) * 2022-02-18 2023-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for performing periodic task

Similar Documents

Publication Publication Date Title
TWI679539B (en) Master-slave system, command execution method and data access method
US8531893B2 (en) Semiconductor device and data processor
JP2822986B2 (en) Single chip microcomputer with DMA
US20020138156A1 (en) System of connecting multiple processors in cascade
JP2004054766A (en) Information processor
CN111782027B (en) DDR memory operation frequency adjusting method and device
KR100395383B1 (en) Data transfer apparatus
JP2003036241A (en) Wait cycle control device and wait cycle control method
KR20010014927A (en) Microcomputer and memory access control method
JP3153078B2 (en) Data processing device
JP4416575B2 (en) Memory control method and memory control device
JP2005242929A (en) Accessing method for shared memory and data processor
JPH07146814A (en) Memory device
JP2002073533A (en) Data processor
JP3016812B2 (en) Wait cycle controller
JP2005078483A (en) Fifo memory controller and controlling method of fifo memory device
JPH08328898A (en) User space access method and emulator
JPH0830551A (en) Wait control system
JP4062478B2 (en) Device access method
JP2004178115A (en) Data transfer unit
JP2000293482A (en) Computer system and display control method therefor
JP2002108489A (en) Data processor
JPH06274406A (en) Memory wait generating circuit
JPH04361311A (en) Single chip microcomputer
JPH1091431A (en) Data processor