[go: up one dir, main page]

JP3905660B2 - Microcomputer and microcomputer system - Google Patents

Microcomputer and microcomputer system Download PDF

Info

Publication number
JP3905660B2
JP3905660B2 JP03694999A JP3694999A JP3905660B2 JP 3905660 B2 JP3905660 B2 JP 3905660B2 JP 03694999 A JP03694999 A JP 03694999A JP 3694999 A JP3694999 A JP 3694999A JP 3905660 B2 JP3905660 B2 JP 3905660B2
Authority
JP
Japan
Prior art keywords
bus
external
microcomputer
data transfer
address
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
JP03694999A
Other languages
Japanese (ja)
Other versions
JP2000235560A (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 JP03694999A priority Critical patent/JP3905660B2/en
Priority to US09/503,358 priority patent/US6763448B1/en
Publication of JP2000235560A publication Critical patent/JP2000235560A/en
Priority to US10/887,843 priority patent/US6907514B2/en
Priority to US11/130,200 priority patent/US20050210221A1/en
Application granted granted Critical
Publication of JP3905660B2 publication Critical patent/JP3905660B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Microcomputers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、中央処理装置とデータ転送装置を内蔵したマイクロコンピュータ、更には、そのようなマイクロコンピュータを用いたマイクロコンピュータシステムに関するものである。
【0002】
【従来の技術】
マイクロコンピュータの一例として、昭和59年11月30日オーム社発行の『LSIハンドブック』P540及びP541には、中央処理装置(CPU)を中心にしてプログラム保持用のROM(リードオンリメモリ)、データ保持用のRAM(ランダムアクセスメモリ)、及びデータの入出力を行なうための入出力回路などの機能ブロックが一つの半導体基板上に形成されて成るものが記載されている。
【0003】
マイクロコンピュータとして、ダイレクトメモリアクセスコントローラ(DMAC)を内蔵し、CPUとは独立にデータ転送可能にされたものがある。このようなマイクロコンピュータについて記載された文献の例として特開平5−307516号公報がある。
【0004】
また、マイクロコンピュータの中には、外部に対してバス権を開放する外部バス権解放機能を持ち、外部バス権解放中も、CPUによるROMリードなどの、内部バスの動作が可能なものがある。このようなマイクロコンピュータの外部バスに、DMACを接続すれば、CPUによるROMリードなどの内部バスの動作と、外部のDMACによる外部バス上のデータ転送と、を並行して行うことができる。
【0005】
【発明が解決しようとする課題】
本発明者は前記DMAC内蔵マイクロコンピュータやそれを用いたシステム、更には、前記外部バス権開放機能を持つマイクロコンピュータの外部にDMACを接続したシステムについて検討した。
【0006】
先ず、DMAC内蔵マイクロコンピュータにおいて、そのDMACは、割り込み要求によって起動でき、リピートモード、ブロック転送モードなどを行なうことができる。プリンタなどのシステムにおいて、DMAC内蔵マイクロコンピュータは、ステッピングモータの制御(複数)やプリンタの印字データ制御、更には、受信データのメモリへの蓄積に好適であり、DMACは複数のデータ転送チャネルを持つことができる。
【0007】
しかしながら、DMACの転送制御はCPUの動作とは独立しているが、バスを共有しているために、データ転送に必要なバスサイクルはCPUの動作を停止させてしまう。例えば、内蔵DMACによりRAMから入出力回路へデータを転送する場合、RAMのアクセスを2ステート、入出力回路のアクセスを3ステートとして、デッドサイクル1ステートを含めれば、そのデータ転送には6ステートを要する。この期間、CPUはバスを用いることはできない。特に制限されないが、ここでは、マイクロコンピュータのようなデータ処理LSIの基準クロックの1周期を1ステートとする。
【0008】
これに対して、前記外部バス権開放機能を持つマイクロコンピュータの外部にDMACを接続したシステムでは、CPUのROMリードなどの内部バスの動作と、外部のDMACによる外部バス上でのデータ転送とを並行して行うことができる。
【0009】
しかしながら、外部バス権解放は、そのバス権の授受の際に、外部との間でのアクノレッジ信号やリクエスト信号などを認識しなければならず、少なくとも、そのための動作時間が余計にかかる。また、マイクロコンピュータと外部のDMACのバスが衝突したりしないようにするために、双方がバスを使用しない時間が発生したりして、実際の動作に関係のないオーバヘッドを発生し易い。一回のデータ転送の前後に、オーバヘッドが発生してしまうのでは、実際のデータ転送の時間に比較してこれを無視することはできない。また、マイクロコンピュータ外部のDMACに、汎用的なものを使用すれば、使用しない機能が生じてしまい、費用対効果の面で得策とは言えない。また、各システムに適したDMACを個別に開発することは可能だが、マイクロコンピュータと別のLSIを新たに開発することは、製造費用などの面で不利になりやすい。
【0010】
また、例えば、プリンタなどのシステムにおいて、印刷中には、プリンタを駆動するためのステッピングモータの駆動が必要であり、印字データの加工など、システムに固有のデータ処理を行う必要もあり、また、プリンタの動作状態とは非同期でデータ受信を行う必要がある。そして、プリンタの高速化や高精度化には、マイクロコンピュータの処理能力の向上が必要である。
【0011】
以上により、本発明者は、マイクロコンピュータにDMACのようなデータ転送装置を内蔵させ、その上で、マイクロコンピュータによる処理のトータル性能を向上させるという観点の重要性を見出した。
【0012】
本発明の目的は、DMACのようなデータ転送装置を内蔵したマイクロコンピュータによるデータ処理のトータル性能を向上させることができるマイクロコンピュータを提供することにある。
【0013】
本発明の別の目的は、物理的・論理的規模の増大を最小限とし、マイクロコンピュータの外部バス上のデータ転送制御と内蔵CPUによる内部バスアクセス等のCPU動作とを並列処理可能にすることができるマイクロコンピュータを提供することにある。
【0014】
本発明の更に別の目的は、マイクロコンピュータと外部との間のデータ転送制御及びマイクロコンピュータ内部の演算処理を並列的に処理可能であって、しかも処理のオーバーヘッドが少なく、物理的な規模の増大も最小限とすることができるマイクロコンピュータシステムを提供することにある。
【0015】
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。
【0016】
【課題を解決するための手段】
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。
【0017】
すなわち、マイクロコンピュータ(1)の外部バス上でのデータ転送を制御するダイレクト・メモリ・アクセスコントローラのような第1のデータ転送装置(4)を設け、前記第1のデータ転送装置による外部バス上でのデータ転送と、CPUのようなデータ処理装置(2)による第1の内部バス(IAB,IDB)を用いた命令実行とを並行可能にするものである。更に詳しくは、マイクロコンピュータ(1)は、前記第1の内部バス又は前記第1のデータ転送装置を外部バスに接続可能とするバスインタフェース手段(72)と、バス制御とバス権の調停を行うバス制御手段(12)とを有し、前記バス制御手段は、前記第1の内部バスを用いたマイクロコンピュータ内部のみのアクセス動作と前記第1のデータ転送装置による前記バスインタフェース手段を介する外部アドレス空間のアクセス動作とを並行可能にするものである。
【0018】
第1のデータ転送装置による外部バス上でのデータ転送と、CPUのようなデータ処理装置による内部バスを用いた命令実行とが並列に動作可能であるから、マイクロコンピュータの処理性能を向上できる。データ処理装置の処理性能を低下させることなく、外部バス上でのデータ転送を行うことができる。
【0019】
前記バス制御手段(12)を内部バスコントローラ及び外部バスコントローラによって構成することができる。外部バスコントローラは、アドレス空間を分割して、メモリの種類やバス幅、アクセスステート数などのバス仕様が設定可能にされ、CPUのようなデータ処理装置等のバスマスタによる外部バス権要求と、前記第1のデータ転送装置による外部バス権要求と、マイクロコンピュータ外部からのバス権要求とを調停するように構成できる。これにより、第1のデータ転送装置による外部バスアクセスに並行する前記データ処理装置による第1の内部バスを用いた内部アクセスの制御と、データ処理装置による第1の内部バスを用いた外部バスアクセスと第1のデータ転送装置による外部バスアクセスとの調停制御を個別の論理で簡単に実現でき、制御内容の容易性と、その制御論理規模の増加抑止との両立が簡単になる。
【0020】
このとき、前記第1のデータ転送装置が出力するアドレスやバスコマンドなどを第2の内部バス(EXAB)のような専用信号線路で前記バスインタフェース手段に供給すれば、第1のデータ転送装置の状態遷移制御動作を簡潔にでき、その論理的規模の縮小に寄与できる。
【0021】
また、外部バスコントローラが、マイクロコンピュータに内蔵された第1のデータ転送装置による外部バス権要求と共に、マイクロコンピュータ外部からのバス権要求も含めて外部バス権要求の調停を行うから、データ処理装置と第1のデータ転送装置との間での外部バス権移譲時のオーバヘッドを少なくでき、さらに処理性能を向上できる。
【0022】
CPUのようなデータ処理装置のプログラムを格納するROMのような記憶手段(6)は、CPUのようなデータ処理装置のベクタを含まないように、動作モードなどで選択可能にすることができる。これにより、全体的な処理プログラムを外部のROMに、高速処理が必要なプログラムなどを内蔵ROMに格納することができ、プログラムの変更に対する柔軟性など使い勝手を向上させることができる。
【0023】
前記第1のデータ転送装置の起動要因や転送モードについては、外部バス上のデータ転送に必要な機能だけに限定することができる。これによって、物理的規模を縮小できる。
【0024】
第1のデータ転送装置において転送アドレスを決め、そのアドレス情報の初期値が指定されるアドレス指定手段(40,41)を転送カウントレジスタと兼用することによりレジスタ数を減らすことができる。
【0025】
また、デュアルアドレス転送においてソースアドレスから読み出したデータの一時保持を、バスインタフェース手段(72)を構成する入出力ポート等のラッチ回路(72L)で行うことにより、そのようなデータを第1のデータ転送装置に導くデータバスが不用になり物理的な規模を縮小できる。
【0026】
第1のデータ転送装置がシングルアドレス転送もサポートすれば、転送に必要なバスサイクルを短縮し、更に処理性能を向上できる。
【0027】
第1のデータ転送装置は複数のデータ転送チャネルを持つことができる。このとき、各チャンネル毎に外部データ転送起動要求信号を割り当てることができる。これにより、マイクロコンピュータシステムにおけるデータ転送制御の使い勝手が向上し、処理性能を向上させることができる。
【0028】
転送アドレスを格納するレジスタのようなアドレス指定手段に対する演算結果の繰返し格納によるアドレス更新を行うことにより、外部のバッファメモリを、容易にリングバッファとして使用できる。CPUのようなデータ処理装置が、随時第1のデータ転送装置内部の前記アドレス指定手段のようなレジスタを第3の内部バス(PAB,PDB)を介してリード/ライトできるようにすれば、リングバッファ上に蓄積されたデータ量の管理などを容易に行うことができる。
【0029】
前記リングバッファとして利用するための前記繰返しアドレス更新動作を可能にするにあたっては、アドレス指定手段のアドレス情報をインクリメント/デクリメントするとき、キャリ/ボローの伝播を所定のビットで禁止するとよい。キャリ/ボローの伝播を所定のビットで禁止することによって、リングバッファとしての機能を最小限度の物理的規模で実現可能に成る。リングバッファの開始アドレスや終了アドレスを任意に指定できなくても、外部のRAMのような大容量のメモリをリングバッファに利用する場合には大きな不都合は生じない。繰返し動作可能とすることによって、CPUのようなデータ処理装置に対する割り込み処理のような負荷をなくすことができる。
【0030】
デュアルアドレス転送時における転送データの一時記憶などは、バスインタフェース手段の入出力ポートなどを使用し、第1のデータ転送装置それ自体が直接転送データを入出力しないようにできる。これにより、第1のデータ転送装置が入出力するデータは、第1のデータ転送装置自体のリード/ライトはなく、CPUのようなデータ処理装置からリード/ライトされるだけになるから、前記データ処理装置などの他のバスマスタからのアクセスと、第1のデータ転送装置自体のデータ転送との競合を、本質的に回避して、論理構成を更に簡潔にでき、また、マイクロコンピュータの開発期間短縮にも寄与する。
【0031】
CPUのようなデータ処理装置とDMACのような前記第1のデータ転送装置に加えて、従来のマイクロコンピュータ用の内部バスに接続されたところのマイクロコンピュータ内外でのデータ転送制御をサポートできる第2のデータ転送装置(3)も内蔵することができる。これにより、内外でのDMA転送制御のために汎用的なDMACで必要なデータ転送チャネルを確保する場合に比べると、第1のデータ転送装置は外部バスに関するデータ転送制御に特化した構成を持つので、全体的に必要な数のデータ転送チャネルを持っても、論理的な規模の増加を最小限に抑えることができる。
【0032】
バス制御手段が、DRAMなどのリフレッシュ制御も可能にするとき、リフレッシュタイマも外部バス権要求元としてバス権調停を行えばよい。
【0033】
第1の内部バスに接続された第2のデータ転送装置と前記第1のデータ転送装置とを一体のモジュールとして構成することによって、限られたデータ転送チャネルを相互に融通し合って、使用することができる。
【0034】
【発明の実施の形態】
図1には本発明に係るマイクロコンピュータの一例をブロック図で示す。同図に示されるマイクロコンピュータ1は、単結晶シリコンのような1個の半導体基板(1チップ)に形成された半導体集積回路とされる。
【0035】
マイクロコンピュータ1は、中央処理装置(CPU)2、第2のデータ転送装置としてのDMAコントローラ(DMAC)3、第1のデータ転送装置としての外部バスDMAC(EXDMAC)4、リードオンリメモリ(ROM)5、ランダムアクセスメモリ(RAM)6、タイマ7、パルス出力回路8、シリアルコミュニケーションインタフェース(SCI)9、A/D変換器(A/D)10、割り込みコントローラ11、バスコントローラ12、クロック発振器(CPG)13、入出力ポート(IOP(A))21〜入出力ポート(IOP(F))26、及び入出力ポート(IOP(1))31〜入出力ポート(IOP(5))35の機能ブロック(モジュールとも称する)から構成される。
【0036】
動作の主体となるのは前記CPU2であり、主に前記ROM5から命令を読込んで動作する。特に図示はしないが、CPU2は、命令をフェッチし、フェッチした命令を解読して各部の制御信号を生成する命令制御ユニットと、前記命令制御ユニットからの制御信号に従ってアドレス演算やデータ演算などを行って命令を実行する演算実行ユニットとを有する。
【0037】
前記DMAC3はCPU2とバスIAB,IDBを共有し、CPU2に代ってデータ転送制御を行うことができる。DMAC3はマイクロコンピュータ1の内部及び外部の何れに対しても、CPU2に代えて、データ転送制御を行うことができる回路モジュールとされる。
【0038】
前記EXDMAC4は、専ら外部バス上でのデータ転送を制御し、CPU2又はDMAC3の内部バス上での動作に並行して、外部に対するデータ転送制御を行うことが可能とされる。このEXDMAC4は、マイクロコンピュータ1の外部に対するデータ転送制御だけが可能にされる。即ち、EXDMAC4は、マイクロコンピュータ1の外部に設けられるメモリ間のデータ転送制御をデュアルアドレシングモードで可能にされ、また、マイクロコンピュータ1の外部メモリとマイクロコンピュータ1の外部入出力回路との間のデータ転送制御をシングルアドレシングモードで可能にされる。
【0039】
前記EXDMAC4の詳細は後述するが、ここで概略を説明する。EXDMAC4に対するデータ転送制御条件などの設定はバスコンコントローラ12及びバスPDB,PABを介してCPU2が行う。EXDMAC4は、CPU2やDMAC3などのバスマスタモジュールによる外部アクセス要求と排他的に調停されて、バス権を取得する。EXDMAC4による外部データ転送制御のためのアドレス信号はバスEXABを介してIOP(A)21〜IOP(C)23から外部に出力可能とされる。このとき、EXDEMAC4によるデュアルアドレッシングモードのデータ転送において、転送データはEXDMAC4の内部に一時的に取り込まれず、IOPD24,IOPE25内部のラッチ回路に一時的に保持されるようになっている。
【0040】
前記マイクロコンピュータ1の機能ブロックについて更に詳述する。前記マイクロコンピュータ1の機能ブロックは、内部バスによって相互に接続される。内部バスはアドレスバス、データバスの他に、図示が省略されたコントロールバスを有する。前記コントロールバスは、バス権要求信号、バスアクノレッジ信号、バスコマンド、外部バスコマンド、レディ信号、外部バスレディ信号、リード信号・ライト信号、バスサイズ信号、及びシステムクロック等を含む。IAB、PAB、EXABは内部アドレスバスであり、IDB、PDBは内部データバスである。これらのバスは、バスコントローラ12に接続されている。内部バスIAB,IDBはCPU2、DMAC3、ROM5、RAM6、バスコントローラ12に接続され、更に、内部アドレスバスIABは外部アドレス出力のためにIOP(A)21〜IOP(C)23に接続され、内部データバスIDBは外部データ入出力のためにIOP(D)24、IOP(E)25に接続される。
【0041】
前記内部バスPAB,PDBはバスコントローラ12、EXDMAC4、タイマ7、パルス出力回路8、SCI9、A/D変換器10、割り込みコントローラ11、IOP(A)21〜IOP(F)26、及びIOP(1)31〜IOP(5)35に接続される。
【0042】
内部アドレスバスEXABは、EXDMAC4とバスコントローラ12、IOP(A)21〜IOP(C)23に接続する。
【0043】
バスコントローラ12は、アクセス先を判定し、バス仕様に従った動作を選択するために、アドレス信号を参照する。従って、バスコントローラ12は、エリアを判定する程度の上位アドレスビットをアドレスバスから入力するのみでよい。EXDMAC4による外部データ転送制御のためのアドレス出力はアドレスバスEXABを介して行われる。
【0044】
前記バスコントローラ12は、内部バスコントローラ120、外部バスコントローラ121、及びリフレッシュタイマ122などを持つ。マイクロコンピュータ1の外部へのアドレス出力はIOP(A)21〜IOP(C)23を介して行われる。マイクロコンピュータ1の外部へのデータ入出力はIOP(D)24、IOP(E)25を介して行われる。
【0045】
CPU2とDMAC3が、内部バスマスタとして、内部バスを使用することができ、それぞれのバス権要求信号に従って、バスコントローラ12の内部バスアービタ(内部バス調停回路)がバス使用要求を調停する。また、外部アクセスについては、CPU2やDMAC3による外部バスアクセス、EXDMAC4、マイクロコンピュータの外部からのバス権解放要求、リフレッシュタイマ122からのリフレッシュ要求の各バス権要求信号に従って、バスコントローラ12の外部バスアービタ(外部バス調停回路)が調停する。
【0046】
ROM5、RAM6、及びタイマ7、パルス出力回路8、SCI9、A/D変換器10、IOP(A)21〜IOP(F)26、及びIOP(1)31〜IOP(5)35、割り込みコントローラ11の各機能ブロック及びEXDMAC4は内部バススレーブとして、CPU2またはDMAC3によってリード/ライトの対象される。EXDMAC4がバススレーブとしてアクセスされる場合とは、データ転送条件等がCPU2などによって設定される場合である。
【0047】
割り込みコントローラ11は、タイマ7、SCI9、A/D変換器10、入出力ポートの出力する割り込み信号を入力し、CPU2に割り込み要求信号を、DMAC3に起動要求信号を出力する。また、DMAC3の出力するクリア信号を入力して、割り込みクリア信号を出力する。これらの割り込み信号などは図示はされていない。
【0048】
前記入出力ポート21〜26,31〜36は、外部バス信号と入出力回路の入出力信号との入出力に兼用とされている。前記IOP(A)21〜IOP(C)23はアドレスバス出力、IOP(D)24、IOP(E)25はデータバス入出力、IOP(F)26はバス制御信号入出力信号と兼用されている。外部アドレスバス、外部データバスは、それぞれ、これらの入出力ポートに含まれるバッファ回路を介してバスIAB、IDB、EXABと接続されている。バスPAB、PDBは入出力ポートのレジスタをリード/ライトするために使用し、外部バスとは直接の関係はない。バス制御信号出力は、アドレスストローブ、ハイ/ロウデータストローブ、リードストローブ、ライトストローブ、バスアクノリッジ信号などがある。バス制御入力信号にはウェイト信号、バスリクエスト信号などがある。これらの入出力信号は図示を省略してある。外部バス拡張を行うことは、動作モードなどで選択され、これらの入出力ポートの機能も選択される。
【0049】
また、IOP(1)31はタイマ入出力、IOP(2)32はパルス出力、IOP(3)33はSCI入出力、IOP(4)34はアナログ入力、IOP(5)35はEXDMAC4、DMAC3のための転送要求信号や転送アクノリッジ信号の入出力に兼用されている。EXDMAC4、DMAC3、タイマ7、SCI9、パルス出力8、A/D変換器10とIOP(1)31〜IOP(5)35との入出力信号や内部割り込み要求信号などは図示はされない。
【0050】
そのほか、電源端子Vcc、Vss、アナログ電源端子AVcc、AVss、リセット入力RES、スタンバイ入力STBY、割り込み入力NMI、クロック入力EXTAL、XTAL、動作モード入力MD0、MD1、MD2などの入力端子がある。
【0051】
図2にはマイクロコンピュータ1の所定の動作モードのアドレスマップが例示されている。アドレス空間は、特に制限されないが、16Mバイトとされ、1バイト毎にアドレスが割り当てられている。
【0052】
各機能ブロックは、接続するバスに拘らず、CPU2のアドレス空間上で、固有のアドレスを有する。なお、I/O(データ入出力手段)は、図1のタイマ7、DMAC33、EXDMAC4、パルス出力回路8、SCI9、A/D変換器10、IOP(A)21〜IOP(F)26、IOP(1)31〜IOP(5)35、及び割り込みコントローラの、夫々の内部I/Oレジスタを含む。
【0053】
ROM5は、特に制限はされないものの、32kバイトとされ、アドレスH’200000〜H’207FFFにマッピングされ、RAM6は2kバイトとされ、アドレスH’FFF700〜H’FFFEFFにマッピングされ、I/OはアドレスH’FFFF00〜H’FFFFFFにマッピングされている。なお、H’は16進数を示す。
【0054】
これ以外のアドレスは、外部アドレス空間とされる。CPU2ベクタがアドレス空間の先頭に存在するので、この部分を含めて、外部にプログラム格納用のROMを接続することが必要である。
【0055】
外部アドレス空間には、随時、プログラム格納用のROM、データ用のDRAMや、そのほかの回路(ASIC)などが接続される。外部アドレス空間は、2MB単位の8個のエリア0〜7に分割され、それぞれのバス仕様を設定し、エリア選択信号を出力できる。それぞれのエリアに、異なるメモリを容易に接続できる。また、エリア2〜5には、DRAMをアクセスするためのアドレスマルチプレクスや、高速ページモードを実行できるDRAMインタフェースを選択できる。かかるバス制御については、平成7年3月(株)日立製作所発行『H8S/2655シリーズ ハードウェアマニュアル』に記載がある。
【0056】
外部ROMに対して、内蔵ROM5は高速にアクセスし易い。また、内蔵ROM5の内容は、内部のCPU2やDMAC3によって読出されている限り、外部には出力されない。ROM5にマッピングされたアドレスのアクセスに対してバスコントローラ12はデータ入出力用のIOP(D)24,IOP(E)25を動作不可能な状態に保つからである。
【0057】
内蔵ROM5がマスクROMの場合、その内容の変更は、マイクロコンピュータ1全体の変更を意味することになってしまい、変更が困難である。一方、内蔵ROM5が、フラッシュメモリのように電気的に書込み可能なROMである場合は、製造工程が複雑になるなど、費用が不所望に増大しやすい。一方、外部ROMは高速アクセスが困難であるが、その内容の変更は、その外部ROMのみの変更であり、外部ROMは汎用的なものであるから、安価である場合が多い。プログラムを変更すれば、プログラムの大きさが変るから、CPUベクタも変更になる場合が多い。図2の、アドレスマップによれば、高速処理が必要で、変更を要する可能性が少ないプログラム、或はその内容を第3者に知られたくないプログラムなどを内蔵ROM5に格納するとともに、CPUベクタを含めた、全体的な処理を外部ROMに格納することによって、処理性能の向上と、使い勝手の向上、費用の低減などを図ることができる。
【0058】
動作モードによって、内蔵ROM5のアドレスをCPUベクタを含むように、エリア0に変更できるようにするとよい。外部にプログラム格納用のROMを必要とせず、マイクロコンピュータシステムを構成することができる。
【0059】
図3には前記マイクロコンピュータ1のバス構成が更に詳細に示されている。前述の通り、バスコントローラ12は、内部バスコントローラ(I−BSC)、120、外部バスコントローラ(EX−BSC)121、リフレッシュタイマ122を含んでいる。また、I/O70には図1のタイマ7、パルス出力回路8、SCI9、A/D変換器10、IOP(A)21〜IOP(F)26、IOP(1)31〜IOP(5)35、割り込みコントローラ11の夫々における内部I/Oレジスタを含む。メモリ71はROM5及びRAM6を意味する。CPG13などの、バスと接続されていない機能ブロック或は回路モジュールは図示を省略してある。
【0060】
外部バスバッファ回路(BUF)72は、前記IOP(A)21〜IOP(F)26、IOP(5)35に含まれるアドレスバッファ及びデータバッファ等である。前記夫々のIOP(D)24〜IOP(E)25にはデータバスのラッチ回路が設けられている。このラッチ回路は符号72Lで示した回路ブロックで代表されている。
【0061】
前記内部バスIDB,IABは、CPU2及びDMAC3に直接接続されるバスである。RAM6やROM5などの内部メモリの高速アクセスのため、メモリ71もバスIDB,IABに接続されている。メモリ71のアクセスは1ステートで行われる。
【0062】
前記内部バスPAB,PDBには、前記I/O70で代表される機能ブロックのレジスタが接続される。バスIAB,IDBとバスPAB,PDBとを分離することによって、CPU2のプログラムリードなどで、主として使用するバスIAB,IDBの負荷(容量性負荷)を軽減し、高速化を図るとともに、未使用時のバスPAB,PDBの状態を保持するなどして、低消費電力化を図ることができる。CPU2及びそのほかの内部バスマスタであるDMAC3が、バスPAB,PDBに接続されている前記I/O70で代表される機能ブロックのレジスタをアクセスする場合は、バスIAB,IDB及びバスコントローラ12を経由して行う。前記I/O70で代表される機能ブロックのレジスタのアクセスは2ステートで行われる。
【0063】
CPU2又はDMAC3は、外部バスEABUS,EDBUSに接続される外部メモリ(図示を省略)などをアクセスする場合、バスIAB,IDBと外部バスバッファ(BUF)72とを経由して行う。
【0064】
前記CPU2及びDMAC3は、排他的にバスIAB,IDBを使用する。このためには、CPU2及びDMAC3がバス権要求信号を出力し、これを内部バスコントローラ120の調停回路120Aが判定して、CPU2又はDMAC3の何れかにバス権を与える。CPU2又はDMAC3は、バス権が与えられたことを確認して、バスIABにアドレス信号を出力し、図示を省略する制御バスにバスコマンドを出力する。バスコマンドは、例えば、リード、ライト、アクセスデータサイズ(バイト、ワード、ロングワード)等を指示する制御コードである。
【0065】
内部バスコントローラ120は、バスIABの内容を確認して、メモリ71へのアクセスであれば、バスIAB,IDBを使用したアクセス制御を行う。また、内部バスコントローラ120は、内部I/O70のレジスタへのアクセスであればバスPAB,PDBを介してI/O70のレジスタアクセスを制御する。
【0066】
外部バスEDBUS,EABUSは、外部バスコントローラ121によって制御される。外部に例えばDRAMを接続する場合のアドレスマルチプレクスなどの制御も外部バスコントローラ121が行う。外部バスを使用できるバスマスタは、CPU2、DMAC3、EXDMAC4、リフレッシュタイマ122、そして図示を省略する外部バスマスタである。それらに対するバス権の調停は調停回路121Aが行う。CPU2及びDMAC3のような内部バスマスタは、一旦、内部バスコントローラ120でバス権が調停され、バス権が与えられたとき、内部バスコントローラ120が外部バス権要求信号EXBREQ1によって外部バス権を外部バスコントローラ121に要求する。換言すれば、内部バスマスタCPU2,DMAC3が、内部バスを使用している限り、内部バスマスタから外部アクセスのための外部バス権要求は起こらない。したがって、外部バスコントローラ121は、内部バスマスタCPU2,DMAC3による内部バスの使用中であっても、これに並行して、リフレッシュタイマ122やEXDMAC4によるリフレッシュや外部バス転送、或いはマイクロコンピュータ1の外部からの外部バス権解放要求を並行に処理することができる。尚、外部バスコントローラ121は、バス権要求信号EXBREQ1によるバス権要求に対してバス権を与えるとき、外部バス権アクノリッジ信号EXBACK1を内部バスコントローラ120に返す。
【0067】
前記リフレッシュタイマ122は一定時間毎に、リフレッシュ要求信号RFREQによって外部バスコントローラ121にリフレッシュ要求を発生する。このリフレッシュ要求が外部バス権要求とも成される。リフレッシュタイマ122が外部バス権を獲得すると、外部バスコントローラ121は、DRAMのリフレッシュとして、CASビフォRASリフレッシュを行う。
【0068】
また、マイクロコンピュータ1の外部からの外部バス権要求信号EXBREQ3によって外部バスコントローラ121に外部バス権要求があったとき、これに対してバス権を与えると、外部バスコントローラ121は、IOP(A)21〜IOP(F)26の外部アドレス出力、外部データ入出力、及び外部アクセス制御信号入出力をハイインピーダンス状態にし、外部のバスマスタによる外部バスの利用を可能にすると共に、外部バス権アクノレッジ信号EXBACK3を活性状態にし、これを外部のバス権要求元に通知する。
【0069】
EXDMAC4は、バスPAB,PDBに接続され、CPU2やDMAC4などの内部バスマスタから転送制御条件等の初期設定などのためにリード/ライトされる。また、EXDMAC4は、外部から与えられるDMA転送要求信号EXDREQi(i=0〜3)により、DMA転送制御動作を開始することになる。このようにしてDMA転送要求があると、EXDMAC4は、外部バスコントローラ121に、外部バス権要求信号EXBREQ2によって外部バス権を要求すると共に、外部バスコマンドを出力し、更に、アドレスバスEXABを介して外部アクセスアドレス信号を発行する。その外部バス要求に対して外部バスコントローラ121がバス権を認める場合、バスコントローラ121は、EXDMAC4に外部バスアクノリッジ信号EXBACK2をアサートする。これによって、EXDMAC4は外部バスアクセスを開始する。
【0070】
IOP(D)24〜IOP(E)25の外部バスバッファは前記ラッチ回路72Lを含んでおり、EXDMAC4のデュアルアドレス転送制御時に、外部バスコントローラ121の指示によって、転送データを一時保持する。また、シングルアドレス転送時には、データ転送開始を意味するデータアクノリッジ信号EXDACKiをデータ転送先或いはデータ転送元とされる入出力回路に出力する。
【0071】
機能ブロックの分割の方法については、特に制限はされず、例えばEXDMAC4と外部バスコンとローラ121を一体のものとしてもよい。
【0072】
図4に内部バスコントローラ120に含まれるアドレスデコード回路の一例を示す。アドレスデコード回路120Dは、CPU2やDMAC3が内部バスIABに出力するアドレス信号をデコードして、ROM5、RAM6、I/O、外部空間のアドレス判定を行う。信号MSROMはROM5のモジュールセレクト信号、MSRAMはRAM6のモジュールセレクト信号、MSIOはI/Oモジュールのセレクト信号、EXTAはマイクロコンピュータ1の外部空間のモジュールセレクト信号である。
【0073】
ROM5は、前記の通り、マイクロコンピュータ1の動作モードによって、図2に示されるエリア0又はエリア1の何れかに配置可能になっている。動作モード又は内部I/Oレジスタの指定によって、信号ROMEを“0”とすることによって、ROM5を使用しないこともできる。
【0074】
I/Oが選択された場合(MSIO=1)は、バスPAB,PDBを用いるバスアクセスが起動され、外部が選択された場合(EXTA=1)、当該信号は、外部バスコントローラ121に外部バス権要求信号EXBREQ1として供給される。
【0075】
図5にはEXDMAC4のレジスタ構成が例示されている。EXDMAC4は、例えば4チャネルを有し、それぞれ、対応する外部リクエストEXDREQi(i=0〜3)によって起動され、シングルアドレス転送、デュアルアドレス転送を行う。図5では1チャネル分のレジスタ構成が例示されている。
【0076】
EXDMAC4のレジスタには、24ビット構成の、ソースアドレスレジスタ(SAR)40、デスティネーションアドレスレジスタ(DAR)41、及び16ビット構成のモードレジスタ(DTMR)42から成る。前記SAR40、DAR41は24ビット長であり、16Mバイトのアドレス空間全領域を指定できる。EXDMAC4は、所謂転送カウントレジスタは持っていない。SAR40またはDAR41で兼用される。即ち、データ転送制御の進行にしたがってSAR40、DAR41の値をインクリメント、又はデクリメントして更新していく。
【0077】
DTMR42の各ビットの機能は次の通りである。ビット15はEDTEビットであり、当該チャネルのEXDMAC4の動作を許可する。EDTEビットが“1”にセットされた状態で、EXDREQiによって転送要求があると、当該チャネルのデータ転送が行われる。
【0078】
ビット14は、DRQSビットであり、EXDREQi信号の活性状態を定義する。前記DRQSビットが入力の選択を行う。“0”にクリアされているとき、ロウレベルセンス、“1”にセットされているとき、立ち下がりエッジセンスが選択される。
【0079】
ビット13はEDEフラグであり、転送チャネルにより所定回数のデータ転送が終了したときに“1”にセットされる。
【0080】
ビット12はEDIEビットであり、割り込みを許可するか否かを決めるビットとされる。EDIEビット、EDEフラグがいずれも“1”にセットされたとき、CPU2に割り込みが要求される。EDIEビットが“1”にセットされた状態で、EDEフラグが“1”にセットされると、同時にEDTEビットが“0”にクリアされ、当該チャネルの動作は中断され、CPU2による処理を待つ。
【0081】
EXDMAC4は転送対象とされるメモリをリングバッファとして利用できるようになっている。すなわち、リングバッファを用いる場合には、転送先又は転送元アドレスを自動的に初期値に回復する(所定ビット以下のビットを”0”にクリアする)ようになているから、CPU2の処理は必要ない。EDIEビットを”0”にクリアしておけば、メモリをリングバッファとして利用できる。ビット10〜8はRPB2〜RPB0ビットであり、リングバッファのサイズ、即ちリピートする単位を指定する。リピートする単位は、64kB(RPB2〜RPB0=B’000)、128kB(RPB2〜RPB0=B’001)、256kB(RPB2〜RPB0=B’010)、512kB(RPB2〜RPB0=B’011)、1MB(RPB2〜RPB0=B’100)、2MB(RPB2〜RPB0=B’101)である。データ転送制御の進行にしたがってアドレス演算器でSAR40、DAR41の値をインクリメントして更新していくとき、RPB2〜RPB0ビットは、その値にしたがって、アドレス演算器に、SAR40、DAR41のビット15、16、17、18、19、20からのキャリ/ボローの伝達を禁止する。キャリー/ボローの伝達が禁止されると、そのとき、禁止されたビットより下位のビットも0にされているから、アドレスは自動的に初期値に戻される。これにより、EXDMAC4は、自動的にリングバッファを構成する如くデータ転送アドレスを制御することができる。
【0082】
ビット7、ビット6は、SM1、SM0ビットであり、データ転送後にSAR40をインクリメントするか、デクリメントするか、固定にするかを指定する。SM1ビットを“0”にクリアすると、SAR40は固定とされる。SM1ビットを“1”にセットした状態で、SM0ビットを“0”にクリアすると、インクリメント、SM0ビットを“1”にセットすると、デクリメントが行なわれる。
【0083】
ビット5、ビット4は、DM1、DM0ビットであり、データ転送後にDAR41をインクリメントするか、デクリメントするか、固定にするかを指定する。DM1ビットを“0”にクリアすると、DAR41は固定とされる。DM1ビットを“1”にセットした状態で、DM0ビットを”0”にクリアすると、インクリメント、DM0ビットを“1”にセットすると、デクリメントが行なわれる。
【0084】
ビット3、ビット2は、MD1、MD0ビットであり、データ転送モードを選択する。MD1ビットを“0”にクリアすると、デュアルアドレスモードとなる。デュアルアドレスモードでは、1回の起動で、SAR40で示されるアドレスから、DAR41で示されるアドレスへ、1回のデータ転送を行なう。この後、SM1、SM0、DM1、DM0ビットの指定に基づいて、SAR40、DAR41の操作が行なわれる。
【0085】
MD0ビットが“0”にクリアされている場合は、SAR40が転送カウント機能を兼用する。SAR40の所定のビットからキャリが発生したときに、所定回数の転送終了と判断され、転送終了フラグEDEが“1”にセットされる。
【0086】
MD0ビットが“1”にセットされている場合は、DARが転送カウント機能を兼用する。
【0087】
MD1ビットを“1”にセットすると、シングルアドレスアドレスモードとなる。シングルアドレスアドレスモードでは、転送元または転送先の一方をアクノレッジ信号EXDACKiで指定する。
【0088】
MD0ビットが“0”にクリアされている場合は、転送先をアクノレッジ信号EXDACKiで指定し、SAR40が転送元のアドレスを指定するとともに、転送カウント機能を兼用する。
【0089】
MD0ビットが“1”にセットされている場合は、転送元をアクノレッジ信号EXDACKiで指定し、SAR40が転送先のアドレスを指定するとともに、転送カウント機能を兼用する。
【0090】
いずれも、SAR40またはDAR41のRPB2〜RPB0ビットによって指定される所定のビットからキャリ/ボローが発生したときに、所定回数の転送終了と判断され、転送終了フラグEDEが“1”にセットされる。
【0091】
ビット0はSZビットであり、1回のデータ転送をバイトサイズで行なうか、ワードサイズで行なうかを選択する。SZビットを“0”にクリアするとバイトサイズ、“1”にセットするとワードサイズのデータ転送が行なわれる。なお、ワードサイズは2バイトである。
【0092】
図6にはEXDMAC4のブロック図が示される。EXDMAC4は、外部から起動要求信号EXDREQi(i=0〜3)を入力する。また、EXDMAC4は、外部バスコントローラ121に対して、外部バス権要求EXBREQ2、外部バスコマンドの発生とアドレスの出力を行い、外部バスコントローラ121から外部バス権アクノレッジ信号EXBACK2、外部バスレディ信号EXBRDYを入力して動作する。シングルアドレス転送時に使用するEXDACKiは、外部バスコマンドで指示される。外部バスレディ信号EXBRDYのネゲートされた状態は、外部バスコントローラ121からEXDMAC4に対するウェイトステート挿入の要求として把握することができる。外部バスコントローラ121から内部バスコントローラ120へのEXBRDYも同様にウェイト挿入の要求として把握することができる。
【0093】
更に、マイクロコンピュータ1内部のバスインタフェースとして、CPU2やDMAC3のリード/ライトのために、内部バスコントローラ120から、モジュールセレクト信号、リード信号、ライト信号が入力され、アドレスバスPAB及びデータバスPDBに接続される。
【0094】
通常のDMAC3は、デュアルアドレスモードの場合、リードしたデータを一旦、DMAC3に格納し、これをライトする。これに対して、EXDMAC4は、この機能を入出力ポートに代替させ、IOP(D)24、IOP(E)25のラッチ回路72Lにデータの一時保持機能を持たせてある。マイクロコンピュータの動作を高速にするに従い、パイプライン的な動作が必要になり、DMAC3自らがバス権を持ったデータ転送のためのリード/ライト動作と、DMAC3に対するCPU2によるデータ転送制御条件の設定のためのリード/ライト動作とが、連続した場合、DMAC3はバスマスタとしての動作とバススレーブとしての動作の遷移が困難になったり、所定のステート内に動作が完結できなかったり、不都合な動作を起こす可能性が大きくなる。この点に対し、EXDMAC4はその不都合を本質的に回避でき、論理的な規模を縮小したり、設計期間を短縮したりできる。また、EXDMAC4によるデータ転送制御途上においても、CPU2は内部バスを用いたアクセス動作を行うことができるので、CPU2によるEXDMAC4内部のレジスタリードを任意のタイミングで行うことができる。したがって、CPU2からEXDMAC4の状態を簡単にモニタできる。
【0095】
また、EXDMAC4は、CPU2と独立したデータ転送を行うことを目的としているが、このとき、デュアルアドレッシングモードなどにおいて、リードデータの一時保持を自モジュールで行おうとすると、専用のデータバスを設ける必要が生じてしまう。EXDMAC4では、かかる専用のデータバスを不要にし、この点でも物理的規模を小さくできる。
【0096】
図6に従えば、EXDMAC4は以下の回路ブロックで構成される。EXDMAC4は、前記DTMR42、DAR41、SAR40のレジスタを夫々4チャネル分備え、各チャネルに共通の制御回路45、データバッファ(DB)44、アドレスバッファ(AB)46、及び算術演算回路(AU)43を有する。これらのブロックは、Aバス、Bバスの2本の内部バスによって結合されている。
【0097】
制御回路45は、起動要求信号EXDREQi(i=0〜3)を検出して動作を開始し、外部バス権要求EXBREQ2、外部バスコマンド及びアドレスを出力すると共に、外部バス権アクノレッジEXBACK2、外部バスレディ信号EXBRDYを入力しつつ、外部バスの動作を行う。一方、モジュールセレクト信号、リード信号、ライト信号、アドレスバスPAB上のアドレス下位ビット、データバスPDBの値に従った、内部レジスタの入出力を行う。
【0098】
前記アドレスバッファ46は、外部アドレス空間が16Mバイトであるのに対応して、24ビット構成であり、Aバスからデータを入力し、リード/ライトするアドレスを保持して、EXABに出力する。
【0099】
前記データバッファ44は16ビット構成であり、データバスPDBと接続され、CPU2がEXDMAC4内部のレジスタをリード/ライトする際のデータの入出力を行う。SAR40、DAR41が24ビット構成であるため、CPU2からは2回に分けてアクセスされるが、このとき、EXDMAC4内部では1回のリード/ライトとし、不都合な動作を行わないようにしている。
【0100】
前記DTMR42、DAR41、及びSAR40の各レジスタの機能は前述の通りであり、Bバスからデータを入力して、Aバスに出力する。前記算術演算回路(AU)43はインクリメント/デクリメント処理を行なう。入力はAバスであり、結果はBバスに出力される。
【0101】
図7にはEXDMAC4の状態遷移図が示される。EXDMAC4は、ステートI(アイドル状態)、ステートS(ソース転送状態)、ステートD(デスティネーション転送状態)の3つの状態を持つ。
【0102】
リセット後には、ステートIに遷移する。ステートIでは、EXDMAC4の起動要求信号EXDREQi(i=0〜3)をサンプリングする。何れかのチャネルのEDTEビットが1にセットされると、当該チャネルのEXDREQi入力を検出する。複数のチャネルが起動された場合は、チャネル0から優先して動作を行う。
【0103】
EXDREQiがイネーブルにされると、ステートSに遷移する。ステートSでは、当該チャネルのSAR40の内容をEXABに出力し、SM1、SM0ビットに従ってSAR40の内容を更新するとともに、外部バスリクエストEXBREQ2とバスコマンドを外部バスコントローラ121に出力する。
【0104】
外部バスコントローラ121は、外部バスリクエストを調停して、所定のタイミングで、EXDMAC4に外部バス権を与えるために、アクノレッジ信号EXACK2を活性状態にし、外部バスを起動する。外部バスが終了すると、外部バスレディ信号EXBRDYはを活性状態にされる。これにより、EXDMAC4はそのバスサイクルを終了できる。
【0105】
シングルアドレスモードでは、EXDMAC4は、バスアクノレッジ信号EXBACK2が活性状態で、外部バスレディEXBRDYを検出すると、動作を終了し、ステートIに遷移する。
【0106】
デュアルアドレスモードでは、アクノレッジ信号が活性状態で、外部バスレディを検出すると、ステートDに遷移する。ステートDでは、当該チャネルのDAR41の内容をアドレスバスEXABに出力し、SM1、SM0ビットに従ってDAR41の内容を更新するとともに、外部バスリクエストEXBREQiとバスコマンドを外部バスコントローラ121に出力する。
【0107】
外部バスコントローラ121は、外部バスを起動する。外部バスが終了すると、外部バスレディ信号EXBRDYを活性状態にする。EXDMAC4は、バスアクノレッジ信号EXBACK2が活性状態で、外部バスレディEXBRDYを検出すると、そのアクセスサイクルを終了し、ステートIに遷移する。
【0108】
尚、シングルアドレスモードの場合は、ステートSのバスコマンドの中で、転送アクノリッジ信号EXDACKiを活性状態にするように指示する。デュアルアドレスモードの場合は、ステートSのバスコマンドの中で、リード後バス権を移譲しない指示と、リードデータをIOP(D)24,IOP(E)25のラッチ回路に一時的に保持させる指示を与える。
【0109】
専用の外部アドレスバスEXABを用いており、バス権の獲得の判定などを行い、これを確認してからバスコマンドとアドレスを出力したりする必要がなく、状態遷移も簡潔に構成でき、論理的規模を抑制できる。
【0110】
図8には前記マイクロコンピュータをプリンタ制御に用いたマイクロコンピュータシステムの一例が示される。
【0111】
プリンタ制御システムは、マイクロコンピュータ1及びセントロニクスインタフェースやユニバーサルシリアルバス(USB)又はオプションなどの受信回路100、DRAMで構成されたバッファRAM101、キャラクタジェネレートROM(CGROM)102、プログラムROM103、印字制御回路104を含み、これらがマイクロコンピュータ1の外部バス105を介して接続される。
【0112】
前記プログラムROM103はエリア0に、バッファRAM101はエリア2に、CGROM102はエリア6に、受信回路100及び印字制御回路104はエリア7に割り当てられている。バッファRAM101にはリード/ライト可能なメモリとして、リフレッシュ動作が必要であるが、安価であることが知られているDRAMが用いられる。図8において、バッファRAM101についてはそのアドレス配置が図示されている。この例に従えば、バッファRAM101は2MB(16Mビット)の記憶容量を有し、その内の1MバイトをCPU2の作業領域に、残りを512kBずつリングバッファとして利用される。
【0113】
図8のシステムでは、更に、印字ヘッド106、バッファ回路107、ラインフィードモータ108、キャリッジリターンモータ109を含み、これらのモータ108,109は、それぞれマイクロコンピュータ1の前記タイマ7の出力、前記パルス出力装置8の出力によって制御される。ラインフィードモータ108、キャリッジリターンモータ109は、特に制限はされないが、ステッピングモータである。
【0114】
図示はされないものの、前記マイクロコンピュータ1のSCI9はホスト装置などとの通信に使用され、前記A/D変換器10は紙枚数などのセンサ情報を入力する。
【0115】
EXDMAC4はセントロニクスインタフェースやユニバーサルシリアルバスなどの複数の受信回路100によるデータの受信を、CPU2の動作と並行して行う。マイクロコンピュータ1は、転送要求信号EXDREQiを入力し、転送アクノリッジ信号EXDACKiによってシングルアドレス転送を行うことができる。例えば、セントロニクスインタフェースのインプットストローブ信号をEXDREQ0に入力し、チャネル0でデュアルアドレス転送を行い、オプションインタフェースの受信信号をEXREQ1に入力し、EXDACK1出力を、オプションインタフェースに与えて、チャネル1でシングルアドレス転送を行う。
【0116】
内部のDMAC3は、印字データの出力、ラインフィードモータ108、キャリッジリターンモータ109を駆動するためにパルスデータの出力を行う。また、SCI9の送信データ、受信データの転送を行なう。このようなDMAC3の使用方法については、前記特開平5−307516号公報に記載されている。
【0117】
なお、半導体集積回路の集積度の向上によって、オプション以外の受信回路100の一部や、印字制御回路104などを1チップのマイクロコンピュータに集積することができる。更に、バッファRAM101などの汎用的なメモリも1チップのマイクロコンピュータに集積することができる。プログラムROM103やCGROM102等のように、個別のプリンタ機種など、マイクロコンピュータシステム毎に変更になるものは、個別の半導体集積回路にする方が都合がよい。いずれの部分を1チップのマイクロコンピュータに搭載するにせよ、バスの論理的な構成が上記と変らなければよい。
【0118】
図9には図8のマイクロコンピュータシステムのバスの動作タイミングの1例が示される。
【0119】
内部バスIAB,IDBは、大部分が、CPU2のROM5からのプログラムリードとRAM6へのデータリード/ライトを1ステートで行っている。この中で、CPU2はT3からPバスPAB,PDBを用いた内部I/Oレジスタ(例えば、A/D変換器)のリード、T12から外部メモリ(例えば、CGROM)のリードを行う。PバスPAB,PDBに接続された回路はRAM6やROM5よりもアクセス速度が遅いので、バスレディー信号BRDYがバスコントローラ120により供給される。
【0120】
DMAC3は、T7から、メモリから内部I/Oレジスタ(例えば、RAM6からパルス出力回路8)への転送を行う。
【0121】
一方、EXDMAC4は、チャネル0がデュアルアドレス転送、チャネル1がシングルアドレス転送とされ、T0でチャネル0が起動され、T7、T14でチャネル1が起動される。なお、起動要求信号EXDREQi(i=0〜3)は、重ねて表示しており、例えば、ch0と記載のある部分が、EXDREQ0が活性状態になったことを示す。
【0122】
T0で、EXDMAC4は、EXDREQ0が活性状態になったのに呼応して、ステートSに遷移し、外部バス権要求と外部バスコマンドを発生し、EXABを出力する。外部バスコマンドは、リードとリード後のバス権移譲禁止、リードデータのラッチなどを指示する。外部バスコントローラ121は外部バス権を調停し、EXBACK2により、直ちに、EXDMAC4に外部バス権を与えて、外部バスを起動する。外部バスコントローラ121は、一旦、バスレディ信号EXBRDYを非活性状態にして、EXDMAC4にウェイトサイクルを挿入させる。
【0123】
外部バスコントローラ121から出力されているバスレディ信号EXBRDYが活性状態に戻されると、EXDMAC4はそのメモリサイクルを終えて、ステートDに遷移し、次の外部バス権要求と外部バスコマンドを発生し、バスEXABにアドレスを出力する。外部バスコマンドは、ライトと、ラッチしたデータの出力などを指示する。外部バスコントローラ121は外部バスを起動する。上記同様に、外部バスコントローラ121は、一旦、EXBRDYを非活性状態にして、EXDMAC4にウェイトサイクルを挿入させる。
【0124】
EXBRDYが活性状態になると、EXDMAC4は、そのメモリサイクルを終え、ステートIに遷移し、待機状態に戻る。
【0125】
T7で、EXDREQ1が活性状態になったのに呼応して、EXDMAC4はステートSに遷移し、外部バス権要求と外部バスコマンドを発生し、EXABを出力する。外部バスコマンドは、リードとEXDACK1の出力などを外部バスコントローラ121に指示する。外部バスコントローラ121は外部バス権を調停し、直ちに、EXBACK2によりEXDMAC4に外部バス権を与えて、外部バスを起動する。上記同様に、一旦EXBRDYを非活性状態にして、EXDMAC4にウェイトサイクルを挿入させる。外部バスコントローラ121は、DRAMエリアのアクセスを判断して、プリチャージ、RAS、CASサイクルを含む4ステートでアクセスする。EXBRDYが活性状態になると、EXDMAC4はステートIに遷移し、待機状態に戻る。
【0126】
更に、T14で、EXDREQ1が活性状態になったのに呼応して、EXDMAC4はステートSに遷移し、外部バス権要求と外部バスコマンドを発生し、EXABを出力する。外部バスコマンドは、リードとEXDACK1の出力などを指示する。このとき、外部バスコントローラ121は外部バス権を調停するが、CPU2による外部リード実行中のため、EXDMAC4に外部バス権を与えず、CPU2による外部リードの終了を待つ。T17でEXDMAC4に外部バス権を与えて、外部バスを起動する。一旦、上記同様バスコントローラ121はバスレディー信号EXBRDYを非活性状態にして、EXDMAC4にウェイトサイクルの挿入を要求する。EXBRDYが活性状態になると、EXDMAC4はステートIに遷移し、待機状態に戻る。
【0127】
DTMR1では、DTIE=0、RPB2〜0=B’011、SM1、0=B’10とされ、512kB単位の繰返し動作が設定されているものとし、T9でSARをインクリメントしたとき、H’5FFFFFからH’580000に更新され、動作を継続する。即ち、H’580000〜H’5FFFFFのバッファRAM101上のリングバッファを構成している。CPU2は、SAR40をリードすることで、リングバッファの入力ポインタを得ることができる。入力ポインタを参照しつつ、リングバッファに蓄積されているデータ量が適正になるように、リングバッファのリードを行うことが容易になる。
【0128】
また、EXDMAC4は、停止せずに動作を継続するから、再起動時に起動要求信号を、不所望に検出したり、検出できなかったりすることがない。
【0129】
CPU2が外部バスを使用したリード/ライトとEXDMAC4による外部バス転送が同時に要求される場合、CPU2かEXDMAC4の何れかが一旦停止状態になるが、CPU2のデータアクセス頻度は低く、またCPU2は連続的にアクセスを行う場合は少なく、EXDMAC4もデータ転送を連続的には行わないから、CPU2やEXDMAC4が長期間停止状態になることを回避できる。少なくとも、CPU2がROM5上でプログラムを実行することと、EXDMAC4による外部バス転送とを並列して行うことができる。換言すれば、CPU2の処理性能を低下させることなく、外部バス転送を行うことができる。また、DMAC3による内部バスによる転送と並行してEXDMAC4による外部でのデータ転送を行うことができる。
【0130】
なお、内部バス権要求や内部バス権アクノレッジ信号を、クロックやバスレディ信号に同期させるなどして、CPU2とDMAC3との間のバス権の移譲をオーバヘッド無く行うことができる。同様にCPU2またはDMAC3の外部アクセスとEXDMAC4との間のバス権の移譲についてもオーバヘッドなく行うことができる。
【0131】
図10には前記汎用のDMAC3とEXDMAC4との双方の機能を有する外部バスDMAC4Aのブロック図が示される。
【0132】
データ転送チャネルは0〜7とし、それぞれ、制御レジスタとしてのDTMR42、SAR40、DAR41、2組の転送カウンタTCR47A,BTCR47Bを有する。算術演算器43Aにシフタ47Cが付加され、内部バスはAバス、Bバス、Cバスの3種類とされている。
【0133】
図10の例では、図6と同様に、外部バスコントローラ121に対するインタフェース、CPU2等とのインタフェースに加えて、内部バスコントローラ120に対するインタフェースとして、内部バス権要求信号、内部バスコマンド、IAB出力と、内部バス権アクノレッジ、内部バスレディ入力、IDB入出力が加えられている。
【0134】
DTMR42のEDTEビットを”1”にセットすると、外部バスコントローラ121に対して、外部バス権要求や外部バスコマンドを出力したりして、外部バス上の転送を、CPU2の内部バス上のプログラム実行と並行して行うことができる。
【0135】
一方、DTMR42の、図示はされないIDTEビットを”1”にセットすると、内部バスコントローラ120に対して、内部バス権要求や内部バスコマンドを出力したりして、内部バス(Iバス)を使用して任意のアドレス間の転送を、CPU2の動作と排他的に行うことができる。
【0136】
図10の構成によれば、8チャネルなどの、限定されたチャネルを相互に融通し合って、使用することができる。外部バスDMAC4Aとしての外部バス転送を2チャネルと、内部バスを使用した転送を6チャネルなどとすることができる。また、算術演算器やバスインタフェースのような論理を共通に利用することができる。複数の起動要求が発生した場合には、外部バス転送の優先順位を高くし、CPU2との並列動作が有効になるようにするとよい。
【0137】
更に、外部バス転送の制御回路と、内部バス転送の制御回路とを別に持ち、それぞれの算術演算器とバスを別に持てば、外部バス転送と内部バス転送とを並列して動作することも可能になる。
【0138】
シングルアドレスモードを選択したときは外部バス転送、デュアルアドレスモードを選択したときは内部バスによる転送、などとし、これに従って選択可能な起動要因を限定すれば、使い勝手をさほど低下させずに、制御ビットを節約することができる。
【0139】
以上説明した実施の態様によれば以下の作用効果を得るものである。
【0140】
〔1〕マイクロコンピュータ1の内部バスの制御と外部バスの制御とを独立にし、内部バスを用いたCPU2の動作と、EXDMAC4による外部バスを用いて行うデータ転送とを独立に行うことにより、マイクロコンピュータ1の処理性能を向上することができる。
【0141】
〔2〕外部バスコントローラ121に、アドレス空間を分割して、メモリの種類やバス幅、アクセスステート数などのバス仕様を設定可能にし、CPU2そのほかの内部バスマスタDMAC3による外部バスアクセスとEXDMAC4による外部アクセスを、外部バスコントローラ121によって一括して制御することによって、内部バスを使用しないEXDMAC4についても、CPU2、DMAC3と同様の外部バスアクセスを可能にし、論理的規模の増加を縮小できる。
【0142】
〔3〕外部バスコントローラ121が出力するアドレスやバスコマンドなどをバスEXABを介して伝達される専用の信号とすることにより、外部バスDMACの制御信号や状態遷移などを動作を簡潔にし、論理的規模を縮小できる。
【0143】
〔4〕外部バスコントローラ121により、CPU2、DMAC3による外部バスアクセスとEXDMAC4、或はそのほかの外部バス権要求とを調停することによって、CPU2、DMAC3による外部バスアクセスとEXDMAC4との間の外部バス権移譲時のオーバヘッドをなくすことができ、さらに処理性能を向上できる。
【0144】
〔5〕CPU2のプログラム格納用の内蔵ROM5を、CPU2のベクタを含まないように、動作モードなどで選択可能にすることにより、全体的な処理プログラムを外部のROMに、高速処理が必要なプログラムなどを内蔵ROM5に格納することができ、プログラムの変更に対する柔軟性など使い勝手を向上することができる。
【0145】
〔6〕EXDMAC4は、複数のチャネルを有し、それぞれのチャネルが独立の外部転送要求入力を持つことにより、使い勝手を向上し、処理性能を向上することができる。シングルアドレス転送をサポートすることにより、転送に必要なバスサイクルを減少し、更に処理性能を向上できる。
【0146】
〔7〕EXDMAC4は、受信回路100からバッファRAM101のような、外部バス転送に適した機能とすることにより、論理的規模を縮小できる。転送カウンタをアドレスカウンタと兼用して、レジスタ数を減らしたり、転送データの一時保持など、入出力ポートなどのラッチ回路72Lで行うことにより、EXDMAC4へのデータバスを不要としたりして、物理的な規模を縮小できる。また、CPU2、DMAC3からのアクセスと、EXDMAC4自体のデータ転送との競合動作を、本質的に回避して、論理構成を更に簡潔にし、また、開発期間などの短縮も図れる。
【0147】
〔8〕転送元/転送先のアドレスレジスタ40,41の所定ビットから上位のビットを固定にして、繰返し動作を可能にし、CPU2の負荷なく、前記バッファRAM101上などに、容易にリングバッファを構成できる。バッファの開始アドレスや終了アドレスを任意に指定できなくても、バッファRAM101のような大容量のメモリにあっては、大きな不都合は生じない。CPU2は、随時EXDMAC4の内容をリード/ライトできるから、リングバッファ上に蓄積されたデータ量の管理などを容易にすることができる。繰返し動作可能とすることによって、CPU2の割り込み処理のような負荷をなくすことができる。
【0148】
〔9〕内部バスに接続されたDMAC3による内部バス上の転送と、EXDMAC4による外部バスを用いて行うデータ転送とを独立に行うことにより、マイクロコンピュータ1の処理性能を向上することができる。プリンタなどのマイクロコンピュータシステムにおいて、モータ駆動のためなどのDMAC3による内部バス上の転送と、受信回路100のバッファRAM101への転送などの外部バスを用いて行う転送を同時に行うことを可能にして、マイクロコンピュータシステムの処理性能を向上できる。
【0149】
〔10〕マイクロコンピュータ1と受信回路100などを同一の半導体集積回路として実現することにより、システムの小型化などを図ることができる。
【0150】
〔11〕内部バスに接続されたDMAC3と、外部バス転送に適した機能のみを有する外部バスコントローラ121を内蔵することにより、全体的なチャネル数を増加させながら、論理的規模の増加を最小限にすることができる。また、内部バスに接続されたDMAC3は汎用的な機能を持つことにより、使い勝手を低下させることがない。
【0151】
〔12〕内部バスに接続されたDMAC3と、EXDMAC4を一体のモジュールとして構成することによって、限定されたチャネルを相互に融通し合って、使用することができる。また、バスインタフェースのような論理を共通に利用することができる。
【0152】
以上本発明者によってなされた発明は、上記実施の態様の記載に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能である。
【0153】
例えば、DMAC3,4のアドレスレジスタのビット数は24ビットに限定されない。そのアドレスビット数はCPUまたは半導体集積回路装置のアドレス空間に応じて、変更できる。例えば、4Gバイトのアドレス空間であれば、32ビットとすればよい。
【0154】
第1のデータ転送装置における転送モードなども種々変更可能である。リングバッファの容量についても変更可能である。リングバッファの容量を指定する別のレジスタを持ってもよい。或は、転送カウンタを独立にもってもよい。シングルアドレスモードのみに限定して、アドレスレジスタを1本とすることも可能である。
【0155】
マイクロコンピュータの構成についても限定されない。そのほかや機能ブロックを内蔵することも可能である。DMACの他に、内部バスに接続された、データトランスファコントローラのような、別のデータ転送装置を内蔵してもよい。データトランスファコントローラについては、平成7年3月(株)日立製作所発行『H8S/2655シリーズ ハードウェアマニュアル』などに記載されている。
【0156】
また、EXDMACやバスコントローラ、内部バスの構成など、具体的な回路構成についても種々変更可能である。IAB,IDBのような内部バスとPAB,PDBのような内部バスとを一体に構成することもできる。
【0157】
マイクロコンピュータシステムは、プリンタに限定されない。例えば、デジタル通信システムなどに用いることができる。受信回路からバッファRAMへ転送し、復調や誤り訂正などを行い、更に変調を行って、別のバッファRAMに格納し、バッファRAMから送信回路へ転送する場合など、受信回路からバッファRAMへの転送、バッファRAMから送信回路への転送に、EXDMACを使用し、そのほかのCPUなどのプロセッサの処理と並行して、外部データ転送制御を可能にし、処理性能を向上できる。
【0158】
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるROM内蔵マイクロコンピュータに適用した場合について説明したが、それに限定されるものではなく、ROMを内蔵しないマイクロコンピュータ、デジタルシグナルプロセッサ(DSP)を中心にしたマイクロコンピュータにも適用可能であり、本発明は少なくとも、データ処理装置とデータ転送装置を内蔵した条件のものに適用することができる。
【0159】
【発明の効果】
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。
【0160】
すなわち、第1のデータ転送装置による外部バス上のデータ転送と、CPUによる内部バスを用いた命令実行等とを並列に動作可能なようにバスとバスコントローラを構成することによって、マイクロコンピュータの処理性能を向上し、使い勝手を向上すると共に、論理的・物理的規模を最小限にすることができる。
【0161】
DMACのようなデータ転送装置を内蔵したマイクロコンピュータによるデータ処理のトータル性能を向上させることができる。
【0162】
上記マイクロコンピュータを適用したマイクロコンピュータシステムは、外部との間のデータ転送制御及びマイクロコンピュータ内部の演算処理を並列的に処理可能であって、しかも処理のオーバーヘッドが少なく、物理的な規模の増大も最小限とすることができる。
【図面の簡単な説明】
【図1】本発明に係るマイクロコンピュータの一例を示すブロック図である。
【図2】図1のマイクロコンピュータにおけるアドレスマップの一例を示す説明図である。
【図3】図1のマイクロコンピュータをバス構成を主眼に示したブロック図である。
【図4】バスコントローラに含まれるアドレスデコーダの一例を示すブロック図である。
【図5】外部バスDMACのレジスタ構成の一例を示すブロック図である。
【図6】外部バスDMACの全体を示すブロック図である。
【図7】外部バスDMACの状態遷移図である。
【図8】図1のマイクロコンピュータを適用したシステムの一例を示すブロック図である。
【図9】マイクロコンピュータの動作タイミングの一例を示すタイミングチャートである。
【図10】外部バスDMACの別の例を示すブロック図である。
【符号の説明】
1 マイクロコンピュータ
2 中央処理装置
3 DMAC
4 EXDMAC
5 ROM
6 RAM
IDB,PDB 内部データバス
IAB,PAB,EXAB 内部アドレスバス
12 バスコントローラ
120 内部バスコントローラ
121 外部バスコントローラ
122 リフレッシュタイマ
21〜26 IOポート
31〜35 IOポート
40 ソース・アドレス・レジスタ(SAR)
41 ディスティネーション・アドレス・レジスタ(DAR)
42 データ転送モードレジスタ(DTMR)
43 算術演算器(AU)
44 データバッファ(DB)
45 制御回路
46 アドレスバッファ(AB)
100 受信回路
101 バッファRAM
102 CGROM
103 プログラムROM
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a microcomputer incorporating a central processing unit and a data transfer device, and further to a microcomputer system using such a microcomputer.
[0002]
[Prior art]
As an example of a microcomputer, “LSI handbook” P540 and P541 issued by Ohm on November 30, 1984 includes a ROM (read only memory) for holding programs and a data holding centering on a central processing unit (CPU). For example, a functional block such as a random access memory (RAM) and an input / output circuit for inputting / outputting data is formed on one semiconductor substrate.
[0003]
Some microcomputers have a built-in direct memory access controller (DMAC) and can transfer data independently of the CPU. JP-A-5-307516 is an example of a document describing such a microcomputer.
[0004]
Some microcomputers have an external bus right release function for releasing the bus right to the outside and can operate the internal bus such as ROM read by the CPU even while the external bus right is released. . If a DMAC is connected to the external bus of such a microcomputer, the operation of the internal bus such as ROM read by the CPU and the data transfer on the external bus by the external DMAC can be performed in parallel.
[0005]
[Problems to be solved by the invention]
The present inventor studied the microcomputer with built-in DMAC, a system using the microcomputer, and a system in which a DMAC is connected outside the microcomputer having the external bus release function.
[0006]
First, in a microcomputer with built-in DMAC, the DMAC can be activated by an interrupt request, and can perform a repeat mode, a block transfer mode, and the like. In a system such as a printer, a microcomputer with a built-in DMAC is suitable for controlling stepping motors (plural), controlling printer print data, and storing received data in a memory. The DMAC has a plurality of data transfer channels. be able to.
[0007]
However, the DMAC transfer control is independent of the operation of the CPU. However, since the bus is shared, the bus cycle required for data transfer stops the operation of the CPU. For example, when data is transferred from the RAM to the input / output circuit by the built-in DMAC, if the RAM access is set to two states, the input / output circuit access is set to three states, and one dead cycle is included, the data transfer includes six states. Cost. During this period, the CPU cannot use the bus. Although not particularly limited, here, one cycle of a reference clock of a data processing LSI such as a microcomputer is defined as one state.
[0008]
On the other hand, in a system in which a DMAC is connected to the outside of the microcomputer having the external bus release function, the operation of the internal bus such as the ROM read of the CPU and the data transfer on the external bus by the external DMAC are performed. Can be done in parallel.
[0009]
However, when the external bus right is released, it is necessary to recognize an acknowledge signal, a request signal, etc. with the outside when the bus right is exchanged, and at least an extra operation time is required. Further, in order to prevent the microcomputer and the external DMAC bus from colliding with each other, there is a time when both do not use the bus, and an overhead unrelated to the actual operation is likely to occur. If overhead occurs before and after a single data transfer, it cannot be ignored compared to the actual data transfer time. Moreover, if a general-purpose DMAC is used for the DMAC outside the microcomputer, functions that are not used are generated, which is not a good solution in terms of cost effectiveness. Further, although it is possible to individually develop a DMAC suitable for each system, newly developing a separate LSI from the microcomputer tends to be disadvantageous in terms of manufacturing costs.
[0010]
Further, for example, in a system such as a printer, during printing, it is necessary to drive a stepping motor for driving the printer, and it is also necessary to perform data processing unique to the system such as processing of print data. It is necessary to receive data asynchronously with the operating state of the printer. In order to increase the speed and accuracy of the printer, it is necessary to improve the processing capacity of the microcomputer.
[0011]
As described above, the present inventor has found the importance of the viewpoint of incorporating a data transfer device such as DMAC in a microcomputer and improving the total performance of processing by the microcomputer.
[0012]
An object of the present invention is to provide a microcomputer capable of improving the total performance of data processing by a microcomputer incorporating a data transfer device such as a DMAC.
[0013]
Another object of the present invention is to minimize the increase in physical and logical scale and to enable parallel processing of data transfer control on the external bus of the microcomputer and CPU operation such as internal bus access by the built-in CPU. It is to provide a microcomputer capable of performing the above.
[0014]
Still another object of the present invention is to enable data transfer control between a microcomputer and the outside and arithmetic processing inside the microcomputer to be performed in parallel, with little processing overhead and an increase in physical scale. It is another object of the present invention to provide a microcomputer system that can be minimized.
[0015]
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.
[0016]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0017]
That is, a first data transfer device (4) such as a direct memory access controller for controlling data transfer on the external bus of the microcomputer (1) is provided, and the first data transfer device on the external bus The data transfer at the same time and the instruction execution using the first internal bus (IAB, IDB) by the data processing device (2) such as CPU can be performed in parallel. More specifically, the microcomputer (1) performs bus control and arbitration of the bus right, bus interface means (72) that enables the first internal bus or the first data transfer device to be connected to an external bus. Bus control means (12), wherein the bus control means is an access operation only inside the microcomputer using the first internal bus, and an external address via the bus interface means by the first data transfer device. It enables parallel access operations in space.
[0018]
Since the data transfer on the external bus by the first data transfer device and the instruction execution using the internal bus by the data processing device such as the CPU can operate in parallel, the processing performance of the microcomputer can be improved. Data transfer on the external bus can be performed without degrading the processing performance of the data processing apparatus.
[0019]
The bus control means (12) can be constituted by an internal bus controller and an external bus controller. The external bus controller divides the address space so that bus specifications such as the type of memory, the bus width, and the number of access states can be set, and an external bus right request by a bus master such as a data processing device such as a CPU, It can be configured to arbitrate between an external bus right request by the first data transfer device and a bus right request from outside the microcomputer. Thereby, control of internal access using the first internal bus by the data processing device in parallel with external bus access by the first data transfer device, and external bus access using the first internal bus by the data processing device And the external bus access by the first data transfer device can be easily realized by individual logic, and both ease of control contents and suppression of increase in the control logic scale are simplified.
[0020]
At this time, if the address or bus command output from the first data transfer device is supplied to the bus interface means via a dedicated signal line such as a second internal bus (EXAB), the first data transfer device The state transition control operation can be simplified, and the logical scale can be reduced.
[0021]
In addition, the external bus controller arbitrates the external bus right request including the bus right request from the outside of the microcomputer together with the external bus right request by the first data transfer device built in the microcomputer. And the first data transfer apparatus can reduce the overhead when transferring the external bus right, and can further improve the processing performance.
[0022]
A storage means (6) such as a ROM for storing a program of a data processing device such as a CPU can be made selectable in an operation mode so as not to include a vector of the data processing device such as a CPU. As a result, the overall processing program can be stored in the external ROM, and the program that requires high-speed processing can be stored in the built-in ROM, thereby improving usability such as flexibility in changing the program.
[0023]
The activation factor and transfer mode of the first data transfer device can be limited to functions necessary for data transfer on the external bus. This can reduce the physical scale.
[0024]
The number of registers can be reduced by determining the transfer address in the first data transfer apparatus and using the address specifying means (40, 41) in which the initial value of the address information is specified also as the transfer count register.
[0025]
Further, by temporarily holding data read from the source address in the dual address transfer by the latch circuit (72L) such as an input / output port constituting the bus interface means (72), such data is transferred to the first data. The data bus leading to the transfer device becomes unnecessary, and the physical scale can be reduced.
[0026]
If the first data transfer device also supports single address transfer, the bus cycle required for transfer can be shortened and the processing performance can be further improved.
[0027]
The first data transfer device can have a plurality of data transfer channels. At this time, an external data transfer activation request signal can be assigned to each channel. Thereby, the usability of data transfer control in the microcomputer system is improved, and the processing performance can be improved.
[0028]
An external buffer memory can be easily used as a ring buffer by performing address updating by repeatedly storing operation results for an address designating means such as a register for storing transfer addresses. If a data processing device such as a CPU can read / write a register such as the addressing means in the first data transfer device via the third internal bus (PAB, PDB) as needed, the ring The amount of data stored on the buffer can be easily managed.
[0029]
In enabling the repetitive address update operation for use as the ring buffer, carry / borrow propagation may be prohibited by a predetermined bit when the address information of the addressing means is incremented / decremented. By prohibiting carry / borrow propagation with a predetermined bit, the function as a ring buffer can be realized with a minimum physical scale. Even if the start address and the end address of the ring buffer cannot be arbitrarily designated, there is no great inconvenience when a large-capacity memory such as an external RAM is used for the ring buffer. By making the operation repeatable, it is possible to eliminate a load such as interrupt processing for a data processing device such as a CPU.
[0030]
For temporary storage of transfer data at the time of dual address transfer, the input / output port of the bus interface means or the like can be used so that the first data transfer device itself does not directly input / output transfer data. As a result, the data input / output by the first data transfer device is not read / written by the first data transfer device itself, but is only read / written by a data processing device such as a CPU. The conflict between the access from other bus masters such as a processing device and the data transfer of the first data transfer device itself can be essentially avoided, the logical configuration can be further simplified, and the microcomputer development period can be shortened. Also contributes.
[0031]
In addition to the data processing device such as the CPU and the first data transfer device such as the DMAC, the second can support the data transfer control inside and outside the microcomputer connected to the internal bus for the conventional microcomputer. The data transfer device (3) can also be incorporated. As a result, the first data transfer device has a configuration specialized for data transfer control related to the external bus as compared with a case where a data transfer channel necessary for general-purpose DMAC is used for internal and external DMA transfer control. Therefore, even if the necessary number of data transfer channels are provided, an increase in logical scale can be minimized.
[0032]
When the bus control means also enables refresh control of a DRAM or the like, the refresh timer may perform bus right arbitration as an external bus right request source.
[0033]
By configuring the second data transfer device connected to the first internal bus and the first data transfer device as an integrated module, limited data transfer channels can be used interchangeably. be able to.
[0034]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing an example of a microcomputer according to the present invention. The microcomputer 1 shown in the figure is a semiconductor integrated circuit formed on one semiconductor substrate (one chip) such as single crystal silicon.
[0035]
The microcomputer 1 includes a central processing unit (CPU) 2, a DMA controller (DMAC) 3 as a second data transfer device, an external bus DMAC (EXDMAC) 4 as a first data transfer device, and a read-only memory (ROM). 5, random access memory (RAM) 6, timer 7, pulse output circuit 8, serial communication interface (SCI) 9, A / D converter (A / D) 10, interrupt controller 11, bus controller 12, clock oscillator (CPG) ) 13, functional blocks of input / output port (IOP (A)) 21 to input / output port (IOP (F)) 26 and input / output port (IOP (1)) 31 to input / output port (IOP (5)) 35 (Also referred to as a module).
[0036]
The CPU 2 is the main operation, and mainly operates by reading commands from the ROM 5. Although not shown in particular, the CPU 2 fetches an instruction, decodes the fetched instruction and generates a control signal for each part, and performs an address operation and a data operation in accordance with the control signal from the instruction control unit. And an operation execution unit for executing instructions.
[0037]
The DMAC 3 shares the buses IAB and IDB with the CPU 2 and can perform data transfer control on behalf of the CPU 2. The DMAC 3 is a circuit module that can perform data transfer control in place of the CPU 2 both inside and outside the microcomputer 1.
[0038]
The EXDMAC 4 exclusively controls data transfer on the external bus, and can perform data transfer control to the outside in parallel with the operation of the CPU 2 or DMAC 3 on the internal bus. The EXDMAC 4 can only control data transfer to the outside of the microcomputer 1. In other words, the EXDMAC 4 can control data transfer between memories provided outside the microcomputer 1 in the dual addressing mode, and data between the external memory of the microcomputer 1 and the external input / output circuit of the microcomputer 1 can be controlled. Transfer control is enabled in single addressing mode.
[0039]
The details of the EXDMAC 4 will be described later, but the outline will be described here. The CPU 2 sets data transfer control conditions for the EXDMAC 4 via the bus controller 12 and the buses PDB and PAB. The EXDMAC 4 is arbitrated exclusively with an external access request by a bus master module such as the CPU 2 or the DMAC 3 to obtain a bus right. Address signals for external data transfer control by the EXDMAC 4 can be output to the outside from the IOP (A) 21 to IOP (C) 23 via the bus EXAB. At this time, in the data transfer in the dual addressing mode by EXDEMAC4, the transfer data is not temporarily taken in the EXDMAC4, but is temporarily held in the latch circuits inside the IOPD24 and IOPE25.
[0040]
The functional blocks of the microcomputer 1 will be further described in detail. The functional blocks of the microcomputer 1 are connected to each other by an internal bus. The internal bus has a control bus (not shown) in addition to an address bus and a data bus. The control bus includes a bus right request signal, a bus acknowledge signal, a bus command, an external bus command, a ready signal, an external bus ready signal, a read signal / write signal, a bus size signal, and a system clock. IAB, PAB, and EXAB are internal address buses, and IDB and PDB are internal data buses. These buses are connected to the bus controller 12. Internal buses IAB and IDB are connected to CPU2, DMAC3, ROM5, RAM6, and bus controller 12, and internal address bus IAB is connected to IOP (A) 21 to IOP (C) 23 for external address output. The data bus IDB is connected to the IOP (D) 24 and IOP (E) 25 for external data input / output.
[0041]
The internal buses PAB and PDB are the bus controller 12, EXDMAC 4, timer 7, pulse output circuit 8, SCI 9, A / D converter 10, interrupt controller 11, IOP (A) 21 to IOP (F) 26, and IOP (1 ) 31 to IOP (5) 35.
[0042]
The internal address bus EXAB is connected to the EXDMAC 4, the bus controller 12, and the IOP (A) 21 to IOP (C) 23.
[0043]
The bus controller 12 determines an access destination and refers to an address signal in order to select an operation according to the bus specification. Accordingly, the bus controller 12 need only input upper address bits for determining the area from the address bus. Address output for external data transfer control by EXDMAC 4 is performed via an address bus EXAB.
[0044]
The bus controller 12 includes an internal bus controller 120, an external bus controller 121, a refresh timer 122, and the like. Address output to the outside of the microcomputer 1 is performed via the IOP (A) 21 to IOP (C) 23. Data input / output to the outside of the microcomputer 1 is performed via the IOP (D) 24 and the IOP (E) 25.
[0045]
The CPU 2 and the DMAC 3 can use the internal bus as an internal bus master, and the internal bus arbiter (internal bus arbitration circuit) of the bus controller 12 arbitrates the bus use request in accordance with each bus right request signal. As for external access, the external bus arbiter of the bus controller 12 (external bus access by the CPU 2 or DMAC 3, EXDMAC 4, bus right release request from the outside of the microcomputer, refresh request from the refresh timer 122, according to each bus right request signal. The external bus arbitration circuit arbitrates.
[0046]
ROM 5, RAM 6, timer 7, pulse output circuit 8, SCI 9, A / D converter 10, IOP (A) 21 to IOP (F) 26, IOP (1) 31 to IOP (5) 35, interrupt controller 11 Each of the functional blocks and EXDMAC 4 are read / written by the CPU 2 or DMAC 3 as internal bus slaves. The case where the EXDMAC 4 is accessed as a bus slave is a case where data transfer conditions and the like are set by the CPU 2 or the like.
[0047]
The interrupt controller 11 inputs interrupt signals output from the timer 7, the SCI 9, the A / D converter 10, and the input / output port, and outputs an interrupt request signal to the CPU 2 and an activation request signal to the DMAC 3. Also, a clear signal output from the DMAC 3 is input, and an interrupt clear signal is output. These interrupt signals are not shown.
[0048]
The input / output ports 21 to 26 and 31 to 36 are also used for input / output of external bus signals and input / output signals of the input / output circuit. The IOP (A) 21 to IOP (C) 23 are used as address bus outputs, the IOP (D) 24 and IOP (E) 25 are used as data bus inputs / outputs, and the IOP (F) 26 is also used as bus control signal input / output signals. Yes. The external address bus and the external data bus are connected to buses IAB, IDB, and EXAB through buffer circuits included in these input / output ports, respectively. The buses PAB and PDB are used for reading / writing the registers of the input / output ports, and are not directly related to the external bus. The bus control signal output includes an address strobe, a high / low data strobe, a read strobe, a write strobe, and a bus acknowledge signal. The bus control input signal includes a wait signal and a bus request signal. These input / output signals are not shown. The expansion of the external bus is selected by an operation mode or the like, and the functions of these input / output ports are also selected.
[0049]
IOP (1) 31 is a timer input / output, IOP (2) 32 is a pulse output, IOP (3) 33 is an SCI input / output, IOP (4) 34 is an analog input, and IOP (5) 35 is EXDMAC4 and DMAC3. This is also used for input / output of a transfer request signal and a transfer acknowledge signal. EXDMAC4, DMAC3, timer 7, SCI9, pulse output 8, input / output signals between the A / D converter 10 and IOP (1) 31 to IOP (5) 35, internal interrupt request signals, etc. are not shown.
[0050]
In addition, there are input terminals such as power terminals Vcc and Vss, analog power terminals AVcc and AVss, reset input RES, standby input STBY, interrupt input NMI, clock inputs EXTAL and XTAL, operation mode inputs MD0, MD1, and MD2.
[0051]
FIG. 2 illustrates an address map of a predetermined operation mode of the microcomputer 1. The address space is not particularly limited, but is 16 Mbytes, and an address is assigned for each byte.
[0052]
Each functional block has a unique address on the address space of the CPU 2 regardless of the bus to be connected. The I / O (data input / output means) includes the timer 7, DMAC 33, EXDMAC 4, pulse output circuit 8, SCI 9, A / D converter 10, IOP (A) 21 to IOP (F) 26, IOP in FIG. (1) 31 to IOP (5) 35 and the internal I / O registers of the interrupt controller.
[0053]
Although ROM ROM 5 is not particularly limited, it is 32 kbytes, mapped to addresses H′200000 to H′207FFF, RAM6 is mapped to 2 kbytes, mapped to addresses H′FFF700 to H′FFFEFF, and I / O is an address It is mapped to H'FFFF00 to H'FFFFFF. H ′ represents a hexadecimal number.
[0054]
Other addresses are set as an external address space. Since the CPU2 vector exists at the head of the address space, it is necessary to connect a ROM for storing the program to the outside including this part.
[0055]
A ROM for storing a program, a DRAM for data, other circuits (ASIC), and the like are connected to the external address space as needed. The external address space is divided into 8 areas 0 to 7 in units of 2 MB, each bus specification can be set, and an area selection signal can be output. Different memories can be easily connected to each area. In areas 2 to 5, an address multiplex for accessing the DRAM and a DRAM interface capable of executing the high-speed page mode can be selected. Such bus control is described in “H8S / 2655 Series Hardware Manual” published by Hitachi, Ltd. in March 1995.
[0056]
The built-in ROM 5 is easy to access at high speed with respect to the external ROM. Further, the contents of the built-in ROM 5 are not output to the outside as long as they are read by the internal CPU 2 and DMAC 3. This is because the bus controller 12 keeps the IOP (D) 24 and IOP (E) 25 for data input / output in an inoperable state for the access of the address mapped in the ROM 5.
[0057]
When the built-in ROM 5 is a mask ROM, changing the contents means changing the entire microcomputer 1 and is difficult to change. On the other hand, when the built-in ROM 5 is an electrically writable ROM such as a flash memory, the cost tends to increase undesirably because the manufacturing process becomes complicated. On the other hand, although it is difficult to access the external ROM at high speed, the change in the contents is only the change in the external ROM, and the external ROM is general-purpose, so it is often inexpensive. If the program is changed, the size of the program changes, so the CPU vector is often changed. According to the address map of FIG. 2, a program that requires high-speed processing and is unlikely to be changed, or a program whose contents are not desired to be known by a third party is stored in the built-in ROM 5, and the CPU vector. By storing the entire processing including the above in an external ROM, it is possible to improve processing performance, improve usability, reduce costs, and the like.
[0058]
Depending on the operation mode, the address of the built-in ROM 5 may be changed to area 0 so as to include the CPU vector. A microcomputer system can be configured without requiring an external ROM for storing programs.
[0059]
FIG. 3 shows the bus configuration of the microcomputer 1 in more detail. As described above, the bus controller 12 includes an internal bus controller (I-BSC) 120, an external bus controller (EX-BSC) 121, and a refresh timer 122. The I / O 70 includes the timer 7, the pulse output circuit 8, the SCI 9, the A / D converter 10, the IOP (A) 21 to IOP (F) 26, and the IOP (1) 31 to IOP (5) 35 shown in FIG. , Including an internal I / O register in each of the interrupt controllers 11. The memory 71 means the ROM 5 and the RAM 6. Functional blocks or circuit modules that are not connected to the bus, such as the CPG 13, are not shown.
[0060]
The external bus buffer circuit (BUF) 72 is an address buffer, a data buffer, or the like included in the IOP (A) 21 to IOP (F) 26 and IOP (5) 35. Each of the IOP (D) 24 to IOP (E) 25 is provided with a data bus latch circuit. This latch circuit is represented by a circuit block denoted by reference numeral 72L.
[0061]
The internal buses IDB and IAB are buses directly connected to the CPU 2 and the DMAC 3. A memory 71 is also connected to the buses IDB and IAB for high-speed access to internal memories such as the RAM 6 and the ROM 5. Access to the memory 71 is performed in one state.
[0062]
To the internal buses PAB and PDB, functional block registers represented by the I / O 70 are connected. By separating the buses IAB and IDB from the buses PAB and PDB, the load (capacitive load) of the buses IAB and IDB that are mainly used is reduced by the program read of the CPU 2, etc. The power consumption can be reduced by maintaining the state of the buses PAB and PDB. When the CPU 2 and the other internal bus master DMAC 3 access the registers of the functional blocks represented by the I / O 70 connected to the buses PAB and PDB, they pass through the buses IAB and IDB and the bus controller 12. Do. Access to the registers of the functional block represented by the I / O 70 is performed in two states.
[0063]
When the CPU 2 or DMAC 3 accesses an external memory (not shown) connected to the external buses EABUS and EDBUS, the CPU 2 or DMAC 3 performs the access via the buses IAB and IDB and the external bus buffer (BUF) 72.
[0064]
The CPU 2 and DMAC 3 use buses IAB and IDB exclusively. For this purpose, the CPU 2 and the DMAC 3 output a bus right request signal, which is judged by the arbitration circuit 120A of the internal bus controller 120 and gives the bus right to either the CPU 2 or the DMAC 3. The CPU 2 or DMAC 3 confirms that the bus right is given, outputs an address signal to the bus IAB, and outputs a bus command to a control bus (not shown). The bus command is a control code that indicates, for example, read, write, access data size (byte, word, longword) and the like.
[0065]
The internal bus controller 120 confirms the contents of the bus IAB and performs access control using the buses IAB and IDB if it is an access to the memory 71. Further, the internal bus controller 120 controls the register access of the I / O 70 via the buses PAB and PDB if it is an access to the register of the internal I / O 70.
[0066]
The external buses EDBUS and EABUS are controlled by the external bus controller 121. The external bus controller 121 also performs control such as address multiplexing when a DRAM is connected to the outside. The bus masters that can use the external bus are CPU2, DMAC3, EXDMAC4, refresh timer 122, and external bus master not shown. The arbitration circuit 121A performs arbitration of the bus right for them. The internal bus masters such as the CPU 2 and the DMAC 3 once arbitrate the bus right by the internal bus controller 120, and when the bus right is given, the internal bus controller 120 transfers the external bus right by the external bus right request signal EXBREQ1. Request to 121. In other words, as long as the internal bus masters CPU2 and DMAC3 use the internal bus, an external bus right request for external access does not occur from the internal bus master. Therefore, the external bus controller 121 can perform refresh or external bus transfer by the refresh timer 122 or EXDMAC 4 or external bus transfer in parallel with the internal bus masters CPU2 and DMAC3 even when the internal bus is being used by the internal bus masters CPU2 and DMAC3. External bus authority release requests can be processed in parallel. The external bus controller 121 returns the external bus right acknowledge signal EXBACK1 to the internal bus controller 120 when giving the bus right to the bus right request by the bus right request signal EXBREQ1.
[0067]
The refresh timer 122 generates a refresh request to the external bus controller 121 by a refresh request signal RFREQ at regular intervals. This refresh request is also made an external bus request. When the refresh timer 122 acquires the external bus right, the external bus controller 121 performs CAS before RAS refresh as DRAM refresh.
[0068]
Further, when an external bus right request is given to the external bus controller 121 by the external bus right request signal EXBREQ3 from the outside of the microcomputer 1, when the bus right is given to this, the external bus controller 121 makes the IOP (A) The external address output, the external data input / output, and the external access control signal input / output of 21 to IOP (F) 26 are set in a high impedance state to enable the use of the external bus by an external bus master, and the external bus right acknowledge signal EXBACK3 Is activated, and this is notified to the external bus requester.
[0069]
The EXDMAC 4 is connected to the buses PAB and PDB, and is read / written from an internal bus master such as the CPU 2 or the DMAC 4 for initial setting of transfer control conditions. The EXDMAC 4 starts the DMA transfer control operation in response to a DMA transfer request signal EXDREQi (i = 0 to 3) given from the outside. When there is a DMA transfer request in this way, the EXDMAC 4 requests an external bus right from the external bus controller 121 by an external bus right request signal EXBREQ2, outputs an external bus command, and further passes through the address bus EXAB. Issue external access address signal. When the external bus controller 121 grants the bus right for the external bus request, the bus controller 121 asserts the external bus acknowledge signal EXBACK2 to the EXDMAC4. As a result, the EXDMAC 4 starts external bus access.
[0070]
The external bus buffers of IOP (D) 24 to IOP (E) 25 include the latch circuit 72L, and temporarily hold transfer data according to an instruction from the external bus controller 121 during the EXDMAC4 dual address transfer control. Further, at the time of single address transfer, a data acknowledge signal EXDACKi indicating the start of data transfer is output to an input / output circuit which is a data transfer destination or data transfer source.
[0071]
The method for dividing the functional block is not particularly limited. For example, the EXDMAC 4, the external bus controller, and the roller 121 may be integrated.
[0072]
FIG. 4 shows an example of an address decoding circuit included in the internal bus controller 120. The address decoding circuit 120D decodes an address signal output from the CPU 2 or DMAC 3 to the internal bus IAB, and performs address determination on the ROM 5, RAM 6, I / O, and external space. The signal MSROM is a module select signal of the ROM 5, MSRAM is a module select signal of the RAM 6, MSIO is a select signal of the I / O module, and EXTA is a module select signal of the external space of the microcomputer 1.
[0073]
As described above, the ROM 5 can be arranged in either the area 0 or the area 1 shown in FIG. 2 depending on the operation mode of the microcomputer 1. By setting the signal ROME to “0” by specifying the operation mode or the internal I / O register, the ROM 5 can be not used.
[0074]
When I / O is selected (MSIO = 1), bus access using the buses PAB and PDB is activated, and when the outside is selected (EXTA = 1), the signal is sent to the external bus controller 121 to the external bus. It is supplied as the right request signal EXBREQ1.
[0075]
FIG. 5 illustrates an EXDMAC4 register configuration. The EXDMAC 4 has, for example, four channels, and is activated by a corresponding external request EXDREQi (i = 0 to 3), and performs single address transfer and dual address transfer. FIG. 5 illustrates a register configuration for one channel.
[0076]
The EXDMAC4 register includes a 24-bit source address register (SAR) 40, a destination address register (DAR) 41, and a 16-bit mode register (DTMR) 42. The SAR 40 and DAR 41 are 24 bits long, and can specify the entire 16 Mbyte address space. EXDMAC 4 does not have a so-called transfer count register. Also used for SAR40 or DAR41. That is, the values of SAR 40 and DAR 41 are incremented or decremented as the data transfer control proceeds.
[0077]
The function of each bit of the DTMR 42 is as follows. Bit 15 is an EDTE bit and permits the EXDMAC 4 operation of the channel. If there is a transfer request by EXDREQi with the EDTE bit set to “1”, data transfer of the channel is performed.
[0078]
Bit 14 is a DRQS bit and defines the active state of the EXDREQi signal. The DRQS bit selects the input. When cleared to “0”, low level sensing is selected, and when set to “1”, falling edge sensing is selected.
[0079]
Bit 13 is an EDE flag, which is set to “1” when a predetermined number of data transfers are completed by the transfer channel.
[0080]
Bit 12 is an EDIE bit, and is a bit for determining whether or not to permit an interrupt. When both the EDIE bit and the EDE flag are set to “1”, the CPU 2 is requested to interrupt. If the EDE flag is set to “1” while the EDIE bit is set to “1”, the EDTE bit is cleared to “0” at the same time, the operation of the channel is interrupted, and the CPU 2 waits for processing.
[0081]
The EXDMAC 4 can use the memory to be transferred as a ring buffer. That is, when a ring buffer is used, the transfer destination or transfer source address is automatically restored to the initial value (bits below a predetermined bit are cleared to “0”). unnecessary. If the EDIE bit is cleared to “0”, the memory can be used as a ring buffer. Bits 10 to 8 are RPB2 to RPB0 bits, and specify the size of the ring buffer, that is, the unit to be repeated. The units to be repeated are 64 kB (RPB2 to RPB0 = B′000), 128 kB (RPB2 to RPB0 = B′001), 256 kB (RPB2 to RPB0 = B′010), 512 kB (RPB2 to RPB0 = B′011), 1 MB (RPB2 to RPB0 = B′100) and 2 MB (RPB2 to RPB0 = B′101). When the SAR40 and DAR41 values are incremented and updated by the address calculator as the data transfer control proceeds, the RPB2 to RPB0 bits are sent to the SAR40 and DAR41 bits 15, 16 according to the values. , 17, 18, 19, and 20 are prohibited from transmitting carry / borrow. When the carry / borrow transmission is prohibited, the bits lower than the prohibited bit are set to 0 at that time, so that the address is automatically returned to the initial value. Thereby, the EXDMAC 4 can control the data transfer address so as to automatically configure a ring buffer.
[0082]
Bits 7 and 6 are SM1 and SM0 bits, which specify whether the SAR 40 is incremented, decremented, or fixed after data transfer. When the SM1 bit is cleared to “0”, the SAR 40 is fixed. If the SM0 bit is cleared to “0” with the SM1 bit set to “1”, the increment is performed. If the SM0 bit is set to “1”, the decrement is performed.
[0083]
Bits 5 and 4 are DM1 and DM0 bits, which specify whether the DAR 41 is incremented, decremented, or fixed after data transfer. When the DM1 bit is cleared to “0”, the DAR 41 is fixed. When the DM0 bit is cleared to “0” while the DM1 bit is set to “1”, the increment is performed. When the DM0 bit is set to “1”, the decrement is performed.
[0084]
Bits 3 and 2 are MD1 and MD0 bits, and select a data transfer mode. When the MD1 bit is cleared to “0”, the dual address mode is set. In the dual address mode, data is transferred once from the address indicated by the SAR 40 to the address indicated by the DAR 41 by one activation. Thereafter, the operations of the SAR 40 and the DAR 41 are performed based on the designation of the SM1, SM0, DM1, and DM0 bits.
[0085]
When the MD0 bit is cleared to “0”, the SAR 40 also functions as a transfer count function. When a carry occurs from a predetermined bit of the SAR 40, it is determined that a predetermined number of transfers have been completed, and the transfer end flag EDE is set to "1".
[0086]
When the MD0 bit is set to “1”, the DAR also functions as a transfer count function.
[0087]
When the MD1 bit is set to “1”, the single address address mode is set. In the single address address mode, either the transfer source or the transfer destination is designated by the acknowledge signal EXDACKi.
[0088]
When the MD0 bit is cleared to “0”, the transfer destination is specified by the acknowledge signal EXDACKi, the SAR 40 specifies the transfer source address, and also functions as a transfer count function.
[0089]
When the MD0 bit is set to “1”, the transfer source is specified by the acknowledge signal EXDACKi, the SAR 40 specifies the transfer destination address, and also functions as the transfer count function.
[0090]
In either case, when a carry / borrow is generated from a predetermined bit specified by the RPB2 to RPB0 bits of the SAR 40 or the DAR 41, it is determined that the transfer has been completed a predetermined number of times, and the transfer end flag EDE is set to “1”.
[0091]
Bit 0 is an SZ bit, and selects whether one data transfer is performed in byte size or word size. When the SZ bit is cleared to "0", byte size data transfer is performed, and when the SZ bit is set to "1", word size data transfer is performed. The word size is 2 bytes.
[0092]
FIG. 6 shows a block diagram of EXDMAC4. The EXDMAC 4 receives an activation request signal EXDREQi (i = 0 to 3) from the outside. The EXDMAC 4 generates an external bus right request EXBREQ2, generates an external bus command, and outputs an address to the external bus controller 121, and inputs an external bus right acknowledge signal EXBACK2 and an external bus ready signal EXBRDY from the external bus controller 121. Works. EXDACKi used at the time of single address transfer is indicated by an external bus command. The negated state of the external bus ready signal EXBRDY can be grasped as a wait state insertion request from the external bus controller 121 to the EXDMAC 4. EXBRDY from the external bus controller 121 to the internal bus controller 120 can also be grasped as a wait insertion request.
[0093]
Further, as a bus interface inside the microcomputer 1, a module select signal, a read signal, and a write signal are input from the internal bus controller 120 to read / write the CPU 2 and DMAC 3, and are connected to the address bus PAB and the data bus PDB. Is done.
[0094]
When the normal DMAC 3 is in the dual address mode, the read data is temporarily stored in the DMAC 3 and written. On the other hand, the EXDMAC 4 substitutes this function for an input / output port, and the latch circuit 72L of the IOP (D) 24 and IOP (E) 25 has a temporary data holding function. As the operation of the microcomputer becomes faster, a pipeline operation becomes necessary. The DMAC 3 itself has a read / write operation for data transfer with the bus right and the setting of data transfer control conditions by the CPU 2 for the DMAC 3. When the read / write operation for the DMAC3 is continuous, it becomes difficult for the DMAC 3 to transition between the operation as the bus master and the operation as the bus slave, the operation cannot be completed within a predetermined state, or an inconvenient operation occurs. The potential increases. On the other hand, EXDMAC 4 can essentially avoid the inconvenience, and can reduce the logical scale and the design period. Even during the data transfer control by the EXDMAC 4, the CPU 2 can perform an access operation using the internal bus, so that the CPU 2 can read the register inside the EXDMAC 4 at an arbitrary timing. Therefore, the state of the EXDMAC 4 from the CPU 2 can be easily monitored.
[0095]
The EXDMAC 4 is intended to perform data transfer independent of the CPU 2, but at this time, in the dual addressing mode or the like, it is necessary to provide a dedicated data bus in order to temporarily hold the read data in the own module. It will occur. In EXDMAC4, such a dedicated data bus is not required, and the physical scale can be reduced in this respect as well.
[0096]
According to FIG. 6, EXDMAC 4 is composed of the following circuit blocks. The EXDMAC 4 includes registers for the DTMR 42, DAR 41, and SAR 40 for each of four channels, and includes a common control circuit 45, data buffer (DB) 44, address buffer (AB) 46, and arithmetic operation circuit (AU) 43 for each channel. Have. These blocks are connected by two internal buses, A bus and B bus.
[0097]
The control circuit 45 detects the activation request signal EXDREQi (i = 0 to 3) and starts its operation, outputs an external bus right request EXBREQ2, an external bus command and an address, an external bus right acknowledge EXBACK2, and an external bus ready signal. The external bus is operated while inputting EXBRDY. On the other hand, input / output of the internal register is performed in accordance with the module select signal, read signal, write signal, address lower bits on the address bus PAB, and the value of the data bus PDB.
[0098]
The address buffer 46 has a 24-bit configuration corresponding to the external address space of 16 Mbytes, receives data from the A bus, holds an address to be read / written, and outputs it to EXAB.
[0099]
The data buffer 44 has a 16-bit configuration, is connected to the data bus PDB, and inputs / outputs data when the CPU 2 reads / writes a register in the EXDMAC 4. Since the SAR 40 and the DAR 41 have a 24-bit configuration, they are accessed twice from the CPU 2, but at this time, only one read / write is performed in the EXDMAC 4 so that an inconvenient operation is not performed.
[0100]
The functions of the DTMR 42, DAR 41, and SAR 40 registers are as described above. Data is input from the B bus and output to the A bus. The arithmetic operation circuit (AU) 43 performs increment / decrement processing. The input is A bus and the result is output to B bus.
[0101]
FIG. 7 shows a state transition diagram of EXDMAC4. The EXDMAC 4 has three states: state I (idle state), state S (source transfer state), and state D (destination transfer state).
[0102]
After reset, the state transitions to state I. In state I, the activation request signal EXDREQi (i = 0 to 3) of EXDMAC 4 is sampled. When the EDTE bit of any channel is set to 1, the EXDREQi input of that channel is detected. When a plurality of channels are activated, the channel 0 is preferentially operated.
[0103]
When EXDREQi is enabled, the transition is made to state S. In state S, the contents of the SAR 40 of the channel are output to EXAB, the contents of the SAR 40 are updated according to the SM1 and SM0 bits, and the external bus request EXBREQ2 and the bus command are output to the external bus controller 121.
[0104]
The external bus controller 121 arbitrates the external bus request, activates the acknowledge signal EXACK2 at a predetermined timing, and activates the external bus in order to give the EXDMAC 4 an external bus right. When the external bus is terminated, the external bus ready signal EXBRDY is activated. Thereby, the EXDMAC 4 can end the bus cycle.
[0105]
In the single address mode, the EXDMAC 4 ends the operation and transitions to the state I when it detects the external bus ready EXBRDY while the bus acknowledge signal EXBACK2 is active.
[0106]
In the dual address mode, when the acknowledge signal is active and external bus ready is detected, the state transitions to state D. In the state D, the contents of the DAR 41 of the channel are output to the address bus EXAB, the contents of the DAR 41 are updated according to the SM1 and SM0 bits, and the external bus request EXBREQi and the bus command are output to the external bus controller 121.
[0107]
The external bus controller 121 activates the external bus. When the external bus is terminated, the external bus ready signal EXBRDY is activated. When the EXACKC4 detects the external bus ready EXBRDY while the bus acknowledge signal EXBACK2 is active, the EXDMAC4 ends the access cycle and transitions to the state I.
[0108]
In the case of the single address mode, the transfer acknowledge signal EXDACKi is instructed to be activated in the state S bus command. In the dual address mode, in the state S bus command, an instruction not to transfer the bus right after the read and an instruction to temporarily hold the read data in the latch circuits of the IOP (D) 24 and IOP (E) 25 give.
[0109]
A dedicated external address bus EXAB is used, and it is not necessary to determine whether or not to acquire the bus right, and after confirming this, it is not necessary to output a bus command and address. Scale can be controlled.
[0110]
FIG. 8 shows an example of a microcomputer system using the microcomputer for printer control.
[0111]
The printer control system includes a microcomputer 1, a receiving circuit 100 such as a Centronics interface, a universal serial bus (USB) or an option, a buffer RAM 101 composed of DRAM, a character generation ROM (CGROM) 102, a program ROM 103, and a print control circuit 104. These are connected via the external bus 105 of the microcomputer 1.
[0112]
The program ROM 103 is assigned to area 0, the buffer RAM 101 is assigned to area 2, the CGROM 102 is assigned to area 6, and the receiving circuit 100 and the print control circuit 104 are assigned to area 7. As the buffer RAM 101, a DRAM that requires a refresh operation as a readable / writable memory but is known to be inexpensive is used. In FIG. 8, the address arrangement of the buffer RAM 101 is shown. According to this example, the buffer RAM 101 has a storage capacity of 2 MB (16 Mbits), 1 Mbyte of which is used as the work area of the CPU 2 and the remaining 512 kB is used as a ring buffer.
[0113]
The system shown in FIG. 8 further includes a print head 106, a buffer circuit 107, a line feed motor 108, and a carriage return motor 109. These motors 108 and 109 respectively output the timer 7 and the pulse output of the microcomputer 1. It is controlled by the output of the device 8. The line feed motor 108 and the carriage return motor 109 are stepping motors although not particularly limited.
[0114]
Although not shown, the SCI 9 of the microcomputer 1 is used for communication with a host device or the like, and the A / D converter 10 inputs sensor information such as the number of sheets.
[0115]
The EXDMAC 4 receives data by a plurality of receiving circuits 100 such as a Centronics interface and a universal serial bus in parallel with the operation of the CPU 2. The microcomputer 1 receives the transfer request signal EXDREQi and can perform single address transfer by the transfer acknowledge signal EXDACKi. For example, input strobe signal of Centronics interface is input to EXDREQ0, dual address transfer is performed on channel 0, reception signal of option interface is input to EXREQ1, EXDACK1 output is given to option interface, and single address transfer is performed on channel 1 I do.
[0116]
The internal DMAC 3 outputs print data and pulse data to drive the line feed motor 108 and the carriage return motor 109. Also, transmission data and reception data of SCI 9 are transferred. Such a method of using DMAC 3 is described in Japanese Patent Laid-Open No. 5-307516.
[0117]
Note that, by improving the integration degree of the semiconductor integrated circuit, a part of the receiving circuit 100 other than the option, the print control circuit 104, and the like can be integrated in a one-chip microcomputer. Further, a general-purpose memory such as the buffer RAM 101 can be integrated in a one-chip microcomputer. As for the program ROM 103, the CGROM 102, and the like, it is more convenient to use an individual semiconductor integrated circuit such as an individual printer model that is changed for each microcomputer system. Regardless of which part is mounted on a one-chip microcomputer, the logical configuration of the bus need not be changed as described above.
[0118]
FIG. 9 shows an example of bus operation timing of the microcomputer system of FIG.
[0119]
Most of the internal buses IAB and IDB perform program read from the ROM 5 of the CPU 2 and data read / write to the RAM 6 in one state. Among these, the CPU 2 reads the internal I / O register (for example, A / D converter) using the P buses PAB and PDB from T3, and reads the external memory (for example, CGROM) from T12. Since the circuit connected to the P buses PAB and PDB has a slower access speed than the RAM 6 and the ROM 5, the bus ready signal BRDY is supplied by the bus controller 120.
[0120]
The DMAC 3 performs the transfer from the memory to the internal I / O register (for example, the RAM 6 to the pulse output circuit 8) from T7.
[0121]
On the other hand, in EXDMAC4, channel 0 is dual address transfer, channel 1 is single address transfer, channel 0 is activated at T0, and channel 1 is activated at T7 and T14. Note that the activation request signal EXDREQi (i = 0 to 3) is displayed in an overlapping manner. For example, a portion described as ch0 indicates that EXDREQ0 is activated.
[0122]
At T0, EXDMAC4 transitions to state S in response to EXDREQ0 becoming active, generates an external bus right request and an external bus command, and outputs EXAB. The external bus command instructs read, bus right transfer prohibition after read, latch of read data, and the like. The external bus controller 121 arbitrates the external bus right, immediately gives the external bus right to the EXDMAC 4 by EXBACK2, and starts the external bus. The external bus controller 121 once deactivates the bus ready signal EXBRDY and causes the EXDMAC 4 to insert a wait cycle.
[0123]
When the bus ready signal EXBRDY output from the external bus controller 121 is returned to the active state, the EXDMAC 4 finishes its memory cycle, transitions to the state D, generates the next external bus right request and external bus command, and The address is output to EXAB. The external bus command instructs writing, outputting latched data, and the like. The external bus controller 121 activates the external bus. Similarly to the above, the external bus controller 121 once deactivates EXBRDY to insert a wait cycle into EXDMAC4.
[0124]
When EXBRDY becomes active, EXDMAC4 finishes its memory cycle, transitions to state I, and returns to the standby state.
[0125]
In response to EXDREQ1 becoming active at T7, EXDMAC4 transitions to state S, generates an external bus request and an external bus command, and outputs EXAB. The external bus command instructs the external bus controller 121 to read and output EXDACK1. The external bus controller 121 arbitrates the external bus right, immediately gives the external bus right to the EXDMAC 4 by EXBACK2, and starts the external bus. Similarly to the above, EXBRDY is once deactivated, and a wait cycle is inserted into EXDMAC4. The external bus controller 121 determines access to the DRAM area and performs access in four states including precharge, RAS, and CAS cycles. When EXBRDY becomes active, EXDMAC 4 transitions to state I and returns to the standby state.
[0126]
Further, in response to EXDREQ1 becoming active at T14, EXDMAC4 transitions to state S, generates an external bus right request and an external bus command, and outputs EXAB. The external bus command instructs reading and output of EXDACK1. At this time, the external bus controller 121 arbitrates the external bus right, but since the external read is being executed by the CPU 2, the external bus right is not given to the EXDMAC 4 and the external read by the CPU 2 is awaited. At T17, an external bus right is given to EXDMAC 4 to activate the external bus. As described above, the bus controller 121 once deactivates the bus ready signal EXBRDY and requests EXDMAC4 to insert a wait cycle. When EXBRDY becomes active, EXDMAC 4 transitions to state I and returns to the standby state.
[0127]
In DTMR1, it is assumed that DTIE = 0, RPB2-0 = B′011, SM1, 0 = B′10 and repeat operation of 512 kB unit is set, and when SAR is incremented at T9, from H′5FFFFF It is updated to H'580000 and the operation is continued. That is, a ring buffer on the buffer RAM 101 of H'580000 to H'5FFFFF is configured. The CPU 2 can obtain the input pointer of the ring buffer by reading the SAR 40. While referring to the input pointer, it is easy to read the ring buffer so that the amount of data stored in the ring buffer is appropriate.
[0128]
Further, since the EXDMAC 4 continues to operate without stopping, the startup request signal is not undesirably detected or cannot be detected at the time of restart.
[0129]
When the CPU 2 requests reading / writing using an external bus and external bus transfer by EXDMAC 4 at the same time, either the CPU 2 or EXDMAC 4 is temporarily stopped, but the data access frequency of the CPU 2 is low, and the CPU 2 is continuously Since the EXDMAC 4 does not continuously transfer data, the CPU 2 and the EXDMAC 4 can be prevented from being stopped for a long time. At least the CPU 2 can execute the program on the ROM 5 and the external bus transfer by the EXDMAC 4 can be performed in parallel. In other words, external bus transfer can be performed without degrading the processing performance of the CPU 2. Further, external data transfer by EXDMAC4 can be performed in parallel with transfer by DMAC3 by the internal bus.
[0130]
It is possible to transfer the bus right between the CPU 2 and the DMAC 3 without overhead by synchronizing an internal bus right request or an internal bus right acknowledge signal with a clock or a bus ready signal. Similarly, transfer of the bus right between the external access of the CPU 2 or the DMAC 3 and the EXDMAC 4 can be performed without overhead.
[0131]
FIG. 10 shows a block diagram of an external bus DMAC 4A having the functions of both the general-purpose DMAC 3 and EXDMAC 4.
[0132]
The data transfer channels are 0 to 7, and each has DTMR 42, SAR 40, DAR 41, and two sets of transfer counters TCR 47A and BTCR 47B as control registers. A shifter 47C is added to the arithmetic operator 43A, and there are three types of internal buses: A bus, B bus, and C bus.
[0133]
In the example of FIG. 10, as in FIG. 6, in addition to the interface to the external bus controller 121, the interface to the CPU 2, etc., as an interface to the internal bus controller 120, an internal bus right request signal, an internal bus command, an IAB output, Internal bus right acknowledge, internal bus ready input, and IDB input / output are added.
[0134]
When the EDTE bit of DTMR42 is set to “1”, an external bus right request or an external bus command is output to the external bus controller 121, and a transfer on the external bus is executed on the internal bus of the CPU 2 Can be done in parallel.
[0135]
On the other hand, when the IDTE bit (not shown) of the DTMR 42 is set to “1”, an internal bus request or an internal bus command is output to the internal bus controller 120 and the internal bus (I bus) is used. Thus, transfer between arbitrary addresses can be performed exclusively with the operation of the CPU 2.
[0136]
According to the configuration of FIG. 10, limited channels such as 8 channels can be used interchangeably. The external bus transfer as the external bus DMAC 4A can be 2 channels, and the transfer using the internal bus can be 6 channels. In addition, logic such as an arithmetic operator and a bus interface can be used in common. When a plurality of activation requests are generated, it is preferable to increase the priority of external bus transfer so that parallel operation with the CPU 2 is enabled.
[0137]
Furthermore, external bus transfer control circuit and internal bus transfer control circuit are provided separately. If each arithmetic operation unit and bus are provided separately, external bus transfer and internal bus transfer can be operated in parallel. become.
[0138]
If the single address mode is selected, external bus transfer is selected, and if the dual address mode is selected, transfer is performed using the internal bus. Can be saved.
[0139]
According to the embodiment described above, the following operational effects are obtained.
[0140]
[1] The control of the internal bus of the microcomputer 1 and the control of the external bus are made independent, and the operation of the CPU 2 using the internal bus and the data transfer performed using the external bus by the EXDMAC 4 are performed independently. The processing performance of the computer 1 can be improved.
[0141]
[2] The external bus controller 121 can divide the address space and set bus specifications such as memory type, bus width, number of access states, etc., and external bus access by the CPU 2 and other internal bus master DMAC3 and external access by EXDMAC4 Are collectively controlled by the external bus controller 121, the EXDMAC 4 that does not use the internal bus can also be accessed by the external bus similar to the CPU 2 and DMAC 3, and the increase in logical scale can be reduced.
[0142]
[3] By making the address, bus command, etc. output from the external bus controller 121 a dedicated signal transmitted via the bus EXAB, the operation of the control signal, state transition, etc. of the external bus DMAC is simplified. The scale can be reduced.
[0143]
[4] The external bus controller 121 arbitrates between the external bus access by the CPU 2 and the DMAC 3 and the EXDMAC 4 or other external bus right request, thereby allowing the external bus right between the external bus access by the CPU 2 and the DMAC 3 and the EXDMAC 4. The overhead at the time of transfer can be eliminated, and the processing performance can be further improved.
[0144]
[5] A program that requires high-speed processing in an external ROM by making the internal ROM 5 for storing a program of the CPU 2 selectable in an operation mode or the like so as not to include a vector of the CPU 2 And the like can be stored in the built-in ROM 5, and the usability such as the flexibility to change the program can be improved.
[0145]
[6] The EXDMAC 4 has a plurality of channels, and each channel has an independent external transfer request input, so that the usability can be improved and the processing performance can be improved. By supporting single address transfer, the bus cycle required for transfer can be reduced and the processing performance can be further improved.
[0146]
[7] The EXDMAC 4 can reduce the logical scale by providing a function suitable for external bus transfer, such as the receiving circuit 100 to the buffer RAM 101. The transfer counter is also used as an address counter to reduce the number of registers, temporarily hold transfer data, etc. by using the latch circuit 72L such as an input / output port, thereby eliminating the need for a data bus to the EXDMAC4. Can be scaled down. Further, it is possible to essentially avoid the conflicting operation between the access from the CPU 2 and the DMAC 3 and the data transfer of the EXDMAC 4 itself, further simplifying the logical configuration, and shortening the development period.
[0147]
[8] Higher bits are fixed from predetermined bits of the transfer source / destination address registers 40 and 41 to enable repetitive operation, and a ring buffer can be easily configured on the buffer RAM 101 without load of the CPU 2 it can. Even if the start address and the end address of the buffer cannot be arbitrarily designated, there is no great inconvenience in a large-capacity memory such as the buffer RAM 101. Since the CPU 2 can read / write the contents of the EXDMAC 4 at any time, the management of the amount of data stored in the ring buffer can be facilitated. By making the operation repeatable, it is possible to eliminate a load such as the interrupt processing of the CPU 2.
[0148]
[9] The processing performance of the microcomputer 1 can be improved by independently performing the transfer on the internal bus by the DMAC 3 connected to the internal bus and the data transfer performed by using the external bus by the EXDMAC 4. In a microcomputer system such as a printer, the transfer on the internal bus by the DMAC 3 for driving the motor and the transfer using the external bus such as the transfer to the buffer RAM 101 of the receiving circuit 100 can be performed simultaneously. The processing performance of the microcomputer system can be improved.
[0149]
[10] By realizing the microcomputer 1 and the receiving circuit 100 as the same semiconductor integrated circuit, the size of the system can be reduced.
[0150]
[11] By incorporating the DMAC 3 connected to the internal bus and the external bus controller 121 having only a function suitable for external bus transfer, the increase in the logical scale is minimized while the overall number of channels is increased. Can be. Further, the DMAC 3 connected to the internal bus has a general-purpose function, so that the usability is not lowered.
[0151]
[12] By configuring the DMAC 3 connected to the internal bus and the EXDMAC 4 as an integrated module, limited channels can be used interchangeably. In addition, logic such as a bus interface can be used in common.
[0152]
The invention made by the inventors as described above is not limited to the description of the above embodiment, and various modifications can be made without departing from the scope of the invention.
[0153]
For example, the number of bits in the address registers of the DMACs 3 and 4 is not limited to 24 bits. The number of address bits can be changed according to the address space of the CPU or semiconductor integrated circuit device. For example, if the address space is 4 Gbytes, it may be 32 bits.
[0154]
Various transfer modes and the like in the first data transfer apparatus can be changed. The capacity of the ring buffer can also be changed. You may have another register that specifies the capacity of the ring buffer. Alternatively, the transfer counter may be independent. It is possible to limit the number of address registers to only one in the single address mode.
[0155]
The configuration of the microcomputer is not limited. It is also possible to incorporate other functional blocks. In addition to the DMAC, another data transfer device such as a data transfer controller connected to the internal bus may be incorporated. The data transfer controller is described in “H8S / 2655 Series Hardware Manual” published by Hitachi, Ltd. in March 1995.
[0156]
Various changes can also be made to specific circuit configurations such as EXDMAC, bus controller, and internal bus configurations. An internal bus such as IAB or IDB and an internal bus such as PAB or PDB can be configured integrally.
[0157]
The microcomputer system is not limited to a printer. For example, it can be used in a digital communication system. Transfer from the receiver circuit to the buffer RAM, perform demodulation, error correction, etc., further modulate, store in another buffer RAM, and transfer from the buffer RAM to the transmitter circuit, etc. Transfer from the receiver circuit to the buffer RAM Further, EXDMAC is used for transfer from the buffer RAM to the transmission circuit, and external data transfer control can be performed in parallel with the processing of other processors such as a CPU, thereby improving the processing performance.
[0158]
In the above description, the case where the invention made mainly by the present inventor is applied to a ROM built-in microcomputer, which is the field of use behind it, is not limited to this, but a microcomputer without a built-in ROM, The present invention can also be applied to a microcomputer centering on a digital signal processor (DSP), and the present invention can be applied at least to a condition in which a data processing device and a data transfer device are incorporated.
[0159]
【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.
[0160]
That is, by configuring the bus and the bus controller so that the data transfer on the external bus by the first data transfer device and the instruction execution using the internal bus by the CPU can be operated in parallel, the processing of the microcomputer Improves performance, improves usability, and minimizes logical and physical scale.
[0161]
The total performance of data processing by a microcomputer incorporating a data transfer device such as DMAC can be improved.
[0162]
The microcomputer system to which the microcomputer is applied is capable of parallel processing of data transfer control between the outside and arithmetic processing inside the microcomputer, and has a small processing overhead and an increase in physical scale. Can be minimal.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of a microcomputer according to the present invention.
FIG. 2 is an explanatory diagram showing an example of an address map in the microcomputer of FIG. 1;
FIG. 3 is a block diagram showing the microcomputer of FIG.
FIG. 4 is a block diagram showing an example of an address decoder included in the bus controller.
FIG. 5 is a block diagram showing an example of a register configuration of an external bus DMAC.
FIG. 6 is a block diagram showing the entire external bus DMAC.
FIG. 7 is a state transition diagram of an external bus DMAC.
8 is a block diagram showing an example of a system to which the microcomputer of FIG. 1 is applied.
FIG. 9 is a timing chart showing an example of operation timing of the microcomputer.
FIG. 10 is a block diagram showing another example of the external bus DMAC.
[Explanation of symbols]
1 Microcomputer
2 Central processing unit
3 DMAC
4 EXDMAC
5 ROM
6 RAM
IDB, PDB internal data bus
IAB, PAB, EXAB Internal address bus
12 Bus controller
120 Internal bus controller
121 External bus controller
122 Refresh timer
21-26 IO port
31-35 IO port
40 Source Address Register (SAR)
41 Destination Address Register (DAR)
42 Data transfer mode register (DTMR)
43 Arithmetic Unit (AU)
44 Data buffer (DB)
45 Control circuit
46 Address buffer (AB)
100 Receiver circuit
101 Buffer RAM
102 CGROM
103 Program ROM

Claims (17)

記憶手段と、第1の内部バスを介して記憶手段をアクセス可能であって命令を実行するデータ処理装置と、データ転送制御を行う第1のデータ転送装置と、前記第1の内部バス又は前記第1のデータ転送装置を外部バスに接続可能とするバスインタフェース手段と、バス制御とバス権の調停を行うバス制御手段と、を1個の半導体チップに含んで成り、
前記バス制御手段は、前記第1の内部バスを用いたマイクロコンピュータ内部のみのアクセス動作と前記第1のデータ転送装置による前記バスインタフェース手段を介する外部アドレス空間のアクセス動作とを並行可能にするマイクロコンピュータであって、
前記バス制御手段は、前記第1のバスを共有するバスマスタ手段によるバス権要求を調停する内部バスコントローラと、前記外部バスをアクセスするバス権要求を調停する外部バスコントローラとを有し、
前記外部バスコントローラは、外部アクセスを要求している前記バスマスタ手段が前記内部バスコントローラでバス権を取得したときの当該内部バスコントローラからの外部バス権要求と、前記第1のデータ転送装置からの外部バス権要求と、マイクロコンピュータの外部から与えられるバス権要求とを調停可能なものであることを特徴とするマイクロコンピュータ
A storage means; a data processing apparatus that can access the storage means via a first internal bus and that executes instructions; a first data transfer apparatus that performs data transfer control; and the first internal bus or the a bus interface unit which can be connected to a first data transfer device to the external bus, Ri comprises a bus control unit for arbitrating bus control and bus, to one semiconductor chip,
Said bus control means that enables parallel access operation of the external address space via said bus interface means to the access operation of the microcomputer internal only by the first data transfer device using said first internal bus a microcomputers,
The bus control means includes an internal bus controller that arbitrates a bus right request by a bus master means that shares the first bus, and an external bus controller that arbitrates a bus right request to access the external bus,
The external bus controller requests the external bus right from the internal bus controller when the bus master means requesting external access acquires the bus right from the internal bus controller, and from the first data transfer device. A microcomputer capable of arbitrating between an external bus right request and a bus right request given from the outside of the microcomputer .
前記第1のデータ転送装置は、夫々がダイレクト・メモリ・アクセス制御可能な複数のデータ転送チャネルを有し、前記データ転送チャネル毎に外部データ転送起動要求信号を入力するものであることを特徴とする請求項1記載のマイクロコンピュータ。The first data transfer device has a plurality of data transfer channels each capable of direct memory access control, and inputs an external data transfer start request signal for each data transfer channel. claim 1 Symbol placement microcomputer to. 前記第1のデータ転送装置は、アドレス情報の初期値が指定されるアドレス指定手段、アドレスバッファ手段、及び算術演算手段を有し、
前記アドレス指定手段が出力するアドレス情報はバスを介して前記アドレスバッファ手段及び算術演算手段に供給され、
前記アドレスバッファ手段に供給されたアドレス情報は前記バスインタフェース手段に供給可能にされ、
前記算術演算手段は、入力されたアドレス情報に対してアドレス情報の所定ビット位置よりも上位ビットの値を固定することを条件として算術演算を行い、その演算結果を前記アドレス指定手段に供給するものであることを特徴とする請求項1又は2記載のマイクロコンピュータ。
The first data transfer device has address specifying means for specifying an initial value of address information, address buffer means, and arithmetic operation means,
The address information output by the addressing means is supplied to the address buffer means and arithmetic operation means via a bus,
The address information supplied to the address buffer means can be supplied to the bus interface means,
The arithmetic operation means performs an arithmetic operation on the condition that a value of a higher bit than a predetermined bit position of the address information is fixed with respect to the input address information, and supplies the operation result to the address designating means. The microcomputer according to claim 1 or 2, wherein
前記記憶手段は、前記データ処理装置の動作プログラムを格納するROMであり、前記データ処理装置のベクタを含むアドレスエリアに配置されるか、含まないアドレスエリアに配置されるかを、選択可能であることを特徴とする請求項1乃至の何れか1項記載のマイクロコンピュータ。The storage means is a ROM for storing an operation program of the data processing device, and can be selected to be arranged in an address area including the vector of the data processing device or in an address area not including the vector. The microcomputer according to any one of claims 1 to 3 . 前記第1のデータ転送装置は、第2のバスを介して前記バスインタフェース手段に結合され、第3のバスを介して前記内部バスコントローラに結合され
第1のデータ転送装置は、前記第3のバスを介してデータ転送条件が設定され、外部アクセスに用いるアドレス信号を前記第2のバスに出力するものであることを特徴とする請求項記載のマイクロコンピュータ。
The first data transfer device is coupled to said bus interface means via the second bus, coupled to said internal bus controller via a third bus,
First data transfer device, the third data transfer condition over the bus is set, according to claim 1, wherein a and outputs an address signal to be used for external access to the second bus Microcomputer.
前記バスインタフェース手段はデータラッチ手段を有し、前記外部バスコントローラは、前記第1のデータ転送装置にバス権を与えたとき、前記第1のデータ転送装置のデュアルアドレシングモードにおいてソースアドレスで読み出したデータを前記データラッチ手段にラッチさせ、ラッチしたデータをディスティネーションアドレスに書き込み制御するものであることを特徴とする請求項記載のマイクロコンピュータ。The bus interface means includes data latch means, and the external bus controller reads a source address in a dual addressing mode of the first data transfer device when the bus right is given to the first data transfer device. 6. The microcomputer according to claim 5 , wherein data is latched by said data latch means, and the latched data is controlled to be written to a destination address. 前記第1のバスを共有する前記バスマスタ手段として第2のデータ転送装置を更に備え、前記第2のデータ転送装置は前記データ処理装置によってデータ転送制御条件が設定されてダイレクト・メモリ・アクセス制御可能とされて成るものであることを特徴とする請求項記載のマイクロコンピュータ。A second data transfer device is further provided as the bus master means for sharing the first bus, and the second data transfer device is capable of direct memory access control when a data transfer control condition is set by the data processing device. 2. The microcomputer according to claim 1 , wherein the microcomputer is configured as follows. 前記データ処理装置及び前記第2のデータ転送装置は夫々バス権要求信号を前記内部バスコントローラに出力し、前記内部バスコントローラはバス権要求信号によるバス権要求を調停し、その調停結果をバス権アクノリッジ信号によって前記データ処理装置及び前記第2のデータ転送装置に夫々与えるものであることを特徴とする請求項記載のマイクロコンピュータ。The data processing device and the second data transfer device each output a bus right request signal to the internal bus controller, and the internal bus controller arbitrates the bus right request by the bus right request signal, and the arbitration result is sent to the bus right. 8. The microcomputer according to claim 7 , wherein the microcomputer is provided to the data processing device and the second data transfer device by an acknowledge signal. 前記内部バスコントローラは、前記バス権アクノリッジ信号によってバス権を獲得した前記データ処理装置又は前記第2のデータ転送装置が前記外部アドレス空間をアクセスすることを、外部バス権要求信号によって前記外部バスコントローラに通知し、
外部バスコントローラは内部バスコントローラからの外部バス権要求を承認したとき、外部バス権アクノリッジ信号によって前記内部バスコントローラにバス権承認を通知すると共に、バス権を承認したデータ処理装置又は前記第2のデータ転送装置に前記バスインタフェース手段及び前記第1のバスを介して外部アドレス空間のアクセスを可能にするものであることを特徴とする請求項記載のマイクロコンピュータ。
The internal bus controller, said bus right acknowledge signal the data processor or the second data transfer device has acquired the bus by to access the external address space, the external bus controller through an external bus request signal Notify
When the external bus controller approves the external bus right request from the internal bus controller, the external bus controller notifies the internal bus controller of the bus right approval by an external bus right acknowledge signal, and the data processing device that has approved the bus right or the second 9. The microcomputer according to claim 8 , wherein the data transfer device enables an external address space to be accessed via the bus interface means and the first bus.
前記バス制御手段は、リフレッシュタイマを更に有し、前記外部バスコントローラは前記リフレッシュタイマから出力されるリフレッシュ要求をその他の外部バス要求と調停し、リフレッシュ要求を承認したときバスインタフェース手段からリフレッシュ動作の指示信号を出力させるものであることを特徴とする請求項記載のマイクロコンピュータ。The bus control means further includes a refresh timer, and the external bus controller arbitrates the refresh request output from the refresh timer with other external bus requests, and when the refresh request is approved, the bus interface means performs a refresh operation. 10. The microcomputer according to claim 9 , wherein the microcomputer outputs an instruction signal. 前記外部バスコントローラはマイクロコンピュータの外部からバス権開放要求信号を入力し、その要求を前記外部バス権要求及び前記リフレッシュ要求と調停し、バス権開放要求を承認するとき、外部にバス権開放アクノリッジ信号を外部に出力すると共に、前記バスインタフェース手段を高インピーダンス状態に制御するものであることを特徴とする請求項10記載のマイクロコンピュータ。The external bus controller inputs a bus right release request signal from outside the microcomputer, arbitrates the request with the external bus right request and the refresh request, and approves the bus right release request to the outside. 11. The microcomputer according to claim 10 , wherein the microcomputer outputs a signal to the outside and controls the bus interface means to a high impedance state. 記憶手段と、第1の内部バスを介して記憶手段をアクセス可能であって命令を実行するデータ処理装置と、前記第1の内部バス及び第2の内部バスに接続されデータ転送制御を行うデータ転送装置と、前記第1の内部バス又は前記第2の内部バスを選択的に外部バスに接続可能とするバスインタフェース手段と、バス制御とバス権の調停を行うバス制御手段と、を1個の半導体チップに含んで成り、
前記バス制御手段は、前記第1の内部バスを用いたマイクロコンピュータ内部のみのアクセス動作と前記データ転送装置による前記第2のバスから前記バスインタフェース手段を介する外部アドレス空間のアクセス動作とを並行可能にするものであるマイクロコンピュータであって、
前記バス制御手段は、前記第1のバスを共有するバスマスタ手段によるバス権要求を調停する内部バスコントローラと、前記外部バスをアクセスするバス権要求を調停する外部バスコントローラとを有し、
前記外部バスコントローラは、外部アクセスを要求している前記バスマスタ手段が前記内部バスコントローラでバス権を取得したときの当該内部バスコントローラからの外部バス権要求と、前記第1のデータ転送装置からの外部バス権要求と、マイクロコンピュータの外部から与えられるバス権要求とを調停可能なものであることを特徴とするマイクロコンピュータ
Storage means, a data processing apparatus that can access the storage means via the first internal bus and executes instructions, and data that is connected to the first internal bus and the second internal bus and performs data transfer control One transfer device, bus interface means for selectively connecting the first internal bus or the second internal bus to an external bus, and bus control means for performing bus control and bus arbitration Ri comprises a semiconductor chip,
The bus control means can perform an access operation only inside the microcomputer using the first internal bus and an access operation of the external address space from the second bus via the bus interface means by the data transfer device. a der luma Lee black computer intended to,
The bus control means includes an internal bus controller that arbitrates a bus right request by a bus master means that shares the first bus, and an external bus controller that arbitrates a bus right request to access the external bus,
The external bus controller requests the external bus right from the internal bus controller when the bus master means requesting external access acquires the bus right from the internal bus controller, and from the first data transfer device. A microcomputer capable of arbitrating between an external bus right request and a bus right request given from the outside of the microcomputer .
請求項1乃至12の何れか1項記載のマイクロコンピュータと、
前記マイクロコンピュータのバスインタフェース手段に接続された外部バスと、
前記外部バスに接続されたRAMと、を含んで成るものであることを特徴とするマイクロコンピュータシステム。
A microcomputer according to any one of claims 1 to 12 ,
An external bus connected to the microcomputer bus interface means;
A microcomputer system comprising a RAM connected to the external bus.
請求項記載のマイクロコンピュータと、
前記マイクロコンピュータのバスインタフェース手段に接続された外部バスと、
前記外部バスに接続されたRAMと、
前記外部バスに接続されたデータ通信回路と含み、
前記データ通信回路は前記マイクロコンピュータの第1のデータ転送装置に外部データ転送起動要求信号を供給し、
前記第1のデータ転送装置は、バス制御手段によってバス権が承認されたとき、外部データ転送承認信号によって前記データ通信回路に転送を指示するものであることを特徴とするマイクロコンピュータシステム。
A microcomputer according to claim 2 ;
An external bus connected to the microcomputer bus interface means;
A RAM connected to the external bus;
Including a data communication circuit connected to the external bus,
The data communication circuit supplies an external data transfer activation request signal to the first data transfer device of the microcomputer;
The microcomputer system according to claim 1, wherein when the bus right is approved by the bus control means, the first data transfer device instructs the data communication circuit to transfer by an external data transfer approval signal.
前記第1のデータ転送装置は、前記データ通信回路と前記RAMとの間のデータ転送をシングルアドレッシングモードで制御可能であり、前記データ通信回路には前記外部データ転送承認信号によって転送を指示し、RAMにはアクセスアドレス信号によってアクセス開始を指示するものであることを特徴とする請求項14記載のマイクロコンピュータシステム。The first data transfer device can control data transfer between the data communication circuit and the RAM in a single addressing mode, and instructs the data communication circuit to transfer by the external data transfer approval signal, 15. The microcomputer system according to claim 14, wherein the RAM is instructed to start access by an access address signal. 前記第1のデータ転送装置は、アドレス情報の初期値が指定されるアドレス指定手段、アドレスバッファ手段、及び算術演算手段を有し、
前記アドレス指定手段が出力するアドレス情報は前記アドレスバッファ手段及び算術演算手段に供給され、
前記アドレスバッファ手段に供給されたアドレス情報は前記バスインタフェース手段に供給可能にされ、
前記算術演算手段は、入力されたアドレス情報に対してアドレス情報の所定ビット位置よりも上位ビットの値を固定することを条件として算術演算を行い、その演算結果を前記アドレス指定手段に供給するものであることを特徴とする請求項15記載のマイクロコンピュータシステム。
The first data transfer device has address specifying means for specifying an initial value of address information, address buffer means, and arithmetic operation means,
The address information output by the addressing means is supplied to the address buffer means and arithmetic operation means,
The address information supplied to the address buffer means can be supplied to the bus interface means,
The arithmetic operation means performs an arithmetic operation on the condition that a value of a higher bit than a predetermined bit position of the address information is fixed with respect to the input address information, and supplies the operation result to the address designating means. 16. The microcomputer system according to claim 15, wherein:
前記算術演算手段は、前記算術演算として、前記アドレス指定手段に指定されたRAMのアドレスをインクリメント又はディクリメントする演算を行い、前記RAMをリングバッファとして利用可能にするものであることを特徴とする請求項16記載のマイクロコンピュータシステム。The arithmetic operation means performs, as the arithmetic operation, an operation for incrementing or decrementing a RAM address designated by the address designating means so that the RAM can be used as a ring buffer. The microcomputer system according to claim 16 .
JP03694999A 1999-02-16 1999-02-16 Microcomputer and microcomputer system Expired - Fee Related JP3905660B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP03694999A JP3905660B2 (en) 1999-02-16 1999-02-16 Microcomputer and microcomputer system
US09/503,358 US6763448B1 (en) 1999-02-16 2000-02-14 Microcomputer and microcomputer system
US10/887,843 US6907514B2 (en) 1999-02-16 2004-07-12 Microcomputer and microcomputer system
US11/130,200 US20050210221A1 (en) 1999-02-16 2005-05-17 Microcomputer and microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03694999A JP3905660B2 (en) 1999-02-16 1999-02-16 Microcomputer and microcomputer system

Publications (2)

Publication Number Publication Date
JP2000235560A JP2000235560A (en) 2000-08-29
JP3905660B2 true JP3905660B2 (en) 2007-04-18

Family

ID=12484011

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03694999A Expired - Fee Related JP3905660B2 (en) 1999-02-16 1999-02-16 Microcomputer and microcomputer system

Country Status (1)

Country Link
JP (1) JP3905660B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227049A (en) 2003-01-20 2004-08-12 Renesas Technology Corp Data transfer device, semiconductor integrated circuit and microcomputer
US7240144B2 (en) * 2004-04-02 2007-07-03 Arm Limited Arbitration of data transfer requests

Also Published As

Publication number Publication date
JP2000235560A (en) 2000-08-29

Similar Documents

Publication Publication Date Title
US4782439A (en) Direct memory access system for microcontroller
US5685005A (en) Digital signal processor configured for multiprocessing
US5619720A (en) Digital signal processor having link ports for point-to-point communication
US6907514B2 (en) Microcomputer and microcomputer system
JP4226085B2 (en) Microprocessor and multiprocessor system
US5634076A (en) DMA controller responsive to transition of a request signal between first state and second state and maintaining of second state for controlling data transfer
JP3136257B2 (en) Computer memory interface device
EP0917063A2 (en) Data processing system and microprocessor
JP2002140289A (en) Microcontroller DMA operation with adjustable word size transfer and address alignment / increment
JPH11238030A (en) PCI-PCI bridge and first-in first-out memory therefor
JP3619532B2 (en) Semiconductor integrated circuit device
US7260667B2 (en) Data transfer device, semiconductor integrated circuit, and microcomputer
US7310717B2 (en) Data transfer control unit with selectable transfer unit size
JP3905660B2 (en) Microcomputer and microcomputer system
JP3681590B2 (en) Data processing apparatus and data processing system
JP2001209609A (en) Microcomputer system
JP2001067305A (en) Semiconductor integrated circuit and microcomputer
JP3708979B2 (en) Semiconductor integrated circuit
JP2001109708A (en) Microcomputer
JP3839068B2 (en) Semiconductor integrated circuit device
JP2001056793A (en) Information processor
JP3323341B2 (en) Emulation processor and emulator equipped with it
JP2004213142A (en) Semiconductor integrated circuit device
JPH08137784A (en) Information processing device
JP4322284B2 (en) Single chip microcomputer

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060421

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: 20061226

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070112

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: 20110119

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110119

Year of fee payment: 4

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: 20110119

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20110119

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120119

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130119

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130119

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140119

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees