JP2004362035A - Data input/output unit and data processor - Google Patents

Data input/output unit and data processor Download PDF

Info

Publication number
JP2004362035A
JP2004362035A JP2003156519A JP2003156519A JP2004362035A JP 2004362035 A JP2004362035 A JP 2004362035A JP 2003156519 A JP2003156519 A JP 2003156519A JP 2003156519 A JP2003156519 A JP 2003156519A JP 2004362035 A JP2004362035 A JP 2004362035A
Authority
JP
Japan
Prior art keywords
data
output
input
register
communication
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.)
Pending
Application number
JP2003156519A
Other languages
Japanese (ja)
Inventor
Muneyasu Ishide
宗康 石出
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2003156519A priority Critical patent/JP2004362035A/en
Publication of JP2004362035A publication Critical patent/JP2004362035A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To save processing executed by a control part during communication when a data input/output unit as a general purpose interface performs serial communication. <P>SOLUTION: The GPIO 1 comprises a shift clock generation circuit 11 for generating shift clocks for serial communication, and can output them via a corresponding terminal t. As output data, a plurality of bits related to serial communication can be written into a serial output data register 6 in advance of communication and can be sequentially output at the timing of the shift clocks. About input data, a serial input data register 8 capable of holding a plurality of bits related to serial communication can be provided to sequentially capture them at the timing of the shift clocks. The control part can thus perform serial communication without writing/continuously writing values into registers during communication as in a conventional scheme. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、汎用の入出力インタフェースとして構成されたデータ入出力装置、及びこのようなデータ入出力装置を備えて外部装置との通信を行うデータ処理装置に関する。
【0002】
【従来の技術】
例えば、デジタル信号処理を行うDSP(Digital Signal Processor)や、各種情報処理装置に備えられるCPU(Central Processing Unit)等のデータ処理装置には、外部装置との間でデータ通信を行うための、汎用の入出力端子(GPIO:General Purpose Input/output)が備えられる場合がある。
このGPIOでは、外部装置との間での通信形態(例えば通信データの本数やシリアル/パラレル通信等)に対応させて、各端子をプログラマブルに使いわけることが可能に構成されている。つまり、例えば使用すべき端子の割り当てを任意に変更したり、各端子の入力/出力を切り換えたりすることにより、汎用のインタフェースを実現しているものである。
【0003】
図4は、このようなGPIOの構成の一例を示したブロック図である。
先ず、この図に示されるGPIO100において、端子t1、端子t2、端子t3は、当該GPIO100が備えられるデータ処理装置と、外部装置との間で各種データ通信を行うための端子である。ここでは、外部装置との間で通信を行うための端子として、端子t1〜t3の3つのみが備えられる場合を挙げているが、これらの端子数は、外部装置との間での通信が想定されるデータの本数等に応じて任意に設定されればよいものである。
【0004】
これら各端子tに対しては、図のように入力バッファ108と出力バッファ109とが1つずつ備えられている。そして、各端子t対応に備えられる出力バッファ109−1〜109−3のそれぞれに対しては、入出力制御バス107を介して、入出力制御レジスタ104からのenable/disenable信号が供給される。
この場合、出力バッファ109−1〜109−3は、例えば上記入出力制御レジスタ104が出力したenable信号に応じてオンとなるようにされている。また、disenable信号に応じてはオフとなるようにされている。
つまりこの場合、上記入出力制御レジスタ104が出力したenable信号によっては、出力バッファ109が有効となり、対応する端子tを出力設定とすることができる。また、disenable信号によっては、入力バッファ108が有効となり、対応する端子tを入力設定とすることができる。
このようにして、GPIO100においては、各端子tに対応する出力バッファ109にenable信号が供給されるか、又はdisenable信号が供給されるかによって、各端子tの入力設定/出力設定が切り換えられるものとされている。
【0005】
入出力制御レジスタ104には、上記のように端子tごとに入力/出力の設定を行うためのenable/disenable信号としての値が、当該GPIO100が備えられる例えばDSPやCPUの中心的制御を行うコア部から、図示する入出力制御部101を介して入力される。
この場合、入出力制御レジスタ104内には、端子tの数(出力バッファ109の数)に対応した複数のレジスタが構成される。その上で、これらレジスタのそれぞれは、入出力制御バス107を介して出力バッファ109−1〜109−3のうちの対応するものと接続されている。
このような構成による入出力制御レジスタ104に対し、上記コア部は、入出力制御部101に上記enable/disenable信号としての値を供給すると共にそのアドレスを指定することで、この入出力制御レジスタ104内の対応するレジスタに値を書き込ませることができる。そして、レジスタに保持された値は、上記入出力制御バス107を介して接続された対応する出力バッファ109に対して供給されるものとなる。
つまり、このようにしてコア部は、入出力制御部101にデータとアドレスを指定し、入出力制御レジスタ104内の各レジスタに対応する値を書き込ませることにより、端子t1〜t3の入力/出力設定を行うことができるものである。
【0006】
出力データレジスタ103にも、この場合は各出力バッファ109対応に複数のレジスタが備えられる。そして、これらレジスタのそれぞれは、出力データバス106を介して対応する出力バッファ109に対して接続される。その上で、この場合も上記コア部は、入出力制御部101を介してこれらのレジスタに対応する値を書き込むことにより、外部装置への送信データとしての値を、対応する出力バッファ109に対して供給させることができる。
これによって上記コア部は、予め設定された所定の端子tから、送信データとして値を出力させることができるものである。
【0007】
また、入力データレジスタ102としても、入力バッファ108−1〜108−3に対応した数のレジスタが備えられる。そして、この入力データレジスタ102の各レジスタとしても、入力データバス105を介して対応する入力バッファ108と接続されている。
この入力データレジスタ102においては、外部装置から所要の端子tに供給され、対応する入力バッファ108に得られた値が、図示する入力データバス105を介して対応するレジスタに対して入力される。
そして、上述のコア部は、入出力制御部101にアドレスを指定して、この入力データレジスタ102内のレジスタに保持された値の読出を行わせることにより、外部装置からの入力データを取り込むことができる。
【0008】
ここで、上記構成によるGPIO100を用いて、例えば外部装置との間でシリアルデータ通信を行うとする。そしてこのとき、例えば図のように端子t1ではこのようなシリアル通信に必要なシフトクロックを、また端子t2では出力データを、端子t3では入力データを通信するものとされたとする。
このような条件に対応するために、先ずは、当該GPIO100を備えるDSPやCPU等のコア部は、上記入出力制御レジスタ104を用いた各端子tの設定を行う。すなわち、先の説明のように、上記入出力制御レジスタ104に値を入力することによって、各端子tの入力設定/出力設定を決定するものである。
【0009】
そして、このように各端子tに対応する入力設定/出力設定を行った上で、コア部は、外部装置に対して送出すべき出力データ及びシフトクロックについては、それぞれ対応する値を出力データレジスタ103に対して書き込むことによって出力させる。つまりこの場合、上記出力データについては、出力データレジスタ103内における端子t2に対応するレジスタに対し、その値を1ビットずつ順次に書き込む。また、上記シフトクロックについては、端子t1に対応したレジスタに対し、H/Lを示す1ビットの値を順次書き込む。
このように出力データレジスタ103に順次書き込まれる値は、先にも説明したように、出力データバス106を介して対応する出力バッファ109に対して供給される。そしてこれにより、この場合は上記出力データを構成する値が端子t2から、またシフトクロックとしての値は端子t1から順次出力される。つまり、これによって、上記した条件に対応して、端子t1からはシフトクロックを、端子t2からは出力データをそれぞれ出力することが可能となるものである。
【0010】
またこの際、端子t3を介して外部装置から入力される入力データに関しては、その値が、入力バッファ108−3を介して入力データレジスタ102内の対応するレジスタに順次供給されるものとなる。そして、コア部としては、このように端子t3に対応するレジスタに順次保持される1ビットの値を、入出力制御部101にアドレスを指示することによって順次読み出す。
これによってコア部は、端子t3に供給される入力データを取り込むことができる。
【0011】
なお、下記の特許文献には、通信時にコア側が書き込むべきデータの複数ビットを、通信開始前に予めマスクレジスタに対して保持させておくようにしたことにより、通信時におけるコア部の処理負担を軽減するものが記載されている。
【特許文献】
特開2001−195384
【0012】
【発明が解決しようとする課題】
上記のようにして、従来の構成によるGPIO100を用いたシリアル通信を行う場合では、シフトクロックを出力するために、上記コア部は、出力データレジスタ103内の対応するレジスタに対して常に値を書き込み続けなくてはならなかった。また、出力データについても、これを連続的に出力させるために、対応するレジスタに1ビットずつ順次に値を書き込まなければならなかった。
つまり、この場合のコア部としては、シフトクロック、出力データを外部装置に対して送出するにあたり、通信中は出力データレジスタ103に対して常に値を書き込み続けなくてはならなかったものである。
また、同様に外部装置から入力されたデータの読み込みに関しても、入力データレジスタ102内のレジスタに順次保持される値を途切れなく読み出すために、常にデータの読み出し処理を行っていなくてはならなかった。
【0013】
このために、図4に示した従来のGPIO100を用いてシリアル通信を行う場合、データ処理装置のコア部は、通信中にこのようなシリアル通信を行うための処理に占有されてしまい、この間は他の処理を行うことができなくなってしまうという問題があった。
また、この際、上述のようなGPIO100を用いた通信動作を実現するためには、コア部のプログラムに上記のような順次の読み書きを行わせるための一連の処理動作を記述せねばならず、これによってプログラムコードサイズが増大化してしまうという問題もあった。
【0014】
なお、先にも述べたように上記した特許文献では、通信時にコア側が書き込むべきデータの複数ビットを、通信開始前に予めマスクレジスタに対して保持させておくようにしたことにより、通信時におけるコア部の処理負担を軽減するようにしているが、この構成によると、シリアル通信を行う場合に依然としてコア部はシフトクロック周期でマスクレジスタにアクセスし続けなければならず、シリアル通信中におけるコア部の処理に空き時間が得られるものではない。
【0015】
【課題を解決するための手段】
そこで、本発明では以上のような問題点に鑑み、外部装置との間でデータ通信を行うデータ入出力装置として、以下のように構成することとした。
すなわち、先ず、出力データを保持する第1のデータ保持手段と、シリアル通信により出力するシリアルデータを保持する第2のデータ保持手段とを備える。
そして、供給されたモード切り替え信号に応じて、上記第1のデータ保持手段に保持された上記出力データ、又は上記第2のデータ保持手段に保持された上記シリアルデータを選択的に出力する第1の選択手段を備え、さらに、シリアル通信用の通信クロックを生成するクロック生成手段と、上記モード切り替え信号に応じて、供給された汎用クロック又は上記通信クロックを選択的に出力する第2の選択手段とを備えるようにした。
【0016】
また本発明では、外部装置との間でデータ通信を行うデータ処理装置として以下のように構成することとした。
つまり、先ず、所定のデータ処理を実行すると共に、上記データ通信を制御するプロセッサを備える。
そして、上記データ処理により生成された出力データを保持する第1のデータ保持手段と、上記データ処理により生成されたデータの中で、シリアル通信により出力するシリアルデータを保持する第2の保持手段とを備え、また、上記プロセッサから供給されたモード切り替え信号に応じて、上記第1のデータ保持手段に保持された上記出力データ、又は上記第2の保持手段に保持された上記シリアルデータを選択的に出力する第1の選択手段を備えるようにする。
その上で、シリアル通信用の通信クロックを生成するクロック生成手段と、上記モード切り替え信号に応じて、上記プロセッサから供給された汎用クロック又は上記通信クロックを選択的に出力する第2の選択手段とを備えるようにした。
【0017】
このようにして本発明では、シリアル通信時に必要な通信クロック(シフトクロック)をデータ入出力装置側で生成してこれを出力するようにしたから、この場合の上記データ処理装置におけるプロセッサ(コア部)は、従来のようにシフトクロックの値を順次出力させるために、例えばレジスタにその値を書き込み続ける必要がなくなる。
また、シリアル通信により出力するシリアルデータに関しては、上記第2のデータ保持手段において、例えば複数ビットのデータを保持可能とすれば、上記プロセッサは複数ビットのデータを一度に書き込むことができる。つまりこの場合、上記プロセッサは、シリアル通信中にシリアルデータとしての値を書き込み続ける必要がなくなるものである。
これにより、上記プロセッサとしては、通信を行うための処理負担が軽減されると共に、通信中における処理に空き時間が得られる。
またこの際、汎用の出力データについては、上記第1の保持手段において保持可能とされ、このとき上記第1の選択手段が設けられることで、上記シリアルデータとこの汎用の出力データとを選択的に出力することが可能とされる。さらに、上記第2の選択手段が設けられることで、シリアル通信用の通信クロックと汎用のクロックとを選択的に出力することが可能とされる。
つまり、このような本発明によれば、従来と同様の汎用インタフェースとしての機能も実現可能なものである。
【0018】
【発明の実施の形態】
以下、本発明の実施の形態について説明する。
図1は、本発明の実施の形態としての入出力装置が備えられた、実施の形態としてのデータ処理装置の内部構成例を示すブロック図である。
この図1において、実施の形態のデータ処理装置としては、例えばCD(Compact Disc)、DVD(Digital Versatile Disc)等の各種メディアの記録再生装置内に備えられ、各種オーディオ信号処理を実行するようにされたDSP(Digital Signal Processor)としての構成を有する。
先ず、このような実施の形態としてのDSP50において、図示するDPSコア51は、入力されたオーディオ信号に対するデジタルオーディオ信号処理を行うと共に、図示する第1バス55、第2バス54を介した各部の全体制御を行う。
このDSPコア51に対しては、図のようにプログラムメモリ52、データメモリ53が接続され、上記プログラムメモリ52には、上記した全体制御を実現するためのプログラムが格納されている。また、上記データメモリ53は、DSPコア51の作業領域として使用される。
【0019】
また、このDSPコア51に対しては、第1バス55を介してタイマ57、ICU58、GPIO(General Purpose Input/output:汎用端子)1、オーディオインタフェース59が接続される。
上記タイマ57は、DSPコア51の各種計測や処理タイミング制御に使用される。
また、上記ICU58は、上記DSPコア51へのインタラプト制御を行う。
上記GPIO1は、実施の形態としての入出力装置であり、プログラマブルに各端子の用途を変更可能に構成された汎用の外部入出力インタフェースである。なお、実施の形態としてのGPIO1の内部構成については後の図2において説明する。
また、上記オーディオインタフェース59では、外部装置との間でのオーディオ信号の授受が行われる。
【0020】
上記したプログラムメモリ52、データメモリ53は、それぞれ第2バス54と接続され、さらにこの第2バス54に対しては、バスコントローラ56、外部メモリインタフェース60、ホストインタフェース61が接続されている。
バスコントローラ56は、上記した第1バス55に対しても接続されており、これら第1バス55及び第2バス54を介した通信の制御をDSPコア51の制御に基づいて行う。
また、上記外部メモリインタフェース60においては、当該DSP50の外部メモリとの間でデータの授受が行われる。
また、上記ホストインタフェース61は、当該DSP50が備えられる例えば記録再生装置全体の制御を行うものとされるマイクロコンピュータとの間でデータ転送が行われる。
【0021】
ここで、上記のように構成されるDSP50において、第1バス55を介してDSPコア51と接続されるタイマ57、ICU58、GPIO1、オーディオインタフェース59、及びバスコントローラ56のそれぞれは、内部にDSPコア51からの読み書きが可能なレジスタが備えられ、これらのレジスタはメモリマップされている。そして、DSPコア51は、これら各々のレジスタに対して値を書き込むことにより、上記したタイマ57、ICU58、GPIO1、オーディオインタフェース59、及びバスコントローラ56の動作を制御することが可能とされている。
【0022】
続いては、図2を用いて、実施の形態としてのGPIO1の内部構成について説明する。
先ず、この図において、本実施の形態のGPIO1では、図示する入出力制御部2、GPIO入出データレジスタ3、GPIO出力データレジスタ4、GPIO入出力制御レジスタ5、入力データバス14、出力データバス15、入出力制御バス16、入力バッファ20−1〜20−n、及び出力バッファ21−1〜21−nによる、GPIO機能部が形成される。このGPIO機能部によって、従来と同様のGPIO機能が実現される。
【0023】
このGPIO機能部において、それぞれ1組を為す入力バッファ20−1・出力バッファ21−1、入力バッファ20−2・出力バッファ21−2・・・入力バッファ20−n・出力バッファ21−nの組のそれぞれは、n個の端子t1〜tnのうちの対応する端子tと接続されている。
そして、図示するように、入力バッファ20−1〜20−nのそれぞれは、入力データバス14に接続されている。また、出力バッファ21−1〜21−nのそれぞれは、出力データバス15と接続されている。
なお、本実施の形態のGPIO1においては、出力バッファ21−1と出力データバス15との間、及び出力バッファ21−2と出力データバス15との間に、図示するようにセレクタ18及びセレクタ19がそれぞれ挿入されるものとなるが、このGPIO機能部についての説明においては、便宜上これらのセレクタはないものとして説明を続ける。
【0024】
また、上記出力バッファ21−1〜21−nのそれぞれは、図示する入出力制御バス16を介してGPIO入出力制御レジスタ5に対して接続されており、これにより、出力バッファ21−1〜21−nに対する、GPIO入出力制御レジスタ5からのenable/disenable信号の供給経路が形成されている。
ここで、上記出力バッファ21−1〜21−nは、例えば上記GPIO入出力制御レジスタ5が出力したenable信号に応じてオンとなるようにされている。また、disenable信号に応じてはオフとなるようにされている。
つまりこの場合、上記GPIO入出力制御レジスタ5が出力したenable信号によっては、出力バッファ21が有効となり、対応する端子tが出力設定とされる。また、disenable信号によっては、入力バッファ20の方が有効となり、対応する端子tが入力設定とされるものである。
このようにして、GPIO機能部においては、各端子tに対応する出力バッファ21にenable信号が供給されるか、又はdisenable信号が供給されるかによって、各端子tの入力設定/出力設定が切り換えられる。
【0025】
GPIO入出力制御レジスタ5には、上記のように端子tごとに入力/出力の設定を行うためのenable/disenable信号としての値が、先の図1により示したDSPコア51(制御部)から、図示する入出力制御部2を介して入力される。
上記GPIO入出力制御レジスタ5内には、端子tの数(出力バッファ21の数)に対応した複数のレジスタが構成される。すなわち、各端子tごとに対応づけられた、複数のレジスタが構成されている。その上で、これらレジスタのそれぞれは、先の入出力制御バス16を介して、出力バッファ21−1〜21−nのうちの対応する1つの出力バッファ21と接続されている。
このような構成によるGPIO入出力制御レジスタ5に対し、上記DPSコア51は、入出力制御部2にenable/disenable信号としての値を供給し、且つそのアドレスを指定することで、この入出力制御レジスタ5内の対応するレジスタに値を書き込ませることができる。そして、これによりレジスタに保持された値は、上記のように入出力制御バス16を介して接続された、対応する出力バッファ21に対して供給されるものとなる。
つまり、制御部としてのDSPコア51は、このようにして入出力制御部2にデータとアドレスを指定して、入出力制御レジスタ5内の所要のレジスタに対応する値を書き込ませることにより、端子t1〜tnの入力/出力設定を行うことができるものである。
【0026】
GPIO出力データレジスタ4にも、各出力バッファ21対応に複数のレジスタが備えられる。そして、この場合もこれらレジスタのそれぞれは、出力データバス15を介して対応する出力バッファ21に対して接続される。
その上で、この場合も上記DSPコア51は、入出力制御部2にデータとアドレスを指定し、所要のレジスタに対応する値を書き込ませることにより、外部装置への送信データとしての値を、対応する出力バッファ21に対して供給させることができる。
これによってDSPコア51は、予め設定された所定の端子tから、送信データとして値を出力させることができるものである。
【0027】
また、GPIO入力データレジスタ3としても、入力バッファ20−1〜20−nに対応した数のレジスタが備えられる。そして、このGPIO入力データレジスタ3の各レジスタとしても、入力データバス14を介して対応する入力バッファ20と接続されている。
このGPIO入力データレジスタ3においては、外部装置から所要の端子tに供給され、対応する入力バッファ20に得られた値が、上記入力データバス14を介して対応するレジスタに対して入力される。
そして、DSPコア51は、入出力制御部2にアドレスを指定して、このGPIO入力データレジスタ3内のレジスタに保持された値の読み出しを行わせることにより、外部装置からの入力データを取り込むことができる。
【0028】
入出力制御部2は、DSPコア51の制御に基づいて、この図1に示されるそれぞれのレジスタ(GPIO入力データレジスタ3、GPIO出力データレジスタ4、GPIO入出力制御レジスタ5、及び後述するシリアル出力データレジスタ6、シリアル入力データレジスタ7、シリアル通信モードレジスタ10、シリアル通信ステータスレジスタ12、及びシリアル通信切替レジスタ13)に対するデータの読出/書込を行う。
例えば、上記DSPコア51からの書込指令として、データ及びアドレス情報が供給された場合は、このアドレス情報により示される対応するレジスタに対して上記データを書き込むように制御を行う。また、例えば読出指令としてアドレス情報が供給された場合は、このアドレス情報により示されるレジスタに保持されている値の読出を行って、これをDSPコア51に対して転送する。
【0029】
上記構成によるGPIO機能部においては、上述のように制御部としてのDSPコア51により、上記GPIO入出力制御レジスタ5内のレジスタに対応する値が書き込まれることによって、各端子tの入力/出力設定が切り替わるものとなる。また、上記GPIO出力データレジスタ4内のどのレジスタに値が書き込まれるかによって、出力データが出力される端子tが変更される。
また、さらに外部装置からの入力データについては、上記で説明したようにGPIO入力データレジスタ3内に構成される、データが供給された端子tに対応するレジスタにその値が保持される構成とされたことにより、DSPコア51がこれを取り込むことができる。
すなわち、このようなGPIO機能部の構成によっては、DSPコア5の通信制御動作次第で端子t1〜tnを用いた如何なる通信をも行うことが可能であり、これによって汎用のインタフェースが実現されるものである。
【0030】
ここで、本実施の形態のGPIO1においては、上記構成によるGPIO機能部に対し、図示するようにシリアル通信部1aが備えられるものとなる。
このシリアル通信部1aは、外部装置との間でのシリアル通信に特化した動作を行うために備えられるものである。そしてこの場合は、例えば図示するように端子t1ではシフトクロック、端子t2では出力データ、端子t3では入力データを通信する形態に対応するように構成される。
【0031】
このシリアル通信部1aにおいて、先ず、シリアル出力データレジスタ6、シリアル通信モードレジスタ10、シリアル通信ステータスレジスタ12、及びシリアル通信切替レジスタ13のそれぞれの入力側は、上記で説明した入出力制御部2と接続されている。そして、これにより、上記シリアル出力データレジスタ6、シリアル通信モードレジスタ10、シリアル通信ステータスレジスタ12、及びシリアル通信切替レジスタ13には、DSPコア51からの供給データが上記入出力制御部2を介して入力可能とされる。
また、シリアル入力データレジスタ8は、出力側が上記入出力制御部2と接続されており、これによりDSPコア51は、シリアル入力データレジスタ8に保持された値を、上記入出力制御部2を介して取り込むことが可能とされる。
【0032】
上記シリアル出力データレジスタ6は、DSPコア51から入出力制御部2を介して入力される、シリアル通信に係る複数ビットの出力データを同時に保持可能に構成される。
このシリアル出力データレジスタ6の出力側は、シフトレジスタ7の入力側と接続されている。そして、このシフトレジスタ7の出力側は、先に述べたセレクタ19の一方の入力端子と接続されている。
上記セレクタ19の他方の入力端子は、図示するように出力データバス15と接続され、この場合はこの出力データバス15を介し、GPIO出力データレジスタ4内の端子t2に対応したレジスタと接続されている。
また、このセレクタ19の出力側は、この場合は出力バッファ21−2(端子t2)と接続されている。
【0033】
シリアル入力データレジスタ8の入力側は、シフトレジスタ9の出力側と接続される。
このシリアル入力データレジスタ8は、上記シフトレジスタ9から入力される、シリアル通信に係る複数ビットの入力データを同時に保持可能に構成される。
上記シフトレジスタ9の入力側は、この場合、入力バッファ20−3(端子t3)に対して接続されている。
【0034】
シリアル通信モードレジスタ10の出力は、シフトクロック生成回路11に対して入力される。また、このシフトクロック生成回路11には、シリアル通信ステータスレジスタ12の出力も入力されるものとなる。
【0035】
このシフトクロック生成回路11には、図1に示したDSP50において使用されるマスタークロックが入力されている。そして、このように入力されるマスタークロックと、上記シリアル通信モードレジスタ10からの出力値とに基づいて、シリアル通信に用いるシフトクロックを生成する。
このシフトクロック生成回路11により生成されるシフトクロックは、上記したシフトレジスタ7及びシフトレジスタ9のクロック入力として供給される。
また、さらにこのシフトクロックは、図示するように、この場合はセレクタ18の一方の入力端子に対して供給される。
【0036】
このセレクタ18の他方の入力端子は、出力データバス15と接続され、この出力データバス15を介し、GPIO出力データレジスタ4内の端子t1に対応するレジスタに対して接続されている。
また、このセレクタ18の出力側は出力バッファ21−1に対して接続される。
【0037】
シリアル通信切替レジスタ13の出力は、図示する通信切換バス17を介して上記セレクタ18、セレクタ19に対して供給される。この場合、シリアル通信切替レジスタ13内には、1つのレジスタが構成される。このレジスタに保持された値は、上記シリアル通信切換バス17を介してセレクタ18、セレクタ19に供給されるように構成されている。
【0038】
上記構成によるシリアル通信部1aにおける、それぞれのレジスタの機能内容を次の図3に示す。
先ず、シリアル出力データレジスタ6は、シリアル通信時に外部装置に対して供給すべき出力データを書き込むためのレジスタである。先にも述べたように、このシリアル出力データレジスタ6は、DSPコア51から入出力制御部2を介して供給される、シリアル通信に係る複数ビットのデータを同時に保持可能に構成される。つまりこの場合は、シリアル通信時に端子t2を介して出力すべき、複数ビットの出力データを同時保持可能に構成されているものである。例えばこの場合、図示するように32bitのデータを同時に保持可能とされているものとする。
【0039】
シリアル入力データレジスタ8は、シリアル通信時に外部装置から供給される入力データを書き込むためのレジスタである。このシリアル入力データレジスタ8としても、シリアル通信に係る複数ビットのデータを同時に保持可能に構成される。つまり、シリアル通信時に端子t3に得られ、シフトレジスタ9を介して入力される複数ビットの入力データを同時保持可能に構成されているものである。
例えば、このシリアル入力データレジスタ8としても32bitのデータを同時に保持可能に構成されているものとする。
【0040】
シリアル通信モードレジスタ10は、外部装置との間で行うシリアル通信のフォーマットを設定するためのレジスタである。
このシリアル通信モードレジスタ10には、図2に示したシフトクロック生成回路11において生成させるシフトクロックの、ビット長、初期値(停止状態時の値)、MSB/LSBfirst、及び周波数を設定するための値が、DSPコア51から供給されこれらが保持される。
そして、これらの値がシフトクロック生成回路11に供給されることで、上記したシフトクロックのビット長、初期値(停止状態時の値)、MSB/LSBfirst、周波数のそれぞれの項目が設定されるものとなる。
【0041】
この場合、図示するように上記したビット長の設定については、1〜32bitの設定が可能とされる。このために、この場合のシリアル通信モードレジスタ10には、このような1〜32bitを設定するための5bit構成によるデータが、DSPコア51側から供給される。
また、シフトクロック停止状態値(初期値)の設定としては、H/Lが設定可能であり、DSPコア51側からはこのようなH/Lを設定するための1bitのデータが供給される。また、MSB/LSBfirstについても、これを設定するための1bitによるデータがDSPコア51側から供給される。
シフトクロックの周波数については、この場合、マスタークロックの分周比を設定するようにされる。例えばこの場合は、図示するように1/64〜1/8192が設定可能であり、DSPコア51側からはこれを設定するための3bitのデータが供給される。
【0042】
シリアル通信ステータスレジスタ12は、シリアル通信の開始指示、及び通信状態のモニタ用のレジスタである。
この場合、DSPコア51は、例えばこのシリアル通信ステータスレジスタ12に「1」を書き込むことによりシリアル通信を開始させることができる。そして、このような通信時における例えば1転送分の動作の終了に応じては「0」が書き込まれる。
また、このことから、このシリアル通信ステータスレジスタ12の値は、「1」はデータ転送中、「0」は転送終了を示すものとなる。そして、これにより、このシリアル通信ステータスレジスタ12に保持される値を確認することによっては、通信状態をモニタすることが可能となる。
【0043】
シリアル通信切替レジスタ13は、シリアル通信部1aによるシリアル通信と、従来のGPIO機能部による通信との切替を行うためのレジスタであり、このような切替を行うための1bitのデータがDSPコア51側から供給される。
この場合、DSPコア51は、GPIO機能部を用いたノーマル通信を行うとしたときに対応して、例えば「0」を書き込むようにされる。また、シリアル通信部1aによるシリアル通信を行うとしたときは、「1」を書き込むようにされている。
【0044】
ここで、このような構成によるシリアル通信部1aを用いたシリアル通信が行われる際の動作について説明する。
なお、この場合は、先にも述べたように端子t1ではシフトクロック、端子t2では出力データ、端子t3では入力データの通信を行うものとされていることとする。
先ず、このような条件に対応するためにDSPコア51は、入出力制御部2にデータとアドレスを指定することにより、GPIO入出力制御レジスタ5内の対応するレジスタに値を書き込んで、出力バッファ21−1、21−2、21−3に対応するenable/disenable信号を供給するようにされる。
つまりこの場合、出力バッファ21−1、21−2に対してはenable信号を供給し、端子t1、端子t2を出力設定とする。また、出力バッファ21−3に対してはdisenable信号を供給して端子t3を入力設定とする。
【0045】
また、DSPコア51は、このようなシリアル通信部1aによる通信への切替を行うために、シリアル通信切替レジスタ13に「1」を書き込むようにされる。
このようにシリアル通信切替レジスタ13に「1」が書き込まれることにより、この値が通信切替バス17を介してセレクタ18、セレクタ19の制御端子に入力される。そしてこれに応じ、セレクタ18では、シフトクロック生成回路11からのデータを入力するように切替が行われる。また、セレクタ19では、シフトレジスタ7(つまりシリアル出力データレジスタ6)からのデータを入力するように切替が行われる。
つまり、これにより端子t1からはシフトクロックを、また端子t2からは出力データを出力できる状態が得られるものとなる。
【0046】
さらに、DSPコア51は、シリアル通信のフォーマットを設定するために、シリアル通信モードレジスタ10に対し、先の図3にて説明した各項目に対応する値を書き込むようにされる。
そしてこれにより、シフトクロック生成回路11にて対応するシフトクロックが生成される状態が得られることになる。
【0047】
そして、本実施の形態の場合、DSPコア51は、シリアル出力データレジスタ6に対する出力データの複数ビットの書き込みを行う。
つまりこの場合、先にも説明したようにシリアル出力データレジスタ6としては、出力データとして複数ビットのデータを保持可能に構成されているから、これによりDSPコア51は、通信を開始させる前において、一度に複数ビットの出力データの書き込みを行うことができるものである。
このようにシリアル出力データレジスタ6に保持されたデータは、然るべきタイミングでシフトレジスタ7にロードされる。
【0048】
なお、ここで説明した各端子tの入出力設定、ノーマル/シリアルの通信切換、シフトクロック設定、レジスタへの出力データの書込の順は任意とされてよい。
【0049】
このように各端子tの入出力設定、ノーマル/シリアルの通信切換、シフトクロック設定、レジスタへの出力データの書込を行った上で、DSPコア51は、通信を開始させるとしたときにシリアル通信ステータスレジスタ12に値「1」を書き込むようにされる。
これに応じては、このシフトクロック生成回路11からのシフトクロックの出力が開始され、これによってセレクタ18、出力バッファ18を介して、端子t1からこのシフトクロックが出力されるものとなる。
つまり、このシフトクロック生成回路11を設けたことにより、外部装置に供給すべきシフトクロックが端子t1を介して自動的に出力されるようになるものである。
【0050】
また、シフトクロック生成回路11から出力されるシフトクロックは、シフトレジスタ7及びシフトレジスタ9のクロック入力に対しても供給される。
これによって、上記シフトレジスタ7からは、ロードされた出力データがこのシフトクロックのタイミングで順次出力される。そして、このようにシフトレジスタ7から順次出力される出力データは、この場合はセレクタ19及び出力バッファ19を介して、端子t2から出力される。
つまりこのことから、上記出力データは、上記シフトクロック生成回路11から出力されるシフトクロックのタイミングに基づいて自動的に外部装置に対して出力されるものである。
【0051】
また、入力データに関しては、この場合は端子t3、入力バッファ20−3を介して、入力データバス14に供給される。そして、このように入力データバス14に入力データが供給されることにより、シフトレジスタ9にこの入力データが供給される。
上記もしたように、このときシフトレジスタ9には、シフトクロック生成回路11からのシフトクロックが入力されることになるから、このようにシフトレジスタ9に供給される入出データは、このシフトクロックのタイミングで順次このシフトレジスタ9に保持されていくものとなる。
【0052】
シフトレジスタ9に保持された入力データは、シリアル通信が終了したタイミングでシリアル入力データレジスタ8に対して供給される。
ここで、上記もしたように、この場合のシリアル入力データレジスタ8は、このようなシリアル通信に係る入力データの複数ビットを保持可能に構成されているものである。つまり、このことからこの場合のDSPコア51は、シリアル入力データレジスタ8に複数ビットの入力データが保持された後に、この入力データを一度に取り込むことが可能とされるものである。
【0053】
なお、図2の構成によると、上記のように入力データバス14に供給された入力データは、GPIO入力データレジスタ3に対しても入力されるものとなる。従ってこの際、DSPコア51としては、上記シリアル入力データレジスタ8、GPIO入力データレジスタ3のどちらからでも読出を行うことができるが、GPIO入力データレジスタ3から読み出す場合は、ここに保持される値を従来のように逐次読み続けなくてはならないことになる。
従って、シリアル通信部1aによるシリアル通信を行うとした場合、DSPコア51側は、入力データをシリアル入力データレジスタ8から読み出すようにプログラムされている必要がある。
【0054】
上記のようなシリアル通信が終了したとされた場合は、シリアル通信ステータスレジスタ13に「0」が書き込まれる。この値「0」の書き込みは、通信が終了したことが検出されたことに応じて、シリアル通信部1a側が行う。例えば、このような値「0」の書き込みは、シフトクロック生成回路11がクロックの終了タイミングに応じて行うようにすればよい。
このようにして、シリアル通信ステータスレジスタ13に「0」が書き込まれることにより、例えば1つのデータ転送動作が終了したことが示されるものとなる。
なお、このようにシリアル通信ステータスレジスタ13の値が「0」となったタイミングでICU58に転送終了通知を供給することで、DSPコア51に対するインタラプトを発生させることもできる。
【0055】
このようにして本実施の形態のGPIO1では、シフトクロック生成回路11を設けて、シリアル通信時に用いるシフトクロックを生成することとしたことから、制御部としてのDSPコア51は、シリアル通信を行う際、シフトクロックを出力するためにレジスタに値を書き込み続ける必要がなくなる。
また、シリアル出力データレジスタ8に出力データの複数ビットを保持させ、これを上記シフトクロック生成回路11により生成されるシフトクロックに基づいて順次出力させるようにしたから、DSPコア51としては、シリアル通信中に出力データをレジスタに書き込み続ける必要がなくなる。
また、さらに本実施の形態では、外部装置から得られる入力データの複数ビットを同時保持可能としたことから、入力データが保持されるレジスタから値を読み出し続ける必要もなくなるものとなる。
【0056】
つまり、このような本実施の形態によれば、DSPコア51は、シリアル通信中においてシフトクロック、出力データ、入力データの通信を行うために、GPOI1にアクセスし続ける必要がなくなるものとなり、これによって、DSPコア51は、通信中においても他の処理を行うことが可能となる。
【0057】
またこの際、上記もしているようにDSPコア51としては、通信中においてレジスタに値の書込/読出を行い続ける必要がなくなるから、これに伴って通信制御を行うためのプログラムのコードサイズを従来よりも削減できることにもなる。
【0058】
また、さらに本実施の形態では、図2に示したシリアル通信部1aとして、シリアル通信切替レジスタ13、セレクタ18、セレクタ19を備えるようにしたことにより、DSPコア51によって上記シリアル通信切替レジスタ13に書き込まれる値に応じて、従来のGPIO機能部による通信、シリアル通信部1aによる通信を切り替えることが可能とされている。
また、このようなセレクタ18、セレクタ19を備えるようにし、GPIO機能部とシリアル通信部1aとで用いる端子tを共通化したことから、本実施の形態としてのシリアル通信を、端子tの増加なしで行うことが可能とされている。
【0059】
なお、上記した実施の形態では、本発明のデータ処理装置が、例えばCD、DVD、その他のメディアに対応した記録再生装置に備えられてデジタルオーディオ信号処理を行うDSPとされる場合を例に挙げたが、本発明としては、例えば映像信号処理等の他のデジタル信号処理を行うデータ処理装置にも好適に適用できるものである。
【0060】
また、実施の形態では、端子t1ではシフトクロック、端子t2では出力データ、端子t3では入力データの通信を行うもとして、これに対応するGPIO1の構成を例示したが、例えば、シリアル出力データレジスタ6、シフトレジスタ7を増設して出力データの本数の増加に対応させたり、或いはシリアル入力データレジスタ8、シフトレジスタ9を増設して、入力データの本数の増加に対応した構成が採られてもよい。
またこの際、セレクタ18(或いはセレクタ19)を全端子tに対して設けるようにすれば、シリアル通信部1aが通信を行う端子tを選択することもできる。
【0061】
【発明の効果】
以上のように本発明では、例えば所定のデータ処理を実行すると共に上記データ通信を制御するプロセッサを備えたデータ処理装置に備えられて、外部装置との間でデータ通信を行うためのデータ入出力装置として、先ず、上記データ処理により生成された出力データを保持する第1のデータ保持手段と、上記データ処理により生成されたデータの中で、シリアル通信により出力するシリアルデータを保持する第2のデータ保持手段とを備えるようにしている。
そして、上記プロセッサから供給されたモード切り替え信号に応じて、上記第1のデータ保持手段に保持された上記出力データ、又は上記第2のデータ保持手段に保持された上記シリアルデータを選択的に出力する第1の選択手段とを備えるようにしている。
その上で、シリアル通信用の通信クロックを生成するクロック生成手段と、上記モード切り替え信号に応じて、供給された汎用クロック又は上記通信クロックを選択的に出力する第2の選択手段とを備えるようにしている。
【0062】
上記のような本発明では、シリアル通信時に必要な通信クロック(シフトクロック)は、データ入出力装置側で生成されて出力されるようになるから、この場合の上記データ処理装置におけるプロセッサ(コア部)は、従来のようにシフトクロックの値を順次出力させるために、例えばレジスタにその値を書き込み続ける必要がなくなる。
また、シリアル通信により出力するシリアルデータに関しては、上記第2のデータ保持手段において、例えば複数ビットのデータを保持可能とすれば、上記プロセッサは複数ビットのデータを一度に書き込むことができる。つまりこの場合、上記プロセッサは、シリアル通信中にシリアルデータとしての値を書き込み続ける必要がなくなるものである。
【0063】
これにより、本発明において上記プロセッサは、通信を行うための処理負担が軽減されると共に、通信中における処理に空き時間が得られるようになり、通信中においても他の処理を行うことが可能となる。
またこの際、通信制御のためのプログラムから、上記のようなレジスタに対する書き込みを実行させるための記述を削除でき、プログラムコードサイズを従来よりも小さくすることができる。
【0064】
また、上記本発明によれば、汎用の出力データについては、上記第1の保持手段において保持可能とされ、このとき上記第1の選択手段が設けられることで、上記シリアルデータとこの汎用の出力データとを選択的に出力することが可能とされている。さらに、上記第2の選択手段が設けられることで、シリアル通信用の通信クロックと汎用のクロックとを選択的に出力することが可能とされる。
つまり、このような本発明によれば、従来と同様の汎用インタフェースとしての機能も実現可能なものである。
【図面の簡単な説明】
【図1】本発明における実施の形態としてのデータ処理装置の内部構成例について示すブロック図である。
【図2】本発明の実施の形態としてのデータ入出力装置の内部構成例について説明するための回路図である。
【図3】実施の形態のデータ入出力装置が備える各レジスタの機能内容を説明するための図である。
【図4】従来のデータ入出力装置の構成を示す回路図である。
【符号の説明】
1 GPIO、2 入出力制御部、3 GPIO入力データレジスタ、4 GPIO出力データレジスタ、5 GPIO入出力制御レジスタ、6 シリアル出力データレジスタ、7、9 シフトレジスタ、8 シリアル入力データレジスタ、10 シリアル通信モードレジスタ、11 シフトクロック生成回路、12 シリアル通信ステータスレジスタ、シリアル通信切替レジスタ、18、19 セレクタ、50 DSP、51 DSPコア、52 プログラムメモリ、53 データメモリ、54 第2バス、55 第1バス、56 バスコントローラ、57タイマ、58 ICU、59 オーディオインタフェース、60 外部メモリインタフェース、61 ホストインタフェース
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data input / output device configured as a general-purpose input / output interface, and a data processing device including such a data input / output device and communicating with an external device.
[0002]
[Prior art]
For example, a data processing device such as a DSP (Digital Signal Processor) that performs digital signal processing and a CPU (Central Processing Unit) provided in various information processing devices include a general-purpose device for performing data communication with an external device. In some cases, a general purpose input / output (GPIO) is provided in some cases.
The GPIO is configured so that each terminal can be used in a programmable manner in accordance with a communication mode (for example, the number of communication data, serial / parallel communication, or the like) with an external device. In other words, a general-purpose interface is realized by, for example, arbitrarily changing the assignment of the terminal to be used or switching the input / output of each terminal.
[0003]
FIG. 4 is a block diagram showing an example of such a GPIO configuration.
First, in the GPIO 100 shown in this figure, terminals t1, t2, and t3 are terminals for performing various data communications between a data processing device provided with the GPIO 100 and an external device. Here, a case is described in which only three terminals t1 to t3 are provided as terminals for performing communication with an external device. However, the number of these terminals depends on whether communication with the external device is possible. What is necessary is just to set arbitrarily according to the assumed number of data and the like.
[0004]
Each terminal t is provided with one input buffer 108 and one output buffer 109 as shown. An enable / disable signal from the input / output control register 104 is supplied to each of the output buffers 109-1 to 109-3 provided for each terminal t via the input / output control bus 107.
In this case, the output buffers 109-1 to 109-3 are turned on in response to, for example, the enable signal output from the input / output control register 104. Further, it is turned off in response to the disable signal.
That is, in this case, depending on the enable signal output from the input / output control register 104, the output buffer 109 is enabled, and the corresponding terminal t can be set to output. Also, depending on the disable signal, the input buffer 108 is enabled, and the corresponding terminal t can be set for input.
In this manner, in the GPIO 100, the input setting / output setting of each terminal t is switched depending on whether the enable signal or the disable signal is supplied to the output buffer 109 corresponding to each terminal t. It has been.
[0005]
The value of the enable / disable signal for setting the input / output for each terminal t as described above is stored in the input / output control register 104 by the core which performs the central control of, for example, a DSP or CPU provided with the GPIO 100. The data is input from an input / output control unit 101 shown in FIG.
In this case, a plurality of registers corresponding to the number of terminals t (the number of output buffers 109) are configured in the input / output control register 104. In addition, each of these registers is connected to a corresponding one of the output buffers 109-1 to 109-3 via the input / output control bus 107.
The core unit supplies the value as the enable / disable signal to the input / output control unit 101 and specifies the address of the input / output control register 104 to the input / output control register 104 having such a configuration. Can be written to the corresponding register in the. Then, the value held in the register is supplied to the corresponding output buffer 109 connected via the input / output control bus 107.
That is, the core unit specifies the data and the address to the input / output control unit 101 and writes the values corresponding to the respective registers in the input / output control register 104 in this manner, so that the input / output of the terminals t1 to t3 is performed. Settings can be made.
[0006]
The output data register 103 also includes a plurality of registers corresponding to each output buffer 109 in this case. Each of these registers is connected to a corresponding output buffer 109 via an output data bus 106. Then, also in this case, the core unit writes the values corresponding to these registers via the input / output control unit 101, thereby transmitting the value as the transmission data to the external device to the corresponding output buffer 109. Can be supplied.
Thus, the core unit can output a value as transmission data from a predetermined terminal t set in advance.
[0007]
Also, as the input data register 102, a number of registers corresponding to the input buffers 108-1 to 108-3 are provided. Each of the input data registers 102 is also connected to the corresponding input buffer 108 via the input data bus 105.
In this input data register 102, a value supplied from an external device to a required terminal t and obtained in a corresponding input buffer 108 is input to the corresponding register via an input data bus 105 shown.
The above-described core unit fetches input data from an external device by designating an address to the input / output control unit 101 and reading out the value held in the register in the input data register 102. Can be.
[0008]
Here, it is assumed that serial data communication is performed with, for example, an external device using the GPIO 100 having the above configuration. At this time, it is assumed that, for example, a shift clock necessary for such serial communication is transmitted at a terminal t1, output data is transmitted at a terminal t2, and input data is transmitted at a terminal t3, as shown in FIG.
In order to respond to such a condition, first, a core unit such as a DSP or a CPU including the GPIO 100 sets each terminal t using the input / output control register 104. That is, as described above, the input setting / output setting of each terminal t is determined by inputting a value to the input / output control register 104.
[0009]
After performing the input setting / output setting corresponding to each terminal t in this manner, the core unit outputs the corresponding values for the output data and the shift clock to be transmitted to the external device, respectively. 103 is output by writing. That is, in this case, the value of the output data is sequentially written bit by bit into the register corresponding to the terminal t2 in the output data register 103. As for the shift clock, a 1-bit value indicating H / L is sequentially written into the register corresponding to the terminal t1.
The values sequentially written to the output data register 103 are supplied to the corresponding output buffer 109 via the output data bus 106 as described above. Thus, in this case, the value constituting the output data is sequentially output from the terminal t2, and the value as the shift clock is sequentially output from the terminal t1. In other words, this allows the shift clock to be output from the terminal t1 and the output data to be output from the terminal t2 in accordance with the above-described conditions.
[0010]
At this time, the value of the input data input from the external device via the terminal t3 is sequentially supplied to the corresponding register in the input data register 102 via the input buffer 108-3. Then, the core unit sequentially reads out the 1-bit values sequentially held in the register corresponding to the terminal t3 by instructing the input / output control unit 101 to address.
Thus, the core unit can take in the input data supplied to the terminal t3.
[0011]
In the following patent document, a plurality of bits of data to be written by the core side at the time of communication are stored in a mask register in advance before starting communication, thereby reducing the processing load on the core unit at the time of communication. What is reduced is listed.
[Patent Document]
JP 2001-195384A
[0012]
[Problems to be solved by the invention]
As described above, when performing serial communication using the GPIO 100 according to the conventional configuration, the core unit always writes a value to the corresponding register in the output data register 103 in order to output a shift clock. I had to continue. Also, in order to output the output data continuously, it is necessary to sequentially write the value into the corresponding register one bit at a time.
In other words, the core unit in this case has to constantly write the values to the output data register 103 during communication when transmitting the shift clock and the output data to the external device.
Similarly, when reading data input from an external device, the data must always be read in order to continuously read values held in the registers in the input data register 102 without interruption. .
[0013]
For this reason, when serial communication is performed using the conventional GPIO 100 shown in FIG. 4, the core part of the data processing device is occupied by processing for performing such serial communication during communication. There has been a problem that other processing cannot be performed.
At this time, in order to realize the communication operation using the GPIO 100 as described above, a series of processing operations for causing the program of the core unit to perform the sequential reading and writing as described above must be described. As a result, there is a problem that the program code size increases.
[0014]
In addition, as described above, in the above-mentioned patent document, a plurality of bits of data to be written by the core side at the time of communication are held in a mask register in advance before the start of communication. Although the processing load on the core unit is reduced, according to this configuration, when performing serial communication, the core unit still needs to keep accessing the mask register in the shift clock cycle, and the core unit during serial communication No free time is obtained in the processing of.
[0015]
[Means for Solving the Problems]
In view of the above problems, the present invention is configured as follows as a data input / output device for performing data communication with an external device.
That is, first, there are provided first data holding means for holding output data, and second data holding means for holding serial data output by serial communication.
Then, the first data for selectively outputting the output data held in the first data holding means or the serial data held in the second data holding means in response to the supplied mode switching signal. Clock generating means for generating a communication clock for serial communication, and second selecting means for selectively outputting the supplied general-purpose clock or the communication clock in accordance with the mode switching signal. And was prepared.
[0016]
Further, in the present invention, a data processing device for performing data communication with an external device is configured as follows.
That is, first, a processor that executes predetermined data processing and controls the data communication is provided.
A first data holding unit that holds output data generated by the data processing; and a second holding unit that holds serial data output by serial communication among data generated by the data processing. And selectively outputting the output data held in the first data holding means or the serial data held in the second holding means in response to a mode switching signal supplied from the processor. The first selection means for outputting the first selection means is provided.
In addition, clock generation means for generating a communication clock for serial communication, and second selection means for selectively outputting the general-purpose clock or the communication clock supplied from the processor in response to the mode switching signal. Was provided.
[0017]
As described above, in the present invention, a communication clock (shift clock) required for serial communication is generated on the data input / output device side and output therefrom. Therefore, in this case, the processor (core unit) in the data processing device is used. In the case of (1), it is not necessary to continuously write the value to the register, for example, in order to sequentially output the value of the shift clock as in the related art.
Further, regarding the serial data output by serial communication, if the second data holding means can hold, for example, a plurality of bits of data, the processor can write the plurality of bits of data at one time. That is, in this case, the processor does not need to continuously write a value as serial data during serial communication.
As a result, as for the processor, the processing load for performing communication is reduced, and an idle time is obtained for processing during communication.
At this time, the general-purpose output data can be held in the first holding means. At this time, the first selection means is provided, so that the serial data and the general-purpose output data can be selectively stored. Can be output. Further, the provision of the second selecting means enables a communication clock for serial communication and a general-purpose clock to be selectively output.
That is, according to the present invention, a function as a general-purpose interface similar to the related art can be realized.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described.
FIG. 1 is a block diagram showing an example of the internal configuration of a data processing device according to an embodiment provided with an input / output device according to an embodiment of the present invention.
In FIG. 1, the data processing device of the embodiment is provided in a recording / reproducing device for various media such as a CD (Compact Disc) and a DVD (Digital Versatile Disc), and executes various audio signal processing. It has a configuration as a DSP (Digital Signal Processor).
First, in the DSP 50 as such an embodiment, the illustrated DPS core 51 performs digital audio signal processing on an input audio signal, and controls each unit via the illustrated first bus 55 and second bus 54. Performs overall control.
As shown, a program memory 52 and a data memory 53 are connected to the DSP core 51. The program memory 52 stores a program for realizing the above-described overall control. The data memory 53 is used as a work area of the DSP core 51.
[0019]
A timer 57, an ICU 58, a GPIO (General Purpose Input / output: general-purpose terminal) 1, and an audio interface 59 are connected to the DSP core 51 via a first bus 55.
The timer 57 is used for various measurements of the DSP core 51 and processing timing control.
Further, the ICU 58 controls an interrupt to the DSP core 51.
The GPIO 1 is an input / output device as an embodiment, and is a general-purpose external input / output interface configured to be able to programmably change the use of each terminal. The internal configuration of the GPIO 1 according to the embodiment will be described later with reference to FIG.
The audio interface 59 exchanges audio signals with an external device.
[0020]
The above-mentioned program memory 52 and data memory 53 are connected to a second bus 54, respectively, and a bus controller 56, an external memory interface 60, and a host interface 61 are connected to the second bus 54.
The bus controller 56 is also connected to the first bus 55, and controls communication via the first bus 55 and the second bus 54 based on the control of the DSP core 51.
The external memory interface 60 exchanges data with the external memory of the DSP 50.
The host interface 61 performs data transfer with a microcomputer provided with the DSP 50, for example, which controls the entire recording / reproducing apparatus.
[0021]
Here, in the DSP 50 configured as described above, each of the timer 57, the ICU 58, the GPIO 1, the audio interface 59, and the bus controller 56 connected to the DSP core 51 via the first bus 55 is internally provided with the DSP core. Registers that can be read from and written to 51 are provided, and these registers are memory-mapped. The DSP core 51 can control the operations of the above-described timer 57, ICU 58, GPIO1, audio interface 59, and bus controller 56 by writing values to these registers.
[0022]
Subsequently, an internal configuration of the GPIO 1 as an embodiment will be described with reference to FIG.
First, in this figure, in the GPIO 1 of the present embodiment, the illustrated input / output control unit 2, GPIO input / output data register 3, GPIO output data register 4, GPIO input / output control register 5, input data bus 14, output data bus 15 , The input / output control bus 16, the input buffers 20-1 to 20-n, and the output buffers 21-1 to 21-n, form a GPIO function unit. The GPIO function unit realizes a GPIO function similar to the conventional GPIO function.
[0023]
In the GPIO function unit, a set of an input buffer 20-1, an output buffer 21-1, an input buffer 20-2, an output buffer 21-2,... Are connected to the corresponding terminal t among the n terminals t1 to tn.
As shown, each of the input buffers 20-1 to 20-n is connected to the input data bus 14. Each of the output buffers 21-1 to 21-n is connected to the output data bus 15.
In the GPIO 1 of the present embodiment, the selector 18 and the selector 19 are disposed between the output buffer 21-1 and the output data bus 15 and between the output buffer 21-2 and the output data bus 15 as illustrated. Are respectively inserted. However, in the description of the GPIO function unit, for the sake of convenience, the description will be continued on the assumption that these selectors are not provided.
[0024]
Further, each of the output buffers 21-1 to 21-n is connected to the GPIO input / output control register 5 via an input / output control bus 16 shown in FIG. A supply path of an enable / disable signal from the GPIO input / output control register 5 to -n is formed.
Here, the output buffers 21-1 to 21-n are turned on in response to, for example, an enable signal output from the GPIO input / output control register 5. Further, it is turned off in response to the disable signal.
That is, in this case, depending on the enable signal output from the GPIO input / output control register 5, the output buffer 21 is enabled, and the corresponding terminal t is set to output. In addition, depending on the disable signal, the input buffer 20 becomes more effective, and the corresponding terminal t is set as an input.
In this way, in the GPIO function unit, the input setting / output setting of each terminal t is switched depending on whether the enable signal or the disable signal is supplied to the output buffer 21 corresponding to each terminal t. Can be
[0025]
The GPIO input / output control register 5 stores the value as the enable / disable signal for setting the input / output for each terminal t as described above from the DSP core 51 (control unit) shown in FIG. , Through the input / output control unit 2 shown in FIG.
The GPIO input / output control register 5 includes a plurality of registers corresponding to the number of terminals t (the number of output buffers 21). That is, a plurality of registers associated with each terminal t are configured. In addition, each of these registers is connected to a corresponding one of the output buffers 21-1 to 21-n via the input / output control bus 16.
The DPS core 51 supplies a value as an enable / disable signal to the input / output control unit 2 to the GPIO input / output control register 5 having such a configuration, and specifies the address of the enable / disable signal. A value can be written to a corresponding register in the register 5. Then, the value held in the register is supplied to the corresponding output buffer 21 connected via the input / output control bus 16 as described above.
In other words, the DSP core 51 as the control unit specifies the data and the address to the input / output control unit 2 in this manner, and writes the value corresponding to the required register in the input / output control register 5 to the terminal. The input / output setting of t1 to tn can be performed.
[0026]
The GPIO output data register 4 is also provided with a plurality of registers corresponding to each output buffer 21. Also in this case, each of these registers is connected to the corresponding output buffer 21 via the output data bus 15.
Then, also in this case, the DSP core 51 specifies a data and an address to the input / output control unit 2 and writes a value corresponding to a required register, thereby transmitting a value as transmission data to an external device. It can be supplied to the corresponding output buffer 21.
Thus, the DSP core 51 can output a value as transmission data from a predetermined terminal t set in advance.
[0027]
Also, as the GPIO input data register 3, a number of registers corresponding to the input buffers 20-1 to 20-n are provided. Each of the GPIO input data registers 3 is also connected to the corresponding input buffer 20 via the input data bus 14.
In the GPIO input data register 3, a value supplied from an external device to a required terminal t and obtained in a corresponding input buffer 20 is input to the corresponding register via the input data bus 14.
Then, the DSP core 51 designates an address to the input / output control unit 2 and reads out the value held in the register in the GPIO input data register 3, thereby taking in the input data from the external device. Can be.
[0028]
The input / output control unit 2 controls each of the registers shown in FIG. 1 (GPIO input data register 3, GPIO output data register 4, GPIO input / output control register 5, and serial output It reads / writes data from / to the data register 6, serial input data register 7, serial communication mode register 10, serial communication status register 12, and serial communication switching register 13).
For example, when data and address information are supplied as a write command from the DSP core 51, control is performed so that the data is written to a corresponding register indicated by the address information. Further, for example, when address information is supplied as a read command, a value held in a register indicated by the address information is read and transferred to the DSP core 51.
[0029]
In the GPIO function unit having the above configuration, as described above, the DSP core 51 as the control unit writes the value corresponding to the register in the GPIO input / output control register 5 to set the input / output of each terminal t. Is switched. Further, the terminal t to which output data is output is changed depending on which register in the GPIO output data register 4 is to be written.
Further, for input data from an external device, the value is held in the register corresponding to the terminal t to which the data is supplied, which is configured in the GPIO input data register 3 as described above. As a result, the DSP core 51 can capture this.
That is, depending on the configuration of such a GPIO function unit, it is possible to perform any communication using the terminals t1 to tn depending on the communication control operation of the DSP core 5, thereby realizing a general-purpose interface. It is.
[0030]
Here, in the GPIO 1 of the present embodiment, a serial communication unit 1a is provided as shown in the figure for the GPIO function unit having the above configuration.
The serial communication section 1a is provided for performing an operation specialized for serial communication with an external device. In this case, for example, as shown, the terminal t1 is configured to correspond to a form in which a shift clock is transmitted, the terminal t2 communicates output data, and the terminal t3 communicates input data.
[0031]
In the serial communication unit 1a, first, the input sides of the serial output data register 6, the serial communication mode register 10, the serial communication status register 12, and the serial communication switching register 13 are connected to the input / output control unit 2 described above. It is connected. Thus, the serial output data register 6, serial communication mode register 10, serial communication status register 12, and serial communication switching register 13 receive data supplied from the DSP core 51 via the input / output control unit 2. Input is enabled.
The output side of the serial input data register 8 is connected to the input / output control unit 2, so that the DSP core 51 outputs the value held in the serial input data register 8 via the input / output control unit 2. Can be taken in.
[0032]
The serial output data register 6 is configured to be able to simultaneously hold a plurality of bits of output data relating to serial communication, which is input from the DSP core 51 via the input / output control unit 2.
The output side of the serial output data register 6 is connected to the input side of the shift register 7. The output side of the shift register 7 is connected to one input terminal of the selector 19 described above.
The other input terminal of the selector 19 is connected to the output data bus 15 as shown in the figure. In this case, the selector 19 is connected to a register corresponding to the terminal t2 in the GPIO output data register 4 via the output data bus 15. I have.
The output side of the selector 19 is connected to the output buffer 21-2 (terminal t2) in this case.
[0033]
The input side of the serial input data register 8 is connected to the output side of the shift register 9.
The serial input data register 8 is configured to be able to simultaneously hold a plurality of bits of input data relating to serial communication input from the shift register 9.
In this case, the input side of the shift register 9 is connected to the input buffer 20-3 (terminal t3).
[0034]
The output of the serial communication mode register 10 is input to the shift clock generation circuit 11. The output of the serial communication status register 12 is also input to the shift clock generation circuit 11.
[0035]
The master clock used in the DSP 50 shown in FIG. 1 is input to the shift clock generation circuit 11. Then, based on the master clock input in this way and the output value from the serial communication mode register 10, a shift clock used for serial communication is generated.
The shift clock generated by the shift clock generation circuit 11 is supplied as a clock input to the shift register 7 and the shift register 9 described above.
Further, this shift clock is supplied to one input terminal of the selector 18 in this case, as shown in the figure.
[0036]
The other input terminal of the selector 18 is connected to the output data bus 15, and is connected to the register corresponding to the terminal t 1 in the GPIO output data register 4 via the output data bus 15.
The output side of the selector 18 is connected to the output buffer 21-1.
[0037]
The output of the serial communication switching register 13 is supplied to the selectors 18 and 19 via a communication switching bus 17 shown in the figure. In this case, one register is configured in the serial communication switching register 13. The value held in this register is supplied to the selectors 18 and 19 via the serial communication switching bus 17.
[0038]
FIG. 3 shows the contents of the functions of each register in the serial communication unit 1a having the above configuration.
First, the serial output data register 6 is a register for writing output data to be supplied to an external device during serial communication. As described above, the serial output data register 6 is configured to be able to simultaneously hold a plurality of bits of data relating to serial communication supplied from the DSP core 51 via the input / output control unit 2. In other words, in this case, a plurality of bits of output data to be output via the terminal t2 during serial communication can be simultaneously held. For example, in this case, it is assumed that 32-bit data can be simultaneously held as shown in the figure.
[0039]
The serial input data register 8 is a register for writing input data supplied from an external device during serial communication. The serial input data register 8 is also configured to be able to simultaneously hold a plurality of bits of data related to serial communication. That is, a plurality of bits of input data obtained at the terminal t3 during serial communication and input via the shift register 9 can be simultaneously held.
For example, it is assumed that the serial input data register 8 is configured to be capable of simultaneously holding 32 bits of data.
[0040]
The serial communication mode register 10 is a register for setting a format of serial communication performed with an external device.
The serial communication mode register 10 is used to set a bit length, an initial value (a value in a stopped state), an MSB / LSBfirst, and a frequency of a shift clock generated by the shift clock generating circuit 11 shown in FIG. Values are supplied from the DSP core 51 and are retained.
By supplying these values to the shift clock generation circuit 11, the items of the bit length of the shift clock, the initial value (the value in the stop state), the MSB / LSBfirst, and the frequency are set. It becomes.
[0041]
In this case, as shown in the figure, the bit length can be set to 1 to 32 bits. For this purpose, the serial communication mode register 10 in this case is supplied with data of a 5-bit configuration for setting such 1 to 32 bits from the DSP core 51 side.
H / L can be set as the shift clock stop state value (initial value), and 1-bit data for setting such H / L is supplied from the DSP core 51 side. For the MSB / LSBfirst, 1-bit data for setting the MSB / LSBfirst is supplied from the DSP core 51 side.
In this case, the frequency of the shift clock is set to the frequency division ratio of the master clock. For example, in this case, 1/64 to 1/8192 can be set as shown in the figure, and the DSP core 51 supplies 3-bit data for setting this.
[0042]
The serial communication status register 12 is a register for instructing the start of serial communication and monitoring the communication state.
In this case, the DSP core 51 can start serial communication by writing “1” into the serial communication status register 12, for example. Then, for example, “0” is written in response to the end of the operation for one transfer at the time of such communication.
From this, as for the value of the serial communication status register 12, "1" indicates that the data is being transferred and "0" indicates that the transfer is completed. Thus, by checking the value held in the serial communication status register 12, the communication state can be monitored.
[0043]
The serial communication switching register 13 is a register for switching between serial communication by the serial communication unit 1a and communication by the conventional GPIO function unit, and 1-bit data for performing such switching is stored in the DSP core 51 side. Supplied from
In this case, the DSP core 51 writes, for example, “0” in response to normal communication using the GPIO function unit. When serial communication is performed by the serial communication unit 1a, "1" is written.
[0044]
Here, an operation when serial communication is performed using the serial communication unit 1a having such a configuration will be described.
In this case, as described above, it is assumed that communication of the shift clock is performed at the terminal t1, output data is communicated at the terminal t2, and input data is communicated at the terminal t3.
First, in order to cope with such a condition, the DSP core 51 writes a value in a corresponding register in the GPIO input / output control register 5 by designating data and an address to the input / output control unit 2 and outputs the value to the output buffer An enable / disable signal corresponding to 21-1, 21-2, 21-3 is supplied.
That is, in this case, the enable signal is supplied to the output buffers 21-1 and 21-2, and the terminals t1 and t2 are set to output. Also, a disable signal is supplied to the output buffer 21-3, and the terminal t3 is set for input.
[0045]
In addition, the DSP core 51 writes “1” in the serial communication switching register 13 in order to switch to communication by the serial communication unit 1a.
By writing “1” to the serial communication switching register 13 in this manner, this value is input to the control terminals of the selectors 18 and 19 via the communication switching bus 17. In response to this, the selector 18 performs switching so as to input data from the shift clock generation circuit 11. In the selector 19, switching is performed so as to input data from the shift register 7 (that is, the serial output data register 6).
In other words, a state in which a shift clock can be output from the terminal t1 and output data can be output from the terminal t2 is thereby obtained.
[0046]
Further, the DSP core 51 writes values corresponding to the respective items described in FIG. 3 into the serial communication mode register 10 in order to set the format of the serial communication.
Thus, a state in which the shift clock generation circuit 11 generates the corresponding shift clock is obtained.
[0047]
Then, in the case of the present embodiment, the DSP core 51 writes a plurality of bits of output data into the serial output data register 6.
That is, in this case, as described above, the serial output data register 6 is configured to be able to hold a plurality of bits of data as output data. It is possible to write a plurality of bits of output data at a time.
The data held in the serial output data register 6 is loaded into the shift register 7 at an appropriate timing.
[0048]
Note that the order of input / output setting of each terminal t, switching of normal / serial communication, setting of shift clock, and writing of output data to the register described above may be arbitrary.
[0049]
After setting the input / output of each terminal t, switching the communication between normal / serial, setting the shift clock, and writing the output data to the register, the DSP core 51 starts the serial communication when the communication is started. The value “1” is written to the communication status register 12.
In response to this, the output of the shift clock from the shift clock generation circuit 11 is started, whereby the shift clock is output from the terminal t1 via the selector 18 and the output buffer 18.
That is, by providing the shift clock generating circuit 11, the shift clock to be supplied to the external device is automatically output via the terminal t1.
[0050]
The shift clock output from the shift clock generation circuit 11 is also supplied to clock inputs of the shift register 7 and the shift register 9.
Thus, the output data loaded is sequentially output from the shift register 7 at the timing of the shift clock. The output data sequentially output from the shift register 7 is output from the terminal t2 via the selector 19 and the output buffer 19 in this case.
That is, from this, the output data is automatically output to the external device based on the timing of the shift clock output from the shift clock generation circuit 11.
[0051]
In this case, the input data is supplied to the input data bus 14 via the terminal t3 and the input buffer 20-3. When the input data is supplied to the input data bus 14 in this manner, the input data is supplied to the shift register 9.
As described above, the shift clock from the shift clock generation circuit 11 is input to the shift register 9 at this time, so the input / output data supplied to the shift register 9 in this manner is the shift clock of this shift clock. The data is sequentially stored in the shift register 9 at the timing.
[0052]
The input data held in the shift register 9 is supplied to the serial input data register 8 at the timing when the serial communication ends.
Here, as described above, the serial input data register 8 in this case is configured to be able to hold a plurality of bits of the input data related to such serial communication. That is, the DSP core 51 in this case can take in the input data at a time after the serial input data register 8 holds the input data of a plurality of bits.
[0053]
According to the configuration of FIG. 2, the input data supplied to the input data bus 14 as described above is also input to the GPIO input data register 3. Therefore, at this time, the DSP core 51 can read from either the serial input data register 8 or the GPIO input data register 3. However, when reading from the GPIO input data register 3, the value held here is used. Must be read sequentially as in the past.
Therefore, when serial communication is performed by the serial communication unit 1a, the DSP core 51 must be programmed to read input data from the serial input data register 8.
[0054]
If it is determined that the serial communication has been completed, “0” is written to the serial communication status register 13. The writing of the value “0” is performed by the serial communication unit 1a in response to the detection that the communication has been completed. For example, the writing of such a value “0” may be performed by the shift clock generation circuit 11 according to the clock end timing.
By writing “0” to the serial communication status register 13 in this manner, for example, it indicates that one data transfer operation has been completed.
By supplying the transfer end notification to the ICU 58 at the timing when the value of the serial communication status register 13 becomes “0”, an interrupt to the DSP core 51 can be generated.
[0055]
As described above, in the GPIO 1 of the present embodiment, the shift clock generation circuit 11 is provided to generate the shift clock used for the serial communication. This eliminates the need to keep writing the value to the register in order to output the shift clock.
Further, since the serial output data register 8 holds a plurality of bits of output data and sequentially outputs the bits based on the shift clock generated by the shift clock generation circuit 11, the DSP core 51 performs serial communication. There is no need to continue writing output data to the register during the operation.
Further, in the present embodiment, since a plurality of bits of the input data obtained from the external device can be held at the same time, it is not necessary to continuously read the value from the register holding the input data.
[0056]
That is, according to the present embodiment, the DSP core 51 does not need to keep accessing the GPOI1 to perform communication of the shift clock, the output data, and the input data during the serial communication. , DSP core 51 can perform other processing even during communication.
[0057]
Also, at this time, as described above, the DSP core 51 does not need to keep writing / reading the value to / from the register during communication, so that the code size of the program for performing communication control is accordingly reduced. In other words, it can be reduced more than before.
[0058]
Further, in the present embodiment, the serial communication unit 1 a shown in FIG. 2 includes the serial communication switching register 13, the selector 18, and the selector 19. According to the value to be written, it is possible to switch between communication by the conventional GPIO function unit and communication by the serial communication unit 1a.
Since the selector 18 and the selector 19 are provided and the terminal t used for the GPIO function unit and the serial communication unit 1a is shared, the serial communication according to the present embodiment can be performed without increasing the terminal t. It is possible to do in.
[0059]
In the above-described embodiment, a case where the data processing device of the present invention is a DSP that performs digital audio signal processing provided in a recording / reproducing device corresponding to, for example, a CD, DVD, or other media will be described. However, the present invention can be suitably applied to a data processing device that performs other digital signal processing such as video signal processing.
[0060]
In the embodiment, the shift clock is transmitted at the terminal t1, the output data is communicated at the terminal t2, and the input data is communicated at the terminal t3. The configuration of the GPIO1 corresponding to this is exemplified. The shift register 7 may be added to deal with the increase in the number of output data, or the serial input data register 8 and the shift register 9 may be added to accommodate the increase in the number of input data. .
At this time, if the selector 18 (or the selector 19) is provided for all the terminals t, the terminal t with which the serial communication unit 1a performs communication can be selected.
[0061]
【The invention's effect】
As described above, according to the present invention, for example, a data input / output for performing data communication with an external device is provided in a data processing device having a processor for executing predetermined data processing and controlling the data communication. As a device, first, first data holding means for holding output data generated by the data processing, and second data holding serial data to be output by serial communication among data generated by the data processing. Data holding means.
And selectively outputting the output data held in the first data holding unit or the serial data held in the second data holding unit in response to a mode switching signal supplied from the processor. And first selecting means for performing the setting.
Then, a clock generation unit for generating a communication clock for serial communication and a second selection unit for selectively outputting the supplied general-purpose clock or the communication clock in response to the mode switching signal are provided. I have to.
[0062]
In the present invention as described above, the communication clock (shift clock) required for serial communication is generated and output on the data input / output device side, and thus the processor (core unit) in the data processing device in this case is used. In the case of (1), it is not necessary to continuously write the value to the register, for example, in order to sequentially output the value of the shift clock as in the related art.
Further, regarding the serial data output by serial communication, if the second data holding means can hold, for example, a plurality of bits of data, the processor can write the plurality of bits of data at one time. That is, in this case, the processor does not need to continuously write a value as serial data during serial communication.
[0063]
Thus, in the present invention, the processor can reduce the processing load for performing communication, and can obtain an idle time for processing during communication, and can perform other processing during communication. Become.
At this time, the description for executing the writing to the register as described above can be deleted from the communication control program, and the program code size can be made smaller than before.
[0064]
According to the present invention, general-purpose output data can be held by the first holding means. At this time, the first selection means is provided, so that the serial data and the general-purpose output data can be stored. Data can be selectively output. Further, the provision of the second selecting means enables a communication clock for serial communication and a general-purpose clock to be selectively output.
That is, according to the present invention, a function as a general-purpose interface similar to the related art can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of an internal configuration of a data processing device according to an embodiment of the present invention.
FIG. 2 is a circuit diagram for describing an internal configuration example of a data input / output device as an embodiment of the present invention.
FIG. 3 is a diagram for explaining the function of each register included in the data input / output device according to the embodiment;
FIG. 4 is a circuit diagram showing a configuration of a conventional data input / output device.
[Explanation of symbols]
1 GPIO, 2 input / output control unit, 3 GPIO input data register, 4 GPIO output data register, 5 GPIO input / output control register, 6 serial output data register, 7, 9 shift register, 8 serial input data register, 10 serial communication mode Register, 11 shift clock generation circuit, 12 serial communication status register, serial communication switching register, 18, 19 selector, 50 DSP, 51 DSP core, 52 program memory, 53 data memory, 54 second bus, 55 first bus, 56 Bus controller, 57 timer, 58 ICU, 59 audio interface, 60 external memory interface, 61 host interface

Claims (6)

外部装置との間でデータ通信を行うためのデータ入出力装置において、
出力データを保持する第1のデータ保持手段と、
シリアル通信により出力するシリアルデータを保持する第2のデータ保持手段と、
供給されたモード切り替え信号に応じて、上記第1のデータ保持手段に保持された上記出力データ、又は上記第2のデータ保持手段に保持された上記シリアルデータを選択的に出力する第1の選択手段と、
シリアル通信用の通信クロックを生成するクロック生成手段と、
上記モード切り替え信号に応じて、供給された汎用クロック又は上記通信クロックを選択的に出力する第2の選択手段と、
を備えることを特徴とするデータ入出力装置。
In a data input / output device for performing data communication with an external device,
First data holding means for holding output data;
Second data holding means for holding serial data output by serial communication;
A first selection for selectively outputting the output data held in the first data holding means or the serial data held in the second data holding means in response to the supplied mode switching signal. Means,
Clock generation means for generating a communication clock for serial communication,
Second selecting means for selectively outputting the supplied general-purpose clock or the communication clock according to the mode switching signal;
A data input / output device comprising:
供給された上記モード切り替え信号を保持する切替信号保持手段をさらに備え、
上記切替信号保持手段に保持された上記モード切り替え信号が、上記第1及び第2の選択手段へ供給される請求項1に記載のデータ入出力装置。
Further comprising a switching signal holding means for holding the supplied mode switching signal,
2. The data input / output device according to claim 1, wherein the mode switching signal held by the switching signal holding unit is supplied to the first and second selection units.
供給された上記シリアル通信の条件を示すモード設定信号を保持するモード設定信号保持手段をさらに備え、
上記クロック生成手段は、上記モード設定信号保持手段に保持された上記モード設定信号に応じて上記通信クロックを生成する請求項1に記載のデータ入出力装置。
A mode setting signal holding unit for holding a mode setting signal indicating the supplied serial communication condition,
2. The data input / output device according to claim 1, wherein the clock generation means generates the communication clock in accordance with the mode setting signal held in the mode setting signal holding means.
外部装置との間でデータ通信を行うデータ処理装置であって、
所定のデータ処理を実行すると共に、上記データ通信を制御するプロセッサと、
上記データ処理により生成された出力データを保持する第1のデータ保持手段と、
上記データ処理により生成されたデータの中で、シリアル通信により出力するシリアルデータを保持する第2の保持手段と、
上記プロセッサから供給されたモード切り替え信号に応じて、上記第1のデータ保持手段に保持された上記出力データ、又は上記第2の保持手段に保持された上記シリアルデータを選択的に出力する第1の選択手段と、
シリアル通信用の通信クロックを生成するクロック生成手段と、
上記モード切り替え信号に応じて、上記プロセッサから供給された汎用クロック又は上記通信クロックを選択的に出力する第2の選択手段と、
を備えたことを特徴とするデータ処理装置。
A data processing device that performs data communication with an external device,
A processor that executes predetermined data processing and controls the data communication,
First data holding means for holding output data generated by the data processing;
Second holding means for holding serial data output by serial communication among data generated by the data processing;
A first output for selectively outputting the output data held in the first data holding means or the serial data held in the second holding means in response to a mode switching signal supplied from the processor; Means of selection,
Clock generation means for generating a communication clock for serial communication,
Second selecting means for selectively outputting the general-purpose clock or the communication clock supplied from the processor according to the mode switching signal;
A data processing device comprising:
上記プロセッサから供給された上記モード切り替え信号を保持する切替信号保持手段をさらに備え、
上記切替信号保持手段に保持された上記モード切り替え信号が、上記第1及び第2の選択手段へ供給される請求項4に記載のデータ処理装置。
Further comprising a switching signal holding means for holding the mode switching signal supplied from the processor,
The data processing device according to claim 4, wherein the mode switching signal held by the switching signal holding unit is supplied to the first and second selection units.
上記プロセッサから供給された上記シリアル通信の条件を示すモード設定信号を保持するモード設定信号保持手段をさらに備え、
上記クロック生成手段は、上記モード設定信号保持手段に保持された上記モード設定信号に応じて上記通信クロックを生成する請求項4に記載のデータ処理装置。
A mode setting signal holding unit that holds a mode setting signal indicating a condition of the serial communication supplied from the processor;
5. The data processing device according to claim 4, wherein the clock generation unit generates the communication clock in accordance with the mode setting signal held in the mode setting signal holding unit.
JP2003156519A 2003-06-02 2003-06-02 Data input/output unit and data processor Pending JP2004362035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003156519A JP2004362035A (en) 2003-06-02 2003-06-02 Data input/output unit and data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003156519A JP2004362035A (en) 2003-06-02 2003-06-02 Data input/output unit and data processor

Publications (1)

Publication Number Publication Date
JP2004362035A true JP2004362035A (en) 2004-12-24

Family

ID=34050576

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003156519A Pending JP2004362035A (en) 2003-06-02 2003-06-02 Data input/output unit and data processor

Country Status (1)

Country Link
JP (1) JP2004362035A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008217733A (en) * 2007-03-08 2008-09-18 Oki Electric Ind Co Ltd Serial interface circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008217733A (en) * 2007-03-08 2008-09-18 Oki Electric Ind Co Ltd Serial interface circuit

Similar Documents

Publication Publication Date Title
JP2007172254A (en) Memory control circuit
KR20030087963A (en) Motor control apparatus and motor control method
JP5096923B2 (en) Multi-thread processor with dynamically reconfigurable logic
JP2004362035A (en) Data input/output unit and data processor
JP3665624B2 (en) Microcontroller
JP2004185619A (en) System and method for switching clock source
JP2012088906A (en) Electronic device and control method for the same
JPH08228157A (en) Data transfer circuit
US20030145245A1 (en) Microcontroller
JP4622871B2 (en) Data processing system, access control method, apparatus thereof, and program thereof
JPH11306074A (en) Information processor
JP3310482B2 (en) Microcomputer
JP4174272B2 (en) Device controller
JP2006277361A (en) Method for controlling serial interface
JP4048091B2 (en) LSI and image forming apparatus
JPH07234858A (en) Processor with communication function
JP3366202B2 (en) Bus controller and data processing system
JPH08237084A (en) Timing signal generating circuit
JP2003150538A (en) Data transfer device
JP2007026185A (en) Function-processing electronic circuit
JPH0667769A (en) Single chip microcomputer
US20040039873A1 (en) Management system for access control modes of a DRAM module socket
JPH042296A (en) Digital input circuit
JPH1011392A (en) Serial interface circuit
JPH0535651A (en) Digital signal processing lsi