JP2004104418A - Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device - Google Patents

Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device Download PDF

Info

Publication number
JP2004104418A
JP2004104418A JP2002262924A JP2002262924A JP2004104418A JP 2004104418 A JP2004104418 A JP 2004104418A JP 2002262924 A JP2002262924 A JP 2002262924A JP 2002262924 A JP2002262924 A JP 2002262924A JP 2004104418 A JP2004104418 A JP 2004104418A
Authority
JP
Japan
Prior art keywords
data
status
buffer
output
communication control
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.)
Withdrawn
Application number
JP2002262924A
Other languages
Japanese (ja)
Inventor
Yoshiaki Hashimoto
橋本 良昭
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2002262924A priority Critical patent/JP2004104418A/en
Publication of JP2004104418A publication Critical patent/JP2004104418A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication control circuit which receives data having the frame structure of an HDLC procedure, transfers it by a DMA system and can take out a status and to provide a communication controller, a microcomputer, and an electronic apparatus. <P>SOLUTION: The communication control circuit 100 receives data having the frame structure of the HDLC procedure and transfer it by the DMA system. The circuit comprises: a reception data buffer 110 storing reception data 160 by first-in first-out; a status generation circuit 140 detecting the bit error of reception data and generating the status; a status buffer 120 which is controlled to synchronously perform first-in first-out by the number of stages same as the reception data buffer 110 and which stores the status by first-in first-out; and a selector circuit 130 which selects output from the status buffer 120 when reception data is final data of the frame and selects output from the reception data buffer 110 when reception data is not final data of the frame so as to output it. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、通信制御回路、通信制御装置、マイクロコンピュータ及び電子機器に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
通信制御装置は、HDLC手順にしたがって受信したデータについてビット誤り検出を行う。データ部のサイズは仕様上ビット単位で任意長であるが、通常は処理の都合からバイト単位に設定し、検出結果に基づき各バイト毎にステータスを生成する。そして受信データを処理する側(例えばCPU)ではこのステータスを見ることで、データが正しく転送されているかを判断することができる。
【0003】
ここにおいて受信データのデータ部が所与の長さを有する場合、最終データ(データ部の最終データ=FCS:フレームチェックシーケンス)を受け取ったときに生成されるステータスが、所与の長さのデータ部のデータ全体が正しく転送されているかを判断可能なステータスである。
【0004】
ところが従来のハードウエア構成では、データの受信終了を知らせるデータ終了割り込みよりDMA転送が優先されるため、最終データの読み出し後にデータ終了割り込み処理が実行される事になり、既に通信制御回路内に最終データが存在しない為、最終データに対応したステータスの存在を保証する事ができず、ステータスを取り出すことが困難であった。
【0005】
このようなステータスの処理としては、従来下記の方法が提案されている。
▲1▼「特02520905」「特開平01−73944」では、データ受信時受信データと共に毎回ステータスをDMA転送する方法が提案されている。しかし毎回ステータスを読み出すため、毎回のDMA転送のバス占有時間が長くなり、かつDMA転送先のバッファの容量も大きくなるという問題点があった。
▲2▼「特02763009」ではフレーム終了を認識した場合、最終データ割り込み信号でDMA転送をマスクし、割込み処理を先に行い、ステータスを読み出す方法が提案されている。しかし、割込み処理においてステータスの読み出しを行う為に、他にプライオリティの高い割込みが存在した場合は処理がおくれ、受信データオーバーランが発生する可能性がある。フレームサイズが特定できない場合においては、ステータスだけでなく最終データの読み出しや、DMAコントローラの設定まで行う必要があり、さらに他の割り込みの発生が重なった場合の受信データオーバーランへの影響は大きいと考えられる。
▲3▼「特開平02−224542」「特開平03−11848」は、ともに通信制御部にDMA機能を内蔵したものである。前者は転送データ数+1を転送データ数設定レジスタに設定するもの、後者は転送データ数設定レジスタにセットできる最大数をセットしておくもので任意のデータ長に対応したものである。ともにステータスは最後に付加して転送する。ステータス転送の為のDMAのトリガは、前者は転送データ数設定レジスタの設定値が“1”になった時、後者は終了フラグを検出しての終了割込みの発生時である。ステータスを読み出す事を考えると総データ転送数は変らない、いう問題点がある。
【0006】
本発明は以上のような問題点に鑑みてなされたものであり、その目的とするところは、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路において、ステータスを取り出し可能な通信制御回路、通信制御装置、マイクロコンピュータ及び電子機器の提供を目的とする。
【0007】
【課題を解決するための手段】
(1)本発明は、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路であって、
受信データを先入れ先出しで格納する受信データバッファと、
前記受信データを所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路と、
受信データバッファと同じ段数を有し受信データバッファと同期して入出力が行われるよう制御され、ステータス生成回路からの出力を先入れ先出しで格納するステータスバッファと、
受信データバッファからの出力とステータスバッファからの出力を受け付け、受信データがフレームの最終データである場合にはステータスバッファからの出力を選択してバスに出力し、受信データがフレームの最終データでない場合には受信データバッファからの出力を選択して出力する出力するセレクタ回路と、
を含むことを特徴とする。
【0008】
HDLC手順とはハイレベル・データリンク制御手順を意味する。なお受信データの転送データサイズは、固定長でも良いし可変長でもよい。
【0009】
本発明は、受信データはHDLC手順のフレーム構成を有しており、フレームの最終データはフラグシーケンスで、フレームが終了したことを示す終了フラグとなっている場合に適用される。従って受信データがフレームの最終データである場合とは、受信データがフラグシーケンスの終了フラグである場合である。
【0010】
ビット誤り検出とは、例えばCRCチェック(デジタル情報でビット誤りを検出すること)やパリティチェック等であり、例えば受信データ1バイト毎にそれに対応したステータスが生成される。
【0011】
また受信データバッファは例えば1バイト毎に先入れ先出しで入出力可能なFIFOである。
【0012】
ここにおいてDMAリクエスト信号として、通信制御回路がデータを受信したことを知らせる割り込み信号である受信データイネーブル信号を使用することが出来る。
【0013】
本発明によれば、受信データバッファとステータスバッファは段数が同じで、同期して入出力が行われるため、フレームの最終データである受信データに対応してステータスバッファにステータスが格納されている。セレクタ回路は、受信データがフレームの最終データである場合にはステータスバッファからの出力を選択してバスに出力するため、最終データに対応したステータスを取り出すことが出来る。
【0014】
このように本発明は、最終データの代わりにステータスをDMA転送することが出来るため、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路において、データの受信終了を知らせるデータ終了割り込みよりDMA転送が優先されるハードウエア構成でも、最終データに対応したステータスをとりだすことが可能になる。
【0015】
しかも本発明によれば、バス占有率の増大やDMA転送領域の増大を招くこともなく、余分なプログラム制御も必要なく最終データに対応したステータスをとりだすことができる。
【0016】
なおフレームの最終データ自体は終了フラグであるため取り出す必要はない。
【0017】
(2)本発明の通信制御回路は、
前記ステータス生成回路が、
受信データに基づきフレームの最終データを検出し、フレームの最終データに対応したステータスには、最終ステータスであることを示すタグを付加してステータスバッファに出力し、
前記セレクタ回路が、
ステータスに付加されたタグに基づき受信データが最終データであるか否か判断することを特徴とする。
【0018】
(3)本発明の通信制御回路は、
受信データの転送データサイズが固定長である場合には、
前記ステータス生成回路は、
転送データサイズに基づきフレームの最終データを検出し、フレームの最終データに対応したステータスには、最終ステータスであることを示すタグを付加してステータスバッファに出力することを特徴とする。
【0019】
転送データサイズに基づきフレームの最終データを検出するとは、例えば受信データ長のカウント値が転送データサイズに達したらフレームの最終データと判断するような場合である。
【0020】
(4)本発明は、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路であって、
受信データを先入れ先出しで格納する受信データバッファと、
前記受信データを所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路と、
最終データに対応したステータスが生成されるタイミングで、ステータス生成回路からの出力を先入れ先出しで格納するステータスバッファと、
受信データに基づき最終データが前記受信データバッファから出力されるタイミングを検出し、当該タイミングに基づきセレクタ回路に向け切り替え制御信号を出力する制御信号出力回路と、
受信データバッファからの出力とステータスバッファからの出力を受け付け、前記切り替え制御信号に基づきいずれかのデータを選択して出力するセレクタ回路と、
ことを特徴とする。
【0021】
HDLC手順とはハイレベル・データリンク制御手順を意味する。なお受信データの転送データサイズは、固定長でも良いし可変長でもよい。
【0022】
本発明は、受信データはHDLC手順のフレーム構成を有しており、フレームの最終データはフラグシーケンスで、フレームが終了したこといを示す終了フラグとなっている場合に適用される。従って受信データがフレームの最終データである場合とは、受信データがフラグシーケンスの終了フラグである場合である。
【0023】
また受信データバッファは例えば1バイト毎に先入れ先出しで入出力可能なFIFOである。
【0024】
ここにおいてDMAリクエスト信号として、通信制御回路がデータを受信したことを知らせる割り込み信号である受信データイネーブル信号を使用することが出来る。
【0025】
ステータスバッファから最終ステータスを出力するタイミングは受信データの内容に基づき(最終データを検出して)判断するようにしてもよいし、固定長データである場合には受信データ長をカウントして、カウント値が固定のデータ長に達したか否かにより判断しても良い。
【0026】
セレクタ回路は、最終データに対応したステータスが前記ステータスバッファから出力されるタイミングに基づき出力される切り替え制御信号をうけたら(例えば切り替え制御信号がハイレベルになったら)ステータスバッファからの出力を選択して出力するように構成してもよい。
【0027】
このようにすると、最終データの代わりにステータスをDMA転送することが出来るため、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路において、データの受信終了を知らせるデータ終了割り込みよりDMA転送が優先されるハードウエア構成でも、最終データに対応したステータスをとりだすことが可能になる。
【0028】
しかも本発明によれば、バス占有率の増大やDMA転送領域の増大を招くこともなく、余分なプログラム制御も必要なく最終データに対応したステータスをとりだすことができる。
【0029】
なおフレームの最終データ自体は終了フラグであるため取り出す必要はない。
【0030】
(5)本発明の通信制御回路は、
受信データの転送データサイズが固定長である場合には、
前記制御信号出力回路は、
転送データサイズに基づき最終データに対応したステータスが前記ステータスバッファから出力されるタイミングを検出することを特徴とする。
【0031】
(6)本発明の通信制御回路は、
前記ステータス生成回路は、
フレームの最終データを検出したら最終データより所定バイト前のデータに対応して生成されたステータスを、最終データに対応するステータスとして出力することを特徴とする。
【0032】
受信データのデータ部が所与の長さを有する場合、最終データ(データ部の最終データ)を受け取ったときに生成されるステータスが、所与の長さのデータ部のデータ全体が正しく転送されているかを判断可能なステータスである。このデータはフレームの最終データであるフラグステータスより所定数の前のデータであり、このデータに対応したステータスが受信データ受け取り側で必要なステータスとなる。このデータがフレームの最終データの何バイト前にくるかは予めわかっているので、ステータス生成回路はこのデータに対応したステータスをコピーしてフレームの最終データに対応するステータスとして出力することが出来る。
【0033】
(7)本発明の通信制御装置は、上記のいずれかの通信制御回路を含むことを特徴とする。
【0034】
(8)本発明のマイクロコンピュータは、上記いずれかの通信制御回路を含むことを特徴とする。
【0035】
(9)本発明の電子機器は、上記記載のマイクロコンピュータと、
前記マイクロコンピュータの処理対象となるデータの入力手段と、
前記マイクロコンピュータにより処理されたデータを出力するための出力手段とを含むことを特徴とする。
【0036】
【発明の実施の形態】
1.半導体装置
以下、本発明の好適な実施形態について図面を用いて詳細に説明する。
【0037】
本実施の形態は、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路に関する。
【0038】
HDLC手順のフレームには、情報を伝送するときのフレームである情報(I)フレームと、データリンクの監視、制御のためのフレームである監視(S)フレームと、モード設定の要求、応答、以上の報告のためのフレームである非番号制(U)フレームがある。
【0039】
図1は、HDLC手順のフレーム構成(情報(I)フレーム)について説明するための図である。
【0040】
情報(I)フレーム10は、フラグシーケンス(F)11、アドレスフィールド(A)12、コントロールフィールド(C)13,情報データ部(I)14,フラグチェックシーケンス(FCS)15,フラグシーケンス16とを含む。
【0041】
フラグシーケンス(F)11は、フレームの開始を示すものであり、開始フラグ’7E’(16進)が格納されている。
【0042】
アドレスフィールド(A)12は、二次局(複合局)の識別コードであり、コマンドの場合には受信すべき局の識別コードが、レスポンスの場合には送信した局の識別コードが格納される。
【0043】
コントロールフィールド(C)13は,フレームの種類(情報フレーム(I)、監視(S)フレーム、非番号制(U)フレームのいずれであるか)を示すデータが格納される。
【0044】
情報データ部(I)14は,ユーザーデータがおかれることろであり、ビット構成、ビット長の制限はないが送受信局間での合意は必要である。
【0045】
フレームチェックシーケンス(FCS)15は,誤り制御のためのフィールドであり、16ビットのシーケンスが格納される。
【0046】
フラグシーケンス(F)16は、フレームの終了を示すものであり、終了フラグ’7E’(16進)が格納されている。
【0047】
図2は本実施の形態の通信制御回路の第1の実施例の構成について説明するための図である。
【0048】
本通信制御回路100は、HDLC手順のフレーム構成を有するデータ160を受信して、DMA方式で転送する通信制御回路であり、受信データ160をシリアルからパラレルに変換するシリアル−パラレル変換部150と、シリアルーパラレル変換部150からの出力データ152を先入れ先出しで格納する受信データバッファ100と、前記データ152を所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路140と、受信データバッファ110と同じ段数を有し受信データバッファ110と同期して入出力が行われるよう制御され、ステータス生成回路140からの出力を先入れ先出しで格納するステータスバッファ120と、受信データバッファ110からの出力とステータスバッファ120からの出力を受け付け、受信データ160がフレームの最終データである場合にはステータスバッファ120からの出力を選択してデータバス170に出力し、受信データ160がフレームの最終データでない場合には受信データバッファ110からの出力を選択してデータバス170に出力する出力するセレクタ回路130とを含む。
【0049】
また受信データバッファ110は例えば1バイト毎に先入れ先出しで入出力可能なFIFOとして構成されている。
【0050】
ステータス生成回路140は、ビット誤り検出としてフレームチェックシーケンス(FCS)(図1の15参照)を用いてCRCチェック(デジタル情報でビット誤りを検出すること)を行う。
【0051】
ここにおいてDMAリクエスト信号として、通信制御装置においてデータを受信したことを知らせる割り込み信号である受信データイネーブル信号を使用することが出来る。
【0052】
またステータス生成回路140は、データ152に基づきフレームの最終データ(図1のフラグシーケンス16)を検出し、フレームの最終データに対応したステータスには、ステータスであることを示すタグを付加してステータスバッファ120に出力し、セレクタ回路130は、ステータスに付加されたタグに基づき受信データが最終データであるか否か判断するようにしてもよい。例えばステータスバッファ120にタグ部122を設け、当該タグ部122にタグデータを格納するようにしても良い。
【0053】
ここにおいて受信データ160の転送データサイズが固定長である場合には、ステータス生成回路140は、転送データサイズに基づきフレームの最終データを検出し、フレームの最終データに対応したステータスには、ステータスであることを示すタグを付加してステータスバッファ120に出力するようにしてもよい。
【0054】
またステータス生成回路140は、フレームの最終データを検出したらフレームの最終データの所定バイト前のデータに対応して生成されたステータスを、終了フラグデータに対応するステータスとして出力するよう構成することが出来る。
【0055】
上記構成によれば、受信データバッファとステータスバッファは段数が同じで、同期して入出力が行われるため、フレームの最終データである受信データに対応してステータスバッファにステータスが格納されている。セレクタ回路は、受信データがフレームの最終データである場合にはステータスバッファからの出力を選択してバスに出力するため、最終データに対応したステータスを取り出すこが出来る。
【0056】
このように最終データの代わりにステータスをDMA転送することが出来るため、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路において、データの受信終了を知らせるデータ終了割り込みよりDMA転送が優先されるハードウエア構成でも、最終データに対応したステータスをとりだすことが可能になる。
【0057】
しかも本発明によれば、バス占有率の増大やDMA転送領域の増大を招くこともなく、余分なプログラム制御も必要なく最終データに対応したステータスをとりだすことができる。
【0058】
図3は通信制御回路における割り込み信号の働きと動作の関係について説明するための図である。
【0059】
本実形態の通信制御装置の受信動作においては、受信データイネーブル、受信データオーバーランエラー、受信終了割り込みの3種類の割り込みが発生する。受信データイネーブルは、データを受信したことを知らせる割り込みである。受信データオーバーランエラーは、データが上書きされたことを知らせる割り込みであり、これは受信バッファがフルになった状態でもデータの読み出しが行われない状態で次のデータを受信したときに発生するもので、この時の受信動作は失敗ということになる。受信終了割り込みは、受信の終了を知らせる割り込みである。
【0060】
ここで本通信制御回路では、前記受信データイネーブルをDMAコントローラへのリクエスト信号として使用し、受信データはDMAを使用して読み出される。この場合受信データの読み出しとともに、受信データイネーブルが一旦解除されるようなハードウエアを設計することが好ましい。
【0061】
すなわち図3のS1〜S8に示すようにデータを受信すると、受信データイネーブルが発生する。これをDMAリクエストとして、セレクタ回路により受信データバッファからの出力が選択されて、DMAにより受信データを転送する。
【0062】
そして最終データを受信したら(S9)、受信データイネーブル割り込みと受信終了割り込みが発生し(S10)、セレクタ回路によりステータスバッファからの出力が選択されて、DMAによりステータスが転送される(S11)
上記DMA動作はシステムとしての動きにも左右され、本通信制御回路を構成要素とするシステムの他の構成要素がバスを占有する事により、本通信制御回路のDMA転送が妨げられる場合がある。この時は、データ152は受信データバッファ210がいっぱいになるまで順次格納される。対応するステータスもステータスバッファ220に順次格納される。本通信制御回路からのDMAリクエスト、受信終了割込みは、次に転送する受信データに対応したものが出力される。すなわち、最終データが既に受信データバッファ210内に存在したとしても、前のデータがまだDMA転送が行われずに受信データバッファ210内に存在している場合には、受信終了割込みは発生しない。
【0063】
図4は本実施の形態の通信制御回路の第2の実施例の構成について説明するための図である。
【0064】
本通信制御回路100は、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路であり、受信データ260をシリアルからパラレルに変換するシリアル−パラレル変換部250と、シリアルーパラレル変換部250からの出力データ252を先入れ先出しで格納する受信データバッファ210と、データ252を所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路240と、最終データに対応したステータスが生成されるタイミングで、ステータス生成回路240からの出力を先入れ先出しで格納するステータスバッファ220と、受信データバッファ210からの出力とステータスバッファ220からの出力を受け付け、切り替え制御信号282に基づきいずれかのデータを選択して出力するセレクタ回路230と、最終データが受信データバッファ210から出力されるタイミングを検出し、当該タイミングに基づきセレクタ回路に向け切り替え制御信号282を出力する制御信号出力回路280とを含む。
【0065】
ここにおいてステータスバッファの段数は任意であるが、1段以上受信データバッファの段数未満となるようにしてもよい。
【0066】
また受信データバッファ210は例えば1バイト毎に先入れ先出しで入出力可能なFIFOとして構成されている。
【0067】
ステータスバッファから最終ステータスを出力するタイミングは受信データの内容に基づき(最終データを検出して)判断するようにしてもよいし、固定長データである場合には受信データ長をカウントして、カウント値が固定のデータ長に達したかいなかにより判断しても良いし、最終データを受信した時の受信データバッファ220内の未転送のデータ数から、その後にDMA転送されたデータ数を差し引いてタイミングを検出してもよい。
【0068】
セレクタ回路230は、最終データに対応したステータスが前記ステータスバッファ220から出力されるタイミングに基づき出力される切り替え制御信号282をうけたら(例えば切り替え制御信号がハイレベルになったら)ステータスバッファ220からの出力を選択して出力するように構成する。
【0069】
このようにすると、最終データの代わりにステータスをDMA転送することが出来るため、HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路において、データの受信終了を知らせるデータ終了割り込みよりDMA転送が優先されるハードウエア構成でも、最終データに対応したステータスをとりだすことが可能になる。
【0070】
しかも本発明によれば、バス占有率の増大やDMA転送領域の増大を招くこともなく、余分なプログラム制御も必要なく最終データに対応したステータスをとりだすことができる。
【0071】
図5は、本通信制御回路を含んだ半導体集積回路装置(IC)の一例である。
【0072】
半導体集積回路装置(IC)300は、通信制御回路310、割り込みコントローラ320、DMAコントローラ330、メモリ340、CPU350とを含み、これらは内部バス360を介して接続されている。通信制御回路310は、HDLC手順のフレーム構成を有するデータ370を受信して、DMAリクエスト312をDMAコントローラ330に向け出力する。
【0073】
DMAコントローラ330によって読み出された受信データ316は、メモリ340上の所定のエリアに格納されて、CPU350等によって使用される。
【0074】
また通信制御回路310が検出した受信終了割り込みを割り込みコントローラ320に向け出力し、割り込みコントローラ320が、CPU350に対し割込み要求の発生を通知する。
【0075】
なお図5では本通信制御回路が、CPU350、DMAコントローラ330、割り込みコントローラ320と共に1つのICチップに集積されている場合について説明したがこれに限られない。例えば通信制御回路が、CPU350、DMAコントローラ330、割り込みコントローラ320とは別個に通信制御装置用のチップに集積されている場合でもよい。
【0076】
図6は、本通信制御装置を含んだボードの一例である。
【0077】
ボード400は、通信制御装置410、割り込みコントローラ420、DMAコントローラ430、CPU450とを含み、これらは外部バス460を介して接続されている。このように通信制御装置410、割り込みコントローラ420、DMAコントローラ430、CPU450はそれぞれ別個に集積されたチップをボード上で接続する場合でもよい。
【0078】
2.マイクロコンピュータ
図7は、本実施の形態のマイクロコンピュータのハードウエアブロック図の一例である。
【0079】
本マイクロコンピュータ700は、CPU510、キャッシュメモリ520、メモリマネジメントユニット(MMU)730、LCDコントローラ530、リセット回路540、プログラマブルタイマ550、リアルタイムクロック(RTC)560、DMAコントローラF570、割り込みコントローラ580、通信制御回路590、バスコントローラ600、A/D変換器610、D/A変換器620、入力ポート630、出力ポート640、I/Oポート650、クロック発生装置560、プリスケーラ570及びそれらを接続する各種バス680等、各種ピン690等を含む。
【0080】
ここで通信制御回路590は、例えば図2又は図4で説明したような構成を有している。
【0081】
3.電子機器
図8に、本実施の形態の電子機器のブロック図の一例を示す。本電子機器800は、マイクロコンピュータ(またはASIC)810、入力部820、メモリ830、電源生成部840、LCD850、音出力部860を含む。
【0082】
ここで、入力部820は、種々のデータを入力するためのものである。マイクロコンピュータ810は、この入力部820により入力されたデータに基づいて種々の処理を行うことになる。メモリ830は、マイクロコンピュータ810などの作業領域となるものである。電源生成部840は、電子機器800で使用される各種電源を生成するためのものである。LCD850は、電子機器が表示する各種の画像(文字、アイコン、グラフィック等)を出力するためのものである。 音出力部860は、電子機器800が出力する各種の音(音声、ゲーム音等)を出力するためのものであり、その機能は、スピーカなどのハードウェアにより実現できる。
【0083】
ここでマイクロコンピュータ(またはASIC)810は、例えば図7で説明したような構成を有している。
【0084】
図9(A)に、電子機器の1つである携帯電話950の外観図の例を示す。この携帯電話950は、入力部として機能するダイヤルボタン952や、電話番号や名前やアイコンなどを表示するLCD954や、音出力部として機能し音声を出力するスピーカ956を備える。
【0085】
図9(B)に、電子機器の1つである携帯型ゲーム装置960の外観図の例を示す。この携帯型ゲーム装置960は、入力部として機能する操作ボタン962、十字キー964や、ゲーム画像を表示するLCD966や、音出力部として機能しゲーム音を出力するスピーカ968を備える。
【0086】
図9(C)に、電子機器の1つであるパーソナルコンピュータ970の外観図の例を示す。このパーソナルコンピュータ970は、入力部として機能するキーボード972や、文字、数字、グラフィックなどを表示するLCD974、音出力部976を備える。
【0087】
なお、本実施形態を利用できる電子機器としては、図9(A)、(B)、(C)に示すもの以外にも、携帯型情報端末、ページャー、電子卓上計算機、タッチパネルを備えた装置、プロジェクタ、ワードプロセッサ、ビューファインダ型又はモニタ直視型のビデオテープレコーダ、カーナビゲーション装置等のLCDを使用する種々の電子機器を考えることができる。
【0088】
なお、本発明は本実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。
【図面の簡単な説明】
【図1】HDLC手順のフレーム構成(情報(I)フレーム)について説明するための図である。
【図2】本実施の形態の通信制御回路の第1の実施例の構成について説明するための図である。
【図3】通信制御回路における割り込み信号の働きと動作の関係について説明するための図である。
【図4】本実施の形態の通信制御回路の第2の実施例の構成について説明するための図である。
【図5】本通信制御回路を含んだ半導体集積回路装置(IC)の一例である。
【図6】本通信制御装置を含んだボードの一例である。
【図7】本実施の形態のマイクロコンピュータのハードウエアブロック図の一例である。
【図8】マイクロコンピュータを含む電子機器のブロック図の一例を示す。
【図9】図9(A)(B)(C)は、種々の電子機器の外観図の例である。
【符号の説明】
100 通信制御回路、 110 受信データバッファ
120 ステータスバッファ、 122 タグ部、 130 セレクタ回路
140 ステータス生成回路、 150 シリアル−パラレル変換部
160 受信データ、 170 データバス、 200 通信制御回路
210 受信データバッファ、 220 ステータスバッファ
222 タグ部、 230 セレクタ回路、 240 ステータス生成回路
250 シリアル−パラレル変換部、 260 受信データ
270 データバス、 280 制御信号出力回路
282 切り替え制御信号、 300 半導体集積回路装置
310 通信制御回路、 320 割り込みコントローラ
330 DMAコントローラ、 340 メモリ、 350 CPU
510 CPU、 530 LCDコントローラ、 540 リセット回路
550 プログラマブルタイマ、 560 リアルタイムクロック(RTC)
570 DMAコントローラ、 580 割り込みコントローラ
590 通信制御回路、 600 バスコントローラ
610 A/D変換器、 620 D/A変換器、 630 入力ポート
640 出力ポート、 650 I/Oポート
660 クロック発生装置(PLL)、 670 プリスケーラ
680 各種バス、 690 各種ピン、 700 マイクロコンピュータ
710 ROM、 720 RAM、 730 MMU、 800 電子機器
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a communication control circuit, a communication control device, a microcomputer, and an electronic device.
[0002]
BACKGROUND ART AND PROBLEMS TO BE SOLVED BY THE INVENTION
The communication control device performs bit error detection on the received data according to the HDLC procedure. The size of the data portion is arbitrarily long in bit units in the specification, but is usually set in byte units for convenience of processing, and a status is generated for each byte based on the detection result. The side that processes the received data (for example, the CPU) can determine whether the data is correctly transferred by checking this status.
[0003]
Here, if the data portion of the received data has a given length, the status generated when the final data (final data of the data portion = FCS: frame check sequence) is received is the data of the given length. This is a status in which it can be determined whether or not the entire data of the copy has been correctly transferred.
[0004]
However, in the conventional hardware configuration, since the DMA transfer has a higher priority than the data end interrupt for notifying the end of data reception, the data end interrupt processing is executed after the final data is read, and the final data is already stored in the communication control circuit. Since there is no data, it was not possible to guarantee the existence of the status corresponding to the final data, and it was difficult to retrieve the status.
[0005]
As the processing of such status, the following method has been conventionally proposed.
{Circle around (1)} JP-T-02520905 and JP-A-01-73944 propose a method of DMA transfer of the status together with the received data at the time of data reception. However, since the status is read every time, there is a problem that the bus occupation time of the DMA transfer every time becomes long and the capacity of the buffer of the DMA transfer destination also becomes large.
{Circle around (2)} "Special 02763009" proposes a method in which when the end of a frame is recognized, DMA transfer is masked by a final data interrupt signal, interrupt processing is performed first, and status is read. However, in order to read the status in the interrupt processing, if there is another interrupt with a higher priority, the processing is delayed, and there is a possibility that the received data overrun occurs. If the frame size cannot be specified, it is necessary to read not only the status but also the final data and the setting of the DMA controller, and if the occurrence of other interrupts overlaps, the influence on the received data overrun is large. Conceivable.
{Circle around (3)} JP-A-02-224542 and JP-A-03-11848 both incorporate a DMA function in the communication control unit. The former sets the transfer data number + 1 in the transfer data number setting register, and the latter sets the maximum number that can be set in the transfer data number setting register, corresponding to an arbitrary data length. In both cases, the status is added at the end and transferred. The DMA trigger for the status transfer is the former when the set value of the transfer data number setting register becomes “1”, and the latter when the end interrupt is generated by detecting the end flag. There is a problem that the total number of data transfers does not change when the status is read.
[0006]
The present invention has been made in view of the above problems, and an object of the present invention is to provide a communication control circuit that receives data having a frame configuration of an HDLC procedure and transfers the data in a DMA system. An object of the present invention is to provide a communication control circuit, a communication control device, a microcomputer, and an electronic device that can be taken out.
[0007]
[Means for Solving the Problems]
(1) The present invention is a communication control circuit that receives data having a frame configuration of an HDLC procedure and transfers the data by a DMA method.
A reception data buffer for storing reception data on a first-in first-out basis;
A status generation circuit that performs a bit error detection on the received data for each predetermined bit and generates a status;
A status buffer that has the same number of stages as the reception data buffer and is controlled so that input / output is performed in synchronization with the reception data buffer, and stores the output from the status generation circuit on a first-in first-out basis;
Accepts the output from the receive data buffer and the output from the status buffer, selects the output from the status buffer if the received data is the last data of the frame and outputs it to the bus, and if the received data is not the last data of the frame A selector circuit for selecting and outputting an output from the reception data buffer,
It is characterized by including.
[0008]
The HDLC procedure means a high level data link control procedure. The transfer data size of the received data may be a fixed length or a variable length.
[0009]
The present invention is applied when the received data has a frame structure of the HDLC procedure, and the last data of the frame is a flag sequence, which is an end flag indicating that the frame has ended. Therefore, the case where the received data is the last data of the frame is the case where the received data is the end flag of the flag sequence.
[0010]
The bit error detection is, for example, a CRC check (detecting a bit error with digital information), a parity check, or the like. For example, a status corresponding to each byte of received data is generated.
[0011]
The reception data buffer is, for example, a FIFO that can be input and output on a first-in first-out basis for each byte.
[0012]
Here, as the DMA request signal, a reception data enable signal which is an interrupt signal for notifying that the communication control circuit has received data can be used.
[0013]
According to the present invention, the reception data buffer and the status buffer have the same number of stages, and input / output is performed synchronously. Therefore, the status is stored in the status buffer corresponding to the reception data that is the final data of the frame. When the received data is the last data of the frame, the selector circuit selects the output from the status buffer and outputs it to the bus, so that the status corresponding to the last data can be taken out.
[0014]
As described above, according to the present invention, since the status can be DMA-transferred instead of the final data, the communication control circuit which receives the data having the frame structure of the HDLC procedure and transfers the data by the DMA method determines the end of the data reception. Even in a hardware configuration in which DMA transfer is prioritized over a data end interrupt to be notified, a status corresponding to final data can be obtained.
[0015]
Moreover, according to the present invention, the status corresponding to the final data can be obtained without increasing the bus occupancy or the DMA transfer area, and without requiring extra program control.
[0016]
Note that the final data of the frame itself is an end flag and need not be taken out.
[0017]
(2) The communication control circuit of the present invention comprises:
The status generation circuit,
Detects the final data of the frame based on the received data, adds a tag indicating the final status to the status corresponding to the final data of the frame, and outputs it to the status buffer,
The selector circuit is
It is characterized in that it is determined whether or not the received data is final data based on the tag added to the status.
[0018]
(3) The communication control circuit of the present invention comprises:
If the transfer data size of the received data is fixed length,
The status generation circuit includes:
The final data of the frame is detected based on the transfer data size, and a status indicating the final status is added to a status corresponding to the final data of the frame and output to the status buffer.
[0019]
Detecting the last data of a frame based on the transfer data size refers to, for example, a case where the count value of the received data length reaches the transfer data size and is determined to be the last data of the frame.
[0020]
(4) The present invention is a communication control circuit that receives data having a frame configuration of an HDLC procedure and transfers the data by a DMA method.
A reception data buffer for storing reception data on a first-in first-out basis;
A status generation circuit that performs a bit error detection on the received data for each predetermined bit and generates a status;
A status buffer for storing the output from the status generation circuit on a first-in first-out basis at a timing when a status corresponding to the final data is generated;
A control signal output circuit that detects a timing at which final data is output from the reception data buffer based on the reception data, and outputs a switching control signal toward the selector circuit based on the timing;
A selector circuit that receives an output from the reception data buffer and an output from the status buffer, and selects and outputs any data based on the switching control signal;
It is characterized by the following.
[0021]
The HDLC procedure means a high level data link control procedure. The transfer data size of the received data may be a fixed length or a variable length.
[0022]
The present invention is applied when the received data has the frame structure of the HDLC procedure, and the last data of the frame is a flag sequence, which is an end flag indicating that the frame is to be ended. Therefore, the case where the received data is the last data of the frame is the case where the received data is the end flag of the flag sequence.
[0023]
The reception data buffer is, for example, a FIFO that can be input and output on a first-in first-out basis for each byte.
[0024]
Here, as the DMA request signal, a reception data enable signal which is an interrupt signal for notifying that the communication control circuit has received data can be used.
[0025]
The timing of outputting the final status from the status buffer may be determined based on the content of the received data (detecting the final data), or if the data is fixed-length data, the received data length is counted and counted. The determination may be made based on whether the value has reached a fixed data length.
[0026]
The selector circuit selects the output from the status buffer when receiving a switching control signal output based on the timing at which the status corresponding to the final data is output from the status buffer (for example, when the switching control signal becomes high level). Output.
[0027]
By doing so, since the status can be DMA-transferred instead of the final data, the data having the frame structure of the HDLC procedure is received, and the communication control circuit for transferring the data in the DMA mode notifies the data that the data reception has been completed. Even in a hardware configuration in which the DMA transfer has priority over the end interrupt, a status corresponding to the final data can be obtained.
[0028]
Moreover, according to the present invention, the status corresponding to the final data can be obtained without increasing the bus occupancy or the DMA transfer area, and without requiring extra program control.
[0029]
Note that the final data of the frame itself is an end flag and need not be taken out.
[0030]
(5) The communication control circuit of the present invention comprises:
If the transfer data size of the received data is fixed length,
The control signal output circuit,
It is characterized by detecting a timing at which a status corresponding to final data is output from the status buffer based on a transfer data size.
[0031]
(6) The communication control circuit of the present invention comprises:
The status generation circuit includes:
When the last data of the frame is detected, a status generated corresponding to data that is a predetermined byte before the last data is output as a status corresponding to the last data.
[0032]
If the data part of the received data has a given length, the status generated when receiving the final data (final data of the data part) is that the entire data of the data part of the given length is correctly transferred. It is a status that can be determined whether This data is a predetermined number of data before the flag status which is the final data of the frame, and the status corresponding to this data is the status required on the receiving data receiving side. Since it is known in advance how many bytes this data comes before the last data of the frame, the status generation circuit can copy the status corresponding to this data and output it as the status corresponding to the last data of the frame.
[0033]
(7) A communication control device according to the present invention includes any one of the communication control circuits described above.
[0034]
(8) A microcomputer according to the present invention includes any one of the communication control circuits described above.
[0035]
(9) An electronic apparatus according to the present invention includes the microcomputer described above,
Input means for data to be processed by the microcomputer,
Output means for outputting data processed by the microcomputer.
[0036]
BEST MODE FOR CARRYING OUT THE INVENTION
1. Semiconductor device
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
[0037]
The present embodiment relates to a communication control circuit that receives data having a frame configuration of the HDLC procedure and transfers the data using a DMA method.
[0038]
The frames of the HDLC procedure include an information (I) frame that is a frame for transmitting information, a monitoring (S) frame that is a frame for monitoring and controlling a data link, and a request and a response for mode setting. There is an unnumbered (U) frame, which is a frame for reporting the number.
[0039]
FIG. 1 is a diagram for describing a frame configuration (information (I) frame) of the HDLC procedure.
[0040]
The information (I) frame 10 includes a flag sequence (F) 11, an address field (A) 12, a control field (C) 13, an information data part (I) 14, a flag check sequence (FCS) 15, and a flag sequence 16. Including.
[0041]
The flag sequence (F) 11 indicates the start of a frame, and stores a start flag '7E' (hexadecimal).
[0042]
The address field (A) 12 is an identification code of the secondary station (composite station). In the case of a command, the identification code of the station to be received is stored. In the case of a response, the identification code of the transmitting station is stored. .
[0043]
The control field (C) 13 stores data indicating the type of frame (whether the frame is an information frame (I), a monitoring (S) frame, or an unnumbered (U) frame).
[0044]
The information data section (I) 14 is intended to store user data, and there is no restriction on the bit configuration and bit length, but agreement between the transmitting and receiving stations is required.
[0045]
The frame check sequence (FCS) 15 is a field for error control, and stores a 16-bit sequence.
[0046]
The flag sequence (F) 16 indicates the end of the frame, and stores an end flag '7E' (hexadecimal).
[0047]
FIG. 2 is a diagram for explaining the configuration of the first example of the communication control circuit of the present embodiment.
[0048]
The communication control circuit 100 is a communication control circuit that receives the data 160 having the frame configuration of the HDLC procedure and transfers the data 160 by the DMA method, and a serial-parallel conversion unit 150 that converts the received data 160 from serial to parallel. A reception data buffer 100 for storing output data 152 from the serial-parallel conversion unit 150 on a first-in first-out basis; a status generation circuit 140 for performing bit error detection on the data 152 for each predetermined bit to generate a status; A status buffer 120 which has the same number of stages as that of the receiving data buffer 110 and is controlled so that input and output are performed in synchronization with the receiving data buffer 110, and stores the output from the status generating circuit 140 on a first-in first-out basis; From 120 When the received data 160 is the last data of the frame, the output from the status buffer 120 is selected and output to the data bus 170 when the received data 160 is the last data of the frame. And a selector circuit 130 for selecting an output from the data bus 170 and outputting the selected data to the data bus 170.
[0049]
Further, the reception data buffer 110 is configured as a FIFO that can be input and output on a first-in first-out basis, for example, for each byte.
[0050]
The status generation circuit 140 performs a CRC check (detecting a bit error in digital information) using a frame check sequence (FCS) (see 15 in FIG. 1) as a bit error detection.
[0051]
Here, as the DMA request signal, a reception data enable signal, which is an interrupt signal indicating that data has been received in the communication control device, can be used.
[0052]
Further, the status generation circuit 140 detects the final data of the frame (the flag sequence 16 in FIG. 1) based on the data 152, and adds a tag indicating that the status is the status to the status corresponding to the final data of the frame, and The data is output to the buffer 120, and the selector circuit 130 may determine whether or not the received data is final data based on the tag added to the status. For example, a tag unit 122 may be provided in the status buffer 120, and tag data may be stored in the tag unit 122.
[0053]
Here, if the transfer data size of the received data 160 is a fixed length, the status generation circuit 140 detects the last data of the frame based on the transfer data size, and the status corresponding to the last data of the frame includes the status. A tag indicating the presence may be added and output to the status buffer 120.
[0054]
Also, the status generation circuit 140 can be configured to output a status generated corresponding to data a predetermined byte before the final data of the frame when detecting the final data of the frame as a status corresponding to the end flag data. .
[0055]
According to the configuration described above, the reception data buffer and the status buffer have the same number of stages, and input / output is performed synchronously. Therefore, the status is stored in the status buffer corresponding to the reception data that is the last data of the frame. When the received data is the last data of the frame, the selector circuit selects the output from the status buffer and outputs it to the bus, so that the status corresponding to the last data can be taken out.
[0056]
Since the status can be DMA-transferred instead of the final data as described above, the data having the frame structure of the HDLC procedure is received, and the communication control circuit which transfers the data by the DMA method transmits a data end interrupt for notifying the end of the data reception. Even in a hardware configuration in which DMA transfer is prioritized, a status corresponding to final data can be obtained.
[0057]
Moreover, according to the present invention, the status corresponding to the final data can be obtained without increasing the bus occupancy or the DMA transfer area, and without requiring extra program control.
[0058]
FIG. 3 is a diagram for explaining the relationship between the function and operation of the interrupt signal in the communication control circuit.
[0059]
In the reception operation of the communication control device according to the present embodiment, three types of interrupts, that is, a reception data enable, a reception data overrun error, and a reception end interrupt occur. The reception data enable is an interrupt notifying that data has been received. A receive data overrun error is an interrupt that indicates that data has been overwritten, and occurs when the next data is received without reading data even when the receive buffer is full. Thus, the receiving operation at this time is a failure. The reception end interrupt is an interrupt notifying the end of reception.
[0060]
In this communication control circuit, the received data enable is used as a request signal to the DMA controller, and the received data is read out using the DMA. In this case, it is preferable to design the hardware such that the reception data enable is temporarily released together with the reading of the reception data.
[0061]
That is, when data is received as shown in S1 to S8 in FIG. 3, a reception data enable occurs. With this as a DMA request, the output from the reception data buffer is selected by the selector circuit, and the reception data is transferred by DMA.
[0062]
When the final data is received (S9), a reception data enable interrupt and a reception end interrupt are generated (S10), the output from the status buffer is selected by the selector circuit, and the status is transferred by the DMA (S11).
The DMA operation also depends on the operation of the system, and DMA transfer of the communication control circuit may be hindered by occupation of the bus by other components of the system including the communication control circuit. At this time, the data 152 is sequentially stored until the reception data buffer 210 becomes full. The corresponding status is also sequentially stored in the status buffer 220. As the DMA request and the reception end interrupt from the communication control circuit, the one corresponding to the next received data to be transferred is output. That is, even if the last data already exists in the reception data buffer 210, if the previous data still exists in the reception data buffer 210 without performing the DMA transfer, the reception end interrupt does not occur.
[0063]
FIG. 4 is a diagram for describing a configuration of a second example of the communication control circuit according to the present embodiment.
[0064]
The communication control circuit 100 is a communication control circuit that receives data having a frame configuration of the HDLC procedure and transfers the data using a DMA method. The communication control circuit 100 includes a serial-parallel conversion unit 250 that converts received data 260 from serial to parallel. A reception data buffer 210 that stores output data 252 from the parallel-to-parallel conversion unit 250 on a first-in first-out basis; a status generation circuit 240 that performs bit error detection on the data 252 for each predetermined bit to generate a status; Is generated, the status buffer 220 that stores the output from the status generation circuit 240 on a first-in first-out basis, the output from the reception data buffer 210 and the output from the status buffer 220 are received, and one of them is output based on the switching control signal 282. De And a control signal output circuit 280 that detects a timing at which the final data is output from the reception data buffer 210 and outputs a switching control signal 282 to the selector circuit based on the timing. Including.
[0065]
Here, the number of stages of the status buffer is arbitrary, but may be one or more and less than the number of stages of the reception data buffer.
[0066]
Further, the reception data buffer 210 is configured as a FIFO which can perform input and output on a first-in first-out basis for each byte, for example.
[0067]
The timing of outputting the final status from the status buffer may be determined based on the content of the received data (detecting the final data), or if the data is fixed-length data, the received data length is counted and counted. The determination may be made based on whether or not the value has reached a fixed data length, or by subtracting the number of data transferred by DMA thereafter from the number of untransferred data in the reception data buffer 220 when the last data is received. Timing may be detected.
[0068]
The selector circuit 230 receives the switching control signal 282 output based on the timing at which the status corresponding to the final data is output from the status buffer 220 (for example, when the switching control signal becomes a high level). The output is selected and output.
[0069]
By doing so, since the status can be DMA-transferred instead of the final data, the data having the frame structure of the HDLC procedure is received, and the communication control circuit for transferring the data in the DMA mode notifies the data that the data reception has been completed. Even in a hardware configuration in which the DMA transfer has priority over the end interrupt, a status corresponding to the final data can be obtained.
[0070]
Moreover, according to the present invention, the status corresponding to the final data can be obtained without increasing the bus occupancy or the DMA transfer area, and without requiring extra program control.
[0071]
FIG. 5 is an example of a semiconductor integrated circuit device (IC) including the present communication control circuit.
[0072]
The semiconductor integrated circuit device (IC) 300 includes a communication control circuit 310, an interrupt controller 320, a DMA controller 330, a memory 340, and a CPU 350, which are connected via an internal bus 360. The communication control circuit 310 receives the data 370 having the frame configuration of the HDLC procedure, and outputs a DMA request 312 to the DMA controller 330.
[0073]
The received data 316 read by the DMA controller 330 is stored in a predetermined area on the memory 340 and used by the CPU 350 and the like.
[0074]
Further, the communication control circuit 310 outputs the reception end interrupt detected to the interrupt controller 320, and the interrupt controller 320 notifies the CPU 350 of the occurrence of the interrupt request.
[0075]
Although FIG. 5 illustrates the case where the communication control circuit is integrated on a single IC chip together with the CPU 350, the DMA controller 330, and the interrupt controller 320, the present invention is not limited to this. For example, the communication control circuit may be integrated on a chip for a communication control device separately from the CPU 350, the DMA controller 330, and the interrupt controller 320.
[0076]
FIG. 6 is an example of a board including the communication control device.
[0077]
The board 400 includes a communication control device 410, an interrupt controller 420, a DMA controller 430, and a CPU 450, which are connected via an external bus 460. As described above, the communication control device 410, the interrupt controller 420, the DMA controller 430, and the CPU 450 may be configured to connect separately integrated chips on a board.
[0078]
2. Microcomputer
FIG. 7 is an example of a hardware block diagram of the microcomputer of the present embodiment.
[0079]
The microcomputer 700 includes a CPU 510, a cache memory 520, a memory management unit (MMU) 730, an LCD controller 530, a reset circuit 540, a programmable timer 550, a real-time clock (RTC) 560, a DMA controller F570, an interrupt controller 580, and a communication control circuit. 590, a bus controller 600, an A / D converter 610, a D / A converter 620, an input port 630, an output port 640, an I / O port 650, a clock generator 560, a prescaler 570, and various buses 680 connecting them. , Various pins 690 and the like.
[0080]
Here, the communication control circuit 590 has, for example, the configuration described with reference to FIG. 2 or FIG.
[0081]
3. Electronics
FIG. 8 illustrates an example of a block diagram of an electronic device of this embodiment. The electronic device 800 includes a microcomputer (or ASIC) 810, an input unit 820, a memory 830, a power generation unit 840, an LCD 850, and a sound output unit 860.
[0082]
Here, the input unit 820 is for inputting various data. The microcomputer 810 performs various processes based on the data input by the input unit 820. The memory 830 serves as a work area for the microcomputer 810 and the like. The power supply generation unit 840 is for generating various power supplies used in the electronic device 800. The LCD 850 is for outputting various images (characters, icons, graphics, and the like) displayed by the electronic device. The sound output unit 860 is for outputting various sounds (sounds, game sounds, etc.) output from the electronic device 800, and its function can be realized by hardware such as a speaker.
[0083]
Here, the microcomputer (or ASIC) 810 has, for example, the configuration described with reference to FIG.
[0084]
FIG. 9A illustrates an example of an external view of a mobile phone 950 which is one of electronic devices. The mobile phone 950 includes a dial button 952 functioning as an input unit, an LCD 954 displaying a telephone number, a name, an icon, and the like, and a speaker 956 functioning as a sound output unit and outputting sound.
[0085]
FIG. 9B illustrates an example of an external view of a portable game device 960 which is one of the electronic devices. The portable game device 960 includes an operation button 962 functioning as an input unit, a cross key 964, an LCD 966 displaying a game image, and a speaker 968 functioning as a sound output unit and outputting game sounds.
[0086]
FIG. 9C illustrates an example of an external view of a personal computer 970 which is one of electronic devices. The personal computer 970 includes a keyboard 972 functioning as an input unit, an LCD 974 for displaying characters, numbers, graphics, and the like, and a sound output unit 976.
[0087]
Note that, as electronic devices that can use the present embodiment, in addition to those shown in FIGS. 9A, 9B, and 9C, devices including a portable information terminal, a pager, an electronic desk calculator, and a touch panel, Various electronic devices using an LCD, such as a projector, a word processor, a viewfinder type or a monitor direct-view type video tape recorder, and a car navigation device can be considered.
[0088]
The present invention is not limited to the present embodiment, and various modifications can be made within the scope of the present invention.
[Brief description of the drawings]
FIG. 1 is a diagram for describing a frame configuration (information (I) frame) of an HDLC procedure.
FIG. 2 is a diagram for describing a configuration of a first example of the communication control circuit according to the present embodiment;
FIG. 3 is a diagram for explaining the relationship between the function and operation of an interrupt signal in a communication control circuit.
FIG. 4 is a diagram for describing a configuration of a second example of the communication control circuit according to the present embodiment;
FIG. 5 is an example of a semiconductor integrated circuit device (IC) including the communication control circuit.
FIG. 6 is an example of a board including the communication control device.
FIG. 7 is an example of a hardware block diagram of a microcomputer of the present embodiment.
FIG. 8 illustrates an example of a block diagram of an electronic device including a microcomputer.
FIGS. 9A, 9B, and 9C are examples of external views of various electronic devices.
[Explanation of symbols]
100 communication control circuit, 110 reception data buffer
120 status buffer, 122 tag section, 130 selector circuit
140 status generation circuit, 150 serial-parallel converter
160 received data, 170 data bus, 200 communication control circuit
210 Receive data buffer, 220 Status buffer
222 tag section, 230 selector circuit, 240 status generation circuit
250 serial-parallel converter, 260 received data
270 data bus, 280 control signal output circuit
282 switching control signal, 300 semiconductor integrated circuit device
310 communication control circuit, 320 interrupt controller
330 DMA controller, 340 memory, 350 CPU
510 CPU, 530 LCD controller, 540 Reset circuit
550 Programmable timer, 560 Real-time clock (RTC)
570 DMA controller, 580 interrupt controller
590 communication control circuit, 600 bus controller
610 A / D converter, 620 D / A converter, 630 Input port
640 output port, 650 I / O port
660 clock generator (PLL), 670 prescaler
680 various buses, 690 various pins, 700 microcomputer
710 ROM, 720 RAM, 730 MMU, 800 Electronic equipment

Claims (9)

HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路であって、
受信データを先入れ先出しで格納する受信データバッファと、
前記受信データを所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路と、
受信データバッファと同じ段数を有し受信データバッファと同期して入出力が行われるよう制御され、ステータス生成回路からの出力を先入れ先出しで格納するステータスバッファと、
受信データバッファからの出力とステータスバッファからの出力を受け付け、受信データがフレームの最終データである場合にはステータスバッファからの出力を選択してバスに出力し、受信データがフレームの最終データでない場合には受信データバッファからの出力を選択して出力するセレクタ回路と、
を含むことを特徴とする通信制御回路。
A communication control circuit for receiving data having a frame configuration of an HDLC procedure and transferring the data by a DMA method,
A reception data buffer for storing reception data on a first-in first-out basis;
A status generation circuit that performs a bit error detection on the received data for each predetermined bit and generates a status;
A status buffer that has the same number of stages as the reception data buffer and is controlled so that input / output is performed in synchronization with the reception data buffer, and stores the output from the status generation circuit on a first-in first-out basis;
Accepts the output from the receive data buffer and the output from the status buffer, selects the output from the status buffer if the received data is the last data of the frame and outputs it to the bus, and if the received data is not the last data of the frame A selector circuit for selecting and outputting an output from the reception data buffer;
A communication control circuit comprising:
請求項1において、
前記ステータス生成回路は、
受信データに基づきフレームの最終データを検出し、フレームの最終データに対応したステータスには、最終ステータスであることを示すタグを付加してステータスバッファに出力し、
前記セレクタ回路は、
ステータスに付加されたタグに基づき受信データが最終データであるか否か判断することを特徴とする通信制御回路。
In claim 1,
The status generation circuit includes:
Detects the final data of the frame based on the received data, adds a tag indicating the final status to the status corresponding to the final data of the frame, and outputs it to the status buffer,
The selector circuit includes:
A communication control circuit for determining whether received data is final data based on a tag added to a status.
請求項2において、
受信データの転送データサイズが固定長である場合には、
前記ステータス生成回路は、
転送データサイズに基づきフレームの最終データを検出し、フレームの最終データに対応したステータスには、ステータスであることを示すタグを付加してステータスバッファに出力することを特徴とする通信制御回路。
In claim 2,
If the transfer data size of the received data is fixed length,
The status generation circuit includes:
A communication control circuit for detecting final data of a frame based on a transfer data size, adding a tag indicating the status to a status corresponding to the final data of the frame, and outputting the result to a status buffer.
HDLC手順のフレーム構成を有するデータを受信して、DMA方式で転送する通信制御回路であって、
受信データを先入れ先出しで格納する受信データバッファと、
前記受信データを所定ビット毎にビット誤り検出を行い、ステータスを生成するステータス生成回路と、
最終データに対応したステータスが生成されるタイミングで、ステータス生成回路からの出力を先入れ先出しで格納するステータスバッファと、
受信データに基づき最終データが前記受信データバッファから出力されるタイミングを検出し、当該タイミングに基づきセレクタ回路に向け切り替え制御信号を出力する制御信号出力回路と、
受信データバッファからの出力とステータスバッファからの出力を受け付け、前記切り替え制御信号に基づきいずれかのデータを選択して出力するセレクタ回路と、
ことを特徴とする通信制御回路。
A communication control circuit for receiving data having a frame configuration of an HDLC procedure and transferring the data by a DMA method,
A reception data buffer for storing reception data on a first-in first-out basis;
A status generation circuit that performs a bit error detection on the received data for each predetermined bit and generates a status;
A status buffer for storing the output from the status generation circuit on a first-in first-out basis at a timing when a status corresponding to the final data is generated;
A control signal output circuit that detects a timing at which final data is output from the reception data buffer based on the reception data, and outputs a switching control signal toward the selector circuit based on the timing;
A selector circuit that receives an output from the reception data buffer and an output from the status buffer, and selects and outputs any data based on the switching control signal;
A communication control circuit characterized by the above.
請求項4において、
受信データの転送データサイズが固定長である場合には、
前記制御信号出力回路は、
転送データサイズに基づき最終データに対応したステータスが前記ステータスバッファから出力されるタイミングを検出することを特徴とする通信制御回路。
In claim 4,
If the transfer data size of the received data is fixed length,
The control signal output circuit,
A communication control circuit for detecting a timing at which a status corresponding to final data is output from the status buffer based on a transfer data size.
請求項1乃至5のいずれかにおいて、
前記ステータス生成回路は、
フレームの最終データを検出したら最終データより所定バイト前のデータに対応して生成されたステータスを、最終データに対応するステータスとして出力することを特徴とする通信制御回路。
In any one of claims 1 to 5,
The status generation circuit includes:
A communication control circuit for outputting a status generated corresponding to data a predetermined byte before the final data when detecting the final data of the frame as a status corresponding to the final data.
請求項1乃至6のいずれかの通信制御回路を含む通信制御装置。A communication control device including the communication control circuit according to claim 1. 請求項1乃至7のいずれかの通信制御回路を含むマイクロコンピュータ。A microcomputer including the communication control circuit according to claim 1. 請求項8に記載のマイクロコンピュータと、
前記マイクロコンピュータの処理対象となるデータの入力手段と、
前記マイクロコンピュータにより処理されたデータを出力するための出力手段とを含むことを特徴とする電子機器。
A microcomputer according to claim 8,
Input means for data to be processed by the microcomputer,
Output means for outputting data processed by the microcomputer.
JP2002262924A 2002-09-09 2002-09-09 Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device Withdrawn JP2004104418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002262924A JP2004104418A (en) 2002-09-09 2002-09-09 Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002262924A JP2004104418A (en) 2002-09-09 2002-09-09 Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device

Publications (1)

Publication Number Publication Date
JP2004104418A true JP2004104418A (en) 2004-04-02

Family

ID=32262826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002262924A Withdrawn JP2004104418A (en) 2002-09-09 2002-09-09 Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device

Country Status (1)

Country Link
JP (1) JP2004104418A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074320A (en) * 2005-09-07 2007-03-22 Matsushita Electric Ind Co Ltd Network equipment apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074320A (en) * 2005-09-07 2007-03-22 Matsushita Electric Ind Co Ltd Network equipment apparatus

Similar Documents

Publication Publication Date Title
TWI254211B (en) System-on-a-chip
TW561399B (en) Math coprocessor
JP2678283B2 (en) Data communication controller
US6779125B1 (en) Clock generator circuitry
US20070174522A1 (en) Universal interface apparatus and method
US8230137B2 (en) Network processor, reception controller and data reception processing method performing direct memory access transfer
US7093039B2 (en) Communication terminal increasing effective data rate on asynchronous transmission and a data transmission method therefor
JP2006252006A (en) Debug system, semiconductor integrated circuit device, microcomputer and electronic equipment
JP2004104418A (en) Method for controlling semiconductor device, microcomputer, electronic apparatus, and semiconductor device
JP2004129129A (en) Communication control circuit, communication controller, microcomputer, and electronic apparatus
JP2568458B2 (en) Data length detector
JP2004118419A (en) Semiconductor device, microcomputer, electronic equipment, and control process of semiconductor device
JP2006050503A (en) Integrated circuit device, communication control apparatus, microcomputer, and electronic equipment
US20080288692A1 (en) Semiconductor integrated circuit device and microcomputer
US7890728B2 (en) Memory interface device, memory interface method and modem device
JPH09179948A (en) Ic card interface device
JP2002064584A (en) Hdlc transmitter-receiver, hdlc receiver, and hdlc transmitter
JP2009069974A (en) Bus interface circuit and information processor
JP2004129130A (en) Communication control circuit, communication controller, microcomputer, and electronic apparatus
JP2630077B2 (en) Clock synchronous serial interface
JP4281367B2 (en) Data transfer control circuit, electronic device, and data transfer control method
KR100299572B1 (en) Interface device between microprocessor and peripherals equipped with burst mode bus
CN117149679A (en) DMA communication device and DMA communication circuit
JP2739783B2 (en) Data transfer method between packages
KR970001624B1 (en) Tag generation and its processing method in the packet switching system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110