JPH07160629A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH07160629A
JPH07160629A JP35532593A JP35532593A JPH07160629A JP H07160629 A JPH07160629 A JP H07160629A JP 35532593 A JP35532593 A JP 35532593A JP 35532593 A JP35532593 A JP 35532593A JP H07160629 A JPH07160629 A JP H07160629A
Authority
JP
Japan
Prior art keywords
address
peripheral device
clocks
idle
status
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.)
Granted
Application number
JP35532593A
Other languages
Japanese (ja)
Other versions
JP2666717B2 (en
Inventor
Koji Kishibe
浩司 岸部
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP5355325A priority Critical patent/JP2666717B2/en
Publication of JPH07160629A publication Critical patent/JPH07160629A/en
Application granted granted Critical
Publication of JP2666717B2 publication Critical patent/JP2666717B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To provide a microprocessor which can set the optimum recovery time according to the peripheral device to be accessed. CONSTITUTION:A microprocessor has a function to insert the idel status for recovery time and is provided with a recovery time setting register 105 which can change the number of clocks of the idle status, an address holding register 107 which holds the I/O address of the precedent access, a comparator 109 which compares an I/O address with the one held in the register 107, a counter circuit 103 which counts the value equal to the,number of clocks of the set idle status when the coincidence is decided by the comparator 109 between both I/O addresses, and a flip-flop 119 which outputs the waist signals for the next access in a period when an access is started to a peripheral device and the circuit 103 counts the value equal to the number of clocks of the idle status.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサに
関し、特に、周辺装置へのアクセスの際に、バスサイク
ルにリカバリ時間用のサイクル(アイドルステータス)
を自動的に挿入する機能を有するマイクロプロセッサに
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor, and more particularly to a cycle for a recovery time (idle status) in a bus cycle when accessing a peripheral device.
The present invention relates to a microprocessor having a function of automatically inserting

【0002】[0002]

【従来の技術】プロセッサから同一の周辺装置に対して
連続してアクセスする場合には、そのアクセス毎にバス
サイクルにリカバリ時間用の間隔を挿入する必要があ
る。従来、ハードウェアの設計を簡単にするために、I
/Oアクセスの際にバスサイクルに常に数クロックのリ
カバリ時間用のアイドルステータスを自動的に挿入する
構成がとられていた。
2. Description of the Related Art When a processor continuously accesses the same peripheral device, it is necessary to insert a recovery time interval in a bus cycle for each access. Conventionally, in order to simplify the hardware design, I
A configuration has been adopted in which an idle status for a recovery time of several clocks is automatically inserted in the bus cycle at the time of / O access.

【0003】図5は、上述したアイドルステータスを自
動的に挿入する機能を備えたマイクロプロセッサの構成
を示すブロック図である。中央演算装置401には、カ
ウンタ回路403、ゼロ検出回路405及びフリップフ
ロップ407が接続されている。中央演算装置401か
らは、周辺装置にI/Oアクセスした時にI/Oアクセ
スしたことを示すステータス信号402が出力される。
このステータス信号402は、カウンタ回路403とフ
リップフロップ407のセット入力に入力されている。
ステータス信号402が出力されると、カウンタ回路4
03のカウント値が初期化され、かつフリップフロップ
407がセットされる。
FIG. 5 is a block diagram showing a structure of a microprocessor having a function of automatically inserting the above-mentioned idle status. A counter circuit 403, a zero detection circuit 405, and a flip-flop 407 are connected to the central processing unit 401. The central processing unit 401 outputs a status signal 402 indicating that I / O access is made when the peripheral device is I / O accessed.
The status signal 402 is input to the set inputs of the counter circuit 403 and the flip-flop 407.
When the status signal 402 is output, the counter circuit 4
The count value of 03 is initialized and the flip-flop 407 is set.

【0004】カウンタ回路403から出力されるカウン
ト値404がゼロ検出回路405に入力されている。ゼ
ロ検出回路405では、カウンタ回路403からのカウ
ント値404がゼロになったことを検出して、ゼロを検
出した際に出力406をアクティブにする。また、その
ゼロ検出回路405の出力406は、フリップフロップ
407のリセット入力に入力されている。
The count value 404 output from the counter circuit 403 is input to the zero detection circuit 405. The zero detection circuit 405 detects that the count value 404 from the counter circuit 403 has become zero, and activates the output 406 when zero is detected. The output 406 of the zero detection circuit 405 is input to the reset input of the flip-flop 407.

【0005】フリップフロップ407からは中央演算装
置401に対してウエイト要求信号408が出力されて
いる。このウエイト要求信号408は、ステータス信号
402が出力されてからゼロ検出回路405の出力40
6がアクティブとなるまでの間アクティブとなる。そし
て、ウエイト要求信号408がアクティブである場合
に、中央演算装置401がバスサイクルに所定クロック
数のアイドルステータスを挿入する。
A wait request signal 408 is output from the flip-flop 407 to the central processing unit 401. This wait request signal 408 is output 40 of the zero detection circuit 405 after the status signal 402 is output.
It becomes active until 6 becomes active. Then, when the wait request signal 408 is active, the central processing unit 401 inserts an idle status of a predetermined number of clocks into the bus cycle.

【0006】上記したマイクロプロセッサにおいて、I
/Oアクセスの際のアイドルステータスの挿入動作例を
図6のタイミングチャートに示す。なお、図6の例で
は、カウンタ回路403の初期値を”2”にセットした
場合を、すなわち、2クロック分のアイドルステータス
を挿入するように設定した場合を示している。
In the above microprocessor, I
An example of idle status insertion operation at the time of / O access is shown in the timing chart of FIG. Note that the example of FIG. 6 shows a case where the initial value of the counter circuit 403 is set to “2”, that is, a case where the idle status for two clocks is set to be inserted.

【0007】中央演算装置401がI/Oアクセスする
ことにより、ステータス信号402がローになると、そ
の立ち下がりでカウンタ回路403が初期化されて”
2”がセットされ、ダウンカウントが開始される。ま
た、フリップフロップ407がセットされてウエイト要
求信号408がアクティブとなり、中央演算装置401
ではウエイト処理が行なわれる。
When the status signal 402 becomes low due to the I / O access of the central processing unit 401, the counter circuit 403 is initialized at the fall of the status signal 402.
2 "is set and the down count is started. Further, the flip-flop 407 is set and the wait request signal 408 becomes active, and the central processing unit 401 is activated.
Then, the weight processing is performed.

【0008】ウエイト要求信号408のアクティブ状態
は、カウンタ回路403のカウント値404がゼロとな
り、ゼロ検出回路406の出力406でフリップフロッ
プ407がリセットされるまで続く。そして、ウエイト
要求信号408のアクティブの場合に、中央演算装置4
01によってバスサイクルT2の次にアイドルステータ
スTiが2クロック分挿入される。以上により、I/O
アクセスの度に、カウンタ回路403にセットされたク
ロック数だけ、アイドルステータスが自動的に挿入され
るようになる。
The active state of the wait request signal 408 continues until the count value 404 of the counter circuit 403 becomes zero and the flip-flop 407 is reset by the output 406 of the zero detection circuit 406. When the weight request signal 408 is active, the central processing unit 4
By 01, the idle status Ti for two clocks is inserted after the bus cycle T2. From the above, I / O
Each time access is made, the idle status is automatically inserted by the number of clocks set in the counter circuit 403.

【0009】[0009]

【発明が解決しようとする課題】上述したように従来の
マイクロプロセッサでは、カウンタ回路に設定されたア
イドルステータスのクロック数分のリカバリ時間として
使用されるが、リカバリ時間は動作周波数に依存してい
るため、高速で動作させる場合は、リカバリ時間が短く
なり、低速動作の場合はリカバリ時間が長くなる。高速
で動作させる場合に、低速のI/Oでも使用できるよう
に、挿入するアイドルステータスの数を大きく設定する
と、低速で動作させた場合に、リカバリ時間が不必要に
長くなり、システムの性能がダウンしてしまう。
As described above, in the conventional microprocessor, it is used as the recovery time corresponding to the number of idle status clocks set in the counter circuit, but the recovery time depends on the operating frequency. Therefore, when operating at high speed, the recovery time becomes short, and when operating at low speed, the recovery time becomes long. If the number of idle statuses to be inserted is set to be large so that it can be used even with low-speed I / O when operating at high speed, the recovery time becomes unnecessarily long when operating at low speed, and the system performance is increased. It goes down.

【0010】他方、挿入されるアイドルステータスの数
を小さく設定すると、高速で動作させた場合に、リカバ
リ時間が短くなるため、低速のI/Oが要求するリカバ
リ時間を満足できなくなる。その場合には、コストのか
かる高速のI/Oを使用しなければならない。
On the other hand, if the number of inserted idle statuses is set to be small, the recovery time becomes short when operated at a high speed, so that the recovery time required by the low speed I / O cannot be satisfied. In that case, costly and fast I / O must be used.

【0011】また、リカバリ時間は、同一のI/Oに対
して連続的にアクセスする場合に必要となるものであ
り、あるI/Oをアクセスしていて次に異なるI/Oを
アクセスする場合には、リカバリ時間が不要であるが、
従来の構成では、異なるI/Oにアクセスを切り換える
場合でも自動的にアイドルステータスが挿入されてしま
い、全体的にシステムの性能をダウンさせていた。
The recovery time is necessary when the same I / O is continuously accessed. When a certain I / O is accessed and then a different I / O is accessed next. Requires no recovery time,
In the conventional configuration, the idle status is automatically inserted even when the access is switched to a different I / O, and the overall system performance is reduced.

【0012】本発明は、このような従来の課題を解決す
るためになされたものであり、アクセスする周辺装置に
応じて最適なクロック数(リカバリ時間)を設定するこ
とにより、システムの能力向上を図ると共に、あるI/
Oから異なるI/Oにアクセスを切り換える場合に、不
必要なアイドルステータスの挿入をなくしてシステム性
能のダウンを回避することができるマイクロプロセッサ
を提供することを目的とする。
The present invention has been made to solve such a conventional problem, and improves the system performance by setting an optimum number of clocks (recovery time) according to the peripheral device to be accessed. Along with trying, I /
An object of the present invention is to provide a microprocessor capable of avoiding a reduction in system performance by eliminating unnecessary insertion of idle status when switching access from O to a different I / O.

【0013】また、本発明の他の目的は、複数のI/O
毎に最適なリカバリ時間の設定を可能として、I/Oの
性能を最大限に発揮させ、システムの能力向上を実現す
ることができるマイクロプロセッサを提供することにあ
る。
Another object of the present invention is to provide a plurality of I / Os.
An object of the present invention is to provide a microprocessor capable of setting an optimum recovery time for each, maximizing the I / O performance, and improving the system capability.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するた
め、本発明では、外部の周辺装置へのアクセスの際に、
バスサイクルに自動的にリカバリ時間用のアイドルステ
ータスを挿入する機能を有するマイクロプロセッサにお
いて、前記バスサイクルに挿入する前記アイドルステー
タスのクロック数を変更可能に格納するアイドルステー
ト格納手段と、前回のアクセスした前記周辺装置のI/
Oアドレスを保持するアドレス保持手段と、前記周辺装
置へのアクセス時に、前記周辺装置のI/Oアドレスを
前記アドレス保持手段に保持されたI/Oアドレスと比
較する比較手段と、前記比較手段による比較の結果、前
記I/Oアドレスが同じ場合に、前記アイドルステート
格納手段に格納された前記アイドルステータスのクロッ
ク数だけカウントを行なうカウント手段と、前記周辺装
置へのアクセス開始から前記カウント手段が前記アイド
ルステートのクロック数だけカウントするまでの間、前
記周辺装置に対する次のアクセスを待ち合わせるウエイ
ト信号を出力する手段とを備える構成としている。
In order to achieve the above-mentioned object, according to the present invention, when an external peripheral device is accessed,
In a microprocessor having a function of automatically inserting an idle status for a recovery time in a bus cycle, idle state storage means for storing the number of clocks of the idle status to be inserted in the bus cycle in a changeable manner, and a previous access I / of the peripheral device
An address holding means for holding an O address, a comparing means for comparing the I / O address of the peripheral device with the I / O address held in the address holding means when the peripheral device is accessed, and the comparing means. As a result of the comparison, when the I / O addresses are the same, the counting means counts the number of clocks of the idle status stored in the idle state storage means, and the counting means operates from the start of access to the peripheral device. A means for outputting a wait signal for waiting for the next access to the peripheral device until counting the number of clocks in the idle state is provided.

【0015】他の好ましい態様では、前記アイドルステ
ート格納手段が、複数の前記周辺装置に対応する複数の
I/Oアドレスと、複数のI/Oアドレス毎に挿入する
前記アイドルステータスのクロック数を格納し、前記周
辺装置へのアクセス時に、前記I/Oアドレスと対応す
る前記アイドルステータスのクロック数を前記アイドル
ステート格納手段から読み出して前記カウント手段でカ
ウントする構成としている。
In another preferred aspect, the idle state storage means stores a plurality of I / O addresses corresponding to a plurality of the peripheral devices and the number of idle status clocks to be inserted for each of the plurality of I / O addresses. However, at the time of accessing the peripheral device, the clock number of the idle status corresponding to the I / O address is read from the idle state storage means and counted by the counting means.

【0016】また、本発明は、外部の周辺装置へのアク
セスの際に、バスサイクルに自動的にリカバリ時間用の
アイドルステータスを挿入する機能を有するマイクロプ
ロセッサにおいて、前記バスサイクルに挿入する前記ア
イドルステータスのクロック数を変更可能に格納するア
イドルステート格納手段と、前回のアクセスした前記周
辺装置のI/Oアドレスを保持するアドレス保持手段
と、前記周辺装置へのアクセス時に、前記周辺装置のI
/Oアドレスを前記アドレス保持手段に保持されたI/
Oアドレスと比較する比較手段と、前記比較手段による
比較の結果、前記I/Oアドレスが同じ場合に、前記ア
イドルステート格納手段に格納された前記アイドルステ
ータスのクロック数をダウンカウントするカウント手段
と、前記周辺装置へのアクセス開始から前記カウント手
段によるカウント値がゼロになるまでの間、前記周辺装
置に対する次のアクセスを待ち合わせるウエイト信号を
出力する手段とを備える構成としている。
Further, according to the present invention, in a microprocessor having a function of automatically inserting an idle status for a recovery time into a bus cycle when accessing an external peripheral device, the idle inserted into the bus cycle. Idle state storage means for changingably storing the number of status clocks, address holding means for holding the I / O address of the previously accessed peripheral device, and I of the peripheral device at the time of access to the peripheral device.
I / O address held in the address holding means
Comparing means for comparing with the O address, and counting means for down-counting the number of clocks of the idle status stored in the idle state storing means when the I / O address is the same as a result of the comparison by the comparing means. From the start of access to the peripheral device until the count value by the counting means becomes zero, there is provided means for outputting a wait signal for waiting for the next access to the peripheral device.

【0017】また、好ましい態様では、前記カウント手
段に対する設定値としてゼロを格納するゼロ格納手段
と、前記比較手段による比較の結果、前記I/Oアドレ
スが同じ場合に、前記アイドルステート格納手段に格納
された値を、前記I/Oアドレスが異なる場合に、前記
ゼロ格納手段の値を選択的に前記カウント手段に設定す
る選択手段を備える構成としている。
Further, in a preferred mode, when the zero storage means for storing zero as a set value for the counting means and the I / O address are the same as a result of the comparison by the comparison means, they are stored in the idle state storage means. If the I / O address is different, the selected value is selectively set in the counting means as the value in the zero storage means.

【0018】また、好ましい態様では、前記カウント手
段のカウント値がゼロになったことを検出し、前記ウエ
イト信号出力手段に対し前記ウエイト信号の出力を停止
させるゼロ検出手段を備える構成としている。
Further, in a preferred mode, a zero detection means for detecting that the count value of the counting means has become zero and stopping the output of the weight signal to the weight signal output means is provided.

【0019】さらにまた、他の好ましい態様では、前記
アイドルステート格納手段が、複数の前記周辺装置に対
応する複数のI/Oアドレスと、複数のI/Oアドレス
毎に挿入する前記アイドルステータスのクロック数を格
納し、前記周辺装置へのアクセス時に、前記I/Oアド
レスと対応する前記アイドルステータスのクロック数を
前記アイドルステート格納手段から読み出して前記カウ
ント手段でカウントする構成としている。
Further, in another preferred aspect, the idle state storage means inserts a plurality of I / O addresses corresponding to the plurality of peripheral devices and a clock of the idle status inserted for each of the plurality of I / O addresses. A number is stored, and when the peripheral device is accessed, the clock number of the idle status corresponding to the I / O address is read from the idle state storage means and counted by the counting means.

【0020】[0020]

【作用】本発明では、I/Oアクセスが行なわれると、
比較手段によりアドレス保持手段の値である前回のバス
サイクルでアクセスされたI/Oアドレスと、現在アク
セスしようとしているI/Oアドレスとが比較される。
I/Oアドレスがが一致すると、アイドルステート格納
手段の値がカウンタ手段にセットされる。同時に、ウエ
イト信号出力手段からウエイト信号が出力され、次のア
クセスを待ち合わせるウエイト処理が行なわれる。ま
た、カウンタ手段はカウントを開始する。カウンタ手段
がアイドルステートのクロック数をカウントすると、ウ
エイト信号が解除される。そして、ウエイト信号が出力
されている間、バスサイクルにアイドルステータスが挿
入される。比較手段の比較結果が不一致の場合、カウン
タ手段によるカウントは行なわれず、アイドルステータ
スは挿入されない。
In the present invention, when an I / O access is made,
The comparing means compares the I / O address accessed in the previous bus cycle, which is the value of the address holding means, with the I / O address currently to be accessed.
When the I / O addresses match, the value of the idle state storage means is set in the counter means. At the same time, a wait signal is output from the wait signal output means, and wait processing for waiting for the next access is performed. Also, the counter means starts counting. When the counter means counts the number of clocks in the idle state, the wait signal is released. Then, while the wait signal is being output, the idle status is inserted in the bus cycle. When the comparison result of the comparison means does not match, the counter means does not count and the idle status is not inserted.

【0021】[0021]

【実施例】以下、本発明の実施例について図面を参照し
て詳細に説明する。図1は、本発明の第1の実施例によ
るマイクロプロセッサの構成を示すブロック図である。
図1において、本実施例のマイクロプロセッサは、中央
演算装置101、カウンタ回路103、リカバリ時間設
定用レジスタ105、アドレス保持レジスタ107、比
較器109、ゼロレジスタ110、セレクタ112、ゼ
ロ検出回路117、フリップフロップ119によって構
成されている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a microprocessor according to the first embodiment of the present invention.
In FIG. 1, the microprocessor of this embodiment includes a central processing unit 101, a counter circuit 103, a recovery time setting register 105, an address holding register 107, a comparator 109, a zero register 110, a selector 112, a zero detection circuit 117, a flip-flop 117. 119.

【0022】中央演算装置101からは、周辺装置にI
/Oアクセスした時にI/Oアクセスしたことを示すス
テータス信号102が出力される。このステータス信号
102は、カウンタ回路103とフリップフロップ11
9のセット入力に入力されている。ステータス信号10
2が出力されると、カウンタ回路403に対するカウン
ト値の設定され、かつフリップフロップ119がセット
される。
From the central processing unit 101, I
When the I / O access is made, the status signal 102 indicating that the I / O access is made is output. The status signal 102 is generated by the counter circuit 103 and the flip-flop 11.
It is input to the set input of 9. Status signal 10
When 2 is output, the count value for the counter circuit 403 is set and the flip-flop 119 is set.

【0023】中央演算装置101のデータバス104
は、リカバリ時間設定用レジスタ105に接続されてい
る。中央演算装置101のアドレスバス106は、アド
レス保持レジスタ107及び比較器109に接続されて
いる。リカバリ時間設定用レジスタ105には、中央演
算装置101からデータバス104を介してアイドルス
テータスのクロック数が格納される。
Data bus 104 of central processing unit 101
Is connected to the recovery time setting register 105. The address bus 106 of the central processing unit 101 is connected to the address holding register 107 and the comparator 109. The recovery time setting register 105 stores the number of idle status clocks from the central processing unit 101 via the data bus 104.

【0024】このリカバリ時間設定用レジスタ105に
格納されるアイドルステータスのクロック数は、中央演
算装置101がアクセスする周辺装置毎に、周辺装置の
性能に応じて任意の値を設定することが可能である。カ
ウンタ回路103には、上記リカバリ時間設定用レジス
タ105の設定値が読み出されてカウント値として設定
される。このリカバリ時間設定用レジスタ105の出力
113は、セレクタ112に入力される。
The number of idle status clocks stored in the recovery time setting register 105 can be set to an arbitrary value according to the performance of the peripheral device for each peripheral device accessed by the central processing unit 101. is there. The set value of the recovery time setting register 105 is read out to the counter circuit 103 and set as a count value. The output 113 of the recovery time setting register 105 is input to the selector 112.

【0025】アドレス保持レジスタ107には、中央演
算装置101により前回アクセスした周辺装置のI/O
アドレスがアドレスバス106を介して格納されてい
る。すなわち、前回のバスサイクルでアクセスされたI
/Oアドレスが保持される。アドレス保持レジスタ10
7の出力108は、比較器109に入力されている。
The address holding register 107 stores the I / O of the peripheral device previously accessed by the central processing unit 101.
The address is stored via the address bus 106. That is, the I accessed in the previous bus cycle
/ O address is held. Address holding register 10
The output 108 of No. 7 is input to the comparator 109.

【0026】比較器9は、周辺装置へのアクセスが発生
した時に、アクセスされたI/Oアドレスと、アドレス
保持レジスタ107に格納された前回のI/Oアドレス
を比較する。ゼロレジスタ110は、値ゼロを格納する
レジスタである。このゼロレジスタ110の出力111
は、セレクタ112に入力される。
When an access to the peripheral device occurs, the comparator 9 compares the accessed I / O address with the previous I / O address stored in the address holding register 107. The zero register 110 is a register that stores the value zero. The output 111 of this zero register 110
Is input to the selector 112.

【0027】また、セレクタ112のゲート入力には、
比較器109の出力である比較信号114が入力されて
いる。セレクタ112は、比較信号114に応じて、リ
カバリ時間設定用レジスタ105またはゼロレジスタ1
10の値を選択して読み出し、出力115として上記カ
ウンタ回路103にセットする。
The gate input of the selector 112 is
The comparison signal 114 which is the output of the comparator 109 is input. The selector 112 receives the recovery time setting register 105 or the zero register 1 according to the comparison signal 114.
The value of 10 is selected and read out and set as the output 115 in the counter circuit 103.

【0028】カウンタ回路103の出力であるカウント
値116は、ゼロ検出回路117に入力される。このゼ
ロ検出回路117は、カウンタ103のカウント値がゼ
ロになったかどうかを検出して、ゼロを検出した時にそ
の出力118をアクティブにする。
The count value 116, which is the output of the counter circuit 103, is input to the zero detection circuit 117. The zero detection circuit 117 detects whether or not the count value of the counter 103 has become zero, and when the zero is detected, activates its output 118.

【0029】ゼロ検出回路117の出力118は、フリ
ップフロップ119のリセット入力に入力されている。
フリップフロップ119からは中央演算装置101に対
してウエイト要求信号120が出力されている。そし
て、ウエイト要求信号120がアクティブである場合
に、中央演算装置101がバスサイクルに所定クロック
数のアイドルステータスを挿入する。
The output 118 of the zero detection circuit 117 is input to the reset input of the flip-flop 119.
A weight request signal 120 is output from the flip-flop 119 to the central processing unit 101. Then, when the wait request signal 120 is active, the central processing unit 101 inserts an idle status of a predetermined number of clocks into the bus cycle.

【0030】上記本実施例のマイクロプロセッサにおい
て、I/Oアクセスの際のアイドルステータスの挿入動
作を図2のタイミングチャートに基づいて説明する。な
お、図2の例では、リカバリ時間設定用レジスタ105
には、値”2”が設定されている場合、すなわち、2ク
ロック分のアイドルステータスを挿入するように設定し
た場合を示している。このリカバリ時間設定用レジスタ
105の値は、任意に変更することができることは言う
までもない。
The idle status insertion operation at the time of I / O access in the microprocessor of this embodiment will be described with reference to the timing chart of FIG. In the example of FIG. 2, the recovery time setting register 105
Indicates that the value "2" is set, that is, the idle status for two clocks is set to be inserted. It goes without saying that the value of the recovery time setting register 105 can be arbitrarily changed.

【0031】まず、リカバリ時間設定用レジスタ105
には、データバス104を介して中央演算装置101に
より所定の値が書き込まれる。また、アドレス保持レジ
スタ107には、前回のバスサイクルでアクセスされた
I/Oアドレスが格納されている。ここで、説明上、ア
ドレス保持レジスタ107にI/Oアドレス0100h
が格納されているものとする。
First, the recovery time setting register 105
A predetermined value is written to the central processing unit 101 via the data bus 104. Further, the address holding register 107 stores the I / O address accessed in the previous bus cycle. Here, for the sake of explanation, the I / O address 0100h has
Is stored.

【0032】中央演算装置401によるI/Oアクセス
が行なわれると、比較器109によりアドレス保持レジ
スタ107の値である前回のバスサイクルでアクセスさ
れたI/Oアドレスと、アドレスバス106上の値、す
なわち現在アクセスしようとしているI/Oアドレスと
が比較される。
When I / O access is performed by the central processing unit 401, the I / O address accessed by the comparator 109 in the previous bus cycle, which is the value of the address holding register 107, and the value on the address bus 106, That is, the I / O address currently being accessed is compared.

【0033】この場合、アドレスバス106のI/Oア
ドレスが0100hであり、アドレス保持レジスタ10
7の値と一致するので、比較器109から一致を示す比
較信号114(”ロー”)がセレクタ112に入力さ
れ、これによりセレクタ112はリカバリ時間設定用レ
ジスタ105の出力113を選択する。これにより、カ
ウンタ回路103には、中央演算装置101からのステ
ータス信号102の立ち下がりエッジでリカバリ時間設
定用レジスタ105の値”2”が書き込まれてセットさ
れる。
In this case, the I / O address of the address bus 106 is 0100h, and the address holding register 10
7, the comparison signal 114 (“low”) indicating the coincidence is input from the comparator 109 to the selector 112, which causes the selector 112 to select the output 113 of the recovery time setting register 105. As a result, the value “2” of the recovery time setting register 105 is written and set in the counter circuit 103 at the falling edge of the status signal 102 from the central processing unit 101.

【0034】同時に、中央演算装置101からのステー
タス信号102によってフリップフロップ119がセッ
トされ、ウエイト要求信号120が”ハイ”になる。こ
れにより、中央演算装置101から周辺装置に対する次
のアクセスを待ち合わせるウエイト処理が行なわれる。
At the same time, the status signal 102 from the central processing unit 101 sets the flip-flop 119, and the wait request signal 120 becomes "high". As a result, a wait process for waiting for the next access from the central processing unit 101 to the peripheral device is performed.

【0035】また、カウンタ回路103はダウンカウン
トを開始する。カウンタ回路103のカウント値116
が”0”になった時点で、ゼロ検出回路117が”0”
を検出し、ゼロ検出回路117の出力118が”ハイ”
になる。これにより、フリップフロップ119がリセッ
トされてウエイト要求信号120が”ロー”となり、ウ
エイトが解除される。
The counter circuit 103 also starts down counting. Count value 116 of the counter circuit 103
When the value becomes "0", the zero detection circuit 117 becomes "0".
Is detected, the output 118 of the zero detection circuit 117 is "high".
become. As a result, the flip-flop 119 is reset, the wait request signal 120 becomes "low", and the wait is released.

【0036】ウエイト要求信号120の”ハイ”状態
は、カウンタ回路103のカウント値116が”0”と
なり、フリップフロップ119がリセットされるまで続
く。そして、ウエイト要求信号120が”ハイ”の間、
中央演算装置101によってバスサイクルT2の次にア
イドルステータスTiが2クロック分挿入される。よっ
て、リカバリ時間設定用レジスタ105の値だけ、バス
サイクルが延長されている。
The "high" state of the wait request signal 120 continues until the count value 116 of the counter circuit 103 becomes "0" and the flip-flop 119 is reset. Then, while the wait request signal 120 is "high",
The central processing unit 101 inserts the idle status Ti for two clocks after the bus cycle T2. Therefore, the bus cycle is extended by the value of the recovery time setting register 105.

【0037】次のバスサイクルでI/Oアドレス(01
02h)がアクセスされると、アクセスされるI/Oア
ドレス(0102h)が、前回のI/Oアドレス(01
00h)と異なるので、比較器109の比較結果は不一
致となり、比較器109から不一致を示す比較信号11
4(”ハイ”)がセレクタ112に入力され、これによ
りセレクタ112はゼロレジスタ110の出力111を
選択する。
In the next bus cycle, the I / O address (01
02h) is accessed, the I / O address (0102h) accessed is the previous I / O address (01
00h), the comparison result of the comparator 109 does not match, and the comparison signal 11 indicating the mismatch is output from the comparator 109.
4 (“high”) is input to the selector 112, which causes the selector 112 to select the output 111 of the zero register 110.

【0038】これにより、カウンタ回路103には、中
央演算装置101からのステータス信号102の立ち下
がりエッジでゼロレジスタ110の値”0”が書き込ま
れてセットされる。
As a result, the value "0" of the zero register 110 is written and set in the counter circuit 103 at the falling edge of the status signal 102 from the central processing unit 101.

【0039】この場合、カウンタ回路103の値が始め
から”0”であるので、カウントは行なわれず、かつ中
央演算装置101からのステータス信号102によって
セットされたフリップフロップ119は、ゼロ検出回路
117の出力118によってすぐにリセットされる。従
って、アイドルステータスは挿入されず、次のアクセス
が行なわれる。さらに、その次のバスサイクルではI/
Oアドレス(0102h)がアクセスされているので、
上述したと同様に、リカバリ時間設定用レジスタ105
の値だけ、バスサイクルが延長されている。
In this case, since the value of the counter circuit 103 is "0" from the beginning, counting is not performed, and the flip-flop 119 set by the status signal 102 from the central processing unit 101 causes the zero detection circuit 117 to operate. Immediately reset by output 118. Therefore, the idle status is not inserted and the next access is performed. Furthermore, in the next bus cycle, I /
Since the O address (0102h) is being accessed,
Similarly to the above, the recovery time setting register 105
The bus cycle is extended by the value of.

【0040】図3に本発明の第2の実施例によるマイク
ロプロセッサの構成を示す。ここでは、図1に示す第1
の実施例と同じ構成要素については、共通の符号を付し
ている。従って、共通の符号を付した構成に関する説明
は省略する。
FIG. 3 shows the configuration of a microprocessor according to the second embodiment of the present invention. Here, the first shown in FIG.
The same components as those in the embodiment of FIG. Therefore, the description of the components denoted by the common reference numerals is omitted.

【0041】本実施例のリカバリ時間設定用レジスタ3
05には、データバス104とアドレスバス106が接
続されている。このリカバリ時間設定用レジスタ305
には、複数のI/Oアドレスと、そのI/Oアドレスで
指定される周辺機器毎のリカバリ時間(アイドルスター
タスのクロック数)が設定格納されている。このリカバ
リ時間設定用レジスタ305に設定される内容の例を図
4に示す。図4に示すように、異なる複数のI/Oアド
レス毎に、リカバリ時間が設定されている。
Recovery time setting register 3 of this embodiment
A data bus 104 and an address bus 106 are connected to 05. This recovery time setting register 305
In the table, a plurality of I / O addresses and recovery times (clock numbers of idle status) for each peripheral device designated by the I / O addresses are set and stored. FIG. 4 shows an example of contents set in the recovery time setting register 305. As shown in FIG. 4, a recovery time is set for each of a plurality of different I / O addresses.

【0042】このようなリカバリ時間設定用レジスタ3
05を備えることにより、セレクタ112によって値が
読み出される場合に、アドレスバス106で指定される
I/Oアドレスに該当するI/Oアドレスに割り振られ
たリカバリ時間をカウンタ回路103に設定することが
できる。
Such a recovery time setting register 3
By including 05, the recovery time allocated to the I / O address corresponding to the I / O address specified by the address bus 106 can be set in the counter circuit 103 when the value is read by the selector 112. .

【0043】従って、異なるリカバリ時間を持つI/O
(周辺機器)を複数使用している場合に、それぞれのI
/Oに最適のリカバリ時間が選択されるようになり、シ
ステムの性能が向上する。第2の実施例のI/Oアクセ
スの際のアイドルステータスの挿入動作については、I
/Oアドレス毎のリカバリ時間が設定される点を除き、
図1及び図2に示した第1実施例の動作と同じであるの
で説明は省略する。
Therefore, I / Os having different recovery times
When multiple (peripheral devices) are used, each I
The optimum recovery time is selected for / O, and the system performance is improved. Regarding the insertion operation of the idle status at the time of I / O access of the second embodiment, I
Except that the recovery time is set for each / O address
Since the operation is the same as that of the first embodiment shown in FIGS. 1 and 2, description thereof will be omitted.

【0044】以上好ましい実施例をあげて本発明を説明
したが、本発明は必ずしも上記実施例に限定されるもの
ではない。例えば、実施例では、カウンタ回路103で
リカバリ時間をダウンカウントする例を示したが、リカ
バリ時間の値までアップカウントするように構成するこ
とも可能である。その場合、ゼロ検出回路117の代わ
りに、カウンタ回路103のカウント値がリカバリ時間
設定値と同じになったことを検出し、フリップフロップ
119をリセットする検出回路を設ける。
Although the present invention has been described with reference to the preferred embodiments, the present invention is not necessarily limited to the above embodiments. For example, in the embodiment, the example in which the recovery time is down-counted by the counter circuit 103 is shown, but it is also possible to up-count to the value of the recovery time. In that case, instead of the zero detection circuit 117, a detection circuit that detects that the count value of the counter circuit 103 becomes equal to the recovery time set value and resets the flip-flop 119 is provided.

【0045】[0045]

【発明の効果】以上説明したように本発明のマイクロプ
ロセッサによれば、周辺装置へのアクセスの際に挿入す
るアイドルステータスのクロック数を可変としたので、
アクセスする周辺装置に応じて最適なクロック数(リカ
バリ時間)を設定することができるようになり、システ
ムの能力向上を図ることができる。また、あるI/Oか
ら異なるI/Oにアクセスを切り換える場合には、リカ
バリ時間用のアイドルステータスを挿入しないようにし
たので、不必要なアイドルステータスの挿入によるシス
テム性能のダウンをなくすことができる。
As described above, according to the microprocessor of the present invention, the number of idle status clocks to be inserted when the peripheral device is accessed is variable.
The optimum number of clocks (recovery time) can be set according to the peripheral device to be accessed, and the system capability can be improved. Further, when the access is switched from one I / O to another I / O, the idle status for the recovery time is not inserted, so that the system performance can be prevented from being lowered by the unnecessary insertion of the idle status. .

【0046】また、複数のI/O毎に最適なリカバリ時
間を格納し、アクセスされた毎にリカバリ時間を切り換
えるようにしたので、アクセスされたI/Oに最適なリ
カバリ時間の設定が行なえる。従って、I/Oの性能を
最大限に発揮させることが可能となり、システムの能力
向上を実現することができる。
Further, since the optimum recovery time is stored for each of a plurality of I / Os and the recovery time is switched every time it is accessed, the optimum recovery time can be set for the accessed I / O. . Therefore, it is possible to maximize the I / O performance, and it is possible to improve the system capability.

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

【図1】 本発明の第1の実施例によるマイクロプロセ
ッサの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a microprocessor according to a first embodiment of the present invention.

【図2】 図1のマイクロプロセッサにおけるI/Oア
クセスの際のアイドルステータスの挿入動作を示すタイ
ミングチャートである。
2 is a timing chart showing an idle status insertion operation at the time of I / O access in the microprocessor of FIG. 1. FIG.

【図3】 本発明の第2の実施例によるマイクロプロセ
ッサの構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a microprocessor according to a second embodiment of the present invention.

【図4】 リカバリ時間設定用レジスタの設定内容の例
を示す図である。
FIG. 4 is a diagram showing an example of setting contents of a recovery time setting register.

【図5】 従来のマイクロプロセッサの一例を示すブロ
ック図である。
FIG. 5 is a block diagram showing an example of a conventional microprocessor.

【図6】 図5に示す従来のマイクロプロセッサにおけ
るI/Oアクセスの際のアイドルステータスの挿入動作
を示すタイミングチャートである。
6 is a timing chart showing an idle status insertion operation at the time of I / O access in the conventional microprocessor shown in FIG.

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

101 中央演算装置 102 ステータス信号 103 カウンタ回路 104 データバス 105,305 リカバリ時間設定用レジスタ 106 アドレスバス 107 アドレス保持レジスタ 109 比較器 110 ゼロレジスタ 112 セレクタ 117 ゼロ検出回路 119 フリップフロップ 120 ウエイト要求信号 101 Central Processing Unit 102 Status Signal 103 Counter Circuit 104 Data Bus 105, 305 Recovery Time Setting Register 106 Address Bus 107 Address Holding Register 109 Comparator 110 Zero Register 112 Selector 117 Zero Detection Circuit 119 Flip Flop 120 Wait Request Signal

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 外部の周辺装置へのアクセスの際に、バ
スサイクルに自動的にリカバリ時間用のアイドルステー
タスを挿入する機能を有するマイクロプロセッサにおい
て、 前記バスサイクルに挿入する前記アイドルステータスの
クロック数を変更可能に格納するアイドルステート格納
手段と、 前回のアクセスした前記周辺装置のI/Oアドレスを保
持するアドレス保持手段と、 前記周辺装置へのアクセス時に、前記周辺装置のI/O
アドレスを前記アドレス保持手段に保持されたI/Oア
ドレスと比較する比較手段と、 前記比較手段による比較の結果、前記I/Oアドレスが
同じ場合に、前記アイドルステート格納手段に格納され
た前記アイドルステータスのクロック数だけカウントを
行なうカウント手段と、 前記周辺装置へのアクセス開始から前記カウント手段が
前記アイドルステートのクロック数だけカウントするま
での間、前記周辺装置に対する次のアクセスを待ち合わ
せるウエイト信号を出力する手段とを備えることを特徴
とするマイクロプロセッサ。
1. A microprocessor having a function of automatically inserting an idle status for a recovery time into a bus cycle when accessing an external peripheral device, wherein the number of clocks of the idle status to be inserted into the bus cycle Of the peripheral device that has been accessed last time, and an I / O of the peripheral device at the time of accessing the peripheral device.
Comparing means for comparing the address with the I / O address held in the address holding means; and the idle stored in the idle state storing means when the I / O address is the same as a result of the comparison by the comparing means. Counting means for counting the number of status clocks, and a wait signal for waiting for the next access to the peripheral device from the start of access to the peripheral device until the counting means counts the number of clocks in the idle state A microprocessor comprising:
【請求項2】 前記アイドルステート格納手段が、複数
の前記周辺装置に対応する複数のI/Oアドレスと、複
数のI/Oアドレス毎に挿入する前記アイドルステータ
スのクロック数を格納し、 前記周辺装置へのアクセス時に、前記I/Oアドレスと
対応する前記アイドルステータスのクロック数を前記ア
イドルステート格納手段から読み出して前記カウント手
段でカウントすることを特徴とする請求項1に記載のマ
イクロプロセッサ。
2. The idle state storage means stores a plurality of I / O addresses corresponding to a plurality of the peripheral devices and the number of idle status clocks to be inserted for each of the plurality of I / O addresses, 2. The microprocessor according to claim 1, wherein the number of clocks of the idle status corresponding to the I / O address is read from the idle state storage means and counted by the counting means when the device is accessed.
【請求項3】 外部の周辺装置へのアクセスの際に、バ
スサイクルに自動的にリカバリ時間用のアイドルステー
タスを挿入する機能を有するマイクロプロセッサにおい
て、 前記バスサイクルに挿入する前記アイドルステータスの
クロック数を変更可能に格納するアイドルステート格納
手段と、 前回のアクセスした前記周辺装置のI/Oアドレスを保
持するアドレス保持手段と、 前記周辺装置へのアクセス時に、前記周辺装置のI/O
アドレスを前記アドレス保持手段に保持されたI/Oア
ドレスと比較する比較手段と、 前記比較手段による比較の結果、前記I/Oアドレスが
同じ場合に、前記アイドルステート格納手段に格納され
た前記アイドルステータスのクロック数をダウンカウン
トするカウント手段と、 前記周辺装置へのアクセス開始から前記カウント手段に
よるカウント値がゼロになるまでの間、前記周辺装置に
対する次のアクセスを待ち合わせるウエイト信号を出力
する手段とを備えることを特徴とするマイクロプロセッ
サ。
3. A microprocessor having a function of automatically inserting an idle status for a recovery time into a bus cycle when accessing an external peripheral device, wherein the number of clocks of the idle status to be inserted into the bus cycle Of the peripheral device that has been accessed last time, and an I / O of the peripheral device at the time of accessing the peripheral device.
Comparing means for comparing the address with the I / O address held in the address holding means; and the idle stored in the idle state storing means when the I / O address is the same as a result of the comparison by the comparing means. Counting means for down-counting the number of status clocks; and means for outputting a wait signal for waiting for the next access to the peripheral device from the start of access to the peripheral device until the count value by the counting means becomes zero. A microprocessor comprising:
【請求項4】 前記カウント手段に対する設定値として
ゼロを格納するゼロ格納手段と、 前記比較手段による比較の結果、前記I/Oアドレスが
同じ場合に、前記アイドルステート格納手段に格納され
た値を、前記I/Oアドレスが異なる場合に、前記ゼロ
格納手段の値を選択的に前記カウント手段に設定する選
択手段を備えることを特徴とする請求項3に記載のマイ
クロプロセッサ。
4. A value stored in the idle state storage means when the I / O address is the same as a result of comparison by the zero storage means for storing zero as a set value for the counting means. 4. The microprocessor according to claim 3, further comprising selection means for selectively setting the value of the zero storage means in the count means when the I / O addresses are different.
【請求項5】 前記カウント手段のカウント値がゼロに
なったことを検出し、前記ウエイト信号出力手段に対し
前記ウエイト信号の出力を停止させるゼロ検出手段を備
えることを特徴とする請求項3または請求項4に記載の
マイクロプロセッサ。
5. The zero detection means for detecting that the count value of the counting means has become zero and stopping the output of the weight signal to the weight signal output means is provided. The microprocessor according to claim 4.
【請求項6】 前記アイドルステート格納手段が、複数
の前記周辺装置に対応する複数のI/Oアドレスと、複
数のI/Oアドレス毎に挿入する前記アイドルステータ
スのクロック数を格納し、 前記周辺装置へのアクセス時に、前記I/Oアドレスと
対応する前記アイドルステータスのクロック数を前記ア
イドルステート格納手段から読み出して前記カウント手
段でカウントすることを特徴とする請求項3に記載のマ
イクロプロセッサ。
6. The idle state storage means stores a plurality of I / O addresses corresponding to a plurality of the peripheral devices and the number of idle status clocks to be inserted for each of the plurality of I / O addresses, 4. The microprocessor according to claim 3, wherein the number of clocks of the idle status corresponding to the I / O address is read from the idle state storage means and counted by the counting means when the device is accessed.
JP5355325A 1993-12-10 1993-12-10 Microprocessor Expired - Fee Related JP2666717B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5355325A JP2666717B2 (en) 1993-12-10 1993-12-10 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5355325A JP2666717B2 (en) 1993-12-10 1993-12-10 Microprocessor

Publications (2)

Publication Number Publication Date
JPH07160629A true JPH07160629A (en) 1995-06-23
JP2666717B2 JP2666717B2 (en) 1997-10-22

Family

ID=18443277

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5355325A Expired - Fee Related JP2666717B2 (en) 1993-12-10 1993-12-10 Microprocessor

Country Status (1)

Country Link
JP (1) JP2666717B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5644919A (en) * 1979-09-21 1981-04-24 Canon Inc Control board
JPH02302864A (en) * 1989-05-18 1990-12-14 Toshiba Corp Input/output controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5644919A (en) * 1979-09-21 1981-04-24 Canon Inc Control board
JPH02302864A (en) * 1989-05-18 1990-12-14 Toshiba Corp Input/output controller

Also Published As

Publication number Publication date
JP2666717B2 (en) 1997-10-22

Similar Documents

Publication Publication Date Title
US6829660B2 (en) Supercharge message exchanger
EP1345125B1 (en) Dynamic random access memory system with bank conflict avoidance feature
US5551054A (en) Page mode buffer controller for transferring Nb byte pages between a host and buffer memory without interruption except for refresh
JPH07160629A (en) Microprocessor
US5916311A (en) Bus controller and information processing device providing reduced idle cycle time during synchronization
US5304855A (en) Bi-level pulse accumulator
EP0462622B1 (en) Microprocessor capable of ensuring flexible recovery time for I/O device
US7124288B2 (en) Programmable unit with a stack buffer storage device configurable into discrete shadow storage elements accessible by a plurality of command execution units
JPH0581042A (en) Priority control circuit
JP3205992B2 (en) Direct memory access transfer controller
EP0335502A2 (en) Microcontroller and associated method
JPS63180153A (en) Line-back control system for cache memory
JP4062478B2 (en) Device access method
JPH08272775A (en) Vector processor
JPH06103026A (en) Memory system
JPH07146814A (en) Memory device
JPH05120030A (en) Interruption controller
JPH0285951A (en) Input/output bus cycle control system
JPH10224410A (en) Data transfer system
JP2002244919A (en) Dram interface circuit
JPH01209556A (en) Data processing system
JP2000010908A (en) Dma controller
JPH04205028A (en) Programmable weight signal generator
EP0517358A1 (en) Bus cycle control means
JPH0744491A (en) Contention arbitration device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees