JP4094347B2 - Data transfer device - Google Patents

Data transfer device Download PDF

Info

Publication number
JP4094347B2
JP4094347B2 JP2002172797A JP2002172797A JP4094347B2 JP 4094347 B2 JP4094347 B2 JP 4094347B2 JP 2002172797 A JP2002172797 A JP 2002172797A JP 2002172797 A JP2002172797 A JP 2002172797A JP 4094347 B2 JP4094347 B2 JP 4094347B2
Authority
JP
Japan
Prior art keywords
transfer
data
register
data transfer
transfer information
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
JP2002172797A
Other languages
Japanese (ja)
Other versions
JP2004021401A (en
Inventor
祐次 緒方
直幹 三ッ石
敦 廣瀬
剛史 黒岩
裕道 石倉
淳二 石川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2002172797A priority Critical patent/JP4094347B2/en
Publication of JP2004021401A publication Critical patent/JP2004021401A/en
Application granted granted Critical
Publication of JP4094347B2 publication Critical patent/JP4094347B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、データ転送装置に係り、特に、複数の周辺処理装置から多数の割込み要求が発生し、その割込み要求によってデータ転送を行う場合、割込み要因毎の転送情報をメモリから読み込み、データ転送を行い、更新した転送情報をメモリに書き戻す手段を備えたデータ転送装置で、かつデータ転送サイクル数の低減を可能にする手段を備えたデータ転送処理装置に関する。
【0002】
【従来の技術】
従来のデータ転送装置にあっては、特開平1−125644号において多数のデータ転送要求がある場合でも、少ないハードウエアでデータ転送を行うことができるデータ転送装置(DTC:データトランスファコントローラ)が公知である。この従来例においては、少ないハードウエアでデータ転送を実現することが主題であり、データ転送のサイクル数を低減させるためのハードウエアについての配慮はなく、本来必要でないデータ転送のサイクルも行う設計になっていた。
【0003】
近年、プリンタ機器などに搭載されるインターフェースの高速化が著しく、データ転送装置においてはデータ転送のサイクル数を低減する必要があった。
【0004】
特開平1−125644号で提案された従来のデータ転送装置にあっては、今回転送しようとする転送要因が前回のものと同一であっても、前回用いた転送情報を利用することなく、今回のデータ転送情報を改めて始めから取得する構成となっている。そのため、データ転送の高速化といった面で、本来必要のない時間を費やすという問題に着目して、転送しようとするデータの転送要因が前回と今回とで同じ場合には、前回用いた既知の転送情報を再利用することによりデータ転送の高速化を図るように工夫されたデータ転送装置が特開2001−160025号で提案されている。
【0005】
【発明が解決しようとする課題】
これらの従来のデータ転送装置にあっては、データ転送前とデータ転送後の転送元アドレスおよび転送先アドレスの値が同一であっても、転送情報の書き戻しを行う構成となっているため、本来必要のない時間を費やすという問題があった。
【0006】
本発明の目的は、データ転送前とデータ転送後の転送元アドレスおよび転送先アドレスの値が同一であった場合には、同一であったアドレスの書き戻しを実行しないことによりデータ転送の高速化を図ることができるデータ転送装置を提供することである。
【0007】
【課題を解決するための手段】
データ転送要因毎の転送情報先頭アドレスを保持する転送情報先頭アドレスレジスタと、前記転送情報先頭アドレスの位置に格納された転送情報を保持する転送情報レジスタと、前記転送情報レジスタの値を演算する演算回路と、前記演算回路を制御する演算量判定手段と、転送データを保持するデータレジスタと、マイコンの内部バスとのインターフェースを制御する内部バス制御手段とを有し、前記演算量判定結果を用いてデータ転送後のアドレスを書き戻すか否かを判定し、書き戻す必要のないときは転送情報レジスタの転送元アドレスおよび転送先アドレスをメモリに書き戻すサイクルを行わない。
【0008】
このような構成としたことにより、転送情報レジスタの転送元アドレスおよび転送先アドレスがデータ転送前とデータ転送後で同一の場合に、転送情報書き戻しサイクル数を減らすことができるので、データ転送の高速化を図ることができる。
【0009】
【発明の実施の形態】
以下、本発明の実施例について、図面を参照して説明する。
【0010】
本発明のデータ転送装置(DTC)1の実施例を示す図1を説明する前に、まず、図2に示すシングルチップマイコン500の構成図を参照して、本発明のデータ転送装置1と他のシングルチップマイコン500の構成要素との関係を簡単に説明する。
【0011】
シングルチップマイコン500は、内部バス510に接続された中央処理装置(CPU)501と、ダイレクトメモリアクセスコントローラ(DMAC)502と、データ転送装置(DTC)1と、ランダムアクセスメモリ(RAM)504と、リードオンリメモリ(ROM)505と、周辺バス520に接続されたシリアルデータ転送装置(SCI)506と、タイマコントローラ(TMU)507と、割込み制御装置(INT)2と、バスコントローラ(BSC)503とから構成される。バスコントローラ503を介して外部メモリバス530が接続される。
【0012】
割込み制御装置2は、シリアルデータ転送装置506からの割込み信号、タイマコントローラ507からの割込み信号およびマイコン外部からの複数の外部割込み信号等の割込み信号L50を受けて、中央処理装置501、ダイレクトメモリアクセスコントローラ502およびデータ転送装置1のいずれかに転送要求を出力する。割り込み信号L50による処理が終了したときには割込みをクリアする信号である割込みクリア信号L51を、シリアルデータ転送装置506、タイマコントローラ507およびマイコン外部のそれぞれの割込み信号に対応して出力する。バスコントローラ503は、中央処理装置501、ダイレクトメモリアクセスコントローラ502およびデータ転送装置1からのバスリクエスト信号L52を受けて内部バス510の占有に対する調停をして、バス使用許可信号L53を出力する。
【0013】
図7は本発明の一実施例の割込み制御装置を説明するブロック図である。この構成ブロック図を参照して、周辺デバイスおよび外部デバイスと接続される複数の割込み信号(割込み信号(1)〜割込み信号(n))を受けてデータ転送装置1の起動制御を行う例を説明する。割込み制御装置(INT)2は、割込み信号(割込み信号(1)〜割込み信号(n))が複数与えられた場合に、これらの優先順位を判定する判定回路(INT_SEL)20と、その割込み信号に対応する割込みベクタ番号(DTC_VEC)を発生する割込みベクタ番号生成回路(VEC)22と、その割込み信号に対応したデータ転送要求を出力するか否かを判定して、これに対応したデータ転送要求信号(DTC_REQ)を発生するデータ転送要求信号生成回路(REQ_LOGIC)24と、さらに、割込み信号が与えられる毎に割込みベクタ番号を保持するベクタ番号保持回路(VEC_FF)23と、次の割込み信号が与えられたときに、先に保持したベクタ番号と比較するベクタ番号比較回路(CMP)25を有し、前回と割込みベクタ番号が一致した場合にデータ転送装置1(DTC)に対して転送情報リード抑止信号(DTC_SKIP)を発生する。データ転送装置1がデータ転送要求信号に対応した転送が終了したときに発生する割込みクリア信号(DTC_CLR)を受け、割込みをクリアする割込みクリア信号(クリア信号(1)〜クリア信号(n))を発生する割込みクリア回路21(CLR_LOGIC)を有する。割込みクリア回路21の発生する信号は図2における割込みクリア信号L51である。さらに、本実施例では、CPUにより制御可能な割込みベクタ番号の比較を抑止する比較抑止信号CSSがあり、ベクタ番号比較回路25は比較を行うか否かを選択することが可能である。このような構成にすることにより、前回起動の後にベクタテーブルおよび転送情報を更新した場合に、今回の起動において更新したベクタテーブルおよび転送情報を読み込むことが可能になる。
【0014】
次に、図1を参照してデータ転送装置1について説明する。データ転送装置1はデータ転送装置制御回路(DTC_CTL)10を備え、データ転送装置制御回路10は以下のシーケンシャルな制御を行う。割込み制御装置2からデータ転送要求信号DTC_REQが与えられた場合に、割込みベクタ番号DTC_VECに従って転送情報先頭アドレス配置領域(ADR_AREA)3に格納された転送情報の先頭アドレスをバスインタフェース回路(BUS_IF)16を介して転送情報先頭アドレスレジスタ(ADR_REG)15に読み込む。次に、この先頭アドレスに従って転送情報配置領域(INFO_AREA)4に格納された転送情報の値をバスインタフェース回路16を介して転送情報レジスタ回路(INFO_REG)12に読み込む。転送情報レジスタ回路12は、動作モードを示すモードレジスタ(MR_REG)12A、転送元のアドレスを示す転送元アドレスレジスタ(SA_REG)12B、転送先のアドレスを示す転送先アドレスレジスタ(DA_REG)12Cおよび転送回数を示す転送回数レジスタ(CR_REG)12Dから構成され、転送元アドレスレジスタ12Bに示されるアドレスの位置から、転送データ配置領域(DT_AREA)5にある転送データを、転送データレジスタ(DT_REG)14に読みこむ。
【0015】
次に、転送先アドレスレジスタ12Cに示されるアドレスの位置に転送データを転送データレジスタ14から読み出す。次に、転送元アドレス12Bと転送先アドレス12Cは、モードレジスタ12Aに示されるデータ転送サイズを受けて演算量を制御する演算量判定回路11の結果に従って演算される。転送回数を示す転送回数レジスタ12Dの転送回数データは、データ転送回数分減算される。最後に、モードレジスタ12A、転送元アドレスレジスタ12B、転送先アドレス12Cおよび転送回数レジスタ12Dで構成される転送情報レジスタ12内の各レジスタの値を、バスインタフェース回路16を介して、転送情報配置領域(INFO−AREA)4の転送情報先頭アドレスレジスタ15で示される位置に書き戻す。この際、演算量判定回路11の結果に従い、転送前と転送後で、転送元アドレス不変のとき転送元アドレスレジスタ12Bの値を、転送先アドレス不変のとき転送先アドレスレジスタ12Cの値を書き戻すサイクルをスキップする。ここで、ADRBはアドレスバス、DATBはデータバスである。転送情報演算回路(ADD)13については後述する。
【0016】
図3は本発明の一実施例の転送情報先頭アドレス配置領域と転送情報配置領域の関係を説明する図である。データ転送要因毎の、転送情報先頭アドレス配置領域(ADR_AREA)3に格納された転送情報先頭アドレス(1)101,転送情報先頭アドレス(2)102,転送情報先頭アドレス(3)103,---と、転送情報配置領域(INFO_AREA)4に格納された転送情報(1),転送情報(2),転送情報(3),---の配置例を示す。ここでは、転送情報先頭アドレスおよび転送情報はいずれも4バイトが割り当てられている例を示す。
【0017】
各転送情報先頭アドレスは、複数のデータ転送要因毎に配置され、割込み要因毎に割り当てられた割込みベクタ番号DTC_VECに従ってデータ転送装置1に読み込む。その先頭アドレスの示す位置を先頭に転送情報が配置される。
【0018】
各転送情報は各転送情報先頭アドレスに対応して、モードレジスタA(MRA)の領域201A,202A,203A---と、モードレジスタB(MRB)の領域201B,202B,203B---と、転送元アドレスSAを指定する領域201C,202C,203C---と、転送先アドレスDAを指定する領域201D,202D,203D---と、転送回数レジスタCRAを指定する領域201E,202E,203E---と、転送回数レジスタCRBを指定する領域201F,202F,203F---とで構成されている。
【0019】
本実施例では1データ転送要因毎の先頭アドレスのサイズを4バイト有しているが、必要に応じてサイズを減らすことでメモリ使用量を減らすことができ、サイズを増やすことで広い配置領域に転送情報を配置することができる。また、本実施例では1転送要因の転送情報の配置は12バイト有しているが、必要に応じてサイズを減らすことでメモリ使用量を減らすことができ、サイズを増やすことでデータ転送のモードとアドレス、および、転送回数を拡張することができる。
【0020】
図4は、本発明の一実施例のデータ転送情報レジスタを説明する図である。モードレジスタ(MR_REG)12A、転送元アドレスレジスタ(SA_REG)12B、転送先アドレスレジスタ(DA_REG)12Cおよび転送回数レジスタ(CR_REG)12Dの配置例を示す。
【0021】
(1)転送モードレジスタ(MR_REG)12A:
データ転送装置1の転送モードを指定するレジスタで、モードレジスタA(MRA)とモードレジスタB(MRB)で構成されている。転送モードレジスタ12Aは、転送情報配置領域(INFO−AREA)4から読み込んだ値を保持する。ここで、モードレジスタAはデータ転送モード(MD1,MD0)、データ転送サイズ(SZ1,SZ0)および転送元アドレスモード(SM1,SM0)を保持する。また、モードレジスタBはチェイン転送モード設定(CHNE,CHNS)、データ転送装置割り込み設定(DISEL)、DTC転送モードセレクト(DTS)、および転送先アドレスモード(DM1,DM0)を保持する。
【0022】
(2)転送元アドレスレジスタ(SA_REG)12B:
転送元アドレスSAを指定するレジスタで、SA23からSA0の24ビット幅で構成されている。転送元アドレスレジスタ12Bは、転送情報配置領域5から読み込んだ値を保持すると共に、データ転送後に更新された値も保持する。
【0023】
(3)転送先アドレスレジスタ(DA_REG)12C:
転送先アドレスDAを指定するレジスタで、DA23からDA0の24ビット幅で構成されている。転送先アドレスレジスタ12Cは、転送情報配置領域5から読み込んだ値を保持すると共に、データ転送後に更新された値も保持する。
【0024】
(4)転送回数レジスタ(CR_REG)12D:
データ転送の回数を指定するレジスタで、転送回数レジスタ(CRA)Aと転送回数レジスタ(CRB)Bで構成されている。それぞれ、CRA15からCRA0の16ビット幅とCRB15からCRB0の16ビット幅とで構成されている。転送回数レジスタ12Dは、転送情報配置領域4から読み込んだ値を保持する。さらに、1回のデータ転送を終了すると−1減算され、指定回の転送が終了すると0になる。
【0025】
図5は、本発明の一実施例の転送元アドレスと転送先アドレスの演算量を判定する条件を説明する図である。演算量判定テーブル11の内容に応じて、転送モードレジスタ12Aの転送元アドレスモード(SM1)1と転送元アドレスモード(SM0)0と転送先アドレスモード(DM1)1と転送先アドレスモード(DM0)0に従って、演算量の判定を行う。
【0026】
転送元アドレスモードSM1が0の場合、転送元アドレスモードは固定モード(SA_FIX)になり、転送元アドレスはデータ転送後に更新しない。転送元アドレスモードSM1が1の場合、転送元アドレスモードは転送元アドレスモードSM0に従い、SM0が0の場合には加算し、SM0が1の場合には減算する。データ転送サイズSZ1,SZ0に従い、データ転送サイズSZ1が0でデータ転送サイズSZ0が0の場合にはバイトサイズ転送となって演算量は1になる。データ転送サイズSZ1が0でデータ転送サイズSZ1が1の場合にはワード(2バイト)サイズ転送となって演算量は2になる。データ転送サイズSZ1が1でデータ転送サイズSZ0が0の場合にはロングワード(4バイト)サイズ転送となって演算量は4になる。
【0027】
転送先アドレスモードDM1が0の場合、転送先アドレスモードは固定モード(DA_FIX)になり、転送先アドレスはデータ転送後に更新しない。転送先アドレスモードDM1が1の場合、転送元アドレスモードはDM0に従い、DM0が0の場合には加算し、DM0が1の場合には減算する。SZ1とSZ0で示されるデータ転送サイズに従い、データ転送サイズSZ1が0でデータ転送サイズSZ0が0の場合にはバイトサイズ転送となって演算量は1になる。データ転送サイズSZ1が0でデータ転送サイズSZ1が1の場合にはワード(2バイト)サイズ転送となって演算量は2になる。データ転送サイズSZ1が1の場合にはロングワード(4バイト)サイズ転送となって、演算量は4になる。さらに、転送元アドレス固定モード信号SA_FIXを受けて転送元アドレスの書き戻し処理をスキップし、転送先アドレス固定モード信号DA_FIXを受けて転送先アドレスの書き戻しをスキップする。
【0028】
図6は、本発明の一実施例の転送元と転送先および転送回数を演算する回路を説明する図である。転送情報演算回路(ADD)13は、演算データを受け取り、演算量判定回路11の演算量判定信号の結果に従って演算し、出力制御(1)、出力制御(2)および出力制御(3)に制御され、出力する。
【0029】
転送元アドレスと転送先アドレスの値を演算するときは、演算データが入力バッファ131Bで取り込まれ、演算量判定回路11から与えられる演算量判定信号によってセレクタ131Jで選択されたレジスタ131C−131Hによって与えられるインクリメント値とが演算器131で演算され、出力制御バッファ131Aによって出力される。
【0030】
転送回数の値を演算するときは、演算データが入力バッファ132Bで取り込まれ、レジスタ132Cによって与えられるデクリメント値1と演算器132で1デクリメント演算され、出力バッファ132Aによって出力される。
【0031】
転送情報先頭アドレスの値を演算するときは、演算データが入力バッファ133Bで取り込まれ、レジスタ133Cによって与えられるインクリメント値4と演算器133で4インクリメント演算され、出力バッファ133Aによって出力される。
【0032】
出力制御(1)から(3)は、上記のいずれの演算を実行しているかに応じて与えられる。
【0033】
図8は本発明の一実施例のデータ転送装置1(DTC)の処理フローを説明するフローチャート図である。
【0034】
S001:前回の割込みベクタ番号と今回の割込みベクタ番号が同一か否かを比較し、転送情報先頭アドレスと転送情報を読み込むか否かを判定する。前回の割込みベクタ番号と今回の割込みベクタ番号が同一のとき、転送情報先頭アドレスと転送情報の読み込みをスキップし、データリードの処理(S006)に遷移する。前回の割込みベクタ番号と今回の割込みベクタ番号が異なるとき、転送情報先頭アドレスリードの処理(S002)に遷移する。
【0035】
S002:転送情報先頭アドレスをデータ転送装置1(DTC)に読み込む。
【0036】
S003:図3に示す領域201AのMRAの値を転送モードレジスタ12A(MR_REG)に、領域201Cの転送元アドレスSAの値を転送元アドレスレジスタ12B(SA_REG)に読み込む。
【0037】
S004:図3に示す領域201BのMRBの値を転送モードレジスタ12A(MR_REG)に、領域201Dの転送先アドレスDAの値を転送先アドレスレジスタ12C(DA_REG)に読み込む。
【0038】
S005:図3に示す領域201Eの転送回数レジスタCRAの値および領域201Fの転送回数レジスタCRBの値を転送回数レジスタ12D(CR_REG)に読み込む。
【0039】
S006:転送元アドレスレジスタ12B(SA_REG)に示されるアドレスの位置から、図1に示す転送データ配置領域(DT_AREA)5にある転送データを、転送データレジスタ(DT_REG)14に読み込む。さらに、転送元アドレスレジスタ12B(SA_REG)の値を転送情報演算回路13(ADD)で演算する。
【0040】
S007:転送先アドレスレジスタ12C(DA_REG)に示されるアドレスの位置にデータレジスタ14(DT_REG)からデータを書き込む。さらに、転送先アドレスレジスタ12C(DA_REG)の値を転送情報演算回路13(ADD)で演算する。さらに、転送回数レジスタ12D(CR_REG)の値を転送情報演算回路13(ADD)で演算する。
【0041】
S008:転送元アドレスが転送前と転送後で不変か否かを判定し、不変の場合は、転送元アドレスライトバックS009の処理をスキップし、不変でない場合は、転送元アドレスライトバックS009の処理を行う。
【0042】
S009:転送元アドレスを転送情報先頭アドレスレジスタ15(ADR_REG)に示されるアドレスの位置に書き戻す。
【0043】
S010:転送先アドレスが転送前と転送後で不変か否かを判定し、不変の場合は、転送先アドレスライトバックS011の処理をスキップし、不変でない場合は、転送先アドレスライトバックS011の処理を行う。
【0044】
S011:転送先アドレスを転送情報先頭アドレスレジスタ15(ADR_REG)に示されるアドレスの位置に書き戻す。
【0045】
S012:転送回数を転送情報先頭アドレスレジスタ15(ADR_REG)に示されるアドレスの位置に書き戻す。
【0046】
本発明のデータ転送装置1は、上述した手順で動作する。従来のデータ転送装置におけるタイミングチャートと、本発明による動作のタイミングチャートとを比較して以下説明する。
【0047】
図9(A)は、従来のデータ転送装置におけるタイミングチャートを、(B)はデータ転送の状況を示す図である。ここでは、データ転送装置で、(B)に示すように、転送元アドレスSAから転送先アドレスDAに、データDTをシリアルデータバッファ(1)からシリアルデータバッファ(2)へ転送する場合を示す。
【0048】
(A)に示すタイミングチャートにおいて、CKSは制御サイクルを示す波形、DTC_REQはデータ転送要求信号生成回路(REQ_LOGIC)24が発生するデータ転送要求信号(DTC_REQ)、DATBはデータバス上を動くデータである。データ転送要求信号(DTC_REQ)が”1”になると転送情報先頭アドレスADRがリードされる(S002)。次いで、転送元アドレスSAの値、転送先アドレスDAの値および転送回数レジスタCRの値がリードされる(S003−S005)。次いで、転送元のデータをリードし、これを転送先にライトする(S006−S007)。これでデータ転送が終わり、データ転送要求信号(DTC_REQ)が”0”になると、転送元アドレス、転送先アドレスおよび転送回数をライトバックしてデータ転送処理が完了する(S009,S011およびS012)。
【0049】
このように、従来のデータ転送装置の転送制御では、転送前とデータ転送後で転送元アドレスと転送先アドレスが共に同一の場合でも、転送情報リードのサイクルで読み込んだ転送元アドレスと転送先アドレスの値と同一の値を転送情報ライトのサイクルで書き戻していた。
【0050】
図10(A)は、本発明の一実施例の転送情報ライトサイクルのスキップを説明するタイミングチャートを、(B)はデータ転送の状況を示す図であり、転送元アドレスモードと転送先アドレスモードの両方が固定モード(SA_FIX=1、DA_FIX=1)で転送情報書き戻しのサイクルが1サイクルになったときのデータ転送の状況を示す図である。この例でも、データ転送装置で、(B)に示すように、転送元アドレスSAから転送先アドレスDAに、データDTをシリアルデータバッファ(1)からシリアルデータバッファ(2)へ転送するのは図9の場合と同じである。
【0051】
転送元アドレスモードと転送先アドレスモードの両方が固定モード(SA_FIX=1、DA_FIX=1)の場合でも、転送の最初の周期で転送情報先頭アドレスADRがリードされ(S002)、次いで、転送元アドレスSAの値、転送先アドレスDAの値および転送回数レジスタCRの値がリードされる(S003−S005)のは同じである。また、転送元のデータをリードし、これを転送先にライトする(S006−S007)操作が当然実行される。しかし、転送元アドレスモードと転送先アドレスモードの両方が固定モードであるので、転送元アドレスは転送前後で同一であり、これを比較するステップS008はYesとなり、転送元アドレスのライトバック(S009)はスキップされる。また、転送先アドレスも転送前後で同一であり、これを比較するステップS010もYesとなり、転送先アドレスのライトバック(S001)もスキップされる。すなわち、転送情報ライトサイクルは転送回数レジスタ201E(CR_REG)の値を書き戻すのみなので1サイクルで終了する。
【0052】
図11(A)は、本発明の一実施例の転送情報先頭アドレスリードサイクルと転送情報リードサイクルのスキップを説明するタイミングチャートを、(B)はデータ転送の状況を示す図であり、第1の転送と第2、第3の転送のデータ転送起動要因(ベクタ番号)が同一の場合に、第2、第3の転送における転送情報先頭アドレスリードと転送情報リードのサイクルがスキップされるデータ転送の状況を示す図である。この例では、データ転送装置で、(B)に示すように、転送元アドレスSA、SA+4およびSA+8から転送先アドレスDA、DA+4およびDA+8に、データDT1、DT2およびDT3をメモリ(1)からメモリ(2)へ転送する。これを、それぞれ、第1の転送、第2の転送および第3の転送と呼んでいる。
【0053】
この場合、第1の転送では、図9で説明した従来例と同様に、データ転送要求信号(DTC_REQ)が”1”になると転送情報先頭アドレスADRがリードされる(S002)。次いで、転送元アドレスSAの値、転送先アドレスDAの値および転送回数レジスタCRの値がリードされる(S003−S005)。次いで、転送元のデータをリードし、これを転送先にライトする(S006−S007)。これでデータ転送が終わり、データ転送要求信号(DTC_REQ)が”0”になると、転送元アドレス、転送先アドレスおよび転送回数をライトバックしてデータ転送処理が完了する(S009,S011およびS012)。
【0054】
しかし、第2、第3の転送のデータ転送起動要因が同一であるので、図8におけるステップS001の前回と今回でベクタ番号が同一かの判定がYesとなる。したがって、第2、第3の転送における転送情報先頭アドレスリードと転送情報リードのサイクル(S002−S005)がスキップされる。第2の転送のデータ転送装置起動要求(DTC_REQ)がアサートされると同時に転送要因一致信号(DTC_SKIP)がアサートされた場合、第2の転送のベクタリードとデータ転送情報リードのサイクルがスキップされてデータ転送と転送情報ライトのみが行なわれる。さらに、第3の転送のデータ転送装置起動要求(DTC_REQ)がアサートされると同時に転送要因一致信号(DTC_SKIP)がアサートされた場合、第3の転送のベクタリードとデータ転送情報リードのサイクルがスキップされてデータ転送と転送情報ライトのみが行なわれる。
【0055】
【発明の効果】
以上に詳述したごとく、本発明によれば、本来必要のない処理をスキップすることができ、データ転送装置が内部バスを使用する頻度を少なくし,中央処理装置をストールする頻度を少なくすることが可能となり,情報処理の処理速度を向上することが可能となる。
【図面の簡単な説明】
【図1】本発明の一実施例のデータ転送装置を説明するブロック図。
【図2】本発明の一実施例のデータ転送装置を適用したシングルチップマイコンのブロック図。
【図3】本発明の一実施例の転送情報先頭アドレス配置領域と転送情報配置領域の関係を説明する図。
【図4】本発明の一実施例のデータ転送情報レジスタを説明する図。
【図5】本発明の一実施例の転送元アドレスと転送先アドレスの演算量を判定する条件を説明する図。
【図6】本発明の一実施例の転送元と転送先および転送回数を演算する回路を説明する図。
【図7】本発明の一実施例の割込み制御装置を説明するブロック図。
【図8】本発明の一実施例のデータ転送装置の処理フローを説明するフローチャート図。
【図9】(A)は、従来のデータ転送装置におけるデータ転送を説明するタイミングチャートを、(B)はデータ転送の状況を示す図。
【図10】(A)は、本発明の一実施例の転送情報ライトサイクルのスキップを説明するタイミングチャートを、(B)はデータ転送の状況を示す図。
【図11】本発明の一実施例の転送情報先頭アドレスリードサイクルと転送情報リードサイクルのスキップを説明するタイミングチャートを、(B)はデータ転送の状況を示す図。
【符号の説明】
1:データ転送装置、2:割込み制御装置、3:転送情報先頭アドレス配置領域、4:転送情報配置領域、5:転送データ配置領域、10:データ転送装置制御回路、11:演算量判定テーブル、12:転送情報レジスタ回路、12A:モードレジスタ、12B:転送元アドレスレジスタ、12C:転送先アドレスレジスタ、12D:転送回数レジスタ、CSS:比較抑止信号、13:転送情報演算回路、131、132、133:演算器、131J:演算量選択回路、131C、131D、131E、131F、131G、131H、132C、133C:演算量、131A、132A、133A:出力バッファ、131B、132B、133B:入力バッファ、14:転送データレジスタ、15:転送情報先頭アドレスレジスタ、16:バスインタフェース回路、500:シングルチップマイコン、501:中央処理装置(CPU)、502:ダイレクトメモリアクセスコントローラ、503:バスコントローラ、504:ランダムアクセスメモリ、505:リードオンリメモリ、506:シリアルデータ転送装置、507:タイマコントローラ、L50:割込み信号、L51:割込みクリア信号、L52:バスリクエスト信号、L53:バス使用許可信号、101、102、103:転送情報先頭アドレス、201A、202A、203A:モードA、201B、202B、203B:モードB、201C、202C、203C:転送元アドレス、201D、202D、203D:転送先アドレス、201E、202E、203E:転送回数A、201F、202F、203F:転送回数B、20:優先順位判定回路、21:割込みクリア回路、22:割込みベクタ番号生成回路、23:割込みベクタ番号保持回路、24:データ転送要求信号生成回路、25:割込みベクタ番号比較回路、S001、S002、S003、S004、S005、S006、S007、S008、S009、S010、S011、S012:処理ステップ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data transfer device, and in particular, when a large number of interrupt requests are generated from a plurality of peripheral processing devices and data transfer is performed by the interrupt requests, transfer information for each interrupt factor is read from a memory and the data transfer is performed. The present invention relates to a data transfer apparatus having means for performing and writing updated transfer information back to a memory, and a means for enabling reduction of the number of data transfer cycles.
[0002]
[Prior art]
As a conventional data transfer apparatus, Japanese Patent Laid-Open No. 1-125644 discloses a data transfer apparatus (DTC: data transfer controller) that can perform data transfer with a small amount of hardware even when there are many data transfer requests. It is. In this conventional example, the theme is to realize data transfer with a small amount of hardware, there is no consideration for hardware to reduce the number of data transfer cycles, and it is designed to perform data transfer cycles that are not originally required. It was.
[0003]
In recent years, the speed of interfaces mounted on printer devices and the like has been remarkably increased, and it has been necessary to reduce the number of data transfer cycles in a data transfer apparatus.
[0004]
In the conventional data transfer apparatus proposed in Japanese Patent Laid-Open No. 1-125644, even if the transfer factor to be transferred this time is the same as the previous transfer factor, the transfer information used last time is not used. The data transfer information is obtained from the beginning again. Therefore, paying attention to the problem of spending unnecessary time in terms of speeding up data transfer, if the transfer factor of the data to be transferred is the same between the previous time and the current time, Japanese Laid-Open Patent Publication No. 2001-160025 proposes a data transfer device designed to increase the speed of data transfer by reusing information.
[0005]
[Problems to be solved by the invention]
Since these conventional data transfer devices are configured to write back transfer information even if the values of the transfer source address and transfer destination address before and after data transfer are the same, There was a problem of spending unnecessary time.
[0006]
The object of the present invention is to increase the speed of data transfer by not performing the write-back of the same address when the values of the transfer source address and the transfer destination address before and after the data transfer are the same. It is an object of the present invention to provide a data transfer device that can achieve the above.
[0007]
[Means for Solving the Problems]
A transfer information start address register holding the transfer information start address for each data transfer factor, a transfer information register holding the transfer information stored at the position of the transfer information start address, and an operation for calculating the value of the transfer information register A circuit, a calculation amount determining means for controlling the calculation circuit, a data register for holding transfer data, and an internal bus control means for controlling an interface with an internal bus of the microcomputer, and using the calculation amount determination result Thus, it is determined whether or not to write back the address after the data transfer, and when it is not necessary to write back, a cycle for writing back the transfer source address and transfer destination address of the transfer information register to the memory is not performed.
[0008]
With this configuration, when the transfer source address and transfer destination address of the transfer information register are the same before and after data transfer, the number of transfer information write-back cycles can be reduced. The speed can be increased.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0010]
Before explaining FIG. 1 showing an embodiment of the data transfer device (DTC) 1 of the present invention, first, referring to the block diagram of the single chip microcomputer 500 shown in FIG. The relationship with the components of the single chip microcomputer 500 will be briefly described.
[0011]
The single-chip microcomputer 500 includes a central processing unit (CPU) 501, a direct memory access controller (DMAC) 502, a data transfer device (DTC) 1, a random access memory (RAM) 504 connected to the internal bus 510, A read only memory (ROM) 505, a serial data transfer device (SCI) 506 connected to the peripheral bus 520, a timer controller (TMU) 507, an interrupt control device (INT) 2, and a bus controller (BSC) 503 Consists of An external memory bus 530 is connected via the bus controller 503.
[0012]
The interrupt control device 2 receives an interrupt signal L50 such as an interrupt signal from the serial data transfer device 506, an interrupt signal from the timer controller 507, and a plurality of external interrupt signals from the outside of the microcomputer, and receives the central processing unit 501 and direct memory access. A transfer request is output to either the controller 502 or the data transfer apparatus 1. When the processing by the interrupt signal L50 is completed, an interrupt clear signal L51, which is a signal for clearing the interrupt, is output corresponding to each interrupt signal outside the serial data transfer device 506, the timer controller 507, and the microcomputer. The bus controller 503 receives the bus request signal L52 from the central processing unit 501, the direct memory access controller 502, and the data transfer device 1, arbitrates for the occupation of the internal bus 510, and outputs a bus use permission signal L53.
[0013]
FIG. 7 is a block diagram illustrating an interrupt control apparatus according to an embodiment of the present invention. With reference to this configuration block diagram, an example in which activation control of the data transfer device 1 is performed in response to a plurality of interrupt signals (interrupt signal (1) to interrupt signal (n)) connected to peripheral devices and external devices will be described. To do. When a plurality of interrupt signals (interrupt signal (1) to interrupt signal (n)) are given, the interrupt control device (INT) 2 includes a determination circuit (INT_SEL) 20 that determines the priority order of the interrupt signals and the interrupt signal. An interrupt vector number generation circuit (VEC) 22 that generates an interrupt vector number (DTC_VEC) corresponding to the data, and whether or not to output a data transfer request corresponding to the interrupt signal, and a data transfer request corresponding to this A data transfer request signal generation circuit (REQ_LOGIC) 24 that generates a signal (DTC_REQ), a vector number holding circuit (VEC_FF) 23 that holds an interrupt vector number every time an interrupt signal is given, and a next interrupt signal are given A vector number comparison circuit (CMP) 25 for comparing with the previously held vector number. Generating transfer information read inhibit signal (DTC_SKIP) to the data transfer apparatus 1 (DTC) when an interrupt vector numbers match. The data transfer device 1 receives an interrupt clear signal (DTC_CLR) generated when the transfer corresponding to the data transfer request signal is completed, and receives an interrupt clear signal (clear signal (1) to clear signal (n)) for clearing the interrupt. An interrupt clear circuit 21 (CLR_LOGIC) is generated. The signal generated by the interrupt clear circuit 21 is the interrupt clear signal L51 in FIG. Furthermore, in this embodiment, there is a comparison inhibition signal CSS for inhibiting comparison of interrupt vector numbers that can be controlled by the CPU, and the vector number comparison circuit 25 can select whether or not to perform comparison. With such a configuration, when the vector table and transfer information are updated after the previous activation, the vector table and transfer information updated at the current activation can be read.
[0014]
Next, the data transfer apparatus 1 will be described with reference to FIG. The data transfer device 1 includes a data transfer device control circuit (DTC_CTL) 10, and the data transfer device control circuit 10 performs the following sequential control. When the data transfer request signal DTC_REQ is given from the interrupt control device 2, the bus interface circuit (BUS_IF) 16 sets the start address of the transfer information stored in the transfer information start address allocation area (ADR_AREA) 3 according to the interrupt vector number DTC_VEC. To the transfer information head address register (ADR_REG) 15. Next, the value of the transfer information stored in the transfer information arrangement area (INFO_AREA) 4 is read into the transfer information register circuit (INFO_REG) 12 through the bus interface circuit 16 in accordance with the head address. The transfer information register circuit 12 includes a mode register (MR_REG) 12A indicating an operation mode, a transfer source address register (SA_REG) 12B indicating a transfer source address, a transfer destination address register (DA_REG) 12C indicating a transfer destination address, and the number of transfers The transfer data in the transfer data arrangement area (DT_AREA) 5 is read into the transfer data register (DT_REG) 14 from the address position indicated in the transfer source address register 12B. .
[0015]
Next, the transfer data is read from the transfer data register 14 at the address indicated by the transfer destination address register 12C. Next, the transfer source address 12B and the transfer destination address 12C are calculated according to the result of the calculation amount determination circuit 11 that receives the data transfer size indicated in the mode register 12A and controls the calculation amount. The transfer count data in the transfer count register 12D indicating the transfer count is subtracted by the data transfer count. Finally, the value of each register in the transfer information register 12 including the mode register 12A, transfer source address register 12B, transfer destination address 12C, and transfer count register 12D is transferred via the bus interface circuit 16 to the transfer information arrangement area. Write back to the position indicated by the transfer information head address register 15 of (INFO-AREA) 4. At this time, the value of the transfer source address register 12B is written back when the transfer source address is unchanged before and after the transfer, and the value of the transfer destination address register 12C is written back when the transfer destination address is unchanged, according to the result of the operation amount determination circuit 11. Skip the cycle. Here, ADRB is an address bus, and DATB is a data bus. The transfer information arithmetic circuit (ADD) 13 will be described later.
[0016]
FIG. 3 is a diagram for explaining the relationship between the transfer information start address arrangement area and the transfer information arrangement area according to an embodiment of the present invention. Transfer information start address (1) 101, transfer information start address (2) 102, transfer information start address (3) 103, stored in transfer information start address allocation area (ADR_AREA) 3 for each data transfer factor, And an arrangement example of transfer information (1), transfer information (2), transfer information (3), and --- stored in the transfer information arrangement area (INFO_AREA) 4. Here, an example is shown in which 4 bytes are assigned to both the transfer information head address and the transfer information.
[0017]
Each transfer information start address is arranged for each of a plurality of data transfer factors and is read into the data transfer device 1 according to the interrupt vector number DTC_VEC assigned for each interrupt factor. The transfer information is arranged starting from the position indicated by the head address.
[0018]
Each transfer information corresponds to each transfer information head address, mode register A (MRA) areas 201A, 202A, 203A--, mode register B (MRB) areas 201B, 202B, 203B-- Areas 201C, 202C, and 203C for designating the transfer source address SA, areas 201D, 202D, and 203D for designating the transfer destination address DA, and areas 201E, 202E, and 203E for designating the transfer count register CRA -And areas 201F, 202F, 203F for designating the transfer count register CRB.
[0019]
In this embodiment, the size of the start address for each data transfer factor is 4 bytes. However, the memory usage can be reduced by reducing the size as necessary, and the size can be increased by increasing the size. Transfer information can be arranged. In this embodiment, the transfer information for one transfer factor has 12 bytes. However, if necessary, the memory usage can be reduced by reducing the size, and the data transfer mode can be increased by increasing the size. Address and number of transfers can be expanded.
[0020]
FIG. 4 is a diagram for explaining a data transfer information register according to an embodiment of the present invention. An arrangement example of the mode register (MR_REG) 12A, the transfer source address register (SA_REG) 12B, the transfer destination address register (DA_REG) 12C, and the transfer count register (CR_REG) 12D is shown.
[0021]
(1) Transfer mode register (MR_REG) 12A:
A register for designating a transfer mode of the data transfer apparatus 1, and is composed of a mode register A (MRA) and a mode register B (MRB). The transfer mode register 12A holds a value read from the transfer information arrangement area (INFO-AREA) 4. Here, the mode register A holds the data transfer mode (MD1, MD0), the data transfer size (SZ1, SZ0), and the transfer source address mode (SM1, SM0). The mode register B holds a chain transfer mode setting (CHNE, CHNS), a data transfer device interrupt setting (DISEL), a DTC transfer mode select (DTS), and a transfer destination address mode (DM1, DM0).
[0022]
(2) Transfer source address register (SA_REG) 12B:
This register specifies the transfer source address SA, and is composed of a 24-bit width from SA23 to SA0. The transfer source address register 12B holds a value read from the transfer information arrangement area 5, and also holds a value updated after data transfer.
[0023]
(3) Transfer destination address register (DA_REG) 12C:
A register for designating the transfer destination address DA, which is composed of a 24-bit width from DA23 to DA0. The transfer destination address register 12C holds a value read from the transfer information arrangement area 5, and also holds a value updated after data transfer.
[0024]
(4) Transfer count register (CR_REG) 12D:
A register for designating the number of times of data transfer, and is composed of a transfer number register (CRA) A and a transfer number register (CRB) B. Each is composed of a 16-bit width from CRA15 to CRA0 and a 16-bit width from CRB15 to CRB0. The transfer count register 12 </ b> D holds a value read from the transfer information arrangement area 4. Further, -1 is subtracted when one data transfer is completed, and becomes 0 when the designated data transfer is completed.
[0025]
FIG. 5 is a diagram illustrating conditions for determining the amount of calculation of the transfer source address and the transfer destination address according to an embodiment of the present invention. Depending on the contents of the calculation amount determination table 11, the transfer source address mode (SM1) 1, the transfer source address mode (SM0) 0, the transfer destination address mode (DM1) 1, and the transfer destination address mode (DM0) of the transfer mode register 12A. The amount of calculation is determined according to 0.
[0026]
When the transfer source address mode SM1 is 0, the transfer source address mode is a fixed mode (SA_FIX), and the transfer source address is not updated after data transfer. When the transfer source address mode SM1 is 1, the transfer source address mode follows the transfer source address mode SM0 and is added when SM0 is 0, and subtracted when SM0 is 1. According to the data transfer sizes SZ1 and SZ0, when the data transfer size SZ1 is 0 and the data transfer size SZ0 is 0, the byte size transfer is performed and the calculation amount is 1. When the data transfer size SZ1 is 0 and the data transfer size SZ1 is 1, word (2 bytes) size transfer is performed and the amount of calculation is 2. When the data transfer size SZ1 is 1 and the data transfer size SZ0 is 0, longword (4 bytes) size transfer is performed and the amount of calculation is 4.
[0027]
When the transfer destination address mode DM1 is 0, the transfer destination address mode is a fixed mode (DA_FIX), and the transfer destination address is not updated after data transfer. When the transfer destination address mode DM1 is 1, the transfer source address mode follows DM0. When DM0 is 0, addition is performed, and when DM0 is 1, subtraction is performed. According to the data transfer sizes indicated by SZ1 and SZ0, when the data transfer size SZ1 is 0 and the data transfer size SZ0 is 0, byte size transfer is performed and the calculation amount is 1. When the data transfer size SZ1 is 0 and the data transfer size SZ1 is 1, word (2 bytes) size transfer is performed and the amount of calculation is 2. When the data transfer size SZ1 is 1, longword (4 bytes) size transfer is performed and the amount of calculation is 4. Further, the transfer source address write mode signal SA_FIX is received to skip the transfer source address write-back process, and the transfer destination address fix mode signal DA_FIX is received to skip the transfer destination address write-back.
[0028]
FIG. 6 is a diagram for explaining a circuit for calculating a transfer source, a transfer destination, and the number of transfers according to an embodiment of the present invention. The transfer information calculation circuit (ADD) 13 receives the calculation data, calculates it according to the result of the calculation amount determination signal of the calculation amount determination circuit 11, and controls to output control (1), output control (2), and output control (3). And output.
[0029]
When calculating the values of the transfer source address and the transfer destination address, the calculation data is fetched by the input buffer 131B and given by the register 131C-131H selected by the selector 131J according to the calculation amount determination signal supplied from the calculation amount determination circuit 11. The increment value is calculated by the calculator 131 and output by the output control buffer 131A.
[0030]
When calculating the value of the number of transfers, the calculation data is taken in by the input buffer 132B, decremented by 1 by the decrement value 1 given by the register 132C and the calculator 132, and output by the output buffer 132A.
[0031]
When calculating the value of the transfer information head address, the operation data is fetched by the input buffer 133B, the increment value 4 given by the register 133C and the operation unit 133 are incremented by 4 and output by the output buffer 133A.
[0032]
The output controls (1) to (3) are given depending on which of the above operations is being executed.
[0033]
FIG. 8 is a flowchart for explaining the processing flow of the data transfer apparatus 1 (DTC) according to the embodiment of the present invention.
[0034]
S001: Compare whether or not the previous interrupt vector number and the current interrupt vector number are the same, and determine whether or not to read the transfer information head address and the transfer information. When the previous interrupt vector number and the current interrupt vector number are the same, reading of the transfer information head address and transfer information is skipped, and the process proceeds to a data read process (S006). When the previous interrupt vector number is different from the current interrupt vector number, the process proceeds to the transfer information head address read process (S002).
[0035]
S002: The transfer information head address is read into the data transfer apparatus 1 (DTC).
[0036]
S003: The MRA value of the area 201A shown in FIG. 3 is read into the transfer mode register 12A (MR_REG), and the transfer source address SA value of the area 201C is read into the transfer source address register 12B (SA_REG).
[0037]
S004: The MRB value in the area 201B shown in FIG. 3 is read into the transfer mode register 12A (MR_REG), and the transfer destination address DA value in the area 201D is read into the transfer destination address register 12C (DA_REG).
[0038]
S005: The value of the transfer count register CRA in the area 201E and the value of the transfer count register CRB in the area 201F shown in FIG. 3 are read into the transfer count register 12D (CR_REG).
[0039]
S006: Transfer data in the transfer data arrangement area (DT_AREA) 5 shown in FIG. 1 is read into the transfer data register (DT_REG) 14 from the position of the address indicated in the transfer source address register 12B (SA_REG). Further, the value of the transfer source address register 12B (SA_REG) is calculated by the transfer information calculation circuit 13 (ADD).
[0040]
S007: Data is written from the data register 14 (DT_REG) at the address position indicated by the transfer destination address register 12C (DA_REG). Further, the value of the transfer destination address register 12C (DA_REG) is calculated by the transfer information calculation circuit 13 (ADD). Furthermore, the transfer information calculation circuit 13 (ADD) calculates the value of the transfer count register 12D (CR_REG).
[0041]
S008: It is determined whether or not the transfer source address is unchanged before and after transfer. If the transfer source address is unchanged, the process of the transfer source address write back S009 is skipped. If not, the process of the transfer source address write back S009 is performed. I do.
[0042]
S009: The transfer source address is written back to the address position indicated in the transfer information head address register 15 (ADR_REG).
[0043]
S010: It is determined whether or not the transfer destination address is unchanged before and after the transfer. If the transfer destination address is unchanged, the process of the transfer destination address write back S011 is skipped. If not, the process of the transfer destination address write back S011 is performed. I do.
[0044]
S011: The transfer destination address is written back to the address position indicated in the transfer information head address register 15 (ADR_REG).
[0045]
S012: The transfer count is written back to the address position indicated in the transfer information head address register 15 (ADR_REG).
[0046]
The data transfer device 1 of the present invention operates according to the procedure described above. A timing chart in the conventional data transfer apparatus and a timing chart of the operation according to the present invention will be compared and described below.
[0047]
FIG. 9A is a timing chart in a conventional data transfer device, and FIG. 9B is a diagram showing a data transfer situation. Here, as shown in (B), the data transfer apparatus transfers data DT from the transfer source address SA to the transfer destination address DA and from the serial data buffer (1) to the serial data buffer (2).
[0048]
In the timing chart shown in (A), CKS is a waveform indicating a control cycle, DTC_REQ is a data transfer request signal (DTC_REQ) generated by the data transfer request signal generation circuit (REQ_LOGIC) 24, and DATB is data moving on the data bus. . When the data transfer request signal (DTC_REQ) becomes “1”, the transfer information head address ADR is read (S002). Next, the value of the transfer source address SA, the value of the transfer destination address DA, and the value of the transfer count register CR are read (S003 to S005). Next, the transfer source data is read and written to the transfer destination (S006 to S007). When the data transfer is completed and the data transfer request signal (DTC_REQ) becomes “0”, the transfer source address, the transfer destination address, and the transfer count are written back to complete the data transfer process (S009, S011, and S012).
[0049]
As described above, in the transfer control of the conventional data transfer device, even when the transfer source address and the transfer destination address are the same before and after the data transfer, the transfer source address and the transfer destination address read in the transfer information read cycle. The same value as this value was written back in the transfer information write cycle.
[0050]
FIG. 10A is a timing chart for explaining the skip of the transfer information write cycle according to one embodiment of the present invention, and FIG. 10B is a diagram showing the state of data transfer. The source address mode and the destination address mode FIG. 6 is a diagram showing a data transfer situation when both are fixed modes (SA_FIX = 1, DA_FIX = 1) and the transfer information write-back cycle becomes one cycle. Also in this example, the data transfer apparatus transfers data DT from the transfer source address SA to the transfer destination address DA and from the serial data buffer (1) to the serial data buffer (2) as shown in FIG. This is the same as the case of 9.
[0051]
Even when both the transfer source address mode and the transfer destination address mode are fixed modes (SA_FIX = 1, DA_FIX = 1), the transfer information head address ADR is read in the first transfer period (S002), and then the transfer source address The SA value, the transfer destination address DA value, and the transfer count register CR value are read (S003 to S005). Further, the operation of reading the transfer source data and writing it to the transfer destination (S006 to S007) is naturally executed. However, since both the transfer source address mode and the transfer destination address mode are fixed modes, the transfer source address is the same before and after the transfer, and Step S008 for comparing them is Yes, and the transfer source address is written back (S009). Is skipped. Also, the transfer destination address is the same before and after the transfer, and Step S010 for comparing them is also Yes, and the write-back of the transfer destination address (S001) is also skipped. That is, since the transfer information write cycle only rewrites the value of the transfer count register 201E (CR_REG), it is completed in one cycle.
[0052]
FIG. 11A is a timing chart for explaining the skip of the transfer information head address read cycle and the transfer information read cycle according to one embodiment of the present invention, and FIG. 11B is a diagram showing the status of data transfer. Data transfer in which the cycle of transfer information start address read and transfer information read in the second and third transfers is skipped when the data transfer activation factor (vector number) of the second and third transfers is the same FIG. In this example, in the data transfer apparatus, as shown in (B), data DT1, DT2, and DT3 are transferred from the memory (1) to the memory (1) from the transfer source addresses SA, SA + 4, and SA + 8 to the transfer destination addresses DA, DA + 4, and DA + 8. Transfer to 2). This is called a first transfer, a second transfer, and a third transfer, respectively.
[0053]
In this case, in the first transfer, the transfer information head address ADR is read when the data transfer request signal (DTC_REQ) becomes “1” as in the conventional example described in FIG. 9 (S002). Next, the value of the transfer source address SA, the value of the transfer destination address DA, and the value of the transfer count register CR are read (S003 to S005). Next, the transfer source data is read and written to the transfer destination (S006 to S007). When the data transfer is completed and the data transfer request signal (DTC_REQ) becomes “0”, the transfer source address, the transfer destination address, and the transfer count are written back to complete the data transfer process (S009, S011, and S012).
[0054]
However, since the data transfer activation factors of the second and third transfers are the same, it is determined whether the vector numbers are the same in the previous time and the current time in step S001 in FIG. Therefore, the transfer information head address read and transfer information read cycle (S002-S005) in the second and third transfers is skipped. When the data transfer device activation request (DTC_REQ) for the second transfer is asserted and the transfer factor coincidence signal (DTC_SKIP) is asserted at the same time, the vector read and data transfer information read cycles for the second transfer are skipped. Only data transfer and transfer information write are performed. Further, when the transfer factor coincidence signal (DTC_SKIP) is asserted simultaneously with the assertion of the data transfer device activation request (DTC_REQ) of the third transfer, the cycle of vector read and data transfer information read of the third transfer is skipped. Thus, only data transfer and transfer information write are performed.
[0055]
【The invention's effect】
As described above in detail, according to the present invention, it is possible to skip unnecessary processing, reduce the frequency at which the data transfer device uses the internal bus, and reduce the frequency at which the central processing unit is stalled. This makes it possible to improve the processing speed of information processing.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a data transfer apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram of a single chip microcomputer to which a data transfer apparatus according to an embodiment of the present invention is applied.
FIG. 3 is a diagram illustrating a relationship between a transfer information start address arrangement area and a transfer information arrangement area according to an embodiment of the present invention.
FIG. 4 is a diagram illustrating a data transfer information register according to an embodiment of the present invention.
FIG. 5 is a diagram illustrating conditions for determining the amount of calculation of a transfer source address and a transfer destination address according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating a circuit that calculates a transfer source, a transfer destination, and the number of transfers according to an embodiment of the present invention.
FIG. 7 is a block diagram illustrating an interrupt control device according to an embodiment of the present invention.
FIG. 8 is a flowchart for explaining the processing flow of the data transfer apparatus according to the embodiment of the present invention.
9A is a timing chart for explaining data transfer in a conventional data transfer apparatus, and FIG. 9B is a diagram showing a state of data transfer.
FIG. 10A is a timing chart illustrating skipping of a transfer information write cycle according to an embodiment of the present invention, and FIG. 10B is a diagram illustrating a state of data transfer.
FIG. 11 is a timing chart illustrating transfer information head address read cycle and transfer information read cycle skip according to an embodiment of the present invention, and FIG.
[Explanation of symbols]
1: data transfer device, 2: interrupt control device, 3: transfer information start address arrangement area, 4: transfer information arrangement area, 5: transfer data arrangement area, 10: data transfer apparatus control circuit, 11: calculation amount determination table, 12: Transfer information register circuit, 12A: Mode register, 12B: Transfer source address register, 12C: Transfer destination address register, 12D: Transfer number register, CSS: Comparison inhibition signal, 13: Transfer information arithmetic circuit, 131, 132, 133 : Calculator, 131J: calculation amount selection circuit, 131C, 131D, 131E, 131F, 131G, 131H, 132C, 133C: calculation amount, 131A, 132A, 133A: output buffer, 131B, 132B, 133B: input buffer, 14: Transfer data register, 15: Transfer information start address register, 16: Interface circuit, 500: single chip microcomputer, 501: central processing unit (CPU), 502: direct memory access controller, 503: bus controller, 504: random access memory, 505: read only memory, 506: serial data transfer device, 507: Timer controller, L50: Interrupt signal, L51: Interrupt clear signal, L52: Bus request signal, L53: Bus use permission signal, 101, 102, 103: Transfer information head address, 201A, 202A, 203A: Mode A, 201B 202B, 203B: Mode B, 201C, 202C, 203C: Transfer source address, 201D, 202D, 203D: Transfer destination address, 201E, 202E, 203E: Transfer count A, 201F, 202F, 203 : Transfer count B, 20: Priority determination circuit, 21: Interrupt clear circuit, 22: Interrupt vector number generation circuit, 23: Interrupt vector number holding circuit, 24: Data transfer request signal generation circuit, 25: Interrupt vector number comparison circuit S001, S002, S003, S004, S005, S006, S007, S008, S009, S010, S011, S012: processing steps.

Claims (4)

データ転送要因毎の転送情報先頭アドレスを保持する転送情報先頭アドレスレジスタと、前記転送情報先頭アドレスの位置に格納された転送情報を保持する転送情報レジスタと、前記転送情報レジスタの値を演算する演算回路と、前記演算回路を制御する演算量判定手段と、転送データを保持するデータレジスタと、マイコンの内部バスとのインターフェースを制御する内部バス制御手段とを有するとともに、転送元アドレスの演算が行われないときにはデータ転送後の転送元アドレスを書き戻すサイクルを、転送先アドレスの演算が行われないときにはデータ転送後の転送先アドレスを書き戻すサイクルを、それぞれ、行わないことを特徴とするデータ転送装置。A transfer information start address register holding the transfer information start address for each data transfer factor, a transfer information register holding the transfer information stored at the position of the transfer information start address, and an operation for calculating the value of the transfer information register A circuit, a calculation amount determining means for controlling the arithmetic circuit, a data register for holding transfer data, and an internal bus control means for controlling an interface with an internal bus of the microcomputer, and a transfer source address is calculated. A data transfer characterized by not performing a cycle for rewriting the transfer source address after data transfer if not performed, and a cycle for rewriting the transfer destination address after data transfer if no calculation of the transfer destination address is performed. apparatus. 転送情報先頭アドレスを保持する転送情報先頭アドレスレジスタと、前記転送情報先頭アドレスの位置に格納された転送情報を保持する転送情報レジスタと、前記転送情報レジスタの値を演算する演算回路と、前記演算回路を制御する演算量判定手段と、転送データを保持するデータレジスタと、マイコンの内部バスとのインターフェースを制御する内部バス制御手段と、割込み信号に対応した割込みベクタ番号を発生する割込みベクタ番号生成回路と、前記割込みベクタ番号生成回路が生成する、前回と今回の前記割込みベクタ番号が一致するか否かを比較するベクタ番号比較回路を有し、前記ベクタ番号比較回路における比較結果が一致したとき前記転送情報先頭アドレスと前記転送情報の読み込みをスキップし前記転送情報レジスタの値を利用して転送処理を行うことを特徴とするデータ転送装置。And transfer information start address register for holding the transfer information start address, and transfer information registers for holding the forwarding information stored in said position of the transfer information start address, an arithmetic circuit for calculating the value of the transfer information registers, the arithmetic Computation amount judgment means for controlling the circuit, data register for holding transfer data, internal bus control means for controlling the interface with the microcomputer internal bus, and interrupt vector number generation for generating an interrupt vector number corresponding to the interrupt signal A circuit and a vector number comparison circuit that compares the previous and current interrupt vector numbers generated by the interrupt vector number generation circuit, and the comparison result in the vector number comparison circuit matches Skips the reading of the transfer information start address and the transfer information, A data transfer apparatus and performs a transfer process using a. 中央処理装置と前記データ転送装置が同一チップ上に集積されている請求項2記載のデータ転送装置。3. The data transfer apparatus according to claim 2, wherein a central processing unit and the data transfer apparatus are integrated on the same chip. 前記中央処理装置が前記ベクタ番号比較回路に比較を禁止する信号を与えたときは、前記ベクタ番号比較回路はその出力を抑止する請求項3記載のデータ転送装置。 4. The data transfer device according to claim 3, wherein when the central processing unit gives a signal for prohibiting comparison to the vector number comparison circuit , the vector number comparison circuit suppresses the output.
JP2002172797A 2002-06-13 2002-06-13 Data transfer device Expired - Fee Related JP4094347B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002172797A JP4094347B2 (en) 2002-06-13 2002-06-13 Data transfer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002172797A JP4094347B2 (en) 2002-06-13 2002-06-13 Data transfer device

Publications (2)

Publication Number Publication Date
JP2004021401A JP2004021401A (en) 2004-01-22
JP4094347B2 true JP4094347B2 (en) 2008-06-04

Family

ID=31172258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002172797A Expired - Fee Related JP4094347B2 (en) 2002-06-13 2002-06-13 Data transfer device

Country Status (1)

Country Link
JP (1) JP4094347B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI517378B (en) 2005-10-17 2016-01-11 半導體能源研究所股份有限公司 Semiconductor device and method of manufacturing same
JP6433191B2 (en) 2014-08-18 2018-12-05 ルネサスエレクトロニクス株式会社 Microcomputer

Also Published As

Publication number Publication date
JP2004021401A (en) 2004-01-22

Similar Documents

Publication Publication Date Title
US12072824B2 (en) Multicore bus architecture with non-blocking high performance transaction credit system
JP4136359B2 (en) Microcomputer
EP1324190A2 (en) Data processing system having a read-modify-write unit
CN101089832A (en) Unified memory system
JP4875981B2 (en) Prefetch control in data processing system
JP4094347B2 (en) Data transfer device
US7340542B2 (en) Data processing system with bus access retraction
CN100435122C (en) Data processing system with peripheral access protection
US20040123010A1 (en) Shared write buffer in a peripheral interface and method of operating
US20050160202A1 (en) Direct memory access device
US7130943B2 (en) Data processing system with bus access retraction
JPH1097496A (en) Bus control method and device using the same method
JP2005165508A (en) Direct memory access controller
JPH11184752A (en) Data processing device and data processing system
JP2009037639A (en) Dmac issue mechanism via streaming identification method
JPH1083343A (en) Method for accessing memory
US7249223B2 (en) Prefetching in a data processing system
JP5574455B2 (en) Signal processing system and integrated circuit with prefetch module, and method therefor
JP2000047930A (en) Data processing device
JP2004145593A (en) Direct memory access device, bus arbitration control device, and control method thereof
JP2022124897A (en) CONTROL CIRCUIT AND METHOD OF CONTROLLING CONTROL CIRCUIT
US20180336029A1 (en) Arithmetic processing device and control method for arithmetic processing device
JP2000347931A (en) Cache memory and cache memory control method
JPH0850567A (en) Data transfer device
JPH10161927A (en) Load buffer device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071116

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20071214

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080305

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

Free format text: PAYMENT UNTIL: 20110314

Year of fee payment: 3

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

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

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

Free format text: PAYMENT UNTIL: 20110314

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20110314

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120314

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130314

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130314

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140314

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees