JP3676271B2 - Transport stream processing device - Google Patents

Transport stream processing device Download PDF

Info

Publication number
JP3676271B2
JP3676271B2 JP2001237412A JP2001237412A JP3676271B2 JP 3676271 B2 JP3676271 B2 JP 3676271B2 JP 2001237412 A JP2001237412 A JP 2001237412A JP 2001237412 A JP2001237412 A JP 2001237412A JP 3676271 B2 JP3676271 B2 JP 3676271B2
Authority
JP
Japan
Prior art keywords
section
data
entry
bytes
comparison
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001237412A
Other languages
Japanese (ja)
Other versions
JP2003051801A (en
Inventor
若彦 岡崎
教彦 溝端
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2001237412A priority Critical patent/JP3676271B2/en
Publication of JP2003051801A publication Critical patent/JP2003051801A/en
Application granted granted Critical
Publication of JP3676271B2 publication Critical patent/JP3676271B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
ディジタル放送の分野では、映像・音声・静止画・文字データ・音楽データ・コンピュータプログラム等の番組要素がトランスポートパケット形式で伝送される。この発明は、必要なトランスポートパケットを抽出したり、トランスポートパケットのペイロード内のデータ形式がセクション形式であるとき、必要なデータを抽出したりするトランスポートストリーム処理装置に関する。
【0002】
【従来の技術】
特開2000−23135号公報の図1には、順次入力されるデジタルデータのヘッダとエントリデータとをある特定の単位で比較し、判定積算部で現在の比較結果と過去の比較結果とを演算し、判定保持部で演算結果を保持し、これらの処理を比較判定終了まで続けるセクション選別装置が開示されている。
【0003】
【発明が解決しようとする課題】
上述のセクション選別装置では、デジタルデータと複数のエントリとの比較を比較の必要性の有無にかかわらず比較判定終了まで続けなければならないため比較処理に時間がかかる。また、エントリ1つに対して1つづつ判定保持手段を持たなければならないため回路規模が大きくなる。また、PID比較、セクションインデックス比較、セクション比較の一連の比較を同一ハードウエアで実現することが困難である。
【0004】
この発明は上記のような問題を解決するためになされたものであり、その目的は、比較処理時間を短縮することができるトランスポートストリーム処理装置を提供することである。
【0005】
この発明のもう1つの目的は、回路規模を小さくすることができるトランスポートストリーム処理装置を提供することである。
【0006】
この発明のさらにもう1つの目的は、複数種類の比較を単一のハードウエアで実現することができるトランスポートストリーム処理装置を提供することである。
【0007】
【課題を解決するための手段】
この発明の1つの局面に従うと、トランスポートストリーム処理装置は、セクションデータバッファと、セクションバッファ制御回路と、セクションレングス判断回路と、n個のパターンメモリと、メモリ制御回路と、比較回路と、エントリ判断回路とを備える。セクションバッファ制御回路は、トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトをセクションバッファに書き込む。セクションレングス判断回路は、セクションデータバッファに書き込まれたデータに基づいてセクションデータ長を判断する。n個のパターンメモリは、ホストから書き込み/読み出しが可能なメモリである。メモリ制御回路は、セクションデータ長に応じてn個のパターンメモリのアクセス方法を変える。比較回路は、セクションデータバッファのデータとn個のパターンメモリから読み出されたデータとの比較方法をセクションデータ長に応じて変える。エントリ判断回路は、比較回路による比較結果とセクションデータ長とに基づいて一致エントリを判断する。上記トランスポートストリーム処理装置では、セクションデータ長に合わせn個のパターンメモリから比較するデータをpパターン読み出し、当該pパターンをそれぞれセクションデータバッファのデータの先頭から比較する。
【0008】
好ましくは、上記n個のパターンメモリの同一物理アドレスには同一エントリのデータを配置し、アドレスに応じて同一エントリ内のバイト順を入れ替えた構成となっている。
【0009】
好ましくは、上記n個のパターンメモリの同一物理アドレスには複数のエントリのデータを配置し、エントリ内のデータを分割し異なった物理アドレスにデータを配置する。
【0010】
この発明のもう1つの局面に従うと、トランスポートストリーム処理装置は、セクションデータバッファと、セクションバッファ制御回路と、n個のパターンメモリと、モードメモリと、メモリ制御回路と、比較回路と、エントリ判断回路とを備える。セクションバッファ制御回路は、トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトをセクションバッファに書き込む。n個のパターンメモリは、ホストから書き込み/読み出しが可能なメモリである。モードメモリは、ホストから書き込み/読み出しが可能なメモリである。メモリ制御回路は、ホストアクセス時はパターンメモリやモードメモリの書き込み/読み出しを行い、スタート信号入力時は比較用のメモリの読み出しを行う。比較回路は、モードメモリの値によりセクションデータバッファのデータとn個のパターンメモリのデータとの比較方法を変える。エントリ判断回路は、比較回路からの結果とモードメモリの値より一致エントリを判断する。上記トランスポートストリーム処理装置では、スタート信号により比較を開始しモードメモリの値により比較方法を変えることで1アクセス当たり複数個のパターンと比較することができる。
【0011】
この発明のさらにもう1つの局面に従うと、トランスポートストリーム処理装置は、セクションデータバッファと、セクションバッファ制御回路と、パターンメモリと、タグメモリと、メモリ制御回路と、比較回路と、一致アドレス保存回路とを備える。セクションバッファ制御回路は、トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトをセクションバッファに書き込む。パターンメモリは、ホストから書き込み/読み出しが可能なメモリである。タグメモリには、比較すべきパターンメモリのアドレスが書き込まれる。メモリ制御回路は、ホストアクセス時はパターンメモリまたはタグメモリの書き込み/読み出しを行い、スタート信号が入力されたときは比較するデータを読み出すためにパターンメモリとタグメモリの読み出しを行う。比較回路は、セクションデータバッファのデータとパターンメモリのデータを比較しタグメモリの値よりストップ信号を発生する。一致アドレス保存回路は、比較回路による比較の結果一致したアドレスに対応した値をタグメモリに書き込む。上記トランスポートストリーム処理装置では、スタート信号がアクティブになるとタグメモリに書き込まれているパターンメモリの有効なアドレスによりパターンメモリから読み出したデータとセクションデータバッファの値とを比較し、一致したアドレスをタグメモリに書き込むように制御できる。
【0012】
この発明のさらにもう1つの局面に従うと、トランスポートストリーム処理装置は、セクションデータバッファと、セクションバッファ制御回路と、パターンメモリと、第1のタグレジスタと、第2のタグレジスタと、メモリ制御回路と、比較回路と、プライオリティエンコーダと、一致結果保存回路と、タグ消去回路とを備える。セクションバッファ制御回路は、トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトをセクションバッファに書き込む。パターンメモリは、ホストから書き込み/読み出しが可能なメモリである。第1のタグレジスタは、比較すべきパターンメモリのアドレス位置を保存する。第2のタグレジスタは、比較する度に第1のタグレジスタの値をロードする。メモリ制御回路は、ホストアクセス時はパターンメモリまたは第1のタグレジスタの書き込み/読み出しを行い、スタート信号が入力されたときは第1のタグレジスタから第2のタグレジスタへデータ転送を行い、比較するためにパターンメモリの読み出しを行う。比較回路は、セクションデータバッファのデータとパターンメモリのデータを比較し、タグレジスタの値よりストップ信号を発生する。プライオリティエンコーダは、第2のタグレジスタの値よりパターンメモリのアドレスを出力する。一致結果保存回路は、比較回路からの一致信号で一致結果を第1のタグレジスタに反映する。タグ消去回路は、プライオリティエンコーダのアドレスより該当の値を消去する。上記トランスポートストリーム処理装置では、スタート信号がアクティブとなったとき第1のタグレジスタの値を第2のタグレジスタに転送し、次いで第2のタグレジスタの値が1の位置をプライオリティエンコーダが検出し、プライオリティエンコーダが発生したアドレスに対しタグ消去回路が当該アドレスに対応した第2のタグレジスタを0に書き込むとともに、モードにより一致結果を第1のタグレジスタに保存しかつプライオリティエンコーダが発生したアドレスのパターンメモリの値を読み出し比較回路が一致を判断した時はタグレジスタに1を書き込み不一致なら0を書き込み、タグ消去できなくなるまでまたはストップ信号がメモリ制御回路に入力されるまで1クロックでパターンメモリのアクセスを連続して行うことができる。
【0013】
タグレジスタの使用方法としてトランスポートパケットのPIDの一致検出を行うPIDフィルタと、PIDとセクションを関連付けるセクションインデックスフィルタと、セクションの一致検出をおこなうセクションフィルタの3通りを使い分け、タグレジスタを必要に応じ書き換え任意のパターンメモリの領域を使用することができることが好ましい。
【0014】
この発明のさらにもう1つの局面に従うと、トランスポートストリーム処理装置は、セクションデータバッファと、セクションバッファ制御回路と、パターンメモリと、メモリ制御回路と、比較回路と、ローカルメモリとを備える。セクションバッファ制御回路は、トランスポートストリームからトランスポートパケットを抜き出しトランスポートパケットのペイロード内のセクションデータの先頭からmバイトをセクションバッファに書き込む。パターンメモリは、ホストから書き込み/読み出しが可能なメモリである。メモリ制御回路は、ホストアクセス時はパターンメモリの書き込み/読み出しを行い、スタート信号が入力されたときは比較するためにパターンメモリの読み出しを行う。比較回路は、セクションデータバッファのデータとパターンメモリのデータを比較する。ローカルメモリは、ホストからデータを書き込み/読み出しできるメモリである。上記トランスポートストリーム処理装置では、セクションデータの開始nバイトがパケット間を跨る場合は、この跨る前のセクションデータの開始nバイトをローカルメモリに保存し、続きのセクションが入力されたときにローカルメモリからこのセクションデータの開始nバイトを読み出してセクションバッファに書き込み現在入力された続きのセクションに連結し、この連結されたセクションデータとパターンメモリの比較を行う。
【0015】
この発明によるトランスポートストリーム処理装置では、デジタルデータの長さ、つまりセクションレングスを判断し、不要な条件は読み出さず、必要な条件のみ読み出し比較することで、比較処理時間が短縮できる。
【0016】
また、比較すべきデジタルデータが全て揃ってから比較をエントリ単位で行うので、比較判定で一致した時終了すれば判定保持手段は必要ない。
【0017】
また、複数種類の比較を単一ハードウエアで実現することができる。
【0018】
【発明の実施の形態】
以下、この発明の実施の形態を図面を参照して詳しく説明する。なお、図中同一または相当部分には同一の符号を付し、その説明は繰り返さない。
【0019】
(第1の実施形態)
図1は、この発明の第1の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図1に示すトランスポートストリーム処理装置は、PIDフィルタ100と、セクションバッファ制御回路102と、セクションデータバッファ101a,101bと、セクションレングス判断回路103と、メモリ制御回路105と、パターンメモリ104a,104bと、比較回路106と、エントリ判断回路107と、セレクタ108とを備える。
【0020】
PIDフィルタ100は、トランスポートストリームから所定のトランスポートパケットを抜き出し、当該トランスポートパケットのセクションデータをセクションバッファ制御回路102に与える。
【0021】
セクションバッファ制御回路102は、PIDフィルタ100からのセクションデータの先頭から16バイト(0〜15バイト目)を取り出す。そして、取り出したセクションデータの0〜7バイト目までをセクションデータバッファ101aに書き込み、8〜15バイト目までをセクションデータバッファ101bに書き込む。
【0022】
セクションレングス判断回路103は、セクションデータバッファ101aに格納されたセクションデータの先頭から2バイト目の下位4ビットと3バイト目8ビットとの合計12ビットに基づいてセクションレングスSLを求める。セクションレングスSLは、PIDフィルタ100からのセクションデータの長さである。
【0023】
パターンメモリ104a,104bには複数のエントリが格納されている。エントリは、PIDフィルタ100からのセクションデータを選別するためのデータである。
【0024】
メモリ制御回路105は、パターンメモリ104a,104bからそれぞれ8バイトのデータを読み出す。セクションレングスSLが9バイト以上のときは、パターンメモリ104aから読み出された8バイトのデータとパターンメモリ104bから読み出された8バイトのデータとによって1つのエントリ(16バイト)が構成される。一方、セクションレングスSLが8バイト以下のときは、パターンメモリ104aから読み出された8バイトのデータによって1つのエントリ(8バイト)が構成され、パターンメモリ104bから読み出された8バイトのデータによって別の1つのエントリ(8バイト)が構成される。
【0025】
比較回路106は、比較器106a,106bとセレクタ106c−106eとを含む。セレクタ106cは、セクションレングス判断回路103からのセクションレングスSLに応じて、セクションデータバッファ101aから読み出されたデータまたはセクションデータバッファ101bから読み出されたデータを比較器106bに与える。セレクタ106dは、メモリ制御回路105からの制御信号に応じて、パターンメモリ104aから読み出されたデータまたはパターンメモリ104bから読み出されたデータを比較器106aに与える。比較器106aは、セクションデータバッファ101aから読み出されたデータとセレクタ106dから与えられるデータとが一致するときは“1”を、一致しないときは“0”をエントリ判断回路107に与える。セレクタ106eは、メモリ制御回路105からの制御信号に応じて、パターンメモリ104aから読み出されたデータまたはパターンメモリ104bから読み出されたデータを比較器106bに与える。比較器106bは、セレクタ106cから与えられるデータとセレクタ106eから与えられるデータとが一致するときは“1”を、一致しないときは“0”をエントリ判断回路107に与える。
【0026】
エントリ判断回路107は、セクションデータバッファ101a,101bから読み出されたセクションデータとパターンメモリ104a,104bから読み出されたエントリとが一致するか否かをセクションレングスSLに応じた方法で判断する。以下、具体的に説明する。セクションレングスSLが9バイト以上の場合、比較器106aの出力と比較器106bの出力との論理積が“1”のときはセクションデータバッファ101a,101bから読み出されたセクションデータとパターンメモリ104a,104bから読み出されたエントリとが一致すると判断し、上記論理積が“0”のときは不一致と判断する。一方、セクションレングスSLが8バイト以下の場合は比較器106aの出力および比較器106bの出力のそれぞれに基づいて判断する。比較器106aの出力が“1”のときはセクションデータバッファ101aから読み出されたセクションデータとパターンメモリ104aから読み出されたエントリとは一致すると判断し、比較器106aの出力が“0”のときは不一致と判断する。また、比較器106bの出力が“1”のときはセクションデータバッファ101aから読み出されたセクションデータとパターンメモリ104bから読み出されたエントリとは一致すると判断し、比較器106bの出力が“0”のときは不一致と判断する。
【0027】
セレクタ108は、メモリ制御回路105からのアドレスAD[*:0]の最下位ビットAD[0]または“1”をメモリ制御回路105からの制御信号に応じて選択し、パターンメモリ104bに与えるアドレスの最下位ビットとして出力する。セレクタ307によって選択された最下位ビットをメモリ制御回路105からのアドレスAD[*:1]に結合したアドレスがパターンメモリ104bに与えられる。
【0028】
次に、以上のように構成されたトランスポートストリーム処理装置の動作について説明する。
【0029】
このトランスポートストリーム処理装置では、比較対象となる複数のエントリをパターンメモリ104a,104bにあらかじめ書き込んでおかなければならない。この書き込みはマイコンなどのホスト(図示せず)からのアクセスにより行われる。ホストから見たアドレスマップを図2に示す。図2に示すように、アドレス00h〜0fhにはエントリ0の0〜15バイトが書き込まれる。アドレス10h〜1fhにはエントリ1の0〜15バイトが書き込まれる。以下同様に、アドレスk0h〜kfhにはエントリkの0〜15バイトが書き込まれる。ホストから見たアドレスマップは図2に示したようになるけれども比較時の読み出しの都合により物理的にはこの順番どおりには並んでいない。物理的なアドレスマップは図3に示すようになる。図3を参照して、ここではエントリデータの16バイトに対して1つのアドレスが与えられる。たとえば、エントリ0の16バイトに対してアドレス00hが、エントリ1の16バイトに対してアドレス01hが与えられる。偶数アドレス(00h,02h,・・・)では、エントリデータの0〜7バイトがパターンメモリ104aに書き込まれ8〜15バイトがパターンメモリ104bに書き込まれる。一方、奇数アドレス(01h,03h,・・・)では、エントリデータの8〜15バイトがパターンメモリ104aに書き込まれ0〜7バイトがパターンメモリ104bに書き込まれる。このように複数のエントリがパターンメモリ104a,104bにあらかじめ書き込まれる。
【0030】
そしてセクションバッファ制御回路102によってセクションデータの先頭から16バイトが取り出される。0〜7バイト目はセクションデータバッファ101aに書き込まれ、8〜15バイト目はセクションデータバッファ101bに書き込まれる。
【0031】
セクションデータバッファ101a,101bにデータが書き込まれると、セクションレングス判断回路103によってセクションレングスSLが求められる。このセクションレングスSLが9バイト以上のときと8バイト以下のときとで比較回路106の内部動作が異なる。以下、セクションレングスSLが9バイト以上のときと8バイト以下のときとに分けて説明する。
【0032】
(1)セクションレングスSLが9バイト以上のとき
メモリ制御回路105は、メモリ制御回路105からのアドレスAD[*:0]の最下位ビットAD[0]を選択するようにセレクタ108を制御する。したがって、パターンメモリ104aおよびパターンメモリ104bには同一のアドレスが与えられる。このアドレスに従ってパターンメモリ104a,104bからそれぞれ8バイトのデータが読み出される。
【0033】
メモリ制御回路105からパターンメモリ104a,104bに与えられるアドレスが偶数のとき、メモリ制御回路105は、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106eを制御する。一方、メモリ制御回路105からパターンメモリ104a,104bに与えられるアドレスが奇数のとき、メモリ制御回路105は、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106eを制御する。
【0034】
比較回路106の比較器106aは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとセレクタ106dによって選択された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。セレクタ106cは、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータを選択して比較器106bに与える。そして比較器106bは、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとセレクタ106eによって選択された8〜15バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。
【0035】
そしてエントリ判断回路107は、比較器106aの出力と比較器106bの出力との論理積をとり一致したか否かを判断する。
【0036】
以下、上述の比較動作をさらに詳しく説明する。
【0037】
図4(a)に示すように、1クロック目にはアドレス00hがパターンメモリ104a,104bに与えられる。これに応答してエントリ0の0〜7バイト目のデータがパターンメモリ104aから読み出されエントリ0の8〜15バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ0の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ0の8〜15バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ0の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとエントリ0の8〜15バイト目とが比較器106bによって比較される。そしてエントリ判断回路107によって、セクションデータバッファ101a,101bから読み出された0〜15バイト目のセクションデータとエントリ0の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ1との比較処理を行う。
【0038】
一致しないと判断されたときには、図4(b)に示すように、2クロック目にアドレス01hがパターンメモリ104a,104bに与えられる。これに応答してエントリ1の8〜15バイト目のデータがパターンメモリ104aから読み出されエントリ1の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104bから読み出されたエントリ1の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104aから読み出されたエントリ1の8〜15バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ1の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとエントリ1の8〜15バイト目とが比較器106bによって比較される。そしてエントリ判断回路107によって、セクションデータバッファ101a,101bから読み出された0〜15バイト目のセクションデータとエントリ1の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ2との比較処理を行う。
【0039】
これ以降、エントリ判断回路107によって一致すると判断されるかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0040】
以上のように、セクションレングスSLが9バイト以上のときは1クロックあたり1エントリの比較を実行する。
【0041】
(2)セクションレングスSLが8バイト以下のとき
メモリ制御回路105は偶数アドレスのみ発生する。またメモリ制御回路105は、“1”を選択するようにセレクタ108を制御する。したがって、パターンメモリ104aには偶数アドレスのみが与えられパターンメモリ104bには奇数アドレスのみが与えられる。このアドレスに従ってパターンメモリ104a,104bからそれぞれ8バイトのデータが読み出される。パターンメモリ104aから読み出された8バイトのデータとパターンメモリ104bから読み出された8バイトのデータとはそれぞれ異なったエントリの0〜7バイト目のデータとなる。またメモリ制御回路105は、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106eを制御する。
【0042】
比較回路106の比較器106aは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとパターンメモリ104aから読み出された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。セレクタ106cは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータを選択して比較器106bに与える。そして比較器106bは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとパターンメモリ104bから読み出された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。
【0043】
エントリ判断回路107は、比較器106aによる比較結果および比較器106bによる比較結果をそれぞれのエントリに対する比較結果と判断する。
【0044】
以下、上述の比較動作をさらに詳しく説明する。
【0045】
図5(a)に示すように、1クロック目にはアドレス00hがパターンメモリ104aに与えられアドレス01hがパターンメモリ104bに与えられる。これに応答してエントリ0の0〜7バイト目がパターンメモリ104aから読み出されエントリ1の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ0の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ1の0〜7バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ0の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ1の0〜7バイト目とが比較器106bによって比較される。比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示しているときは比較処理を終了する。比較器106aおよび106bの比較結果がともに不一致を示すときは引き続きエントリ2およびエントリ3との比較処理を行う。
【0046】
比較器106aおよび106bの比較結果がともに不一致を示すときには、図5(b)に示すように、2クロック目にアドレス02hがパターンメモリ104aに与えられアドレス03hがパターンメモリ104bに与えられる。これに応答してエントリ2の0〜7バイト目がパターンメモリ104aから読み出されエントリ3の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ2の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ3の0〜7バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ2の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ3の0〜7バイト目とが比較器106bによって比較される。比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示しているときは比較処理を終了する。比較器106aおよび106bの比較結果がともに不一致を示すときは引き続きエントリ4およびエントリ5との比較処理を行う。
【0047】
これ以降、比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示すかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0048】
このように、セクションレングスSLが8バイト以下のときは1クロックあたり2つエントリとの比較を実行する。
【0049】
以上のように第1の実施形態によるトランスポートストリーム処理装置では、セクションデータのうちの比較すべきビットをセクションデータバッファ101a,101bに蓄積し、複数のエントリの各々との比較をビット単位ではなくエントリ単位で行う。したがって、あるエントリと一致した時点で比較処理を終了することができる。これにより残りのエントリについては比較処理を行う必要がなくなるため、比較処理に要する時間を従来よりも短くすることができる。
【0050】
また、エントリ単位で比較を行うため、比較結果を保持する手段を設ける必要がない。これにより回路面積を従来よりも小さくすることができる。
【0051】
通常、1つのトランスポートパケット内に含まれるセクションデータの数はセクションレングスが短いときのほうが長いときよりも多くなる。すなわち、セクションレングスが短いほど、比較すべきセクションデータの数は多くなり、比較処理に要する時間が長くなる。しかし第1の実施形態によるトランスポートストリーム処理装置では、セクションレングスSLが8バイト以下のときは同時に2つのエントリと比較するため、セクションレングスSLが8バイト以下のときにおける比較処理に要する時間と9バイト以上のときにおける比較処理に要する時間との差を小さくすることができる。
【0052】
(第2の実施形態)
図6は、この発明の第2の実施形態によるトランスポートストリーム処理装置の主要部の構成を示すブロック図である。図6に示すトランスポートストリーム処理装置は、図1に示したトランスポートストリーム処理装置に加えてさらにインバータ201を備える。その他の構成は、図1に示したトランスポートストリーム処理装置と同様である。インバータ201は、メモリ制御回路105からのアドレスAD[*:0]の最下位ビットAD[0]を反転する。セレクタ108は、メモリ制御回路105からのアドレスAD[*:0]の最下位ビットAD[0]またはインバータ201の出力/AD[0]をメモリ制御回路105からの制御信号に応じて選択し、パターンメモリ104bに与えるアドレスの最下位ビットとして出力する。セレクタ108によって選択された最下位ビットAD[0]をメモリ制御回路105からのアドレスAD[*:1]に結合したアドレスがパターンメモリ104bに与えられる。
【0053】
第1の実施形態と同様にこのトランスポートストリーム処理装置においても比較対象となる複数のエントリをパターンメモリ104a,104bにあらかじめ書き込んでおかなければならない。この書き込みはマイコンなどのホスト(図示せず)からのアクセスにより行われる。ホストから見たアドレスマップは図2に示したものと同様である。物理的なアドレスマップは図7に示すようになる。図7を参照して、偶数アドレス(00h,02h,・・・)では、エントリk(kは偶数)の0〜7バイトがパターンメモリ104aに書き込まれエントリ(k+1)の0〜7バイトがパターンメモリ104bに書き込まれる。一方、奇数アドレス(01h,03h,・・・)では、エントリ(k+1)の8〜15バイトがパターンメモリ104aに書き込まれエントリkの8〜15バイトがパターンメモリ104bに書き込まれる。
【0054】
次に、以上のように構成されたトランスポートストリーム処理装置の動作について説明する。
【0055】
セクションバッファ制御回路102によってセクションデータの先頭から16バイトが取り出される。0〜7バイト目はセクションデータバッファ101aに書き込まれ、8〜15バイト目はセクションデータバッファ101bに書き込まれる。セクションデータバッファ101a,101bにデータが書き込まれると、セクションレングス判断回路103によってセクションレングスSLが求められる。このセクションレングスSLが9バイト以上のときと8バイト以下のときとで比較回路106の内部動作が異なる。以下、セクションレングスSLが9バイト以上のときと8バイト以下のときとに分けて説明する。
【0056】
(1)セクションレングスSLが9バイト以上のとき
メモリ制御回路105は、インバータ201の出力/A[0]を選択するようにセレクタ108を制御する。したがってパターンメモリ104bに与えられるアドレスは、パターンメモリ104aに与えられるアドレスの最下位ビットを反転したものになる。これらのアドレスに従ってパターンメモリ104a,104bからそれぞれ8バイトのデータが読み出される。
【0057】
メモリ制御回路105からパターンメモリ104aに与えられるアドレスが偶数のとき、メモリ制御回路105は、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106eを制御する。一方、メモリ制御回路105からパターンメモリ104aに与えられるアドレスが奇数のとき、メモリ制御回路105は、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106eを制御する。
【0058】
比較回路106の比較器106aは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとセレクタ106dによって選択された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。セレクタ106cは、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータを選択して比較器106bに与える。そして比較器106bは、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとセレクタ106eによって選択された8〜15バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。
【0059】
そしてエントリ判断回路107は、比較器106aの出力と比較器106bの出力との論理積をとり一致したか否かを判断する。
【0060】
以下、上述の比較動作を詳しく説明する。
【0061】
図8(a)に示すように、1クロック目にはアドレス00hがパターンメモリ104aに与えられアドレス01hがパターンメモリ104bに与えられる。これに応答してエントリ0の0〜7バイト目のデータがパターンメモリ104aから読み出されエントリ0の8〜15バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ0の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ0の8〜15バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ0の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとエントリ0の8〜15バイト目とが比較器106bによって比較される。そしてエントリ判断回路107によって、セクションデータバッファ101a,101bから読み出された0〜15バイト目のセクションデータとエントリ0の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ1との比較処理を行う。
【0062】
一致しないと判断されたときには、図8(b)に示すように、2クロック目にアドレス01hがパターンメモリ104aに与えられアドレス00hがパターンメモリ104bに与えられる。これに応答してエントリ1の8〜15バイト目のデータがパターンメモリ104aから読み出されエントリ1の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104bから読み出されたエントリ1の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104aから読み出されたエントリ1の8〜15バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ1の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101bから読み出された8〜15バイト目のセクションデータとエントリ1の8〜15バイト目とが比較器106bによって比較される。そしてエントリ判断回路107によって、セクションデータバッファ101aおよび101bから読み出された0〜15バイト目のセクションデータとエントリ1の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ2との比較処理を行う。
【0063】
以下、エントリ判断回路107によって一致すると判断されるかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0064】
以上のように、セクションレングスSLが9バイト以上のときは1クロックあたり1エントリの比較を実行する。
【0065】
(2)セクションレングスSLが8バイト以下のとき
メモリ制御回路105は偶数アドレスのみ発生する。またメモリ制御回路105は、メモリ制御回路105からのアドレスAD[*:0]の最下位ビットAD[0]を選択するようにセレクタ108を制御する。したがって、パターンメモリ104aおよびパターンメモリ104bには同一のアドレスが与えられる。このアドレスに従ってパターンメモリ104aおよび104bからそれぞれ8バイトのデータが読み出される。したがって、パターンメモリ104aから読み出された8バイトのデータとパターンメモリ104bから読み出された8バイトのデータとはそれぞれ異なったエントリの0〜7バイト目のデータとなる。またメモリ制御回路105は、パターンメモリ104aから読み出されたデータを選択して出力するようにセレクタ106dを制御し、パターンメモリ104bから読み出されたデータを選択して出力するようにセレクタ106eを制御する。
【0066】
比較回路106の比較器106aは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとパターンメモリ104aから読み出された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。セレクタ106cは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータを選択して比較器106bに与える。そして比較器106bは、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとパターンメモリ104bから読み出された0〜7バイト目のエントリデータとを比較しその結果をエントリ判断回路107に出力する。
【0067】
エントリ判断回路107は、比較器106aによる比較結果および比較器106bによる比較結果をそれぞれのエントリに対する結果と判断する。
【0068】
以下、上述の比較動作を詳しく説明する。
【0069】
図9(a)に示すように、1クロック目にはアドレス00hがパターンメモリ104a,104bに与えられる。これに応答してエントリ0の0〜7バイト目がパターンメモリ104aから読み出されエントリ1の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ0の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ1の0〜7バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ0の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ1の0〜7バイト目とが比較器106bによって比較される。比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示しているときは比較処理を終了する。比較器106aおよび106bの比較結果がともに不一致を示すときは引き続きエントリ2およびエントリ3との比較処理を行う。
【0070】
比較器106aおよび106bの比較結果がともに不一致を示すときには、図9(b)に示すように、2クロック目にアドレス02hがパターンメモリ104a,104bに与えられる。これに応答してエントリ2の0〜7バイト目がパターンメモリ104aから読み出されエントリ3の0〜7バイト目がパターンメモリ104bから読み出される。パターンメモリ104aから読み出されたエントリ2の0〜7バイト目のデータはセレクタ106dによって選択されて比較器106aに与えられ、パターンメモリ104bから読み出されたエントリ3の0〜7バイト目のデータはセレクタ106eによって選択されて比較器106bに与えられる。セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ2の0〜7バイト目のエントリデータとが比較器106aによって比較され、セクションデータバッファ101aから読み出された0〜7バイト目のセクションデータとエントリ3の0〜7バイト目とが比較器106bによって比較される。比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示しているときは比較処理を終了する。比較器106aおよび106bの比較結果がともに不一致を示すときは引き続きエントリ4およびエントリ5との比較処理を行う。
【0071】
これ以降、比較器106aおよび106bの比較結果のうち少なくとも1つが一致を示すかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0072】
このように、セクションレングスSLが8バイト以下のときは1クロックあたり2つエントリとの比較を実行する。
【0073】
以上のように第2の実施形態によるトランスポートストリーム処理装置においても第1の実施形態において説明したのと同様の効果が得られる。
【0074】
(第3の実施形態)
図10は、この発明の第3の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図10に示すトランスポートストリーム処理装置は、PIDフィルタ100と、セクションバッファ制御回路302と、セクションデータバッファ301a−301dと、セクションレングス判断回路103と、メモリ制御回路305と、パターンメモリ304a−304dと、比較回路306と、エントリ判断回路307とを備える。
【0075】
PIDフィルタ100は、トランスポートストリームから所定のトランスポートパケットを抜き出し、当該トランスポートパケットのセクションデータをセクションバッファ制御回路302に与える。
【0076】
セクションバッファ制御回路302は、PIDフィルタ100からのセクションデータの先頭から16バイト(0〜15バイト目)を取り出す。そして、取り出したセクションデータの0〜3バイト目までをセクションデータバッファ301aに、4〜7バイト目までをセクションデータバッファ301bに、8〜11バイト目までをセクションデータバッファ301cに、12〜15バイト目までをセクションデータバッファ301dに書き込む。
【0077】
セクションレングス判断回路103は、セクションデータバッファ301aに格納されたセクションデータの先頭から2バイト目の下位4ビットと3バイト目8ビットとの合計12ビットに基づいてセクションレングスSLを求める。
【0078】
パターンメモリ304a−304dには複数のエントリが格納されている。
【0079】
メモリ制御回路305は、パターンメモリ304a−304dからそれぞれ4バイトのデータを読み出す。セクションレングスSLが9バイト以上のときは、パターンメモリ304aから読み出された4バイトのデータとパターンメモリ304bから読み出された4バイトのデータとパターンメモリ304cから読み出された4バイトのデータとパターンメモリ304dから読み出された4バイトのデータとによって1つのエントリ(16バイト)が構成される。セクションレングスSLが5バイト以上で8バイト以下のときは、パターンメモリ304aから読み出された4バイトのデータとパターンメモリ304bから読み出された4バイトのデータとによって1つのエントリ(8バイト)が構成され、パターンメモリ304cから読み出された4バイトのデータとパターンメモリ304dから読み出された4バイトのデータとによって別の1つのエントリ(8バイト)が構成される。セクションレングスSLが4バイト以下のときは、パターンメモリ304aから読み出された4バイトのデータによって1つのエントリ(4バイト)が構成され、パターンメモリ304bから読み出された4バイトのデータによって別の1つのエントリ(4バイト)が構成され、パターンメモリ304cから読み出された4バイトのデータによってさらに別の1つのエントリ(4バイト)が構成され、パターンメモリ304dから読み出された4バイトのデータによってさらに別の1つのエントリ(4バイト)が構成される。
【0080】
比較回路306は、比較器306a−306dとセレクタ306e,306fとを含む。セレクタ306eは、セクションレングスSLが9バイト以上のとき、セクションデータバッファ301aから読み出されたデータを比較器306aに、セクションデータバッファ301bから読み出されたデータを比較器306bに、セクションデータバッファ301cから読み出されたデータを比較器306cに、セクションデータバッファ301dから読み出されたデータを比較器306dに与える。セクションレングスSLが5バイト以上で8バイト以下のとき、セレクタ306eは、セクションデータバッファ301aから読み出されたデータを比較器306aおよび306cに与え、セクションデータバッファ301bから読み出されたデータを比較器306bおよび306dに与える。セクションレングスSLが4バイト以下のとき、セレクタ306eは、セクションデータバッファ301aから読み出されたデータを比較器306a−306dに与える。セレクタ306fは、メモリ制御回路105からの制御信号に応じて、パターンメモリ304a−304dから読み出されたデータを比較器306a−306dに与える。比較器306a−306dは、セレクタ306eから与えられるデータとセレクタ306fから与えられるデータとが一致するときは“1”を、一致しないときは“0”をエントリ判断回路307に与える。
【0081】
エントリ判断回路307は、セクションデータバッファ301a−301dから読み出されたセクションデータとパターンメモリ304a−304dから読み出されたエントリとが一致するか否かをセクションレングスSLに応じた方法で判断する。以下、具体的に説明する。セクションレングスSLが9バイト以上の場合、比較器306aの出力と比較器306bの出力と比較器306cの出力と比較器306dの出力との論理積が“1”のときはセクションデータバッファ301a−301dから読み出されたセクションデータとパターンメモリ304a−304dから読み出されたエントリとが一致すると判断し、上記論理積が“0”のときは不一致と判断する。セクションレングスSLが5バイト以上で8バイト以下の場合は比較器306a,306bの出力および比較器306c,306dの出力のそれぞれに基づいて判断する。比較器306aの出力と比較器306bの出力との論理積が“1”のときはセクションデータバッファ301a,301bから読み出されたセクションデータとパターンメモリ304a,304bから読み出されたエントリとは一致すると判断し、上記論理積が“0”のときは不一致と判断する。また、比較器306cの出力と比較器306dの出力との論理積が“1”のときはセクションデータバッファ301a,301bから読み出されたセクションデータとパターンメモリ304c,304dから読み出されたエントリとは一致すると判断し、上記論理積が“0”のときは不一致と判断する。セクションレングスSLが4バイト以下の場合は比較器306a−306dの出力のそれぞれに基づいて判断する。比較器306aの出力が“1”のときはセクションデータバッファ301aから読み出されたセクションデータとパターンメモリ304aから読み出されたエントリとは一致すると判断し、比較器306aの出力が“0”のときは不一致と判断する。また、比較器306bの出力が“1”のときはセクションデータバッファ301aから読み出されたセクションデータとパターンメモリ304bから読み出されたエントリとは一致すると判断し、比較器306bの出力が“0”のときは不一致と判断する。また、比較器306cの出力が“1”のときはセクションデータバッファ301aから読み出されたセクションデータとパターンメモリ304cから読み出されたエントリとは一致すると判断し、比較器306cの出力が“0”のときは不一致と判断する。また、比較器306dの出力が“1”のときはセクションデータバッファ301aから読み出されたセクションデータとパターンメモリ304dから読み出されたエントリとは一致すると判断し、比較器306dの出力が“0”のときは不一致と判断する。
【0082】
次に、以上のように構成されたトランスポートストリーム処理装置の動作について説明する。
【0083】
このトランスポートストリーム処理装置では、比較対象となる複数のエントリをパターンメモリ304a−304dにあらかじめ書き込んでおかなければならない。この書き込みはマイコンなどのホスト(図示せず)からのアクセスにより行われる。物理的なアドレスマップは図11に示すようになる。図11を参照して、ここではエントリデータの16バイトに対して1つのアドレスが与えられる。エントリ0−エントリ3の0〜3バイト目の合計16バイトに対してアドレス00hが与えられる。エントリ0−エントリ3の0〜3バイト目はそれぞれパターンメモリ304a,304c,304b,304dに格納される。エントリ0−エントリ3の4〜7バイト目の合計16バイトに対してアドレス01hが与えられる。エントリ0−エントリ3の4〜7バイト目はそれぞれパターンメモリ304b,304d,304a,304cに格納される。エントリ0−エントリ3の8〜11バイト目の合計16バイトに対してアドレス02hが与えられる。エントリ0−エントリ3の8〜11バイト目はそれぞれパターンメモリ304c,304a,304d,304bに格納される。エントリ0−エントリ3の12〜15バイト目の合計16バイトに対してアドレス03hが与えられる。エントリ0−エントリ3の12〜15バイト目はそれぞれパターンメモリ304d,304b,304c,304aに格納される。このように複数のエントリがパターンメモリ304a−304dにあらかじめ書き込まれる。
【0084】
そしてセクションバッファ制御回路302によってセクションデータの先頭から16バイトが取り出される。0〜3バイト目はセクションデータバッファ301aに書き込まれ、4〜7バイト目はセクションデータバッファ301bに書き込まれ、8〜11バイト目はセクションデータバッファ301cに書き込まれ、12〜15バイト目はセクションデータバッファ301dに書き込まれる。
【0085】
セクションデータバッファ301a−301dにデータが書き込まれると、セクションレングス判断回路103によってセクションレングスSLが求められる。このセクションレングスSLに応じて比較回路106の内部動作が異なる。以下、(1)セクションレングスSLが9バイト以上のとき、(2)5バイト以上8バイト以下のとき、(3)4バイト以下のときに分けて説明する。
【0086】
(1)セクションレングスSLが9バイト以上のとき
図12(a)に示すように、1クロック目にはアドレス00hがパターンメモリ304aに、アドレス01hがパターンメモリ304bに、アドレス02hがパターンメモリ304cに、アドレス03hがパターンメモリ304dにそれぞれ与えられる。これに応答してエントリ0の0〜3バイト目のデータがパターンメモリ304aから、エントリ0の4〜7バイト目がパターンメモリ304bから、エントリ0の8〜11バイト目がパターンメモリ304cから、エントリ0の12〜15バイト目のデータがパターンメモリ304dからそれぞれ読み出される。セレクタ306fは、パターンメモリ304aから読み出されたエントリ0の0〜3バイト目のデータを比較器306aに、パターンメモリ304bから読み出されたエントリ0の4〜7バイト目のデータを比較器306bに、パターンメモリ304cから読み出されたエントリ0の8〜11バイト目のデータを比較器306cに、パターンメモリ304dから読み出されたエントリ0の12〜15バイト目のデータを比較器306dに与える。セレクタ306eは、セクションデータバッファ301aからの0〜3バイト目のセクションデータを比較器306aに、セクションデータバッファ301bからの4〜7バイト目のセクションデータを比較器306bに、セクションデータバッファ301cからの8〜11バイト目のセクションデータを比較器306cに、セクションデータバッファ301dからの12〜15バイト目のセクションデータを比較器306dにそれぞれ与える。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ0の0〜3バイト目のエントリデータとが比較器306aによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ0の4〜7バイト目とが比較器306bによって比較され、セクションデータバッファ301cから読み出された8〜11バイト目のセクションデータとエントリ0の8〜11バイト目のエントリデータとが比較器306cによって比較され、セクションデータバッファ301dから読み出された12〜15バイト目のセクションデータとエントリ0の12〜15バイト目とが比較器306dによって比較される。そしてエントリ判断回路307によって、セクションデータバッファ301a−301dから読み出された0〜15バイト目のセクションデータとエントリ0の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ1との比較処理を行う。
【0087】
一致しないと判断されたときには、図12(b)に示すように、2クロック目にアドレス02hがパターンメモリ304aに、アドレス03hがパターンメモリ304bに、アドレス00hがパターンメモリ304cに、アドレス01hがパターンメモリ304dにそれぞれ与えられる。これに応答してエントリ1の8〜11バイト目のデータがパターンメモリ304aから、エントリ1の12〜15バイト目がパターンメモリ304bから、エントリ1の0〜3バイト目がパターンメモリ304cから、エントリ1の4〜7バイト目のデータがパターンメモリ304dからそれぞれ読み出される。セレクタ306fは、パターンメモリ304aから読み出されたエントリ1の8〜11バイト目のデータを比較器306cに、パターンメモリ304bから読み出されたエントリ1の12〜15バイト目のデータを比較器306dに、パターンメモリ304cから読み出されたエントリ1の0〜3バイト目のデータを比較器306aに、パターンメモリ304dから読み出されたエントリ1の4〜7バイト目のデータを比較器306bに与える。セレクタ306eは、セクションデータバッファ301aからの0〜3バイト目のセクションデータを比較器306aに、セクションデータバッファ301bからの4〜7バイト目のセクションデータを比較器306bに、セクションデータバッファ301cからの8〜11バイト目のセクションデータを比較器306cに、セクションデータバッファ301dからの12〜15バイト目のセクションデータを比較器306dにそれぞれ与える。セクションデータバッファ101aから読み出された0〜3バイト目のセクションデータとエントリ1の0〜3バイト目のエントリデータとが比較器306aによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ1の4〜7バイト目とが比較器306bによって比較され、セクションデータバッファ301cから読み出された8〜11バイト目のセクションデータとエントリ1の8〜11バイト目のエントリデータとが比較器306cによって比較され、セクションデータバッファ301dから読み出された12〜15バイト目のセクションデータとエントリ1の12〜15バイト目とが比較器306dによって比較される。そしてエントリ判断回路307によって、セクションデータバッファ301a−301dから読み出された0〜15バイト目のセクションデータとエントリ1の0〜15バイト目とが一致するか否かが判断される。一致すると判断されたときは比較処理を終了する。一致しないと判断されたときは引き続きエントリ2との比較処理を行う。
【0088】
これ以降、エントリ判断回路307によって一致すると判断されるかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0089】
以上のように、セクションレングスSLが9バイト以上のときは1クロックあたり1エントリの比較を実行する。
【0090】
(2)セクションレングスSLが5バイト以上8バイト以下のとき
図13(a)に示すように、1クロック目にはアドレス00hがパターンメモリ304a,304cに与えられアドレス01hがパターンメモリ304b,304dに与えられる。これに応答してエントリ0の0〜3バイト目がパターンメモリ304aから、エントリ0の4〜7バイト目がパターンメモリ304bから、エントリ1の0〜3バイト目がパターンメモリ304cから、エントリ1の4〜7バイト目がパターンメモリ304dからそれぞれ読み出される。セレクタ306fは、パターンメモリ304aから読み出されたエントリ0の0〜3バイト目のデータを比較器306aに、パターンメモリ304bから読み出されたエントリ0の4〜7バイト目のデータを比較器304bに、パターンメモリ304cから読み出されたエントリ1の0〜3バイト目のデータを比較器304cに、パターンメモリ304dから読み出されたエントリ1の4〜7バイト目のデータを比較器304dにそれぞれ与える。セレクタ306eは、セクションデータバッファ301aからの0〜3バイト目のセクションデータを比較器306aおよび306cに、セクションデータバッファ301bからの4〜7バイト目のセクションデータを比較器306bおよび306dにそれぞれ与える。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ0の0〜3バイト目のエントリデータとが比較器306aによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ0の4〜7バイト目とが比較器306bによって比較される。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ1の0〜3バイト目のエントリデータとが比較器306cによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ1の4〜7バイト目とが比較器306dによって比較される。比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積のうち少なくとも1つが“1”であるときは比較処理を終了する。比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積がともに“0”であるときは引き続きエントリ2およびエントリ3との比較処理を行う。
【0091】
比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積がともに“0”であるときには、図13(b)に示すように、2クロック目にアドレス01hがパターンメモリ304a,304cに与えられアドレス00hがパターンメモリ304b,304dに与えられる。これに応答してエントリ2の4〜7バイト目がパターンメモリ304aから、エントリ2の0〜3バイト目がパターンメモリ304bから、エントリ3の4〜7バイト目がパターンメモリ304cから、エントリ3の0〜3バイト目がパターンメモリ304dからそれぞれ読み出される。セレクタ306fは、パターンメモリ304aから読み出されたエントリ2の4〜7バイト目のデータを比較器306bに、パターンメモリ304bから読み出されたエントリ2の0〜3バイト目のデータを比較器304aに、パターンメモリ304cから読み出されたエントリ3の4〜7バイト目のデータを比較器304dに、パターンメモリ304dから読み出されたエントリ3の0〜3バイト目のデータを比較器304cにそれぞれ与える。セレクタ306eは、セクションデータバッファ301aからの0〜3バイト目のセクションデータを比較器306aおよび306cに、セクションデータバッファ301bからの4〜7バイト目のセクションデータを比較器306bおよび306dにそれぞれ与える。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ2の0〜3バイト目のエントリデータとが比較器306aによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ2の4〜7バイト目とが比較器306bによって比較される。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ3の0〜3バイト目のエントリデータとが比較器306cによって比較され、セクションデータバッファ301bから読み出された4〜7バイト目のセクションデータとエントリ3の4〜7バイト目とが比較器306dによって比較される。比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積のうち少なくとも1つが“1”であるときは比較処理を終了する。比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積がともに“0”であるときは引き続きエントリ4およびエントリ5との比較処理を行う。
【0092】
これ以降、比較器306aの出力と比較器306bの出力との論理積および比較器306cの出力と比較器306dの出力との論理積のうち少なくとも1つが“1”を示すかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0093】
このように、セクションレングスSLが5バイト以上8バイト以下のときは1クロックあたり2つエントリとの比較を実行する。
【0094】
(3)セクションレングスSLが4バイト以下のとき
図14に示すように、1クロック目にはアドレス00hがパターンメモリ304a−304dに与えられる。これに応答してエントリ0の0〜3バイト目がパターンメモリ304aから、エントリ2の0〜3バイト目がパターンメモリ304bから、エントリ1の0〜3バイト目がパターンメモリ304cから、エントリ3の0〜3バイト目がパターンメモリ304dからそれぞれ読み出される。セレクタ306fは、パターンメモリ304aから読み出されたエントリ0の0〜3バイト目のデータを比較器306aに、パターンメモリ304bから読み出されたエントリ2の0〜3バイト目のデータを比較器304cに、パターンメモリ304cから読み出されたエントリ1の0〜3バイト目のデータを比較器304bに、パターンメモリ304dから読み出されたエントリ3の0〜3バイト目のデータを比較器304dにそれぞれ与える。セレクタ306eは、セクションデータバッファ301aからの0〜3バイト目のセクションデータを比較器306a−306dに与える。セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ0の0〜3バイト目のエントリデータとが比較器306aによって比較され、セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ1の0〜3バイト目とが比較器306bによって比較され、セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ2の0〜3バイト目のエントリデータとが比較器306cによって比較され、セクションデータバッファ301aから読み出された0〜3バイト目のセクションデータとエントリ3の0〜3バイト目とが比較器306dによって比較される。比較器306a−306dの出力のうち少なくとも1つが一致を示すときは比較処理を終了する。比較器306a−306dの出力がすべて不一致を示すときは引き続きエントリ0−エントリ3の4〜7バイト目との比較処理を行う。
【0095】
これ以降、比較器306a−306dの出力のうち少なくとも1つが一致を示すかまたはすべてのエントリとの比較処理が終了するまで上述の処理と同様の処理が行われる。
【0096】
このように、セクションレングスSLが4バイト以下のときは1クロックあたり4つエントリとの比較を実行する。
【0097】
以上のように、第3の実施形態によるトランスポートストリーム処理装置においても第1の実施形態において説明したのと同様の効果が得られる。
【0098】
(第4の実施形態)
図15は、この発明の第4の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図15に示すトランスポートストリーム処理装置は、PIDフィルタ100と、セクションバッファ制御回路102と、セクションデータバッファ101a,101bと、パターンメモリ604a,604bと、メモリ制御回路605と、比較回路606と、エントリ判断回路607と、モードメモリ608とを備える。
【0099】
パターンメモリ604a,604bには複数のエントリが書き込まれている。モードメモリ608には、16バイトモードであるか8バイトモードであるかを示すモードデータと、パターンメモリ604a,604bに格納されているエントリが有効であるか無効であるかを示すデータとが設定されている。
【0100】
パターンメモリ601a,604bおよびモードメモリ608のデータ配置を図16に示す。エントリ0の0〜15バイトがアドレス00hから0fhに書き込まれている。以下同様にエントリ1の0〜15バイトがアドレス10〜1fhに書き込まれている。ただし8バイトモードでは、アドレス10〜1fhのように1エントリ16バイトを半分にしてエントリ1とエントリ1αのように1エントリ8バイトを2組として使用する。またこのとき、モードメモリ608には8バイトモードであることと、1エントリ8バイトの2組が有効か無効かをそれぞれ設定する。同様に16バイトモードであることとこのエントリが有効か無効かを設定する。
【0101】
メモリ制御回路605は、パターンメモリ604a,604bからそれぞれ8バイトのデータを読み出す。またメモリ制御回路605は、モードメモリ608からモードデータを読み出す。さらにメモリ制御回路605は、パターンメモリ604a,604bから読み出したデータが有効であるか無効であるかを示すデータをモードメモリ608から読み出す。
【0102】
比較回路606は、比較器606a,606bとセレクタ606cとを含む。セレクタ606cは、モードメモリ608からのモードデータが8バイトモードを示すときはセクションデータバッファ101aから読み出されたデータを比較器606cに与え、モードメモリ608からのモードデータが16バイトモードを示すときはセクションデータバッファ101bから読み出されたデータを比較器606cに与える。比較器606aは、セクションデータバッファ101aから読み出されたデータとパターンメモリ604aから読み出されたデータとが一致するときは“1”を、一致しないときは“0”をエントリ判断回路607に与える。比較器606bは、セレクタ606cから与えられるデータとパターンメモリ604bから読み出されたデータとが一致するときは“1”を、一致しないときは“0”をエントリ判断回路607に与える。
【0103】
エントリ判断回路607は、セクションデータバッファ101a,101bから読み出されたセクションデータとパターンメモリ604a,604bから読み出されたエントリとが一致するか否かをモードメモリ608からのモードデータに応じた方法で判断する。モードメモリ608からのモードデータが16バイトモードを示す場合には、比較器606aの出力と比較器606bの出力との論理積が“1”のときセクションデータバッファ101a,101bから読み出されたセクションデータとパターンメモリ604a,604bから読み出されたエントリとが一致すると判断し、上記論理積が“0”のとき不一致と判断する。モードメモリ608からのモードデータが8バイトモードを示す場合には、比較器606aの出力および比較器606bの出力のそれぞれに基づいて判断する。具体的には、比較器606aの出力が“1”のときはセクションデータバッファ101aから読み出されたセクションデータとパターンメモリ604aから読み出されたエントリとは一致すると判断し、比較器606aの出力が“0”のときは不一致と判断する。また、比較器101bの出力が“1”のときはセクションデータバッファ101aから読み出されたセクションデータとパターンメモリ604bから読み出されたエントリとは一致すると判断し、比較器604bの出力が“0”のときは不一致と判断する。
【0104】
次に、以上のように構成されたトランスポートストリーム処理装置の動作について説明する。ここでは8バイトモードと16バイトモードの2種類あることを前提として説明する。
【0105】
セクションバッファ制御回路102でセクションデータの先頭16バイトまでが取り出され、0〜7バイト目までがセクションデータバッファ101aに書き込まれ、8〜15バイト目がセクションデータバッファ101bに書き込まれる。また、このセクションデータバッファ101a,101bに書き込まれたセクションデータと比較するための16バイトデータは、パターンメモリ604a,604bに複数書き込まれている。
【0106】
セクションデータバッファ101a,101bにデータが書き込まれると比較が開始される。モードメモリ608に設定されているモードデータに応じて比較回路606の内部動作が異なる。
【0107】
モードメモリ608に設定されているモードデータが16バイトモードを示すとき、メモリ制御回路605はパターンメモリ604aから8バイトのデータとパターンメモリ604bから8バイトのデータとを読み出す。パターンメモリ604aの8バイトのデータとパターンメモリ604bの8バイトのデータとを連結すると同一エントリの16バイトデータとなる。
【0108】
比較回路606の比較器606aは、セクションデータバッファ101aの0〜7バイト目のデータと、パターンメモリ604aから読み出された0〜7バイト目のデータとを比較し、その結果をエントリ判断回路607に出力する。また、比較回路606の比較器606bは、セクションデータバッファ101bの8〜15バイト目のデータと、パターンメモリ604bから読み出された8〜15バイト目のデータとを比較し、その結果をエントリ判断回路607に出力する。1クロックで上記動作が行われるので、1クロックあたり1エントリの比較を実行することができる。また、エントリ判断回路607は16バイトモードであることをモードメモリ608から通知されているので、比較器606aの出力と比較器606bの出力との論理積をとり、一致したか否かを判断する。
【0109】
モードメモリ608に設定されているモードデータが8バイトモードを示すとき、メモリ制御回路605はパターンメモリ604aから8バイトのデータとパターンメモリ604bから8バイトのデータを読み出す。パターンメモリ604aの8バイトのデータとパターンメモリ604bの8バイトのデータは1エントリ16バイトを半分に分け、1エントリ8バイトとして使用し、それぞれ先頭からの0〜7バイト目のデータとなる。
【0110】
比較回路606の比較器606aはセクションデータバッファ101aの0〜7バイト目のデータと、パターンメモリ604aから読み出された0〜7バイト目のデータとを比較し、その結果をエントリ判断回路607に出力する。また、比較回路606の比較器606bはセレクタ606cで選択されたセクションデータバッファ101aの0〜7バイト目のデータと、パターンメモリ604bから読み出された0〜7バイト目のデータとを比較し、その結果をエントリ判断回路607に出力する。1クロックで上記動作が行われるので、1クロックあたり1エントリ8バイトの組を2個比較することができる。また、エントリ判断回路607は、8バイトモードであることをモードメモリ608から通知されているので、比較器606aの出力および比較器606bの出力は、それぞれ1エントリ8バイトの結果と判断する。
【0111】
以上のように、第4の実施形態によるトランスポートストリーム処理装置においても第1の実施形態におけるのと同様の効果が得られる。
【0112】
(第5の実施形態)
図17は、この発明の第5の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図17に示すトランスポートストリーム処理装置は、セクションデータバッファ801と、セクションバッファ制御回路802と、パターンメモリ803と、タグメモリ804と、メモリ制御回路805と、比較回路806と、一致アドレス保存回路807とを備える。
【0113】
セクションバッファ制御回路802は、セクションデータの先頭から16バイト(0〜15バイト目)を取り出してセクションデータバッファ801に書き込む。
【0114】
セクションデータバッファ801には、先頭から16バイトのセクションデータ、必要なPIDの値、必要なインデックスが処理に応じて設定される。
【0115】
パターンメモリ803は、PID領域と、インデックス領域と、セクション領域とを含む。PID領域には、セクションデータバッファ801に設定されるPIDの値と比較するための複数のエントリが設定される。インデックス領域には、セクションデータバッファ801に設定されるインデックスと比較するための複数のエントリが設定される。セクション領域には、セクションデータバッファ801に設定されるセクションデータと比較するための複数のエントリ(16バイト)が設定される。インデックス領域に設定されるエントリとセクション領域に設定されるエントリとは対応づけられている。
【0116】
タグメモリ804は領域804a−804dを含む。領域804aには、パターンメモリ803のPID領域のアドレスに対応する値が設定される。領域804bには、パターンメモリ803のインデックス領域のアドレスに対応する値が設定される。領域804cには、比較回路806によって一致すると判断されたインデックス領域のエントリに対応づけられたセクション領域のエントリのアドレスに対応する値が設定される。領域804dには、比較回路806によって一致すると判断されたセクション領域のエントリのアドレスに対応する値が設定される。
【0117】
メモリ制御回路805は、パターンメモリ803およびタグメモリ804のアクセスを制御する。
【0118】
比較回路806は、セクションデータバッファ801に設定された値とパターンメモリ803から読み出された値とが一致するか否かを判断し、その結果を一致アドレス保存回路807に通知する。
【0119】
一致アドレス保存回路807は、比較回路806が一致したと判断したときはメモリ制御回路805が発生したアドレスに所定の値を加えてタグメモリ804の領域804dに書き込む。
【0120】
次に、以上のように構成されたトランスポートストリーム処理装置の動作について説明する。ここでは、PID比較、インデックス比較、セクション比較に分けて説明する。
【0121】
<PID比較>
まず、必要なPIDの値をセクションデータバッファ801に設定し、スタート信号をメモリ制御回路805に入力する。メモリ制御回路805は、タグメモリ804の領域804aの先頭から値を読み出し、これをもとにパターンメモリ803の読み出しアドレスを発生しPID領域からエントリデータを読み出す。比較回路806は、セクションデータバッファ801に設定された値とパターンメモリ803から読み出された値とを比較し、一致した場合は一致アドレス保存回路807に通知する。比較回路806が一致したと判断したとき、一致アドレス保存回路807は、メモリ制御回路805が発生したアドレスに特定の値を加えたもの(インデックス)を保持しておく。メモリ制御回路805は、比較回路806の停止信号発生時、比較終了と判断し比較を終了する。この処理で一致したPIDを判断できる。
【0122】
<インデックス比較>
次に、一致したPIDをもとに、どのセクションパターンが有効かのインデックスを知るため、一致アドレス保存回路807は保持しているインデックスをセクションデータバッファ801に設定し、スタート信号をメモリ制御回路805に入力する。メモリ制御回路805は、タグメモリ804の領域804bの先頭から値を読み出し、これをもとにパターンメモリ803のアドレスを発生しインデックス領域からエントリデータを読み出す。比較回路806は、セクションデータバッファ801に設定された値とパターンメモリ803から読み出された値とを比較し、一致した場合は一致アドレス保存回路807に通知する。一致アドレス保存回路807は、比較回路806が一致したと判断したときは、メモリ制御回路805が発生したアドレスに所定の値を加え、タグメモリ804の領域804cに書き込む。メモリ制御回路805は、タグメモリ804の領域804aの最後に達したとき比較終了と判断し比較を終了する。この処理で必要なパターンメモリ上のセクションパターンの有効なインデックスを判断できる。
【0123】
<セクション比較>
ここまで処理しておき、次に、セクションデータを入力すると、セクションバッファ制御回路802でセクションデータの先頭16バイトまでが取り出され、セクションデータバッファ801に0〜15バイト目が書き込まれる。メモリ制御回路805はタグメモリの領域804cの先頭から書き込まれた値を読み出し、これをもとにパターンメモリ803のアドレスを発生しセクション領域からエントリデータを読み出す。
【0124】
比較回路806は、セクションデータバッファ801に設定されたセクションデータとパターンメモリ803から読み出されたエントリデータとを比較し、一致した場合は一致アドレス保存回路807に通知する。一致アドレス保存回路807は、比較回路806が一致したと判断したときは、メモリ制御回路805が発生したアドレスに所定の値を加え、タグメモリ804の領域804dに書き込む。メモリ制御回路805は、モード(PID比較,インデックス比較,セクション比較)により、比較回路806の停止信号またはタグメモリ804の領域804cの最後に達したとき比較終了と判断し比較を終了する。
【0125】
以上のように第5の実施形態によるトランスポートストリーム処理装置によれば、一致したPIDでかつ該当のセクションパターンに一致したか否か判断することができる。すなわちPID比較、セクションインデックス比較、セクション比較の一連の比較を同一ハードウエアで実現できる。
【0126】
(第6の実施形態)
図18は、この発明の第6の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図18に示すトランスポートストリーム処理装置は、セクションデータバッファ901と、セクションバッファ制御回路902と、パターンメモリ903と、タグレジスタ904a,904bと、メモリ制御回路905と、比較回路906と、一致結果保存回路907と、プライオリティエンコーダ909と、タグ消去回路910とを備える。
【0127】
図19に示すように、パターンメモリ903およびタグレジスタ904aは、PID比較領域と、セクションインデックス領域と、セクション比較領域とを含む。パターンメモリ903のPID比較領域には、セクションデータバッファ901に設定されるPIDの値と比較するための複数のエントリ(2バイト/1エントリ)が設定される。セクションインデックス領域には、セクションデータバッファ901に設定されるインデックスと比較するための複数のエントリ(2バイト/1エントリ)が設定される。セクション比較領域には、セクションデータバッファ901に設定されるセクションデータと比較するための複数のエントリ(16バイト/1エントリ)が設定される。セクションインデックス領域に設定されるエントリとセクション比較領域に設定されるエントリとは対応づけられている。
【0128】
次に、このトランスポートストリーム処理装置の動作について説明する。
【0129】
まず、PID比較を行うときは、パターンメモリ903のPID比較領域に必要なPIDの値を設定し、タグレジスタ904aのPID比較領域の部分に1を設定しておく。次に、セクションデータバッファ901に必要なPIDの値を設定し、スタート信号をメモリ制御回路905に入力する。すると、メモリ制御回路905はタグレジスタ904aに設定された値をタグレジスタ904bにコピーする。次にタグレジスタ904bの先頭の“1”をプライオリティエンコーダ909が探し、このアドレスをメモリ制御回路905とタグ消去回路910に与える。比較回路906は、メモリ制御回路905がパターンメモリ903から読み出した値とセクションデータバッファ901の値とを比較し、一致したらメモリ制御回路905に停止信号を発行する。また、タグ消去回路910は、プライオリティエンコーダ909が探した先頭の“1”を“0”に書き戻し消去する。つまり、メモリ制御回路905は、タグレジスタ904bに“1”があり、プライオリティエンコーダ909が“1”を検出する限り、または、比較回路906が一致したと判断するまで、上記動作を1クロックで繰り返す。この動作により、PID比較を行うことができる。
【0130】
セクションパターンインデックス比較を行うときは、パターンメモリ903のセクションインデックス領域に必要なセクションパターンインデックスを設定し、タグレジスタ904aのセクションパターンインデックス領域の部分に1を設定する。次に、セクションデータバッファ901に必要なPIDのインデックス値を設定し、スタート信号をメモリ制御回路905に入力する。すると、メモリ制御回路905はタグレジスタ904aに設定された値をタグレジスタ904bにコピーする。次にタグレジスタ904bの先頭の“1”をプライオリティエンコーダ909が探し、このアドレスをメモリ制御回路905およびタグ消去回路910に与える。比較回路906は、メモリ制御回路905がパターンメモリ903から読み出した値とセクションデータバッファ901の値とを比較し、一致したら一致結果保存回路907に通知する。一致結果保存回路907は、タグレジスタ904aのセクションパターンインデックスに対応したセクションパターン位置に“1”を書き込む。また、タグ消去回路910は、プライオリティエンコーダ909が探した先頭の“1”を“0”に書き戻し消去する。つまり、メモリ制御回路905は、タグレジスタ904bに“1”があり、プライオリティエンコーダ909が“1”を検出する限り、上記動作を1クロックで繰り返す。この動作により、セクションパターンインデックスを探すことができる。
【0131】
セクション比較を行うときは、パターンメモリ903のセクション比較領域に必要なセクションパターンを設定し、セクションパターンインデックスを探しておくことでタグレジスタ904aのセクションパターン領域に“1”が設定されている。次に、セクションデータをセクションバッファ制御回路902に入力することで、セクションバッファ制御回路902は先頭の値をセクションデータバッファ901に設定する。このことでスタート信号がメモリ制御回路905に入力される。すると、メモリ制御回路905はタグレジスタ904aの値をタグレジスタ904bにコピーする。次にタグレジスタ904bの先頭の“1”をプライオリティエンコーダ909が探し、このアドレスをメモリ制御回路905およびタグ消去回路910に与える。比較回路906は、メモリ制御回路905がパターンメモリ903から読み出した値とセクションデータバッファ901の値とを比較する。また、タグ消去回路910は、プライオリティエンコーダ909が探した先頭の“1”を“0”に書き戻し消去する。つまり、メモリ制御回路905は、タグレジスタ904bに“1”があり、プライオリティエンコーダ909が“1”を検出する限り、上記動作を1クロックで繰り返す。この動作により、一致したセクションパターンを探すことができる。
【0132】
以上のように第6の実施形態によれば、PID比較、セクションインデックス比較、セクション比較の一連の比較を同一ハードウエアで実現できる。
【0133】
(第7の実施形態)
図20に示すように、セクションデータ1201は、トランスポートパケット1202とトランスポートパケット1204とに分割されて入る場合がある。また、間にトランスポートパケット1203がある場合もある。このような場合でセクションデータ1201の先頭16バイト以下が分割された場合は、分割されたデータ1205を一度メモリに保存し、次の継続するデータ1206が入ったトランスポートパケット1204が到着したら、分割されたデータ1205と継続したデータ1206とを連結し、先頭から16バイト抜き出し比較を行う。これを実現するハードの一例を図21に示す。
【0134】
図21は、この発明の第7の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。図21に示すトランスポートストリーム処理装置は、セクションデータバッファ1101と、セクションバッファ制御回路1102と、パターンメモリ1103と、メモリ制御回路1104と、比較回路1105と、ローカルメモリ1106とを備える。
【0135】
次に、図21に示したトランスポートストリーム処理装置の動作について説明する。ここでは、トランスポートパケットの最後のセクションデータが16バイト以下のときについて説明する。
【0136】
セクションデータが16バイトに満たない時点で、トランスポートパケットの最後を示すパケット終了信号がセクションバッファ制御回路1102に入力されると、セクションバッファ制御回路1102は、このセクションデータをセクションバッファ1101に書き込み、メモリ制御回路1104に通知する。メモリ制御回路1104は、セクションデータバッファ1101のデータをローカルメモリ1106に保存する。
【0137】
次にこのローカルメモリ1106に保存されているセクションデータの続きが来たときには、まずメモリ制御部1104がローカルメモリ1106からこのセクションデータを読み出しセクションバッファ1101に書き込む。その後、セクションバッファ制御回路1102は、ローカルメモリ1106から読み出されたセクションデータの続きから入力されたセクションデータを書き込んで、16バイトの連続したセクションデータとする。メモリ制御回路1104はパターンメモリ1103を読み出し比較回路1105にデータを与える。比較回路1105は、セクションデータバッファ1101のデータとパターンメモリ1103の値とを比較し一致/不一致を判断する。
【0138】
このように、セクションデータの比較すべき先頭データがトランスポートパケットをまたがっていたとしても、セクションデータの先頭データのパターン一致による取得を行うことができる。
【0139】
【発明の効果】
この発明によるトランスポートストリーム処理装置では、セクションレングスを判断し、不要な条件は読み出さず、必要な条件のみ読み出し比較することで、比較処理時間が短縮できる。
【0140】
また、比較すべきデータが全て揃ってから比較をエントリ単位で行うので、比較判定で一致した時終了すれば判定保持手段は必要ない。
【0141】
また、PID比較、セクションインデックス比較、セクション比較の複数種類の比較を単一ハードウエアで実現することができる。
【0142】
また、セクションがパケット間を跨った場合も比較処理することができる。
【図面の簡単な説明】
【図1】この発明の第1の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【図2】ホストから見たアドレスマップである。
【図3】物理的なアドレスマップである。
【図4】(a)および(b)は、セクションレングスが9バイト以上のときにおける比較の対象を示す図である。
【図5】(a)および(b)は、セクションレングスが8バイト以下のときにおける比較の対象を示す図である。
【図6】この発明の第2の実施形態によるトランスポートストリーム処理装置の主要部の構成を示すブロック図である。
【図7】物理的なアドレスマップである。
【図8】(a)および(b)は、セクションレングスが9バイト以上のときにおける比較の対象を示す図である。
【図9】(a)および(b)は、セクションレングスが8バイト以下のときにおける比較の対象を示す図である。
【図10】この発明の第3の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【図11】物理的なアドレスマップである。
【図12】(a)および(b)は、セクションレングスが9バイト以上のときにおける比較の対象を示す図である。
【図13】(a)および(b)は、セクションレングスが5バイト以上8バイト以下のときにおける比較の対象を示す図である。
【図14】セクションレングスが4バイト以下のときにおける比較の対象を示す図である。
【図15】この発明の第4の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【図16】パターンメモリおよびモードメモリのアドレスマップである。
【図17】この発明の第5の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【図18】この発明の第6の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【図19】パターンメモリおよびタグレジスタ内の領域を示す図である。
【図20】トランスポートパケットの構成を示す図である。
【図21】この発明の第7の実施形態によるトランスポートストリーム処理装置の全体構成を示すブロック図である。
【符号の説明】
101a,101b,301a−301d,801,901,1101 セクションデータバッファ
102,302,802,902,1102 セクションバッファ制御回路
103 セクションレングス判断回路
104a,104b,304a−304d,604a,604b,803,903,1103 パターンメモリ
105,305,605,805,905,1104 メモリ制御回路
106,306,606,806,906,1105 比較回路
107,307,607 エントリ判断回路
608 モードメモリ
804 タグメモリ
807 一致アドレス保存回路
904a,904b タグレジスタ
907 一致結果保存回路
909 プライオリティエンコーダ
910 タグ消去回路
1106 ローカルメモリ
[0001]
BACKGROUND OF THE INVENTION
In the field of digital broadcasting, program elements such as video, audio, still images, character data, music data, and computer programs are transmitted in a transport packet format. The present invention relates to a transport stream processing apparatus that extracts a necessary transport packet or extracts necessary data when a data format in a payload of the transport packet is a section format.
[0002]
[Prior art]
In FIG. 1 of Japanese Patent Laid-Open No. 2000-23135, the header and entry data of digital data that are sequentially input are compared in a specific unit, and the current comparison result and the past comparison result are calculated by the determination integration unit. A section selection device is disclosed in which the determination holding unit holds the calculation result and continues these processes until the end of the comparison determination.
[0003]
[Problems to be solved by the invention]
In the section selection device described above, the comparison process takes time because the comparison between the digital data and the plurality of entries must be continued until the end of the comparison determination regardless of the necessity of comparison. Further, since one determination holding means must be provided for each entry, the circuit scale increases. In addition, it is difficult to realize a series of comparisons of PID comparison, section index comparison, and section comparison with the same hardware.
[0004]
The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a transport stream processing apparatus that can shorten the comparison processing time.
[0005]
Another object of the present invention is to provide a transport stream processing apparatus capable of reducing the circuit scale.
[0006]
Still another object of the present invention is to provide a transport stream processing apparatus capable of realizing a plurality of types of comparison with a single hardware.
[0007]
[Means for Solving the Problems]
According to one aspect of the present invention, a transport stream processing device includes a section data buffer, a section buffer control circuit, a section length determination circuit, n pattern memories, a memory control circuit, a comparison circuit, an entry A determination circuit. The section buffer control circuit writes m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer. The section length determination circuit determines the section data length based on the data written in the section data buffer. The n pattern memories are memories that can be written / read from the host. The memory control circuit changes the access method of the n pattern memories according to the section data length. The comparison circuit changes the comparison method between the data in the section data buffer and the data read from the n pattern memories in accordance with the section data length. The entry determination circuit determines a matching entry based on the comparison result by the comparison circuit and the section data length. The transport stream processing device reads p patterns of data to be compared from n pattern memories in accordance with the section data length, and compares the p patterns from the beginning of the data in the section data buffer.
[0008]
Preferably, the data of the same entry is arranged at the same physical address of the n pattern memories, and the byte order in the same entry is changed according to the address.
[0009]
Preferably, data of a plurality of entries are arranged at the same physical address of the n pattern memories, and the data in the entries are divided and data are arranged at different physical addresses.
[0010]
According to another aspect of the present invention, a transport stream processing device includes a section data buffer, a section buffer control circuit, n pattern memories, a mode memory, a memory control circuit, a comparison circuit, and an entry determination. Circuit. The section buffer control circuit writes m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer. The n pattern memories are memories that can be written / read from the host. The mode memory is a memory that can be written / read from the host. The memory control circuit writes / reads the pattern memory and mode memory during host access, and reads out the comparison memory when a start signal is input. The comparison circuit changes the comparison method between the data in the section data buffer and the data in the n pattern memories according to the value in the mode memory. The entry determination circuit determines a matching entry from the result from the comparison circuit and the value of the mode memory. In the above transport stream processing device, comparison can be made with a plurality of patterns per access by starting comparison with a start signal and changing the comparison method with the value of the mode memory.
[0011]
According to yet another aspect of the present invention, a transport stream processing device includes a section data buffer, a section buffer control circuit, a pattern memory, a tag memory, a memory control circuit, a comparison circuit, and a match address storage circuit. With. The section buffer control circuit writes m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer. The pattern memory is a memory that can be written / read from the host. In the tag memory, the address of the pattern memory to be compared is written. The memory control circuit writes / reads the pattern memory or tag memory during host access, and reads the pattern memory and tag memory to read data to be compared when a start signal is input. The comparison circuit compares the data in the section data buffer with the data in the pattern memory and generates a stop signal from the value in the tag memory. The coincidence address storage circuit writes a value corresponding to the address coincident as a result of comparison by the comparison circuit to the tag memory. In the above transport stream processing device, when the start signal is activated, the data read from the pattern memory is compared with the value of the section data buffer by the valid address of the pattern memory written in the tag memory, and the matching address is tagged. Can be controlled to write to memory.
[0012]
According to yet another aspect of the present invention, a transport stream processing device includes a section data buffer, a section buffer control circuit, a pattern memory, a first tag register, a second tag register, and a memory control circuit. A comparison circuit, a priority encoder, a match result storage circuit, and a tag erasure circuit. The section buffer control circuit writes m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer. The pattern memory is a memory that can be written / read from the host. The first tag register stores the address location of the pattern memory to be compared. The second tag register loads the value of the first tag register every time it compares. The memory control circuit writes / reads the pattern memory or the first tag register during host access, and transfers data from the first tag register to the second tag register when a start signal is input, In order to do this, the pattern memory is read. The comparison circuit compares the data in the section data buffer with the data in the pattern memory, and generates a stop signal from the value in the tag register. The priority encoder outputs the address of the pattern memory from the value of the second tag register. The match result storage circuit reflects the match result in the first tag register by the match signal from the comparison circuit. The tag erase circuit erases the corresponding value from the address of the priority encoder. In the transport stream processing apparatus, when the start signal becomes active, the value of the first tag register is transferred to the second tag register, and then the priority encoder detects the position where the value of the second tag register is 1. Then, for the address generated by the priority encoder, the tag erasure circuit writes the second tag register corresponding to the address to 0, and stores the match result in the first tag register depending on the mode and the address generated by the priority encoder. When the comparison circuit determines that the values match, 1 is written to the tag register and 0 is written if they do not match. The pattern memory is written in one clock until the tag cannot be erased or until a stop signal is input to the memory control circuit. Can be accessed continuously .
[0013]
The tag register can be used in three ways: a PID filter that detects PID matching of transport packets, a section index filter that associates PIDs with sections, and a section filter that detects section matching. It is preferable that the area of the rewritten arbitrary pattern memory can be used.
[0014]
According to yet another aspect of the present invention, a transport stream processing apparatus includes a section data buffer, a section buffer control circuit, a pattern memory, a memory control circuit, a comparison circuit, and a local memory. The section buffer control circuit extracts a transport packet from the transport stream and writes m bytes from the beginning of the section data in the payload of the transport packet to the section buffer. The pattern memory is a memory that can be written / read from the host. The memory control circuit writes / reads the pattern memory when accessing the host, and reads the pattern memory for comparison when a start signal is input. The comparison circuit compares the data in the section data buffer with the data in the pattern memory. The local memory is a memory that can write / read data from the host. In the above transport stream processing device, when the start n bytes of the section data straddle between the packets, the start n bytes of the section data before straddling is stored in the local memory, and when the next section is input, the local memory The start n bytes of this section data are read out, written into the section buffer, connected to the subsequent input section, and the connected section data is compared with the pattern memory.
[0015]
In the transport stream processing apparatus according to the present invention, the length of the digital data, that is, the section length is determined, and unnecessary conditions are not read, but only necessary conditions are read and compared, thereby shortening the comparison processing time.
[0016]
In addition, since the comparison is performed in units of entries after all the digital data to be compared is prepared, the determination holding means is not required if the comparison is completed when the comparison is completed.
[0017]
Also, multiple types of comparisons can be realized with a single hardware.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals, and the description thereof will not be repeated.
[0019]
(First embodiment)
FIG. 1 is a block diagram showing the overall configuration of a transport stream processing apparatus according to the first embodiment of the present invention. The transport stream processing device shown in FIG. 1 includes a PID filter 100, a section buffer control circuit 102, section data buffers 101a and 101b, a section length determination circuit 103, a memory control circuit 105, and pattern memories 104a and 104b. , A comparison circuit 106, an entry determination circuit 107, and a selector 108.
[0020]
The PID filter 100 extracts a predetermined transport packet from the transport stream, and supplies section data of the transport packet to the section buffer control circuit 102.
[0021]
The section buffer control circuit 102 extracts 16 bytes (0th to 15th bytes) from the head of the section data from the PID filter 100. Then, the 0 to 7th bytes of the extracted section data are written to the section data buffer 101a, and the 8th to 15th bytes are written to the section data buffer 101b.
[0022]
The section length determination circuit 103 obtains a section length SL based on a total of 12 bits including the lower 4 bits of the second byte from the head of the section data stored in the section data buffer 101a and 8 bits of the third byte. The section length SL is the length of the section data from the PID filter 100.
[0023]
A plurality of entries are stored in the pattern memories 104a and 104b. The entry is data for selecting section data from the PID filter 100.
[0024]
The memory control circuit 105 reads 8-byte data from the pattern memories 104a and 104b. When the section length SL is 9 bytes or more, one entry (16 bytes) is constituted by the 8-byte data read from the pattern memory 104a and the 8-byte data read from the pattern memory 104b. On the other hand, when the section length SL is 8 bytes or less, one entry (8 bytes) is constituted by 8 bytes of data read from the pattern memory 104a, and 8 bytes of data read from the pattern memory 104b. Another entry (8 bytes) is constructed.
[0025]
Comparison circuit 106 includes comparators 106a and 106b and selectors 106c to 106e. The selector 106c supplies the data read from the section data buffer 101a or the data read from the section data buffer 101b to the comparator 106b according to the section length SL from the section length determination circuit 103. The selector 106d gives the data read from the pattern memory 104a or the data read from the pattern memory 104b to the comparator 106a in accordance with a control signal from the memory control circuit 105. The comparator 106a gives “1” to the entry determination circuit 107 when the data read from the section data buffer 101a and the data given from the selector 106d match, and “0” when they do not match. The selector 106e supplies the data read from the pattern memory 104a or the data read from the pattern memory 104b to the comparator 106b in accordance with a control signal from the memory control circuit 105. The comparator 106b gives “1” to the entry determination circuit 107 when the data supplied from the selector 106c matches the data supplied from the selector 106e, and “0” when they do not match.
[0026]
The entry determination circuit 107 determines whether or not the section data read from the section data buffers 101a and 101b matches the entry read from the pattern memories 104a and 104b by a method according to the section length SL. This will be specifically described below. When the section length SL is 9 bytes or more, when the logical product of the output of the comparator 106a and the output of the comparator 106b is “1”, the section data read from the section data buffers 101a and 101b and the pattern memory 104a, It is determined that the entry read from 104b matches, and when the logical product is “0”, it is determined that they do not match. On the other hand, when the section length SL is 8 bytes or less, the determination is made based on the output of the comparator 106a and the output of the comparator 106b. When the output of the comparator 106a is “1”, it is determined that the section data read from the section data buffer 101a matches the entry read from the pattern memory 104a, and the output of the comparator 106a is “0”. When it is determined that there is a discrepancy. When the output of the comparator 106b is “1”, it is determined that the section data read from the section data buffer 101a matches the entry read from the pattern memory 104b, and the output of the comparator 106b is “0”. "", It is determined that there is a mismatch.
[0027]
The selector 108 selects the least significant bit AD [0] or “1” of the address AD [*: 0] from the memory control circuit 105 according to the control signal from the memory control circuit 105, and gives the address to the pattern memory 104b. Is output as the least significant bit. An address obtained by combining the least significant bit selected by the selector 307 with the address AD [*: 1] from the memory control circuit 105 is given to the pattern memory 104b.
[0028]
Next, the operation of the transport stream processing apparatus configured as described above will be described.
[0029]
In this transport stream processing apparatus, a plurality of entries to be compared must be written in the pattern memories 104a and 104b in advance. This writing is performed by access from a host (not shown) such as a microcomputer. An address map viewed from the host is shown in FIG. As shown in FIG. 2, 0 to 15 bytes of entry 0 are written in addresses 00h to 0fh. 0 to 15 bytes of entry 1 are written to addresses 10h to 1fh. Similarly, 0 to 15 bytes of entry k are written to addresses k0h to kfh. Although the address map seen from the host is as shown in FIG. 2, it is not physically arranged in this order due to the convenience of reading at the time of comparison. The physical address map is as shown in FIG. Referring to FIG. 3, one address is given here for 16 bytes of entry data. For example, an address 00h is given to 16 bytes of entry 0, and an address 01h is given to 16 bytes of entry 1. At even addresses (00h, 02h,...), 0 to 7 bytes of entry data are written to the pattern memory 104a and 8 to 15 bytes are written to the pattern memory 104b. On the other hand, at odd addresses (01h, 03h,...), 8 to 15 bytes of entry data are written to the pattern memory 104a and 0 to 7 bytes are written to the pattern memory 104b. In this way, a plurality of entries are written in advance in the pattern memories 104a and 104b.
[0030]
Then, the section buffer control circuit 102 extracts 16 bytes from the head of the section data. The 0th to 7th bytes are written to the section data buffer 101a, and the 8th to 15th bytes are written to the section data buffer 101b.
[0031]
When data is written to the section data buffers 101a and 101b, the section length determination circuit 103 obtains the section length SL. The internal operation of the comparison circuit 106 differs depending on whether the section length SL is 9 bytes or more and 8 bytes or less. In the following description, the section length SL is divided into 9 bytes or more and 8 bytes or less.
[0032]
(1) When section length SL is 9 bytes or more
The memory control circuit 105 controls the selector 108 so as to select the least significant bit AD [0] of the address AD [*: 0] from the memory control circuit 105. Therefore, the same address is given to the pattern memory 104a and the pattern memory 104b. According to this address, 8-byte data is read from the pattern memories 104a and 104b.
[0033]
When the address given from the memory control circuit 105 to the pattern memories 104a and 104b is an even number, the memory control circuit 105 controls the selector 106d to select and output the data read from the pattern memory 104a. The selector 106e is controlled to select and output the data read from 104b. On the other hand, when the addresses given from the memory control circuit 105 to the pattern memories 104a and 104b are odd numbers, the memory control circuit 105 controls the selector 106d to select and output the data read from the pattern memory 104b, The selector 106e is controlled so as to select and output data read from the pattern memory 104a.
[0034]
The comparator 106a of the comparison circuit 106 compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data selected by the selector 106d, and determines the result as an entry decision. Output to the circuit 107. The selector 106c selects the section data of the 8th to 15th bytes read from the section data buffer 101b and supplies the selected section data to the comparator 106b. The comparator 106b compares the 8th to 15th byte section data read from the section data buffer 101b with the 8th to 15th byte entry data selected by the selector 106e, and compares the result with the entry determination circuit 107. Output.
[0035]
The entry determination circuit 107 calculates the logical product of the output of the comparator 106a and the output of the comparator 106b and determines whether or not they match.
[0036]
Hereinafter, the above comparison operation will be described in more detail.
[0037]
As shown in FIG. 4A, the address 00h is given to the pattern memories 104a and 104b at the first clock. In response to this, the 0th to 7th bytes of entry 0 are read from the pattern memory 104a, and the 8th to 15th bytes of entry 0 are read from the pattern memory 104b. The 0th to 7th byte data of entry 0 read from the pattern memory 104a is selected by the selector 106d and given to the comparator 106a, and the 8th to 15th byte data of entry 0 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The section data of 0 to 7 bytes read from the section data buffer 101a and the entry data of 0 to 7 bytes of entry 0 are compared by the comparator 106a, and 8 to 15 read from the section data buffer 101b. The section data of the byte and the 8th to 15th bytes of entry 0 are compared by the comparator 106b. Then, the entry determination circuit 107 determines whether the 0th to 15th byte section data read from the section data buffers 101a and 101b matches the 0th to 15th bytes of the entry 0. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with entry 1 is continued.
[0038]
If it is determined that they do not match, the address 01h is given to the pattern memories 104a and 104b at the second clock, as shown in FIG. 4B. In response to this, the 8th to 15th bytes of data in entry 1 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 1 are read from the pattern memory 104b. The 0th to 7th byte data of entry 1 read from the pattern memory 104b is selected by the selector 106d and applied to the comparator 106a, and the 8th to 15th byte data of entry 1 read from the pattern memory 104a. Is selected by the selector 106e and supplied to the comparator 106b. The section data of 0 to 7 bytes read from the section data buffer 101a and the entry data of 0 to 7 bytes of entry 1 are compared by the comparator 106a, and 8 to 15 read from the section data buffer 101b. The section data of the byte and the 8th to 15th bytes of entry 1 are compared by the comparator 106b. Then, the entry determination circuit 107 determines whether the 0th to 15th byte section data read from the section data buffers 101a and 101b matches the 0th to 15th bytes of the entry 1. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with the entry 2 is continued.
[0039]
Thereafter, processing similar to that described above is performed until it is determined by the entry determination circuit 107 that the matching is performed or comparison processing with all entries is completed.
[0040]
As described above, when the section length SL is 9 bytes or more, one entry is compared per clock.
[0041]
(2) When section length SL is 8 bytes or less
The memory control circuit 105 generates only even addresses. The memory control circuit 105 controls the selector 108 so as to select “1”. Therefore, only even addresses are given to the pattern memory 104a and only odd addresses are given to the pattern memory 104b. According to this address, 8-byte data is read from the pattern memories 104a and 104b. The 8-byte data read from the pattern memory 104a and the 8-byte data read from the pattern memory 104b are the 0th to 7th byte data of different entries. The memory control circuit 105 controls the selector 106d to select and output the data read from the pattern memory 104a, and the selector 106e to select and output the data read from the pattern memory 104b. Control.
[0042]
The comparator 106a of the comparison circuit 106 compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data read from the pattern memory 104a, and compares the result. The data is output to the entry determination circuit 107. The selector 106c selects the 0th to 7th byte section data read from the section data buffer 101a and supplies the selected section data to the comparator 106b. The comparator 106b compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data read from the pattern memory 104b, and compares the result with the entry determination circuit. It outputs to 107.
[0043]
The entry determination circuit 107 determines the comparison result by the comparator 106a and the comparison result by the comparator 106b as the comparison result for each entry.
[0044]
Hereinafter, the above comparison operation will be described in more detail.
[0045]
As shown in FIG. 5A, at the first clock, the address 00h is given to the pattern memory 104a and the address 01h is given to the pattern memory 104b. In response to this, the 0th to 7th bytes of entry 0 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 1 are read from the pattern memory 104b. The 0th to 7th byte data of entry 0 read from the pattern memory 104a is selected by the selector 106d and given to the comparator 106a, and the 0th to 7th byte data of entry 1 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The 0 to 7 byte section data read from the section data buffer 101a and the 0 to 7 byte entry data of entry 0 are compared by the comparator 106a, and the 0 to 7 bytes read from the section data buffer 101a are compared. The section data of the byte and the 0th to 7th bytes of entry 1 are compared by the comparator 106b. When at least one of the comparison results of the comparators 106a and 106b indicates a match, the comparison process is terminated. When the comparison results of the comparators 106a and 106b indicate a mismatch, the comparison processing with the entry 2 and the entry 3 is continued.
[0046]
When the comparison results of the comparators 106a and 106b indicate a mismatch, as shown in FIG. 5B, the address 02h is given to the pattern memory 104a and the address 03h is given to the pattern memory 104b at the second clock. In response to this, the 0th to 7th bytes of entry 2 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 3 are read from the pattern memory 104b. The 0th to 7th byte data of entry 2 read from the pattern memory 104a is selected by the selector 106d and applied to the comparator 106a, and the 0th to 7th byte data of entry 3 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The 0- to 7-byte section data read from the section data buffer 101a and the entry 0 to 7-byte entry data of the entry 2 are compared by the comparator 106a, and the 0-7 bytes read from the section data buffer 101a are compared. The section data of the byte and the 0th to 7th bytes of entry 3 are compared by the comparator 106b. When at least one of the comparison results of the comparators 106a and 106b indicates a match, the comparison process is terminated. When the comparison results of the comparators 106a and 106b indicate a mismatch, the comparison processing with the entry 4 and the entry 5 is continued.
[0047]
Thereafter, processing similar to that described above is performed until at least one of the comparison results of the comparators 106a and 106b indicates a match or comparison processing with all entries is completed.
[0048]
Thus, when the section length SL is 8 bytes or less, a comparison with two entries per clock is executed.
[0049]
As described above, in the transport stream processing device according to the first embodiment, the bits to be compared among the section data are accumulated in the section data buffers 101a and 101b, and the comparison with each of the plurality of entries is performed in units of bits. This is done in units of entries. Therefore, the comparison process can be terminated when it matches a certain entry. As a result, it is not necessary to perform the comparison process for the remaining entries, so that the time required for the comparison process can be made shorter than before.
[0050]
Further, since the comparison is performed in entry units, it is not necessary to provide a means for holding the comparison result. Thereby, a circuit area can be made smaller than before.
[0051]
Usually, the number of section data included in one transport packet is larger when the section length is short than when it is long. That is, as the section length is shorter, the number of section data to be compared increases and the time required for the comparison process becomes longer. However, in the transport stream processing device according to the first embodiment, when the section length SL is 8 bytes or less, since it is compared with two entries at the same time, the time required for the comparison processing when the section length SL is 8 bytes or less and 9 It is possible to reduce the difference from the time required for the comparison process when the number of bytes is longer.
[0052]
(Second Embodiment)
FIG. 6 is a block diagram showing the configuration of the main part of the transport stream processing apparatus according to the second embodiment of the present invention. The transport stream processing apparatus shown in FIG. 6 further includes an inverter 201 in addition to the transport stream processing apparatus shown in FIG. Other configurations are the same as those of the transport stream processing apparatus shown in FIG. The inverter 201 inverts the least significant bit AD [0] of the address AD [*: 0] from the memory control circuit 105. The selector 108 selects the least significant bit AD [0] of the address AD [*: 0] from the memory control circuit 105 or the output / AD [0] of the inverter 201 according to the control signal from the memory control circuit 105, It is output as the least significant bit of the address given to the pattern memory 104b. An address obtained by combining the least significant bit AD [0] selected by the selector 108 with the address AD [*: 1] from the memory control circuit 105 is given to the pattern memory 104b.
[0053]
As in the first embodiment, in this transport stream processing apparatus, a plurality of entries to be compared must be written in advance in the pattern memories 104a and 104b. This writing is performed by access from a host (not shown) such as a microcomputer. The address map seen from the host is the same as that shown in FIG. The physical address map is as shown in FIG. Referring to FIG. 7, at even addresses (00h, 02h,...), 0 to 7 bytes of entry k (k is an even number) are written to pattern memory 104a, and 0 to 7 bytes of entry (k + 1) are pattern. It is written in the memory 104b. On the other hand, at odd addresses (01h, 03h,...), 8 to 15 bytes of entry (k + 1) are written to the pattern memory 104a, and 8 to 15 bytes of entry k are written to the pattern memory 104b.
[0054]
Next, the operation of the transport stream processing apparatus configured as described above will be described.
[0055]
The section buffer control circuit 102 extracts 16 bytes from the head of the section data. The 0th to 7th bytes are written to the section data buffer 101a, and the 8th to 15th bytes are written to the section data buffer 101b. When data is written to the section data buffers 101a and 101b, the section length determination circuit 103 obtains the section length SL. The internal operation of the comparison circuit 106 differs depending on whether the section length SL is 9 bytes or more and 8 bytes or less. In the following description, the section length SL is divided into 9 bytes or more and 8 bytes or less.
[0056]
(1) When section length SL is 9 bytes or more
The memory control circuit 105 controls the selector 108 so as to select the output / A [0] of the inverter 201. Therefore, the address given to the pattern memory 104b is an inversion of the least significant bit of the address given to the pattern memory 104a. According to these addresses, 8-byte data is read from the pattern memories 104a and 104b, respectively.
[0057]
When the address given from the memory control circuit 105 to the pattern memory 104a is an even number, the memory control circuit 105 controls the selector 106d to select and output the data read from the pattern memory 104a, and from the pattern memory 104b. The selector 106e is controlled to select and output the read data. On the other hand, when the address given from the memory control circuit 105 to the pattern memory 104a is an odd number, the memory control circuit 105 controls the selector 106d so as to select and output the data read from the pattern memory 104b. The selector 106e is controlled to select and output the data read from 104a.
[0058]
The comparator 106a of the comparison circuit 106 compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data selected by the selector 106d, and determines the result as an entry decision. Output to the circuit 107. The selector 106c selects the section data of the 8th to 15th bytes read from the section data buffer 101b and supplies the selected section data to the comparator 106b. The comparator 106b compares the 8th to 15th byte section data read from the section data buffer 101b with the 8th to 15th byte entry data selected by the selector 106e, and compares the result with the entry determination circuit 107. Output.
[0059]
The entry determination circuit 107 calculates the logical product of the output of the comparator 106a and the output of the comparator 106b and determines whether or not they match.
[0060]
Hereinafter, the comparison operation described above will be described in detail.
[0061]
As shown in FIG. 8A, the address 00h is given to the pattern memory 104a and the address 01h is given to the pattern memory 104b at the first clock. In response to this, the 0th to 7th bytes of entry 0 are read from the pattern memory 104a, and the 8th to 15th bytes of entry 0 are read from the pattern memory 104b. The 0th to 7th byte data of entry 0 read from the pattern memory 104a is selected by the selector 106d and given to the comparator 106a, and the 8th to 15th byte data of entry 0 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The section data of 0 to 7 bytes read from the section data buffer 101a and the entry data of 0 to 7 bytes of entry 0 are compared by the comparator 106a, and 8 to 15 read from the section data buffer 101b. The section data of the byte and the 8th to 15th bytes of entry 0 are compared by the comparator 106b. Then, the entry determination circuit 107 determines whether the 0th to 15th byte section data read from the section data buffers 101a and 101b matches the 0th to 15th bytes of the entry 0. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with entry 1 is continued.
[0062]
When it is determined that they do not match, as shown in FIG. 8B, the address 01h is given to the pattern memory 104a and the address 00h is given to the pattern memory 104b at the second clock. In response to this, the 8th to 15th bytes of data in entry 1 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 1 are read from the pattern memory 104b. The 0th to 7th byte data of entry 1 read from the pattern memory 104b is selected by the selector 106d and applied to the comparator 106a, and the 8th to 15th byte data of entry 1 read from the pattern memory 104a. Is selected by the selector 106e and supplied to the comparator 106b. The section data of 0 to 7 bytes read from the section data buffer 101a and the entry data of 0 to 7 bytes of entry 1 are compared by the comparator 106a, and 8 to 15 read from the section data buffer 101b. The section data of the byte and the 8th to 15th bytes of entry 1 are compared by the comparator 106b. Then, the entry determination circuit 107 determines whether or not the 0th to 15th byte section data read from the section data buffers 101a and 101b matches the 0th to 15th bytes of the entry 1. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with the entry 2 is continued.
[0063]
Thereafter, processing similar to that described above is performed until it is determined by the entry determination circuit 107 that they match or until the comparison processing with all entries is completed.
[0064]
As described above, when the section length SL is 9 bytes or more, one entry is compared per clock.
[0065]
(2) When section length SL is 8 bytes or less
The memory control circuit 105 generates only even addresses. Further, the memory control circuit 105 controls the selector 108 so as to select the least significant bit AD [0] of the address AD [*: 0] from the memory control circuit 105. Therefore, the same address is given to the pattern memory 104a and the pattern memory 104b. According to this address, 8-byte data is read from the pattern memories 104a and 104b. Therefore, the 8-byte data read from the pattern memory 104a and the 8-byte data read from the pattern memory 104b are the 0th to 7th byte data of different entries. The memory control circuit 105 controls the selector 106d to select and output the data read from the pattern memory 104a, and the selector 106e to select and output the data read from the pattern memory 104b. Control.
[0066]
The comparator 106a of the comparison circuit 106 compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data read from the pattern memory 104a, and compares the result. The data is output to the entry determination circuit 107. The selector 106c selects the 0th to 7th byte section data read from the section data buffer 101a and supplies the selected section data to the comparator 106b. The comparator 106b compares the 0th to 7th byte section data read from the section data buffer 101a with the 0th to 7th byte entry data read from the pattern memory 104b, and compares the result with the entry determination circuit. It outputs to 107.
[0067]
The entry determination circuit 107 determines the comparison result by the comparator 106a and the comparison result by the comparator 106b as the result for each entry.
[0068]
Hereinafter, the comparison operation described above will be described in detail.
[0069]
As shown in FIG. 9A, the address 00h is given to the pattern memories 104a and 104b at the first clock. In response to this, the 0th to 7th bytes of entry 0 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 1 are read from the pattern memory 104b. The 0th to 7th byte data of entry 0 read from the pattern memory 104a is selected by the selector 106d and given to the comparator 106a, and the 0th to 7th byte data of entry 1 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The 0 to 7 byte section data read from the section data buffer 101a and the 0 to 7 byte entry data of entry 0 are compared by the comparator 106a, and the 0 to 7 bytes read from the section data buffer 101a are compared. The section data of the byte and the 0th to 7th bytes of entry 1 are compared by the comparator 106b. When at least one of the comparison results of the comparators 106a and 106b indicates a match, the comparison process is terminated. When the comparison results of the comparators 106a and 106b indicate a mismatch, the comparison processing with the entry 2 and the entry 3 is continued.
[0070]
When the comparison results of the comparators 106a and 106b show a mismatch, as shown in FIG. 9B, the address 02h is given to the pattern memories 104a and 104b at the second clock. In response to this, the 0th to 7th bytes of entry 2 are read from the pattern memory 104a, and the 0th to 7th bytes of entry 3 are read from the pattern memory 104b. The 0th to 7th byte data of entry 2 read from the pattern memory 104a is selected by the selector 106d and applied to the comparator 106a, and the 0th to 7th byte data of entry 3 read from the pattern memory 104b. Is selected by the selector 106e and supplied to the comparator 106b. The 0- to 7-byte section data read from the section data buffer 101a and the entry 0 to 7-byte entry data of the entry 2 are compared by the comparator 106a, and the 0-7 bytes read from the section data buffer 101a are compared. The section data of the byte and the 0th to 7th bytes of entry 3 are compared by the comparator 106b. When at least one of the comparison results of the comparators 106a and 106b indicates a match, the comparison process is terminated. When the comparison results of the comparators 106a and 106b indicate a mismatch, the comparison processing with the entry 4 and the entry 5 is continued.
[0071]
Thereafter, processing similar to that described above is performed until at least one of the comparison results of the comparators 106a and 106b indicates a match or comparison processing with all entries is completed.
[0072]
Thus, when the section length SL is 8 bytes or less, a comparison with two entries per clock is executed.
[0073]
As described above, the transport stream processing apparatus according to the second embodiment can achieve the same effects as those described in the first embodiment.
[0074]
(Third embodiment)
FIG. 10 is a block diagram showing an overall configuration of a transport stream processing apparatus according to the third embodiment of the present invention. The transport stream processing device shown in FIG. 10 includes a PID filter 100, a section buffer control circuit 302, section data buffers 301a to 301d, a section length determination circuit 103, a memory control circuit 305, and pattern memories 304a to 304d. The comparison circuit 306 and the entry determination circuit 307 are provided.
[0075]
The PID filter 100 extracts a predetermined transport packet from the transport stream, and provides section data of the transport packet to the section buffer control circuit 302.
[0076]
The section buffer control circuit 302 takes out 16 bytes (0th to 15th bytes) from the head of the section data from the PID filter 100. The extracted section data from the 0th to 3rd bytes are stored in the section data buffer 301a, the 4th to 7th bytes are stored in the section data buffer 301b, and the 8th through 11th bytes are stored in the section data buffer 301c. The data up to the first is written in the section data buffer 301d.
[0077]
The section length determination circuit 103 obtains a section length SL based on a total of 12 bits including the lower 4 bits of the second byte from the head of the section data stored in the section data buffer 301a and 8 bits of the third byte.
[0078]
A plurality of entries are stored in the pattern memories 304a to 304d.
[0079]
The memory control circuit 305 reads 4-byte data from the pattern memories 304a to 304d. When the section length SL is 9 bytes or more, 4-byte data read from the pattern memory 304a, 4-byte data read from the pattern memory 304b, and 4-byte data read from the pattern memory 304c One entry (16 bytes) is composed of 4 bytes of data read from the pattern memory 304d. When the section length SL is 5 bytes or more and 8 bytes or less, one entry (8 bytes) is formed by 4 bytes of data read from the pattern memory 304a and 4 bytes of data read from the pattern memory 304b. Thus, another one entry (8 bytes) is constituted by the 4-byte data read from the pattern memory 304c and the 4-byte data read from the pattern memory 304d. When the section length SL is 4 bytes or less, one entry (4 bytes) is constituted by 4 bytes of data read from the pattern memory 304a, and another 4 bytes of data read from the pattern memory 304b. One entry (4 bytes) is configured, and another one entry (4 bytes) is configured by 4-byte data read from the pattern memory 304c, and 4-byte data is read from the pattern memory 304d. Constitutes another entry (4 bytes).
[0080]
Comparison circuit 306 includes comparators 306a-306d and selectors 306e, 306f. When the section length SL is 9 bytes or more, the selector 306e transfers the data read from the section data buffer 301a to the comparator 306a, the data read from the section data buffer 301b to the comparator 306b, and the section data buffer 301c. The data read from is supplied to the comparator 306c, and the data read from the section data buffer 301d is supplied to the comparator 306d. When the section length SL is 5 bytes or more and 8 bytes or less, the selector 306e supplies the data read from the section data buffer 301a to the comparators 306a and 306c, and the data read from the section data buffer 301b is the comparator. To 306b and 306d. When the section length SL is 4 bytes or less, the selector 306e provides the data read from the section data buffer 301a to the comparators 306a to 306d. The selector 306f gives the data read from the pattern memories 304a to 304d to the comparators 306a to 306d in accordance with the control signal from the memory control circuit 105. The comparators 306a to 306d give “1” to the entry determination circuit 307 when the data supplied from the selector 306e matches the data supplied from the selector 306f, and “0” when they do not match.
[0081]
The entry determination circuit 307 determines whether or not the section data read from the section data buffers 301a to 301d matches the entry read from the pattern memories 304a to 304d by a method according to the section length SL. This will be specifically described below. When the section length SL is 9 bytes or more, when the logical product of the output of the comparator 306a, the output of the comparator 306b, the output of the comparator 306c, and the output of the comparator 306d is "1", the section data buffers 301a to 301d It is determined that the section data read from the pattern data and the entries read from the pattern memories 304a to 304d match, and when the logical product is “0”, it is determined that they do not match. When the section length SL is 5 bytes or more and 8 bytes or less, the determination is made based on the outputs of the comparators 306a and 306b and the outputs of the comparators 306c and 306d. When the logical product of the output of the comparator 306a and the output of the comparator 306b is “1”, the section data read from the section data buffers 301a and 301b matches the entry read from the pattern memories 304a and 304b. Therefore, when the logical product is “0”, it is determined that there is a mismatch. When the logical product of the output of the comparator 306c and the output of the comparator 306d is "1", the section data read from the section data buffers 301a and 301b and the entry read from the pattern memories 304c and 304d Are determined to match, and when the logical product is “0”, it is determined that they do not match. When the section length SL is 4 bytes or less, the determination is made based on the outputs of the comparators 306a to 306d. When the output of the comparator 306a is “1”, it is determined that the section data read from the section data buffer 301a matches the entry read from the pattern memory 304a, and the output of the comparator 306a is “0”. When it is determined that there is a discrepancy. When the output of the comparator 306b is “1”, it is determined that the section data read from the section data buffer 301a matches the entry read from the pattern memory 304b, and the output of the comparator 306b is “0”. "", It is determined that there is a mismatch. When the output of the comparator 306c is “1”, it is determined that the section data read from the section data buffer 301a matches the entry read from the pattern memory 304c, and the output of the comparator 306c is “0”. "", It is determined that there is a mismatch. When the output of the comparator 306d is “1”, it is determined that the section data read from the section data buffer 301a matches the entry read from the pattern memory 304d, and the output of the comparator 306d is “0”. "", It is determined that there is a mismatch.
[0082]
Next, the operation of the transport stream processing apparatus configured as described above will be described.
[0083]
In this transport stream processing apparatus, a plurality of entries to be compared must be written in the pattern memories 304a to 304d in advance. This writing is performed by access from a host (not shown) such as a microcomputer. The physical address map is as shown in FIG. Referring to FIG. 11, here, one address is given for 16 bytes of entry data. Address 00h is given to a total of 16 bytes from 0 to 3 bytes of entry 0 to entry 3. The 0th to 3rd bytes of entry 0 to entry 3 are stored in pattern memories 304a, 304c, 304b, and 304d, respectively. Address 01h is given to a total of 16 bytes of the fourth to seventh bytes of entry 0 to entry 3. The fourth to seventh bytes of entry 0 to entry 3 are stored in pattern memories 304b, 304d, 304a, and 304c, respectively. Address 02h is given to a total of 16 bytes of the 8th to 11th bytes of entry 0 to entry 3. The 8th to 11th bytes of entry 0 to entry 3 are stored in pattern memories 304c, 304a, 304d, and 304b, respectively. Address 03h is given to a total of 16 bytes of the 12th to 15th bytes of entry 0 to entry 3. The 12th to 15th bytes of entry 0 to entry 3 are stored in pattern memories 304d, 304b, 304c, and 304a, respectively. In this way, a plurality of entries are written in advance in the pattern memories 304a to 304d.
[0084]
Then, the section buffer control circuit 302 extracts 16 bytes from the head of the section data. The 0th to 3rd bytes are written to the section data buffer 301a, the 4th to 7th bytes are written to the section data buffer 301b, the 8th to 11th bytes are written to the section data buffer 301c, and the 12th to 15th bytes are section data. It is written in the buffer 301d.
[0085]
When data is written to the section data buffers 301a to 301d, the section length determination circuit 103 obtains the section length SL. The internal operation of the comparison circuit 106 differs according to the section length SL. The following explanation is divided into (1) when the section length SL is 9 bytes or more, (2) when the section length SL is 5 bytes or more and 8 bytes or less, and (3) 4 bytes or less.
[0086]
(1) When section length SL is 9 bytes or more
As shown in FIG. 12A, at the first clock, address 00h is given to the pattern memory 304a, address 01h is given to the pattern memory 304b, address 02h is given to the pattern memory 304c, and address 03h is given to the pattern memory 304d. In response to this, the 0th to 3rd bytes of entry 0 are entered from the pattern memory 304a, the 4th to 7th bytes of entry 0 from the pattern memory 304b, and the 8th to 11th bytes of entry 0 are entered from the pattern memory 304c. Data of 12th to 15th bytes of 0 is read from the pattern memory 304d. The selector 306f stores the 0th to 3rd byte data of the entry 0 read from the pattern memory 304a into the comparator 306a and the 4th to 7th byte data of the entry 0 read from the pattern memory 304b into the comparator 306b. In addition, the 8th to 11th byte data of entry 0 read from the pattern memory 304c is supplied to the comparator 306c, and the 12th to 15th byte data of entry 0 read from the pattern memory 304d is supplied to the comparator 306d. . The selector 306e receives the 0th to 3rd byte section data from the section data buffer 301a to the comparator 306a, the 4th to 7th byte section data from the section data buffer 301b to the comparator 306b, and the section data buffer 301c The 8th to 11th byte section data is supplied to the comparator 306c, and the 12th to 15th byte section data from the section data buffer 301d is supplied to the comparator 306d. The 0 to 3 byte section data read from the section data buffer 301a and the 0 to 3 byte entry data of entry 0 are compared by the comparator 306a, and 4 to 7 read from the section data buffer 301b. The section data of the byte and the fourth to seventh bytes of the entry 0 are compared by the comparator 306b, and the section data of the eighth to eleventh bytes read from the section data buffer 301c and the eighth to eleventh bytes of the entry 0 are compared. The entry data is compared with the comparator 306c, and the 12th to 15th byte section data read from the section data buffer 301d is compared with the 12th to 15th bytes of the entry 0 by the comparator 306d. Then, the entry determination circuit 307 determines whether or not the 0th to 15th byte section data read from the section data buffers 301a to 301d matches the 0th to 15th bytes of the entry 0. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with entry 1 is continued.
[0087]
When it is determined that they do not match, as shown in FIG. 12B, at the second clock, the address 02h is in the pattern memory 304a, the address 03h is in the pattern memory 304b, the address 00h is in the pattern memory 304c, and the address 01h is in the pattern. Each is provided to the memory 304d. In response to this, the 8th to 11th byte data of entry 1 is from the pattern memory 304a, the 12th to 15th bytes of entry 1 are from the pattern memory 304b, and the 0th to 3rd bytes of entry 1 are from the pattern memory 304c. 1 to 4th to 7th bytes of data are read from the pattern memory 304d. The selector 306f stores the 8th to 11th byte data of entry 1 read from the pattern memory 304a in the comparator 306c, and the 12th to 15th byte data of entry 1 read from the pattern memory 304b in the comparator 306d. The 0th to 3rd byte data of entry 1 read from the pattern memory 304c is supplied to the comparator 306a, and the 4th to 7th byte data of entry 1 read from the pattern memory 304d is supplied to the comparator 306b. . The selector 306e receives the 0th to 3rd byte section data from the section data buffer 301a to the comparator 306a, the 4th to 7th byte section data from the section data buffer 301b to the comparator 306b, and the section data buffer 301c The 8th to 11th byte section data is supplied to the comparator 306c, and the 12th to 15th byte section data from the section data buffer 301d is supplied to the comparator 306d. The 0 to 3 byte section data read from the section data buffer 101a and the 0 to 3 byte entry data of entry 1 are compared by the comparator 306a, and 4 to 7 read from the section data buffer 301b. The section data of the byte and the fourth to seventh bytes of the entry 1 are compared by the comparator 306b, and the eighth to eleventh byte section data read from the section data buffer 301c and the eighth to eleventh bytes of the entry 1 are compared. The entry data is compared with the comparator 306c, and the 12th to 15th byte section data read from the section data buffer 301d is compared with the 12th to 15th bytes of the entry 1 by the comparator 306d. Then, the entry determination circuit 307 determines whether or not the 0th to 15th byte section data read from the section data buffers 301a to 301d matches the 0th to 15th bytes of the entry 1. When it is determined that they match, the comparison process ends. When it is determined that they do not match, the comparison process with the entry 2 is continued.
[0088]
Thereafter, processing similar to that described above is performed until it is determined by the entry determination circuit 307 that they match or until the comparison processing with all entries is completed.
[0089]
As described above, when the section length SL is 9 bytes or more, one entry is compared per clock.
[0090]
(2) When section length SL is 5 bytes or more and 8 bytes or less
As shown in FIG. 13A, at the first clock, the address 00h is given to the pattern memories 304a and 304c, and the address 01h is given to the pattern memories 304b and 304d. In response to this, the 0th to 3rd bytes of entry 0 are from the pattern memory 304a, the 4th to 7th bytes of entry 0 are from the pattern memory 304b, and the 0th to 3rd bytes of entry 1 are from the pattern memory 304c. The fourth to seventh bytes are read from the pattern memory 304d. The selector 306f stores the 0th to 3rd byte data of entry 0 read from the pattern memory 304a into the comparator 306a, and the 4th to 7th byte data of entry 0 read from the pattern memory 304b into the comparator 304b. The 0th to 3rd byte data of entry 1 read from the pattern memory 304c is stored in the comparator 304c, and the 4th to 7th byte data of entry 1 read from the pattern memory 304d is stored in the comparator 304d. give. The selector 306e supplies the 0-3rd byte section data from the section data buffer 301a to the comparators 306a and 306c, and the 4th-7th byte section data from the section data buffer 301b to the comparators 306b and 306d, respectively. The 0 to 3 byte section data read from the section data buffer 301a and the 0 to 3 byte entry data of entry 0 are compared by the comparator 306a, and 4 to 7 read from the section data buffer 301b. The section data of the byte and the fourth to seventh bytes of entry 0 are compared by the comparator 306b. The 0 to 3 byte section data read from the section data buffer 301a and the 0 to 3 byte entry data of entry 1 are compared by the comparator 306c, and 4 to 7 read from the section data buffer 301b. The section data of the byte and the 4th to 7th bytes of entry 1 are compared by the comparator 306d. When at least one of the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d is “1”, the comparison process is terminated. When the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d are both “0”, the comparison processing with the entry 2 and the entry 3 is continued. I do.
[0091]
When the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d are both “0”, as shown in FIG. At the second clock, the address 01h is given to the pattern memories 304a and 304c, and the address 00h is given to the pattern memories 304b and 304d. In response to this, the 4th to 7th bytes of entry 2 are from pattern memory 304a, the 0th to 3rd bytes of entry 2 are from pattern memory 304b, the 4th to 7th bytes of entry 3 are from pattern memory 304c, The 0th to 3rd bytes are read from the pattern memory 304d. The selector 306f stores the 4th to 7th byte data of the entry 2 read from the pattern memory 304a in the comparator 306b and the 0th to 3rd byte data of the entry 2 read from the pattern memory 304b to the comparator 304a. Further, the 4th to 7th byte data of the entry 3 read from the pattern memory 304c is stored in the comparator 304d, and the 0th to 3rd byte data of the entry 3 read from the pattern memory 304d is stored in the comparator 304c. give. The selector 306e supplies the 0-3rd byte section data from the section data buffer 301a to the comparators 306a and 306c, and the 4th-7th byte section data from the section data buffer 301b to the comparators 306b and 306d, respectively. The 0 to 3 byte section data read from the section data buffer 301a and the 0 to 3 byte entry data of entry 2 are compared by the comparator 306a, and 4 to 7 read from the section data buffer 301b. The section data of the byte and the 4th to 7th bytes of entry 2 are compared by the comparator 306b. The 0-3rd byte section data read from the section data buffer 301a and the 0-3rd byte entry data of entry 3 are compared by the comparator 306c, and 4-7 read from the section data buffer 301b. The section data of the byte and the 4th to 7th bytes of entry 3 are compared by the comparator 306d. When at least one of the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d is “1”, the comparison process is terminated. When the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d are both “0”, the comparison process with the entry 4 and the entry 5 is continued. I do.
[0092]
Thereafter, at least one of the logical product of the output of the comparator 306a and the output of the comparator 306b and the logical product of the output of the comparator 306c and the output of the comparator 306d indicates “1” or all entries. Until the comparison process is completed, the same process as described above is performed.
[0093]
As described above, when the section length SL is not less than 5 bytes and not more than 8 bytes, comparison with two entries per clock is executed.
[0094]
(3) When section length SL is 4 bytes or less
As shown in FIG. 14, the address 00h is given to the pattern memories 304a to 304d at the first clock. In response to this, the 0th to 3rd bytes of entry 0 are from the pattern memory 304a, the 0th to 3rd bytes of entry 2 are from the pattern memory 304b, and the 0th to 3rd bytes of entry 1 are from the pattern memory 304c. The 0th to 3rd bytes are read from the pattern memory 304d. The selector 306f stores the 0th to 3rd byte data of entry 0 read from the pattern memory 304a into the comparator 306a and the 0th to 3rd byte data of entry 2 read from the pattern memory 304b into the comparator 304c. The 0th to 3rd byte data of entry 1 read from the pattern memory 304c is stored in the comparator 304b, and the 0th to 3rd byte data of entry 3 read from the pattern memory 304d is stored in the comparator 304d. give. The selector 306e gives the 0th to 3rd byte section data from the section data buffer 301a to the comparators 306a to 306d. The 0 to 3 byte section data read from the section data buffer 301a and the 0 to 3 byte entry data of entry 0 are compared by the comparator 306a, and the 0 to 3 bytes read from the section data buffer 301a are compared. The section data of the byte and the 0th to 3rd bytes of the entry 1 are compared by the comparator 306b, and the 0th to 3rd byte of the section data read from the section data buffer 301a and the 0th to 3rd bytes of the entry 2 are compared. The entry data is compared by the comparator 306c, and the 0-3rd byte section data read from the section data buffer 301a and the 0-3rd byte of the entry 3 are compared by the comparator 306d. When at least one of the outputs from the comparators 306a to 306d indicates a match, the comparison process is terminated. When all the outputs of the comparators 306a to 306d indicate mismatch, the comparison processing with the fourth to seventh bytes of entry 0 to entry 3 is continued.
[0095]
Thereafter, processing similar to that described above is performed until at least one of the outputs of the comparators 306a to 306d indicates a match or comparison processing with all entries is completed.
[0096]
Thus, when the section length SL is 4 bytes or less, a comparison with four entries per clock is executed.
[0097]
As described above, the transport stream processing apparatus according to the third embodiment can achieve the same effects as those described in the first embodiment.
[0098]
(Fourth embodiment)
FIG. 15 is a block diagram showing an overall configuration of a transport stream processing apparatus according to the fourth embodiment of the present invention. The transport stream processing apparatus shown in FIG. 15 includes a PID filter 100, a section buffer control circuit 102, section data buffers 101a and 101b, pattern memories 604a and 604b, a memory control circuit 605, a comparison circuit 606, and an entry. A determination circuit 607 and a mode memory 608 are provided.
[0099]
A plurality of entries are written in the pattern memories 604a and 604b. The mode memory 608 is set with mode data indicating whether the mode is the 16-byte mode or the 8-byte mode, and data indicating whether the entry stored in the pattern memories 604a and 604b is valid or invalid. Has been.
[0100]
The data arrangement of the pattern memories 601a and 604b and the mode memory 608 is shown in FIG. 0 to 15 bytes of entry 0 are written from address 00h to 0fh. Similarly, 0 to 15 bytes of entry 1 are written at addresses 10 to 1 fh. However, in the 8-byte mode, one entry and 16 bytes are halved as in addresses 10 to 1fh, and one entry and 8 bytes are used as two sets, such as entry 1 and entry 1α. At this time, the mode memory 608 is set to the 8-byte mode and whether two sets of one entry and 8 bytes are valid or invalid. Similarly, the 16-byte mode and whether this entry is valid or invalid are set.
[0101]
The memory control circuit 605 reads 8-byte data from the pattern memories 604a and 604b. The memory control circuit 605 reads mode data from the mode memory 608. Further, the memory control circuit 605 reads data indicating whether the data read from the pattern memories 604a and 604b is valid or invalid from the mode memory 608.
[0102]
Comparison circuit 606 includes comparators 606a and 606b and a selector 606c. When the mode data from the mode memory 608 indicates the 8-byte mode, the selector 606c gives the data read from the section data buffer 101a to the comparator 606c, and when the mode data from the mode memory 608 indicates the 16-byte mode. Gives the data read from the section data buffer 101b to the comparator 606c. The comparator 606a gives “1” to the entry determination circuit 607 when the data read from the section data buffer 101a and the data read from the pattern memory 604a match, and “0” when they do not match. . The comparator 606b gives “1” to the entry determination circuit 607 when the data supplied from the selector 606c and the data read from the pattern memory 604b match, and “0” when they do not match.
[0103]
The entry determination circuit 607 determines whether or not the section data read from the section data buffers 101a and 101b matches the entry read from the pattern memories 604a and 604b according to the mode data from the mode memory 608. Judge with. When the mode data from the mode memory 608 indicates the 16-byte mode, the section read from the section data buffers 101a and 101b when the logical product of the output of the comparator 606a and the output of the comparator 606b is "1". It is determined that the data and the entries read from the pattern memories 604a and 604b match, and when the logical product is “0”, it is determined that they do not match. When the mode data from the mode memory 608 indicates the 8-byte mode, the determination is made based on the output of the comparator 606a and the output of the comparator 606b. Specifically, when the output of the comparator 606a is “1”, it is determined that the section data read from the section data buffer 101a matches the entry read from the pattern memory 604a, and the output of the comparator 606a. When “0” is “0”, it is determined that there is a mismatch. When the output of the comparator 101b is “1”, it is determined that the section data read from the section data buffer 101a matches the entry read from the pattern memory 604b, and the output of the comparator 604b is “0”. "", It is determined that there is a mismatch.
[0104]
Next, the operation of the transport stream processing apparatus configured as described above will be described. Here, the description will be made on the assumption that there are two types, an 8-byte mode and a 16-byte mode.
[0105]
The section buffer control circuit 102 extracts the first 16 bytes of the section data, writes the 0th to 7th bytes to the section data buffer 101a, and writes the 8th to 15th bytes to the section data buffer 101b. A plurality of 16-byte data for comparison with the section data written in the section data buffers 101a and 101b are written in the pattern memories 604a and 604b.
[0106]
When data is written in the section data buffers 101a and 101b, the comparison is started. The internal operation of the comparison circuit 606 differs depending on the mode data set in the mode memory 608.
[0107]
When the mode data set in the mode memory 608 indicates the 16-byte mode, the memory control circuit 605 reads 8-byte data from the pattern memory 604a and 8-byte data from the pattern memory 604b. When the 8-byte data in the pattern memory 604a and the 8-byte data in the pattern memory 604b are concatenated, 16-byte data of the same entry is obtained.
[0108]
The comparator 606a of the comparison circuit 606 compares the 0th to 7th byte data of the section data buffer 101a with the 0th to 7th byte data read from the pattern memory 604a, and the result is the entry determination circuit 607. Output to. The comparator 606b of the comparison circuit 606 compares the 8th to 15th byte data of the section data buffer 101b with the 8th to 15th byte data read from the pattern memory 604b, and determines the result as an entry determination. Output to the circuit 607. Since the above operation is performed with one clock, one entry can be compared per clock. Since the entry determination circuit 607 is notified from the mode memory 608 that the mode is the 16-byte mode, the logical product of the output of the comparator 606a and the output of the comparator 606b is taken to determine whether or not they match. .
[0109]
When the mode data set in the mode memory 608 indicates the 8-byte mode, the memory control circuit 605 reads 8-byte data from the pattern memory 604a and 8-byte data from the pattern memory 604b. The 8-byte data in the pattern memory 604a and the 8-byte data in the pattern memory 604b divide 16 bytes of 1 entry into half and use them as 8 bytes of 1 entry.
[0110]
The comparator 606a of the comparison circuit 606 compares the 0th to 7th byte data of the section data buffer 101a with the 0th to 7th byte data read from the pattern memory 604a, and the result is sent to the entry determination circuit 607. Output. The comparator 606b of the comparison circuit 606 compares the 0th to 7th byte data of the section data buffer 101a selected by the selector 606c with the 0th to 7th byte data read from the pattern memory 604b. The result is output to the entry determination circuit 607. Since the above operation is performed with one clock, two sets of one entry and eight bytes per clock can be compared. Further, since the entry determination circuit 607 is notified from the mode memory 608 that the mode is the 8-byte mode, the output of the comparator 606a and the output of the comparator 606b are each determined to be a result of 8 bytes per entry.
[0111]
As described above, the transport stream processing apparatus according to the fourth embodiment can achieve the same effects as those in the first embodiment.
[0112]
(Fifth embodiment)
FIG. 17 is a block diagram showing an overall configuration of a transport stream processing apparatus according to the fifth embodiment of the present invention. The transport stream processing device shown in FIG. 17 includes a section data buffer 801, a section buffer control circuit 802, a pattern memory 803, a tag memory 804, a memory control circuit 805, a comparison circuit 806, and a match address storage circuit 807. With.
[0113]
The section buffer control circuit 802 extracts 16 bytes (0th to 15th bytes) from the head of the section data and writes them to the section data buffer 801.
[0114]
In the section data buffer 801, section data of 16 bytes from the head, a necessary PID value, and a necessary index are set according to processing.
[0115]
The pattern memory 803 includes a PID area, an index area, and a section area. In the PID area, a plurality of entries for comparison with the PID value set in the section data buffer 801 are set. In the index area, a plurality of entries for comparison with the index set in the section data buffer 801 are set. In the section area, a plurality of entries (16 bytes) for comparison with the section data set in the section data buffer 801 are set. An entry set in the index area is associated with an entry set in the section area.
[0116]
Tag memory 804 includes regions 804a-804d. A value corresponding to the address of the PID area of the pattern memory 803 is set in the area 804a. A value corresponding to the address of the index area of the pattern memory 803 is set in the area 804b. In the area 804c, a value corresponding to the address of the entry in the section area associated with the entry in the index area determined to match by the comparison circuit 806 is set. In the area 804d, a value corresponding to the address of the entry in the section area determined to be matched by the comparison circuit 806 is set.
[0117]
The memory control circuit 805 controls access to the pattern memory 803 and the tag memory 804.
[0118]
The comparison circuit 806 determines whether or not the value set in the section data buffer 801 matches the value read from the pattern memory 803, and notifies the match address storage circuit 807 of the result.
[0119]
When it is determined that the comparison circuit 806 matches, the match address storage circuit 807 adds a predetermined value to the address generated by the memory control circuit 805 and writes it in the area 804d of the tag memory 804.
[0120]
Next, the operation of the transport stream processing apparatus configured as described above will be described. Here, the description will be divided into PID comparison, index comparison, and section comparison.
[0121]
<PID comparison>
First, a necessary PID value is set in the section data buffer 801, and a start signal is input to the memory control circuit 805. The memory control circuit 805 reads a value from the top of the area 804a of the tag memory 804, generates a read address of the pattern memory 803 based on this value, and reads entry data from the PID area. The comparison circuit 806 compares the value set in the section data buffer 801 with the value read from the pattern memory 803, and notifies the coincidence address storage circuit 807 if they match. When the comparison circuit 806 determines that there is a match, the match address storage circuit 807 holds a value (index) obtained by adding a specific value to the address generated by the memory control circuit 805. When the stop signal of the comparison circuit 806 is generated, the memory control circuit 805 determines that the comparison is completed and ends the comparison. The matched PID can be determined by this process.
[0122]
<Index comparison>
Next, in order to know the index of which section pattern is valid based on the matched PID, the matched address storage circuit 807 sets the held index in the section data buffer 801 and sets the start signal as the memory control circuit 805. To enter. The memory control circuit 805 reads a value from the head of the area 804b of the tag memory 804, generates an address of the pattern memory 803 based on this value, and reads entry data from the index area. The comparison circuit 806 compares the value set in the section data buffer 801 with the value read from the pattern memory 803, and notifies the coincidence address storage circuit 807 if they match. When the matching address storage circuit 807 determines that the comparison circuit 806 matches, the matching address storage circuit 807 adds a predetermined value to the address generated by the memory control circuit 805 and writes it in the area 804c of the tag memory 804. The memory control circuit 805 determines that the comparison is completed when the end of the area 804a of the tag memory 804 is reached, and ends the comparison. A valid index of the section pattern on the pattern memory necessary for this processing can be determined.
[0123]
<Section comparison>
When the section data is input after processing up to this point, the section buffer control circuit 802 extracts the first 16 bytes of the section data and writes the 0th to 15th bytes in the section data buffer 801. The memory control circuit 805 reads the value written from the head of the tag memory area 804c, generates an address of the pattern memory 803 based on this value, and reads entry data from the section area.
[0124]
The comparison circuit 806 compares the section data set in the section data buffer 801 with the entry data read from the pattern memory 803, and notifies the coincidence address storage circuit 807 if they match. When the comparison address storage circuit 807 determines that the comparison circuit 806 matches, the match address storage circuit 807 adds a predetermined value to the address generated by the memory control circuit 805 and writes it in the area 804d of the tag memory 804. The memory control circuit 805 determines that the comparison is completed when the stop signal of the comparison circuit 806 or the end of the area 804c of the tag memory 804 is reached by the mode (PID comparison, index comparison, section comparison), and ends the comparison.
[0125]
As described above, according to the transport stream processing apparatus of the fifth embodiment, it is possible to determine whether or not the matching PID matches the corresponding section pattern. That is, a series of comparisons of PID comparison, section index comparison, and section comparison can be realized with the same hardware.
[0126]
(Sixth embodiment)
FIG. 18 is a block diagram showing an overall configuration of a transport stream processing apparatus according to the sixth embodiment of the present invention. The transport stream processing apparatus shown in FIG. 18 includes a section data buffer 901, a section buffer control circuit 902, a pattern memory 903, tag registers 904a and 904b, a memory control circuit 905, a comparison circuit 906, and a match result storage. A circuit 907, a priority encoder 909, and a tag erasing circuit 910 are provided.
[0127]
As shown in FIG. 19, the pattern memory 903 and the tag register 904a include a PID comparison area, a section index area, and a section comparison area. In the PID comparison area of the pattern memory 903, a plurality of entries (2 bytes / 1 entry) for comparison with the PID value set in the section data buffer 901 are set. In the section index area, a plurality of entries (2 bytes / 1 entry) for comparison with the index set in the section data buffer 901 are set. In the section comparison area, a plurality of entries (16 bytes / 1 entry) for comparison with the section data set in the section data buffer 901 are set. An entry set in the section index area is associated with an entry set in the section comparison area.
[0128]
Next, the operation of this transport stream processing device will be described.
[0129]
First, when performing PID comparison, a necessary PID value is set in the PID comparison area of the pattern memory 903, and 1 is set in the PID comparison area of the tag register 904a. Next, a necessary PID value is set in the section data buffer 901, and a start signal is input to the memory control circuit 905. Then, the memory control circuit 905 copies the value set in the tag register 904a to the tag register 904b. Next, the priority encoder 909 searches for the first “1” in the tag register 904 b and gives this address to the memory control circuit 905 and the tag erasure circuit 910. The comparison circuit 906 compares the value read from the pattern memory 903 by the memory control circuit 905 with the value of the section data buffer 901, and issues a stop signal to the memory control circuit 905 if they match. Further, the tag erasing circuit 910 writes back and erases the first “1” searched by the priority encoder 909 to “0”. That is, the memory control circuit 905 repeats the above operation with one clock until the tag register 904b has “1” and the priority encoder 909 detects “1” or until the comparison circuit 906 determines that they match. . By this operation, PID comparison can be performed.
[0130]
When performing section pattern index comparison, a necessary section pattern index is set in the section index area of the pattern memory 903, and 1 is set in the section pattern index area of the tag register 904a. Next, a necessary PID index value is set in the section data buffer 901, and a start signal is input to the memory control circuit 905. Then, the memory control circuit 905 copies the value set in the tag register 904a to the tag register 904b. Next, the priority encoder 909 searches for the leading “1” in the tag register 904 b and gives this address to the memory control circuit 905 and the tag erasing circuit 910. The comparison circuit 906 compares the value read from the pattern memory 903 by the memory control circuit 905 with the value in the section data buffer 901, and notifies the match result storage circuit 907 if they match. The match result storage circuit 907 writes “1” at the section pattern position corresponding to the section pattern index of the tag register 904a. Further, the tag erasing circuit 910 writes back and erases the first “1” searched by the priority encoder 909 to “0”. That is, the memory control circuit 905 repeats the above operation with one clock as long as the tag register 904b has “1” and the priority encoder 909 detects “1”. By this operation, the section pattern index can be searched.
[0131]
When section comparison is performed, a necessary section pattern is set in the section comparison area of the pattern memory 903, and by searching for the section pattern index, “1” is set in the section pattern area of the tag register 904a. Next, by inputting section data to the section buffer control circuit 902, the section buffer control circuit 902 sets the top value in the section data buffer 901. As a result, a start signal is input to the memory control circuit 905. Then, the memory control circuit 905 copies the value of the tag register 904a to the tag register 904b. Next, the priority encoder 909 searches for the leading “1” in the tag register 904 b and gives this address to the memory control circuit 905 and the tag erasing circuit 910. The comparison circuit 906 compares the value read from the pattern memory 903 by the memory control circuit 905 with the value of the section data buffer 901. Further, the tag erasing circuit 910 writes back and erases the first “1” searched by the priority encoder 909 to “0”. That is, the memory control circuit 905 repeats the above operation with one clock as long as the tag register 904b has “1” and the priority encoder 909 detects “1”. By this operation, a matching section pattern can be searched.
[0132]
As described above, according to the sixth embodiment, a series of comparisons of PID comparison, section index comparison, and section comparison can be realized with the same hardware.
[0133]
(Seventh embodiment)
As shown in FIG. 20, the section data 1201 may be divided into a transport packet 1202 and a transport packet 1204. There may be a transport packet 1203 in between. In this case, when the first 16 bytes or less of the section data 1201 is divided, the divided data 1205 is once stored in the memory, and when the transport packet 1204 containing the next continuous data 1206 arrives, the division is performed. Concatenated data 1205 and continued data 1206 are extracted and compared by extracting 16 bytes from the head. An example of hardware for realizing this is shown in FIG.
[0134]
FIG. 21 is a block diagram showing the overall configuration of the transport stream processing apparatus according to the seventh embodiment of the present invention. The transport stream processing apparatus shown in FIG. 21 includes a section data buffer 1101, a section buffer control circuit 1102, a pattern memory 1103, a memory control circuit 1104, a comparison circuit 1105, and a local memory 1106.
[0135]
Next, the operation of the transport stream processing apparatus shown in FIG. 21 will be described. Here, a case where the last section data of the transport packet is 16 bytes or less will be described.
[0136]
When the packet end signal indicating the end of the transport packet is input to the section buffer control circuit 1102 when the section data is less than 16 bytes, the section buffer control circuit 1102 writes the section data to the section buffer 1101. This is notified to the memory control circuit 1104. The memory control circuit 1104 stores the data in the section data buffer 1101 in the local memory 1106.
[0137]
Next, when the section data stored in the local memory 1106 continues, the memory control unit 1104 first reads the section data from the local memory 1106 and writes it to the section buffer 1101. After that, the section buffer control circuit 1102 writes the section data input from the continuation of the section data read from the local memory 1106 to obtain 16-byte continuous section data. The memory control circuit 1104 reads the pattern memory 1103 and supplies data to the comparison circuit 1105. The comparison circuit 1105 compares the data in the section data buffer 1101 and the value in the pattern memory 1103 to determine whether or not they match.
[0138]
As described above, even if the head data to be compared of the section data is across the transport packet, the section data can be obtained by pattern matching of the head data.
[0139]
【The invention's effect】
In the transport stream processing apparatus according to the present invention, the comparison processing time can be shortened by judging the section length, reading out unnecessary conditions, and comparing only the necessary conditions.
[0140]
In addition, since the comparison is performed in units of entries after all the data to be compared is prepared, the determination holding means is not required if the comparison is completed when the comparison is completed.
[0141]
Also, multiple types of comparisons such as PID comparison, section index comparison, and section comparison can be realized with a single hardware.
[0142]
Also, comparison processing can be performed when a section spans between packets.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a first embodiment of the present invention.
FIG. 2 is an address map viewed from the host.
FIG. 3 is a physical address map.
FIGS. 4A and 4B are diagrams showing comparison targets when the section length is 9 bytes or more. FIGS.
FIGS. 5A and 5B are diagrams showing comparison targets when the section length is 8 bytes or less. FIGS.
FIG. 6 is a block diagram showing a configuration of a main part of a transport stream processing apparatus according to a second embodiment of the present invention.
FIG. 7 is a physical address map.
FIGS. 8A and 8B are diagrams showing comparison targets when the section length is 9 bytes or more. FIGS.
FIGS. 9A and 9B are diagrams showing comparison targets when the section length is 8 bytes or less. FIGS.
FIG. 10 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a third embodiment of the present invention.
FIG. 11 is a physical address map.
FIGS. 12A and 12B are diagrams showing comparison targets when the section length is 9 bytes or more. FIGS.
FIGS. 13A and 13B are diagrams showing comparison targets when the section length is 5 bytes or more and 8 bytes or less. FIGS.
FIG. 14 is a diagram showing an object to be compared when the section length is 4 bytes or less.
FIG. 15 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a fourth embodiment of the present invention.
FIG. 16 is an address map of a pattern memory and a mode memory.
FIG. 17 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a fifth embodiment of the present invention.
FIG. 18 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a sixth embodiment of the present invention.
FIG. 19 is a diagram showing areas in a pattern memory and a tag register.
FIG. 20 is a diagram illustrating a configuration of a transport packet.
FIG. 21 is a block diagram showing an overall configuration of a transport stream processing apparatus according to a seventh embodiment of the present invention.
[Explanation of symbols]
101a, 101b, 301a-301d, 801, 901, 1101 Section data buffer
102, 302, 802, 902, 1102 Section buffer control circuit
103 Section length judgment circuit
104a, 104b, 304a-304d, 604a, 604b, 803, 903, 1103 pattern memory
105, 305, 605, 805, 905, 1104 Memory control circuit
106,306,606,806,906,1105 comparison circuit
107, 307, 607 entry judgment circuit
608 mode memory
804 Tag memory
807 Match address storage circuit
904a, 904b Tag register
907 Match result storage circuit
909 priority encoder
910 Tag erasure circuit
1106 Local memory

Claims (4)

セクションデータバッファと、
トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトを前記セクションバッファに書き込むセクションバッファ制御回路と、
前記セクションデータバッファに書き込まれたデータに基づいてセクションデータ長を判断するセクションレングス判断回路と、
ホストから書き込み/読み出しが可能なn個のパターンメモリと、
前記セクションデータ長に応じて前記n個のパターンメモリのアクセス方法を変えるメモリ制御回路と、
前記セクションデータバッファのデータと前記n個のパターンメモリから読み出されたデータとの比較方法を前記セクションデータ長に応じて変える比較回路と、
前記比較回路による比較結果と前記セクションデータ長とに基づいて一致エントリを判断するエントリ判断回路とを備え、
前記セクションデータ長に合わせ前記n個のパターンメモリから比較するデータをpパターン読み出し、当該pパターンをそれぞれ前記セクションデータバッファのデータの先頭から比較する
ことを特徴とするトランスポートストリーム処理装置。
A section data buffer;
A section buffer control circuit for writing m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer;
A section length determination circuit for determining a section data length based on data written to the section data buffer;
N pattern memories writable / readable from the host;
A memory control circuit that changes an access method of the n pattern memories in accordance with the section data length;
A comparison circuit that changes a comparison method between the data in the section data buffer and the data read from the n pattern memories according to the section data length;
An entry determination circuit for determining a matching entry based on a comparison result by the comparison circuit and the section data length;
A transport stream processing apparatus, wherein data to be compared is read from the n pattern memories in accordance with the section data length, and the p patterns are respectively compared from the head of the data in the section data buffer.
請求項1に記載のトランスポートストリーム処理装置において、
前記n個のパターンメモリの同一物理アドレスには同一エントリのデータを配置し、アドレスに応じて同一エントリ内のバイト順を入れ替えた構成となっている
ことを特徴とするトランスポートストリーム処理装置。
The transport stream processing device according to claim 1,
The transport stream processing apparatus, wherein data of the same entry is arranged at the same physical address of the n pattern memories, and the byte order in the same entry is changed according to the address.
請求項1に記載のトランスポートストリーム処理装置において、
前記n個のパターンメモリの同一物理アドレスには複数のエントリのデータを配置し、エントリ内のデータを分割し異なった物理アドレスにデータを配置する
ことを特徴とするトランスポートストリーム処理装置。
The transport stream processing device according to claim 1,
A transport stream processing apparatus, wherein data of a plurality of entries is arranged at the same physical address of the n pattern memories, data in the entry is divided and data is arranged at different physical addresses.
セクションデータバッファと、
トランスポートストリームから抜き出されたトランスポートパケットのセクションデータの先頭からmバイトを前記セクションバッファに書き込むセクションバッファ制御回路と、
ホストから書き込み/読み出しが可能なn個のパターンメモリと、
ホストから書き込み/読み出しが可能なモードメモリと、
ホストアクセス時は前記パターンメモリや前記モードメモリの書き込み/読み出しを行い、スタート信号入力時は比較用のメモリの読み出しを行うメモリ制御回路と、
前記モードメモリの値により前記セクションデータバッファのデータと前記n個のパターンメモリのデータとの比較方法を変える比較回路と、
前記比較回路からの結果と前記モードメモリの値より一致エントリを判断するエントリ判断回路とを備え、
スタート信号により比較を開始し前記モードメモリの値により比較方法を変えることで1アクセス当たり複数個のパターンと比較することができる
ことを特徴とするトランスポートストリーム処理装置。
A section data buffer;
A section buffer control circuit for writing m bytes from the beginning of the section data of the transport packet extracted from the transport stream to the section buffer;
N pattern memories writable / readable from the host;
A mode memory that can be written to and read from the host;
A memory control circuit for writing / reading the pattern memory and the mode memory at the time of host access, and reading out the comparison memory at the time of inputting a start signal;
A comparison circuit that changes a comparison method between the data in the section data buffer and the data in the n pattern memories according to the value of the mode memory;
An entry determination circuit for determining a matching entry from the result from the comparison circuit and the value of the mode memory;
A transport stream processing apparatus characterized in that comparison can be made with a start signal and comparison can be made with a plurality of patterns per access by changing the comparison method according to the value of the mode memory.
JP2001237412A 2001-08-06 2001-08-06 Transport stream processing device Expired - Fee Related JP3676271B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001237412A JP3676271B2 (en) 2001-08-06 2001-08-06 Transport stream processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001237412A JP3676271B2 (en) 2001-08-06 2001-08-06 Transport stream processing device

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP2005092050A Division JP4005606B2 (en) 2005-03-28 2005-03-28 Transport stream processing device
JP2005092734A Division JP2005237034A (en) 2005-03-28 2005-03-28 Transport stream processing apparatus

Publications (2)

Publication Number Publication Date
JP2003051801A JP2003051801A (en) 2003-02-21
JP3676271B2 true JP3676271B2 (en) 2005-07-27

Family

ID=19068499

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001237412A Expired - Fee Related JP3676271B2 (en) 2001-08-06 2001-08-06 Transport stream processing device

Country Status (1)

Country Link
JP (1) JP3676271B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4176044B2 (en) 2004-05-20 2008-11-05 株式会社東芝 Filtering device and digital broadcast receiving device
JP4825460B2 (en) * 2005-06-29 2011-11-30 株式会社東芝 Receiving apparatus and receiving method
JP4912856B2 (en) * 2006-12-15 2012-04-11 株式会社東芝 Filtering device and digital broadcast receiving device

Also Published As

Publication number Publication date
JP2003051801A (en) 2003-02-21

Similar Documents

Publication Publication Date Title
US6202138B1 (en) Increasing the memory performance of flash memory devices by writing sectors simultaneously to multiple flash memory devices
US6728851B1 (en) Increasing the memory performance of flash memory devices by writing sectors simultaneously to multiple flash memory devices
US6757800B1 (en) Increasing the memory performance of flash memory devices by writing sectors simultaneously to multiple flash memory devices
US20070220197A1 (en) Method of managing copy operations in flash memories
US7082499B2 (en) External memory control device regularly reading ahead data from external memory for storage in cache memory, and data driven type information processing apparatus including the same
US7165126B2 (en) Direct memory access device
US4975872A (en) Dual port memory device with tag bit marking
US20080077733A1 (en) Data transfer apparatus
JP3676271B2 (en) Transport stream processing device
JP4005606B2 (en) Transport stream processing device
JPH07114500A (en) Nonvolatile memory device
US6070223A (en) Associative memory device and network frame switch
JPH06139149A (en) Multiple virtual space control device
JP2005237034A (en) Transport stream processing apparatus
US4737908A (en) Buffer memory control system
JPH0540694A (en) Cache memory device
JP4614732B2 (en) Decoding device
JPH11112564A (en) List management system, method, storage medium and packet exchange
US20030233358A1 (en) Method and system for performing inserts and lookups in memory
JPH03231539A (en) Shared memory type packet switch
JPH02176839A (en) Information processor
JP2000200210A (en) Memory managing device
JP3970959B2 (en) File control unit
JP2576589B2 (en) Virtual storage access control method
GB2407673A (en) Lookup engine

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050328

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050427

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090513

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100513

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110513

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110513

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120513

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees