JPH0730434A - Decoder for variable length code - Google Patents

Decoder for variable length code

Info

Publication number
JPH0730434A
JPH0730434A JP17187093A JP17187093A JPH0730434A JP H0730434 A JPH0730434 A JP H0730434A JP 17187093 A JP17187093 A JP 17187093A JP 17187093 A JP17187093 A JP 17187093A JP H0730434 A JPH0730434 A JP H0730434A
Authority
JP
Japan
Prior art keywords
length code
state
data
variable length
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.)
Withdrawn
Application number
JP17187093A
Other languages
Japanese (ja)
Inventor
Hiroyuki Yamashita
博幸 山下
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP17187093A priority Critical patent/JPH0730434A/en
Publication of JPH0730434A publication Critical patent/JPH0730434A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a variable length code decoder simplified at its circuit constitution and control by directly decoding serial data as it is. CONSTITUTION:A bit-serial variable length code to be decoded is inputted to a flip flop(FF) 1 synchronously with a clock CKI and latched. A memory 3 is a ROM storing information and the contents of the memory 3 are outputted by using the contents of the FFs 1, 2 as addresses. The variable length code has tree structure and each leaf part has a code word shown by a double circle. A black dot expresses an initial state, a void circle expresses a halfway state, the halfway state is transitted in the right or left direction in accordance with data '0' or '1' bit-serially inputted from the initial state, and at the time of reaching a double circle state, a decoded value is outputted. In an example shown by a broken line, data '001' are inputted, transitted through a route of S0, S3, S5, and S6 and reached to a double circle and '2' e.g. corresponding to the '001' is outputted as a decoded value.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は可変長符号の復号器に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a variable length code decoder.

【0002】[0002]

【従来の技術】図1は特開平4-258025号に開示されてい
る従来の復号器のブロック図である。ビットシリアルの
可変長符号はクロックCLK に同期してシリアル/パラレ
ル(S/P) 変換器11へ入力され、ここでパラレルデータに
変換されてバッファメモリ12に一時保存される。バッフ
ァメモリ12の内容はビットシフタからなる回転部13へ読
込まれ、ここで未処理データの先頭部が頭詰めされるよ
うにデータシフトが行われる。このような回転部13の内
容はアドレスとしてROM からなる復号部14へ与えられ
る。
2. Description of the Related Art FIG. 1 is a block diagram of a conventional decoder disclosed in Japanese Patent Laid-Open No. 4-258025. The bit-serial variable-length code is input to the serial / parallel (S / P) converter 11 in synchronization with the clock CLK, converted into parallel data here, and temporarily stored in the buffer memory 12. The contents of the buffer memory 12 are read into a rotating unit 13 composed of a bit shifter, and data shift is performed here so that the head portion of the unprocessed data is head-justified. The contents of the rotating unit 13 are given as an address to the decoding unit 14 composed of a ROM.

【0003】復号部14は入力アドレスに符号が存在する
とそれを復号値として出力すると共に、復号に与かる符
号長 (ビット数) を回転部13へ与える。回転部13はその
分データを詰め上げると共にバッファメモリ12から新た
なデータを読込む。
When a code exists at the input address, the decoding section 14 outputs the code as a decoded value, and at the same time, supplies the code length (the number of bits) for decoding to the rotating section 13. The rotating unit 13 packs the data accordingly and reads new data from the buffer memory 12.

【0004】[0004]

【発明が解決しようとする課題】このような構成の復号
器は回路構成が複雑であり、それに伴い制御も複雑であ
り、回路・制御の簡素化が課題となっていた。本発明は
シリアルデータのままで復号できる構成とすることで回
路構成を簡単にすると共に、制御も簡単にした可変長符
号の復号器を提供することを目的とする。
The decoder having such a structure has a complicated circuit structure, and accordingly the control is complicated, and the simplification of the circuit / control has been a problem. It is an object of the present invention to provide a variable-length code decoder that simplifies the circuit structure by making it possible to decode the serial data as it is and also makes the control simple.

【0005】[0005]

【課題を解決するための手段】図2は本発明の復号原理
の説明図である。可変長符号は図示の如き木構造を有
し、葉の部分に2重丸で示すように符号語を有してい
る。黒丸は初期状態、白丸は途中の状態を示している。
初期状態からビットシリアルに入力されるデータ "0"
, "1" に応じて右又は左方向へ状態を遷移してい
く。2重丸の状態に至ると復号値を出力する。図示の破
線の例は "001 " と入力された場合を示し、S0→S3
,S5 ,S6 と遷移して2重丸に至り "001 " に対応
する、例えば2を復号値として出力する。
FIG. 2 is an explanatory diagram of the decoding principle of the present invention. The variable-length code has a tree structure as shown in the drawing, and has a code word as indicated by a double circle in the leaf portion. The black circles show the initial state, and the white circles show the intermediate state.
Data "0" input in bit serial from the initial state
, Transitions to the right or left according to "1". When the state of the double circle is reached, the decoded value is output. The example of the broken line in the figure shows the case where "001" is input, and S0 → S3
, S5, S6, a double circle is reached, and 2 corresponding to "001", for example, 2 is output as a decoded value.

【0006】[0006]

【作用】本発明によればシリアルデータのままで復号で
きるので回路構成が簡単であり、これに伴い制御も簡単
に行える。またユニークワード検出器を併設することで
これも検出できるので同期外れが生じた場合にも初期状
態に戻して爾後の復号が可能である。
According to the present invention, since the serial data can be decoded as it is, the circuit configuration is simple, and accordingly, the control can be easily performed. This can also be detected by adding a unique word detector, so that even if the synchronization is lost, the initial state can be restored and subsequent decoding can be performed.

【0007】[0007]

【実施例】以下本発明をその実施例を示す図面に基づい
て詳述する。図3は本発明の復号器の実施例を示すブロ
ック図である。復号対象のビットシリアルの可変長符号
はクロックCK1 に同期してフリップフロップ1へ入力さ
れ、ここでラッチされる。メモリ3は図2に示す関係の
情報を記憶しているROM であり、フリップフロップ1,
2の内容をアドレスとしてアクセスされる。メモリ3か
らの読出しデータ(パラレルデータ)は復号値を表すデ
ータ及び内部状態を表すデータ(いずれも複数ビット)
並びにクロックとなすべきデータCK2 (1ビット)であ
り、復号値を表すデータはフリップフロップ4(対応ビ
ット数分あり)にラッチされ、内部状態を表データはフ
リップフロップ2(対応ビット数分あり)にラッチされ
る。クロックとなすべきデータCK2 はフリップフロップ
4にクロックとして与えられる。なおフリップフロップ
2にはクロックCK1 が与えられる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the drawings showing the embodiments. FIG. 3 is a block diagram showing an embodiment of the decoder of the present invention. The bit-serial variable-length code to be decoded is input to the flip-flop 1 in synchronization with the clock CK1 and latched there. The memory 3 is a ROM that stores information on the relationship shown in FIG.
The contents of 2 are accessed as an address. The read data (parallel data) from the memory 3 is the data representing the decoded value and the data representing the internal state (both are multiple bits).
In addition, data CK2 (1 bit) to be used as a clock, data representing the decoded value is latched by flip-flop 4 (corresponding to the number of corresponding bits), and internal state table data is flip-flop 2 (corresponding to the number of corresponding bits). Latched on. The data CK2 to be used as a clock is given to the flip-flop 4 as a clock. The clock CK1 is applied to the flip-flop 2.

【0008】表1は図2に対応する符号語,符号長,復
号値の1例を示している。この場合において“11010011
101 ”が入力されたものとする。表2はこの場合の可変
長符号メモリ3の入力(フリップフロップ2側)及び出
力、CK2 並びに復号値の関係を示している。表1,2及
び図3を用いて図3の復号器の動作を説明する。
Table 1 shows an example of code words, code lengths and decoded values corresponding to FIG. In this case, "11010011
It is assumed that 101 "has been input. Table 2 shows the relationship between the input (flip-flop 2 side) and output of the variable-length code memory 3, CK2, and the decoded value in this case. The operation of the decoder of FIG. 3 will be described with reference to.

【0009】[0009]

【表1】 [Table 1]

【0010】[0010]

【表2】 [Table 2]

【0011】初期状態ではフリップフロップ1,2がリ
セットされており、図2のS0 で表わされる状態とな
る。最初の "1" が入力されるとフリップフロップ1に
これがラッチされる。一方フリップフロップ2はS0 に
相当する内容になっている。この場合のメモリ出力はS
1 に相当する内容になる。S0 ,S1 の状態はフリップ
フロップ2側へ有意の出力があるが、フリップフロップ
4側、CK2 の有意の出力はない。
In the initial state, the flip-flops 1 and 2 are reset, and the state is represented by S0 in FIG. When the first "1" is input, this is latched in flip-flop 1. On the other hand, the flip-flop 2 has a content corresponding to S0. The memory output in this case is S
The content is equivalent to 1. The states of S0 and S1 have a significant output to the flip-flop 2 side, but there is no significant output to the flip-flop 4 side and CK2.

【0012】次の "1" が入力されるとメモリ3の出力
はS2 の状態になり(図2の実線)、フリップフロップ
4へは復号値の "0" が出力され、これに伴いCK2 が出
力される。S2 のような復号値が得られる状態ではフリ
ップフロップ2側への出力は初期状態S0 に等しい。従
って次の "01" の入力によってはS3 ,S4 と遷移し、
復号値1及びCK2 を得る。以下同様にして復号値2,
0,1が得られる。なおユニークワード“000001”が入
力された場合は復号値出力はなく、初期状態S0 へ戻る
出力のみがフリップフロップ2へ与えられる。
When the next "1" is input, the output of the memory 3 enters the state of S2 (solid line in FIG. 2), the decoded value "0" is output to the flip-flop 4, and CK2 is accordingly output. Is output. In the state where the decoded value such as S2 is obtained, the output to the flip-flop 2 side is equal to the initial state S0. Therefore, depending on the next input of "01", it transits to S3 and S4,
Get the decrypted value 1 and CK2. Similarly, the decoded value 2,
0 and 1 are obtained. When the unique word "000001" is input, there is no decoded value output, and only the output returning to the initial state S0 is given to the flip-flop 2.

【0013】図4は本発明の復号器の他の実施例を示す
ブロック図である。この実施例はユニークワード検出器
5を備える点で図3の実施例と相違している。即ち復号
対象の可変長符号はユニークワード検出器5へクロック
CK1 に同期して入力される。ユニークワード検出器5は
ユニークワードの桁数と等しい段数のシフトレジスタ及
びその並列出力とユニークワード“000001”との一致を
判定する論理回路とを備え、ユニークワード“000001”
を検出するとフリップフロップ2のダイレクトリセット
端子Rへリセット信号を出力するようにしたものであ
る。他の構成については図3の実施例と同様であるので
同符号を付して説明を省略する。
FIG. 4 is a block diagram showing another embodiment of the decoder of the present invention. This embodiment differs from the embodiment of FIG. 3 in that the unique word detector 5 is provided. That is, the variable length code to be decoded is clocked to the unique word detector 5.
Input in synchronization with CK1. The unique word detector 5 includes a shift register having the same number of stages as the number of digits of the unique word, a parallel output of the shift register, and a logic circuit for determining whether the unique word “000001” matches.
Is detected, a reset signal is output to the direct reset terminal R of the flip-flop 2. The other structure is similar to that of the embodiment shown in FIG.

【0014】[0014]

【表3】 [Table 3]

【0015】表3は“11100100000010011101”が入力さ
れた場合のこの復号器の入力可変長符号、メモリの入,
出力、CK2 、復号値並びにユニークワード検出器から出
力されるリセット信号を示すものである。 "11" の入力
で復号値 "0" を出力して初期状態S0 に戻った後は
"10" と入力されるので状態S1 から後への遷移ができ
ない(○a)。つまりS1 の状態でのフリップフロップ
2の出力とフリップフロップ1の "0" とによってアク
セスされる番地が存在しない。従って表3に示すように
これに続く“010000001 ”についてもメモリ3からの読
出しデータは得られない。一方このようなメモリ3の働
きとは別にユニークワード検出器5はユニークワード
“000001”を検出し、フリップフロップ2をリセットす
る。そうすると初期状態S0 に戻ることができ、続く
“001 ”を "2" と復号する(○b)。
Table 3 shows the input variable length code of this decoder when "11100100000010011101" is input, the input of the memory,
The output, CK2, the decoded value and the reset signal output from the unique word detector are shown. After the decoded value "0" is output by the input of "11" and the initial state S0 is returned,
Since "10" is input, the transition from state S1 to the back is not possible (○ a). That is, there is no address accessed by the output of flip-flop 2 and "0" of flip-flop 1 in the state of S1. Therefore, as shown in Table 3, read data from the memory 3 cannot be obtained for the subsequent "010000001". On the other hand, in addition to the function of the memory 3, the unique word detector 5 detects the unique word "000001" and resets the flip-flop 2. Then, it is possible to return to the initial state S0, and the subsequent "001" is decoded as "2" (○ b).

【0016】なおユニークワードの検出は状態S10でも
行われるがそれ自体はフリップフロップ4から復号値と
して出力される。そして後段の回路で例えば改行信号等
の特別な用途に使用される。
Although the unique word is detected in the state S10, the unique word itself is output from the flip-flop 4 as a decoded value. Then, it is used for a special purpose such as a line feed signal in a circuit in the subsequent stage.

【0017】[0017]

【発明の効果】以上の如き本発明による場合はシリアル
データのまま復号が可能であるので実施例で示す如く構
成が簡単であり、複雑な制御は全く必要としない。また
ユニークワード検出器を設ける場合は雑音等によりビッ
ト誤りが生じた場合もユニークワード以後においては確
実に復号できる等、本発明は優れた効果を奏する。
According to the present invention as described above, since the serial data can be decoded as it is, the structure is simple as shown in the embodiment and no complicated control is required. Further, when the unique word detector is provided, even if a bit error occurs due to noise or the like, it is possible to surely decode after the unique word.

【図面の簡単な説明】[Brief description of drawings]

【図1】従来の復号器のブロック図である。FIG. 1 is a block diagram of a conventional decoder.

【図2】本発明の復号の原理説明図である。FIG. 2 is a diagram explaining the principle of decoding according to the present invention.

【図3】本発明の復号器のブロック図である。FIG. 3 is a block diagram of a decoder of the present invention.

【図4】本発明の他の実施例のブロック図である。FIG. 4 is a block diagram of another embodiment of the present invention.

【図5】本発明の復号の原理説明図である。FIG. 5 is a diagram illustrating the principle of decoding according to the present invention.

【符号の説明】[Explanation of symbols]

1,2,4 フリップフロップ 3 メモリ 5 ユニークワード検出器 1,2,4 Flip-flop 3 Memory 5 Unique word detector

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 木構造の葉の部分に有限の符号語を持つ
ビットシリアルの可変長符号の復号器において、木構造
における現在の状態を記憶する記憶手段(2)と、該手
段が記憶する現在の状態及び次順のビットのデータと次
順の状態との関係を記憶しているメモリ(3)とを備
え、木構造の追跡により、所定の状態に達した場合に復
号値を得べくなしてあることを特徴とする可変長符号の
復号器。
1. In a bit-serial variable-length code decoder having a finite codeword in a leaf portion of a tree structure, storage means (2) for storing a current state in the tree structure, and the storage means. A memory (3) for storing the relationship between the current state and the next-order bit data and the next-order state is provided, and a tree structure is traced to obtain a decoded value when a predetermined state is reached. A variable-length code decoder characterized by being provided.
【請求項2】 前記可変長符号に挿入されているユニー
クワードの検出器を備え、該検出器がユニークワードを
検出した場合に前記記憶手段を初期状態になすべく構成
してある請求項1記載の可変長符号の復号器。
2. A detector for a unique word inserted in the variable-length code is provided, and when the detector detects a unique word, the storage means is configured to be in an initial state. Variable length code decoder.
JP17187093A 1993-07-12 1993-07-12 Decoder for variable length code Withdrawn JPH0730434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17187093A JPH0730434A (en) 1993-07-12 1993-07-12 Decoder for variable length code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17187093A JPH0730434A (en) 1993-07-12 1993-07-12 Decoder for variable length code

Publications (1)

Publication Number Publication Date
JPH0730434A true JPH0730434A (en) 1995-01-31

Family

ID=15931323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17187093A Withdrawn JPH0730434A (en) 1993-07-12 1993-07-12 Decoder for variable length code

Country Status (1)

Country Link
JP (1) JPH0730434A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982306A (en) * 1997-12-02 1999-11-09 Daewoo Electronics Co., Ltd. Variable-length coding method and apparatus thereof
CN104283567A (en) * 2013-07-02 2015-01-14 北京四维图新科技股份有限公司 Method for compressing or decompressing name data, and equipment thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982306A (en) * 1997-12-02 1999-11-09 Daewoo Electronics Co., Ltd. Variable-length coding method and apparatus thereof
CN104283567A (en) * 2013-07-02 2015-01-14 北京四维图新科技股份有限公司 Method for compressing or decompressing name data, and equipment thereof
CN104283567B (en) * 2013-07-02 2018-07-03 北京四维图新科技股份有限公司 A kind of compression of name data, decompression method and equipment

Similar Documents

Publication Publication Date Title
JPH0421944B2 (en)
JPH0730434A (en) Decoder for variable length code
GB2365723A (en) Serial to parallel conversion by extracting even and odd numbered data pulses synchronously with leading and trailing edges of clock pulses respectively
US5898712A (en) CRC code generation circuit, code error detection circuit, and CRC circuit having functions of both the CRC code generation circuit and the code error detection circuit
JP4586633B2 (en) Decoder circuit, decoding method, and data recording apparatus
US20050256996A1 (en) Register read circuit using the remainders of modulo of a register number by the number of register sub-banks
CN115202612A (en) Superconducting single-flux quantum clock domain crossing communication method and system based on asynchronous FIFO
KR100301653B1 (en) High speed empty flag generator
JPH01136422A (en) A/d converter
JP3753822B2 (en) Viterbi decoding method and apparatus
KR0127236B1 (en) Information utilizsation circuit of memory chip
JPH0255987B2 (en)
JPH077438A (en) Serial-parallel conversion circuit
JPH027284A (en) Integrated circuit
JPH04421B2 (en)
JPH11186915A (en) Viterbi decoder
JPH0377708B2 (en)
JPH0427754B2 (en)
US20040178932A1 (en) Data compression method and processor
JPH0432823Y2 (en)
KR100223652B1 (en) Method for using 1 bit to 2 bit memory amd its memory device
JPH0722969A (en) Arithmetic unit
JP2670905B2 (en) counter
JP2556160B2 (en) Compression code decompression device
JP2507954B2 (en) Run length decoding device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001003