JP3615478B2 - Memory access arbitration method - Google Patents
Memory access arbitration method Download PDFInfo
- Publication number
- JP3615478B2 JP3615478B2 JP2000325189A JP2000325189A JP3615478B2 JP 3615478 B2 JP3615478 B2 JP 3615478B2 JP 2000325189 A JP2000325189 A JP 2000325189A JP 2000325189 A JP2000325189 A JP 2000325189A JP 3615478 B2 JP3615478 B2 JP 3615478B2
- Authority
- JP
- Japan
- Prior art keywords
- transaction
- data
- client
- buffer
- sdram
- 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
Links
Images
Landscapes
- Bus Control (AREA)
- Information Transfer Systems (AREA)
Description
【0001】
【産業上の利用分野】
この発明は、デジタル複写機等におけるメモリアクセス調停方法に関する。
【0002】
【従来の技術】
複数のメモリアクセス要求元(以下、クライアントという)からのメモリアクセス要求に対する調停方法として、▲1▼固定優先順位による調停方法と、▲2▼ラウンドロビン方式による調停方法とがある。
【0003】
固定優先順位方式による調停方法およびラウンドロビン方式による調停方法は、共に、メモリアクセス要求が競合した場合に、優先順位の高いクライアントからのメモリアクセス要求を優先させるものであるが、固定優先順位方式による調停方法では優先順位が固定されているのに対し、ラウンドロビン方式による調停方法では調停によってクライアントが選択されると、そのクライアントの優先順位が最下位に回り、それにともなって、当該クライアントの調停時の優先順位より低かった他のクライアントの優先順位が繰り上げられる点で両者は異なっている。
【0004】
クライアントが多数存在し、かつその中のクライアントに対して、スキャナからの画像入力、LSU(レーザスキャンユニット)に対する画像出力等のようにデータ転送レートを保証する必要があるようなシステムの場合、上記固定優先順位方式やラウンドロビン方式による調停方法では、特定のクライアントに対してデータ転送レートを保証できなくなる危険性が高い。
【0005】
つまり、固定優先順位方式による調停方法では、データ転送レートを保証すべき複数のクライアントに対する優先順位を上位に設定しても、データ転送レートを保証すべきクライアントの中の1つが内部にFIFO等のバッファを有する場合には、そのバッファにデータが充填されるまでの間は、データ転送レートを保証すべき他のライアントのメモリアクセスを阻害することがある。
【0006】
また、ラウンドロビン方式による調停方法では、データ転送レートを保証すべきクライアントが要求するデータ転送レートの総和に対してメモリのバンド幅(メモリが有する転送レートのキャパシティ)にあまり余裕がないと、データ転送レートを保証する必要のないクライアントの優先順位が上位に繰り上げられたときにメモリのバンド幅を消費し、データ転送レートを保証すべきクライアントに対して充分なメモリバンド幅を確保できなくなることがある。
【0007】
【発明が解決しようとする課題】
この発明は、データ転送レートを保証する必要がある特定のクライアントに対して、データ転送レートを保証することができるメモリアクセス調停方法を提供することを目的とする。
【0008】
【課題を解決するための手段】
この発明によるメモリアクセス調停方法は、データ転送レートを保証する必要がある複数のクライアントからのメモリアクセス要求が競合した場合には、所定期間毎に、各クライアントによって生成されかつ各クライアントに設けられているデータバッファへのデータの蓄積状況を示すバッファ残量に基づいて、次に処理すべきトランザクションを仮決定するステップ、仮決定したトランザクションが次の所定期間において処理可能か否かを、仮決定したトランザクション処理内容、先行トランザクションの処理内容、及び、先行するトランザクション処理開始からの経過時間に基づいてチェックするステップ、ならびに仮決定したトランザクションが次の所定期間で処理可能であると判定した場合には、その仮決定したトランザクションの処理を次の所定期間から開始し、仮決定したトランザクションが次の所定期間で処理可能ではないと判定した場合には、次の所定期間において、各クライアントによって生成されたバッファ残量に基づいて次に処理すべきトランザクションを仮決定するステップを備えていることを特徴とする。
【0011】
各クライアントによるメモリアクセスがバーストアクセスによって行なわれる場合には、次に処理すべきトランザクションの仮決定は、各クライアントによって生成されたバッファ残量をバースト内転送量によって補正した後のバッファ残量に基づいて行なわれる。
【0012】
【発明の実施の形態】
以下、図面を参照して、この発明の実施の形態について説明する。
【0013】
〔1〕デジタル複写機のメモリ制御回路の周辺回路の構成の説明
【0014】
図1は、デジタル複写機のメモリ制御回路およびその周辺回路の構成を示している。
【0015】
メモリ制御回路1には、画像入出力I/F2、HDDI/F3、SDRAM4、CPU5および画像圧縮伸長回路6が接続されている。
【0016】
〔2〕デジタル複写機のメモリ制御回路の構成の説明
【0017】
図2は、メモリ制御回路1の構成を示している。
【0018】
メモリ制御回路1は、複数のインターフェース(I/F)11〜18、画像処理回路(RBUF)19、内部CODEC回路(MXX )20および複数のDMAコントローラ(DMAC)21〜33を備えている。
【0019】
この実施の形態では、図示しないスキャナから画像入力I/F(IDIN0 )15に入力される画像データを、DMAコントローラ(DMAC10)21およびSDRAM I/F(SDRAMIF)14によってSDRAM4に格納するためのメモリアクセス要求と、SDRAM4に格納された画像データをDMAコントローラ(DMAC20)23およびSDRAM I/F(SDRAMIF)14によって画像出力I/F(VDOUT0) 17に出力して印字処理を行なうためのメモリアクセス要求とが競合した場合を例にとって、メモリ制御回路1の調停動作について説明する。
【0020】
〔3〕画像入力I/F(IDIN0)15に内蔵されているデータバッファおよびその周辺回路の構成の説明
【0021】
図3は、画像入力I/F(IDIN0) 15に内蔵されているデータバッファおよびその周辺回路の構成を示している。
【0022】
画像入力I/F(IDIN0) 15は、データバッファ40と、セレクタ56と、ストア制御信号生成部57と、ロード制御信号および選択制御信号生成部58と、エンコーダ59とを備えている。
【0023】
データバッファ40は、画像入力I/F(IDIN0) 15の動作クロックWCK に同期して入力画像データIDIN[31:0]を取込み、システムクロックSCK に同期して、画像データidData[31:0]を出力する。なお、SDRAM I/F(SDRAMIF)14もシステムクロックSCK に同期して動作するものとする。データバッファ40は、15段のワードバッファフラグ生成部41〜55を内蔵しており、15段×32bitのFIFOとして動作し、データがラッチされたワードバッファフラグ生成部の数(データバッファ40に蓄積されているデータ量)をバッファ残量idFlag[3:0] として出力する。
【0024】
データバッファ40は、画像入力I/F(IDIN0) 15内部で生成されるデータバッファへの画像データ書き込み制御信号IDACK がアサート(”H”レベル) されている期間、動作クロックWCK に同期して、画像データIDINを取り込む。画像データIDINをいずれのワードバッファフラグ生成部41〜55に格納するかは、ストア制御信号生成部57によって生成されるストア制御信号st[14:0]によって制御される。
【0025】
ストア制御信号生成部57は、第1カウンタ57aと第1デコーダ57bを備えている。第1カウンタ57aは、画像データ書き込み制御信号IDACK がアサートされる毎にアップカウント動作を行なう。第1カウンタ57aのカウント値は、最大14であり、14を越えると0に戻る。
【0026】
第1デコーダ57bは、第1カウンタ57aのカウント値をデコードし、15本のデコード信号を生成する。ストア制御信号生成部57は、画像データ書き込み制御信号IDACK とこれらのテコード信号との論理積を演算して、ストア制御信号st[14:0]を生成する。
【0027】
各ワードバッファフラグ生成部41〜55は、それに入力されるストア制御信号st0 〜st14が”H” のときに、入力画像データIDINをラッチする。各ワードバッファフラグ生成部41〜55は、データをラッチすると、データ格納フラグoflag0〜oflag14 をアサートする。そして、各ワードバッファフラグ生成部41〜55は、ラッチされたデータを読み出すと、データ格納フラグoflag0〜oflag14 をネゲートする。
【0028】
エンコーダ59は、データ格納フラグoflag0〜oflag14 のうち、アサート状態にあるフラグの数をエンコードして、バッファ残量フラグidFlag[3:0] を生成する。
【0029】
データバッファ40は、SDRAM I/F(SDRAMIF)14から送られてくるデータ転送アクノリッジ信号sdAck10 がアサート(”H”) されている期間、システムクロックSCK に同期して、画像データを出力する。いずれのワードバッファフラグ生成部41〜55に格納されている画像データを出力するかは、選択制御信号生成部58によって生成されるロード制御信号ld[14:0]および選択制御信号Selectによって制御される。
【0030】
ロード制御信号および選択制御信号生成部58は、第2カウンタ58aと第2デコーダ58bを備えている。第2カウンタ58aは、データ転送アクノリッジ信号sdAck10 がアサートされる毎にアップカウント動作を行なう。第2カウンタ58aのカウント値は、最大14であり、14を越えると0に戻る。
【0031】
第2デコーダ58bは、第2カウンタ58aのカウント値をデコードし、15本のデコード信号を生成する。ロード制御信号および選択制御信号生成部58は、データ転送アクノリッジ信号sdAck10 とこれらのテコード信号との論理積を演算して、ロード制御信号ldを生成する。
【0032】
各ワードバッファフラグ生成部41〜55は、それに入力されるロード制御信号ld0 〜ld14が”H” のときに、画像データを読み出すとともに、データ格納フラグoflag0〜oflag14 をネゲートする。
【0033】
ロード制御信号および選択制御信号生成部58は、第2カウンタ58aのカウント値を選択制御信号Selectとしてセレクタ56に出力する。セレクタ56は、選択制御信号Selectに対応するワードバッファフラグ生成部41〜55から読み出された画像データDo0 〜Do14を選択して、データバッファ出力信号idData[31:0]として出力する。
【0034】
〔4〕画像出力I/F(VDOUT0)17に内蔵されているデータバッファおよびその周辺回路の構成の説明
【0035】
図4は、画像出力I/F(VDOUT0)17に内蔵されているデータバッファおよびその周辺回路の構成を示している。
【0036】
画像出力I/F(VDOUT0)17は、データバッファ60と、セレクタ76と、ストア制御信号生成部77と、エンコーダ78と、ロード制御信号および選択制御信号生成部79を備えている。
【0037】
データバッファ60は、システムクロックSCK に同期して、SDRAM I/F(SDRAMIF)14の出力データsdData[31:0]を取込み、画像出力I/F(VDOUT0)17の動作クロックRCK に同期して、画像データODOUT[31:0] を出力する。なお、SDRAM I/F(SDRAMIF)14もシステムクロックSCK に同期して動作するものとする。データバッファ60は、15段のワードバッファフラグ生成部61〜75を内蔵しており、15段×32bitのFIFOとして動作し、データがラッチされていないワードバッファフラグ生成部の数(データバッファ60の空き容量)をバッファ残量odFlag[3:0] として出力する。
【0038】
データバッファ60は、SDRAM I/F(SDRAMIF)14から送られてくるデータ転送アクノリッジ信号sdAck20 がアサート(”H”レベル) されている期間、システムクロックSCK に同期して、SDRAMIF14の出力データsdDataを取り込む。入力画像データsdDataをいずれのワードバッファフラグ生成部61〜75に格納するかは、ストア制御信号生成部77によって生成されるストア制御信号st[14:0]によって制御される。
【0039】
ストア制御信号生成部77は、第1カウンタ77aと第1デコーダ77bを備えている。第1カウンタ77aは、データ転送アクノリッジ信号sdAck20 がアサートされる毎にアップカウント動作を行なう。第1カウンタ77aのカウント値は、最大14であり、14を越えると0に戻る。
【0040】
第1デコーダ77bは、第1カウンタ77aのカウント値をデコードし、15本のデコード信号を生成する。ストア制御信号生成部77は、データ転送アクノリッジ信号sdAck20 とこれらのデコード信号との論理積を演算して、ストア制御信号st[14:0]を生成する。
【0041】
各ワードバッファフラグ生成部61〜75は、それに入力されるストア制御信号st0 〜st14が”H” のときに、SDRAMIF14の出力データsdDataをラッチする。各ワードバッファフラグ生成部61〜75は、データをラッチすると、データ格納フラグiflag0〜iflag14 をアサートする。そして、各ワードバッファフラグ生成部61〜75は、ラッチされたデータを読み出すと、データ格納フラグiflag0〜iflag14 をネゲートする。
【0042】
エンコーダ78は、データ格納フラグiflag0〜iflag14 のうち、ネゲート状態にあるフラグの数をエンコードして、バッファ残量フラグodFlag[3:0] を生成する。
【0043】
データバッファ60は、画像出力IF17内部で生成されるデータバッファへの画像データ読み出し制御信号ODACK がアサート(”H”) されている期間、画像出力IF17の動作クロックRCK に同期して、画像データを出力する。いずれのワードバッファフラグ生成部61〜75に格納されている画像データを出力するかは、ロード制御信号および選択制御信号生成部79によって生成されるロード制御信号ld[14:0]および選択制御信号Selectによって制御される。
【0044】
ロード制御信号および選択制御信号生成部79は、第2カウンタ79aと第2デコーダ79bを備えている。第2カウンタ79aは、画像データ読み出し制御信号ODACK がアサートされる毎にアップカウント動作を行なう。第2カウンタ79aのカウント値は、最大14であり、14を越えると0に戻る。
【0045】
第2デコーダ79bは、第2カウンタ79aのカウント値をデコードし、15本のデコード信号を生成する。ロード制御信号および選択制御信号生成部79は、画像データ読み出し制御信号ODACK とこれらのテコード信号との論理積を演算して、ロード制御信号ldを生成する。
【0046】
各ワードバッファフラグ生成部61〜75は、それに入力されるロード制御信号ld0 〜ld14が”H” のときに、画像データを読み出すとともに、データ格納フラグiflag0〜iflag14 をネゲートする。
【0047】
ロード制御信号および選択制御信号生成部79は、第2カウンタ79aのカウント値を選択制御信号Selectとしてセレクタ76に出力する。セレクタ76は、選択制御信号Selectに対応するワードバッファフラグ生成部61〜75から読み出された画像データDo0 〜Do14を選択して、データバッファ出力信号ODOUT[31:0] として出力する。
【0048】
〔5〕SDRAM I/F(SDRAMIF) 14の構成の説明
【0049】
図5は、SDRAM I/F(SDRAMIF) 14の構成を示している。
【0050】
SDRAM I/F(SDRAMIF) 14は、図2の各DMAコントローラ21〜33および各I/F11〜13、15〜18とのI/Fを有しているが、ここでは、代表的に、DMAコントローラ(DMAC10)21、DMAコントローラ(DMAC20)23、画像入力I/F(IDIN0 )15、画像出力I/F(VDOUT0)17およびCPU I/F(CPUIF)13とのI/Fのみを図示している。
【0051】
図5において、DMAC10 I/F81は、DMAコントローラ(DMAC10) 21および画像入力I/F(IDIN0)15とのI/Fを示し、DMAC20 I/F82は、DMAコントローラ(DMAC20)23および画像出力I/F(VDOUT0)17とのI/Fを示し、CPUIF I/F 83は、CPU I/F(CPUIF) 13とのI/Fを示している。
【0052】
SDRAM I/F(SDRAMIF) 14は、上記I/F81、82、83の他に、調停回路84、トランザクションファイル85、コマンド発生回路86、ストローブ発生回路87等を備えている。
【0053】
DMAC10 I/F81は、画像入力I/F(IDIN0)15からのバッファ残量フラグidFlagから、バッファ残量補正値(内部信号FlagAdj10)を減じたものを、Flag10として調停回路84に送る。また、DMAC10 I/F81は、ストローブ発生回路87から送られてくるデータ転送アクノリッジ信号sdAck10 に基づいて入力データidDataをマスク( 各ビットごとの論理積) して、Data10を生成する。そして、Data10と、CPUIF I/F 83の出力データDataCpu のビットごとの論理和をとってSDRAM 書き込みデータWriteData を生成する。
【0054】
DMAC20 I/F82は、画像出力I/F(VDOUT0)17からのバッファ残量フラグodFlagから、バッファ残量補正値(内部信号FlagAdj20)を減じたものを、Flag20としてとして調停回路84に送る。
【0055】
CPUIF I/F 83は、CPU5からのSDRAMアクセスに対応する。調停回路84は、各クライアントからのトランザクション処理要求を調停する。トランザクションファイル85は、調停回路84によってSDRAMアクセスを割り当てられたトランザクション処理内容を保持し、調停後のサイクル数をカウントする。
【0056】
コマンド発生回路86は、トランザクションファイル85の内容、調停後のサイクル数に基づいて、SDRAM4に対してコマンドを発行する。ストローブ発生回路87は、データ転送アクノリッジ信号sdAck10,20の生成と、SDRAM4のデータバス制御を行なう。
【0057】
以下に、各部の主要な入出力信号について説明しておく。
【0058】
(1)DMAC10 I/F81、DMAC20 I/F82、CPUIF I/F 83の入出力信号。
・dm10Req, dm20Req, cpuSdramReq : SDRAM4へのトランザクション処理要求。
・idFlag:画像入力I/F(IDIN0)のバッファ残量を示すフラグ。
・odFlag:画像出力I/F(VDOUT0) のバッファ残量を示すフラグ。
・cpuDir:データ転送の方向(read/write)を指示する信号。
・dm10Address, dm20Address:DMAアドレス。
【0059】
・sdDispatch10, sdDispatch20:SDRAM I/F(SDRAMIF)14によりトランザクション処理が受け付けられたことを示す信号。DMAC10 I/F81、DMAC20 I/F82は、調停回路84で生成されたこれらの信号sdDispatch10, sdDispatch20をそのままクライアントに転送する。
【0060】
・sdAck10, sdAck20:SDRAM I/F(SDRAMIF)14からのデータ転送アクノリッジ信号。DMAC10 I/F81、DMAC20 I/F82は、ストローブ信号発生回路87から送られてくるこれらの信号sdAck10, sdAck20を、そのまま各クライアントに転送する。
【0061】
(2)調停回路84の出力信号
・Register:調停回路84が割り当てたトランザクション処理を、トランザクションファイル85に登録させるための制御信号。
・Client:調停回路84によって現時点で最も優先順位が高いと仮決定されたクライアント( DMAコントローラ(DMAC10)21、DMAコントローラ(DMAC20)23、…CPU IF(CPUIF) 13)を示すコード。
【0062】
・Bank, Row , Col :上記最優先クライアントから送られてくるアドレスを、バンク番号、ロウアドレスおよびカラムアドレスに分解したアドレス。
・TransType :上記最優先クライアントのトランザクション処理内容を示すコード(READ,WRITE)。
・sdDispatch10, sdDispatch20, sdDispatchCpu :調停回路84によって対応するクライアントによるトランザクション処理要求が受け付けられたことを示す信号。
【0063】
(3)トランザクションファイル85の出力信号
【0064】
・FileState :トランザクションファイル85の内容が有効(VALID) なものか、無効(INVALID) なものかを示す信号。
・CTransType:現在登録されているトランザクション処理内容を示すコード(READ,WRITE)。
・CClient :現在登録されているトランザクション処理の要求元を表すコード。
【0065】
・CBank, CRow , CCol:現在登録されているトランザクション処理の対象アドレスを、バンク番号、ロウアドレスおよびカラムアドレスに分解したアドレス。
・CycleCount:トランザクションファイル85にトランザクション処理が登録されてからのサイクル数をカウントするカウンタのカウンタ値を示す信号。
【0066】
(4)コマンド発生回路86の出力信号
・ReadTrigger :ストローブ発生回路87に対してリードデータのタイミングを指定するトリガ信号。
・WriteTrigger:ストローブ発生回路87に対してライトデータのタイミングを指定するトリガ信号。
・/CS, /RAS, /CAS, /WE, BA, MA:SDRAM制御信号。
【0067】
(5)ストローブ発生回路87の出力信号。
・sdAck10,20:データ転送アクノリッジ信号。
・sdData:SDRAM4からのリードデータ。
・MD:SDRAMIFデータバス。
【0068】
〔6〕アクセス調停方法の説明
【0069】
SDRAM4にアクセスするものとして、次のようなものが挙げられる。
(1)各DMAコントローラ21〜33からのトランザクション処理要求
(2)CPU I/F(CPUIF) 13からのトランザクション処理要求(CPUアクセス)
【0070】
SDRAM I/F(SDRAMIF)14は、これらのアクセス要求を、優先順位に従って調停し、もっとも優先順位の高いものにアクセス権を与える。優先順位は、各クライアント毎に固定されている。優先順位は、次のように予め定められている。
【0071】
DMAC10,DMAC11,DMAC20,DMAC21 >CPU アクセス>DMAC7 >DMAC30,DMAC6>DMAC40,DMAC5>DMAC31>DMAC41>DMAC8 >DMAC9
【0072】
カンマで区切ったものは同一優先順位である。
【0073】
同一優先順位のアクセス要求が競合した場合には、SDRAM I/F(SDRAMIF)14は、クライアントのバッファの残量フラグをもとに調停を行なう。ただし、バッファを持たないクライアントに対しては、バッファ残量を特定値と見做す。
【0074】
現在処理中のトランザクション処理要求元クライアントから引き続いてトランザクション処理要求が発生している場合には、バッファ残量からバースト長( この例では4)を差し引いたものを基に調停する。また、SDRAM I/F(SDRAMIF)14は、アクセス要求を受けた場合でも、その要求元クライアントのバッファ残量がバースト長に達していない場合には、そのアクセス要求を調停の対象から除外する。
【0075】
SDRAM I/F(SDRAMIF)14は、毎サイクル毎に次に処理するトランザクションの候補を上記の手順で仮決定する。さらに、仮決定したトランザクションが次のサイクルで処理可能かどうかをチェックし、処理可能であれば、その仮決定したトランザクションの処理を次のサイクルから実際に開始する(SDRAM4に対するコマンド発行)。
【0076】
仮決定したトランザクションが次のサイクルで処理可能であるかどうかは、先行するトランザクションの処理内容、仮決定したトランザクションの処理内容および先行するトランザクション処理開始からの経過時間に基づいて判定する。
【0077】
〔7〕アクセス調停方法の具体例の説明
【0078】
以下、図6に基づいて、DMAコントローラ(DMAC10)21と、DMAコントローラ(DMAC20)23との2つのクライアントの間でアクセス要求が競合した場合についての調停方法について具体的に説明する。
【0079】
〔7−1〕ブロック内部信号についての説明
【0080】
まず、図6に示されているブロック内部信号について説明する。
【0081】
・FlagAdj20 : バッファ残量フラグodFlagを補正するためのバッファ残量フラグ補正値。補正値の初期値は0 、DMAコントローラ(DMAC20)23からのトランザクョン処理要求が受付られたことを示す信号sdDispatch20がアサートされる度にバースト長(この例では4)が加算され、データ転送アクノリッジ信号sdAck20 がアサートされている期間、1ずつ減算されていく。ただし、FlagAdj20 の最小値は0である。
【0082】
・FlagAdj10 : バッファ残量フラグidFlagを補正するためのバッファ残量フラグ補正値。補正値の初期値は0 、DMAコントローラ(DMAC10)21からのトランザクョン処理要求が受付られたことを示す信号sdDispatch10がアサートされる度にバースト長(この例では”4”)が加算され、データ転送アクノリッジ信号sdAck10 がアサートされている期間、1ずつ減算されていく。ただし、FlagAdj10 の最小値は0である。
【0083】
・RClient : 現在登録されているトランザクション処理の要求元を示すコードCClient を、リードデータのタイミングを示す信号ReadTrigger のアサートを条件にラッチした信号。
・ReadTrigger _ssss : ReadTrigger をシステムクロックSCK の4クロック分遅延してラッチした信号。
【0084】
・ReadAck : ReadTrigger _ssssをトリガとして動作する4クロックサイクル幅のワンショット信号。
・WriteAck : WriteTrigger をトリガとして動作する4クロックサイクル幅のワンショット信号。
【0085】
・RRClient : RClientをReadTrigger _ssssアサートを条件にラッチした信号。
・WClient : CClient をWriteTriggerアサートを条件にラッチした信号。
【0086】
〔7−2〕図6の具体例の前提条件についての説明
【0087】
図6の具体例の前提条件は、以下の通りである。
【0088】
(1)SDRAM4にアクセスするクライアントは、DMAコントローラ(DMAC10)21およびDMAコントローラ(DMAC20)23のみであると仮定する。
【0089】
(2)画像入力I/F(IDIN0 )15の動作クロック(WCK) 、画像出力I/F(VDOUT0) 17の動作クロックおよびシステムクロック(SCK)は、全て同一クロック( 同一周波数) であるとする。
【0090】
(3)画像入力I/F(IDIN0 )15は、3クロックに1回の割合で、データバッファ40にデータを書き込み(IDACK アサート) 、画像出力I/F(VOUT0)17は、2 クロックに1回の割合で、データバッファ60からデータを読み出す(ODACK アサート) ものとする。
【0091】
(4)DMAコントローラ(DMAC10)21に設定された転送開始アドレスをAm、DMAコントローラ(DMAC20)23に設定された転送開始アドレスをAnとする。Am、Anはともに、バースト境界かつバンク#0から開始するように、下位4ビットは”0”とする。
【0092】
(5)DMAアドレス(dm10Address,dm20Address)は、ワード単位のアドレスを示している。したがって、DMAアドレスは、調停が1回行なわれる毎に、バースト長(4)ずつ増加するものとする。
【0093】
〔7−3〕図6のタイミングチャートの説明
【0094】
時点T1で、DMAコントローラ(DMAC10)21およびDMAコントローラ(DMAC20)23が起動される(dm10Req,dm20Reqアサート) 。また、時点T1で、画像入力I/F(IDIN0 )15が起動され、時点T4で画像出力I/F(VOUT0)17が起動される。
【0095】
画像入力I/F(IDIN0)15の起動時点T1においては、データバッファ40は空なので、バッファ残量フラグidFlagは”0”となる。また、画像出力I/F(VDOUT0 )17の起動時点T4においては、データバッファ60は空なので、バッファ残量フラグodFlagは”15”となる。
【0096】
バッファ残量補正値FlagAdj10 は、画像入力I/F(IDIN0 )15の起動時点T1で0であり、バッファ残量補正値FlagAdj20 は、画像出力I/F(VDOUT0)17の起動時点T4においては0である。したがって、DMAC10 I/F81から出力されるFlag10(idFlag −FlagAdj10 )は、画像入力I/F(IDIN0)15の起動時点T1で0となり、DMAC20 I/F82から出力されるFlag20(odFlag −FlagAdj20 )は、画像出力I/F(VDOUT0 )17の起動時点T4においては15となる。
【0097】
調停回路84は、リクエスト信号(dm10Req 、dm20Req)をアサートしているクライアントの中から、データバッファの残量を示すフラグFlag10、Flag20を参照して、最優先のクライアントを仮決定する。
【0098】
画像入力I/F(IDIN0 )15および画像出力I/F(VDOUT0)17の起動直後においては、Flag10:Flag20=0:15であるので、DMAコントローラ(DMAC20)23が最優先のクライアントとして仮決定される。つまり、時点T4において、調停回路84から出力される信号Clientは、DMAC20を表す信号( 図6では”20”と表記) となる。
【0099】
時点T4において、トランザクションファイル85から出力される信号FileState は、”INVALID” 状態であるため、調停回路84は、SDRAM4にコマンド発行可能であると判定し、Registerをアサートして、調停されたトランザクション内容をトランザクションファイル85に登録する。
【0100】
トランザクション内容をトランザクションファイル85に登録するときには、DMAアドレス(この場合にはdm20Address =An) は、バンクアドレス(Bank)、ロウアドレス(Row) およびカラムアドレス(Col) に分解される。バンクアドレス(Bank)は、DMAアドレス(この場合にはdm20Address)を用いてバンクインターリーブをかけることによって得られる。
【0101】
以下の説明において、dm10Address およびdm20Address を総称する際には、dm#Addressと表記することにする。ロウアドレス(Row) は、FC(dm#Address)={ dm#Address[12:6],dm#Address[3:2] }の関数によって、dm#Addressから分解・生成される。カラムアドレス(Col) は、FR(dm#Address)=dm#Address[24:13] の関数によって、dm#Addressから分解・生成される。
【0102】
時点T4において、調停回路84は、DMAコントローラ(DMAC20)23からのトランザクション処理要求を受け付けたことを示す信号sdDispatch20をアサートする。この信号sdDispatch20は、信号Registerを1クロックディレイしたものと、信号CClient の内容をデコードした信号との論理積により生成される。sdDispatch20がアサートされている期間は、調停回路84は、調停を禁止する。
【0103】
時点T5において、調停回路84は、sdDispatch20のアサートに基づいて、バッファ残量補正値FlagAdj20 に4を加算する。
【0104】
sdDispatch20がネゲートされると( 時点T6) 、調停回路84は、調停を再開する。時点T6においては、Flag10:Flag20=1:11であるので、DMAコントローラ(DMAC20)23が再び最優先のクライアントとして仮決定される。
【0105】
時点T6においては、トランザクションファイル85から出力される信号FileState が”VALID” 状態となっているため、調停回路84は、先行トランザクション内容との関係で、SDRAM4へのコマンド発行が可能か否かを判定する。先行トランザクション内容は”Read”なので、図7のリード動作先行動作パターンに基づいて、SDRAM4へのコマンド発行が可能か否かを判定する。
【0106】
この例では、追従トランザクション内容も”Read”でバンクが非競合なので、図7の(1)のパターンに該当し、新たに仮決定されたトランザクション内容を登録するためには、先行トランザクションが登録されてから、バースト長BL(この例では4クロック)分待機する必要がある。
【0107】
なお、先行トランザクション内容が”Write” である場合には、図8のライト動作先行動作パターンに基づいて、SDRAM4へのコマンド発行が可能か否かを判定する。
【0108】
図7および図8において、BLはバースト長(この例では4)を、Tarbは調停−コマンド発行レイテンシ(この例では2)を、Trcdは/RASまたは/CASディレイ(この例では2)を、CLは/CASレイテイシ(この例では2)を、Trecはバスリカバリ時間(この例では1)を、Tdalは[WRITA] 時データ入力−[ACT] 発行間隔(この例では3)を、それぞれ示している。
【0109】
時点T6において、最優先のクライアントを仮決定しても、上述したように、先行トランザクションが登録されてから、バースト長BL(この例では4クロック)分待機する必要があるので、CycleCountがBLとなる時点T8まで待って、新たに仮決定されたトランザクション内容がトランザクションファイル85に登録される。
【0110】
以下、同様な動作が繰り返し行なわれる。
【0111】
時点T14 〜時点T19 についての動作について説明する。
【0112】
時点T14 において調停回路84は調停を再開するが、時点T14 ではFlag10およびFlag20はともに3であり、バースト長(4)より小さいため、調停は行なわれない。時点T15 では、Flag10:Flag20=4:3であるので、DMAコントローラ(DMAC10)21が最優先のクライアントとして仮決定される。
【0113】
時点T15 においては、トランザクションファイル85から出力される信号FileState は、”VALID” 状態であるため、調停回路84は、先行トランザクション内容との関係で、SDRAM4へのコマンド発行が可能か否かを判定する。先行トランザクション内容は”Read”なので、図7のリード動作先行動作パターンに基づいて、SDRAM4へのコマンド発行が可能か否かを判定する。
【0114】
この例では、追従トランザクション内容は”Write” でバンクが非競合なので、図7の(2)のパターンに該当し、新たなトランザクションを登録するためには、先行トランザクションが登録されてから、CL+BL+Trec(この例では7クロック)分待機する必要がある。時点T12 から7 クロック先の時点は、T19 となる。したがって、時点T15 で仮決定されたトランザクション内容は、次の時点T16 において登録されない。
【0115】
最優先クライアントの仮決定は、トランザクションファイルに登録されるまで、毎サイクル毎に行なわれる。
【0116】
時点T16 、T17 においても、Flag10:Flag20=4:3であるので、DMAコントローラ(DMAC10)21が最優先のクライアントとして仮決定されるが、上記と同じ理由で、仮決定されたトランザクション内容は、登録されない。時点T18 においては、Flag10:Flag20=5:4であるので、DMAコントローラ(DMAC10)21が最優先のクライアントとして仮決定される。そして、次の時点時点T19 において、時点T18 で仮決定されたトランザクション内容が登録される。
【0117】
時点T25 〜時点T29 についての動作について説明する。
【0118】
時点T25 においては調停回路84は調停を再開するが、時点T25 ではFlag10およびFlag20はともに3であり、バースト長(4)より小さいため、調停は行なわれない。時点T26 では、Flag10:Flag20=3:4であるため、DMAコントローラ(DMAC20)23が最優先のクライアントとして仮決定される。この場合、図8の(1)のパターンに該当し、新たなトランザクションを登録するためには、先行トランザクションが登録されてから、BL(この例では4クロック)待機する必要があるので、次の時点T27 において新たなトランザクションは登録されない。
【0119】
時点T27 では、Flag10:Flag20=4:4で共に等しいので、予め定められたクライアント、この例ではDMAコントローラ(DMAC10)21が最優先のクライアントとして仮決定される。この場合、図8の(2)のパターンに該当し、新たなトランザクションを登録するためには、先行トランザクションが登録されてから、BL(この例では4)クロック待つ必要があるので、次の時点T28 においては新たなトランザクションは登録されない。
【0120】
時点T28 では、Flag10:Flag20=4:5であるので、DMAコントローラ(DMAC20)23が最優先のクライアントとして、仮決定される。この場合、図7の(1)のパターンに該当し、次の時点T29 で、新たなトランザクションが登録される。
【0121】
バッファ残量フラグidFlagは、sdAck10 によりレイテンシ1をもって1ずつ減少していき、IDACK によりレイテンシ4をもって1ずつ増加していく。ただし、両信号が同時にアサートされた場合には、バッファ残量フラグidFlagは変化しない。同様に、バッファ残量フラグodFlagは、sdAck20 によりレイテンシ1をもって1ずつ減少していき、ODACK によりレイテンシ4をもって1ずつ増加していく。ただし、両信号が同時にアサートされた場合には、バッファ残量フラグodFlagは変化しない。
【0122】
dm10Address は、sdDispath10 がアサートされる毎に4ずつ増加していく。同様に、dm20Address は、sdDispath20 がアサートされる毎に4ずつ増加していく。
【0123】
Cyclecount=3 でかつCTranceType =”READ”において、ReadTrigger がアサートされる。Cyclecount=3 でかつCTranceType =”WRITE” において、WriteTriggerがアサートされる。
【0124】
ストローブ発生回路87は、ReadAck のアサート時に、RRClientに保持されているクライアントに対して、データ転送アクノリッジ信号sdAck20 をアサートする。また、ストローブ発生回路87は、WriteAckアサート時に、WClient に保持されているクライアントに対して、データ転送アクノリッジ信号sdAck10 をアサートする。
【0125】
画像入力I/F(IDIN0)15のデータバッファ40は、sdAck10 のアサート時に、SDRAM I/F(SDRAMIF)14に対してデータを出力する。画像出力I/F(VDOUT)17のデータバッファ60は、sdAck20 のアサート時に、SDRAM I/F(SDRAMIF)14の出力データsdDataを取り込む。
【0126】
コマンド発生回路86は、Cyclecount=1の次のサイクルで、SDRAM4に対して、[ACT] コマンドおよびロウアドレスとしてのCRowを発行する。また、コマンド発生回路86は、Cyclecount=3の次のサイクルで、SDRAM4に対して、[READA]/[ERIRA] コマンド( これらのコマンドはCTransTypeによって切り替えられる) およびカラムアドレスとしてのCColを発行する。
【0127】
上記実施の形態によれば、データ転送レートを保証する必要があるクライアントからのメモリアクセス要求が競合した場合に、データバッファ40、60のバッファ残量に基づいて調停を行なっているため、データ転送レートを保証する必要があるクライアントに対してもデータを途切れなく転送することが可能となる。
【0128】
また、上記実施の形態のように、固定優先順位方式による調停方法とバッファ残量に基づく調停とを組み合わせることにより、クラスタに分けられたクライアント群ごとに優先順位付けを行うことができるとともに、同一クラスタ内の複数のクライアント間では、各クライアントの要求するデータ転送レートに応じてアクセス権を振り分けることができる。
【0129】
また、各クライアントによるメモリアクセスがバーストアクセスによって行なわれる場合には、各クライアントによって生成されたバッファ残量をバースト内転送量によって補正した後のバッファ残量に基づいて、アクセス権の調停を行なっているため、SDRAM等のメモリに見られるメモリアクセスレイテンシを隠蔽し、連続してデータ転送を行なうことが可能となる。
【0130】
さらに、次に処理すべきトランザクションを仮決定し、仮決定したトランザクションが次のサイクルにおいて処理可能か否かを、調停後のサイクル数、仮決定したトランザクション処理内容および先行トランザクションの処理内容とに基づいて判定しているので、メモリアクセスの効率化を図ることができる。
【0131】
【発明の効果】
この発明によれば、データ転送レートを保証する必要がある特定のクライアントに対して、データ転送レートを保証することができるメモリアクセス調停方法が実現する。
【図面の簡単な説明】
【図1】デジタル複写機のメモリ制御回路1およびその周辺回路の構成を示すブロック図である。
【図2】メモリ制御回路1の構成を示すブロック図である。
【図3】画像入力I/F(IDIN0 )15に内蔵されているデータバッファおよびその周辺回路の構成を示すブロック図である。
【図4】画像出力I/F(VDOUT0)17に内蔵されているデータバッファおよびその周辺回路の構成を示すブロック図である。
【図5】SDRAM I/ F(SDRAMIF) 14の構成を示すブロック図である。
【図6】DMAコントローラ(DMAC10)21と、DMAコントローラ(DMAC20)23との2つのクライアントの間でアクセス要求が競合した場合の調停方法を説明するためのタイムチャートである。
【図7】リード動作先行動作パターンを示すタイムチャートである。
【図8】ライト動作先行動作パターンを示すタイムチャートである。
【符号の説明】
1 メモリ制御回路
4 SDRAM
5 CPU
14 SDRAM I/ F(SDRAMIF)
15 画像入力I/F(IDIN0 )
17 画像出力I/F(VDOUT0)
21 DMAコントローラ(DMAC10)
23 DMAコントローラ(DMAC20)
40、60 データバッファ[0001]
[Industrial application fields]
The present invention relates to a memory access arbitration method in a digital copying machine or the like.
[0002]
[Prior art]
As an arbitration method for memory access requests from a plurality of memory access request sources (hereinafter referred to as clients), there are (1) an arbitration method using a fixed priority and (2) an arbitration method using a round robin method.
[0003]
The arbitration method using the fixed priority method and the arbitration method using the round robin method both give priority to the memory access request from the client having a high priority when the memory access request conflicts. In the arbitration method, the priority is fixed, but in the round-robin arbitration method, when a client is selected by arbitration, the priority of the client is moved to the lowest level, and accordingly, when the client is arbitrated. The two clients are different in that the priority of other clients that are lower than the priority is raised.
[0004]
In the case of a system in which there are a large number of clients and it is necessary to guarantee the data transfer rate such as image input from the scanner, image output to the LSU (laser scan unit), etc. In the arbitration method using the fixed priority method or the round robin method, there is a high risk that the data transfer rate cannot be guaranteed for a specific client.
[0005]
In other words, in the arbitration method using the fixed priority method, even if the priority order for a plurality of clients whose data transfer rates are to be guaranteed is set higher, one of the clients whose data transfer rates are to be guaranteed is internally set to FIFO or the like. In the case of having a buffer, until the buffer is filled with data, the memory access of other clients that should guarantee the data transfer rate may be hindered.
[0006]
In addition, in the arbitration method using the round robin method, if the bandwidth of the memory (capacity of the transfer rate possessed by the memory) is not very large with respect to the sum of the data transfer rates requested by the client that should guarantee the data transfer rate, When the priority of a client that does not need to guarantee the data transfer rate is raised to a higher priority, memory bandwidth is consumed, and sufficient memory bandwidth cannot be secured for the client that should guarantee the data transfer rate. There is.
[0007]
[Problems to be solved by the invention]
An object of the present invention is to provide a memory access arbitration method capable of guaranteeing a data transfer rate for a specific client that needs to guarantee the data transfer rate.
[0008]
[Means for Solving the Problems]
The memory access arbitration method according to the present invention is generated by each client and provided in each client when a memory access request from a plurality of clients that need to guarantee the data transfer rate competes. A step of tentatively determining the next transaction to be processed based on the remaining amount of the buffer indicating the data accumulation status in the data buffer, and whether or not the tentatively determined transaction can be processed in the next predetermined period Transaction processing contents , Processing contents of the preceding transaction And the elapsed time from the start of the preceding transaction processing If it is determined that the transaction that is tentatively determined and the tentatively determined transaction can be processed in the next predetermined period, the tentatively determined transaction is started from the next predetermined period. In the case where it is determined that processing is not possible in the next predetermined period, there is provided a step of tentatively determining the next transaction to be processed based on the remaining buffer capacity generated by each client in the next predetermined period It is characterized by.
[0011]
When memory access by each client is performed by burst access, the tentative determination of the next transaction to be processed is based on the buffer remaining amount after the buffer remaining amount generated by each client is corrected by the intra-burst transfer amount. It is done.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0013]
[1] Explanation of configuration of peripheral circuit of memory control circuit of digital copying machine
[0014]
FIG. 1 shows the configuration of a memory control circuit and its peripheral circuits of a digital copying machine.
[0015]
An image input / output I /
[0016]
[2] Description of the configuration of the memory control circuit of the digital copying machine
[0017]
FIG. 2 shows the configuration of the
[0018]
The
[0019]
In this embodiment, a memory for storing image data input to an image input I / F (IDIN0) 15 from a scanner (not shown) in the
[0020]
[3] Description of the configuration of the data buffer built in the image input I / F (IDIN0) 15 and its peripheral circuits
[0021]
FIG. 3 shows a configuration of a data buffer built in the image input I / F (IDIN0) 15 and its peripheral circuits.
[0022]
The image input I / F (IDIN0) 15 includes a
[0023]
The
[0024]
The
[0025]
The store control
[0026]
The
[0027]
Each of the word buffer
[0028]
The
[0029]
The
[0030]
The load control signal and selection
[0031]
The second decoder 58b decodes the count value of the second counter 58a and generates 15 decoded signals. The load control signal and selection control
[0032]
Each of the word buffer
[0033]
The load control signal and selection
[0034]
[4] Description of the configuration of the data buffer built in the image output I / F (VDOUT0) 17 and its peripheral circuits
[0035]
FIG. 4 shows the configuration of the data buffer built in the image output I / F (VDOUT0) 17 and its peripheral circuits.
[0036]
The image output I / F (VDOUT0) 17 includes a
[0037]
The
[0038]
The
[0039]
The store control
[0040]
The
[0041]
Each of the word buffer
[0042]
The
[0043]
The
[0044]
The load control signal and selection control
[0045]
The
[0046]
Each of the word buffer
[0047]
The load control signal and selection control
[0048]
[5] Explanation of configuration of SDRAM I / F (SDRAMIF) 14
[0049]
FIG. 5 shows the configuration of the SDRAM I / F (SDRAMIF) 14.
[0050]
The SDRAM I / F (SDRAMIF) 14 has an I / F with each of the DMA controllers 21 to 33 and each of the I / Fs 11 to 13 and 15 to 18 in FIG. 2. Only the I / F of the controller (DMAC 10) 21, the DMA controller (DMAC 20) 23, the image input I / F (IDIN0) 15, the image output I / F (VDOUT0) 17 and the CPU I / F (CPUIF) 13 is illustrated. ing.
[0051]
In FIG. 5, a DMAC 10 I /
[0052]
The SDRAM I / F (SDRAMIF) 14 includes an
[0053]
The DMAC 10 I /
[0054]
The DMAC 20 I /
[0055]
The CPUIF I /
[0056]
The
[0057]
The main input / output signals of each part will be described below.
[0058]
(1) Input / output signals of the DMAC10 I / F81, the DMAC20 I / F82, and the CPUIF I / F83.
Dm10Req, dm20Req, cpuSdramReq: Transaction processing request to SDRAM4.
IdFlag: a flag indicating the remaining buffer capacity of the image input I / F (IDIN0).
OdFlag: a flag indicating the remaining buffer capacity of the image output I / F (VDOUT0).
CpuDir: a signal that indicates the direction (read / write) of data transfer.
Dm10Address, dm20Address: DMA address.
[0059]
SdDispatch10, sdDispatch20: Signals indicating that transaction processing has been accepted by the SDRAM I / F (SDRAMIF) 14. The DMAC 10 I /
[0060]
SdAck10, sdAck20: Data transfer acknowledge signals from the SDRAM I / F (SDRAMIF) 14. The DMAC 10 I /
[0061]
(2) Output signal of
Register: A control signal for registering the transaction processing assigned by the
Client: A code indicating a client (DMA controller (DMAC 10) 21, DMA controller (DMAC 20) 23,..., CPU IF (CPUIF) 13) that is provisionally determined by the
[0062]
Bank, Row, Col: Address obtained by decomposing the address sent from the top priority client into a bank number, a row address, and a column address.
TransType: a code (READ, WRITE) indicating the transaction processing content of the top priority client.
SdDispatch10, sdDispatch20, sdDispatchCpu: Signals indicating that the transaction processing request by the corresponding client has been accepted by the
[0063]
(3) Output signal of
[0064]
FileState: A signal indicating whether the contents of the
CTtransType: a code (READ, WRITE) indicating the transaction processing content currently registered.
CC client: a code representing the request source of the currently registered transaction process.
[0065]
CBank, CRow, CCol: addresses obtained by decomposing the target addresses of transaction processing currently registered into bank numbers, row addresses, and column addresses.
CycleCount: a signal indicating a counter value of a counter that counts the number of cycles since the transaction processing is registered in the
[0066]
(4) Output signal of
ReadTrigger: A trigger signal for designating read data timing to the
WriteTrigger: a trigger signal that specifies the timing of write data for the
• / CS, / RAS, / CAS, / WE, BA, MA: SDRAM control signal.
[0067]
(5) Output signal of
SdAck10, 20: Data transfer acknowledge signal.
SdData: read data from the
MD: SDRAMIF data bus.
[0068]
[6] Explanation of access arbitration method
[0069]
Examples of accessing the
(1) Transaction processing request from each DMA controller 21-33
(2) Transaction processing request from CPU I / F (CPUIF) 13 (CPU access)
[0070]
The SDRAM I / F (SDRAMIF) 14 arbitrates these access requests according to the priority order, and gives an access right to the one with the highest priority order. The priority order is fixed for each client. The priority order is determined in advance as follows.
[0071]
DMAC10, DMAC11, DMAC20, DMAC21> CPU access>DMAC7> DMAC30, DMAC6> DMAC40, DMAC5>DMAC31>DMAC41>DMAC8> DMAC9
[0072]
Items separated by commas have the same priority.
[0073]
When access requests with the same priority compete, the SDRAM I / F (SDRAMIF) 14 performs arbitration based on the remaining buffer flag of the client. However, for a client that does not have a buffer, the remaining buffer capacity is regarded as a specific value.
[0074]
When a transaction processing request is subsequently generated from the transaction processing request source client currently being processed, arbitration is performed based on the buffer remaining amount minus the burst length (4 in this example). Even when the SDRAM I / F (SDRAMIF) 14 receives an access request, if the remaining buffer capacity of the requesting client does not reach the burst length, the SDRAM I / F (SDRAMIF) 14 excludes the access request from the arbitration target.
[0075]
The SDRAM I / F (SDRAMIF) 14 provisionally determines a transaction candidate to be processed next every cycle in accordance with the above procedure. Further, it is checked whether or not the tentatively determined transaction can be processed in the next cycle, and if it can be processed, the processing of the tentatively determined transaction is actually started from the next cycle (command issuance to the SDRAM 4).
[0076]
Whether the tentatively determined transaction can be processed in the next cycle is determined based on the processing content of the preceding transaction, the processing content of the tentatively determined transaction, and the elapsed time from the start of the preceding transaction processing.
[0077]
[7] Explanation of specific example of access arbitration method
[0078]
Hereinafter, based on FIG. 6, an arbitration method in the case where access requests conflict between two clients, the DMA controller (DMAC 10) 21 and the DMA controller (DMAC 20) 23, will be described in detail.
[0079]
[7-1] Explanation of block internal signals
[0080]
First, the block internal signals shown in FIG. 6 will be described.
[0081]
FlagAdj20: Buffer remaining amount flag correction value for correcting the buffer remaining amount flag odFlag. The initial value of the correction value is 0, and the burst length (4 in this example) is added every time the signal sdDispatch20 indicating that the transaction processing request from the DMA controller (DMAC 20) 23 has been accepted is added, and the data transfer acknowledge signal While sdAck20 is asserted, 1 is subtracted. However, the minimum value of FlagAdj20 is 0.
[0082]
FlagAdj10: Buffer remaining amount flag correction value for correcting the buffer remaining amount flag idFlag. The initial value of the correction value is 0, and the burst length (“4” in this example) is added each time the signal sdDispatch10 indicating that a transaction processing request from the DMA controller (DMAC10) 21 has been accepted is added, and data transfer is performed. During the period when the acknowledge signal sdAck10 is asserted, 1 is subtracted. However, the minimum value of FlagAdj10 is 0.
[0083]
RCclient: A signal obtained by latching the code CCclient indicating the currently registered transaction processing request source on condition that the signal ReadTrigger indicating the read data timing is asserted.
ReadTrigger_ssss: A signal obtained by delaying ReadTrigger by delaying four clocks of the system clock SCK.
[0084]
ReadAck: A one-shot signal with a width of 4 clock cycles that operates using ReadTrigger_sss as a trigger.
WriteAck: A one-shot signal with a width of 4 clock cycles that operates with WriteTrigger as a trigger.
[0085]
RRCclient: A signal obtained by latching RCclient on condition that ReadTrigger_sss is asserted.
WClient: A signal obtained by latching CCClient on condition that WriteTrigger is asserted.
[0086]
[7-2] Description of preconditions of the specific example of FIG.
[0087]
The preconditions of the specific example of FIG. 6 are as follows.
[0088]
(1) It is assumed that only the DMA controller (DMAC 10) 21 and the DMA controller (DMAC 20) 23 are clients that access the
[0089]
(2) The operation clock (WCK) of the image input I / F (IDIN0) 15, the operation clock of the image output I / F (VDOUT0) 17 and the system clock (SCK) are all the same clock (same frequency). .
[0090]
(3) The image input I / F (IDIN0) 15 writes data to the
[0091]
(4) The transfer start address set in the DMA controller (DMAC 10) 21 is Am, and the transfer start address set in the DMA controller (DMAC 20) 23 is An. In both Am and An, the lower 4 bits are set to “0” so as to start from the burst boundary and
[0092]
(5) The DMA address (dm10Address, dm20Address) indicates an address in units of words. Therefore, the DMA address is incremented by burst length (4) every time arbitration is performed once.
[0093]
[7-3] Explanation of timing chart of FIG.
[0094]
At time T1, the DMA controller (DMAC 10) 21 and the DMA controller (DMAC 20) 23 are activated (dm10Req, dm20Req asserted). At time T1, the image input I / F (IDIN0) 15 is activated, and at time T4, the image output I / F (VOUT0) 17 is activated.
[0095]
At the start time T1 of the image input I / F (IDIN0) 15, since the
[0096]
The buffer remaining amount correction value FlagAdj10 is 0 at the activation time T1 of the image input I / F (IDIN0) 15, and the buffer remaining amount correction value FlagAdj20 is 0 at the activation time T4 of the image output I / F (VDOUT0) 17. It is. Therefore, Flag10 (idFlag-FlagAdj10) output from the DMAC10 I / F81 becomes 0 at the start time T1 of the image input I / F (IDIN0) 15, and Flag20 (odFlag-FlagAdj20) output from the DMAC20 I /
[0097]
The
[0098]
Immediately after activation of the image input I / F (IDIN0) 15 and the image output I / F (VDOUT0) 17, Flag10: Flag20 = 0: 15, so that the DMA controller (DMAC20) 23 is provisionally determined as the highest priority client. Is done. That is, at the time T4, the signal Client output from the
[0099]
At time T4, since the signal FileState output from the
[0100]
When registering the transaction contents in the
[0101]
In the following description, dm10Address and dm20Address are collectively referred to as dm # Address. The row address (Row) is decomposed and generated from dm # Address by a function of FC (dm # Address) = {dm # Address [12: 6], dm # Address [3: 2]}. The column address (Col) is decomposed and generated from dm # Address by a function of FR (dm # Address) = dm # Address [24:13].
[0102]
At time T4, the
[0103]
At time T5, the
[0104]
When
[0105]
At time T6, since the signal FileState output from the
[0106]
In this example, since the following transaction content is also “Read” and the bank is not competing, it corresponds to the pattern of (1) in FIG. 7, and in order to register the newly provisionally determined transaction content, the preceding transaction is registered. After that, it is necessary to wait for the burst length BL (4 clocks in this example).
[0107]
If the preceding transaction content is “Write”, it is determined whether or not a command can be issued to the
[0108]
7 and 8, BL is the burst length (4 in this example), Tarb is arbitration-command issue latency (2 in this example), Trcd is / RAS or / CAS delay (2 in this example), CL indicates / CAS latency (2 in this example), Trec indicates the bus recovery time (1 in this example), Tdal indicates the data input during [WRITE]-[ACT] issuance interval (3 in this example). ing.
[0109]
Even if the highest priority client is provisionally determined at time T6, it is necessary to wait for the burst length BL (4 clocks in this example) after the preceding transaction is registered, as described above. After waiting until a certain time T8, the newly provisionally determined transaction content is registered in the
[0110]
Thereafter, the same operation is repeated.
[0111]
The operation from time T14 to time T19 will be described.
[0112]
The
[0113]
At time T15, since the signal FileState output from the
[0114]
In this example, since the follow-up transaction content is “Write” and the bank is not competing, it corresponds to the pattern of (2) in FIG. 7, and in order to register a new transaction, CL + BL + Trec ( In this example, it is necessary to wait for 7 clocks). The time point 7 clocks after the time point T12 is T19. Accordingly, the transaction content provisionally determined at time T15 is not registered at the next time T16.
[0115]
The tentative determination of the highest priority client is performed every cycle until it is registered in the transaction file.
[0116]
At time points T16 and T17, Flag10: Flag20 = 4: 3, so the DMA controller (DMAC10) 21 is provisionally determined as the highest priority client. For the same reason as described above, the provisionally determined transaction content is Not registered. At time T18, Flag10: Flag20 = 5: 4, so the DMA controller (DMAC 10) 21 is provisionally determined as the highest priority client. Then, at the next time point T19, the transaction contents provisionally determined at the time point T18 are registered.
[0117]
The operation from time T25 to time T29 will be described.
[0118]
At time T25, the
[0119]
At time T27, Flag10: Flag20 = 4: 4, which are equal to each other, a predetermined client, in this example, the DMA controller (DMAC 10) 21 is provisionally determined as the highest priority client. In this case, it corresponds to the pattern of (2) in FIG. 8, and in order to register a new transaction, it is necessary to wait for BL (4 in this example) clock after the preceding transaction is registered. No new transaction is registered at T28.
[0120]
At time T28, Flag10: Flag20 = 4: 5, so the DMA controller (DMAC 20) 23 is provisionally determined as the highest priority client. In this case, it corresponds to the pattern of (1) in FIG. 7, and a new transaction is registered at the next time point T29.
[0121]
The remaining buffer flag idFlag is decreased by 1 with a latency of 1 due to sdAck10, and increased by 1 with a latency of 4 due to IDACK. However, when both signals are asserted simultaneously, the buffer remaining amount flag idFlag does not change. Similarly, the buffer remaining amount flag odFlag decreases by 1 with a latency of 1 due to sdAck20, and increases by 1 with a latency of 4 by ODACK. However, when both signals are asserted at the same time, the buffer remaining amount flag odFlag does not change.
[0122]
dm10Address increases by 4 each time sdDispath10 is asserted. Similarly, dm20Address increases by 4 each time sdDispath20 is asserted.
[0123]
ReadCycler is asserted when Cyclecount = 3 and CTransanceType = "READ". WriteTrigger is asserted when Cyclecount = 3 and CTransityType = "WRITE".
[0124]
The
[0125]
The
[0126]
The
[0127]
According to the above embodiment, when a memory access request from a client that needs to guarantee the data transfer rate competes, arbitration is performed based on the remaining buffer capacity of the data buffers 40 and 60. Data can be transferred without interruption even to clients that need to guarantee the rate.
[0128]
In addition, as in the above embodiment, by combining the arbitration method based on the fixed priority method and the arbitration based on the remaining buffer capacity, prioritization can be performed for each client group divided into clusters. Access rights can be distributed among a plurality of clients in a cluster according to the data transfer rate requested by each client.
[0129]
Also, when memory access by each client is performed by burst access, the access right is arbitrated based on the remaining buffer amount after the remaining buffer amount generated by each client is corrected by the intra-burst transfer amount. Therefore, it is possible to conceal the memory access latency found in a memory such as an SDRAM and perform data transfer continuously.
[0130]
Further, the next transaction to be processed is provisionally determined, and whether or not the provisionally determined transaction can be processed in the next cycle is determined based on the number of cycles after arbitration, the provisionally determined transaction processing content, and the processing content of the preceding transaction. This makes it possible to improve the efficiency of memory access.
[0131]
【The invention's effect】
According to the present invention, a memory access arbitration method that can guarantee a data transfer rate for a specific client that needs to guarantee the data transfer rate is realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing the configuration of a
2 is a block diagram showing a configuration of a
FIG. 3 is a block diagram showing the configuration of a data buffer built in the image input I / F (IDIN0) 15 and its peripheral circuits.
FIG. 4 is a block diagram showing the configuration of a data buffer built in the image output I / F (VDOUT0) 17 and its peripheral circuits.
FIG. 5 is a block diagram showing a configuration of an SDRAM I / F (SDRAMIF) 14;
FIG. 6 is a time chart for explaining an arbitration method when access requests compete between two clients of the DMA controller (DMAC 10) 21 and the DMA controller (DMAC 20) 23;
FIG. 7 is a time chart showing a read operation preceding operation pattern.
FIG. 8 is a time chart showing a write operation preceding operation pattern.
[Explanation of symbols]
1 Memory control circuit
4 SDRAM
5 CPU
14 SDRAM I / F (SDRAMIF)
15 Image input I / F (IDIN0)
17 Image output I / F (VDOUT0)
21 DMA controller (DMAC10)
23 DMA controller (DMAC20)
40, 60 data buffer
Claims (2)
仮決定したトランザクションが次の所定期間において処理可能か否かを、仮決定したトランザクション処理内容、先行トランザクションの処理内容、及び、先行するトランザクション処理開始からの経過時間に基づいてチェックするステップ、ならびに
仮決定したトランザクションが次の所定期間で処理可能であると判定した場合には、その仮決定したトランザクションの処理を次の所定期間から開始し、仮決定したトランザクションが次の所定期間で処理可能ではないと判定した場合には、次の所定期間において、各クライアントによって生成されたバッファ残量に基づいて次に処理すべきトランザクションを仮決定するステップ、
を備えているメモリアクセス調停方法。When memory access requests from multiple clients that need to guarantee the data transfer rate compete, the status of data storage in the data buffer generated by each client and provided in each client every predetermined period Tentatively determining the next transaction to be processed based on the remaining buffer capacity indicating
A step of checking whether or not the tentatively determined transaction can be processed in the next predetermined period based on the tentatively determined transaction processing content , the processing content of the preceding transaction , and the elapsed time from the start of the preceding transaction processing; If it is determined that the determined transaction can be processed in the next predetermined period, processing of the provisionally determined transaction is started from the next predetermined period, and the provisionally determined transaction cannot be processed in the next predetermined period. If it is determined that, in the next predetermined period, a step of tentatively determining the next transaction to be processed based on the remaining buffer capacity generated by each client;
A memory access arbitration method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000325189A JP3615478B2 (en) | 2000-10-25 | 2000-10-25 | Memory access arbitration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000325189A JP3615478B2 (en) | 2000-10-25 | 2000-10-25 | Memory access arbitration method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002132707A JP2002132707A (en) | 2002-05-10 |
JP3615478B2 true JP3615478B2 (en) | 2005-02-02 |
Family
ID=18802596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000325189A Expired - Fee Related JP3615478B2 (en) | 2000-10-25 | 2000-10-25 | Memory access arbitration method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3615478B2 (en) |
Families Citing this family (5)
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 |
JP4847036B2 (en) * | 2005-03-30 | 2011-12-28 | キヤノン株式会社 | Control device for arbitrating bus access and control method for data processing device |
JP5104402B2 (en) * | 2008-02-29 | 2012-12-19 | 横河電機株式会社 | Memory access control device |
JP2010272029A (en) * | 2009-05-22 | 2010-12-02 | Sanyo Electric Co Ltd | Access control circuit |
JP6180397B2 (en) * | 2014-10-28 | 2017-08-16 | 京セラドキュメントソリューションズ株式会社 | Memory access device and memory access control method |
-
2000
- 2000-10-25 JP JP2000325189A patent/JP3615478B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002132707A (en) | 2002-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4786209B2 (en) | Memory access device | |
US7707328B2 (en) | Memory access control circuit | |
JP3898899B2 (en) | Bus system | |
US6104417A (en) | Unified memory computer architecture with dynamic graphics memory allocation | |
US6272609B1 (en) | Pipelined memory controller | |
JP4737438B2 (en) | Information processing apparatus that shares resources among multiple processing units | |
US7363406B2 (en) | Dynamic access scheduling memory controller | |
US20120239873A1 (en) | Memory access system and method for optimizing SDRAM bandwidth | |
JP6053384B2 (en) | Information processing apparatus, memory control apparatus, and control method thereof | |
JP2006146965A (en) | Method for arbitrating among pending requests | |
US8171222B2 (en) | Memory access system, memory control apparatus, memory control method and program | |
US20060059320A1 (en) | Memory control device | |
JP2003114825A (en) | Memory control method, memory control circuit using the control method, and integrated circuit loaded with the memory control circuit | |
US20050182908A1 (en) | Method and apparatus of interleaving memory bank in multi-layer bus system | |
JP3615478B2 (en) | Memory access arbitration method | |
JP2001134542A (en) | Array of processors sharing collective memory | |
JP2007018222A (en) | Memory access control circuit | |
JPH06110829A (en) | Bus use request arbiter | |
JP2004295322A (en) | Memory access controller | |
JP4054598B2 (en) | Memory control circuit, DMA request block, and memory access system | |
US8452920B1 (en) | System and method for controlling a dynamic random access memory | |
JP2004013618A (en) | Access controller for synchronous semiconductor storage device | |
JP2011034214A (en) | Memory controller | |
JP4108237B2 (en) | Memory control device | |
JPH09282221A (en) | Main memory controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040302 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040309 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040428 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040810 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041005 |
|
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: 20041026 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041029 |
|
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: 20071112 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081112 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |