JP2009053948A - Semiconductor integrated circuit device and data transfer method using the same - Google Patents
Semiconductor integrated circuit device and data transfer method using the same Download PDFInfo
- Publication number
- JP2009053948A JP2009053948A JP2007220279A JP2007220279A JP2009053948A JP 2009053948 A JP2009053948 A JP 2009053948A JP 2007220279 A JP2007220279 A JP 2007220279A JP 2007220279 A JP2007220279 A JP 2007220279A JP 2009053948 A JP2009053948 A JP 2009053948A
- Authority
- JP
- Japan
- Prior art keywords
- data
- decompression
- compressed
- block
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Bus Control (AREA)
Abstract
【課題】圧縮情報の解凍処理をDMAコントローラで行うことで、プログラム及びデータの張り替えシーケンスを簡略化できる。
【解決手段】半導体集積回路装置は、CPU10と、圧縮データを有する第1のメモリ30と、圧縮データの解凍データが転送される第2のメモリ20と、圧縮データを解凍して解凍データを生成する解凍コントローラ51を備え、解凍データを第2のメモリへCPUを介さずに転送するDMAコントローラ40とを具備する。
【選択図】 図1By performing a decompression process of compressed information with a DMA controller, a program and data replacement sequence can be simplified.
A semiconductor integrated circuit device includes a CPU, a first memory having compressed data, a second memory to which decompressed data of the compressed data is transferred, and decompressed compressed data to generate decompressed data. And a DMA controller 40 for transferring the decompressed data to the second memory without going through the CPU.
[Selection] Figure 1
Description
本発明は、解凍機能を有するDMA(Direct Memory Access)コントローラを備えた半導体集積回路装置及びこれを用いたデータ転送方法に関する。 The present invention relates to a semiconductor integrated circuit device including a DMA (Direct Memory Access) controller having a decompression function and a data transfer method using the same.
フラッシュROMやSDRAM等の配置メモリに配置されたプログラムやデータを実行メモリに転送して、高速で処理を実行する場合、DMAコントローラ(DMAC)等のデータ転送コントローラによって実行メモリへのデータ転送を実施する(例えば特許文献1参照)。この場合、配置メモリ上ではプログラムやデータ処理を行わないため、配置メモリにそのままのデータを置くことはメモリ資源の無駄使いとなる。このため、配置メモリには、可逆圧縮を施したプログラム及びデータを配置することがある。 When a program or data placed in a placement memory such as a flash ROM or SDRAM is transferred to an execution memory to execute processing at a high speed, the data is transferred to the execution memory by a data transfer controller such as a DMA controller (DMAC). (For example, refer to Patent Document 1). In this case, since no program or data processing is performed on the arrangement memory, it is a wasteful use of memory resources to place the data as it is in the arrangement memory. For this reason, a program and data subjected to lossless compression may be arranged in the arrangement memory.
データ転送に使用している従来のDMACは、解凍機能を備えていない。このため、配置メモリに圧縮されたプログラムや圧縮されたデータを配置する手法をとる場合には、F/W(firmware)にて解凍処理を実施する必要があり、プログラム及びデータの張り替えシーケンスが複雑になってしまい、処理の負荷が重くなる。また、プログラム動作中にF/Wの張り替えが発生する場合には、張り替え時間に要する時間を極力抑える必要がある。また、解凍用のF/Wは圧縮できないため、メモリ資源の無駄使いにもつながる。
本発明は、圧縮情報の解凍処理をDMAコントローラで行うことで、プログラム及びデータの張り替えシーケンスを簡略化できる半導体集積回路装置及びこれを用いたデータ転送方法を提供する。 The present invention provides a semiconductor integrated circuit device and a data transfer method using the same, which can simplify a program and data replacement sequence by performing decompression processing of compressed information with a DMA controller.
本発明の第1の態様による半導体集積回路装置は、CPUと、圧縮データを有する第1のメモリと、前記圧縮データの解凍データが転送される第2のメモリと、前記圧縮データを解凍して前記解凍データを生成する解凍コントローラを備え、前記解凍データを前記第2のメモリへ前記CPUを介さずに転送するDMAコントローラとを具備する。 A semiconductor integrated circuit device according to a first aspect of the present invention includes a CPU, a first memory having compressed data, a second memory to which decompressed data of the compressed data is transferred, and decompressing the compressed data A decompression controller for generating the decompressed data, and a DMA controller for transferring the decompressed data to the second memory without passing through the CPU.
本発明の第2の態様によるデータ転送方法は、第1のメモリからDMAコントローラに対象データが転送されるステップと、前記対象データが圧縮データであるか否かを判断するステップと、前記対象データが前記圧縮データである場合は前記圧縮データを前記DMAコントローラで解凍し、解凍データを生成するステップと、前記解凍データを第2のメモリに転送するステップと、前記解凍データの転送が完了した時点で、前記DMAコントローラがCPUに完了割り込みを入れるステップとを具備する。 A data transfer method according to a second aspect of the present invention includes a step of transferring target data from a first memory to a DMA controller, a step of determining whether the target data is compressed data, and the target data If the compressed data is the compressed data, the compressed data is decompressed by the DMA controller, the decompressed data is generated, the decompressed data is transferred to the second memory, and the decompressed data transfer is completed. And the DMA controller provides a completion interrupt to the CPU.
本発明によれば、圧縮情報の解凍処理をDMAコントローラで行うことで、プログラム及びデータの張り替えシーケンスを簡略化できる半導体集積回路装置及びこれを用いたデータ転送方法を提供できる。 According to the present invention, it is possible to provide a semiconductor integrated circuit device capable of simplifying a program and data replacement sequence by performing decompression processing of compressed information with a DMA controller, and a data transfer method using the same.
本発明の実施の形態を以下に図面を参照して説明する。この説明に際し、全図にわたり、共通する部分には共通する参照符号を付す。 Embodiments of the present invention will be described below with reference to the drawings. In the description, common parts are denoted by common reference symbols throughout the drawings.
[1]半導体集積回路装置の構成
図1は、本発明の一実施形態に係る半導体集積回路装置の構成図を示す。以下に、本発明の一実施形態に係る半導体集積回路装置の概略的な構成について説明する。
[1] Configuration of Semiconductor Integrated Circuit Device FIG. 1 is a configuration diagram of a semiconductor integrated circuit device according to an embodiment of the present invention. The schematic configuration of a semiconductor integrated circuit device according to an embodiment of the present invention will be described below.
図1に示すように、半導体集積回路装置1は、CPU(Central Processing Unit)10、実行メモリ20、配置メモリ30、DMAコントローラ(DMAC)40を備えている。
As shown in FIG. 1, the semiconductor integrated
CPU10は、例えば実行メモリ20等に保持されたプログラムを用いて各種の演算処理を行い、半導体集積回路装置1内の各ブロック(例えばDMAコントローラ40)の動作を制御する。
The
実行メモリ20は、内部メモリ等で構成される。配置メモリ30は、フラッシュROMやSDRAM等で構成される。この配置メモリ30には、可逆圧縮されたプログラム及びデータが配置されている。配置メモリ30内のプログラム及びデータは、DMAコントローラ40を介して実行メモリ20に転送される。
The
DMAコントローラ40は、コントローラ部50とレジスタ部60とを有する。コントローラ部50は、解凍コントローラ51、スイッチSW1、SW2を備えている。スイッチSW1は、解凍コントローラ51を介しない場合はa端子側に接続し、解凍コントローラ51を介する場合はb端子側に接続する。スイッチSW2は、解凍後のサイズの計算のみで転送は行わない場合はOFFにし、解凍転送を実施する場合はONにする。スイッチSW1、SW2の制御は、CPU10によって行われる。レジスタ部60は、ディスティネーションサイズレジスタ61、ソースサイズレジスタ62、ディスティネーションアドレスレジスタ63、ソースアドレスレジスタ64、コントロールレジスタ65、アクティブレジスタ66を備えている。ディスティネーションサイズレジスタ61及びディスティネーションアドレスレジスタ63は、転送先(解凍後)のサイズ及びアドレスが設定される。ソースサイズレジスタ62及びソースアドレスレジスタ64は、転送元のサイズ及びアドレスが設定される。コントロールレジスタ65は、「通常DMA」及び「解凍DMA」のいずれかを選択するスイッチ、「解凍サイズ出力」及び「解凍転送」のいずれかを選択するスイッチを有している。アクティブレジスタ66は、コントロールレジスタ65で選択された処理を制御する。
The
[2]解凍コントローラの構成
図2は、本発明の一実施形態に係る解凍コントローラの構成図を示す。以下に、本発明の一実施形態に係る解凍コントローラの概略的な全体構成について説明する。
[2] Configuration of Decompression Controller FIG. 2 is a configuration diagram of the decompression controller according to an embodiment of the present invention. The schematic overall configuration of the decompression controller according to one embodiment of the present invention will be described below.
図2に示すように、解凍コントローラ51は、パーサー52、非圧縮ブロック53、ランレングス圧縮ブロック54、ハフマン符号圧縮ブロック55、スイッチSW3、SW4を備えている。
As shown in FIG. 2, the
パーサー52は、モード選択機能を有している。このモード選択機能により、現状のブロックデータの圧縮形式(ランレングス圧縮/ハフマン符号圧縮/非圧縮)に基づき、スイッチSW3、SW4により非圧縮ブロック53、ランレングス圧縮ブロック54、ハフマン符号圧縮ブロック55の切り替えを行う。
The parser 52 has a mode selection function. With this mode selection function, based on the current block data compression format (run-length compression / Huffman code compression / non-compression), the switches SW3 and SW4 switch the
非圧縮ブロック53が選択された場合は、非圧縮データを解凍コントローラ51からそのまま出力する。
When the
ランレングス圧縮ブロック54が選択された場合は、ランレングス復号化装置56が選択される。このランレングス復号化装置56によりランレングス圧縮されたデータが解凍され、解凍データが解凍コントローラ51から出力される。
When the run
ハフマン符号圧縮ブロック55が選択された場合は、ハフマン符号復号化装置57が選択される。このハフマン符号復号化装置57によりハフマン符号圧縮されたデータが解凍され、解凍データが解凍コントローラ51から出力される。
When the Huffman
尚、本実施形態では、圧縮ブロックとしてランレングス圧縮ブロック54とハフマン符号圧縮ブロック55の2種類を設けているが、他の圧縮方法を用いたブロックを用いてもよい。
In this embodiment, two types of compression blocks, the run
[3]圧縮データフォーマット
図3は、本発明の一実施形態に係る圧縮データのフォーマットを示す。以下に、本発明の一実施形態のDMAコントローラで扱うデータのフォーマットについて説明する。
[3] Compressed Data Format FIG. 3 shows a compressed data format according to an embodiment of the present invention. The data format handled by the DMA controller according to the embodiment of the present invention will be described below.
圧縮データ全体のフォーマット100は、複数のブロックN(N=1、2、…)を有し、これら全体のブロック数101と解凍後のサイズ102が示されている。各ブロックは、例えば、非圧縮ブロックフォーマット70、ランレングス圧縮ブロックフォーマット80、ハフマン符号圧縮ブロックフォーマット90のうちいずれかで構成されている。
The
非圧縮ブロックフォーマット70は、モード選択71、ブロックサイズ72、非圧縮データ73で構成される。ここで、モード選択71とブロックサイズ72とにより、ブロックヘッダが構成される。
The uncompressed block format 70 includes a mode selection 71, a
ランレングス圧縮ブロックフォーマット80は、モード選択81、ブロックサイズ82、リピート数83、リピートデータ84で構成される。ここで、モード選択81とブロックサイズ82とにより、ブロックヘッダが構成される。リピート数83は、出力を繰り返す回数である。リピートデータ84は、出力するデータである。
The run-length
ハフマン符号圧縮ブロックフォーマット90は、モード選択91、ブロックサイズ92、復号テーブル93、圧縮データ94で構成される。ここで、モード選択91とブロックサイズ92とにより、ブロックヘッダが構成される。復号テーブル93は、データパターンの出現頻度が高い順に並んでおり、出現頻度の高いパターンに短い符号長のハフマン符号が割り当てられるように設定されている。この復号テーブル93の割り当ては、圧縮ブロックフォーマット側で可変である。
The Huffman code
このように、本実施形態では、シンプルなH/W(hardware)構成にて伸張を実現するため、図3に示すようなデータフォーマットとなる。0x00のような固定データが繰り返されランレングスによる圧縮が有効な領域に対してはランレングス圧縮ブロックフォーマット80となり、ハフマン符号による圧縮が有効な領域についてはハフマン符号圧縮ブロックフォーマット90となる。どちらのブロック80、90でも圧縮率が悪くなるような領域については、圧縮を行わず、非圧縮ブロックフォーマット70となる。
Thus, in this embodiment, in order to implement decompression with a simple H / W (hardware) configuration, the data format is as shown in FIG. The fixed-length data such as 0x00 is repeated, and the run-length
[4]CPUの処理フロー
図4は、本発明の一実施形態に係るCPU側の処理のフロー図を示す。以下に、本発明の一実施形態に係るホストCPU側の処理フローについて説明する。
[4] Processing Flow of CPU FIG. 4 is a flowchart of processing on the CPU side according to an embodiment of the present invention. The processing flow on the host CPU side according to an embodiment of the present invention will be described below.
まず、CPU10により、ソースアドレスレジスタ64及びディスティネーションアドレスレジスタ63に転送元のアドレス及び転送先のアドレスが設定される(ST1−1)。そして、現状のデータが圧縮データであるか否かが判断される(ST1−2)。
First, the
その結果、現状のデータが圧縮データでない場合は、解凍用のスイッチSW2をOFFにする(ST1−3)。そして、ソースサイズレジスタ62及びディスティネーションサイズレジスタ61に転送元のサイズ及び転送先のサイズが設定される(ST1−4)。その後、コントロールレジスタ65で「通常DMA」を選択し(ST1−5)、アクティブレジスタ66をONに設定する(ST1−13)。これにより、通常DMAが実行され、実行メモリ20へデータ転送が行われる。
As a result, if the current data is not compressed data, the decompression switch SW2 is turned OFF (ST1-3). Then, the size of the transfer source and the size of the transfer destination are set in the
一方、現状のデータが圧縮データである場合は、転送前に解凍後のサイズを知る必要があるか否かを判断する(ST1−6)。F/Wが転送先の領域に対しての動的な確保を行う等の理由により、解凍後のサイズを知る必要がある場合、コントロールレジスタ65で「解凍サイズ出力」及び「解凍DMA」を選択する(ST1−7)。そして、アクティブレジスタ66をONに設定する(ST1−8)。これにより、データ出力を行わずに解凍後のサイズのみをディスティネーションサイズレジスタ61に出力することで、ユーザーは解凍後のサイズを知ることができる。そして、解凍サイズ出力が完了した時点で、DMAコントローラ40はCPU10に完了割り込みを入れる。このため、完了割り込みが発生しない場合は完了割り込み待ちを行い(ST1−9、ST1−10)、完了割り込みが発生した場合は解凍後のサイズをチェックする(ST1−11)。
On the other hand, if the current data is compressed data, it is determined whether it is necessary to know the size after decompression before transfer (ST1-6). When it is necessary to know the size after decompression, for example, because the F / W dynamically secures the transfer destination area, select “Decompression size output” and “Decompression DMA” in the control register 65 (ST1-7). Then, the
次に、F/Wは転送先として確保が必要な領域を確保した後、ディスティネーションアドレスレジスタ63に転送先のレジスタが設定され、コントロールレジスタ65で「解凍転送」及び「解凍DMA」を選択する(ST1−12)。尚、解凍後のサイズを知る必要がない場合、上述するステップST1−7からST1−11までが省略され、このステップST1−12へと続く。
Next, the F / W secures an area that needs to be secured as a transfer destination, the transfer destination register is set in the
次に、アクティブレジスタ66をONに設定する(ST1−13)。これにより、解凍及びDMA転送が実行され、解凍データが実行メモリ20へ転送される。この転送が完了した時点で、DMAコントローラ40はCPU10に完了割り込みを入れる。このため、完了割り込みが発生しない場合は完了割り込み待ちを行い(ST1−14、ST1−15)、完了割り込みが発生した場合は終了となる。
Next, the
[5]解凍コントローラの処理フロー
図5は、本発明の一実施形態に係る解凍コントローラの処理のフロー図を示す。以下に、本発明の一実施形態に係る解凍コントローラの処理フローについて説明する。このフローは、主に、図4のステップST1−12、ST1−13の解凍処理を実行するステップに相当する。
[5] Processing Flow of Decompression Controller FIG. 5 is a flowchart of processing of the decompression controller according to an embodiment of the present invention. The processing flow of the decompression controller according to one embodiment of the present invention will be described below. This flow mainly corresponds to the step of executing the decompression process of steps ST1-12 and ST1-13 in FIG.
まず、解凍コントローラ51に対する処理は、解凍後サイズの出力とデータ解凍とがある。そこで、解凍後サイズの出力であるか否かを判断する(ST2−1)。その結果、解凍後サイズの出力である場合は、コントロールレジスタ65で「解凍サイズ出力」及び「解凍DMA」を選択し、アクティブレジスタ66をONに設定する。これにより、解凍後のサイズをディスティネーションサイズレジスタ61に出力する(ST2−2)。その後、アクティブレジスタ66をOFFにし(ST2−26)、CPU10に完了割り込みを入れる(ST2−27)。このようにして、解凍コントローラ40の解凍後サイズの出力の処理フローが終了する。
First, processing for the
一方、解凍コントローラ51に対する処理がデータ解凍である場合、まず、現状のデータのトータルブロック数101を取り込む(ST2−3)。このトータルブロック数101をもとに残りのブロック数のカウントを始める(ST2−4)。そして、パーサー52により、ブロック1についてモード選択を取り込み(ST2−5)、非圧縮ブロック53、ランレングス圧縮ブロック54、ハフマン符号圧縮ブロック55の3つのいずれのモードであるかが判断される(ST2−6)。
On the other hand, if the processing for the
非圧縮ブロック53が選択された場合、次のように処理が行われる。まず、ブロックサイズ72を取り込み(ST2−7)、残りのブロックサイズのカウントを始める(ST2−8)。そして、データ転送を行う(ST2−9)。その後、ソースアドレスレジスタ64及びディスティネーションアドレスレジスタ63の転送元アドレス及び転送先アドレスをインクリメントし(ST2−10)、残りのブロックサイズ72のデクリメントを行う(ST2−11)。これらのフローを、残りのブロックサイズ72が無くなるまで繰り返す。
When the
ランレングス圧縮ブロック54が選択された場合、次のように処理が行われる。まず、ブロックサイズ82を取り込み(ST2−12)、残りのブロックサイズのカウントを始める(ST2−13)。そして、リピートデータを出力する(ST2−14)。その後、ディスティネーションアドレスレジスタ63の転送先アドレスをインクリメントし(ST2−15)、残りのブロックサイズ82のデクリメントを行う(ST2−16)。これらのフローを、残りのブロックサイズ82が無くなるまで繰り返す。
When the run-
ハフマン符号圧縮ブロック55が選択された場合、次のように処理が行われる。まず、ブロックサイズ(入力ビット数)92を取り込み(ST2−17)、復号テーブル93の値を復号結果レジスタに設定する(ST2−18)。そして、残りのブロックサイズ(入力ビット数)92のカウントを始める(ST2−19)。ハフマン符号復号化装置57に1ビットずつ入力し、復号が完了するまで繰り返し(ST2−20、ST2−21)、復号結果を出力する(ST2−22)。その後、ディスティネーションアドレスレジスタ63の転送先アドレスをインクリメントし(ST2−23)、残りのブロックサイズ92のデクリメントを行う(ST2−24)。これらのフローを、残りのブロックサイズ92が無くなるまで繰り返す。
When the Huffman
非圧縮ブロック53、ランレングス圧縮ブロック54、ハフマン符号圧縮ブロック55の3つのいずれのモードにおいても、残りのブロックサイズ72、82、92が無くなった場合、残りのブロック数101をデクリメントし(ST2−25)、次のブロックのモード選択が行われる(ST2−5)。
In any of the three modes of the
残りのブロック数101が無くなった場合、アクティブレジスタ66をOFFにし(ST2−26)、CPU10に完了割り込みを入れる(ST2−27)。このようにして、解凍コントローラ40のデータ解凍の処理フローが終了する。
When there is no remaining
[6]圧縮/解凍
本実施形態では、解凍コントローラ51のデコード装置において、ランレングス方式とハフマン符号方式を用いている。
[6] Compression / decompression In this embodiment, the decoding device of the
[6−1]ランレングス方式
(圧縮)
図6は、本発明の一実施形態に係るランレングス方式による圧縮を説明するための図を示す。以下に、ランレングス方式によるデータ圧縮についての概略を説明する。
[6-1] Run length method (compression)
FIG. 6 is a diagram for explaining compression by the run-length method according to an embodiment of the present invention. Below, the outline about the data compression by a run length system is demonstrated.
ランレングスによるデータ圧縮方式は、あるビットパターンが続く場合に、その繰り返されるデータパターンと繰り返し回数との情報に変換することで、データを圧縮する。解凍の際には、繰り返すべきデータパターンを繰り返し回数だけ出力することで、圧縮データを伸長できる。 In the data compression method by run length, when a certain bit pattern continues, the data is compressed by converting into information of the repeated data pattern and the number of repetitions. At the time of decompression, the compressed data can be expanded by outputting the data pattern to be repeated as many times as the number of repetitions.
例えば、図6に示すように、プログラムコードにおいて、0x00が100バイト繰り返されるような領域が存在する場合、繰り返し回数を100、繰り返しデータを00と変換することで、2バイトに圧縮できる。従って、プログラムコードにおいてあるデータパターンが繰り返されるような領域が存在する場合には、ランレングスによる圧縮が有効となる。 For example, as shown in FIG. 6, in the program code, if there is an area where 0x00 is repeated 100 bytes, the repetition count can be compressed to 2 bytes by converting the repetition count to 100 and repeating data to 00. Therefore, when there is an area where a certain data pattern is repeated in the program code, compression by run length is effective.
(解凍)
図7は、本発明の一実施形態に係るランレングス方式による解凍を説明するための図を示す。以下に、ランレングス方式によるデータ解凍について説明する。
(Thawing)
FIG. 7 is a diagram for explaining decompression by the run-length method according to an embodiment of the present invention. The data decompression by the run length method will be described below.
図7に示すように、ランレングス復号化装置56は、アウトプットカウンタ56a、アウトプットデータ56bを備えている。アウトプットカウンタ56aは、ランレングス圧縮ブロックフォーマット80のリピート数83をカウントする。アウトプットデータ56bは、ランレングス圧縮ブロックフォーマット80のリピートデータ84を認識する。
As shown in FIG. 7, the run-
例えば、リピート数83を100、リピートデータ84を0x00とする。このような場合、ランレングス復号化装置56において、圧縮データのリピート数83をアウトプットカウンタ56aで認識し、圧縮データのリピートデータ84をアウトプットデータ56bで認識する。そして、リピート回数分だけアウトプットデータを繰り返し出力する。すなわち、本例の場合、0x00を100回出力する。これにより、ランレングス復号化装置56にて、ランレングス圧縮データが解凍される。
For example, the
[6−2]ハフマン符号方式
図8は、本発明の一実施形態に係るハフマン符号方式による圧縮を説明するための図を示す。以下に、ハフマン符号方式によるデータ圧縮についての概略を説明する。
[6-2] Huffman Code Method FIG. 8 is a diagram for explaining compression by the Huffman code method according to an embodiment of the present invention. Below, the outline about the data compression by a Huffman code system is demonstrated.
(圧縮)
ハフマン符号によるデータ圧縮方式は、プログラムコードのバイナリデータにおいて、データパターン毎の出現回数を計算し、出現頻度が最も高いパターンに符号長の短いハフマン符号を割り当て、出現頻度の低いパターンに符号長の長いハフマン符号を割り当てることで、データを圧縮する。
(compression)
The data compression method using the Huffman code calculates the number of appearances for each data pattern in the binary data of the program code, assigns a Huffman code with a short code length to the pattern with the highest appearance frequency, and assigns the code length to the pattern with a low appearance frequency. Data is compressed by assigning a long Huffman code.
例えば、図8に示すように、33ビットの“uncompress data”を圧縮する場合、4ビット(0x0〜0xF)毎の出現頻度を見ると、プログラムコードのバイナリデータの各パターンの出現回数は、000(記号A)が6回、001(記号B)が3回、010(記号C)が1回、011(記号D)が0回、100(記号E)が1回となる。このため、出現回数が最も高い記号Aには短い符号長(1ビット)のハフマン符号を割り当て、出現回数の低い記号Dには長い符号長(4ビット)のハフマン符号を割り当てる。これにより、19ビットに圧縮された“compress data”が得られる。 For example, as shown in FIG. 8, when compressing 33-bit “uncompress data”, when the appearance frequency for each 4 bits (0x0 to 0xF) is seen, the number of appearances of each pattern of binary data of the program code is 000 (Symbol A) is 6 times, 001 (Symbol B) is 3 times, 010 (Symbol C) is 1 time, 011 (Symbol D) is 0 times, and 100 (Symbol E) is 1 time. For this reason, a Huffman code having a short code length (1 bit) is assigned to the symbol A having the highest number of appearances, and a Huffman code having a long code length (4 bits) is assigned to the symbol D having the low number of appearances. As a result, “compress data” compressed to 19 bits is obtained.
(解凍)
図9及び図10は、本発明の一実施形態に係るハフマン木回路による解凍を説明するための図を示す。以下に、ハフマン符号方式によるデータ解凍についての概略を説明する。
(Thawing)
9 and 10 are views for explaining decompression by the Huffman tree circuit according to an embodiment of the present invention. The outline of data decompression by the Huffman code method will be described below.
図9に示すように、ハフマン木回路によるデータ解凍では、ハフマン木回路に“compress data”を1ビットずつシリアルで入力していくことにより、圧縮データがデコードされ、もとの“uncompress data”を得ることができる。 As shown in FIG. 9, in the data decompression by the Huffman tree circuit, “compress data” is serially input to the Huffman tree circuit bit by bit to decode the compressed data, and the original “uncompress data” is Obtainable.
図10に示すように、箱がデコード結果レジスタ値となり、箱の中がハフマン符号長を示す。そして、ハフマン符号長が短いレジスタに出現頻度が高い復号値が設定されている。 As shown in FIG. 10, the box is a decoding result register value, and the box indicates the Huffman code length. A decoded value having a high appearance frequency is set in a register having a short Huffman code length.
例えば、4ビット単位のデータがハフマンコードにて符号化されており、4ビット×16(8バイト)の復号テーブル(それぞれ4ビット(0x0〜0xF))93で復号結果となるデータがある。この復号テーブル93は出現頻度が高い順に並んでおり、出現頻度が高いものほどデコード結果レジスタに符号長の短いハフマン符号がセットされることになる。ハフマン符号復号化回路57は、入力符合に従い、分配回路で分配され出力回路に到達した時点でデコード出力レジスタに登録されている4ビットが出力されることで、ハフマン符号のデコードを行う。
For example, data in units of 4 bits is encoded with a Huffman code, and there is data that becomes a decoding result in a decoding table 93 (4 bits (0x0 to 0xF) each) 4 bits × 16 (8 bytes). The decoding tables 93 are arranged in descending order of appearance frequency, and the higher the appearance frequency, the shorter the Huffman code length is set in the decoding result register. The Huffman
尚、このデコード装置で用いるハフマン木については、図9及び図10に示したものは一例であり、このハフマン木に限定せず、圧縮対象となるデータパターンに適したハフマン木を採用することが可能である。 Note that the Huffman tree used in this decoding apparatus is one example shown in FIGS. 9 and 10, and is not limited to this Huffman tree, and a Huffman tree suitable for the data pattern to be compressed may be adopted. Is possible.
[7]効果
上記本発明の一実施形態によれば、DMAコントローラ40が解凍コントローラ51を備えている。これにより、DMAコントローラ40にて、解凍処理を施したデータ転送を行うことができる。従って、従来のようにF/W側で解凍処理を実施する必要がないため、プログラム及びデータの張替えシーケンスが簡略化できる。
[7] Effect According to the embodiment of the present invention, the
また、DMAコントローラ40が解凍コントローラ51を備えることで、解凍用のF/Wを実行メモリ20及び配置メモリ30等に組み込む必要がなくなる。このため、実行メモリ20及び配置メモリ30等において解凍用のF/Wとして使用されていたメモリの容量を削減でき、メモリ資源の有効活用ができる。
Further, since the
また、DMAコントローラ40を用いてCPU10を介さずにデータ転送が可能である。このため、必要であれば、圧縮/解凍及びデータ転送実行中にCPU10側でも他の処理をパラレルで動作させることが可能であり、CPU資源の有効活用ができる。
Further, data transfer is possible without using the
さらに、本実施形態はシンプルなH/W構成にて実装可能であり、DMAコントローラ40を使用するシステム全体の高速化と省電力化が期待できる。
Furthermore, this embodiment can be implemented with a simple H / W configuration, and high speed and low power consumption of the entire system using the
その他、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で、種々に変形することが可能である。さらに、上記実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。 In addition, the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the invention in the implementation stage. Furthermore, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, the problem described in the column of the problem to be solved by the invention can be solved, and the effect described in the column of the effect of the invention Can be obtained as an invention.
1…半導体集積回路装置、10…CPU、20…実行メモリ、30…配置メモリ、40…DMAコントローラ、50…コントローラ部、51…解凍コントローラ、52…パーサー、53…非圧縮ブロック、54…ランレングス圧縮ブロック、55…ハフマン符号圧縮ブロック、56…ランレングス復号化装置、56a…アウトプットカウンタ、56b…アウトプットデータ、57…ハフマン符号復号化装置、60…レジスタ部、61…ディスティネーションサイズレジスタ、62…ソースサイズレジスタ、63…ディスティネーションアドレスレジスタ、64…ソースアドレスレジスタ、65…コントロールレジスタ、66…アクティブレジスタ、70…非圧縮ブロックフォーマット、71…モード選択、72…ブロックサイズ、73…非圧縮データ、80…ランレングス圧縮ブロックフォーマット、81…モード選択、82…ブロックサイズ、83…リピート数、84…リピートデータ、90…ハフマン符号圧縮ブロックフォーマット、91…モード選択、92…ブロックサイズ、93…復号テーブル、94…圧縮データ、100…圧縮データ全体のフォーマット、101…ブロック数、102…解凍後のサイズ、SW1、SW2、SW3、SW4…スイッチ。
DESCRIPTION OF
Claims (5)
圧縮データを有する第1のメモリと、
前記圧縮データの解凍データが転送される第2のメモリと、
前記圧縮データを解凍して前記解凍データを生成する解凍コントローラを備え、前記解凍データを前記第2のメモリへ前記CPUを介さずに転送するDMAコントローラと
を具備することを特徴とする半導体集積回路装置。 CPU,
A first memory having compressed data;
A second memory to which decompressed data of the compressed data is transferred;
A semiconductor integrated circuit comprising: a decompression controller that decompresses the compressed data to generate the decompressed data, and a DMA controller that transfers the decompressed data to the second memory without going through the CPU apparatus.
前記パーサーは、前記圧縮データ内のブロック毎に前記非圧縮ブロック又は前記圧縮ブロックを選択することを特徴とする請求項1に記載の半導体集積回路装置。 The decompression controller has an uncompressed block, a compressed block, and a parser,
The semiconductor integrated circuit device according to claim 1, wherein the parser selects the uncompressed block or the compressed block for each block in the compressed data.
前記対象データが圧縮データであるか否かを判断するステップと、
前記対象データが前記圧縮データである場合は前記圧縮データを前記DMAコントローラで解凍し、解凍データを生成するステップと、
前記解凍データを第2のメモリに転送するステップと、
前記解凍データの転送が完了した時点で、前記DMAコントローラがCPUに完了割り込みを入れるステップと
を具備することを特徴とするデータ転送方法。 Transferring target data from the first memory to the DMA controller;
Determining whether the target data is compressed data;
If the target data is the compressed data, decompressing the compressed data with the DMA controller to generate decompressed data;
Transferring the decompressed data to a second memory;
A data transfer method comprising: a step in which the DMA controller issues a completion interrupt to the CPU when the transfer of the decompressed data is completed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007220279A JP2009053948A (en) | 2007-08-27 | 2007-08-27 | Semiconductor integrated circuit device and data transfer method using the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007220279A JP2009053948A (en) | 2007-08-27 | 2007-08-27 | Semiconductor integrated circuit device and data transfer method using the same |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2009053948A true JP2009053948A (en) | 2009-03-12 |
Family
ID=40504973
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007220279A Pending JP2009053948A (en) | 2007-08-27 | 2007-08-27 | Semiconductor integrated circuit device and data transfer method using the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2009053948A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011187039A (en) * | 2010-03-05 | 2011-09-22 | Lsi Corp | Dma engine for concurrent data manipulation |
| CN113753977A (en) * | 2021-09-06 | 2021-12-07 | 北京思源广泰科技有限公司 | Data processing method and system |
-
2007
- 2007-08-27 JP JP2007220279A patent/JP2009053948A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011187039A (en) * | 2010-03-05 | 2011-09-22 | Lsi Corp | Dma engine for concurrent data manipulation |
| CN113753977A (en) * | 2021-09-06 | 2021-12-07 | 北京思源广泰科技有限公司 | Data processing method and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107836083B (en) | Method, apparatus and system for semantic value data compression and decompression | |
| US20090015442A1 (en) | Data coding buffer for electrical computers and digital data processing systems | |
| US20190068217A1 (en) | Systems and methods for encoding and decoding | |
| JPWO2009022531A1 (en) | Data compression / decompression method | |
| JP3831716B2 (en) | Multi-byte Rempel Ziff 1 (LZ1) decompression method and apparatus | |
| CN107251438B (en) | Data compression device and method, data decompression device and method, and recording medium | |
| CN103051341B (en) | Data coding device and method, data deciphering device and method | |
| Nandi et al. | A compression technique based on optimality of LZW code (OLZW) | |
| CN105164923B (en) | Entropy Corrector and Method | |
| CN113890540B (en) | A parallel accelerated LZ77 decoding method and device | |
| US6748520B1 (en) | System and method for compressing and decompressing a binary code image | |
| JP2009053948A (en) | Semiconductor integrated circuit device and data transfer method using the same | |
| TW200405203A (en) | Apparatus and method for dynamic program decompression | |
| CN105573775B (en) | FPGA configuration file loading method and decoder | |
| CN109690957B (en) | System-Level Testing of Entropy Coding | |
| CN111600610A (en) | Variable-length integer universal coding method, system and electronic equipment | |
| US11593286B2 (en) | Memory system and information processing system | |
| Stefan et al. | Bitstream compression techniques for Virtex 4 FPGAs | |
| US8018359B2 (en) | Conversion of bit lengths into codes | |
| CN108932315A (en) | A kind of method and relevant apparatus of data decompression | |
| CN101292429B (en) | Method and apparatus for compression using multiple Markov chains | |
| TWI669945B (en) | Dedicated arithmetic encoding instruction | |
| CN105574053B (en) | Compression method and device for FPGA configuration file | |
| CN100401671C (en) | Method for transmitting files | |
| US12519485B2 (en) | Conversion device, memory system, decompression device, and method |