JP4534320B2 - Processor and decoding apparatus using the same - Google Patents

Processor and decoding apparatus using the same Download PDF

Info

Publication number
JP4534320B2
JP4534320B2 JP2000247960A JP2000247960A JP4534320B2 JP 4534320 B2 JP4534320 B2 JP 4534320B2 JP 2000247960 A JP2000247960 A JP 2000247960A JP 2000247960 A JP2000247960 A JP 2000247960A JP 4534320 B2 JP4534320 B2 JP 4534320B2
Authority
JP
Japan
Prior art keywords
data
bit stream
bits
processor
read
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
JP2000247960A
Other languages
Japanese (ja)
Other versions
JP2002057587A (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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2000247960A priority Critical patent/JP4534320B2/en
Publication of JP2002057587A publication Critical patent/JP2002057587A/en
Application granted granted Critical
Publication of JP4534320B2 publication Critical patent/JP4534320B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Error Detection And Correction (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、プロセッサ、例えばディジタル信号を処理するDSP(Digital Signal Processor)及びこのプロセッサを用いて構成されている復号装置に関するものである。
【0002】
【従来の技術】
情報処理及び情報通信技術が高度に発達した現在、コンピュータ・データのみならず、画像や音声などの各種データも電子的に取扱われるようになってきた。特に、近年ディジタル処理技術の進歩によって、ディジタル化された静止画像、動画、音声信号またはこれらの組み合わせで形成されたマルチメディア情報データがコンピュータなどのデータ処理機器によって簡単に処理できる。さらに、誤り訂正などの信号処理技術を活用することによって、インターネットなどの通信ネットワークを介して低いエラーレートで情報データを転送でき、また、大容量のディジタル記憶媒体、例えば、磁気ディスク、光ディスクなどに記憶し、高精度に再生することができる。
【0003】
通常、マルチメディア情報は、信号の性質上、膨大なデータ容量を有し、そのまま取り扱うには、通信ネットワークの負荷が大きく、また、大容量の記憶媒体を必要とする。このため、通常、情報データが所定フォーマットに従って符号化され、圧縮された後、転送または保存用に提供される。これまでに、マルチメディア情報を符号化し、圧縮するために種々の規格が提案されており、情報処理装置はそれぞれの規格で決められたアルゴリズムに従って情報データを符号化・圧縮して、さらに、その規格よって定められたフォーマットに沿ってビットストリームと呼ばれるデータ系列を生成する。こうした規格は、例えば、静止画像を処理するJPEG(Joint Photographic image coding Experts Group )、動画信号を処理するMPEG(Moving Photographic Experts Group )、または音声信号を処理するMPEG−Audioなどがある。
【0004】
符号化・圧縮された情報データから元の画像または音声信号を再生するために、受信されたビットストリーム、または記憶媒体から読み出したビットストリームを所定のフォーマットに従って、所定の区切り単位、例えば、数ビット単位で順次データを抜き出す、いわゆるアンパック処理を行ったうえ、さらに抜き出したデータを復号し、元の情報データを復元する。また、必要に応じて、復号処理の前に、抜き出したデータに対して誤り訂正を行うこともある。
【0005】
例えば、地上波ディジタル音声放送では、放送される音声信号はディジタル化され、MPEG−Audio規格に従ってビットストリームが生成され、このビットストリームがさらに所定の変調方式、例えば、OFDM変調方式によって変調され、放送される。
受信側では、受信信号が復調され、サンプリング処理によってディジタル信号が得られ、OFDM復調処理によって放送信号のデータストリームが生成される。その後、MPEG−Audioの規格によって定められたフォーマットに従って、生成されたデータストリームから所定のビット単位で順次データが抜き出され、誤り訂正処理などを経て元の情報データが再生される。
【0006】
【発明が解決しようとする課題】
ところで、上述したビットストリームのアンパック処理は、例えば、通常のDSPによって実現する場合、ビットストリームから数ビット、例えば、1から16ビット単位で順次データを抜き出す機能を持っていないため、処理が複雑になり、DSPの演算負荷が大きくなる。
【0007】
図6には、通常のDSPによってビットストリームから所定のビット数のデータを抜き出すアンパック処理のフローチャートを示している。この処理は、例えば、プログラムの構成単位である関数(UNPK)としてまとめられ、プロセッサがこの関数を呼び出すことによって、ビットストリームを格納されている32ビットのワードバッファ(WordBuffer)から定数Lengthによって指定したビット数のデータを読み出すことができる。
【0008】
ここで、ビットストリームは、ワードバッファにMSB側から順次格納されているとする。このため、アンパック処理では、まず、ワードバッファを左に変数ビットカウントBitCount分シフトして、その結果を変数TMP に入力する(ステップSP1)。ここで、ビットカウントは、アンパック処理によって、ワードバッファから抜き出したビット幅の合計値である。
そして、変数TMP を右に(32−Length)ビット分シフトする。この処理によって、ワードバッファに格納されているビットストリームから、Lengthによって指定したビット数のデータが抜き出される。抜き出したデータを戻り値RetValueに格納される(ステップSP2)。さらに、抜き出したビット数をビットカウントBitCountに加算される(ステップSP3)。
【0009】
加算されたビットカウントBitCountが16より小さい場合、戻り値RetValueが返され、処理が終了する(ステップSP9)。一方、ビットカウントBitCountが16に等しく、または16を越えた場合、ビットカウントを調整し、ワードバッファのデータを左に16ビットシフトし、さらに次の16ビットのビットストリームをワードバッファの下位16ビットに取り込む(ステップSP4,SP5,SP6,SP7,SP8)。
上述したように、通常のDSPによってアンパック処理を実行する場合、シフトと加算命令が繰り返して用いられ、DSPの処理負荷が大きくなる。
【0010】
また、DSPの命令の中に、ビットフィールド命令という形で類似した機能を提供している場合もあるが、メモリに配置された自由な形式のデータを扱う前提としているために、ハードウェアの構成が複雑になり、性能的にも不利であった。
【0011】
ビットストリームは、通信経路から送られてくる、もしくは記憶媒体から読み出されている場合、伝送または読み出しの際に混入するノイズや記憶媒体の傷などにより伝送エラーあるいは読み出しエラーが発生している場合が多い。MPEG−Audioなどでは、符号化された情報データに対してさらにCRC(Cyclic Redundancy Check:巡回冗長検査)のための符号化処理を行うことによって、受信側においてデータ再生のときCRC処理により、受信データにエラーの有無を判別し、復号されたデータの誤りを訂正し、受信エラーの発生率を低く抑制できる。しかし、プロセッサが標準で持っている命令を組み合わせてCRCを計算すると、DSPにとって非常に大きな演算負荷となり、例えば、ディジタル音声放送信号を再生するなど高速な処理を要求される場合、DSPのみで実現することが困難であった。
【0012】
本発明は、かかる事情に鑑みてなされたものであり、その目的は、比較的に単純な回路の追加によって、回路規模の増加を抑制しつつ、アンパック処理の拡張命令を追加し、アンパック処理に要する動作サイクルを低減でき、DSPの負荷の軽減、動作周波数及び消費電力の低減を実現できるプロセッサ及びそれを用いた復号装置を提供することにある。
【0013】
【課題を解決するための手段】
上記目的を達成するため、本発明のプロセッサは、入力されるビットストリームから指定されたビット数を読み出す動作命令を有するプロセッサであって、上記ビットストリームを保持するビットストリームバッファメモリと、上記動作命令によって上記ビットストリームバッファメモリに保持された上記ビットストリームを、上記プロセッサのアンパック処理を制御する拡張命令により指定された1から16ビットの指定のデータに分割し、当該分割されたビット数を単位として該ビット数の単位に対する指定の時間分の遅延ごとに順次読み出す制御手段と、上記制御手段の制御により、上記ビットストリームバッファメモリから上記ビット数の単位のデータを受け取り記憶し、該データを読み出して後段に接続されたバレルシフタに渡すために、上記プロセッサのデータアンパックの要求により読み出し無効なデータを廃棄して位置調整を行う、バッファレジスタとを有する。
【0014】
また、本発明では、好適には、上記制御手段は、上記読み出しのビット数に応じて、次回読み出しの位置を示すポイントを更新する。
【0015】
また、本発明では、好適には、上記バッファレジスタから上記読み出したデータに対して、CRC(Cyclic Redundancy Check:巡回冗長検査)演算を行うCRC演算手段をさらに有する。
【0016】
また、本発明の復号装置は、入力されるビットストリームから指定されたビット数を読み出す動作命令を有する復号装置であって、上記ビットストリームを保持するビットストリームバッファメモリと、上記動作命令によって上記ビットストリームバッファメモリに保持された上記ビットストリームを、上記プロセッサのアンパック処理を制御する拡張命令により指定された1から16ビットの指定のデータに分割し、当該分割されたビット数を単位として該ビット数の単位に対する指定の時間分の遅延ごとに順次読み出す制御手段と、上記制御手段の制御により、上記ビットストリームバッファメモリから上記ビット数の単位のデータを受け取り記憶し、該データを読み出して後段に接続されたバレルシフタに渡すために、上記プロセッサのデータアンパックの要求により読み出し無効なデータを廃棄して位置調整を行う、バッファレジスタとを有する。
【0017】
また、本発明の復号装置において、好適には、上記制御手段は、上記読み出しのビット数に応じて、次回読み出しの位置を示すポイントを更新する。
【0018】
また、本発明の復号装置において、好適には、上記バッファレジスタから上記読み出したデータに対して、CRC演算を行うCRC演算手段をさらに有する。
【0019】
本発明によれば、通常のDSPのハードウェアに、アンパック処理専用のハードウェア、例えば、ビットストリームのデータを保持するバッファメモリ、アンパック動作を制御する制御手段、アンパック処理によって切り出したデータを保持するデータ保持手段、及び誤り訂正のためのCRC演算回路が追加される。また、DSPの通常命令に、アンパック処理専用の拡張命令が追加される。アンパック処理を行う場合、DSPが拡張命令を実行し、アンパック処理専用のハードウェアがDSPの指示に従って動作することによって、指定されたビット数のデータがビットストリームから読み出され、かつ次回の読み出しのポイントが制御手段によって自動的に更新される。また、アンパック処理と同時に、CRC処理を専用のハードウェアによって実行することができるので、DSPの演算負荷を軽減でき、DSPの動作周波数の低減及び消費電力の低減を実現できる。
【0020】
【発明の実施の形態】
図1は本発明に係るプロセッサを用いて構成された復号装置の一実施形態を示す回路図である。本実施形態の復号回路は、入力されるビットストリームを所定のビット単位で切り出すアンパック機能を有する。また、この復号回路は、アンパックされたストリームに応じて生成されるデータ系列に対して、誤り訂正処理、例えば、CRC処理を行い、再生データの誤り率を低減する誤り訂正機能を有する。本実施形態では、プロセッサの処理負荷を増加させることなく、これらの機能を実現するために、専用のバッファメモリを配置し、さらに専用命令の拡張が行われる。
【0021】
図1に示すように、この復号回路は、ビットストリームバッファメモリ100とプロセッサ200によって構成されている。
ビットストリームBSMが外部から入力される入力タイミングは、プロセッサ200の処理タイミングとはほとんどの場合ずれている。このタイミングのずれを吸収するために、本実施形態では、ビットストリームバッファメモリ100が設けられている。プロセッサ200にビットストリームを供給する前に、一旦ビットストリームバッファメモリ100に蓄えられ、プロセッサの処理タイミングに応じて、ビットストリームからバッファメモリ100から所定のビット単位でデータが切り出される。
【0022】
このため、ビットストリームバッファメモリ100は、所定の容量を持つメモリによって構成されている。例えば、ここで一例として、ビットストリームバッファメモリ100は、32ビットのデータを記憶できるRAMによって構成されている。
【0023】
プロセッサ200は、例えば、DSPによって構成され、ビットストリームをアンパックするための回路(ハードウェア)が設けられ、さらに、アンパック処理を実行する拡張命令も設けられている。プロセッサ200は、ビットストリームバッファメモリ100から所定のビット数を切り出し、切り出したコードを復号して、復号データを生成する。
【0024】
図2は、プロセッサ200の詳細の構成を示している。図示のように、プロセッサ200は、制御回路210、バッファレジスタ220、バレルシフタ230及びCRCレジスタ240によって構成されている。
バッファレジスタ220は、ビットストリームバッファメモリ100から、所定の単位、例えば、バイト、ハーフワードまたはワード単位で、データを受け取り、バレルシフタ230に渡すための位置の調整を行うシフトレジスタである。なお、データの受け取り単位は、メモリにデータを格納されているサイズに応じて設定される。
【0025】
バッファレジスタ220における位置の調整は、データアンパックの要求により読み出しずみのデータを廃棄する。読み出しは、例えば、MSB側から行われる。
データの廃棄は、1ビットずつ行い、読み出したビット分のサイクルを要する。また、廃棄時に、必要に応じて発行される命令の種類に従って、CRCレジスタ240へのデータ転送も行う。
【0026】
バレルシフタ230は、バッファレジスタ220から渡されたデータを受け取り、それを一時保持する。バッファレジスタ220からは、最大読み出しビット数に応じたビット数のデータが渡される。渡されたデータは、MSB側からすべて未読み出しの有効なデータである。読み出し無効なデータは、シフトレジスタを兼ねているバッファレジスタ220において捨てられる。
【0027】
ただし、ビットストリームの中に、情報内容を示すデータの他に、送信されるデータの属性などを示すヘッダ情報データも含まれている。アンパック処理は、ヘッダ情報の部分を飛ばして、情報内容を示すデータの部分のみに対して行われる。このため、プロセッサ200において、渡されたデータのすべてを使用する訳ではなく、ヘッダ部分など不必要なデータを捨てる必要がある。
不必要なデータの廃棄は、LSB側から行うが、この作業はバレルシフタ230によって行われる。
【0028】
CRCレジスタ240は、CRC演算を行うレジスタである。バッファレジスタ220によってデータを読み出した後、バッファレジスタ220からは1ビット/1クロックの速度で必要な数だけ読み出したデータを廃棄するが、その廃棄したデータに対して、CRCの計算を行う必要がある場合、CRCレジスタ240において、捨てられている値を用いてCRCの演算を行う。CRCレジスタ240におけるCRC演算については、後に説明する。
【0029】
制御回路210は、ビットストリームバッファメモリ100及びプロセッサ200の各部分動作を制御する。例えば、制御回路210は、ビットストリームバッファメモリ100のアドレスの制御、バッファレジスタ220に残っている有効なデータの管理、CRCレジスタ240に対して演算の指示などを行う。
【0030】
次に、CRCレジスタ240によって行われているCRC演算について説明する。CRC計算の内容は、生成多項式によって与えられている。転送されているビットストリームの種類によっては、複数の生成多項式を必要とする場合もある。この場合、CRCレジスタ240の中に、生成多項式を選択できるような多項式選択手段を設けたり、または複数のCRCレジスタを用意したりすることで対処できる。
【0031】
図3は、CRCレジスタ240の一構成例を示す回路図である。図示のように,本例のCRCレジスタ240は、複数のシフトレジスタ、ここで、8段のシフトレジスタD0,D1,…,D7及びエクスクルーシブORゲート(排他的ORゲート)EX1,EX2,EX3,EX4によって構成されている。シフトレジスタD0,D1,…,D7は、図示していないクロック信号に応じて動作し、クロック信号の入力タイミングで入力端子に入力されるデータを出力端子に出力し、そして、次回のクロック入力まで出力端子のデータを保持する。
【0032】
CRCレジスタ240は、CRC計算を行う生成多項式G(x)に従って構成される。ここで例えば、一例として生成多項式G(x)は、次のように与えられる。
【0033】
【数1】
G(x)=x8 +x4 +x3 +x2 +1…(1)
【0034】
式(1)の生成多項式G(x)に応じて、図3に示すCRCレジスタ240が構成されている。図示のように、CRCレジスタ240において、入力データDinとシフトレジスタD7の出力データがエクスクルーシブORゲートEX1に入力される。エクスクルーシブORゲートEX1の出力がエクスクルーシブORゲートEX2,EX3,EX4及びシフトレジスタD0にそれぞれ入力される。
【0035】
シフトレジスタD1の出力データとエクスクルーシブORゲートEX1の出力データがエクスクルーシブORゲートEX4に入力され、EX4の出力がシフトレジスタD2に入力される。
シフトレジスタD2の出力データとエクスクルーシブORゲートEX1の出力データがエクスクルーシブORゲートEX3に入力され、EX3の出力がシフトレジスタD3に入力される。
シフトレジスタD3の出力データとエクスクルーシブORゲートEX1の出力データがエクスクルーシブORゲートEX2に入力され、EX2の出力がシフトレジスタD4に入力される。
シフトレジスタD4,D5,D6及びD7が直列接続されている。これらのシフトレジスタは入力端子に入力されたデータを次段のシフトレジスタに転送する。
シフトレジスタD7の出力Dout は、CRC計算の結果として出力される。
【0036】
図3に示すCRCレジスタ240によって、バッファレジスタ220から出力されたデータ系列に対して、CRC処理が行われ、データ系列に含まれている誤りを検出することができる。
【0037】
次に、プロセッサ200におけるアンパック処理について説明する。
本実施形態のプロセッサ200では、上述したように、アンパック処理用回路(ハードウェア)、例えば、バッファレジスタ240、バレルシフタ230などが設けられ、さらに、アンパック処理を制御するための拡張命令が追加されている。
【0038】
アンパック処理は、プロセッサ200によってアンパックの拡張命令を実行することによって実現される。このとき、制御回路210によって、拡張命令に従って、ビットストリームバッファメモリ100及びバッファレジスタ220、バレルシフタ230を制御し、ビットストリームバッファメモリ100に格納されているビットストリームから所定のビット数のデータを切り出し、切り出したデータに応じて、復号データを出力する。
【0039】
ここで、プロセッサ200の命令セットにアンパック処理を制御する拡張命令UPKが追加されているとする。アンパック命令UPKは、命令の動作を指定するオペレーションコードと、アンパック処理で切り出したデータを格納するレジスタを指定するオペランドと、切り出しのビット数を指示するオペランドによって構成されている。例えば、「UPK,R0,m」の形で与えられた命令は、ビットストリームバッファメモリ100から、mビットのデータを切り出して、レジスタR0に格納するという動作が指示される。
【0040】
図4は、ビットストリームバッファメモリ100に格納されているビットストリームBSMの一例を示す図である。図示のように、32ビットのビットストリームバッファメモリ100に、16進表記では、0x2718,0x2818のデータが格納されている。ビットストリームBSMは、可変長(VLC:Variable Length Coding)符号であり、各データの符号長がそれぞれ異なる。
図4に示すように、ビットストリームバッファメモリ100に、ビット数がそれぞれ3,1,4,1,5,9,2,6の8つのデータData0,Data1,…,Data7が格納されている。なお、データData0,Data1,…,Data7の値は順次、1,0,7,0,6,20(0x14),0,12(0x0c)である。
【0041】
図5は、図4に示すビットストリームバッファメモリ100の格納データをアンパック処理するために、プロセッサ100に与えたプログラムの一例を示している。以下、このプログラムをステップ順に説明し、プロセッサ200によるアンパック動作を説明する。
【0042】
ステップS1:この命令は、汎用レジスタR0にデータ0をセットする命令である。レジスタR0は、ビットストリームバッファメモリ100から切り出したデータを格納するレジスタである。アンパック処理の前に、ステップ1の命令を実行することによって、このレジスタがクリアされる。
【0043】
ステップS2:この命令は、汎用レジスタR0の値をコプロセッサレジスタG8に転送する命令である。コプロセッサレジスタG8にデータ0をロードすることによって、プロセッサ200にアンパック処理の動作モードを指示する。
【0044】
ステップS3:この命令は、汎用レジスタR0に、データ0x50をセットする。
ステップS4:この命令は、汎用レジスタR0の値をコプロセッサレジスタG9に転送する命令である。この転送によって、汎用レジスタR0の値0x50がコプロセッサレジスタG9にロードされ、アンパックアドレスが設定される。コプロセッサレジスタG9に設定されたアンパックアドレスの値は、アンパック命令UPKが実行されると、自動的に更新されるので、ビットストリームを連続的に読み出す場合は、このレジスタの設定はアンパック処理が開始する前に一回のみで済みます。
【0045】
ステップS5:この命令は、汎用レジスタR1に、アドレスBitstreamの1ワード前の値に設定する。汎用レジスタR1は、ビットストリームから読み出されたデータを格納するためのメモリアドレスを指示するポインタとして使用される。
【0046】
ステップS6:指定した時間分の遅延を制御する疑似命令である。「WAITn」のオペランドnは、遅延する時間を指定する。例えば、ステップS6の場合、4命令分の遅延を制御する。
【0047】
ステップS7:アンパック処理を指示するアンパック命令である。この命令に従って、図2に示すアンパック回路では、ビットストリームバッファメモリ100から3ビット分のデータが読み出され、汎用レジスタR0に入力される。
【0048】
ステップS8:この命令は、汎用レジスタR0の内容を、プリインクリメントした汎用レジスタR1によって指定されたメモリ番地に格納される。ここで、汎用レジスタR0には、アンパック命令によってビットストリームから読み出されたデータが格納されているので、このデータが汎用レジスタR1によって指定されたメモリ番地に書き込まれる。
【0049】
ステップS9:指定された時間分の遅延を制御する。
【0050】
ステップS8,S9,S10によって指示された処理によって、例えば、図4に示す例では、ビットストリームバッファメモリ100に格納されているビットストリームのうち、最上位の3ビットが読み出される。即ち、データ0x0001が汎用レジスタR0に読み出され、さらに汎用レジスタR1によって指定されたメモリ番地に格納される。
【0051】
ステップS10:アンパック処理を指示するアンパック命令である。この命令に従って、ビットストリームバッファメモリ100から、1ビットのデータが読み出され、汎用レジスタR0に格納される。
【0052】
ステップS11:汎用レジスタR0に読み出されたアンパックデータを汎用レジスタR1によって指示されたメモリ番地に格納される。
【0053】
ステップS12:指定された時間分の遅延を制御する。
【0054】
ステップS10,S11,S12によって指示された処理によって、図4に示す例では、ビットストリームバッファメモリ100に格納されているビットストリームのうち、最上位から4ビット目のデータが読み出される。即ち、データ0x0000が汎用レジスタR0に読み出され、さらに汎用レジスタR1によって指定されたメモリ番地に格納される。なお、汎用レジスタR1の内容が書き込み毎にインクリメントされるので、アンパック処理によって汎用レジスタR0に読み出されたデータがメモリの所定の領域に順次書き込まれる。
【0055】
ステップS13:アンパック処理を指示するアンパック命令である。この命令に従って、ビットストリームバッファメモリ100から、4ビットのデータが読み出され、汎用レジスタR0に格納される。
【0056】
ステップS14:汎用レジスタR0に読み出されたアンパックデータを汎用レジスタR1によって指示されたメモリ番地に格納される。
【0057】
ステップS15:指定された時間分の遅延を制御する。
【0058】
ステップS13,S14,S15によって指示された処理によって、図4に示す例では、ビットストリームバッファメモリ100に格納されているビットストリームのうち、最上位から5ビット目より、4ビットのデータが読み出される。即ち、データ0x0007が汎用レジスタR0に読み出され、さらに汎用レジスタR1によって指定されたメモリ番地に格納される。
これまでの処理によって、ビットストリームバッファメモリ100から8ビットのデータが読み出され、三つのデータ0x0001,0x0000,0x0007がメモリの所定の領域に順次書き込まれる。
【0059】
上述したビットストリームバッファメモリ100からの読み出し及びメモリへの書き込みが繰り返して行われる。
ステップS16,S17,S18の処理によって、ビットストリームバッファメモリ100から、4番目のデータ0x0000が読み出され、汎用レジスタR1によって指定されたメモリ番地に格納される。
ステップS19,S20,S21の処理によって、ビットストリームバッファメモリ100から、5番目のデータ0x0006が読み出され、汎用レジスタR1によって指定されたメモリ番地に格納される。
【0060】
ステップS22,S23,S24の処理によって、ビットストリームバッファメモリ100から、6番目のデータ0x0014が読み出され、汎用レジスタR1によって指定されたメモリ番地に格納される。
ステップS25,S26,S27の処理によって、ビットストリームバッファメモリ100から、7番目のデータ0x0000が読み出され、汎用レジスタR1によって指定されたメモリ番地に格納される。
ステップS28,S29,S30の処理によって、ビットストリームバッファメモリ100から、8番目のデータ0x000cが読み出され、汎用レジスタR1によって指定されたメモリ番地に格納される。
【0061】
上述したアンパック処理によって、図4に示すビットストリームバッファメモリ100に格納されているビットストリームが所定のビット数で順次読み出され、指定されたメモリ領域に書き込まれる。なお、アンパック処理における読み出しビット数は、ビットストリームの先頭に送信されるヘッダ情報から取得することが可能である。
【0062】
一方、ビット単位の読み出しと同時にCRC計算を行う場合に、CRC計算を指示する専用の拡張命令を用いることによって、ビットストリームバッファメモリ100から読み出したデータに対して、CRC計算を行い、計算結果を指定したメモリ番地に格納することができる。この場合、読み出したデータが、図2に示すCRCレジスタ240に入力され、生成多項式G(x)に従ってCRC処理が行われ、処理結果がメモリの指定した領域に格納される。
【0063】
上述したCRC拡張命令を実行することによって、ビットストリームからの所定のビット数を読み出すアンパック処理と、読み出したデータに対するCRC演算を同時に実行することができる。図2に示すように、CRC演算は、DSPの内部に設けられている専用のハードウェア(CRCレジスタ240)によって実行されるので、DSPの負荷を増加させることなく、専用の拡張命令を実行するのみでアンパック処理とCRC演算を同時に実現することができる。
【0064】
なお、以上説明した拡張命令の他に、シフトレジスタからデータの読み出しを行うが、読み出しに伴ってシフトレジスタからデータを捨てない拡張命令を追加することも可能である。例えば、このような拡張命令として、UPKNRが追加されたとする。UPKNRを実行する場合、データの読み出しは前述したアンパックの拡張命令UPKと同様に行う。ただし、UPKNRの場合、ビットカウンタへの加算や、シフト動作を行わないので、シフトレジスタに格納されているデータは変化しない。
このような拡張命令を追加することによって、ビットストリームバッファメモリからデコーダしようとするデータを盗み見ることができ、さらに見たデータを使用済みのデータとして廃棄せず、次の処理に利用することができる。
【0065】
以上説明したように、本実施形態のプロセッサ及びそれを用いた復号装置によれば、ビットストリームから所定のビット数を読み出すアンパック処理が、プロセッサに追加された専用の回路及び拡張命令によって実現できる。また、アンパックの処理結果に対して、専用の処理回路によって、CRC処理を実現できるので、アンパック処理とCRC処理を一つの拡張命令を実行するのみで同時に実現でき、プロセッサの実行する命令数を削減でき、さらにプロセッサの演算負荷を低減でき、高速な処理を実現できる。
【0066】
【発明の効果】
以上説明したように、本発明のプロセッサ及びそれを用いた復号装置によれば、プロセッサが元から持っていたハードウェアに比較的に単純な回路を追加し、さらに追加されたハードウェアの処理機能を制御するための拡張命令を追加することによって、回路規模の増加を抑制しながら、ビットストリームから指定したビット数のデータを切り出すアンパック処理の拡張命令を実行するのみで実現できる。これにより、アンパック処理のためプロセッサが実行する命令数を少なくでき、プロセッサの処理負荷を軽減できるほか、動作周波数の低減や、消費電力の低減を実現できる利点がある。
【図面の簡単な説明】
【図1】本発明に係る復号装置の一実施形態を示すブロック図である。
【図2】プロセッサの内部構成を示すブロック図である。
【図3】CRCレジスタの構成を示す回路図である。
【図4】ビットストリームバッファメモリの格納データの一例を示す図である。
【図5】アンパック処理のプログラムの一例を示す図である。
【図6】通常のDSP処理命令によるアンパック処理のフローチャートである。
【符号の説明】
100…ビットストリームバッファメモリ、
200…プロセッサ、
210…制御回路、220…バッファレジスタ、
230…バレルレジスタ、240…CRCレジスタ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a processor, for example, a DSP (Digital Signal Processor) for processing a digital signal, and a decoding apparatus configured using the processor.
[0002]
[Prior art]
With the advanced development of information processing and information communication technology, not only computer data but also various data such as images and sounds have been handled electronically. In particular, with recent advances in digital processing technology, multimedia information data formed from digitized still images, moving images, audio signals, or combinations thereof can be easily processed by a data processing device such as a computer. Furthermore, by utilizing signal processing techniques such as error correction, information data can be transferred at a low error rate via a communication network such as the Internet, and it can be transferred to a large-capacity digital storage medium such as a magnetic disk or an optical disk. It can be stored and played back with high accuracy.
[0003]
Normally, multimedia information has a huge data capacity due to the nature of the signal, and handling it as it is requires a heavy load on the communication network and requires a large-capacity storage medium. For this reason, information data is usually encoded according to a predetermined format, compressed, and then provided for transfer or storage. Up to now, various standards have been proposed for encoding and compressing multimedia information, and the information processing apparatus encodes and compresses information data according to an algorithm determined by each standard, and further, A data series called a bit stream is generated along a format defined by the standard. Such standards include, for example, JPEG (Joint Photographic Image Coding Experts Group) for processing still images, MPEG (Moving Photographic Experts Group) for processing moving image signals, or MPEG-Audio for processing audio signals.
[0004]
In order to reproduce the original image or audio signal from the encoded / compressed information data, the received bit stream or the bit stream read from the storage medium according to a predetermined format according to a predetermined delimiter unit, for example, several bits A so-called unpacking process in which data is sequentially extracted in units is performed, and the extracted data is further decrypted to restore the original information data. Further, if necessary, error correction may be performed on the extracted data before the decoding process.
[0005]
For example, in terrestrial digital audio broadcasting, an audio signal to be broadcast is digitized, a bit stream is generated according to the MPEG-Audio standard, and this bit stream is further modulated by a predetermined modulation method, for example, an OFDM modulation method, and broadcast Is done.
On the receiving side, the received signal is demodulated, a digital signal is obtained by sampling processing, and a data stream of the broadcast signal is generated by OFDM demodulation processing. Thereafter, in accordance with a format defined by the MPEG-Audio standard, data is sequentially extracted from the generated data stream in predetermined bit units, and the original information data is reproduced through error correction processing and the like.
[0006]
[Problems to be solved by the invention]
By the way, the above-described bitstream unpacking process is complicated because it does not have a function of sequentially extracting data from a bitstream in units of several bits, for example, 1 to 16 bits, when realized by a normal DSP. Therefore, the calculation load of the DSP increases.
[0007]
FIG. 6 shows a flowchart of an unpacking process for extracting a predetermined number of bits of data from a bit stream by a normal DSP. This processing is, for example, summarized as a function (UNPK) that is a unit of a program, and the processor calls this function to specify a bit stream by a constant Length from a 32-bit word buffer (WordBuffer) in which the bit stream is stored. The number of bits of data can be read.
[0008]
Here, it is assumed that the bit stream is sequentially stored in the word buffer from the MSB side. Therefore, in the unpacking process, first, the word buffer is shifted to the left by the variable bit count BitCount, and the result is input to the variable TMP (step SP1). Here, the bit count is the total value of the bit widths extracted from the word buffer by the unpacking process.
Then, the variable TMP is shifted to the right by (32-Length) bits. By this process, data of the number of bits specified by Length is extracted from the bit stream stored in the word buffer. The extracted data is stored in the return value RetValue (step SP2). Further, the extracted number of bits is added to the bit count BitCount (step SP3).
[0009]
If the added bit count BitCount is less than 16, the return value RetValue is returned, and the process ends (step SP9). On the other hand, when the bit count BitCount is equal to or exceeds 16, the bit count is adjusted, the word buffer data is shifted 16 bits to the left, and the next 16-bit bit stream is further converted to the lower 16 bits of the word buffer. (Steps SP4, SP5, SP6, SP7, SP8).
As described above, when unpacking processing is executed by a normal DSP, shift and addition instructions are repeatedly used, which increases the processing load on the DSP.
[0010]
In some DSP instructions, a similar function is provided in the form of a bit field instruction. However, since it is assumed that data in a free format placed in a memory is handled, the hardware configuration However, it became complicated and disadvantageous in terms of performance.
[0011]
When a bit stream is sent from a communication path or read from a storage medium, a transmission error or a read error occurs due to noise mixed during transmission or reading or a scratch on the storage medium. There are many. In MPEG-Audio or the like, the encoded information data is further subjected to encoding processing for CRC (Cyclic Redundancy Check), so that the reception data is received by CRC processing at the time of data reproduction on the receiving side. Thus, it is possible to determine whether or not there is an error, correct an error in the decoded data, and suppress the occurrence rate of reception errors to a low level. However, if the CRC is calculated by combining the instructions that the processor has as standard, it will be a very heavy computing load for the DSP. For example, if high-speed processing such as playing a digital audio broadcast signal is required, it will be realized only by the DSP. It was difficult to do.
[0012]
The present invention has been made in view of such circumstances, and an object of the present invention is to add an expansion instruction for unpacking processing while suppressing an increase in circuit scale by adding a relatively simple circuit to unpacking processing. It is an object of the present invention to provide a processor capable of reducing the required operation cycle, reducing the DSP load, and reducing the operating frequency and power consumption, and a decoding device using the processor.
[0013]
[Means for Solving the Problems]
In order to achieve the above object, a processor of the present invention is a processor having an operation instruction for reading a specified number of bits from an input bitstream, A bit stream buffer memory for holding the bit stream; By the above operation command The bit stream held in the bit stream buffer memory is processed by an extension instruction that controls unpacking processing of the processor. Designated 1 to 16 bits specified data And the number of divided bits is used as a unit for each delay of a specified time with respect to the unit of the number of bits. Control means for reading; Under the control of the control means, the data in the unit of the number of bits is received from the bit stream buffer memory, stored, read in response to a request for data unpacking of the processor in order to read the data and pass it to the barrel shifter connected to the subsequent stage. Buffer register that adjusts the position by discarding invalid data And have.
[0014]
In the present invention, it is preferable that the control unit updates the point indicating the position of the next reading in accordance with the number of bits of the reading.
[0015]
In the present invention, preferably, From the above buffer register CRC calculation means for performing CRC (Cyclic Redundancy Check) calculation on the read data is further included.
[0016]
The decoding device of the present invention is a decoding device having an operation command for reading a designated number of bits from an input bit stream, A bit stream buffer memory for holding the bit stream; By the above operation command The bit stream held in the bit stream buffer memory is processed by an extension instruction that controls unpacking processing of the processor. Designated 1 to 16 bits specified data And the number of divided bits is used as a unit for each delay of a specified time with respect to the unit of the number of bits. Control means for reading; Under the control of the control means, the data in the unit of the number of bits is received from the bit stream buffer memory, stored, read in response to a request for data unpacking of the processor in order to read the data and pass it to the barrel shifter connected to the subsequent stage. Buffer register that adjusts the position by discarding invalid data And have.
[0017]
In the decoding device of the present invention, it is preferable that the control unit updates a point indicating a position of the next reading according to the number of bits of the reading.
[0018]
In the decoding device of the present invention, preferably, From the above buffer register CRC calculation means is further provided for performing CRC calculation on the read data.
[0019]
According to the present invention, hardware dedicated to unpacking processing, for example, buffer memory for holding bitstream data, control means for controlling unpacking operation, and data cut out by unpacking processing are held in normal DSP hardware. A data holding means and a CRC calculation circuit for error correction are added. In addition, an extension instruction dedicated to unpack processing is added to the DSP normal instruction. When performing the unpacking process, the DSP executes the extension instruction, and the hardware dedicated to the unpacking process operates according to the instruction of the DSP, whereby the specified number of bits of data is read from the bitstream and the next reading is performed. Points are automatically updated by the control means. In addition, since the CRC processing can be executed by dedicated hardware simultaneously with the unpacking processing, it is possible to reduce the calculation load of the DSP, and it is possible to reduce the operating frequency and power consumption of the DSP.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a circuit diagram showing an embodiment of a decoding apparatus configured using a processor according to the present invention. The decoding circuit of this embodiment has an unpacking function that cuts out an input bit stream in predetermined bit units. In addition, this decoding circuit has an error correction function that performs error correction processing, for example, CRC processing, on a data sequence generated according to an unpacked stream, thereby reducing the error rate of reproduced data. In the present embodiment, in order to realize these functions without increasing the processing load of the processor, a dedicated buffer memory is arranged, and dedicated instructions are expanded.
[0021]
As shown in FIG. 1, this decoding circuit includes a bit stream buffer memory 100 and a processor 200.
The input timing at which the bitstream BSM is input from the outside is almost always different from the processing timing of the processor 200. In order to absorb this timing shift, a bit stream buffer memory 100 is provided in the present embodiment. Before the bit stream is supplied to the processor 200, the bit stream is temporarily stored in the bit stream buffer memory 100, and data is cut out from the bit memory from the buffer memory 100 in a predetermined bit unit according to the processing timing of the processor.
[0022]
Therefore, the bit stream buffer memory 100 is configured by a memory having a predetermined capacity. For example, here, as an example, the bit stream buffer memory 100 is configured by a RAM capable of storing 32-bit data.
[0023]
The processor 200 is configured by, for example, a DSP, provided with a circuit (hardware) for unpacking the bitstream, and further provided with an extension instruction for executing unpacking processing. The processor 200 cuts out a predetermined number of bits from the bit stream buffer memory 100, decodes the cut-out code, and generates decoded data.
[0024]
FIG. 2 shows a detailed configuration of the processor 200. As illustrated, the processor 200 includes a control circuit 210, a buffer register 220, a barrel shifter 230, and a CRC register 240.
The buffer register 220 is a shift register that adjusts the position for receiving data from the bit stream buffer memory 100 in a predetermined unit, for example, byte, halfword, or word unit and passing the data to the barrel shifter 230. The data reception unit is set according to the size of data stored in the memory.
[0025]
In the adjustment of the position in the buffer register 220, the read data is discarded in response to a request for data unpacking. Reading is performed from the MSB side, for example.
Data is discarded bit by bit, and a cycle corresponding to the read bit is required. At the time of discard, data transfer to the CRC register 240 is also performed according to the type of instruction issued as necessary.
[0026]
The barrel shifter 230 receives the data passed from the buffer register 220 and temporarily holds it. From the buffer register 220, data of the number of bits corresponding to the maximum number of read bits is passed. The passed data is valid data that has not been read from the MSB side. Data that is invalid for reading is discarded in the buffer register 220 that also serves as a shift register.
[0027]
However, the bit stream includes header information data indicating attributes of data to be transmitted, in addition to data indicating information contents. The unpacking process is performed only on the data portion indicating the information content by skipping the header information portion. For this reason, the processor 200 does not use all the passed data, and it is necessary to discard unnecessary data such as a header portion.
Although unnecessary data is discarded from the LSB side, this operation is performed by the barrel shifter 230.
[0028]
The CRC register 240 is a register that performs CRC calculation. After the data is read by the buffer register 220, the necessary number of data read from the buffer register 220 is discarded at a speed of 1 bit / 1 clock, but it is necessary to perform CRC calculation on the discarded data. In some cases, CRC calculation is performed in the CRC register 240 using the discarded value. The CRC operation in the CRC register 240 will be described later.
[0029]
The control circuit 210 controls each partial operation of the bit stream buffer memory 100 and the processor 200. For example, the control circuit 210 controls the address of the bit stream buffer memory 100, manages valid data remaining in the buffer register 220, and instructs the CRC register 240 to perform an operation.
[0030]
Next, in CRC register 240 Therefore The CRC calculation being performed will be described. The content of the CRC calculation is given by a generator polynomial. Depending on the type of bitstream being transferred, multiple generator polynomials may be required. In this case, the CRC register 240 can be dealt with by providing a polynomial selection means capable of selecting a generator polynomial or preparing a plurality of CRC registers.
[0031]
FIG. 3 is a circuit diagram showing a configuration example of the CRC register 240. As shown in the figure, the CRC register 240 of this example includes a plurality of shift registers, here, eight-stage shift registers D0, D1,..., D7 and exclusive OR gates (exclusive OR gates) EX1, EX2, EX3, EX4. It is constituted by. The shift registers D0, D1,..., D7 operate in response to a clock signal (not shown), output data input to the input terminal at the input timing of the clock signal to the output terminal, and until the next clock input Holds output pin data.
[0032]
The CRC register 240 is configured according to a generator polynomial G (x) that performs CRC calculation. Here, for example, the generator polynomial G (x) is given as follows.
[0033]
[Expression 1]
G (x) = x 8 + X Four + X Three + X 2 +1 ... (1)
[0034]
The CRC register 240 shown in FIG. 3 is configured according to the generator polynomial G (x) of the equation (1). As shown, in the CRC register 240, the input data D in The output data of the shift register D7 is input to the exclusive OR gate EX1. The output of the exclusive OR gate EX1 is input to the exclusive OR gates EX2, EX3, EX4 and the shift register D0, respectively.
[0035]
The output data of the shift register D1 and the output data of the exclusive OR gate EX1 are input to the exclusive OR gate EX4, and the output of EX4 is input to the shift register D2.
The output data of the shift register D2 and the output data of the exclusive OR gate EX1 are input to the exclusive OR gate EX3, and the output of EX3 is input to the shift register D3.
The output data of the shift register D3 and the output data of the exclusive OR gate EX1 are input to the exclusive OR gate EX2, and the output of EX2 is input to the shift register D4.
Shift registers D4, D5, D6 and D7 are connected in series. These shift registers transfer the data input to the input terminals to the next-stage shift register.
Output D of shift register D7 out Is output as a result of CRC calculation.
[0036]
A CRC process is performed on the data sequence output from the buffer register 220 by the CRC register 240 shown in FIG. 3, and an error included in the data sequence can be detected.
[0037]
Next, the unpacking process in the processor 200 will be described.
In the processor 200 of this embodiment, as described above, an unpack processing circuit (hardware), for example, a buffer register 240, a barrel shifter 230, and the like are provided, and an extension instruction for controlling the unpack processing is added. Yes.
[0038]
The unpacking process is realized by the processor 200 executing an unpacked extension instruction. At this time, the control circuit 210 controls the bit stream buffer memory 100, the buffer register 220, and the barrel shifter 230 according to the extension instruction, and cuts out a predetermined number of bits of data from the bit stream stored in the bit stream buffer memory 100, The decoded data is output according to the cut out data.
[0039]
Here, it is assumed that an extended instruction UPK for controlling the unpacking process is added to the instruction set of the processor 200. The unpack instruction UPK is composed of an operation code for designating the operation of the instruction, an operand for designating a register for storing data cut out by the unpack process, and an operand for designating the number of bits to be cut out. For example, an instruction given in the form of “UPK, R0, m” instructs an operation of cutting out m-bit data from the bitstream buffer memory 100 and storing it in the register R0.
[0040]
FIG. 4 is a diagram illustrating an example of the bit stream BSM stored in the bit stream buffer memory 100. As illustrated, data of 0x2718 and 0x2818 is stored in the 32-bit bitstream buffer memory 100 in hexadecimal notation. The bit stream BSM is a variable length (VLC) code, and each data has a different code length.
As shown in FIG. 4, the bit stream buffer memory 100 stores eight data Data0, Data1,..., Data7 having the numbers of bits 3, 3, 4, 1, 5, 9, 2, and 6, respectively. The values of the data Data0, Data1,..., Data7 are sequentially 1, 0, 7, 0, 6, 20 (0x14), 0, 12 (0x0c).
[0041]
FIG. 5 shows an example of a program given to the processor 100 in order to unpack the data stored in the bit stream buffer memory 100 shown in FIG. Hereinafter, this program will be described in the order of steps, and the unpacking operation by the processor 200 will be described.
[0042]
Step S1: This instruction is an instruction for setting data 0 in the general-purpose register R0. The register R 0 is a register that stores data cut out from the bit stream buffer memory 100. Prior to unpacking, this register is cleared by executing the instruction in step 1.
[0043]
Step S2: This instruction is an instruction for transferring the value of the general-purpose register R0 to the coprocessor register G8. By loading data 0 into the coprocessor register G8, the processor 200 is instructed about the operation mode of the unpacking process.
[0044]
Step S3: This instruction sets data 0x50 in the general-purpose register R0.
Step S4: This instruction is an instruction for transferring the value of the general-purpose register R0 to the coprocessor register G9. By this transfer, the value 0x50 of the general-purpose register R0 is loaded into the coprocessor register G9, and the unpack address is set. Since the value of the unpack address set in the coprocessor register G9 is automatically updated when the unpack instruction UPK is executed, the unpack processing starts when the bit stream is read continuously. You only need to do it once before
[0045]
Step S5: This instruction sets the general register R1 to a value one word before the address Bitstream. The general-purpose register R1 is used as a pointer indicating a memory address for storing data read from the bit stream.
[0046]
Step S6: A pseudo instruction for controlling a delay for a designated time. The operand n of “WAITn” designates a delay time. For example, in the case of step S6, the delay for four instructions is controlled.
[0047]
Step S7: An unpack instruction for instructing unpack processing. In accordance with this instruction, the unpack circuit shown in FIG. 2 reads data of 3 bits from the bit stream buffer memory 100 and inputs it to the general-purpose register R0.
[0048]
Step S8: This instruction is stored in the memory address designated by the general-purpose register R1 obtained by pre-incrementing the contents of the general-purpose register R0. Here, since the data read from the bitstream by the unpack instruction is stored in the general-purpose register R0, this data is written to the memory address designated by the general-purpose register R1.
[0049]
Step S9: The delay for the designated time is controlled.
[0050]
By the processing instructed in steps S8, S9, and S10, for example, in the example shown in FIG. 4, the most significant 3 bits of the bit stream stored in the bit stream buffer memory 100 are read. That is, the data 0x0001 is read out to the general purpose register R0 and further stored in the memory address designated by the general purpose register R1.
[0051]
Step S10: An unpack instruction for instructing unpack processing. In accordance with this instruction, 1-bit data is read from the bit stream buffer memory 100 and stored in the general-purpose register R0.
[0052]
Step S11: The unpacked data read to the general register R0 is stored in the memory address designated by the general register R1.
[0053]
Step S12: The delay for the designated time is controlled.
[0054]
In the example shown in FIG. 4, the fourth bit data from the most significant bit is read from the bit stream stored in the bit stream buffer memory 100 in the example shown in FIG. 4 by the processing instructed in steps S10, S11, and S12. That is, data 0x0000 is read out to the general purpose register R0 and further stored in the memory address designated by the general purpose register R1. Note that, since the contents of the general-purpose register R1 are incremented each time writing is performed, the data read to the general-purpose register R0 by the unpacking process is sequentially written to a predetermined area of the memory.
[0055]
Step S13: An unpack instruction for instructing unpack processing. In accordance with this instruction, 4-bit data is read from the bit stream buffer memory 100 and stored in the general-purpose register R0.
[0056]
Step S14: The unpacked data read to the general register R0 is stored in the memory address designated by the general register R1.
[0057]
Step S15: The delay for the designated time is controlled.
[0058]
In the example shown in FIG. 4, 4-bit data is read from the 5th bit from the most significant bit in the bitstream stored in the bitstream buffer memory 100 by the processing instructed in steps S13, S14, and S15. . That is, the data 0x0007 is read out to the general purpose register R0 and further stored in the memory address designated by the general purpose register R1.
Through the processing so far, 8-bit data is read from the bit stream buffer memory 100, and three data 0x0001, 0x0000, and 0x0007 are sequentially written in a predetermined area of the memory.
[0059]
The reading from the bit stream buffer memory 100 and the writing to the memory are repeatedly performed.
Through the processing in steps S16, S17, and S18, the fourth data 0x0000 is read from the bit stream buffer memory 100 and stored in the memory address designated by the general-purpose register R1.
Through the processing in steps S19, S20, and S21, the fifth data 0x0006 is read from the bit stream buffer memory 100 and stored in the memory address designated by the general-purpose register R1.
[0060]
Through the processing in steps S22, S23, and S24, the sixth data 0x0014 is read from the bit stream buffer memory 100 and stored in the memory address designated by the general-purpose register R1.
Through the processing in steps S25, S26, and S27, the seventh data 0x0000 is read from the bit stream buffer memory 100 and stored in the memory address designated by the general-purpose register R1.
Through the processing in steps S28, S29, and S30, the eighth data 0x000c is read from the bit stream buffer memory 100 and stored in the memory address designated by the general-purpose register R1.
[0061]
By the above-described unpacking process, the bit stream stored in the bit stream buffer memory 100 shown in FIG. 4 is sequentially read out with a predetermined number of bits and written in the designated memory area. Note that the number of read bits in the unpacking process can be acquired from header information transmitted at the head of the bitstream.
[0062]
On the other hand, when performing CRC calculation simultaneously with reading in bit units, CRC calculation is performed on the data read from the bit stream buffer memory 100 by using a dedicated extension instruction for instructing CRC calculation. It can be stored at the specified memory address. In this case, the read data is input to the CRC register 240 shown in FIG. 2, CRC processing is performed according to the generator polynomial G (x), and the processing result is stored in a designated area of the memory.
[0063]
By executing the above-described CRC extension instruction, unpacking processing for reading a predetermined number of bits from the bitstream and CRC calculation for the read data can be executed simultaneously. As shown in FIG. 2, since the CRC operation is executed by dedicated hardware (CRC register 240) provided in the DSP, a dedicated extension instruction is executed without increasing the load on the DSP. Only with this, unpacking and CRC calculation can be realized simultaneously.
[0064]
In addition to the extension instruction described above, data is read from the shift register, but an extension instruction that does not discard data from the shift register can be added along with the reading. For example, assume that UPKNR is added as such an extended instruction. When UPKNR is executed, data is read in the same manner as the unpacked extension instruction UPK described above. However, in the case of UPKNR, addition to the bit counter and shift operation are not performed, so the data stored in the shift register does not change.
By adding such an extension instruction, it is possible to steal data to be decoded from the bitstream buffer memory, and the seen data can be used for the next process without being discarded as used data. .
[0065]
As described above, according to the processor of the present embodiment and the decoding device using the processor, unpacking processing for reading a predetermined number of bits from the bitstream can be realized by a dedicated circuit and an extension instruction added to the processor. Also, CRC processing can be performed on the unpacked processing results using a dedicated processing circuit, so unpacking and CRC processing can be performed simultaneously by executing only one extended instruction, and the number of instructions executed by the processor is reduced. In addition, the processing load on the processor can be reduced and high-speed processing can be realized.
[0066]
【The invention's effect】
As described above, according to the processor of the present invention and the decoding device using the processor, a relatively simple circuit is added to the hardware originally possessed by the processor, and the added hardware processing function By adding an extension instruction for controlling the number of bits, it is possible to realize this by simply executing an extension instruction for unpacking processing that cuts out a specified number of bits of data from the bitstream while suppressing an increase in circuit scale. As a result, the number of instructions executed by the processor for the unpacking process can be reduced, the processing load on the processor can be reduced, and the operation frequency and power consumption can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a decoding apparatus according to the present invention.
FIG. 2 is a block diagram illustrating an internal configuration of a processor.
FIG. 3 is a circuit diagram showing a configuration of a CRC register.
FIG. 4 is a diagram illustrating an example of data stored in a bitstream buffer memory.
FIG. 5 is a diagram illustrating an example of a program for unpacking processing;
FIG. 6 is a flowchart of unpacking processing by a normal DSP processing instruction.
[Explanation of symbols]
100: Bitstream buffer memory,
200 ... processor,
210 ... control circuit, 220 ... buffer register,
230 ... barrel register, 240 ... CRC register.

Claims (6)

入力されるビットストリームから指定されたビット数を読み出す動作命令を有するプロセッサであって、
上記ビットストリームを保持するビットストリームバッファメモリと
上記動作命令によって上記ビットストリームバッファメモリに保持された上記ビットストリームを、上記プロセッサのアンパック処理を制御する拡張命令により指定された1から16ビットの指定のデータに分割し、当該分割されたビット数を単位として該ビット数の単位に対する指定の時間分の遅延ごとに順次読み出す制御手段と、
上記制御手段の制御により、上記ビットストリームバッファメモリから上記ビット数の単位のデータを受け取り記憶し、該データを読み出して後段に接続されたバレルシフタに渡すために、上記プロセッサのデータアンパックの要求により読み出し無効なデータを廃棄して位置調整を行う、バッファレジスタ
を有するプロセッサ。
A processor having an operation instruction for reading a specified number of bits from an input bit stream,
A bit stream buffer memory for holding the bit stream ;
The bit stream held in the bit stream buffer memory by the operation instruction is divided into designated data of 1 to 16 bits designated by the extension instruction that controls the unpack processing of the processor, and the number of divided bits Control means for sequentially reading for each delay of a specified time with respect to the unit of the number of bits in units of
Under the control of the control means, the data in the unit of the number of bits is received from the bit stream buffer memory, stored, read in response to a request for data unpacking of the processor in order to read the data and pass it to the barrel shifter connected to the subsequent stage. A processor having a buffer register that discards invalid data and performs positioning .
上記制御手段は、上記読み出しのビット数に応じて、次回読み出しの位置を示すポイントを更新する
請求項1記載のプロセッサ。
The processor according to claim 1, wherein the control unit updates a point indicating a next read position according to the number of read bits.
上記バッファレジスタから上記読み出したデータに対して、上記データの廃棄時にCRC(Cyclic Redundancy Check:巡回冗長検査)演算を行うCRC演算手段を
さらに有する請求項1記載のプロセッサ。
The processor according to claim 1, further comprising CRC calculation means for performing a CRC (Cyclic Redundancy Check) operation on the data read from the buffer register when the data is discarded .
入力されるビットストリームから指定されたビット数を読み出す動作命令を有する復号装置であって、
上記ビットストリームを保持するビットストリームバッファメモリと
上記動作命令によって上記ビットストリームバッファメモリに保持された上記ビットストリームを、上記プロセッサのアンパック処理を制御する拡張命令により指定された1から16ビットの指定のデータに分割し、当該分割されたビット数を単位として該ビット数の単位に対する指定の時間分の遅延ごとに順次読み出す制御手段と、
上記制御手段の制御により、上記ビットストリームバッファメモリから上記ビット数の単位のデータを受け取り記憶し、該データを読み出して後段に接続されたバレルシフタに渡すために、上記プロセッサのデータアンパックの要求により読み出し無効なデータを廃棄して位置調整を行う、バッファレジスタ
を有する復号装置。
A decoding device having an operation instruction for reading a specified number of bits from an input bitstream,
A bit stream buffer memory for holding the bit stream ;
The bit stream held in the bit stream buffer memory by the operation instruction is divided into designated data of 1 to 16 bits designated by the extension instruction that controls the unpack processing of the processor, and the number of divided bits Control means for sequentially reading for each delay of a specified time with respect to the unit of the number of bits in units of
Under the control of the control means, the data in the unit of the number of bits is received from the bit stream buffer memory, stored, read in response to a request for data unpacking of the processor in order to read the data and pass it to the barrel shifter connected to the subsequent stage. A decoding device comprising: a buffer register that performs position adjustment by discarding invalid data .
上記制御手段は、上記読み出しのビット数に応じて、次回読み出しの位置を示すポイントを更新する
請求項4記載の復号装置。
The decoding device according to claim 4, wherein the control means updates a point indicating a position of the next reading according to the number of bits of the reading.
上記バッファレジスタから上記読み出したデータに対して、上記データの廃棄時にCRC(Cyclic Redundancy Check:巡回冗長検査)演算を行うCRC演算手段を
さらに有する請求項4記載の復号装置。
5. The decoding device according to claim 4, further comprising CRC calculation means for performing a CRC (Cyclic Redundancy Check) operation on the data read from the buffer register when the data is discarded .
JP2000247960A 2000-08-10 2000-08-10 Processor and decoding apparatus using the same Expired - Fee Related JP4534320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000247960A JP4534320B2 (en) 2000-08-10 2000-08-10 Processor and decoding apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000247960A JP4534320B2 (en) 2000-08-10 2000-08-10 Processor and decoding apparatus using the same

Publications (2)

Publication Number Publication Date
JP2002057587A JP2002057587A (en) 2002-02-22
JP4534320B2 true JP4534320B2 (en) 2010-09-01

Family

ID=18737954

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000247960A Expired - Fee Related JP4534320B2 (en) 2000-08-10 2000-08-10 Processor and decoding apparatus using the same

Country Status (1)

Country Link
JP (1) JP4534320B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005024636A1 (en) * 2003-09-04 2005-03-17 Hitachi Ulsi Systems Co., Ltd. Semiconductor device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2096584A1 (en) * 1992-05-28 1993-11-29 Frank H. Liao Variable length code decoder for video decompression operations
JPH09307456A (en) * 1996-05-09 1997-11-28 Matsushita Electric Ind Co Ltd Variable length encoding and decoding device and method
US6263420B1 (en) * 1997-09-17 2001-07-17 Sony Corporation Digital signal processor particularly suited for decoding digital audio
JP2000207205A (en) * 1999-01-14 2000-07-28 Sony Corp Arithmetic unit

Also Published As

Publication number Publication date
JP2002057587A (en) 2002-02-22

Similar Documents

Publication Publication Date Title
US7130952B2 (en) Data transmit method and data transmit apparatus
US8682680B2 (en) Methods and apparatuses for bit stream decoding in MP3 decoder
US5874908A (en) Method and apparatus for encoding Lempel-Ziv 1 variants
US20080022078A1 (en) System and method for efficiently performing bit-field extraction and bit-field combination operations in a processor
US7590832B2 (en) Information processing device, compressed program producing method, and information processing system
WO2002086894A1 (en) Trick play for mp3
US6844834B2 (en) Processor, encoder, decoder, and electronic apparatus
US20030038736A1 (en) Variable length coding packing architecture
JP4534320B2 (en) Processor and decoding apparatus using the same
US7480489B2 (en) Wireless device having a distinct hardware accelerator to support data compression protocols dedicated to GSM (V.42)
KR100509009B1 (en) A fifo write/lifo read trace buffer with software and hardware loop compression
WO2002086896A1 (en) Method and apparatus for editing data streams
US7075462B2 (en) Speeding up variable length code decoding on general purpose processors
JPH10190476A (en) Data compression method and device for the method
JP3197408B2 (en) Additional bit processing device for marker identification
KR100944923B1 (en) Method and apparatus for improved multimedia decoder
KR100437674B1 (en) Apparatus for control of Pulse Code Modulation data and method for control thereof
KR100192448B1 (en) Data processor of receiver for digital audio broadcasting
JP3054787B2 (en) Variable length code decoding device
JPH0918355A (en) Crc arithmetic unit for variable length data
JP2002063152A (en) Processor and data processing method therefor
JP3088785B2 (en) Variable length code decoding device
KR100246642B1 (en) Deformatting and variable length decoding device of a digital vcr
JP3512347B2 (en) Digital data encoding method and decoding method
JP2002262287A (en) Information processing method and information processor and storage medium therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090630

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090828

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100607

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

Free format text: PAYMENT UNTIL: 20130625

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees