JP3987750B2 - Memory control device and LSI - Google Patents

Memory control device and LSI Download PDF

Info

Publication number
JP3987750B2
JP3987750B2 JP2002103027A JP2002103027A JP3987750B2 JP 3987750 B2 JP3987750 B2 JP 3987750B2 JP 2002103027 A JP2002103027 A JP 2002103027A JP 2002103027 A JP2002103027 A JP 2002103027A JP 3987750 B2 JP3987750 B2 JP 3987750B2
Authority
JP
Japan
Prior art keywords
bus
memory
request
bus master
transfer rate
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
JP2002103027A
Other languages
Japanese (ja)
Other versions
JP2003016024A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2002103027A priority Critical patent/JP3987750B2/en
Publication of JP2003016024A publication Critical patent/JP2003016024A/en
Application granted granted Critical
Publication of JP3987750B2 publication Critical patent/JP3987750B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、メモリアクセスを制御するメモリ制御装置に関し、特にLSI(large scale integrated circuit)内部に含まれるメモリ制御装置であって、LSI内部の複数の回路によるLSIの外部に接続されたメモリへのアクセスを制御するメモリ制御装置に関する。
【0002】
【従来の技術】
近年、情報のマルチメディア化等を背景として、高速に映像、音声等を処理するために1又は複数のDSP(Digital Signal Processor)、MPU(Microprocessing Unit)を包含するLSIが開発されるようになってきている。
【0003】
また、MPUの他にグラフィックス用のプロセッサ、AV(Audio Visual)デコーダ、ハードディスクコントローラ等の独立した回路を搭載した複合的で高機能なLSIも開発されるようになってきている。
このような複合的なLSIにおける内部の各回路は独立したローカルメモリを用いてそれぞれの機能を実現するための演算処理等を行うことができる独立した回路であるが、各回路が同一のメモリを共用してそれぞれの機能を実現するための演算処理等を行うようにLSIを構成すれば部品コスト削減等を図ることができる。
【0004】
このためには、同一メモリへの各回路によるメモリアクセスの競合を調停するためのメモリ制御装置をLSI内部に備える必要がある。
メモリ制御装置は、DSP、MPU等の複数の回路(以下、「バスマスタ」という。)からのメモリへのアクセス要求、つまりメモリバスについてのバスリクエストを調停し、ある時刻においては、1つのバスマスタだけのアクセスを許可する。即ち、メモリ制御装置は、ある時刻においては、1つのバスマスタだけにメモリバスのバス使用権を付与する。
【0005】
これに対して、各バスマスタは、メモリアクセスが必要になった時にメモリ制御装置にバスリクエストを発し、バス使用権を取得するとメモリバスを利用してメモリとの間でデータ転送を行う。
ところで、バスマスタには、例えば映像、音声のリアルタイム再生等の実現のために、連続的に処理すべきデータがある場合において一定の転送レートでデータ転送が行われることを要するものがある。
【0006】
一定の転送レートでデータ転送が行われることを必要とするバスマスタは、内部の入出力用バッファのサイズやデータの処理方式その他の要因により、転送レートが保たれるべき範囲となる時間間隔について固有の要求をもっている。例えば、2ミリ秒(ms)間を通して見た場合において500キロバイト/ミリ秒(KB/ms)の転送レートが保たれていれば足りるバスマスタもあれば、これに対して転送レートの確保に関する時間的余裕がなく、1ms間において500KB/msの転送レートが保たれていなければならないバスマスタもある。
【0007】
仮にメモリを独占できるとした場合には、基本的にはバスマスタは、その転送レートを保つべき範囲となる時間間隔をあけて繰り返しバスリクエストを発する。以下、転送レートを保つべき範囲となる時間間隔を、バスリクエスト周期という。
一定の転送レートでのデータ転送を要求する複数のバスマスタとメモリ制御装置とを内包するLSIを設計する場合においては、各バスマスタの要求する転送レートやバスリクエスト周期を考慮してメモリ制御装置の調停機構を構築しなければならない。
【0008】
調停が適切である場合には各バスマスタは要求する転送レートでデータ転送を行うことができるが、調停が適切でなければ、いずれかのバスマスタがバスリクエスト周期内においては要求する転送レートでデータ転送を行うことができないという問題が生じる。
従来のメモリ制御装置として一般的なものには、調停機構としてバス使用権の先取り優先方式を用いたものや、各バスマスタについて定めた優先度に基づき調停する方式を用いたものがある。
【0009】
【発明が解決しようとする課題】
以下、このような従来のメモリ制御装置の問題点について説明する。
メモリバスのバスバンド幅は約800KB/msであるとして、連続的に処理すべきデータがある場合において、バスリクエスト周期が2msでありその2ms間に1000KBのデータを転送することを要求するバスマスタAと、バスマスタAの半分しか時間的余裕がなくバスリクエスト周期が1msでありその1ms間に100KBのデータを転送することを要求するバスマスタBとの2つのバスマスタがLSIに含まれている場合を想定する。さらに、先取り優先方式であるならばバスマスタAが先にバスリクエストを出した場合を想定し、優先度に基づき調停する方式であるならばバスマスタAが優先度が高い場合を想定する。
【0010】
この場合において、従来のメモリ制御装置にバスマスタAからのバスリクエストがあると、メモリ制御装置はバスマスタAにバス使用権を与えてデータの転送を許可する。これを受けてバスマスタAが1000KBのデータを転送するとその転送に1ms以上かかるため、メモリ制御装置はバスマスタBからの1ms毎のバスリクエストに即座に応じることができなくなる。
【0011】
このため、バスマスタBにとってはメモリアクセスの待ち時間が1msより大きくなってしまい、バスマスタBとメモリとの間でのデータ転送量は1ms単位の各周期においては100KBに統一されず、転送にむらが生じてしまう。即ちバスマスタBが必要とする転送レートがバスリクエスト周期内において保たれなくなる。
【0012】
このようにバス使用権の先取り優先方式或いは優先度に基づき調停する方式を用いた調停機構をもつ従来のメモリ制御装置は、長期的には各バスマスタが必要とする転送レートを保証することができるかもしれないが、短期間においてその転送レートの保証ができないという問題を有する。
この問題を解決するためには、各バスマスタが必要とする転送レートや、転送レートが保証されるべき範囲となる時間間隔等を予め考慮してメモリ制御装置を設計しておく必要がある。
【0013】
しかしながら、LSIがどのような装置中に実装されるかによって、各バスマスタに要求される処理の内容が変化し、これにより各バスマスタの要求する転送レートやバスリクエスト周期が変化するため、各バスマスタの具体的な処理内容を予め考慮してメモリ制御装置を設計しておくことは困難である。
また、年々LSIは高機能化しており、将来的にLSIに新たな回路を盛り込む場合の開発コスト抑制の見地からは、LSIに包含する各回路が何であろうとその各回路についてのデータ転送レートの保証が行えるような汎用性の高いメモリ制御装置の設計開発が要請される。メモリ制御装置の汎用性が高ければ、その設計資産の長期的活用が図れるからである。
【0014】
そこで、本発明はかかる要請に鑑みてなされたものであり、各バスマスタに対して、要求された転送レートを必要な時間的精度で保証してメモリアクセスの競合を調停する汎用的なメモリ制御装置を提供することを目的とする。また、そのメモリ制御装置及びバスマスタを含むLSIを提供することを目的とする。
【0015】
【課題を解決するための手段】
上記目的を達成するために、本発明に係るメモリ制御装置は、メモリを共用する複数のバスマスタのいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各バスマスタに対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各バスマスタについて、対応する転送レートによって前記単位時間において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0016】
また、本発明に係るメモリ制御装置は、1つのメモリ中の互いに独立したメモリ領域にアクセスする複数のバスマスタに対し、選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各バスマスタに対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各バスマスタについて、対応する転送レートによって前記単位時間において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0017】
上記構成により、各バスマスタが要求する転送レートに関する条件に、何ら統一がない場合であっても、転送待ちの余裕が最小であるバスマスタの転送レートに関する条件が満足できるように転送レートの調整を行うこととなるため、各バスマスタが必要な時間的精度で転送レートを一定に保ってデータ転送を行うことができるようになる。
【0018】
また、このメモリ制御装置を用いれば、各バスマスタの転送レートに関する条件を変更する必要があるときにも、記憶されている転送レート情報を書き替えるのみで、各バスマスタの要求に応じた転送レートで各バスマスタにメモリとの間でデータ転送を行わせることができるようになる。このことから、アクセス競合制御の対象となるバスマスタを取り替えても、このメモリ制御装置を活用することができるといえる。
【0019】
また、本発明に係るLSIは、メモリを共用する複数の回路と、当該複数の回路のいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置とを含むLSIであって、前記各回路は、メモリとの間で一定の転送レートでデータを転送することを要する回路であり、前記メモリ制御装置は、前記各回路について、当該回路がメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各回路に対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各回路について、対応する転送レートによって前記単位時間に転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各回路に対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0020】
上記構成により、LSIの複数の内部回路それぞれが、互いに共用するメモリとの間で、必要な時間的精度で必要とする転送レートを保ってデータ転送を行うことができるようになる。
【0021】
【発明の実施の形態】
以下、本発明に係るメモリ制御装置の実施の形態であるメモリ制御部と複数のバスマスタを含むLSIについて説明する。
<実施の形態1>
<構成>
図1は、本発明の実施の形態1に係るメモリ制御部を含むLSI100の構成図である。なお、図1には、LSI100の他にユニファイドメモリ200を示している。
【0022】
LSI100は、情報家電機器やその他の機器に搭載されるLSIであり、メモリ制御部110、バスマスタA121、バスマスタB122、バスマスタC123及びクロックジェネレータ190を備え、ユニファイドメモリ200に接続されている。なお、図1には示していないが、LSI100は、他の外部装置にも接続されている。
【0023】
ここで、クロックジェネレータ190は、クロック信号をメモリ制御部110、バスマスタA〜C及びユニファイドメモリ200に供給する回路である。
バスマスタA121、B122及びC123は、例えば、ユニファイドメモリ200を主記憶として用いるMPUやユニファイドメモリ200に画像データ等を格納するDSP等であり、互いに独立してユニファイドメモリ200にアクセスしデータ転送を行う。即ち、バスマスタA〜Cそれぞれは、データ転送の必要がある場合にメモリ制御部110に対してREQ信号線を通じてバスリクエストを発し、メモリ制御部110からGNT信号線を通じてバス使用権を得て、バス使用権を得ている間においてクロックジェネレータ190からのクロック信号に基づくタイミングでメモリ制御部110の調停部114と同期してデータの転送を行う。
【0024】
図1においては、各バスマスタからのバスリクエストをそれぞれREQ−A、REQ−B、REQ−Cで表し、各バスマスタへのバス使用権の付与をそれぞれGNT−A、GNT−B、GNT−Cで表している。
なお、データの転送は、メモリアドレスの指定と、ユニファイドメモリへのデータの書き込み或いはユニファイドメモリからのデータの読み出しによってなされ、これによりアドレスとデータとがメモリバス上を伝送される。各バスマスタがユニファイドメモリ200との間で転送するデータは、例えば外部装置から入力されたデータに基づいてバスマスタが生成した、ディスプレイ装置に出力するための映像データである。
【0025】
各バスマスタは、それぞれ独立してデータ転送の処理を行うものであり、例えばディスプレイ装置に出力する映像が途切れないようにする等のため、一定の転送レートでユニファイドメモリとの間でデータを転送しなければならないものである。但し、バスマスタが常に連続してユニファイドメモリとの間でデータ転送を行うとは限らない。例えば外部装置からデータが連続して入力されている等により、送出すべきデータが生成され蓄積されている期間においてはバスマスタは連続的にユニファイドメモリへのデータ転送を行うが、外部装置からデータが入力されない等によって、送出すべきデータが蓄積されていない期間においてはバスマスタはユニファイドメモリへのデータ転送を行わない。
【0026】
また、メモリ制御部110は、外部装置から伝えられる転送レート情報に基づいて、各バスマスタのユニファイドメモリ200へのアクセスを調停するものであり、転送レート情報記憶部111、タイミング情報生成部112、タイミング情報格納部113及び調停部114を有する。
ここで、転送レート情報記憶部111は、外部装置から伝えられる転送レート情報を記憶するためのメモリ領域である。なお、転送レート情報については、後に詳しく説明する。
【0027】
タイミング情報生成部112は、転送レート情報記憶部111に記憶されている転送レート情報を参照してタイミング情報を生成しタイミング情報格納部113に格納する機能を有するものである。なお、タイミング情報については後に詳しく説明する。
タイミング情報格納部113は、タイミング情報を格納するためのメモリ領域である。
【0028】
調停部114は、タイミング情報格納部113に格納されているタイミング情報を参照し、クロックジェネレータ190からのクロック信号に基づき所定のタイミングで、各バスマスタからのバスリクエストの有無を検査し、バスリクエストを発しているバスマスタに順次選択的にバス使用権を与える機能を有する。各バスマスタはREQ信号線をアクティブにすることにより調停部114にバスリクエストを発し、調停部114はいずれかのバスマスタへのGNT信号線をアクティブにすることによりそのバスマスタにバス使用権を付与する。なお、バスマスタはデータ転送の必要がある限りにおいてREQ信号線をアクティブにし続ける。
【0029】
<データ>
図2は、転送レート情報記憶部111が外部装置から伝えられて記憶している転送レート情報のデータ構成及び内容例を示す図である。
同図に示すように、転送レート情報300は、バスマスタA〜Cについて、リクエスト周期302と1回のデータ転送量303との組を対応付けた情報である。転送レート情報は、例えば、LSIの外部に配置されメモリ及びCPUを備えておりLSI100を制御する外部装置等によって、LSI内の各バスマスタがユニファイドメモリ200にアクセスしてデータ転送を伴う処理を開始するより前に設定されるものである。
【0030】
ここで、リクエスト周期302は、連続的に処理すべきデータがある場合において各バスマスタが必要とする転送レートが、保たれるべき範囲となる時間間隔である。なお、連続的に処理すべきデータがある場合において、各バスマスタは基本的にそのリクエスト周期302以下の周期でバスリクエストを発する。
また、1回のデータ転送量303は、対応するリクエスト周期302において各バスマスタが転送する必要のあるデータの量である。
【0031】
同図の例では、連続的にデータ転送を行う必要がある場合において、バスマスタAは、2000マイクロ秒(μs)毎に1000キロバイト(KB)のデータ転送を行わなければならず、バスマスタBは、1000μs毎に100KBのデータ転送を行わなければならず、バスマスタCは、4000μs毎に400KBのデータ転送を行わなければならないことを示している。
【0032】
即ち、バスマスタAは2000μsの範囲において500KB/msの転送レートを保って転送を行う必要のあるバスマスタであり、バスマスタBは1000μsの範囲において100KB/msの転送レートを保って転送を行う必要があるバスマスタであり、バスマスタCは4000μsの範囲において100KB/msの転送レートを保って転送を行う必要があるバスマスタであることを同図の転送レート情報300は示している。バスマスタA〜Cにおいては、バスマスタBが転送レートの確保に関する時間的余裕の最も小さいものであり、バスマスタCが転送レートの確保に関する時間的余裕が最も大きいものである。
【0033】
なお、CPU等を備えた外部装置は、各バスマスタの仕様に合わせて、転送レート情報300を定めてメモリ制御部110に入力すればよく、このようにメモリ制御部110の制御内容を定める転送レート情報300を外部入力可能な構成としていることにより、メモリ制御部110は汎用的なものとなっている。
図3は、タイミング情報生成部112に生成されタイミング情報格納部113に格納されるタイミング情報のデータ構成及び内容例を示す図である。
【0034】
同図に示すように、タイミング情報400は、リクエスト検出周期401と、各バスマスタについての周期内バス使用許可時間402から構成される。
ここで、リクエスト検出周期401は、調停部114がバスマスタA〜Cからのバスリクエストを検出する間隔としてタイミング情報生成部112により定められる時間を示す情報である。
【0035】
また、周期内バス使用許可時間402は、リクエスト検出周期401において各バスマスタが必要なデータの転送を行うことができるように、各バスマスタに対してメモリバスの使用を許可すべき時間、即ちバス使用権を付与すべき時間を示す情報である。なお、ユニファイドメモリ200のメモリバスのバスバンド幅は800KB/msであるものとしている。
【0036】
なお、タイミング情報における各時間は、実際には例えばクロックジェネレータ190が発するクロック信号のカウント数で表されている。
<動作>
以下、上述の構成を備えるメモリ制御部110の動作について説明する。
外部装置から伝えられた転送レート情報を転送レート情報記憶部111が記憶している状態において、タイミング情報生成部112は、図4に示す動作を行う。
【0037】
図4は、タイミング情報生成部112の動作を示すフローチャートである。
タイミング情報生成部112は、転送レート情報に含まれている各バスマスタについてのリクエスト周期を参照し、最も短いリクエスト周期を、タイミング情報中のリクエスト検出周期として定める(ステップS11)。
続いて、タイミング情報生成部112は、転送レート情報とステップS11において定めたリクエスト検出周期とを用いて、各バスマスタについて、リクエスト検出周期あたりのデータ転送量を求め(ステップS12)、その求めたデータ転送量をメモリバスのバスバンド幅で割ることによって、タイミング情報中の周期内バス使用許可時間を求める(ステップS13)。なお、タイミング情報生成部112は、メモリバスのバスバンド幅をLSI内部のメモリ等に記憶しており、それを活用してステップS13の演算を行う。
【0038】
こうして、求められたタイミング情報は、タイミング情報生成部112によってタイミング情報格納部113に格納される。このようなタイミング情報生成部112の動作は、例えばLSIに電流が供給され始めてから短期間のうちに行われることが想定される。
なお、例えば、図2に例示する内容の転送レート情報300に基づいてタイミング情報生成部112により生成されるタイミング情報は、図3に例示する内容のものとなる。
【0039】
次に、タイミング情報が生成された後に、調停部114が行う調停処理について説明する。
図5は、調停部114が行う調停処理を示すフローチャートである。
調停部114は、タイミング情報と、クロックジェネレータ190から一定間隔で供給されるクロック信号とに基づいて、リクエスト検出周期毎に到来する時刻(以下、「リクエスト検出タイミング」という。)を待ち、リクエスト検出タイミングにおいて各バスマスタからバスリクエストが発されているか否かを検査する(ステップS21)。
【0040】
調停部114は、ステップS21の検査時において、いずれかのバスマスタからのバスリクエストが検出されていたか否かを判定し(ステップS22)、いずれのバスマスタからもバスリクエストが検出されていなければ、ステップS21に戻り次のリクエスト検出タイミングの到来を待つ。
ステップS22において、バスリクエストが検出されていたと判定されると、調停部114は、バスリクエストを発していたバスマスタの1つにバス使用権を付与する(ステップS23)。
【0041】
調停部114は、あるバスマスタにバス使用権を付与した後、クロック信号をカウントすることによりそのバスマスタについての周期内バス使用許可時間が経過するのを待って、経過時にバス使用権の付与を中止する(ステップS24)。即ち、ステップS23、S24により、あるバスマスタへのGNT信号線を、周期内バス使用許可時間だけアクティブにしその後にはインアクティブにする。
【0042】
ステップS24の後、調停部114は、直前のステップS21の検査時において、その検査後に既にバス使用権を与えたバスマスタと異なるバスマスタからのバスリクエストが検出されていたか否かを判定し(ステップS25)、検出されていなければステップS21に戻り次のリクエスト検出タイミングの到来を待つ。
【0043】
ステップS25において、検査後に既にバス使用権を与えたバスマスタと異なるバスマスタからのバスリクエストが検出されていたと判定すると、調停部114はステップS23の処理に戻る。
従って、時間の経過をリクエスト検出周期の連続と表現すると、調停部114は、各リクエスト検出周期において、その周期前にバスリクエストを発している各バスマスタに対し、該当する周期内バス使用許可時間分だけバス使用権を与えることになる。
【0044】
図6は、バスマスタA〜Cからのバスリクエストとメモリ制御部110によるバス使用権の付与との時間的変化を示すタイミングチャートである。
これは、図2に例示した転送レート情報300に基づいてメモリ制御部110が各バスマスタによるメモリアクセスの競合を調停した結果を示している。
同図から明らかなように、リクエスト検出周期は、バスリクエスト周期の最も短いバスマスタBに合わせて1000μsとなっており、リクエスト検出周期毎にバスリクエストを発していたバスマスタA、B、Cに順にそれぞれ625μs、125μs、125μsずつバス使用権が付与されている。メモリバスのバスバンド幅が800KB/msであるため、リクエスト検出周期内においてバスマスタAは500KB、バスマスタBは100KB、バスマスタCは100KBのデータの転送を行っていることになる。
【0045】
従って、バスマスタAは2000msにおいて1000KBのデータの転送を行い、バスマスタBは1000msにおいて100KBのデータの転送を行い、バスマスタCは4000msにおいて400KBのデータの転送を行っており、各バスマスタは、要求する転送レートを要求する精度で確保してデータ転送を行えている。
<実施の形態2>
以下、本発明の実施の形態2に係るメモリ制御部について説明する。実施の形態1で示したメモリ制御部110は、一定の転送レートでメモリとの間でデータ転送を行う必要のあるバスマスタA〜C間でのメモリアクセスの競合を調停する機能を有するものであったが、実施の形態2に係るメモリ制御部は、さらに一定の転送レートを保つ必要がなく不定期にメモリとの間でデータ転送を行うバスマスタDを加えたバスマスタA〜D間でのメモリアクセスの競合を調停する機能を有するものである。
【0046】
<構成>
図7は、本発明の実施の形態2に係るメモリ制御部を含むLSI500の構成図である。なお、図7には、LSI500の他にユニファイドメモリ200を示している。
LSI500は、メモリ制御部510、バスマスタA121、バスマスタB122、バスマスタC123、バスマスタD124及びクロックジェネレータ190を備え、ユニファイドメモリ200に接続されている。図7には示していないが、LSI500は、他の外部装置にも接続されている。
【0047】
なお、LSI500の構成要素のうち実施の形態1で示したLSI100の構成要素と基本的に同様のものについては、図7において図1と同一の符号を付しており、ここでは詳しい説明は省略する。
ここで、クロックジェネレータ190は、クロック信号をメモリ制御部510、バスマスタA〜D及びユニファイドメモリ200に供給する回路である。
【0048】
バスマスタD124は、バスマスタA〜Cとは独立してユニファイドメモリ200にアクセスしデータ転送を行う。即ち、バスマスタDは、データ転送の必要がある場合にメモリ制御部510に対してバスリクエストを発し、メモリ制御部510からバス使用権を得て、バス使用権を得ている間においてクロックジェネレータ190からのクロック信号に基づくタイミングでメモリ制御部510の調停部514と同期してデータの転送を行う。
【0049】
なお、バスマスタD124は、一定の転送レートを保ってデータ転送を行う必要があるタイプつまり定期的にバスリクエストを発するタイプ(以下、「定期型」という。)のバスマスタA〜Cと異なり、不定期にバスリクエストを発するタイプ(以下、「不定期型」という。)のバスマスタであり、例えば、LSIが搭載された装置のユーザからの入力に応じて外部から割込みを受けて処理を行うMPU等である。
【0050】
図7においては、各バスマスタからのバスリクエストをそれぞれREQ−A、REQ−B、REQ−C、REQ−Dで表し、各バスマスタへのバス使用権の付与をそれぞれGNT−A、GNT−B、GNT−C、GNT−Dで表している。また、メモリ制御部510は、外部装置から伝えられる転送レート情報に基づいて、バスマスタA〜Dのユニファイドメモリ200へのアクセスを調停するものであり、転送レート情報記憶部111、タイミング情報生成部112、タイミング情報格納部113、調停部514及び不定期マスタ情報記憶部515を有する。
【0051】
不定期マスタ情報記憶部515は、不定期型のバスマスタを示す不定期マスタ情報を予め記憶しているメモリ領域である。不定期マスタ情報は調停部514が不定期型のバスマスタがどれであるかを認識するために必要な情報である。
調停部514は、不定期マスタ情報記憶部515に記憶されている不定期マスタ情報とタイミング情報格納部113に格納されているタイミング情報とを参照し、クロックジェネレータ190からのクロック信号に基づき所定のタイミングで、不定期型のバスマスタ以外のバスマスタ、即ち定期型のバスマスタA〜Cからのバスリクエストの有無を検査してバスリクエストを発しているバスマスタに順次選択的にバス使用権を与え、さらにリクエスト検出周期内でバスマスタA〜Cのいずれにもバス使用権を与えない時間が残っているときには不定期型のバスマスタからバスリクエストが発されている限りにおいてその不定期型のバスマスタにバス使用権を与える。
【0052】
<動作>
以下、上述の構成を備えるメモリ制御部510の動作について説明する。
タイミング情報生成部112は、実施の形態1で示した動作と同様の動作を行う(図4参照)。
図8は、調停部514が行う調停処理を示すフローチャートである。
【0053】
調停部514は、タイミング情報と、クロックジェネレータ190から一定間隔で供給されるクロック信号とに基づいて、リクエスト検出タイミングが到来するのを待ち、リクエスト検出タイミングにおいて不定期型のバスマスタ以外の各バスマスタ、つまり定期型の各バスマスタからバスリクエストが発されているか否かを検査する(ステップS31)。
【0054】
調停部514は、ステップS31の検査時において、定期型のいずれかのバスマスタからのバスリクエストが検出されていたか否かを判定する(ステップS32)。
ステップS32において、バスリクエストが検出されていたと判定されると、調停部514は、バスリクエストを発していた定期型のバスマスタの1つにバス使用権を付与し(ステップS33)、クロック信号をカウントすることによりそのバスマスタについての周期内バス使用許可時間が経過するのを待って、経過時にバス使用権の付与を中止する(ステップS34)。即ち、ステップS33、S34により、定期型の1つのバスマスタへのGNT信号線を、周期内バス使用許可時間だけアクティブにしその後にはインアクティブにする。
【0055】
ステップS34の後、調停部514は、直前のステップS31の検査時において、その検査後に既にバス使用権を与えたバスマスタと異なる定期型のバスマスタからのバスリクエストが検出されていたか否かを判定する(ステップS35)。
ステップS35において、検査後に既にバス使用権を与えたバスマスタと異なる定期型のバスマスタからのバスリクエストが、ステップS31の検査時において検出されていたと判定すると調停部514はステップS33の処理に戻り、その他の場合には調停部514は次のリクエスト検出タイミングが到来しているか否かを判定し(ステップS36)、次のリクエスト検出タイミングが到来していると判定した場合にはステップS31の処理を行う。
【0056】
また、ステップS32において、いずれのバスマスタからもバスリクエストが検出されていない場合には、調停部514は、ステップS33〜S35の処理をスキップし、ステップS36の判定処理を行う。
ステップS36において、次のリクエスト検出タイミングが到来していないと判定した場合には、調停部514は、不定期型のバスマスタからバスリクエストが発されているか否かを検査し(ステップS37)、バスリクエストが検出された場合には、その不定期型のバスマスタにバス使用権を付与し(ステップS38)、その不定期型のバスマスタからのバスリクエストが中止されたか或いは次のリクエスト検出タイミングが到来した時点でバス使用権の付与を中止し(ステップS39)、ステップS36の判定処理に戻る。
【0057】
なお、ステップS37において、不定期型のバスマスタからのバスリクエストが検出されない場合にも、調停部514はステップS36の判定処理に戻る。
従って、時間の経過をリクエスト検出周期の連続と表現すると、調停部514は、各リクエスト検出周期において、その周期前にバスリクエストを発している定期型の各バスマスタに対し、該当する周期内バス使用許可時間分だけバス使用権を与え、その周期内の残りの時間において不定期型のバスマスタからバスリクエストが発されていればその不定期型のバスマスタに対してバス使用権を与える。
【0058】
図9は、バスマスタA〜Dからのバスリクエストとメモリ制御部510によるバス使用権の付与との時間的変化を示すタイミングチャートである。
同図に示すように、調停部514は、各リクエスト検出周期において、定期型のバスマスタA〜Cにバス使用権を付与した時間の残り分において、不定期型のバスマスタDからバスリクエストが発されるとバスマスタDにバス使用権を付与している。
【0059】
なお、あるリクエスト検出タイミングから始まるリクエスト検出周期内においてバス使用権が付与されたバスマスタDがそのリクエスト検出周期内においてバスリクエストの発行を中止せずに次のリクエスト検出タイミングが到来した場合には、そのバスマスタDへのバス使用権の付与は中止される。また、定期型のバスマスタのうちでリクエスト検出タイミングにおいてバスリクエストを発していなかったものがあれば、その分だけリクエスト検出周期内での、不定期型のバスマスタにバス使用権を付与し得る時間が長くなる。
【0060】
<調停処理の変形例>
以下、上述した調停部514による調停処理を、不定期型のバスマスタに対して、より早くバス使用権を与えるように変形した例について説明する。
図10は、調停部514が行う調停処理の変形例を示すフローチャートである。
【0061】
まず、調停部514は、リクエスト検出タイミングが到来した時において定期型のバスマスタの各バスマスタからバスリクエストが発されているか否かを検査し、バスリクエストが検出されていた全てのバスマスタについての周期内バス使用許可時間の総和を求め、リクエスト検出周期からその総和を減算して得られる時間を、余剰時間として定める(ステップS51)。ここで、余剰時間は、リクエスト検出周期内においてバス使用権をある不定期型のバスマスタに付与しうる時間を意味する。
【0062】
続いて調停部514は、ステップS31の検査時において、定期型のいずれかのバスマスタからのバスリクエストが検出されていたか否かを判定する(ステップS52)。
ステップS52において、バスリクエストが検出されていたと判定した場合には、調停部514は、バスリクエストを発していた定期型のバスマスタの1つにバス使用権を付与し(ステップS53)、クロック信号をカウントすることによりそのバスマスタについての周期内バス使用許可時間が経過するのを待って、経過時にバス使用権の付与を中止する(ステップS54)。即ち、ステップS53、S54により、定期型の1つのバスマスタへのGNT信号線を、周期内バス使用許可時間だけアクティブにしその後にはインアクティブにする。
【0063】
また、ステップS52において、バスリクエストが検出されていなかったと判定した場合には、調停部514はステップS53及びS54の処理をスキップしステップS55の判定処理を行う。
ステップS54の後、調停部514は、次のリクエスト検出タイミングが到来しているかを判定し(ステップS55)、到来していればステップS51の処理に戻り、到来していなければ余剰時間が0でないかを判定する(ステップS56)。
【0064】
ステップS56において調停部514は余剰時間が0でないと判定した場合、即ち余剰時間があると判定した場合には、不定期型のバスマスタからバスリクエストが発されているか否かを検査して(ステップS57)、バスリクエストを検出したときにはその不定期型のバスマスタに対してバス使用権を付与し、バス使用権を付与している時間の経過に合わせて余剰時間をカウントダウンし(ステップS58)、その不定期型のバスマスタからのバスリクエストが中止された時、或いは余剰時間が0になった時にバス使用権の付与を中止し(ステップS59)、再びステップS56の判定処理に戻る。
【0065】
なお、ステップS51によって定められた余剰時間は、ステップS58で不定期型のバスマスタにバス使用権を付与した時間分だけカウントダウンされる。但し、余剰時間のカウントダウンは余剰時間が0になった時点で停止する。
ステップS56において余剰時間が0であると判定した場合、或いはステップS57において不定期型のバスマスタからのバスリクエストを検出した場合には、調停部514は既にバス使用権を付与したバスマスタ以外の定期型のバスマスタからのバスリクエストがステップS51において検出されていたか否かを判定し(ステップS60)、検出されていなければステップS55の処理に戻り、検出されていればステップS53の処理に戻る。
【0066】
また、ステップS55において調停部514は、次のリクエスト検出タイミングが到来していると判定した場合には、次のリクエスト検出タイミングにおいて定期型の各バスマスタからのバスリクエストを検査するステップS51の処理に戻る。
このような変形した調停処理により調停部514は、不定期型のバスマスタがバスリクエストを発していた時点でデータ転送を行っている定期型のバスマスタに対し、周期内バス使用許可時間分のバス使用権を付与し終え次第、その不定期型のバスマスタにバス使用権を付与するため、不定期型のバスマスタは、データ転送の必要が生じると迅速にデータ転送を開始することができるようになる。即ち、調停部はこのような変形した調停処理を行うことで、不定期型のバスマスタによるメモリアクセスについてのアクセスレイテンシを抑えることができるようになる。
【0067】
図11は、バスマスタA〜Dからのバスリクエストと、調停部514の行う調停処理を変形した場合におけるメモリ制御部510によるバス使用権の付与との時間的変化を示すタイミングチャートである。
同図に示すように、調停部514は、定期型のバスマスタAにバス使用権を付与している間に不定期型のバスマスタDからバスリクエストが発されると、バスマスタAの次にバスマスタDにバス使用権を与え、続いて定期型のバスマスタB及びCに順次バス使用権を付与し、次のリクエスト検出周期において定期型のバスマスタA及びBに順次バス使用権を付与し、バスマスタBにバス使用権を付与している間に不定期型のバスマスタDからバスリクエストが発されると、バスマスタBの次にバスマスタDにバス使用権を与え、続いて定期型のバスマスタCにバス使用権を付与している。
<補足>
以上、本発明に係るメモリ制御装置について実施の形態1、2に基づいて説明したが、本発明はこれらの実施の形態に限られないことは勿論である。即ち、
(1)両実施の形態で示したバスマスタは、複数であればいくつであっても差し支えない。但し、定期型の全てのバスマスタについて、転送レートと、転送レートを保つべき範囲になる時間間隔とを示す転送レート情報をLSIに入力する必要があり、不定期型のバスマスタが存在する場合には全ての不定期型のバスマスタを特定するための不定期マスタ情報が不定期マスタ情報記憶部515に記憶されている必要がある。
【0068】
なお、LSIにユニファイドメモリが複数接続されていてもよく、この場合には、メモリ制御部は、ユニファイドメモリ毎に、実施の形態1或いは2で示したようにそのユニファイドメモリにアクセスする全てのバスマスタ間でのアクセス競合を調停するものであればよい。
(2)実施の形態1で示したメモリ制御部110及び実施の形態2で示したメモリ制御部510は、全てハードウェア回路として構築されていてもよいし、MPUとメモリからなりそのメモリ中のプログラムをMPUが実行することにより調停機能を実現するように構築されていてもよい。
(3)両実施の形態では、転送レート情報は各バスマスタについてのリクエスト周期と1回のデータ転送量とからなる情報であることとしたが、転送レート情報は転送レートと、転送レートが保証されるべき最小時間間隔とを示す情報であれば、どのような情報の組合わせであってもよい。
(4)両実施の形態で示した転送レート情報は、外部装置から入力されるものとしたが、初期値を予め記憶しておいてもよい。
【0069】
また、転送レート情報は随時入力可能であることとし、転送レート情報の入力がなされる毎にタイミング情報生成部112はその転送レート情報に基づいてタイミング情報を生成してタイミング情報格納部113に格納することとしてもよい。調停部114及び調停部514はタイミング情報に基づいて各バスマスタへのバス使用権の付与の時間を決定するものであるため、動的な調停制御が実現されるようになる。
【0070】
なお、実施の形態2ではバスマスタを定期型と不定期型とに分類したが、これは転送レートの保証が必要なデータ転送を行うか否かによる分類であって、LSIに外部から入力される転送レート情報の内容に応じて、同じバスマスタであっても、定期型となる場合や不定期型になる場合があり得る。
(5)両実施の形態において示したタイミング情報生成部112が参照するメモリバスのバスバンド幅は、LSIの外部から入力可能であることとしてもよい。
(6)実施の形態1で示したメモリ制御部110及び実施の形態2で示したメモリ制御部510は、リクエスト検出周期等のリクエスト検出タイミングを特定するための情報を各バスマスタに伝えることとし、これを受けて各バスマスタはリクエスト検出タイミングに合わせてバスリクエストを発行することとしてもよい。
(7)両実施の形態では、バスマスタに対するバス使用権の付与は、GNT信号線をアクティブにすることにより実現し、バス使用権の付与の中止は、GNT信号線をインアクティブにすることにより実現することとしたが、本発明はこれらの実現方式に限定されることはなく、バスマスタにバス使用の許可及び禁止を伝えることのできる方式であれば、どのような方式によって実現してもよい。
【0071】
例えば、バス使用権の付与をある信号線を瞬間的にアクティブにすることによりバスマスタに通知し、バス使用権の付与の中止を別の信号線を瞬間的にアクティブにすることによりバスマスタに通知することとしてもよい。
また、実施の形態で示した定期型のバスマスタは、データ転送の必要がある限りにおいてREQ信号線をアクティブにし続けるものとしたが、バスリクエストを発する方式はこれに限定されることはない。例えば、メモリ制御部110及びメモリ制御部510は、転送レート情報に基づいて各バスマスタに対してリクエスト検出周期内で転送可能なデータ量を通知することとしてもよく、各バスマスタはその通知されたデータ量の送信が必要となれば瞬間的にREQ信号線をアクティブにすることとしてもよい。
(8)両実施の形態で示したユニファイドメモリ200は、特定のメモリアーキテクチャを有するメモリに限定されることはなく、いかなるメモリでも差し支えない。
【0072】
また、両実施の形態で示したバスマスタとユニファイドメモリと間を結ぶメモリバスは、アドレスバスとデータバスとの別々の信号線で構成されるものとしても、共通の信号線で構成されるものとしてもよい。共通の信号線で構成される場合には、バスマスタとユニファイドメモリとの間でアドレス情報とデータとが時分割で伝送されることになる。また、バスマスタとユニファイドメモリとの間のバスはメモリ制御部内のインタフェース部を介して接続されていることとしてインタフェース部においてアドレスデコード等の処理を行うこととしてもよい。
(9)各実施の形態で示したLSIにおいては、基本的には各バスマスタは、1つのユニファイドメモリ中の互いに独立したメモリ領域にアクセスすることが想定されているが、各バスマスタは、重複したメモリ領域にアクセスするものであっても差し支えない。
(10)実施の形態2では、タイミング情報生成部112が転送レート情報に示される定期型のバスマスタのリクエスト周期のうち最も短いリクエスト周期をリクエスト検出周期とし、そのリクエスト検出周期毎にバスリクエストを発している定期型の各バスマスタへのバス使用権の付与を行うこととしたが、リクエスト検出周期は、定期型のバスマスタのリクエスト周期のうち最も短いもの以下であればよい。
【0073】
例えば定期型のバスマスタのリクエスト周期のうち最も短いものの半分をリクエスト検出周期と定めることとしてもよく、リクエスト検出周期を短くすると、不定期型のバスマスタからのバスリクエストを受けてからバス使用権の付与までに要する時間を短くすることができるようになる。
なお、定期型のバスマスタのリクエスト周期のうち最も短いものに対して、どの程度の割合の時間を、リクエスト検出周期とするかを示す情報をLSIの外部から入力できるようにし、その情報に基づいてリクエスト検出周期を決定することとしてもよい。
【0074】
【発明の効果】
以上説明したように本発明に係るメモリ制御装置は、メモリを共用する複数のバスマスタのいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各バスマスタに対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各バスマスタについて、対応する転送レートによって前記単位時間において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0075】
また、本発明に係るメモリ制御装置は、1つのメモリ中の互いに独立したメモリ領域にアクセスする複数のバスマスタに対し、選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各バスマスタに対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各バスマスタについて、対応する転送レートによって前記単位時間において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0076】
これらにより、各バスマスタが要求する転送レートに関する条件に、何ら統一がない場合であっても、転送待ちの余裕が最小であるバスマスタの転送レートに関する条件が満足できるように転送レートの調整を行うこととなるため、各バスマスタが必要な時間的精度で転送レートを一定に保ってデータ転送を行うことができるようになる。
【0077】
また、このメモリ制御装置を用いれば、各バスマスタの転送レートに関する条件を変更する必要があるときにも、記憶されている転送レート情報を書き替えるのみで、各バスマスタの要求に応じた転送レートで各バスマスタにメモリとの間でデータ転送を行わせることができるようになる。このことから、アクセス競合制御の対象となるバスマスタを取り替えても、このメモリ制御装置を活用することができるといえる。
【0078】
ここで、前記メモリ制御装置は、各バスマスタからのバスリクエストを検出する検出手段を備え、前記使用権付与手段は、前記検出手段により、前記各単位時間帯の始期以前にバスリクエストが検出されたところの各バスマスタに対して、当該単位時間帯において前記使用権を付与することとしてもよい。
これにより、メモリを共用するバスマスタは、転送すべきデータがある場合にバスリクエストを発せばバス使用権を得て必要とする転送レートを保ってデータ転送を行うことができるようになる。なお、これによりメモリ制御装置の回路構成が、ある単位時間内においてバスリクエストを検知するとそのバスリクエストを発したバスマスタにその単位時間内にバス使用権を付与する方式を採用する場合に比べると簡易なものとなり得る。
【0079】
また、前記バスマスタは、メモリとの間でデータを転送する際に一定の転送レートが保たれることを要する定期型バスマスタと、その他の不定期型バスマスタとに分類でき、前記保持手段は、複数の定期型バスマスタそれぞれについて前記転送レート情報を保持するものであり、前記バス使用許可時間算定手段は、各定期型バスマスタについて前記バス使用許可時間を求め、前記使用権付与手段は、前記各単位時間帯において、当該単位時間帯の始期以前にバスリクエストが検出されたところの各定期型バスマスタに、対応するバス使用許可時間だけメモリバスの使用権を付与し、前記検出手段により前記バスリクエストが検出されたところの各定期型バスマスタに対応するバス使用許可時間の総和を、前記単位時間から減じた残りの時間を上限として不定期型のバスマスタにメモリバスのバス使用権を付与することとしてもよい。
【0080】
これにより、一定の転送レートを保ってデータ転送を行う必要がある定期型バスマスタと、その他の不定期型バスマスタとがメモリを共用する場合においても、定期型バスマスタは必要な時間的精度で転送レートを一定に保ってデータを行うことができるようになる。
また、前記使用権付与手段は、前記各単位時間帯において、前記検出手段により定期型バスマスタにバス使用権を付与している間に不定期型バスマスタからのバスリクエストが検出された場合には当該定期型バスマスタへのバス使用権の付与が終了し次第、当該不定期型バスマスタにバス使用権を付与することとしてもよい。
【0081】
これにより、不定期型のバスマスタはデータ転送の必要が生じてから迅速にデータ転送を行うことができるようになる。
また、前記保持手段は、前記転送レート情報を前記メモリ制御装置の外部から取得して保持することとしてもよい。
これにより、各バスマスタの機能変更等によって転送レートを変更する必要がある場合においても、外部から適切な転送レート情報を与えることができ、その結果としてバスマスタ間でのメモリアクセスの競合は適切に調停されるようになる。
【0082】
また、前記保持手段は前記転送レート情報を、前記メモリ制御装置の外部の装置により書き替え可能な領域に保持することとしてもよい。
これにより、各バスマスタの転送レート等を変更する必要がある場合においても、外部から転送レート情報を随時書き替えることにより、バスマスタ間でのメモリアクセスの競合は適切に調停されるようになる。
【0083】
また、前記メモリ制御装置は、前記各バスマスタとバス使用許可用の各信号線で接続されており、前記使用権付与手段は、バスマスタへのバス使用許可時間だけのバス使用権の付与を、当該バスマスタと接続されている前記信号線をバス使用許可時間だけアクティブにすることにより行うこととしてもよい。
これにより、時間を制限したバス使用権の付与を1本の信号線で簡易に実現することが可能になる。
【0084】
また、前記単位時間算定手段は、各バスマスタに対応する前記時間間隔のうち最も小さいものの時間を単位時間として定めることとしてもよい。
これにより、転送待ちの余裕が最小であるバスマスタを基準とすることで、比較的簡単に各バスマスタの転送レートの調整を行うことができるようになる。
また、本発明に係るLSIは、メモリを共用する複数の回路と、当該複数の回路のいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置とを含むLSIであって、前記各回路は、メモリとの間で一定の転送レートでデータを転送することを要する回路であり、前記メモリ制御装置は、前記各回路について、当該回路がメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定める時間間隔とを示す転送レート情報を保持する保持手段と、各回路に対応する前記時間間隔のうち最も小さいもの以下の時間を単位時間として定める単位時間算定手段と、各回路について、対応する転送レートによって前記単位時間に転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、時間経過を周期的に前記単位時間で区分して得られる複数の単位時間帯それぞれにおいて、各回路に対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備えることを特徴とする。
【0085】
これにより、LSIの複数の内部回路それぞれが、互いに共用するメモリとの間で、必要な時間的精度で必要とする転送レートを保ってデータ転送を行うことができるようになる。
【図面の簡単な説明】
【図1】本発明の実施の形態1に係るメモリ制御部を含むLSI100の構成図である。
【図2】転送レート情報記憶部111が外部装置から伝えられて記憶している転送レート情報のデータ構成及び内容例を示す図である。
【図3】タイミング情報生成部112に生成されタイミング情報格納部113に格納されるタイミング情報のデータ構成及び内容例を示す図である。
【図4】タイミング情報生成部112の動作を示すフローチャートである。
【図5】調停部114が行う調停処理を示すフローチャートである。
【図6】バスマスタA〜Cからのバスリクエストとメモリ制御部110によるバス使用権の付与との時間的変化を示すタイミングチャートである。
【図7】本発明の実施の形態2に係るメモリ制御部を含むLSI500の構成図である。
【図8】調停部514が行う調停処理を示すフローチャートである。
【図9】バスマスタA〜Dからのバスリクエストとメモリ制御部510によるバス使用権の付与との時間的変化を示すタイミングチャートである。
【図10】調停部514が行う調停処理の変形例を示すフローチャートである。
【図11】バスマスタA〜Dからのバスリクエストと、調停部514の行う調停処理を変形した場合におけるメモリ制御部510によるバス使用権の付与との時間的変化を示すタイミングチャートである。
【符号の説明】
100、500 LSI
110、510 メモリ制御部
111 転送レート情報記憶部
112 タイミング情報生成部
113 タイミング情報格納部
114、514 調停部
121〜124 バスマスタ
190 クロックジェネレータ
200 ユニファイドメモリ
515 不定期マスタ情報記憶部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a memory control device for controlling memory access, and more particularly to a memory control device included in an LSI (large scale integrated circuit), which is connected to a memory connected to the outside of the LSI by a plurality of circuits inside the LSI. The present invention relates to a memory control device that controls access.
[0002]
[Prior art]
In recent years, LSIs including one or more DSPs (Digital Signal Processors) and MPUs (Microprocessing Units) have been developed in order to process video, audio, etc. at high speed against the background of multimediaization of information. It is coming.
[0003]
In addition to MPU, complex and high-performance LSIs equipped with independent circuits such as a graphics processor, an AV (Audio Visual) decoder, and a hard disk controller have been developed.
Each internal circuit in such a composite LSI is an independent circuit capable of performing arithmetic processing for realizing each function using an independent local memory, but each circuit has the same memory. If the LSI is configured so as to perform arithmetic processing or the like for realizing each function by sharing, it is possible to reduce the cost of components.
[0004]
For this purpose, it is necessary to provide a memory control device inside the LSI for arbitrating memory access contention by each circuit to the same memory.
The memory control device arbitrates an access request to a memory from a plurality of circuits such as a DSP and an MPU (hereinafter referred to as “bus master”), that is, a bus request for the memory bus, and only one bus master at a certain time. Allow access. That is, the memory control device grants the right to use the memory bus to only one bus master at a certain time.
[0005]
On the other hand, each bus master issues a bus request to the memory control device when memory access becomes necessary, and when the bus use right is acquired, performs data transfer with the memory using the memory bus.
By the way, some bus masters require data transfer at a constant transfer rate when there is data to be continuously processed in order to realize real-time reproduction of video and audio, for example.
[0006]
Bus masters that require data transfer at a fixed transfer rate are specific to the time interval within which the transfer rate should be maintained, depending on the internal I / O buffer size, data processing method, and other factors I have a request. For example, when viewed through 2 milliseconds (ms), there may be a bus master that only needs to maintain a transfer rate of 500 kilobytes / millisecond (KB / ms). Some bus masters have no margin and must maintain a transfer rate of 500 KB / ms in 1 ms.
[0007]
If the memory can be monopolized, the bus master basically issues a bus request repeatedly with a time interval within a range in which the transfer rate should be maintained. Hereinafter, the time interval within which the transfer rate should be maintained is referred to as a bus request cycle.
When designing an LSI that includes multiple bus masters that require data transfer at a constant transfer rate and a memory controller, arbitration of the memory controller takes into account the transfer rate and bus request cycle required by each bus master. A mechanism must be built.
[0008]
If arbitration is appropriate, each bus master can transfer data at the required transfer rate, but if arbitration is not appropriate, any bus master transfers data at the required transfer rate within the bus request cycle. The problem that it is not possible to do.
As a conventional memory control device, there are a general memory control device that uses a bus usage right preemptive priority method as an arbitration mechanism, and a method that uses a method that arbitrates based on a priority determined for each bus master.
[0009]
[Problems to be solved by the invention]
Hereinafter, problems of such a conventional memory control device will be described.
Assuming that the bus bandwidth of the memory bus is about 800 KB / ms, when there is data to be continuously processed, the bus master A requests that the bus request cycle be 2 ms and 1000 KB of data be transferred during the 2 ms. Assuming that the LSI includes two bus masters, the bus master B and the bus master B requesting that 100 KB of data be transferred during 1 ms when the bus request period is only 1 ms and the bus request cycle is 1 ms. To do. Further, it is assumed that the bus master A first issues a bus request if the preemptive priority method is used, and the bus master A is assumed to have a high priority if it is a method that performs arbitration based on the priority.
[0010]
In this case, when there is a bus request from the bus master A in the conventional memory control device, the memory control device grants the bus use right to the bus master A and permits data transfer. In response to this, when the bus master A transfers 1000 KB of data, the transfer takes 1 ms or more, so the memory control device cannot immediately respond to a bus request from the bus master B every 1 ms.
[0011]
For this reason, for the bus master B, the memory access waiting time becomes longer than 1 ms, and the data transfer amount between the bus master B and the memory is not unified to 100 KB in each cycle of 1 ms unit. It will occur. That is, the transfer rate required by the bus master B cannot be maintained within the bus request cycle.
[0012]
As described above, the conventional memory control device having the arbitration mechanism using the bus use right preemption priority scheme or the arbitration scheme based on the priority can guarantee the transfer rate required by each bus master in the long term. However, there is a problem that the transfer rate cannot be guaranteed in a short period of time.
In order to solve this problem, it is necessary to design the memory control device in advance in consideration of the transfer rate required by each bus master and the time interval within which the transfer rate is to be guaranteed.
[0013]
However, depending on the device in which the LSI is mounted, the contents of processing required for each bus master change, and this changes the transfer rate and bus request cycle required by each bus master. It is difficult to design a memory control device in consideration of specific processing contents in advance.
In addition, LSIs are becoming more sophisticated year by year, and from the standpoint of reducing development costs when new circuits are incorporated in the LSI in the future, the data transfer rate for each circuit will be whatever the circuit included in the LSI. Design and development of a highly versatile memory control device that can be guaranteed is required. This is because if the versatility of the memory control device is high, the design assets can be used for a long time.
[0014]
Accordingly, the present invention has been made in view of such a demand, and is a general-purpose memory control device that arbitrates memory access contention by guaranteeing a required transfer rate to each bus master with a required time accuracy. The purpose is to provide. It is another object of the present invention to provide an LSI including the memory control device and the bus master.
[0015]
[Means for Solving the Problems]
In order to achieve the above object, a memory control device according to the present invention arbitrates a memory access conflict by selectively granting a right to use a memory bus to any of a plurality of bus masters sharing a memory. A memory control device, for each of a plurality of bus masters, a transfer rate at which the bus master transfers data to and from a memory, and a time interval that defines a range to be guaranteed to be transferred at the transfer rate Holding unit for holding transfer rate information indicating unit time calculating unit for determining a unit time as a time equal to or less than the smallest time interval corresponding to each bus master, and for each bus master, the unit according to the corresponding transfer rate V transfer based on the bus bandwidth of the memory bus when the amount of data that can be transferred in time is V Bus usage permission time calculating means for obtaining a bus usage permission time, which is a required time, and a bus corresponding to each bus master in each of a plurality of unit time zones obtained by periodically dividing the passage of time by the unit time. Usage right granting means for granting the right to use the memory bus for the usage permission time.
[0016]
In addition, the memory control device according to the present invention arbitrates contention for access to the memory by selectively granting the right to use the memory bus to a plurality of bus masters that access mutually independent memory areas in one memory. A memory control device for each of a plurality of bus masters, which defines a transfer rate when the bus master transfers data to and from the memory and a time interval that guarantees transfer at the transfer rate Holding means for holding transfer rate information indicating unit time, a unit time calculation means for setting a time equal to or less than the smallest one of the time intervals corresponding to each bus master as a unit time, and for each bus master, depending on the corresponding transfer rate Based on the bus bandwidth of the memory bus when the amount of data that can be transferred in unit time is V A bus use permission time calculating means for obtaining a bus use permission time which is a time required for the transfer of V, and each bus master in each of a plurality of unit time zones obtained by periodically dividing the passage of time by the unit time. And usage right granting means for granting the right to use the memory bus for the corresponding bus usage permission time.
[0017]
With the above configuration, the transfer rate is adjusted so that the conditions regarding the transfer rate of the bus master with the smallest allowance for transfer can be satisfied even if the conditions regarding the transfer rate requested by each bus master are not uniform. As a result, each bus master can perform data transfer while keeping the transfer rate constant with the required time accuracy.
[0018]
In addition, when this memory control device is used, even when it is necessary to change the conditions regarding the transfer rate of each bus master, it is possible to rewrite the stored transfer rate information at a transfer rate according to the request of each bus master. Each bus master can transfer data to and from the memory. From this, it can be said that this memory control device can be utilized even if the bus master subject to access contention control is replaced.
[0019]
In addition, the LSI according to the present invention includes a plurality of circuits sharing a memory, and a memory control that arbitrates a memory access conflict by selectively granting a right to use a memory bus to any one of the plurality of circuits. And each of the circuits is a circuit that requires data to be transferred to and from a memory at a constant transfer rate. Corresponding to each circuit, and holding means for holding transfer rate information indicating a transfer rate at the time of transferring data to and a time interval that defines a range in which the transfer should be guaranteed at the transfer rate Unit time calculation means for determining a time less than the smallest one of the time intervals as a unit time, and each circuit can be transferred to the unit time at a corresponding transfer rate. Bus usage permission time calculating means for obtaining a bus usage permission time which is a time required for V transfer based on the bus bandwidth of the memory bus when the data amount is V, and the time passage is periodically divided into the unit times. In each of the plurality of unit time zones obtained in this manner, each circuit is provided with usage right granting means for granting the right to use the memory bus for the corresponding bus usage permission time.
[0020]
With the above-described configuration, each of the plurality of internal circuits of the LSI can perform data transfer with a necessary transfer rate with a necessary time accuracy with respect to the memory shared with each other.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an LSI including a memory control unit and a plurality of bus masters, which is an embodiment of a memory control device according to the present invention, will be described.
<Embodiment 1>
<Configuration>
FIG. 1 is a configuration diagram of an LSI 100 including a memory control unit according to the first embodiment of the present invention. FIG. 1 shows a unified memory 200 in addition to the LSI 100.
[0022]
The LSI 100 is an LSI mounted on information home appliances and other devices, and includes a memory control unit 110, a bus master A 121, a bus master B 122, a bus master C 123, and a clock generator 190, and is connected to the unified memory 200. Although not shown in FIG. 1, the LSI 100 is also connected to other external devices.
[0023]
Here, the clock generator 190 is a circuit that supplies a clock signal to the memory control unit 110, the bus masters A to C, and the unified memory 200.
The bus masters A121, B122, and C123 are, for example, an MPU that uses the unified memory 200 as a main memory, a DSP that stores image data or the like in the unified memory 200, and accesses the unified memory 200 and transfers data independently of each other. I do. That is, each of the bus masters A to C issues a bus request to the memory control unit 110 through the REQ signal line when data transfer is necessary, and obtains a bus use right from the memory control unit 110 through the GNT signal line. While the right to use is obtained, data is transferred in synchronization with the arbitration unit 114 of the memory control unit 110 at a timing based on the clock signal from the clock generator 190.
[0024]
In FIG. 1, bus requests from each bus master are represented by REQ-A, REQ-B, and REQ-C, respectively, and the granting of the bus use right to each bus master is represented by GNT-A, GNT-B, and GNT-C, respectively. Represents.
The data transfer is performed by designating a memory address, writing data to the unified memory, or reading data from the unified memory, whereby the address and data are transmitted on the memory bus. The data transferred by each bus master to / from the unified memory 200 is video data to be output to the display device generated by the bus master based on data input from an external device, for example.
[0025]
Each bus master performs data transfer processing independently. For example, to prevent the video output to the display device from being interrupted, data is transferred to and from the unified memory at a constant transfer rate. Is something that must be done. However, the bus master does not always transfer data to and from the unified memory continuously. For example, the bus master continuously transfers data to the unified memory during the period in which data to be sent is generated and stored because the data is continuously input from the external device. The bus master does not transfer data to the unified memory during a period in which data to be transmitted is not accumulated, for example, because of no input.
[0026]
The memory control unit 110 arbitrates access to the unified memory 200 of each bus master based on transfer rate information transmitted from an external device, and includes a transfer rate information storage unit 111, a timing information generation unit 112, A timing information storage unit 113 and an arbitration unit 114 are included.
Here, the transfer rate information storage unit 111 is a memory area for storing transfer rate information transmitted from an external device. The transfer rate information will be described in detail later.
[0027]
The timing information generation unit 112 has a function of generating timing information with reference to the transfer rate information stored in the transfer rate information storage unit 111 and storing the timing information in the timing information storage unit 113. The timing information will be described in detail later.
The timing information storage unit 113 is a memory area for storing timing information.
[0028]
The arbitration unit 114 refers to the timing information stored in the timing information storage unit 113, checks the presence / absence of a bus request from each bus master based on the clock signal from the clock generator 190, and determines the bus request. It has a function of selectively giving the bus use right to the issuing bus master sequentially. Each bus master issues a bus request to the arbitration unit 114 by activating the REQ signal line, and the arbitration unit 114 grants a bus use right to the bus master by activating the GNT signal line to any of the bus masters. Note that the bus master keeps the REQ signal line active as long as data transfer is necessary.
[0029]
<Data>
FIG. 2 is a diagram illustrating a data configuration and an example of contents of transfer rate information stored in the transfer rate information storage unit 111 transmitted from an external device.
As shown in the figure, the transfer rate information 300 is information in which a set of a request cycle 302 and one data transfer amount 303 is associated with each other for the bus masters A to C. For example, the transfer rate information is provided outside the LSI and includes a memory and a CPU, and an external device that controls the LSI 100 causes each bus master in the LSI to access the unified memory 200 and start processing involving data transfer. It is set before.
[0030]
Here, the request cycle 302 is a time interval in which the transfer rate required by each bus master is within a range to be maintained when there is data to be continuously processed. When there is data to be processed continuously, each bus master basically issues a bus request with a cycle of the request cycle 302 or less.
A single data transfer amount 303 is the amount of data that each bus master needs to transfer in the corresponding request cycle 302.
[0031]
In the example shown in the figure, when it is necessary to transfer data continuously, the bus master A must transfer data of 1000 kilobytes (KB) every 2000 microseconds (μs). This indicates that 100 KB of data must be transferred every 1000 μs, and the bus master C must transfer 400 KB of data every 4000 μs.
[0032]
That is, the bus master A is 2000. μ s is a bus master that needs to perform transfer while maintaining a transfer rate of 500 KB / ms. μ s is a bus master that needs to perform transfer with a transfer rate of 100 KB / ms, and the bus master C is 4000 μ The transfer rate information 300 in the figure indicates that the bus master needs to perform transfer while maintaining a transfer rate of 100 KB / ms in the range of s. Among the bus masters A to C, the bus master B has the smallest time margin for securing the transfer rate, and the bus master C has the largest time margin for securing the transfer rate.
[0033]
Note that an external device including a CPU or the like may determine transfer rate information 300 in accordance with the specifications of each bus master and input it to the memory control unit 110. Thus, a transfer rate that determines the control contents of the memory control unit 110 in this way. Since the information 300 can be externally input, the memory control unit 110 is general-purpose.
FIG. 3 is a diagram illustrating a data configuration and an example of contents of timing information generated in the timing information generation unit 112 and stored in the timing information storage unit 113.
[0034]
As shown in the figure, the timing information 400 includes a request detection period 401 and an intra-period bus use permission time 402 for each bus master.
Here, the request detection cycle 401 is information indicating time determined by the timing information generation unit 112 as an interval at which the arbitration unit 114 detects a bus request from the bus masters A to C.
[0035]
The intra-cycle bus use permission time 402 is a time during which each bus master should be allowed to use the memory bus, that is, the bus use so that each bus master can transfer necessary data in the request detection cycle 401. This is information indicating the time for which the right should be granted. Note that the bus bandwidth of the memory bus of the unified memory 200 is 800 KB / ms.
[0036]
Note that each time in the timing information is actually represented by, for example, the count of clock signals generated by the clock generator 190.
<Operation>
Hereinafter, the operation of the memory control unit 110 having the above-described configuration will be described.
In a state where the transfer rate information storage unit 111 stores the transfer rate information transmitted from the external device, the timing information generation unit 112 performs the operation shown in FIG.
[0037]
FIG. 4 is a flowchart showing the operation of the timing information generation unit 112.
The timing information generation unit 112 refers to the request cycle for each bus master included in the transfer rate information, and determines the shortest request cycle as the request detection cycle in the timing information (step S11).
Subsequently, the timing information generation unit 112 obtains the data transfer amount per request detection cycle for each bus master using the transfer rate information and the request detection cycle determined in step S11 (step S12), and the obtained data By dividing the transfer amount by the bus bandwidth of the memory bus, the in-period bus use permission time in the timing information is obtained (step S13). Note that the timing information generation unit 112 stores the bus bandwidth of the memory bus in a memory or the like inside the LSI, and performs the calculation in step S13 using this.
[0038]
Thus, the obtained timing information is stored in the timing information storage unit 113 by the timing information generation unit 112. Such an operation of the timing information generation unit 112 is assumed to be performed within a short period of time after the current starts to be supplied to the LSI, for example.
For example, the timing information generated by the timing information generation unit 112 based on the transfer rate information 300 having the contents illustrated in FIG. 2 has the contents illustrated in FIG.
[0039]
Next, an arbitration process performed by the arbitration unit 114 after timing information is generated will be described.
FIG. 5 is a flowchart illustrating an arbitration process performed by the arbitration unit 114.
Based on the timing information and the clock signal supplied from the clock generator 190 at regular intervals, the arbitration unit 114 waits for the time that arrives at each request detection period (hereinafter referred to as “request detection timing”), and detects the request. It is checked whether a bus request is issued from each bus master at the timing (step S21).
[0040]
The arbitration unit 114 determines whether or not a bus request from any of the bus masters has been detected at the time of the inspection in step S21 (step S22). If no bus request is detected from any of the bus masters, the arbitration unit 114 performs step The process returns to S21 and waits for the arrival of the next request detection timing.
If it is determined in step S22 that a bus request has been detected, the arbitrating unit 114 grants a bus use right to one of the bus masters that has issued the bus request (step S23).
[0041]
The arbitration unit 114 grants the bus use right to a certain bus master, and then waits for the bus use permission time within the period for the bus master to elapse by counting the clock signal. (Step S24). That is, in steps S23 and S24, a GNT signal line to a certain bus master is made active only during the intra-period bus use permission time, and thereafter made inactive.
[0042]
After step S24, the arbitrating unit 114 determines whether or not a bus request from a bus master different from the bus master that has already given the bus use right has been detected after the inspection at the time of the previous step S21 (step S25). If not detected, the process returns to step S21 to wait for the next request detection timing.
[0043]
If it is determined in step S25 that a bus request from a bus master different from the bus master that has already given the bus use right has been detected after the inspection, the arbitrating unit 114 returns to the process of step S23.
Therefore, when the passage of time is expressed as a continuation of the request detection cycle, the arbitration unit 114, for each request detection cycle, for each bus master that has issued a bus request before that cycle, for the corresponding bus use permission time in the cycle. Only the bus use right will be given.
[0044]
FIG. 6 is a timing chart showing temporal changes between the bus request from the bus masters A to C and the granting of the bus use right by the memory control unit 110.
This shows a result of the memory control unit 110 arbitrating memory access contention by each bus master based on the transfer rate information 300 illustrated in FIG.
As is apparent from the figure, the request detection cycle is 1000 μs in accordance with the bus master B having the shortest bus request cycle, and the bus masters A, B, and C that have issued a bus request at each request detection cycle are sequentially arranged. The right to use the bus is granted for each of 625 μs, 125 μs, and 125 μs. Since the bus bandwidth of the memory bus is 800 KB / ms, the bus master A is transferring data of 500 KB, the bus master B is 100 KB, and the bus master C is transferring data of 100 KB within the request detection period.
[0045]
Therefore, the bus master A transfers 1000 KB data at 2000 ms, the bus master B transfers 100 KB data at 1000 ms, and the bus master C transfers 400 KB data at 4000 ms. Data transfer can be performed with the accuracy required for the rate.
<Embodiment 2>
Hereinafter, the memory control unit according to the second embodiment of the present invention will be described. The memory control unit 110 shown in the first embodiment has a function of arbitrating memory access contention between the bus masters A to C that need to transfer data to and from the memory at a constant transfer rate. However, the memory control unit according to the second embodiment does not need to maintain a constant transfer rate, and does not need to maintain a constant transfer rate. Memory access between the bus masters A to D including the bus master D that performs data transfer with the memory irregularly It has a function to mediate the competition.
[0046]
<Configuration>
FIG. 7 is a configuration diagram of an LSI 500 including a memory control unit according to the second embodiment of the present invention. FIG. 7 shows the unified memory 200 in addition to the LSI 500.
The LSI 500 includes a memory control unit 510, a bus master A121, a bus master B122, a bus master C123, a bus master D124, and a clock generator 190, and is connected to the unified memory 200. Although not shown in FIG. 7, the LSI 500 is also connected to other external devices.
[0047]
Among the components of the LSI 500, the components that are basically the same as those of the LSI 100 shown in the first embodiment are denoted by the same reference numerals as those in FIG. 1 in FIG. 7, and detailed description thereof is omitted here. To do.
Here, the clock generator 190 is a circuit that supplies a clock signal to the memory control unit 510, the bus masters A to D, and the unified memory 200.
[0048]
The bus master D124 accesses the unified memory 200 and performs data transfer independently of the bus masters A to C. That is, the bus master D issues a bus request to the memory control unit 510 when data transfer is necessary, obtains the bus use right from the memory control unit 510, and obtains the bus use right while the clock generator 190 is obtained. The data is transferred in synchronism with the arbitration unit 514 of the memory control unit 510 at a timing based on the clock signal from.
[0049]
Note that the bus master D124 is different from the bus masters A to C that are required to perform data transfer at a constant transfer rate, that is, a type that periodically issues a bus request (hereinafter referred to as “periodic type”). A bus master that issues a bus request (hereinafter referred to as "irregular type"), for example, an MPU that receives an interrupt from the outside in response to an input from a user of a device on which an LSI is mounted, or the like. is there.
[0050]
In FIG. 7, bus requests from the respective bus masters are represented by REQ-A, REQ-B, REQ-C, and REQ-D, respectively, and the granting of the bus use right to each bus master is represented by GNT-A, GNT-B, It is represented by GNT-C and GNT-D. The memory control unit 510 arbitrates access to the unified memory 200 of the bus masters A to D based on transfer rate information transmitted from an external device. The transfer rate information storage unit 111, the timing information generation unit 112, a timing information storage unit 113, an arbitration unit 514, and an irregular master information storage unit 515.
[0051]
The irregular master information storage unit 515 is a memory area in which irregular master information indicating an irregular bus master is stored in advance. The irregular master information is information necessary for the arbitration unit 514 to recognize which of the irregular bus masters.
The arbitration unit 514 refers to the irregular master information stored in the irregular master information storage unit 515 and the timing information stored in the timing information storage unit 113, and performs predetermined processing based on the clock signal from the clock generator 190. At the timing, the bus master other than the irregular bus master, that is, the bus masters A to C of the regular bus masters is inspected for bus requests, and the bus master issuing the bus request is given the bus usage right sequentially. If there is still a time during which no bus use right is given to any of the bus masters A to C within the detection period, the bus use right is given to the irregular bus master as long as a bus request is issued from the irregular bus master. give.
[0052]
<Operation>
Hereinafter, the operation of the memory control unit 510 having the above-described configuration will be described.
The timing information generation unit 112 performs the same operation as that described in Embodiment 1 (see FIG. 4).
FIG. 8 is a flowchart illustrating an arbitration process performed by the arbitration unit 514.
[0053]
Based on the timing information and the clock signal supplied from the clock generator 190 at regular intervals, the arbitration unit 514 waits for the request detection timing to arrive, and each bus master other than the irregular bus master at the request detection timing, That is, it is checked whether or not a bus request is issued from each regular bus master (step S31).
[0054]
The arbitration unit 514 determines whether or not a bus request from any of the regular bus masters has been detected at the time of the inspection in step S31 (step S32).
If it is determined in step S32 that a bus request has been detected, the arbitration unit 514 grants a bus use right to one of the regular bus masters that issued the bus request (step S33), and counts the clock signal. By doing so, it waits for the bus use permission time within the period for the bus master to elapse, and stops giving the bus use right when the bus master passes (step S34). That is, in steps S33 and S34, the GNT signal line to one regular bus master is made active only during the intra-period bus use permission time, and thereafter inactive.
[0055]
After step S34, the arbitration unit 514 determines whether or not a bus request from a regular bus master different from the bus master that has already given the bus use right has been detected after the inspection at the time of the previous step S31. (Step S35).
In step S35, if it is determined that a bus request from a regular bus master that is different from the bus master that has already given the bus use right after the inspection has been detected at the time of the inspection in step S31, the arbitration unit 514 returns to the processing in step S33, and others. In this case, the arbitration unit 514 determines whether or not the next request detection timing has arrived (step S36). If it is determined that the next request detection timing has arrived, the process of step S31 is performed. .
[0056]
In step S32, if no bus request is detected from any bus master, the arbitrating unit 514 skips the processes of steps S33 to S35 and performs the determination process of step S36.
If it is determined in step S36 that the next request detection timing has not arrived, the arbitration unit 514 checks whether or not a bus request is issued from an irregular bus master (step S37). If a request is detected, the right to use the bus is given to the irregular bus master (step S38), and the bus request from the irregular bus master is canceled or the next request detection timing has arrived. At that time, the bus use right is stopped (step S39), and the process returns to the determination process of step S36.
[0057]
In step S37, the arbitration unit 514 also returns to the determination process in step S36 when a bus request from an irregular bus master is not detected.
Therefore, when the passage of time is expressed as a continuation of the request detection cycle, the arbitration unit 514 uses the bus within the corresponding cycle for each periodic bus master that has issued a bus request before that cycle in each request detection cycle. The right to use the bus is granted for the permitted time, and if a bus request is issued from the irregular bus master during the remaining time in the cycle, the bus usage right is granted to the irregular bus master.
[0058]
FIG. 9 is a timing chart showing temporal changes between bus requests from the bus masters A to D and granting of the bus use right by the memory control unit 510.
As shown in the figure, the arbitration unit 514 issues a bus request from the irregular bus master D for the remainder of the time when the bus usage right is granted to the regular bus masters A to C in each request detection cycle. Then, the bus master D is granted the bus use right.
[0059]
If the bus master D to which the bus use right is granted within the request detection period starting from a certain request detection timing arrives at the next request detection timing without stopping issuing the bus request within the request detection period, The assignment of the bus use right to the bus master D is cancelled. Also, if there is a regular bus master that has not issued a bus request at the request detection timing, the time during which the right to use the bus can be granted to the irregular bus master within the request detection period. become longer.
[0060]
<Modification of arbitration process>
Hereinafter, an example will be described in which the arbitration processing by the arbitration unit 514 described above is modified so that the bus use right is given to an irregular bus master earlier.
FIG. 10 is a flowchart illustrating a modification of the arbitration process performed by the arbitration unit 514.
[0061]
First, the arbitration unit 514 checks whether or not a bus request is issued from each of the regular bus masters when the request detection timing arrives, and within the cycle for all the bus masters for which the bus request has been detected. A total sum of bus use permission times is obtained, and a time obtained by subtracting the sum from the request detection period is determined as a surplus time (step S51). Here, the surplus time means a time during which the right to use the bus can be given to an irregular bus master within the request detection cycle.
[0062]
Subsequently, the arbitrating unit 514 determines whether or not a bus request from any of the regular bus masters has been detected at the time of the inspection in step S31 (step S52).
If it is determined in step S52 that a bus request has been detected, the arbitration unit 514 grants a bus use right to one of the regular bus masters that issued the bus request (step S53), and outputs a clock signal. By counting, it waits for the in-period bus use permission time for the bus master to elapse, and stops granting the right to use the bus when it elapses (step S54). That is, in steps S53 and S54, the GNT signal line to one regular bus master is made active only during the intra-period bus use permission time, and then inactive.
[0063]
If it is determined in step S52 that no bus request has been detected, the arbitration unit 514 skips the processes in steps S53 and S54 and performs the determination process in step S55.
After step S54, the arbitrating unit 514 determines whether the next request detection timing has arrived (step S55). If it has arrived, the process returns to step S51, and if not, the surplus time is not zero. Is determined (step S56).
[0064]
In step S56, when the arbitration unit 514 determines that the surplus time is not 0, that is, when it is determined that there is surplus time, the arbitration unit 514 checks whether a bus request is issued from an irregular bus master (step S56). S57), when a bus request is detected, the right to use the bus is granted to the irregular bus master, and the surplus time is counted down as the time for which the right to use the bus is granted (step S58). When the bus request from the irregular bus master is canceled or when the surplus time becomes 0, the assignment of the bus use right is stopped (step S59), and the process returns to the determination process of step S56 again.
[0065]
Note that the surplus time determined in step S51 is counted down by the amount of time for which the bus use right is granted to the irregular bus master in step S58. However, the surplus time countdown stops when the surplus time becomes zero.
If it is determined in step S56 that the surplus time is 0, or if a bus request from an irregular bus master is detected in step S57, the arbitration unit 514 has a regular type other than the bus master to which the bus use right has already been granted. It is determined whether or not a bus request from the bus master has been detected in step S51 (step S60). If not detected, the process returns to step S55, and if detected, the process returns to step S53.
[0066]
If the arbitration unit 514 determines in step S55 that the next request detection timing has arrived, the arbitration unit 514 performs processing in step S51 to inspect the bus request from each regular bus master at the next request detection timing. Return.
Through such a modified arbitration process, the arbitration unit 514 uses the bus for the period of time within the period of bus use permission to the periodic bus master that is transferring data when the irregular bus master issues a bus request. As soon as the right is granted, the right to use the bus is given to the irregular bus master, so that the irregular bus master can start data transfer promptly when the data transfer becomes necessary. That is, the arbitration unit can suppress the access latency for memory access by the irregular bus master by performing such a modified arbitration process.
[0067]
FIG. 11 is a timing chart showing temporal changes between a bus request from the bus masters A to D and the granting of the bus use right by the memory control unit 510 when the arbitration processing performed by the arbitration unit 514 is modified.
As shown in the figure, when the bus request is issued from the irregular bus master D while the arbitration unit 514 grants the bus use right to the regular bus master A, the bus master D follows the bus master A. To the regular bus masters B and C, and sequentially grants the bus use right to the regular bus masters A and B in the next request detection cycle. If a bus request is issued from the irregular bus master D while the bus usage right is being granted, the bus master B is given the bus usage right after the bus master B, and then the bus usage right is given to the regular bus master C. Is granted.
<Supplement>
Although the memory control device according to the present invention has been described based on the first and second embodiments, the present invention is of course not limited to these embodiments. That is,
(1) The number of bus masters shown in both embodiments is not limited as long as there are a plurality of bus masters. However, for all regular bus masters, transfer rate information indicating the transfer rate and the time interval within which the transfer rate should be maintained must be input to the LSI. If there is an irregular bus master, The irregular master information for identifying all irregular bus masters needs to be stored in the irregular master information storage unit 515.
[0068]
Note that a plurality of unified memories may be connected to the LSI. In this case, the memory control unit accesses the unified memory for each unified memory as described in the first or second embodiment. Any device that arbitrates access contention between all bus masters may be used.
(2) The memory control unit 110 shown in the first embodiment and the memory control unit 510 shown in the second embodiment may all be constructed as a hardware circuit, or consist of an MPU and a memory. The MPU may be configured to realize an arbitration function by executing the program.
(3) In both embodiments, the transfer rate information is information consisting of the request cycle for each bus master and the amount of data transferred once, but the transfer rate information guarantees the transfer rate and the transfer rate. Any combination of information may be used as long as the information indicates the minimum time interval to be performed.
(4) Although the transfer rate information shown in both embodiments is input from an external device, an initial value may be stored in advance.
[0069]
The transfer rate information can be input at any time, and the timing information generation unit 112 generates timing information based on the transfer rate information and stores it in the timing information storage unit 113 each time the transfer rate information is input. It is good to do. Since the arbitration unit 114 and the arbitration unit 514 determine the time for granting the bus use right to each bus master based on the timing information, dynamic arbitration control is realized.
[0070]
In the second embodiment, the bus master is classified into a regular type and an irregular type, but this is a classification depending on whether or not data transfer requiring a guaranteed transfer rate is performed, and is input to the LSI from the outside. Depending on the contents of the transfer rate information, even the same bus master may be a regular type or an irregular type.
(5) The bus bandwidth of the memory bus referred to by the timing information generator 112 shown in both embodiments may be input from outside the LSI.
(6) The memory control unit 110 shown in the first embodiment and the memory control unit 510 shown in the second embodiment transmit information for specifying request detection timing such as a request detection cycle to each bus master. In response to this, each bus master may issue a bus request in accordance with the request detection timing.
(7) In both embodiments, the grant of the bus use right to the bus master is realized by activating the GNT signal line, and the stop of the grant of the bus use right is realized by making the GNT signal line inactive. However, the present invention is not limited to these implementation methods, and may be implemented by any method as long as it can notify the bus master of permission and prohibition of bus use.
[0071]
For example, the bus mastership is notified to the bus master by instantaneously activating one signal line, and the bus mastership is notified to the bus master by instantaneously activating another signal line. It is good as well.
In the regular bus master shown in the embodiment, the REQ signal line is kept active as long as data transfer is necessary, but the method of issuing a bus request is not limited to this. For example, the memory control unit 110 and the memory control unit 510 may notify each bus master of the amount of data that can be transferred within the request detection period based on the transfer rate information, and each bus master notifies the notified data. If transmission of a quantity is required, the REQ signal line may be activated instantaneously.
(8) The unified memory 200 shown in both embodiments is not limited to a memory having a specific memory architecture, and any memory may be used.
[0072]
In addition, the memory bus that connects the bus master and the unified memory shown in both embodiments may be composed of separate signal lines for the address bus and the data bus, or may be composed of a common signal line. It is good. When configured with a common signal line, address information and data are transmitted in a time division manner between the bus master and the unified memory. The bus between the bus master and the unified memory may be connected through an interface unit in the memory control unit, and processing such as address decoding may be performed in the interface unit.
(9) In the LSI shown in each embodiment, it is basically assumed that each bus master accesses a memory area independent from each other in one unified memory. The memory area may be accessed.
(10) In the second embodiment, the timing information generation unit 112 sets the shortest request cycle among the request cycles of the regular bus master indicated in the transfer rate information as a request detection cycle, and issues a bus request for each request detection cycle. The right to use the bus is given to each regular bus master, but the request detection cycle may be equal to or shorter than the shortest request cycle of the regular bus master.
[0073]
For example, half the shortest request cycle of a regular bus master may be determined as the request detection cycle. If the request detection cycle is shortened, the right to use the bus is granted after receiving a bus request from an irregular bus master. It is possible to shorten the time required for the process.
It should be noted that information indicating how much time is used as the request detection cycle for the shortest request cycle of the regular bus master can be input from outside the LSI, and based on the information The request detection cycle may be determined.
[0074]
【The invention's effect】
As described above, the memory control device according to the present invention adjusts the access conflict to the memory by selectively granting the right to use the memory bus to any of a plurality of bus masters sharing the memory. For each of a plurality of bus masters, a transfer indicating a transfer rate at which the bus master transfers data to and from the memory and a time interval that defines a range in which the transfer should be guaranteed at the transfer rate A holding means for holding rate information, a unit time calculating means for setting a time equal to or less than the smallest one of the time intervals corresponding to each bus master as a unit time, and transferring for each bus master in the unit time at a corresponding transfer rate When the amount of data that can be obtained is V, V transfer is required based on the bus bandwidth of the memory bus. Bus usage permission time calculating means for obtaining a bus usage permission time between the buses, and corresponding bus usage for each bus master in each of a plurality of unit time zones obtained by periodically dividing the elapsed time into the unit times. Usage right granting means for granting the right to use the memory bus only for the permitted time.
[0075]
In addition, the memory control device according to the present invention arbitrates contention for access to the memory by selectively granting the right to use the memory bus to a plurality of bus masters that access mutually independent memory areas in one memory. A memory control device for each of a plurality of bus masters, which defines a transfer rate when the bus master transfers data to and from the memory and a time interval that guarantees transfer at the transfer rate Holding means for holding transfer rate information indicating unit time, a unit time calculation means for setting a time equal to or less than the smallest one of the time intervals corresponding to each bus master as a unit time, and for each bus master, depending on the corresponding transfer rate Based on the bus bandwidth of the memory bus when the amount of data that can be transferred in unit time is V A bus use permission time calculating means for obtaining a bus use permission time which is a time required for the transfer of V, and each bus master in each of a plurality of unit time zones obtained by periodically dividing the passage of time by the unit time. And usage right granting means for granting the right to use the memory bus for the corresponding bus usage permission time.
[0076]
As a result, even if the conditions related to the transfer rate requested by each bus master are not uniform, the transfer rate should be adjusted so that the conditions related to the transfer rate of the bus master with the minimum waiting time for transfer can be satisfied. As a result, each bus master can perform data transfer with a constant transfer rate with the required time accuracy.
[0077]
In addition, when this memory control device is used, even when it is necessary to change the conditions regarding the transfer rate of each bus master, it is possible to rewrite the stored transfer rate information at a transfer rate according to the request of each bus master. Each bus master can transfer data to and from the memory. From this, it can be said that this memory control device can be utilized even if the bus master subject to access contention control is replaced.
[0078]
Here, the memory control device includes a detecting unit that detects a bus request from each bus master, and the usage right granting unit detects a bus request before the start of each unit time zone by the detecting unit. However, the right to use may be given to each bus master in the unit time zone.
As a result, the bus master sharing the memory can obtain the bus use right and perform data transfer at the required transfer rate by issuing a bus request when there is data to be transferred. As a result, the circuit configuration of the memory controller is simpler than when a bus request is detected within a unit time and a bus master issuing the bus request is granted a bus use right within the unit time. Can be anything.
[0079]
The bus masters can be classified into regular bus masters that require a constant transfer rate to be maintained when data is transferred to and from the memory, and other irregular bus masters. The transfer rate information is held for each of the periodic bus masters, the bus use permission time calculating means obtains the bus use permission time for each of the periodic bus masters, and the use right granting means is for each unit time. In each band, each regular bus master where a bus request is detected before the start of the unit time slot is granted the right to use the memory bus for the corresponding bus use permission time, and the bus request is detected by the detecting means. The total bus use permission time corresponding to each scheduled bus master is subtracted from the unit time to obtain the remaining time. May be irregularly-type bus master to grant the bus use right of the memory bus as a limit.
[0080]
As a result, even when a regular bus master that needs to transfer data at a constant transfer rate and other irregular bus masters share memory, the regular bus master can transfer data with the required temporal accuracy. It becomes possible to perform data while keeping the constant.
In addition, the usage right granting unit, if a bus request from an irregular bus master is detected while the bus usage right is given to the regular bus master by the detection unit in each unit time zone, As soon as the grant of the bus use right to the regular bus master is completed, the bus use right may be granted to the irregular bus master.
[0081]
As a result, the irregular bus master can transfer data quickly after the necessity of data transfer occurs.
The holding unit may acquire and transfer the transfer rate information from outside the memory control device.
As a result, even when the transfer rate needs to be changed by changing the function of each bus master, etc., it is possible to provide appropriate transfer rate information from the outside. As a result, contention for memory access between the bus masters is appropriately arbitrated. Will come to be.
[0082]
Further, the holding unit may hold the transfer rate information in an area that can be rewritten by a device external to the memory control device.
Thereby, even when it is necessary to change the transfer rate of each bus master, the contention of memory access between the bus masters can be appropriately arbitrated by rewriting transfer rate information from the outside as needed.
[0083]
Further, the memory control device is connected to each bus master by each signal line for bus use permission, and the use right granting unit grants the bus use right to the bus master only for the bus use permission time. The signal line connected to the bus master may be activated only for the bus use permission time.
As a result, it is possible to easily realize the right to use the bus with limited time by using one signal line.
[0084]
The unit time calculation means may determine the time of the smallest time interval corresponding to each bus master as a unit time.
As a result, the transfer rate of each bus master can be adjusted relatively easily by using the bus master with the smallest transfer waiting margin as a reference.
In addition, the LSI according to the present invention includes a plurality of circuits sharing a memory, and a memory control that arbitrates a memory access conflict by selectively granting a right to use a memory bus to any one of the plurality of circuits. And each of the circuits is a circuit that requires data to be transferred to and from a memory at a constant transfer rate. Corresponding to each circuit, and holding means for holding transfer rate information indicating a transfer rate at the time of transferring data to and a time interval that defines a range in which the transfer should be guaranteed at the transfer rate Unit time calculation means for determining a time less than the smallest one of the time intervals as a unit time, and each circuit can be transferred to the unit time at a corresponding transfer rate. Bus usage permission time calculating means for obtaining a bus usage permission time which is a time required for V transfer based on the bus bandwidth of the memory bus when the data amount is V, and the time passage is periodically divided into the unit times. In each of the plurality of unit time zones obtained in this manner, each circuit is provided with usage right granting means for granting the right to use the memory bus for the corresponding bus usage permission time.
[0085]
As a result, each of the plurality of internal circuits of the LSI can perform data transfer with a necessary transfer rate with a necessary time accuracy with respect to the memory shared with each other.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of an LSI 100 including a memory control unit according to a first embodiment of the present invention.
FIG. 2 is a diagram illustrating a data configuration and an example of contents of transfer rate information stored in a transfer rate information storage unit 111 transmitted from an external device.
FIG. 3 is a diagram illustrating a data configuration and example contents of timing information generated by the timing information generation unit 112 and stored in the timing information storage unit 113;
FIG. 4 is a flowchart showing the operation of the timing information generator 112;
FIG. 5 is a flowchart showing an arbitration process performed by an arbitration unit 114;
FIG. 6 is a timing chart showing temporal changes between bus requests from bus masters A to C and granting of bus use rights by the memory control unit 110;
FIG. 7 is a configuration diagram of an LSI 500 including a memory control unit according to a second embodiment of the present invention.
FIG. 8 is a flowchart showing an arbitration process performed by an arbitration unit 514;
FIG. 9 is a timing chart showing a temporal change between a bus request from the bus masters A to D and grant of a bus use right by the memory control unit 510;
FIG. 10 is a flowchart illustrating a modification of the arbitration process performed by the arbitration unit 514.
FIG. 11 is a timing chart showing temporal changes between bus requests from bus masters A to D and granting of bus use rights by the memory control unit 510 when the arbitration process performed by the arbitration unit 514 is modified.
[Explanation of symbols]
100, 500 LSI
110, 510 Memory control unit
111 Transfer rate information storage unit
112 Timing information generator
113 Timing information storage unit
114, 514 Mediation Department
121-124 Bus master
190 Clock generator
200 unified memory
515 Irregular master information storage unit

Claims (19)

メモリを共用する複数のバスマスタのいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、
複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定めるリクエスト周期とを示す転送レート情報を保持する保持手段と、
各バスマスタに対応する前記リクエスト周期のうち最も小さいもの以下の時間をリクエスト検出周期として定めるリクエスト検出周期算定手段と、
各バスマスタについて、対応する転送レートによって前記リクエスト検出周期において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、
時間経過を周期的に前記リクエスト検出周期で区分して得られる複数のリクエスト検出周期帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備える
ことを特徴とするメモリ制御装置。
A memory control device that arbitrates access conflict to a memory by selectively granting the right to use the memory bus to any of a plurality of bus masters sharing the memory,
For each of the bus masters, holds transfer rate information indicating the transfer rate at which the bus master transfers data to and from the memory and the request cycle that defines the range in which transfer should be guaranteed at the transfer rate. Holding means to
A request detection cycle calculating means for determining as a request detection cycle the following times the smallest of the request period corresponding to each bus master,
For each bus master, when the amount of data that can be transferred in the request detection period according to the corresponding transfer rate is V, the bus use permission for obtaining the bus use permission time that is the time required for V transfer based on the bus bandwidth of the memory bus Time calculation means;
Usage right granting means for granting a right to use a memory bus to each bus master for a corresponding bus usage permission time in each of a plurality of request detection cycle bands obtained by periodically dividing the passage of time into the request detection cycles. A memory control device comprising:
前記メモリ制御装置は、各バスマスタからのバスリクエストを検出する検出手段を備え、
前記使用権付与手段は、前記検出手段により、前記各リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各バスマスタに対して、当該リクエスト検出周期帯において前記使用権を付与する
ことを特徴とする請求項1記載のメモリ制御装置。
The memory control device includes detection means for detecting a bus request from each bus master,
The assignment of the right to use means, by said detecting means, for each bus master where the beginning before bus request each request detection cycle period is detected, to grant the right to use in the request detection cycle period The memory control device according to claim 1, wherein:
前記バスマスタは、メモリとの間でデータを転送する際に一定の転送レートが保たれることを要する定期型バスマスタと、その他の不定期型バスマスタとに分類でき、
前記保持手段は、複数の定期型バスマスタそれぞれについて前記転送レート情報を保持するものであり、前記バス使用許可時間算定手段は、各定期型バスマスタについて前記バス使用許可時間を求め、
前記使用権付与手段は、前記各リクエスト検出周期帯において、当該リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各定期型バスマスタに、対応するバス使用許可時間だけメモリバスの使用権を付与し、前記検出手段により前記バスリクエストが検出されたところの各定期型バスマスタに対応するバス使用許可時間の総和を、前記リクエスト検出周期から減じた残りの時間を上限として不定期型のバスマスタにメモリバスのバス使用権を付与する
ことを特徴とする請求項2記載のメモリ制御装置。
The bus master can be classified into a regular bus master that requires a constant transfer rate to be maintained when transferring data to and from the memory, and other irregular bus masters,
The holding means holds the transfer rate information for each of a plurality of regular bus masters, and the bus use permission time calculating means obtains the bus use permission time for each regular bus master,
The right-of-use granting means, in each of the request detection period bands, uses the right to use the memory bus for the corresponding bus use permission time to each periodic bus master where a bus request is detected before the start of the request detection period band. The bus use permission time corresponding to each periodic bus master where the bus request is detected by the detection means is set to the remaining time obtained by subtracting the remaining time subtracted from the request detection cycle as an upper limit. The memory control device according to claim 2, wherein a right to use the memory bus is given to the memory control device.
前記使用権付与手段は、前記各リクエスト検出周期帯において、前記検出手段により定期型バスマスタにバス使用権を付与している間に不定期型バスマスタからのバスリクエストが検出された場合には当該定期型バスマスタへのバス使用権の付与が終了し次第、当該不定期型バスマスタにバス使用権を付与する
ことを特徴とする請求項3記載のメモリ制御装置。
The right-of-use granting means, if a bus request from an irregular bus master is detected while the right of bus use is granted to the regular bus master by the detection means in each request detection period band, 4. The memory control device according to claim 3, wherein the right to use the bus is granted to the irregular bus master as soon as the right to use the bus to the type bus master ends.
前記保持手段は、前記転送レート情報を前記メモリ制御装置の外部から取得して保持する
ことを特徴とする請求項4記載のメモリ制御装置。
The memory control device according to claim 4, wherein the holding unit acquires and holds the transfer rate information from outside the memory control device.
前記保持手段は前記転送レート情報を、前記メモリ制御装置の外部の装置により書き替え可能な領域に保持する
ことを特徴とする請求項4記載のメモリ制御装置。
The memory control device according to claim 4, wherein the holding unit holds the transfer rate information in an area that can be rewritten by a device external to the memory control device.
前記メモリ制御装置は、前記各バスマスタとバス使用許可用の各信号線で接続されており、
前記使用権付与手段は、バスマスタへのバス使用許可時間だけのバス使用権の付与を、当該バスマスタと接続されている前記信号線をバス使用許可時間だけアクティブにすることにより行う
ことを特徴とする請求項4記載のメモリ制御装置。
The memory control device is connected to each bus master via each signal line for bus use permission,
The right-of-use granting means assigns a bus use right to the bus master only for the bus use permission time by activating the signal line connected to the bus master for the bus use permission time. The memory control device according to claim 4.
前記リクエスト検出周期算定手段は、各バスマスタに対応する前記リクエスト周期のうち最も小さいものの時間をリクエスト検出周期として定める
ことを特徴とする請求項1記載のメモリ制御装置。
The memory control device according to claim 1, wherein the request detection cycle calculation unit determines a time of the smallest request cycle corresponding to each bus master as a request detection cycle .
前記保持手段は、前記転送レート情報を前記メモリ制御装置の外部から取得して保持する
ことを特徴とする請求項1記載のメモリ制御装置。
The memory control device according to claim 1, wherein the holding unit acquires and holds the transfer rate information from outside the memory control device.
1つのメモリ中の互いに独立したメモリ領域にアクセスする複数のバスマスタに対し、選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置であって、
複数のバスマスタそれぞれについて、当該バスマスタがメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定めるリクエスト周期とを示す転送レート情報を保持する保持手段と、
各バスマスタに対応する前記リクエスト周期のうち最も小さいもの以下の時間をリクエスト検出周期として定めるリクエスト検出周期算定手段と、
各バスマスタについて、対応する転送レートによって前記リクエスト検出周期において転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、
時間経過を周期的に前記リクエスト検出周期で区分して得られる複数のリクエスト検出周期帯それぞれにおいて、各バスマスタに対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備える
ことを特徴とするメモリ制御装置。
A memory control device that arbitrates access conflict to a memory by selectively granting a right to use a memory bus to a plurality of bus masters that access mutually independent memory areas in one memory,
For each of the bus masters, holds transfer rate information indicating the transfer rate at which the bus master transfers data to and from the memory and the request cycle that defines the range in which transfer should be guaranteed at the transfer rate. Holding means to
A request detection cycle calculating means for determining as a request detection cycle the following times the smallest of the request period corresponding to each bus master,
For each bus master, when the amount of data that can be transferred in the request detection period according to the corresponding transfer rate is V, the bus use permission for obtaining the bus use permission time that is the time required for V transfer based on the bus bandwidth of the memory bus Time calculation means;
Usage right granting means for granting a right to use a memory bus to each bus master for a corresponding bus usage permission time in each of a plurality of request detection cycle bands obtained by periodically dividing the passage of time into the request detection cycles. A memory control device comprising:
前記メモリ制御装置は、各バスマスタからのバスリクエストを検出する検出手段を備え、
前記使用権付与手段は、前記検出手段により、前記各リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各バスマスタに対して、当該リクエスト検出周期帯において前記使用権を付与する
ことを特徴とする請求項10記載のメモリ制御装置。
The memory control device includes detection means for detecting a bus request from each bus master,
The assignment of the right to use means, by said detecting means, for each bus master where the beginning before bus request each request detection cycle period is detected, to grant the right to use in the request detection cycle period 11. The memory control device according to claim 10, wherein:
前記バスマスタは、メモリとの間でデータを転送する際に一定の転送レートが保たれることを要する定期型バスマスタと、その他の不定期型バスマスタとに分類でき、
前記保持手段は、複数の定期型バスマスタそれぞれについて前記転送レート情報を保持するものであり、
前記バス使用許可時間算定手段は、各定期型バスマスタについて前記バス使用許可時間を求め、
前記使用権付与手段は、前記各リクエスト検出周期帯において、当該リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各定期型バスマスタに、対応するバス使用許可時間だけメモリバスの使用権を付与し、前記検出手段により前記バスリクエストが検出されたところの各定期型バスマスタに対応するバス使用許可時間の総和を、前記リクエスト検出周期から減じた残りの時間を上限として不定期型のバスマスタにメモリバスのバス使用権を付与する
ことを特徴とする請求項11記載のメモリ制御装置。
The bus master can be classified into a regular bus master that requires a constant transfer rate to be maintained when transferring data to and from the memory, and other irregular bus masters,
The holding means holds the transfer rate information for each of a plurality of regular bus masters,
The bus use permission time calculating means obtains the bus use permission time for each regular bus master,
The right-of-use granting means, in each of the request detection period bands, uses the right to use the memory bus for the corresponding bus use permission time to each periodic bus master where a bus request is detected before the start of the request detection period band. The bus use permission time corresponding to each periodic bus master where the bus request is detected by the detection means is set to the remaining time obtained by subtracting the remaining time subtracted from the request detection cycle as an upper limit. The memory control device according to claim 11, wherein a right to use the memory bus is given to the memory control device.
前記使用権付与手段は、前記各リクエスト検出周期帯において、前記検出手段により定期型バスマスタにバス使用権を付与している間に不定期型バスマスタからのバスリクエストが検出された場合には当該定期型バスマスタへのバス使用権の付与が終了し次第、当該不定期型バスマスタにバス使用権を付与する
ことを特徴とする請求項12記載のメモリ制御装置。
The right-of-use granting means, if a bus request from an irregular bus master is detected while the right of bus use is granted to the regular bus master by the detection means in each request detection period band, 13. The memory control device according to claim 12, wherein the right to use the bus is granted to the irregular bus master as soon as the right to use the bus to the type bus master ends.
メモリを共用する複数の回路と、当該複数の回路のいずれかに対し選択的にメモリバスの使用権を付与することによりメモリへのアクセス競合を調停するメモリ制御装置とを含むLSIであって、
前記各回路は、メモリとの間で一定の転送レートでデータを転送することを要する回路であり、
前記メモリ制御装置は、前記各回路について、当該回路がメモリとの間でデータを転送する際の転送レートと当該転送レートで転送が行われることが保証されるべき範囲を定めるリクエスト周期とを示す転送レート情報を保持する保持手段と、
各回路に対応する前記リクエスト周期のうち最も小さいもの以下の時間をリクエスト検出周期として定めるリクエスト検出周期算定手段と、
各回路について、対応する転送レートによって前記リクエスト検出周期に転送できるデータ量をVとした場合にメモリバスのバスバンド幅に基づいてVの転送に要する時間であるバス使用許可時間を求めるバス使用許可時間算定手段と、
時間経過を周期的に前記リクエスト検出周期で区分して得られる複数のリクエスト検出周期帯それぞれにおいて、各回路に対して、対応するバス使用許可時間だけメモリバスの使用権を付与する使用権付与手段とを備える
ことを特徴とするLSI。
An LSI including a plurality of circuits sharing a memory, and a memory control device that arbitrates access conflict to the memory by selectively granting the right to use the memory bus to any of the plurality of circuits,
Each circuit is a circuit that requires data to be transferred to and from a memory at a constant transfer rate,
The memory control device indicates, for each of the circuits, a transfer rate at which the circuit transfers data to and from the memory and a request cycle that defines a range in which transfer is guaranteed to be performed at the transfer rate. Holding means for holding transfer rate information;
A request detection cycle calculating means for determining as a request detection cycle the following times the smallest of the request period corresponding to each circuit,
For each circuit, the bus use permission for obtaining the bus use permission time, which is the time required for the transfer of V, based on the bus bandwidth of the memory bus, where V is the amount of data that can be transferred in the request detection cycle at the corresponding transfer rate Time calculation means;
Usage right granting means for granting the right to use the memory bus to each circuit for the corresponding bus usage permission time in each of a plurality of request detection cycle bands obtained by periodically dividing the passage of time into the request detection cycles. An LSI characterized by comprising:
前記各回路は、前記メモリ中の互いに独立したメモリ領域との間でデータの転送を行う回路である
ことを特徴とする請求項14記載のLSI。
15. The LSI according to claim 14, wherein each of the circuits is a circuit that transfers data to and from memory areas independent of each other in the memory.
前記メモリ制御装置は、前記各回路からのバスリクエストを検出する検出手段を備え、
前記使用権付与手段は、前記検出手段により、前記各リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各回路に対して、当該リクエスト検出周期帯において前記使用権を付与する
ことを特徴とする請求項14記載のLSI。
The memory control device includes detection means for detecting a bus request from each circuit,
The assignment of the right to use means, by said detecting means, to each circuit at which the previously bus request the beginning of each request detection cycle period is detected, to grant the right to use in the request detection cycle period 15. The LSI according to claim 14, wherein:
前記回路は、メモリとの間でデータを転送する際に一定の転送レートが保たれることを要する定期型バスマスタと、その他の不定期型バスマスタとに分類でき、
前記保持手段は、複数の定期型バスマスタそれぞれについて前記転送レート情報を保持するものであり、
前記バス使用許可時間算定手段は、各定期型バスマスタについて前記バス使用許可時間を求め、
前記使用権付与手段は、前記各リクエスト検出周期帯において、当該リクエスト検出周期帯の始期以前にバスリクエストが検出されたところの各定期型バスマスタに、対応するバス使用許可時間だけメモリバスの使用権を付与し、前記検出手段により前記バスリクエストが検出されたところの各定期型バスマスタに対応するバス使用許可時間の総和を、前記リクエスト検出周期から減じた残りの時間を上限として不定期型のバスマスタにメモリバスのバス使用権を付与する
ことを特徴とする請求項16記載のLSI。
The circuit can be classified into a regular bus master that requires a constant transfer rate to be maintained when transferring data to and from the memory, and other irregular bus masters,
The holding means holds the transfer rate information for each of a plurality of regular bus masters,
The bus use permission time calculating means obtains the bus use permission time for each regular bus master,
The right-of-use granting means, in each of the request detection period bands, uses the right to use the memory bus for the corresponding bus use permission time to each periodic bus master where a bus request is detected before the start of the request detection period band. The bus use permission time corresponding to each periodic bus master where the bus request is detected by the detection means is set to the remaining time obtained by subtracting the remaining time subtracted from the request detection cycle as an upper limit. 17. The LSI according to claim 16, wherein a right to use the memory bus is given to the LSI.
前記使用権付与手段は、前記各リクエスト検出周期帯において、前記検出手段により定期型バスマスタにバス使用権を付与している間に不定期型バスマスタからのバスリクエストが検出された場合には当該定期型バスマスタへのバス使用権の付与が終了し次第、当該不定期型バスマスタにバス使用権を付与する
ことを特徴とする請求項17記載のLSI。
The right-of-use granting means, if a bus request from an irregular bus master is detected while the right of bus use is granted to the regular bus master by the detection means in each request detection period band, 18. The LSI according to claim 17, wherein the right to use the bus is granted to the irregular bus master as soon as the right to use the bus to the type bus master ends.
前記保持手段は、前記転送レート情報を前記LSIの外部から取得して保持する
ことを特徴とする請求項14記載のLSI。
15. The LSI according to claim 14, wherein the holding unit acquires and holds the transfer rate information from outside the LSI.
JP2002103027A 2001-04-25 2002-04-04 Memory control device and LSI Expired - Fee Related JP3987750B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002103027A JP3987750B2 (en) 2001-04-25 2002-04-04 Memory control device and LSI

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001127502 2001-04-25
JP2001-127502 2001-04-25
JP2002103027A JP3987750B2 (en) 2001-04-25 2002-04-04 Memory control device and LSI

Publications (2)

Publication Number Publication Date
JP2003016024A JP2003016024A (en) 2003-01-17
JP3987750B2 true JP3987750B2 (en) 2007-10-10

Family

ID=26614175

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002103027A Expired - Fee Related JP3987750B2 (en) 2001-04-25 2002-04-04 Memory control device and LSI

Country Status (1)

Country Link
JP (1) JP3987750B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4419868B2 (en) * 2005-02-25 2010-02-24 ソニー株式会社 Information processing apparatus and method, memory control apparatus and method, recording medium, and program
JP2008027245A (en) * 2006-07-21 2008-02-07 Matsushita Electric Ind Co Ltd Memory access controller and memory access control method
JP5074820B2 (en) * 2007-05-22 2012-11-14 ルネサスエレクトロニクス株式会社 Image processing apparatus and image processing method
JP2011034495A (en) * 2009-08-05 2011-02-17 Panasonic Corp Memory access device and video processing system
JP2015095177A (en) * 2013-11-13 2015-05-18 株式会社リコー Data transfer device, image processor, data transfer method and data transfer program

Also Published As

Publication number Publication date
JP2003016024A (en) 2003-01-17

Similar Documents

Publication Publication Date Title
US6820152B2 (en) Memory control device and LSI
JP4480427B2 (en) Resource management device
US5901295A (en) Address and data bus arbiter for pipelined transactions on a split bus
JP2010282405A (en) Data processing system
US6415367B1 (en) Apparatus for reducing asynchronous service latency in a time slot-based memory arbitration scheme
US5680554A (en) Method and apparatus for arbitrating among processors for access to a common bus
JP3987750B2 (en) Memory control device and LSI
EP1238342B1 (en) Apparatus for memory resource arbitration based on dedicated time slot allocation
US6412049B1 (en) Method for minimizing CPU memory latency while transferring streaming data
US5708783A (en) Data bus arbiter for pipelined transactions on a split bus
US5815676A (en) Address bus arbiter for pipelined transactions on a split bus
JPH1139255A (en) Bus arbitration device and method therefor
JPH0991194A (en) Mediation system and mediation method
JPH10149311A (en) Memory controller
US7747806B2 (en) Resource use management device, resource use management system, and control method for a resource use management device
JP3124544B2 (en) Bus controller
JPH11232215A (en) Bus controller, bus master device and method for controlling bus control system
JPH0844661A (en) Information processor
JP2004220309A (en) Multiprocessor system
JP2806405B2 (en) Microprocessor
JP2555941B2 (en) Bus arbitration method
JP4170506B2 (en) Arbitration circuit and method
JPS5931736B2 (en) Queue management method
JP2000250852A (en) Bus arbitrating device, bus system and bus arbitrating method
JPH05204832A (en) Dma bus arbitration system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050301

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070424

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070525

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070713

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110720

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110720

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120720

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120720

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130720

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees