JP3669616B2 - Microcomputer and data processing system - Google Patents

Microcomputer and data processing system Download PDF

Info

Publication number
JP3669616B2
JP3669616B2 JP30386597A JP30386597A JP3669616B2 JP 3669616 B2 JP3669616 B2 JP 3669616B2 JP 30386597 A JP30386597 A JP 30386597A JP 30386597 A JP30386597 A JP 30386597A JP 3669616 B2 JP3669616 B2 JP 3669616B2
Authority
JP
Japan
Prior art keywords
address
bus
data
address signal
data transfer
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.)
Expired - Fee Related
Application number
JP30386597A
Other languages
Japanese (ja)
Other versions
JPH11143826A (en
Inventor
由紀 宮道
裕 ▲吉▼田
典夫 中川
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP30386597A priority Critical patent/JP3669616B2/en
Publication of JPH11143826A publication Critical patent/JPH11143826A/en
Application granted granted Critical
Publication of JP3669616B2 publication Critical patent/JP3669616B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、バス上でのデータ競合回避のためのアイドルウェイトサイクルの挿入技術に関し、例えばDMAC(Direct Memory Access Controller:ダイレクトメモリアクセスコントローラ)を有するマイクロコンピュータ、特にそのバスステートコントローラに適用して有効な技術に関するものである。
【0002】
【従来の技術】
マイクロコンピュータによるデータ転送若しくはアクセス対象とされるデバイスは、その回路構成に応じて、データ入力又は出力動作が確定するまでに要する時間に差が有る。マイクロコンピュータによるバスアクセス動作のバスサイクル数(バスアクセス動作用の同期クロック信号のサイクル数)の基準に対して、動作速度の遅いデバイスには、内部ウェイトサイクルを挿入して、遅いデバイスが入力動作又は出力動作を確定するまでバスサイクル動作を維持させることができる。
【0003】
近年、マイクロコンピュータシステムの外部メモリバスは、動作周波数が著しく高くなってきた。このとき、動作速度の低速なデバイスの場合、その読み出し動作を終了させても、出力回路の高出力インピーダンス状態が達成されるまでに少なからず時間を要する。したがって、低速デバイスから高速メモリバスへのデータ読み出しを完了しても、高速バスサイクルに対して出力動作の完了が間に合わず、バス上で次のアクセスデータと衝突する虞がある。これを防止するために、次のアクセスを起動する際にバス上でデータが衝突する可能性がある場合には、次のアクセスサイクルを起動する前にアイドルウェイトサイクルを挿入して、データの衝突を回避することができる。このような技術について記載された文献の例として、SH2ユーザーズマニュアル(株式会社日立製作所、6年9月発行)の第184頁がある。
【0004】
【発明が解決しようとする課題】
上記文献に代表されるように、従来のバスステートコントローラではアドレスエリア毎に、バスサイクルの内部ウェイト及び前記アイドルウェイトの設定ができるに過ぎなかった。すなわち、マイクロコンピュータは、アドレスの指定を受けてアクセス可能なデバイス(メモリマップドデバイスと記す)とアドレスの指定を受けずにアクセス可能なデバイス(I/Oデバイスと記す)とに対してアクセスを行なうが、従来、アイドルウェイトの設定はメモリマップドデバイスに対してアドレスエリア毎に行なうことができるだけであった。
【0005】
このため、読み出し動作終了後の出力回路の高出力インピーダンス状態の達成が遅れるようなI/Oデバイスに対してメモリマップドデバイスとの間でDMACによるシングルアドレスモードのデータ転送を行なう場合、I/Oデバイスにはアイドルウェイトを設定できないので、必要なアイドルウェイトをメモリデバイスに設定しなければならない。例えばメモリマップドデバイスに必要なアイドルウェイト数が1サイクルであり、I/Oデバイスに必要なアイドルウェイト数が3サイクルである場合、上記シングルアドレスのDMA転送では、メモリマップドデバイスにアイドルウェイト数3を設定しなければならない。これによって、上記シングルアドレスのDMA転送に続けて、別のメモリマップドデバイスのアクセスが行なわれても、データバス上で、当該別のメモリマップドデバイスのアクセスデータと低速な前記I/Oデバイスの出力データとの衝突は回避される。
【0006】
しかしながら、上記シングルアドレスのDMA転送の後、メモリマップドデバイスに対するリード・ライト動作を連続させ、或いは、他のアドレスエリアのメモリマップドデバイスをアクセスする場合に、アイドルウェイトが3サイクル挿入され、本来必要なアイドルウェイト数に対して2サイクル余計なアイドルウェイトが挿入され、メモリマップドデバイスのアクセスが遅くなってしまうということが本発明者によって明らかにされた。
【0007】
本発明の目的はメモリマップドデバイスのアクセスにアイドルウェイトが不所望に挿入されることを防止できるマイクロコンピュータを提供することにある。更に詳しくは、シングルアドレスモードによるダイレクトメモリアクセスの後のメモリマップドデバイスに対するアクセスにアイドルウェイトが不所望に挿入されないにすることにある。
【0008】
本発明の別の目的は、低速なI/Oデバイスと高速なメモリマップドデバイスが混在されるデータ処理システムにおいてメモリマップドデバイスのアクセスが不所望に遅くなるのを防止することにある。
【0009】
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
【0010】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0011】
すなわち、アドレスの指定を受けずにアクセス可能なI/Oデバイスとしての第1デバイス(100)のアクセスに対しては第1アイドルウェイト数(DIW)を、アドレスの指定を受けてアクセス可能なメモリマップドデバイスとしての第2デバイス(200)のアクセスに対しては第2アイドルウェイト数(EIW)を設定可能にし、第1デバイスと第2デバイスとの間のシングルアドレスモードによるデータ転送に続けて第2デバイスをアクセスするときは、その前に前記第1アイドルウェイト数によって規定されるアイドルウェイトサイクルを挿入し、更にその後の第2デバイスに対する連続的なアクセスに際しては第2アイドルウェイト数によって規定されるアイドルウェイトサイクルを挿入する。例えば第2デバイスに必要なアイドルウェイト数が1サイクルであり、第1デバイスに必要なアイドルウェイト数が3サイクルである場合、上記シングルアドレスのダイレクトメモリアクセス転送が終わって第2デバイスのアクセスが開始されるまでに第1アイドルウェイト数によって規定される3サイクルのアイドルウェイトサイクルが挿入されるが、更に続く第2デバイスのアクセスではアイドルウェイトサイクルは第2アイドルウェイト数によって規定され、1サイクルで済む。したがって、従来のように、第2デバイスにしかアイドルウェイト数を設定できない場合に、シングルアドレスモードによるダイレクトメモリアクセスの後に連続する第2デバイスのアクセスが遅くなるという事態を解消することができる。
【0012】
本願発明によるマイクロコンピュータを更に更に詳しく説明すると、第1の観点によるマイクロコンピュータは、アドレスの指定を受けずにアクセス可能な第1デバイスとアドレスの指定を受けてアクセス可能な第2デバイスとの間のシングルアドレスデータ転送が可能なダイレクトメモリアクセス制御手段と、中央処理装置と、前記中央処理装置及び前記ダイレクトメモリアクセス制御手段からの要求に基づいて前記第1デバイスと前記第2デバイスとに対する外部バスアクセス動作を制御可能なバスステートコントローラとを含んで半導体集積回路化されている。そして、前記バスステートコントローラは、前記ダイレクトメモリアクセス制御手段による前記第1デバイスと第2デバイスとの間のシングルアドレスデータ転送の後に前記第1アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入し、前記第2デバイスを前後してアクセスするときアクセスの切り換え時に前記第2アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入する。
【0013】
本発明によるデータ処理システムは、アドレスの指定を受けずにアクセス可能な第1デバイスと、アドレスの指定を受けてアクセス可能な第2デバイスと、前記第1及び第2デバイスにバスで接続されたマイクロコンピュータとを含み、前記マイクロコンピュータは、第1アイドルウェイト数と第2アイドルウェイト数が前記中央処理装置によって設定されるコントロールレジスタ手段を有し、前記第1デバイスと第2デバイスを並列的にアクセスした後、第2デバイスをアクセスするとき当該アクセスを開始する前に前記第1アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入し、前記第2デバイスを前後してアクセスするときアクセスの切り換え時に前記第2アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入する。
【0014】
【発明の実施の形態】
《マイクロコンピュータ》
図2には本発明の一例に係るマイクロコンピュータが示される。同図に示されるマイクロコンピュータ1は、特に制限されないが、単結晶シリコンのようなの1個の半導体基板に集積回路化されて構成される。マイクロコンピュータ1は浮動小数点ユニット(FPUとも称する)2を持つ。更に、マイクロコンピュータ1は、整数を操作することができる中央処理装置(CPUとも称する)3を備える。マイクロコンピュータ1は、特に制限されないが、16ビット固定長命令セットを備えた32ビットRISC(Reduced Instruction Set Computer:縮小命令セットコンピュータ)アーキテクチャを有する。
【0015】
図2において参照符号4で示されるものはアドレス変換・キャッシュユニット(CCN)である。CPU3による命令アクセスとデータアクセスを並列化できるように、アドレス変換・キャッシュユニット4は、命令用の命令アドレス変換バッファ(命令TLBとも称する)40と、データ用のユニファイドアドレス変換バッファ(ユニファイドTLBとも称する)41を別々に持ち、また、命令キャッシュメモリ42とデータキャッシュメモリ43も夫々個別化されている。キャッシュ・アドレス変換バッファコントローラ(キャッシュTLBコントローラとも称する)44はアドレス変換・キャッシュユニット4を全体的に制御する。
【0016】
図2において参照符号5で示されるものはバスステートコントローラであり、32ビットのデータバス50及び29ビットのアドレスバス51を介して前記アドレス変換・キャッシュユニット4に接続されている。このバスステートコントローラ5にはデータバス54及びアドレスバス55を介してDMAC8が接続されている。
【0017】
マイクロコンピュータ1において前記CPU3及びDMAC8がバスマスタモジュールを構成する。マイクロコンピュータ1による外部アクセスは、64ビットのデータバス52及びアドレスバス53を介して前記バスステートコントローラ5に接続された外部バスインタフェース回路(PAD)6で行う。外部バスインタフェース回路6は外部データバス60及び外部アドレスバス61に接続される。
【0018】
マイクロコンピュータ1は、16ビットの周辺データバス56及び周辺アドレスバス57に接続された内蔵周辺回路として、クロックパルスジェネレータ(CPGとも称する)70、割り込み制御回路71、シリアルコミュニケーションインタフェースコントローラ(SCI1,SCI2)72、リアルタイムクロック回路73及びタイマ74を有する。それら周辺回路は前記バスステートコントローラ5を介してCPU3又はDMAC8によってアクセスされる。
【0019】
前記DMAC8は、例えば4個のデータ転送チャネルを有し、各データ転送チャネル毎に、転送元アドレスが設定されるソースアドレスレジスタ、転送先アドレスが設定されるディスティネーションアドレスレジスタ、転送回数を計数するためのトランスファカウントレジスタ、及びデータ転送制御態様等が設定されるチャネルコントロールレジスタを有する。前記レジスタに対するデータ転送制御情報の初期設定はCPU3等が行なう。DMAC8の制御部は、マイクロコンピュータ1の外部からのデータ転送要求DREQ、マイクロコンピュータ内部の周辺回路(タイマ74など)からのデータ転送要求PDREQ、又はCPUからのデータ転送要求があったとき、チャネルコントロールレジスタのチャネルイネーブルビットなどを参照して、そのデータ転送要求に応答して起動すべきデータ転送チャネルが動作可能かを判定する。更に、データ転送要求が競合する場合には予め決められている優先順位に従って、起動すべき一つのデータ転送チャネルを判定する。データ転送要求に応答すべき一つのデータ転送チャネルを決定すると、バスステートコントローラ5に対してバス権要求信号BREQをアサートしてバス権を要求する。バスステートコントローラ5がバス権承認信号BACKをアサートすると、これによってDMAC8はバス権を獲得し、DMAC8は、データ転送要求に応答するデータ転送制御をバスステートコントローラ5を介して行う。バスステートコントローラ5は、DMAC8から供給されるアドレス信号のアドレスエリアなどに応じたメモリサイクル数でバスサイクルを起動する。
【0020】
DMAC8は、デュアルアドレスモードとシングルアドレスモードのデータ転送モードを有する。双方の動作モードは、よく知られているように、デュアルアドレスモードは転送先及び転送元の双方のデバイスにアドレスを指定してデータ転送を行なう動作であり、シングルアドレスモードは転送先又は転送元の一方のデバイスだけアドレス指定を行なってデータ転送を行なう動作である。前者はメモリマップドデバイス同士のデータ転送であり、後者はメモリマップドデバイスとI/Oデバイスとの間のデータ転送である。
【0021】
前記バスステートコントローラ5は、CPU3やDMAC8によるアクセス対象とされる回路のアドレスエリアに応じて、アクセスデータサイズ、アクセスタイム、後述する内部ウェイトステート数及びアイドルウェイトステート数を決定し、周辺バスバス56,57、そして外部バス60,61に対するバスアクセスを制御する。更にバスステートコントローラ5は、キャッシュTLBコントローラ44及びDMAC8からのバス使用要求の競合を調停したりする。バスステートコントローラ5はデータバッファ58を有する。データバッファ58は、内部バス50,51、周辺バス56,57、外部バス60,61に接続される回路の動作速度の差を吸収するために転送データを一時的にラッチする。更に、DMAC8によるデータ転送制御では、DMAC8はデータバッファ58にラッチされたデータを採り込まず、データバッファ58から転送先にデータを転送し、DMAC8とデータバッファ58との間の無駄なデータ転送を省くようにデータ転送を行なう。
【0022】
前記CPU3は、命令をフェッチするとき32ビットの命令アドレスバス30に命令アドレスを出力し、命令データバス31に出力された命令をフェッチする。また、CPU3は、32ビットのデータアドレスバス32にデータアドレスを出力し、32ビットのデータバス33を介してデータのリード(ロード)を行い、32ビットのデータバス34を介してデータのライト(ストア)を行う。前記命令アドレス及びデータアドレスは論理アドレスである。
【0023】
前記FPU2は、特に制限されないが、データキャッシュメモリ42などをアクセスするためのメモリアドレシング能力を備えていない。CPU3がFPU2に代わってデータをアクセスするためのアドレシング動作を行う。これは、FPU2のメモリアドレシング回路の必要性を取り除いてチップ面積を節約するためである。FPU2へのデータのロードは32ビットのデータバス33と32ビットのデータバス35を介して行い、FPU2からのデータのストアは64ビットのデータバス36を介して行う。FPU2からCPU3へのデータ転送は前記64ビットデータバス36の下位32ビットを用いて行われる。
【0024】
CPU3はFPU2のためにデータフェッチを行なうだけでなく、FPU2のための浮動小数点命令を含む全ての命令をフェッチする。CPU3がフェッチした浮動小数点命令は32ビットのデータバス34を介してCPU3からFPU2に与えられる。
【0025】
マイクロコンピュータ1は、特に制限されないが、32ビットの仮想アドレスで規定される仮想アドレス空間と29ビットの物理アドレスで規定される物理アドレス空間を扱う。仮想アドレスを物理アドレスに変換するためのアドレス変換情報は仮想ページ番号とそれに対応される物理ページ番号を含んでいる。アドレス変換テーブルはマイクロコンピュータ1の図示を省略する外部メモリに形成される。図示を省略するアドレス変換テーブルのアドレス変換情報のうち、最近利用されたものが前記命令TLB40とユニファイドTLB41に格納されることになる。その制御は、例えばマイクロコンピュータ1のオペレーティングシステムが行う。
【0026】
前記データ用のユニファイドTLB41はデータ及び命令のアドレス変換情報を最大64エントリ格納する。このユニファイドTLB41は、データフェッチのためにCPU3がデータアドレスバス32に出力する仮想アドレスの仮想ページ番号に応ずる物理ページ番号をアドレス変換情報から連想検索して、その仮想アドレスを物理アドレスに変換する。
【0027】
前記命令用の命令TLB40は命令専用のアドレス変換情報を最大4エントリ格納する。特に命令TLB40が保有するエントリは、ユニファイドTLB41が保有する命令アドレスのアドレス変換情報の一部とされる。すなわち、連想検索により命令TLB40に目的とするアドレス変換情報がないことが分かると、そのアドレス変換情報はユニファイドTLB41から命令TLB40へ供給される。この命令TLB40は、命令フェッチのためにCPU3が命令アドレスバス30に出力する仮想アドレスの仮想ページ番号に応ずる物理ページ番号をアドレス変換情報から連想検索する。検索の結果、目的とするアドレス変換情報がある場合(TLBヒット)、そのアドレス変換情報を用いて、当該仮想アドレスを物理アドレスに変換する。前記検索の結果、目的とするアドレス変換情報がない場合(TLBミス)、前記ユニファイドTLB41から目的とするアドレス変換情報を得るための動作をキャッシュTLBコントローラ44が制御する。
【0028】
前記データキャッシュメモリ43は、データフェッチに際してユニファイドTLB41で変換された物理アドレスを受け取り、これに基づいてキャッシュエントリの連想検索を行う。検索結果がリードヒットであれば、ヒットに係るキャッシュラインからその物理アドレスに応ずるデータがデータバス33又は35に出力される。検索結果がリードミスであれば、ミスに係るデータを含む1キャッシュライン分のデータがバスステートコントローラ5を介して図示を省略する外部メモリから読み込まれて、キャッシュフィルが行われる。これによってキャッシュミスに係るデータが前記バス33又は35に読出される。検索結果がライトヒットした場合、キャッシュ動作モードがコピーバックモードならばヒットしたエントリにデータを書き込み、当該エントリのダーティービットをセットする。セット状態のダーティービットにより外部メモリのデータとの不整合状態が分かり、前記キャッシュフィル動作で当該ダーティーなキャッシュエントリがキャッシュメモリから追い出されるとき、外部メモリへの書き戻しが行われる。ライトスルーモードではヒットしたエントリにデータを書き込むと共に外部メモリへのデータの書込みも併せて行われる。検索結果がライトミスである場合、コピーバックモードならキャッシュフィルを行うと共にダーティービットをセットしてタグアドレスを更新し、フィルを行ったキャッシュラインにデータを書き込む。ライトスルーモードの場合には外部メモリに対してのみ書込みを行う。
【0029】
前記命令キャッシュメモリ42は、命令フェッチに際して命令TLB40で変換された物理アドレスを受け取り、これに基づいてキャッシュエントリの連想検索を行う。検索結果がリードヒットであれば、ヒットに係るキャッシュラインからその物理アドレスに応ずる命令が命令データバス31に出力される。検索結果がリードミスであれば、ミスに係る命令を含む1キャッシュライン分のデータがバスステートコントローラ5を介して図示を省略する外部メモリから読み込まれて、キャッシュフィルが行われる。これによってミスに係る命令が命令データバス31を介してCPU3に与えられる。
【0030】
前記命令TLB40、ユニファイドTLB41及びキャッシュTLBコントローラ44はメモリマネージメントユニットを構成する。このメモリマネージメントユニットは、特権モード及びユーザモードの夫々において、仮想アドレス空間へのアクセス権を設定して、記憶保護を行うことができる。例えばアドレス変換情報は仮想アドレスページ番号毎に保護キーデータを有する。保護キーデータはページのアクセス権をコードで表した2ビットのデータであり、特権モードでのみ読出し可能、特権モードで読出し及び書込み可能、特権及びユーザモードの双方で読み出しのみ可能、そして、特権モード及びユーザモードの双方で読出し及び書込み可能の何れかのアクセス権が設定可能にされる。実際のアクセスタイプが前記保護キーデータで設定されたアクセス権に違反する場合には、TLB保護違反例外が発生される。TLB保護違反例外が発生された場合、例えば、その保護違反を例外処理にて解決した後、例外処理からの復帰命令を実行して、中断された通常処理命令を再実行することになる。
【0031】
《バスステートコントローラ》
図1にはバスステートコントローラ5の詳細な一例が示されている。バスステートコントローラ5は、データバッファ58を介してデータの入出力を行ない、アドレス制御部508からアドレス信号を出力し、ストローブ生成回路507から代表的に示されたデータアクノリッジ信号DACK、エリア選択信号CS、リード信号RD,ライトイネーブル信号WE等のストローブ信号を出力する。前記エリア選択信号CS、リード信号RD,ライトイネーブル信号WE等のストローブ信号は、マイクロコンピュータ1の外部に配置されたメモリなどのメモリマップドデバイスに対するアクセス制御信号とされる。データアクノリッジ信号DACKは、プロトコルコントローラなどのI/Oデバイスに対するデータストローブ信号とされる。例えば、I/Oデバイスがデータ転送要求信号DREQをアサートしたとき、I/Oデバイスはデータアクノリッジ信号DACKのアサートを待ってデータ入力動作又はデータ出力動作を行なう。
【0032】
バスステートコントローラ5は、コントロールレジスタ501に設定された制御データに従ってバスアクセスサイクルを制御する。コントロールレジスタ501は、アクセスデータサイズSZ、エリア内部ウェイト数ITW、エリアアイドルウェイト数EIW等の制御情報の設定領域をアドレスエリア毎に有し、更に、I/Oデバイス毎にデバイスアイドルウェイト数DIEの設定領域を有する。前記コントロールレジスタ501に対する制御情報の設定は、CPU3からCCN4を介して供給されるレジスタアドレスをリクエスト制御部500が判定し、その判定結果に従って、レジスタ制御部503が、データバッファ58を介して供給される制御情報をコントロールレジスタに501に書込むことによって行なわれる。
【0033】
CCN4は前記リクエスト制御部500にリクエスト信号REQをアサートすることによってバスアクセスを要求する。その要求に応じたリードデータがデータバッファ58からCCN4に供給されるとき、或いはその要求に応じたライトデータがデータバッファ58から出力されたとき、リクエスト制御部500はレディー信号RDYをCCN4にアサートする。このとき必要なアドレス情報はバス51を介してリクエスト制御部500に与えられる。
【0034】
DMAC8は前記リクエスト制御部500にバスリクエスト信号BREQをアサートすることによってバスアクセスを要求し、バスアクノリッジ信号BACKによりバス権を獲得した後、バス55などを介してリクエスト制御部500にアドレス情報を等を与える。
【0035】
リクエスト制御部500は、CCN4又はDMAC8から与えられるアドレス情報を解読することによってアクセスエリアを判定し、判定されたアクセスエリアに対応する前記エリアアイドルウェイト数EIW、エリア内部ウェイト数ITW、及びアクセスデータサイズSZなどの格納領域をレジスタ制御部503で選択させ、外部バス制御部504に供給させる。外部バス制御部504は、エリアアイドルウェイト数EIW、エリア内部ウェイト数ITW、及びアクセスデータサイズSZ等に従って、アドレス制御部508からのアドレス出力動作、ストローブ出力生成部507によるストローブ信号CS,RD,WEの出力動作、データ制御部506によるデータバッファ58のデータ出力又は入力動作を制御する。
【0036】
DMAC8で起動されたデータ転送チャネルの動作モードがシングルアドレスモードに指定されているとき、当該動作モードを表す信号520がリクエスト制御部500に与えられ、外部バス制御部504を介してメモリマップドデバイスに対するアドレス指定のバスアクセスサイクルが起動されるとき、ストローブ出力生成回路507にデータアクノリッジ信号DACKをアサートさせる。これによって、DMAC8がシングルアドレスモードでデータ転送を行なうとき、メモリマップドデバイスに対するアドレス指定のアクセスに並行して、データアクノリッジ信号DACKを受けるI/Oデバイスは、入力動作又は出力動作を行なうことができる。
【0037】
ここで、前記デバイスアイドルウェイト数DIW及びエリアアイドルウェイト数EIWに基づいた外部バス制御部504によるバスアクセス制御内容を詳述する。前記信号520でDMAC8によるシングルアドレスモードであることが外部バス制御部504に通知されたとき、外部バス制御部504は、当該シングルアドレスモードによるデータ転送動作を終了した後、続いて次のバスアクセスサイクルの起動が要求されている場合、デバイスアイドルウェイト数DIWで規定されるアイドルウェイトサイクルを挿入した後に、当該次のバスアクセスサイクルを起動する。また、前記シングルアドレスモードによるバスアクセス以外のメモリマップドデバイスに対するバスアクセスサイクルが、同一アドレスエリア内でリード動作からライト動作に切り換えられるとき、アドレスエリアが切り換えられるとき、当該アクセスの切り換え時に前記エリアアイドルウェイト数EIW数で規定されるアイドルウェイトサイクルを挿入して、次のバスアクセスサイクルを開始する。尚、アドレスエリアが切り換えられるときにアイドルウェイトサイクルを挿入するのは、低速デバイスのエリアから高速デバイスのエリアにアクセスエリアが変更されたとき自動的にデータ衝突の虞を回避可能にするためである。
【0038】
次にアイドルウェイトサイクルの挿入動作の一例を説明する。図3には前記マイクロコンピュータ1を用いたデータ処理システムの一例が示される。100で示されるものはI/Oデバイスであり、FIFO(First In First Out:ファースト・イン・ファースト・アウト)バッファ等のように外部からアドレスを指定する必要の無い記憶領域を有し、当該記憶領域がデータバス60にインタフェースされる。このI/Oデバイス100は、例えば、通信用I/O、プロトコルコントロールI/Oなどの半導体デバイスとされる。図3において200で示されるものはメモリマップドデバイスであり、例えば半導体メモリのようなデバイスである。
【0039】
図4にはシングルアドレスモードによるデータ転送(シングルアドレスDMA転送)に続けてメモリマップドデバイスに対するアクセスが続く場合の動作タイミングの一例が示される。図4に示される例では、内部ウェイトサイクルが挿入されないときのバスアクセスサイクルはシステムクロック信号の2サイクル(T1,T2)とされ、内部ウェイトサイクルは挿入されないものとする。
【0040】
先ず、シングルアドレスDMA転送動作のためのバスサイクル(BS1)が起動される。この動作は、メモリマップドデバイス200に対するライト動作と、I/Oデバイス100の出力動作が並行に行なわれる。シングルアドレスDMA転送動作であるから、当該DMA転送後、デバイスアイドルウェイト数DIW(例えば3)で規定されるアイドルウェイトサイクル(I1,I2,I3)IWAIT1が挿入されている。この間、データバス上には、アクセスが終了したにも拘わらず、I/Oデバイス100の出力バッファが高出力インピーダンス状態を確定するのに時間を要し、アイドルウェイトサイクルIWAIT1の期間において、データバス上には不所望なデータが残っている。次のメモリマップドデバイスに対するバスサイクルBS2はアイドルウェイトサイクルIWAIT1の後であるから、バスサイクルBS1終了後のデータと衝突を生じない。
【0041】
バスサイクルBS2はアドレスエリア1のメモリマップドデバイスに対するものであり、その次のバスサイクルBS3はアドレスエリアが変化される。このとき、バスサイクルB2とバスサイクルB3との間には、エリアアイドルウェイト数EIW(例えば1)によって決定されるアイドルウェイトサイクル(I1)IWAIT2が1サイクル挿入される。その次のバスサイクルBS4は直前と同じアドレスエリア2に対するものだから、アクセス動作の切り替わり目にはアイドルウェイトサイクルは挿入されない。
【0042】
図5には、I/Oデバイス100のアイドルウェイト数を設定できずメモリマップドデバイス200のアイドルウェイトで対処する従来のバスステートコントローラにおける動作を比較例として示す。I/Oデバイスに対してメモリマップドデバイスとの間でDMACによるシングルアドレスモードのデータ転送を行なうとき、I/Oデバイスにはアイドルウェイトを設定できないので、必要なアイドルウェイトをメモリマップドデバイスに設定しなければならない。例えば図4の場合と同様に、メモリマップドデバイスに必要なアイドルウェイト数が1サイクルであり、I/Oデバイスに必要なアイドルウェイト数が3サイクルである場合、上記シングルアドレスDMA転送では、メモリマップドデバイスにアイドルウェイト数3を設定しなければならない。これによって、バスサイクルBS1でシングルアドレスDMA転送を行ない、これに続けて、別のメモリマップドデバイスのアクセスが行なわれても(BS2)、データバス上で、当該別のメモリマップドデバイスのアクセスデータと低速な前記I/Oデバイスの出力データとの衝突は回避される。しかしながら、上記シングルアドレスDMA転送の後、メモリマップドデバイスに対するリード・ライト動作を連続させ、或いは、他のアドレスエリアのメモリマップドデバイスをアクセスする場合に、当該バスサイクルBS3の前に、やはり同じくアイドルウェイトが3サイクル挿入され、本来必要なアイドルウェイト数に対して2サイクル余計なアイドルウェイトが挿入される。図4のバスサイクルBS3と図5のバスサイクルBS3を比べればその差は明らかであり、バスステートコントローラ5は、メモリマップドデバイス200のアクセスが遅くなる事態を阻止することができ、外部デバイスのアクセスを高速化することができる。
【0043】
以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。
【0044】
例えば、マイクロコンピュータはアドレス変換機能やキャッシュメモリを備えなくてもよい。また、マイクロコンピュータは周辺回路を搭載していなくてもよい。また、I/Oデバイスに対して入力動作又は出力動作の指示を与える信号はデータアクノリッジ信号に限定されない。
【0045】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
【0046】
すなわち、I/Oデバイスとしての第1デバイスとメモリマップドデバイスとしての第2デバイスの夫々に対してアイドルウェイト数を設定可能にし、シングルアドレスモードによるデータ転送の後には低速のI/Oデバイス固有のアイドルウェートを挿入するが、それに続いてメモリマップドデバイスを連続的にアクセスするときは高速のメモリマップドデバイスに固有のアイドルウェイトサイクルを挿入可能であるから、従来のように、メモリマップドデバイスに対するアクセス時に余計にアイドルウェイトサイクルが挿入されるのを阻止することができる。
【0047】
したがって、低速なI/Oデバイスと高速なメモリマップドデバイスが混在されるデータ処理システムにおいてメモリマップドデバイスのアクセスが不所望に遅くなるのを防止でき、データ処理効率を向上させることができる。
【図面の簡単な説明】
【図1】バスステートコントローラの詳細な一例を示すブロック図である。
【図2】本発明の一例に係るマイクロコンピュータのブロック図である。
【図3】図2のマイクロコンピュータを用いたデータ処理システムの一例を示すブロック図である。
【図4】シングルアドレスDMA転送に続けてメモリマップドデバイスに対するアクセスが続く場合の動作の一例を示すタイミングチャートである。
【図5】I/Oデバイスのアイドルウェイト数を設定できない従来のバスステートコントローラにおいてシングルアドレスDMA転送に続けてメモリマップドデバイスに対するアクセスが続く場合の動作の比較例を示すタイミングチャートである。
【符号の説明】
1 マイクロコンピュータ
3 CPU
4 アドレス変換・キャッシュユニット
5 バスステートコントローラ
6 外部インタフェース回路
8 DMAC
100 I/Oデバイス
200 メモリマップドデバイス
501 コントロールレジスタ
DIW デバイスアイドルウェイト数
EIW エリアアイドルウェイト数
ITW エリア内部ウェイト数
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an idle wait cycle insertion technique for avoiding data contention on a bus, and is effective when applied to, for example, a microcomputer having a DMAC (Direct Memory Access Controller), in particular, a bus state controller thereof. Technology.
[0002]
[Prior art]
Devices that are targets of data transfer or access by a microcomputer have a difference in the time required until the data input or output operation is determined depending on the circuit configuration. The internal wait cycle is inserted into a device with a slow operation speed relative to the standard of the bus cycle number of the bus access operation by the microcomputer (the number of cycles of the synchronous clock signal for the bus access operation), and the slow device inputs the operation. Alternatively, the bus cycle operation can be maintained until the output operation is determined.
[0003]
In recent years, the operating frequency of an external memory bus in a microcomputer system has been remarkably increased. At this time, in the case of a device having a low operating speed, it takes time to achieve a high output impedance state of the output circuit even if the reading operation is terminated. Therefore, even if the data read from the low-speed device to the high-speed memory bus is completed, the output operation may not be completed in time for the high-speed bus cycle, and there is a possibility of colliding with the next access data on the bus. To prevent this, if there is a possibility of data collision on the bus when the next access is started, an idle wait cycle is inserted before starting the next access cycle, and data collision occurs. Can be avoided. An example of a document describing such a technique is page 184 of the SH2 User's Manual (Hitachi, Ltd., issued in September 2006).
[0004]
[Problems to be solved by the invention]
As represented by the above document, the conventional bus state controller can only set the internal wait of the bus cycle and the idle wait for each address area. That is, the microcomputer accesses a device that can be accessed by specifying an address (denoted as a memory mapped device) and a device that can be accessed without receiving an address (denoted as an I / O device). However, conventionally, idle wait setting can only be performed for each address area in a memory mapped device.
[0005]
For this reason, when data transfer in the single address mode by the DMAC is performed with respect to an I / O device in which the achievement of the high output impedance state of the output circuit after the end of the read operation is delayed, with the memory mapped device, Since an idle weight cannot be set for the O device, a necessary idle weight must be set in the memory device. For example, when the number of idle waits required for the memory mapped device is 1 cycle and the number of idle waits required for the I / O device is 3 cycles, the number of idle waits for the memory mapped device is the above-mentioned single address DMA transfer. 3 must be set. Accordingly, even if another memory mapped device is accessed following the DMA transfer of the single address, the access data of the other memory mapped device and the low-speed I / O device are accessed on the data bus. Collisions with the output data are avoided.
[0006]
However, after the single address DMA transfer, when the read / write operation for the memory mapped device is continued or when the memory mapped device in another address area is accessed, three cycles of idle wait are inserted, It has been clarified by the present inventor that an idle weight that is two cycles extra is inserted with respect to the required number of idle waits, and the access of the memory-mapped device becomes slow.
[0007]
An object of the present invention is to provide a microcomputer capable of preventing an idle wait from being undesirably inserted into an access of a memory mapped device. More specifically, an idle wait is prevented from being undesirably inserted in an access to a memory mapped device after a direct memory access in the single address mode.
[0008]
Another object of the present invention is to prevent undesirably slow access of a memory mapped device in a data processing system in which low speed I / O devices and high speed memory mapped devices are mixed.
[0009]
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
[0010]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0011]
That is, the first idle wait number (DIW) is accessed for the access of the first device (100) as the I / O device that can be accessed without receiving the address designation, and the memory that can be accessed by receiving the address designation. For the access of the second device (200) as a mapped device, a second idle wait number (EIW) can be set, and following the data transfer between the first device and the second device in the single address mode When the second device is accessed, an idle wait cycle defined by the first idle wait number is inserted before the second device, and further subsequent access to the second device is defined by the second idle wait number. Insert an idle wait cycle. For example, when the number of idle waits required for the second device is 1 cycle and the number of idle waits required for the first device is 3 cycles, the single device direct memory access transfer ends and the second device starts to access. Three idle wait cycles defined by the first idle wait number are inserted until the second device is accessed. However, in the subsequent second device access, the idle wait cycle is defined by the second idle wait number and only one cycle is required. . Therefore, when the number of idle waits can be set only for the second device as in the prior art, it is possible to eliminate the situation where the access of the second device consecutive after the direct memory access in the single address mode is delayed.
[0012]
The microcomputer according to the present invention will be described in more detail. The microcomputer according to the first aspect is provided between a first device accessible without designation of an address and a second device accessible with designation of an address. Direct memory access control means capable of single address data transfer, a central processing unit, and an external bus for the first device and the second device based on requests from the central processing unit and the direct memory access control means A semiconductor integrated circuit including a bus state controller capable of controlling an access operation. The bus state controller inserts an idle wait cycle defined by the first idle wait number after single address data transfer between the first device and the second device by the direct memory access control means, When accessing before and after the second device, an idle wait cycle defined by the second idle wait number is inserted when switching the access.
[0013]
A data processing system according to the present invention is connected to a first device accessible without designation of an address, a second device accessible by designation of an address, and the first and second devices via a bus. A microcomputer having control register means for setting the first idle wait number and the second idle wait number by the central processing unit, wherein the first device and the second device are connected in parallel. After accessing, when accessing the second device, insert an idle wait cycle defined by the first idle wait number before starting the access, and when accessing the second device before and after, when switching access The idle wait cycle defined by the second idle wait number is You type.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
<Microcomputer>
FIG. 2 shows a microcomputer according to an example of the present invention. The microcomputer 1 shown in the figure is not particularly limited, but is configured as an integrated circuit on a single semiconductor substrate such as single crystal silicon. The microcomputer 1 has a floating point unit (also referred to as FPU) 2. Further, the microcomputer 1 includes a central processing unit (also referred to as a CPU) 3 that can operate an integer. The microcomputer 1 has a 32-bit RISC (Reduced Instruction Set Computer) architecture having a 16-bit fixed length instruction set, although not particularly limited.
[0015]
In FIG. 2, what is indicated by reference numeral 4 is an address translation / cache unit (CCN). The address translation / cache unit 4 includes an instruction address translation buffer (also referred to as an instruction TLB) 40 for instructions and a unified address translation buffer (unified TLB) for data so that instruction access and data access by the CPU 3 can be parallelized. 41), and the instruction cache memory 42 and the data cache memory 43 are also individualized. A cache / address translation buffer controller (also referred to as a cache TLB controller) 44 controls the address translation / cache unit 4 as a whole.
[0016]
2 is a bus state controller, which is connected to the address translation / cache unit 4 via a 32-bit data bus 50 and a 29-bit address bus 51. A DMAC 8 is connected to the bus state controller 5 via a data bus 54 and an address bus 55.
[0017]
In the microcomputer 1, the CPU 3 and the DMAC 8 constitute a bus master module. External access by the microcomputer 1 is performed by an external bus interface circuit (PAD) 6 connected to the bus state controller 5 via a 64-bit data bus 52 and an address bus 53. The external bus interface circuit 6 is connected to an external data bus 60 and an external address bus 61.
[0018]
The microcomputer 1 includes a clock pulse generator (also referred to as CPG) 70, an interrupt control circuit 71, and serial communication interface controllers (SCI1, SCI2) as built-in peripheral circuits connected to a 16-bit peripheral data bus 56 and a peripheral address bus 57. 72, a real-time clock circuit 73, and a timer 74. These peripheral circuits are accessed by the CPU 3 or the DMAC 8 via the bus state controller 5.
[0019]
The DMAC 8 has, for example, four data transfer channels. For each data transfer channel, the source address register in which the transfer source address is set, the destination address register in which the transfer destination address is set, and the number of transfers are counted. And a channel control register in which a data transfer control mode and the like are set. The CPU 3 or the like initially sets data transfer control information for the register. When there is a data transfer request DREQ from the outside of the microcomputer 1, a data transfer request PDREQ from a peripheral circuit (such as timer 74) inside the microcomputer 1, or a data transfer request from the CPU, the control unit of the DMAC 8 controls the channel. With reference to the channel enable bit of the register, etc., it is determined whether or not the data transfer channel to be activated is operable in response to the data transfer request. Further, when the data transfer requests compete, one data transfer channel to be activated is determined according to a predetermined priority order. When one data transfer channel that should respond to the data transfer request is determined, the bus right request signal BREQ is asserted to the bus state controller 5 to request the bus right. When the bus state controller 5 asserts the bus right approval signal BACK, the DMAC 8 acquires the bus right, and the DMAC 8 performs data transfer control in response to the data transfer request via the bus state controller 5. The bus state controller 5 starts a bus cycle with the number of memory cycles corresponding to the address area of the address signal supplied from the DMAC 8.
[0020]
The DMAC 8 has a data transfer mode of a dual address mode and a single address mode. As is well known, the dual address mode is an operation in which data is transferred by designating addresses to both the transfer destination and transfer source devices, and the single address mode is the transfer destination or transfer source. In this operation, only one of the devices is addressed and data is transferred. The former is data transfer between memory mapped devices, and the latter is data transfer between a memory mapped device and an I / O device.
[0021]
The bus state controller 5 determines the access data size, the access time, the number of internal wait states and the number of idle wait states, which will be described later, according to the address area of the circuit to be accessed by the CPU 3 and the DMAC 8, and the peripheral bus bus 56, 57, and controls the bus access to the external buses 60 and 61. Further, the bus state controller 5 arbitrates contention for bus use requests from the cache TLB controller 44 and the DMAC 8. The bus state controller 5 has a data buffer 58. The data buffer 58 temporarily latches transfer data in order to absorb a difference in operation speed between circuits connected to the internal buses 50 and 51, the peripheral buses 56 and 57, and the external buses 60 and 61. Further, in the data transfer control by the DMAC 8, the DMAC 8 does not take the data latched in the data buffer 58, transfers the data from the data buffer 58 to the transfer destination, and performs unnecessary data transfer between the DMAC 8 and the data buffer 58. Transfer data to save.
[0022]
When fetching an instruction, the CPU 3 outputs an instruction address to the 32-bit instruction address bus 30 and fetches an instruction output to the instruction data bus 31. Further, the CPU 3 outputs a data address to the 32-bit data address bus 32, reads (loads) the data via the 32-bit data bus 33, and writes the data via the 32-bit data bus 34 ( Store). The instruction address and data address are logical addresses.
[0023]
The FPU 2 is not particularly limited, but does not have a memory addressing capability for accessing the data cache memory 42 or the like. The CPU 3 performs an addressing operation for accessing data on behalf of the FPU 2. This is to save the chip area by eliminating the need for the memory addressing circuit of FPU2. Data loading to the FPU 2 is performed via the 32-bit data bus 33 and the 32-bit data bus 35, and data storage from the FPU 2 is performed via the 64-bit data bus 36. Data transfer from the FPU 2 to the CPU 3 is performed using the lower 32 bits of the 64-bit data bus 36.
[0024]
CPU 3 not only fetches data for FPU 2 but also fetches all instructions including floating point instructions for FPU 2. The floating point instruction fetched by the CPU 3 is given from the CPU 3 to the FPU 2 via the 32-bit data bus 34.
[0025]
Although not particularly limited, the microcomputer 1 handles a virtual address space defined by a 32-bit virtual address and a physical address space defined by a 29-bit physical address. Address conversion information for converting a virtual address into a physical address includes a virtual page number and a corresponding physical page number. The address conversion table is formed in an external memory (not shown) of the microcomputer 1. Of the address translation information in the address translation table (not shown), recently used information is stored in the instruction TLB 40 and the unified TLB 41. The control is performed, for example, by the operating system of the microcomputer 1.
[0026]
The data unified TLB 41 stores a maximum of 64 entries of data and instruction address conversion information. The unified TLB 41 associates a physical page number corresponding to the virtual page number of the virtual address output from the CPU 3 to the data address bus 32 for data fetch from the address conversion information, and converts the virtual address into a physical address. .
[0027]
The instruction TLB 40 for instructions stores up to four entries of address translation information dedicated to instructions. In particular, the entry held by the instruction TLB 40 is a part of the address conversion information of the instruction address held by the unified TLB 41. That is, when it is found by the associative search that the instruction TLB 40 does not have target address conversion information, the address conversion information is supplied from the unified TLB 41 to the instruction TLB 40. The instruction TLB 40 performs an associative search from the address conversion information for the physical page number corresponding to the virtual page number of the virtual address output from the CPU 3 to the instruction address bus 30 for instruction fetch. As a result of the search, when there is target address conversion information (TLB hit), the virtual address is converted into a physical address using the address conversion information. As a result of the search, when there is no target address translation information (TLB miss), the cache TLB controller 44 controls an operation for obtaining the target address translation information from the unified TLB 41.
[0028]
The data cache memory 43 receives the physical address converted by the unified TLB 41 at the time of data fetching, and performs an associative search of the cache entry based on the physical address. If the search result is a read hit, data corresponding to the physical address is output to the data bus 33 or 35 from the cache line associated with the hit. If the retrieval result is a read miss, the data for one cache line including the data relating to the miss is read from an external memory (not shown) via the bus state controller 5 and the cache fill is performed. As a result, the data related to the cache miss is read to the bus 33 or 35. When the search result is a write hit, if the cache operation mode is the copy back mode, data is written in the hit entry and the dirty bit of the entry is set. When the dirty bit in the set state indicates an inconsistent state with the data in the external memory, and the dirty cache entry is evicted from the cache memory by the cache fill operation, writing back to the external memory is performed. In the write-through mode, data is written to the hit entry and data is also written to the external memory. If the search result is a write miss, in the copy back mode, the cache fill is performed, the dirty bit is set, the tag address is updated, and the data is written to the cache line that has been filled. In the write-through mode, data is written only to the external memory.
[0029]
The instruction cache memory 42 receives the physical address converted by the instruction TLB 40 at the time of instruction fetch, and performs an associative search of the cache entry based on the physical address. If the search result is a read hit, an instruction corresponding to the physical address is output to the instruction data bus 31 from the cache line associated with the hit. If the search result is a read miss, data for one cache line including the instruction relating to the miss is read from an external memory (not shown) via the bus state controller 5 and a cache fill is performed. As a result, an instruction relating to a miss is given to the CPU 3 via the instruction data bus 31.
[0030]
The instruction TLB 40, unified TLB 41, and cache TLB controller 44 constitute a memory management unit. This memory management unit can perform storage protection by setting an access right to the virtual address space in each of the privileged mode and the user mode. For example, the address translation information has protection key data for each virtual address page number. The protection key data is 2-bit data representing the access right of the page as a code, can be read only in the privileged mode, can be read and written in the privileged mode, can only be read in both the privileged and user modes, and the privileged mode. In either of the user mode and the user mode, any access right that can be read and written can be set. If the actual access type violates the access right set by the protection key data, a TLB protection violation exception is generated. When a TLB protection violation exception is generated, for example, after the protection violation is resolved by exception processing, a return instruction from exception processing is executed, and the interrupted normal processing instruction is re-executed.
[0031]
<Bus state controller>
FIG. 1 shows a detailed example of the bus state controller 5. The bus state controller 5 inputs / outputs data via the data buffer 58, outputs an address signal from the address control unit 508, and representatively shows a data acknowledge signal DACK and an area selection signal CS from the strobe generation circuit 507. Then, strobe signals such as a read signal RD and a write enable signal WE are output. Strobe signals such as the area selection signal CS, the read signal RD, and the write enable signal WE are used as access control signals for a memory mapped device such as a memory arranged outside the microcomputer 1. The data acknowledge signal DACK is a data strobe signal for an I / O device such as a protocol controller. For example, when the I / O device asserts the data transfer request signal DREQ, the I / O device performs the data input operation or the data output operation after waiting for the assertion of the data acknowledge signal DACK.
[0032]
The bus state controller 5 controls the bus access cycle according to the control data set in the control register 501. The control register 501 has a setting area for control information such as an access data size SZ, an area internal wait number ITW, an area idle wait number EIW for each address area, and further, a device idle wait number DIE for each I / O device. It has a setting area. For setting the control information for the control register 501, the request control unit 500 determines a register address supplied from the CPU 3 via the CCN 4, and the register control unit 503 is supplied via the data buffer 58 according to the determination result. This is done by writing control information 501 to the control register.
[0033]
The CCN 4 requests the bus access by asserting the request signal REQ to the request control unit 500. When read data according to the request is supplied from the data buffer 58 to the CCN 4 or when write data according to the request is output from the data buffer 58, the request control unit 500 asserts the ready signal RDY to the CCN 4. . At this time, necessary address information is given to the request control unit 500 via the bus 51.
[0034]
The DMAC 8 requests the request control unit 500 for bus access by asserting the bus request signal BREQ, acquires the bus right by the bus acknowledge signal BACK, and then sends the address information to the request control unit 500 via the bus 55 and the like. give.
[0035]
The request control unit 500 determines an access area by decoding the address information given from the CCN 4 or the DMAC 8, and the area idle wait number EIW, the area internal wait number ITW, and the access data size corresponding to the determined access area A storage area such as SZ is selected by the register control unit 503 and supplied to the external bus control unit 504. The external bus control unit 504 performs the address output operation from the address control unit 508 according to the area idle wait number EIW, the area internal wait number ITW, the access data size SZ, and the like, strobe signals CS, RD, and WE from the strobe output generation unit 507. The data output or input operation of the data buffer 58 by the data control unit 506 is controlled.
[0036]
When the operation mode of the data transfer channel activated by the DMAC 8 is designated as the single address mode, a signal 520 indicating the operation mode is given to the request control unit 500, and the memory mapped device is connected via the external bus control unit 504. When the addressed bus access cycle is activated, the strobe output generation circuit 507 is made to assert the data acknowledge signal DACK. Thus, when the DMAC 8 performs data transfer in the single address mode, the I / O device receiving the data acknowledge signal DACK can perform an input operation or an output operation in parallel with the addressed access to the memory mapped device. it can.
[0037]
Here, the bus access control content by the external bus control unit 504 based on the device idle wait number DIW and the area idle wait number EIW will be described in detail. When the external bus control unit 504 is notified by the signal 520 that the DMAC 8 is in the single address mode, the external bus control unit 504 terminates the data transfer operation in the single address mode and then continues to the next bus access. If cycle activation is requested, an idle wait cycle defined by the device idle wait number DIW is inserted, and then the next bus access cycle is activated. In addition, when a bus access cycle for a memory mapped device other than the bus access in the single address mode is switched from a read operation to a write operation in the same address area, the address area is switched, and the area is changed when the access is switched. An idle wait cycle defined by the number of idle waits EIW is inserted, and the next bus access cycle is started. The reason why the idle wait cycle is inserted when the address area is switched is to automatically avoid the possibility of data collision when the access area is changed from the low-speed device area to the high-speed device area. .
[0038]
Next, an example of an idle wait cycle insertion operation will be described. FIG. 3 shows an example of a data processing system using the microcomputer 1. What is indicated by 100 is an I / O device, which has a storage area that does not need to be addressed from the outside, such as a FIFO (First In First Out) buffer, and the like. The area is interfaced to the data bus 60. The I / O device 100 is, for example, a semiconductor device such as a communication I / O or a protocol control I / O. In FIG. 3, what is indicated by 200 is a memory mapped device, such as a semiconductor memory device.
[0039]
FIG. 4 shows an example of the operation timing when the memory mapped device continues to be accessed following the data transfer in the single address mode (single address DMA transfer). In the example shown in FIG. 4, it is assumed that the bus access cycle when the internal wait cycle is not inserted is two system clock signals (T1, T2), and the internal wait cycle is not inserted.
[0040]
First, a bus cycle (BS1) for a single address DMA transfer operation is started. In this operation, the write operation for the memory mapped device 200 and the output operation of the I / O device 100 are performed in parallel. Since this is a single address DMA transfer operation, an idle wait cycle (I1, I2, I3) IWAIT1 defined by the number of device idle waits DIW (for example, 3) is inserted after the DMA transfer. During this time, it takes time for the output buffer of the I / O device 100 to determine the high output impedance state on the data bus despite the completion of the access. During the idle wait cycle IWAIT1, the data bus Undesirable data remains on the top. Since the bus cycle BS2 for the next memory mapped device is after the idle wait cycle IWAIT1, there is no collision with the data after the end of the bus cycle BS1.
[0041]
The bus cycle BS2 is for the memory mapped device in the address area 1, and the address area is changed in the next bus cycle BS3. At this time, one cycle of idle wait cycle (I1) IWAIT2 determined by area idle wait number EIW (for example, 1) is inserted between bus cycle B2 and bus cycle B3. Since the next bus cycle BS4 is for the same address area 2 as before, no idle wait cycle is inserted at the switching of the access operation.
[0042]
FIG. 5 shows, as a comparative example, an operation in a conventional bus state controller in which the number of idle waits of the I / O device 100 cannot be set and the memory mapped device 200 handles the idle waits. When transferring data in single address mode by DMAC to / from a memory mapped device to an I / O device, an idle wait cannot be set for the I / O device, so the necessary idle wait can be assigned to the memory mapped device. Must be set. For example, as in the case of FIG. 4, when the number of idle waits required for the memory mapped device is 1 cycle and the number of idle waits required for the I / O device is 3 cycles, The idle number of 3 must be set for the mapped device. As a result, even if a single address DMA transfer is performed in the bus cycle BS1 and subsequently another memory mapped device is accessed (BS2), the other memory mapped device is accessed on the data bus. Collisions between data and output data of the low speed I / O device are avoided. However, after the single address DMA transfer, when the read / write operation for the memory mapped device is continued, or when the memory mapped device in another address area is accessed, the same as before the bus cycle BS3. Three idle cycles are inserted, and an extra idle weight of two cycles is inserted with respect to the originally required number of idle waits. When the bus cycle BS3 in FIG. 4 is compared with the bus cycle BS3 in FIG. 5, the difference is clear, and the bus state controller 5 can prevent the memory mapped device 200 from accessing slowly. Access can be speeded up.
[0043]
Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.
[0044]
For example, the microcomputer may not have an address conversion function or a cache memory. Further, the microcomputer may not have a peripheral circuit. Further, a signal that gives an instruction for an input operation or an output operation to the I / O device is not limited to a data acknowledge signal.
[0045]
【The invention's effect】
The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
[0046]
In other words, the number of idle waits can be set for each of the first device as the I / O device and the second device as the memory mapped device, and after the data transfer in the single address mode, it is specific to the low-speed I / O device. However, when a memory-mapped device is subsequently accessed continuously, it is possible to insert an idle wait cycle specific to a high-speed memory-mapped device. An extra idle wait cycle can be prevented from being inserted when the device is accessed.
[0047]
Therefore, in a data processing system in which low-speed I / O devices and high-speed memory-mapped devices are mixed, it is possible to prevent the memory-mapped device from being undesirably slowed and to improve data processing efficiency.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a detailed example of a bus state controller.
FIG. 2 is a block diagram of a microcomputer according to an example of the present invention.
3 is a block diagram illustrating an example of a data processing system using the microcomputer of FIG. 2;
FIG. 4 is a timing chart showing an example of an operation when an access to a memory mapped device continues after a single address DMA transfer.
FIG. 5 is a timing chart showing a comparative example of the operation when the memory mapped device continues to be accessed following the single address DMA transfer in the conventional bus state controller in which the number of idle waits of the I / O device cannot be set.
[Explanation of symbols]
1 Microcomputer
3 CPU
4 Address translation / cache unit
5 Bus state controller
6 External interface circuit
8 DMAC
100 I / O devices
200 Memory mapped device
501 Control register
Number of DIW device idle waits
Number of EIW area idle waits
ITW area internal waits

Claims (3)

論理アドレス信号を出力可能な中央処理装置と、
前記中央処理装置から出力された論理アドレス信号を第1アドレス信号に変換可能なアドレス変換回路と、
前記第1アドレス信号に基づいて前記中央処理装置によってアクセスされ、第2アドレス信号を用いてデータ転送可能なデータ転送制御回路と、
前記中央処理装置及び前記データ転送制御回路からの要求に基づいて前記第1アドレス信号または前記第2アドレス信号を用いて外部バスアクセス動作可能なバス制御回路と、
前記中央処理装置と前記アドレス変換回路とに接続される第1アドレスバスと、
前記アドレス変換回路と前記データ転送回路、および前記バス制御回路とに接続され、前記第1アドレス信号および第2アドレス信号を伝達可能な第2アドレスバスとを含み、
前記データ転送制御回路は、
前記第2アドレス信号の指定を受けずにアクセス可能な第1デバイスと前記第2アドレス信号の指定を受けてアクセス可能な第2デバイスとの間の第1データ転送が可能で、
前記バス制御回路は、
前記第1アドレスによって指定され、第1アイドルウェイト数と第2アイドルウェイト数が前記中央処理装置によって設定されるコントロールレジスタ手段を有し、
前記第1データ転送の後に前記第1アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入し、
前記第2デバイスを前後してアクセスするときアクセスの切り換え時に前記第2アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入するものであることを特徴とするマイクロコンピュータ。
A central processing unit capable of outputting a logical address signal ;
An address conversion circuit capable of converting a logical address signal output from the central processing unit into a first address signal;
A data transfer control circuit accessed by the central processing unit based on the first address signal and capable of transferring data using the second address signal;
A bus control circuit capable of performing an external bus access operation using the first address signal or the second address signal based on a request from the central processing unit and the data transfer control circuit ;
A first address bus connected to the central processing unit and the address conversion circuit;
A second address bus connected to the address conversion circuit, the data transfer circuit, and the bus control circuit and capable of transmitting the first address signal and the second address signal;
The data transfer control circuit includes:
A first data transfer between a first device accessible without designation of the second address signal and a second device accessible by designation of the second address signal is possible;
The bus control circuit includes:
Control register means designated by the first address, wherein the first idle wait number and the second idle wait number are set by the central processing unit;
Inserting an idle wait cycle defined by the first idle wait number after the first data transfer,
When accessing the second device before and after, the microcomputer inserts an idle wait cycle defined by the second idle wait number when switching the access.
前記バス制御回路は更に、前記レジスタ手段に、第2デバイスのバスアクセス動作のサイクル数を増やすための内部ウェイトサイクル数が中央処理装置によりアドレスエリア毎に設定され、第2デバイスに対するアクセス動作ではそのアクセスアドレスエリアに対応する内部ウェイトサイクル数で規定される内部ウェイトサイクルを挿入するものであることを特徴とする請求項1記載のマイクロコンピュータIn the bus control circuit , an internal wait cycle number for increasing the number of cycles of the bus access operation of the second device is set in the register means for each address area by the central processing unit. 2. The microcomputer according to claim 1, wherein an internal wait cycle defined by the number of internal wait cycles corresponding to the access address area is inserted. アドレスの指定を受けずにアクセス可能な第1デバイスと、
アドレスの指定を受けてアクセス可能な第2デバイスと、
前記第1及び第2デバイスにバスで接続されたマイクロコンピュータとを含み、
前記マイクロコンピュータは、
論理アドレス信号を出力可能な中央処理装置と、
前記中央処理装置から出力された論理アドレス信号をアドレス信号に変換可能なアドレス変換回路と、
前記アドレス信号に基づいて前記中央処理装置によってアクセスされ、アドレス信号を用いてデータ転送可能で、前記第1デバイスと前記第2デバイスとの間のシングルアドレスデータ転送が可能なデータ転送制御回路と、
前記中央処理装置及び前記データ転送制御回路からの要求に基づいて前記第1デバイスと前記第2デバイスとに対する外部バスアクセス動作を制御可能なバス制御回路と、
前記中央処理装置と前記アドレス変換回路とに接続され、中央処理装置によって出力された論理アドレス信号を伝達可能な第1アドレスバスと、
前記アドレス変換回路と前記データ転送回路、および前記バス制御回路とに接続され、前記アドレス変換回路によってアドレス変換されたアドレス信号と前記データ転送制御回路によって出力されたアドレス信号とを伝達可能な第2アドレスバスとを含み、
前記バス制御回路は、
前記アドレス変換回路で変換されたアドレス信号によって指定され、第1アイドルウェイト数と第2アイドルウェイト数が前記中央処理装置によって設定されるコントロールレジスタ手段を有し、
前記データ転送制御回路による前記第1デバイスと第2デバイスとの間のシングルアドレスデータ転送の後に前記第1アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入し、
前記第2デバイスを前後してアクセスするときアクセスの切り換え時に前記第2アイドルウェイト数で規定されるアイドルウェイトサイクルを挿入するものであることを特徴とするデータ処理システム。
A first device accessible without receiving an address designation;
A second device accessible by receiving an address designation;
A microcomputer connected to the first and second devices by a bus;
The microcomputer is
A central processing unit capable of outputting a logical address signal ;
An address conversion circuit capable of converting a logical address signal output from the central processing unit into an address signal;
A data transfer control circuit that is accessed by the central processing unit based on the address signal, is capable of data transfer using the address signal, and is capable of single address data transfer between the first device and the second device;
A bus control circuit capable of controlling an external bus access operation to the first device and the second device based on a request from the central processing unit and the data transfer control circuit ;
A first address bus connected to the central processing unit and the address conversion circuit and capable of transmitting a logical address signal output by the central processing unit;
A second circuit connected to the address conversion circuit, the data transfer circuit, and the bus control circuit and capable of transmitting an address signal converted by the address conversion circuit and an address signal output by the data transfer control circuit Including address bus ,
The bus control circuit includes:
Control register means specified by the address signal converted by the address conversion circuit, wherein the first idle wait number and the second idle wait number are set by the central processing unit;
Inserting an idle wait cycle defined by the first idle wait number after single address data transfer between the first device and the second device by the data transfer control circuit ;
A data processing system, wherein when the second device is accessed before and after, an idle wait cycle defined by the second idle wait number is inserted when the access is switched.
JP30386597A 1997-11-06 1997-11-06 Microcomputer and data processing system Expired - Fee Related JP3669616B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30386597A JP3669616B2 (en) 1997-11-06 1997-11-06 Microcomputer and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30386597A JP3669616B2 (en) 1997-11-06 1997-11-06 Microcomputer and data processing system

Publications (2)

Publication Number Publication Date
JPH11143826A JPH11143826A (en) 1999-05-28
JP3669616B2 true JP3669616B2 (en) 2005-07-13

Family

ID=17926216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30386597A Expired - Fee Related JP3669616B2 (en) 1997-11-06 1997-11-06 Microcomputer and data processing system

Country Status (1)

Country Link
JP (1) JP3669616B2 (en)

Also Published As

Publication number Publication date
JPH11143826A (en) 1999-05-28

Similar Documents

Publication Publication Date Title
JP4500373B2 (en) Computer system with integrated system memory and improved bus concurrency
JP3934710B2 (en) Microprocessor
US6477599B1 (en) Data processing system and microcomputer
US6741258B1 (en) Distributed translation look-aside buffers for graphics address remapping table
US20040107265A1 (en) Shared memory data transfer apparatus
US6836829B2 (en) Peripheral device interface chip cache and data synchronization method
US5553268A (en) Memory operations priority scheme for microprocessors
JPH06309230A (en) Bus snooping method
US6754779B1 (en) SDRAM read prefetch from multiple master devices
US5649232A (en) Structure and method for multiple-level read buffer supporting optimal throttled read operations by regulating transfer rate
JP3018038B2 (en) Data processing device having cache
US6959351B2 (en) Handling of a multi-access instruction in a data processing apparatus
US20020166004A1 (en) Method for implementing soft-DMA (software based direct memory access engine) for multiple processor systems
JP3669616B2 (en) Microcomputer and data processing system
US6122696A (en) CPU-peripheral bus interface using byte enable signaling to control byte lane steering
JPH11134077A (en) Processor and system for data processing
US5881256A (en) Bus interface unit capable of simultaneously proceeding with two bus cycles in a high-performance microprocessor
JPH11212903A (en) Data processing system, peripheral device and microcomputer
US8560748B2 (en) Information processing system including interrupt processing function
JP4220258B2 (en) High-speed memory access method in non-cache area
JP3425421B2 (en) Multiprocessor system
EP0318702A2 (en) Data processor with direct data transfer between coprocessor and memory
JP2000047930A (en) Data processor
JP2000215154A (en) Dma controller
JP2002108702A (en) Microcomputer and data processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050104

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050307

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050407

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050408

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080422

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees