JPH08221247A - Data processing device - Google Patents

Data processing device

Info

Publication number
JPH08221247A
JPH08221247A JP2301895A JP2301895A JPH08221247A JP H08221247 A JPH08221247 A JP H08221247A JP 2301895 A JP2301895 A JP 2301895A JP 2301895 A JP2301895 A JP 2301895A JP H08221247 A JPH08221247 A JP H08221247A
Authority
JP
Japan
Prior art keywords
data
bit
bit string
address
register
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
JP2301895A
Other languages
Japanese (ja)
Inventor
Shigeaki Koike
茂明 小池
Makoto Fukuda
真 福田
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 JP2301895A priority Critical patent/JPH08221247A/en
Publication of JPH08221247A publication Critical patent/JPH08221247A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

(57)【要約】 【目的】 任意のビットバウンダリから連続したビット
列を読み/書きするデータ処理装置に関し、比較的簡単
な構成でビット列抽出が高速に行なえるデータ処理装置
を提供することを目的とする。 【構成】 MPU11のデータバス15から連続した2
バイト分のデータを取り込み保持するバッファレジスタ
17と、MPU11のアドレスバス16からのアドレス
に応じてバッファレジスタ17から所望の連続したビッ
ト列を選択するマルチプレクサ部18と、マルチプレク
サ部18で選択されたデータを予め設定されたマスクデ
ータによりマスクすることにより必要な部分のビット列
だけを取り出し、1バイトのデータとしてデータバス1
5に出力する出力回路19とよりな構成される。
(57) [Summary] [Object] A data processing device for reading / writing a continuous bit string from an arbitrary bit boundary, and an object of the present invention is to provide a data processing device capable of high-speed bit string extraction with a relatively simple configuration. To do. [Structure] 2 consecutive from the data bus 15 of the MPU 11
A buffer register 17 for fetching and holding data of bytes, a multiplexer unit 18 for selecting a desired continuous bit string from the buffer register 17 according to an address from the address bus 16 of the MPU 11, and a data selected by the multiplexer unit 18 By masking with the preset mask data, only the bit string of the necessary portion is taken out and the data bus 1 is stored as 1-byte data.
5, and an output circuit 19 for outputting to 5.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータ処理装置に係り、
特に、任意のビットバウンダリから連続したビット列を
読み/書きするデータ処理装置に関する。近年、データ
圧縮処理の発展に伴って、情報処理装置で、可変長ビッ
ト列のデータを扱うことが要求されている。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device,
In particular, the present invention relates to a data processing device that reads / writes a continuous bit string from an arbitrary bit boundary. In recent years, with the development of data compression processing, it has been required for an information processing apparatus to handle data of a variable length bit string.

【0002】情報処理装置の中核をなすマイクロプロセ
ッサ(MPU)は主に1バイト単位でデータを扱うこと
を考えて設計されている。しかし、ビット単位の処理を
大量に行う要求も多く存在する。例えば、ファクシミリ
装置が画像を転送する際に使用されているMH(Mod
ified Huffman)、MR(modifie
d READ)、MMR(modeified MR)
と呼ばれるデータ圧縮の手法では、データの最小単位が
可変長のビット列であり、符号化/復号化を行なうとき
には、異なるビットバウンダリから異なる長さのビット
列を取り出す必要があり、このような処理には数ステッ
プから数十ステップもの処理が必要となる。それは即ち
処理速度の低下につながる。
A microprocessor (MPU), which is the core of an information processing apparatus, is designed mainly for handling data in 1-byte units. However, there are many requests to perform a large amount of bit-wise processing. For example, the MH (Mod that is used when a facsimile machine transfers an image)
if huffman), MR (modify)
d READ), MMR (moderated MR)
In a data compression method called a data compression, the minimum unit of data is a variable-length bit string, and when encoding / decoding, it is necessary to extract a bit string having a different length from a different bit boundary. Processing of several steps to several tens of steps is required. That is, the processing speed is reduced.

【0003】このような装置で処理速度を上げるには、
ビットバウンダリから必要とするビット列を高速で取り
出す必要がある
To increase the processing speed with such a device,
It is necessary to extract the required bit string from the bit boundary at high speed.

【0004】[0004]

【従来の技術】従来、1バイト、8ビット単位のMPU
でデータ圧縮等を行なうに際し、異なるビットバウンダ
リから異なる長さのビット列を取り出す場合にはプログ
ラムによりソフト的に処理を実行していた。
2. Description of the Related Art Conventionally, a 1-byte 8-bit unit MPU
When performing data compression or the like, in the case of taking out bit strings of different lengths from different bit boundaries, the processing is executed by software by a program.

【0005】このような処理を行なう場合、MPUは1
バイト、8ビット単位でしかデータを扱えないため、ま
ず、必要とするビット列を含む1バイトのデータを読み
込み、必要となる部分のビット列を取り出し、1バイト
のデータとして保持する。次に先に読み込んだ1バイト
のデータに連続する次の1バイトのデータを読み込み、
先に取り出したビット列に連続する部分のビット列を取
り出し、1バイトのデータとして保持し、先に取り出し
た必要とするビット列の部分を含む1バイトデータと次
に取り出した必要とするビット列の部分を含むデータと
を合成して1バイトのデータとすることにより、必要な
ビット列を取り出していた。
When performing such processing, the MPU is set to 1
Since data can be handled only in units of bytes and 8 bits, first, 1-byte data including a required bit string is read, a required bit string is taken out and held as 1-byte data. Next, read the next 1 byte of data that is consecutive to the 1 byte of data that was previously read,
A bit string that is continuous with the previously fetched bit string is fetched and held as 1-byte data, and 1-byte data including the previously fetched required bit string portion and the next fetched required bit string portion are included. The necessary bit string was taken out by synthesizing the data and 1-byte data.

【0006】[0006]

【発明が解決しようとする課題】しかるに、従来のデー
タ処理装置ではビットバウンダリから異なる長さのビッ
ト列を取り出す場合、コスト低減及び機能変更等の対応
性からMPUをプログラム制御することにより処理を行
っており、一般に1バイト単位でデータを扱うべく設計
されているMPUで、任意のビット列を取り出すために
は数〜数十ステップの処理が必要となるため、処理を高
速化するのが困難である等の問題点があった。
However, in the conventional data processing apparatus, when extracting bit strings of different lengths from the bit boundary, the processing is performed by controlling the program of the MPU in order to reduce costs and change the functions. In general, an MPU designed to handle data in 1-byte units requires several to several tens of steps in order to extract an arbitrary bit string, which makes it difficult to speed up the processing. There was a problem.

【0007】処理速度を速くしなければならない場合に
は、専用LSI等のハードウェアで処理を行うことも可
能であり、上記MH,MR,MMRの場合には符号化/
復号化を行うLSI等も多く製品化されているが、コス
トが高くなり、また、一度設計すると、機能変更が容易
でなく、設計障害発生時の対応が難しい等の問題点が生
じる。
When it is necessary to increase the processing speed, it is possible to perform the processing by hardware such as a dedicated LSI, and in the case of the above MH, MR and MMR, the encoding /
Although many LSIs and the like that perform decoding have been commercialized, the cost becomes high, and once designed, there are problems that it is not easy to change functions and it is difficult to deal with design failures.

【0008】本発明は上記の点に鑑みてなされたもの
で、比較的簡単な構成でビット列抽出の高速処理が行え
るデータ処理装置を提供することを目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a data processing device capable of high-speed processing of bit string extraction with a relatively simple structure.

【0009】[0009]

【課題を解決するための手段】図1は本発明の原理図を
示す。データ処理手段1は、任意のビットバウンダリか
ら連続したビット列を抽出するデータ処理装置におい
て、所望のビット列を選択して所定の処理を行なう。
FIG. 1 shows the principle of the present invention. The data processing means 1 selects a desired bit string and performs a predetermined process in a data processing device which extracts a continuous bit string from an arbitrary bit boundary.

【0010】ビットバウンダリ保持手段2は、前記デー
タ処理手段で処理されるビット列を含むビットバウンダ
リを保持する。選択手段3は、前記バウンダリ保持手段
に保持された前記ビットバウンダリの各ビットのデータ
が供給され、前記データ処理手段から前記所望のビット
列に投じて供給される選択信号に応じて連続するビット
列を選択出力する。
The bit boundary holding means 2 holds a bit boundary including a bit string processed by the data processing means. The selection means 3 is supplied with the data of each bit of the bit boundary held in the boundary holding means, and selects consecutive bit strings according to the selection signal supplied from the data processing means to the desired bit string. Output.

【0011】請求項3は前記選択手段によって選択出力
されたビット列より不要なビットをマスクするマスク手
段を有する。
A third aspect of the present invention has masking means for masking unnecessary bits from the bit string selected and output by the selecting means.

【0012】[0012]

【作用】本発明の請求項1によれば、任意のビットバウ
ンダリから連続するビット列を抽出する処理をビットバ
ウンダリ保持手段とビット列選択手段とにより行なうこ
とができ、データ処理手段は必要とするビット列を含む
ビットバウンダリ及びビットバウンダリから必要とする
ビット列を選択する選択信号を供給するだけで必要なビ
ット列を得ることができるため、データ処理手段での処
理の負担を軽減でき、データ処理を効率的に行なえる。
According to the first aspect of the present invention, the process of extracting a continuous bit string from an arbitrary bit boundary can be performed by the bit boundary holding means and the bit string selecting means, and the data processing means can obtain the required bit string. It is possible to obtain the required bit string only by supplying the selection signal that selects the required bit string from the included bit boundary and the bit boundary, so that the processing load on the data processing means can be reduced and the data processing can be performed efficiently. It

【0013】請求項2によれば、ビットバウンダリ保持
部及びビット列選択手段を専用ハードウェアで構成する
ことにより、ビット列の抽出を高速に行なうことができ
る。請求項3によれば、マスク手段を設けることにより
取り出したビット列り不要なビット部分をカットするこ
とができるため、必要なデータのみを取り出すことがで
きる。
According to the second aspect of the present invention, the bit boundary holding unit and the bit string selecting means are composed of dedicated hardware, whereby the bit string can be extracted at high speed. According to the third aspect, since the unnecessary bit portion in the extracted bit string can be cut by providing the mask means, only necessary data can be extracted.

【0014】[0014]

【実施例】図2に本発明の第1実施例のブロック図を示
す。本実施例のデータ処理装置10はデータ処理手段1
となるMPU(マイクロプロセッサユニット)11、任
意のビットバウンダリから所望のビット列を抽出するビ
ット列抽出回路12、MPU11で処理された又は処理
すべきデータを記憶するメモリ13、MPU11で処理
すべきデータを入力すると共にMPU11で処理された
データを出力する入出力(I/O)部14より構成され
る。
1 is a block diagram of a first embodiment of the present invention. The data processing device 10 of the present embodiment is the data processing means 1
MPU (microprocessor unit) 11 that becomes, a bit string extraction circuit 12 that extracts a desired bit string from an arbitrary bit boundary, a memory 13 that stores data processed or to be processed by the MPU 11, and data to be processed by the MPU 11 are input In addition, the input / output (I / O) unit 14 outputs the data processed by the MPU 11.

【0015】MPU11、ビット列抽出回路12、メモ
リ13、入出力部14はデータバス15及びアドレスバ
ス16及び制御ライン(図示せず)により接続されてい
る。MPU11は、処理しようとするデータを含むビッ
ト列を取り込み、後述するようにビット列抽出回路12
に供給し、選択信号に応じてビット列抽出回路12より
必要なビット列を取り出し、データ圧縮の処理であれ
ば、符号化/復号化等の処理を行なう。
The MPU 11, bit string extraction circuit 12, memory 13, and input / output unit 14 are connected by a data bus 15, an address bus 16 and a control line (not shown). The MPU 11 takes in a bit string containing the data to be processed and, as will be described later, the bit string extraction circuit 12
And a required bit string is taken out from the bit string extraction circuit 12 according to the selection signal, and if it is a data compression process, a process such as encoding / decoding is performed.

【0016】ビット列抽出回路12は2バイト分のビッ
トバウンダリを格納できるバッファレジスタ17、バッ
ファレジスタ17の各ビットが接続され、MPU11か
らのアドレスに応じて連続するビット列を選択するマル
チプレクサ18、マルチプレクサ18で選択されたデー
タをデータバス15に出力する出力回路19、アドレス
が供給され、アドレスに応じて各種タイミングを生成す
るタイミング制御部20より構成される。
The bit string extraction circuit 12 is provided with a buffer register 17 capable of storing a bit boundary of 2 bytes, each bit of the buffer register 17 is connected, and a multiplexer 18 and a multiplexer 18 for selecting a continuous bit string according to an address from the MPU 11. An output circuit 19 for outputting the selected data to the data bus 15 and a timing control unit 20 which is supplied with an address and generates various timings according to the address.

【0017】バッファレジスタ17は、1バイト分のデ
ータを格納できる偶数データレジスタ17−1及び奇数
データレジスタ17−2より構成される。偶数データレ
ジスタ17−1及び奇数データレジスタ17−2には連
続したビットバウンダリが格納される。
The buffer register 17 is composed of an even data register 17-1 and an odd data register 17-2 which can store 1 byte of data. Continuous bit boundaries are stored in the even data register 17-1 and the odd data register 17-2.

【0018】図3に本発明の第1実施例のビット列抽出
回路12のブロック図を示す。タイミング制御部20は
アドレスバス16と接続されていて、アドレスバス16
から供給されるアドレスに応じてハイ又はローとなる信
号をアドレス別に出力するアドレスデコーダ21及び、
アドレスデコーダの信号の論理和をとるORゲート22
より構成される。
FIG. 3 is a block diagram of the bit string extraction circuit 12 of the first embodiment of the present invention. The timing control unit 20 is connected to the address bus 16 and
An address decoder 21 which outputs a signal which becomes high or low according to an address supplied from each address,
An OR gate 22 that ORs the signals of the address decoder
It is composed of

【0019】アドレスデコーダ21は所定のアドレスに
対応した出力を有し、アドレスバス16から供給された
アドレスのうち、0〜F(16進数)番地のアドレスを
ORゲート22に供給し、10番地のアドレスを偶数デ
ータレジスタ17−1、11番地のアドレスを奇数デー
タレジスタ17−2にデータ保持制御信号EVENDA
TA REG,ODD DATA REGとして、ま
た、12番地のアドレスをマスク制御信号として出力回
路19のマスクレジスタ19−2に供給する。
The address decoder 21 has an output corresponding to a predetermined address. Among the addresses supplied from the address bus 16, the addresses 0 to F (hexadecimal number) are supplied to the OR gate 22, and the address 10 is supplied. The data holding control signal EVENDA is set to the even-numbered data register 17-1 and the address of 11th address to the odd-numbered data register 17-2.
The address of address 12 is supplied to the mask register 19-2 of the output circuit 19 as TA REG, ODD DATA REG and as a mask control signal.

【0020】アドレスデコーダ21の出力はアドレスバ
ス16から供給されたアドレスに対応した出力のみをハ
イレベルとする。ORゲート22はアドレスデコーダ2
1の出力の0〜F番地のアドレスに対応した出力の論理
和をとり、出力回路19のシフトレジスタ19−3に供
給する。
As for the output of the address decoder 21, only the output corresponding to the address supplied from the address bus 16 is set to the high level. The OR gate 22 is the address decoder 2
The logical sum of the outputs corresponding to the addresses 0 to F of the output of 1 is calculated and supplied to the shift register 19-3 of the output circuit 19.

【0021】偶数データレジスタ17−1にはアドレス
デコーダ21からデータ保持制御信号EVEN DAT
A REGが供給されると共にデータバス15から8ビ
ットのデータがパラレルに供給される。偶数データレジ
スタ17−1はデータバス15から供給される8ビット
(1バイト)のデータをアドレスデコーダ21から供給
されるデータ保持制御信号EVEN DATA REG
に応じて保持し、マルチプレクサ部18に供給する。
The even-numbered data register 17-1 receives the data holding control signal EVEN DAT from the address decoder 21.
AREG is supplied and 8-bit data is supplied in parallel from the data bus 15. The even data register 17-1 receives the 8-bit (1 byte) data supplied from the data bus 15 from the address decoder 21 and holds the data holding control signal EVEN DATA REG.
And is supplied to the multiplexer unit 18.

【0022】また、奇数データレジスタ17−2にはア
ドレスデコーダ21からデータ保持制御信号ODD D
ATA REGが供給されると共にデータバス15から
8ビットのデータがパラレルに供給される。奇数データ
レジスタ17−2はデータバス15から供給される8ビ
ット(1バイト)のデータをアドレスデコーダ21から
供給されるデータ保持制御信号ODD DATA RE
Gに応じて保持し、マルチプレクサ部18に供給する。
The odd data register 17-2 has a data holding control signal ODD D from the address decoder 21.
ATA REG is supplied and 8-bit data is supplied in parallel from the data bus 15. The odd-numbered data register 17-2 receives the 8-bit (1 byte) data supplied from the data bus 15 from the data hold control signal ODD DATA RE supplied from the address decoder 21.
It is held according to G and supplied to the multiplexer unit 18.

【0023】マルチプレクサ部18は16ビット分の入
力を有する8ケのマルチプレクサ18−1〜18−8よ
り構成され、偶数データレジスタ17−1とと奇数デー
タレジスタ17−2からの8ビットのデータが連続する
ようにマルチプレクサ18−1〜18−8毎に順次ずれ
ながら入力される。
The multiplexer unit 18 is composed of eight multiplexers 18-1 to 18-8 having 16-bit inputs, and the 8-bit data from the even-numbered data register 17-1 and the odd-numbered data register 17-2 is stored in the multiplexer unit 18. The signals are input while being sequentially shifted for each of the multiplexers 18-1 to 18-8 so as to be continuous.

【0024】マルチプレクサ18−1〜18−8にはア
ドレスバス16から下位4ビット分のアドレスADRS
0〜ADRS3が供給され、供給されたアドレスに応じ
て入力ビットBit0〜15のうちいずれか一つのビッ
トが選択される。例えば、ビットBit0が選択される
と偶数データレジスタ17−1のデータDATA0〜
7、奇数データレジスタ17−2のデータDATA0〜
7の順で連続した1バイトのデータが選択され、ビット
Bit1が選択されると偶数データレジスタ17−1の
データDATA1〜7、偶数データレジスタ17−1の
データDATA0の順で連続した1バイトのデータが選
択され、選択ビットに応じて異なるビットから始まり、
連続したビット列が得られる構成とされている。
The multiplexers 18-1 to 18-8 are connected to the address ADRS for the lower 4 bits from the address bus 16.
0 to ADRS3 are supplied, and any one of the input bits Bit0 to Bit15 is selected according to the supplied address. For example, when the bit Bit0 is selected, the data DATA0 to DATA0 of the even data register 17-1
7. Data DATA0 to Odd data register 17-2
When continuous 1-byte data is selected in the order of 7 and bit Bit1 is selected, data 1 to 7 in the even-numbered data register 17-1 and data DATA0 in the even-numbered data register 17-1 are consecutively written in the order of 1-byte data. The data is selected, starting with different bits depending on the selected bit,
It is configured to obtain a continuous bit string.

【0025】マルチプレクサ部18で選択されたビット
列はANDゲート19−1に供給される。ANDゲート
部19−1はマルチプレクサ部18のマルチプレクサ1
8−1〜18−8の数だけ設けられていてマルチプレク
サ18−1〜18−8の出力の他にマスクレジスタ19
−2が入力されている。ANDゲート19−1はマルチ
プレクサ部18で選択された各ビットとマスクレジスタ
19−1に予め設定されたマスクデータの各ビットとの
論理積を取ることにより不要なビット部分を棄却してシ
フトレジスタ19−3に供給する。
The bit string selected by the multiplexer unit 18 is supplied to the AND gate 19-1. The AND gate unit 19-1 is the multiplexer 1 of the multiplexer unit 18.
8-1 to 18-8 are provided, and mask registers 19 are provided in addition to the outputs of the multiplexers 18-1 to 18-8.
-2 has been entered. The AND gate 19-1 discards an unnecessary bit portion by performing a logical product of each bit selected by the multiplexer unit 18 and each bit of the mask data preset in the mask register 19-1 to reject the unnecessary bit portion. -3.

【0026】シフトレジスタ19−3はANDゲート部
19−1の出力をアドレスデコーダ21のマスク制御信
号MASK REGに応じて保持出力する。図4に本発
明の第1実施例の動作フローチャートを示す。MPU1
1では次の原データアドレスを次に取り出す原データの
バイト単位のアドレスを記憶するソースアドレス(so
urce Adrs)レジスタに記憶すると共に、原デ
ータより取り出すべきビット列のビット位置を原データ
の先頭から数えたビット数で記憶するビットポインタ
(bit pointer)に記憶する(ステップS1
−1)。
The shift register 19-3 holds and outputs the output of the AND gate section 19-1 according to the mask control signal MASK REG of the address decoder 21. FIG. 4 shows an operation flowchart of the first embodiment of the present invention. MPU1
In the case of 1, the source address (so
urce Adrs) register and a bit pointer (bit pointer) that stores the bit position of the bit string to be extracted from the original data with the number of bits counted from the beginning of the original data (step S1).
-1).

【0027】次にMPU11はソースアドレスレジスタ
に記憶されたソースアドレスから2バイト分のデータを
偶数データレジスタ及び奇数データレジスタに格納し、
ソースアドレスレジスタに格納されたアドレスを+2す
ると共に、偶数データレジスタ及び奇数データレジスタ
に格納されたデータのどちらが最新のデータかを識別す
るための最新格納データ情報(ev od fiag)
を奇数データレジスタに最新データが格納されたことを
示す‘奇数’にセットする(ステップS1−2)。
Next, the MPU 11 stores data of 2 bytes from the source address stored in the source address register in the even data register and the odd data register,
The latest stored data information (ev) for incrementing the address stored in the source address register by 2 and identifying which of the data stored in the even data register and the odd data register is the latest data (ev od fiag)
Is set to "odd number" indicating that the latest data is stored in the odd number data register (step S1-2).

【0028】次にMPU11はビットポインタに設定さ
れたデータ列抽出位置が奇数シフトレジスタ側か、偶数
シフトレジスタ側かを調べる。これはビットポインタに
設定された値を8で割った商が‘偶数’か、‘奇数’か
(つまり、第3ビット目が0か、1かを調べる)を調
べ、最新格納データ情報ev od flagと比較す
る(ステップS1−3)ことにより行なわれる。
Next, the MPU 11 checks whether the data string extraction position set in the bit pointer is on the odd shift register side or the even shift register side. This is to check whether the quotient obtained by dividing the value set in the bit pointer by 8 is “even” or “odd” (that is, whether the third bit is 0 or 1), and the latest stored data information ev od This is performed by comparing with the flag (step S1-3).

【0029】ここで、最新格納データ情報ev od
flagとビットポインタの値を8で割った商の第3ビ
ット目とが異なる値であれば、最新格納データ情報が0
であれば、次のデータを奇数データレジスタからソース
アドレスらか2バイト分のデータを順に格納し、最新格
納データ情報が8であれば、偶数データレジスタからソ
ースアドレスより2バイト分のでーたを順に格納する
(ステップS1−4)。
Here, the latest stored data information ev od
If the flag and the third bit of the quotient obtained by dividing the value of the bit pointer by 8 are different, the latest stored data information is 0.
If so, the next data is stored in order from the odd data register to the source address or 2 bytes worth of data. If the latest stored data information is 8, then the data from the even data register is 2 bytes worth of the source address. The data are sequentially stored (step S1-4).

【0030】次にMPU11はソースアドレス1を加え
ると共に、最新データ情報を更新する(ステップS1−
15)。また、ステップS1−3で、ビットポインタの
値を8で割ったときの商が、最新格納データ接続と同じ
でしれば、ステップS1−4,S1−5の処理を省略し
てステップS1−6の処理を実行する。
Next, the MPU 11 adds the source address 1 and updates the latest data information (step S1-
15). If the quotient when the value of the bit pointer is divided by 8 in step S1-3 is the same as the latest stored data connection, the processes of steps S1-4 and S1-5 are omitted and step S1-6 is performed. The process of is executed.

【0031】次に、MPU11はビットポインタの下位
4ビットの値(0〜15)に従いシフトデータレジスタ
0〜15よりデータを取り出す(ステップS1−6)。
MPU11は取り出したデータに対して、データ圧縮で
あれば符号化/復号化の処理を行なう(ステップS1−
7)。続けて処理を行なう場合には取り出したビット列
のうち処理に用いたビット分だけビットポインタの値を
進め、ステップS1−3〜S1−7をくり返す(ステッ
プS1−8)。
Next, the MPU 11 takes out the data from the shift data registers 0 to 15 according to the value (0 to 15) of the lower 4 bits of the bit pointer (step S1-6).
If the data is compressed, the MPU 11 performs encoding / decoding processing on the extracted data (step S1-
7). In the case of continuing the processing, the value of the bit pointer is advanced by the number of bits used for the processing in the extracted bit string, and steps S1-3 to S1-7 are repeated (step S1-8).

【0032】MPU11はまず、内蔵された各種変数は
つぎのように初期化する。 ソースアドレス source adrs=$8000 ビットポインタ bit pointer=0 最新格納データ情報ev of flag=0 ビットポインタbit pointerの第3ビット目
と最新格納データ情報ev od flagの第3ビッ
ト目とともに0で等しいため、ステップS1−6を実行
する。
The MPU 11 first initializes various built-in variables as follows. Source address source adrs = $ 8000 bit pointer bit pointer = 0 latest stored data information ev of flag = 0 bit pointer bit Third bit of pointer and latest stored data information ev od Since it is equal to 0 with the third bit of flag, step S1-6 is executed.

【0033】ビットポインタbit pointerの
下位4ビットは‘0000’(=0)であるから、「シ
フトデータレジスタ0」より1バイトを取り出す。取り
出したデータは‘00101101’となる。取り出し
たデータ‘00101101’に従い処理を行う。
Bit pointer bit Since the lower 4 bits of the pointer are "0000" (= 0), one byte is taken out from "shift data register 0". The data taken out is '00101101'. Processing is performed according to the taken-out data '00101101'.

【0034】ここでは、8ビットを先頭からデコードし
た結果、上位より5ビット‘00101’だけ使用した
とする。実際に使用したビット数=5をビットイインタ
bit pointerに加算する。
Here, it is assumed that, as a result of decoding 8 bits from the beginning, only 5 bits "00101" from the upper bits are used. Bit number actually used = 5 bit inter-bit Add to pointer.

【0035】ビットポインタbit pointerの
第3ビット目と最新格納データ情報ev od fla
gの第3ビット目は共に0で、等しい。ビットポインタ
bit pointerの下位4ビットは‘0101’
(=5)であるから、「シフトデータレジスタ5」より
1バイトを取り出す。取り出したデータは‘10111
001’である処理を行う。
Bit pointer bit Third bit of pointer and latest stored data information ev od fla
The third bits of g are both 0 and are equal. Bit pointer bit The lower 4 bits of the pointer are "0101"
Since (= 5), one byte is taken out from the "shift data register 5". The retrieved data is' 10111
The process which is 001 'is performed.

【0036】ここでは、上記より4ビット‘1011’
を使用する。実際に使用したビット数=4をbit
ointerに加算する。ビットポインタbit po
interのビット3は1になっている。ev od
lagのビット3は0で、異なる。このため、ソースア
ドレスsource adrsより1バイトを取り出す
($8002の内容$C6が取り出される)。
Here, from the above, 4 bits "1011"
To use. Number of bits actually used = 4 bit p
Add to Ointer. Bit pointer bit po
Bit 3 of inter is 1. ev od f
Bit 3 of lag is 0, which is different. For this reason,
Dress source fetch 1 byte from adrs
(Content $ C6 of $ 8002 is retrieved).

【0037】最新格納データ情報ev od flag
が0なので、取り出したデータは、「偶数データレジス
タ」に格納する。ソースアドレスsource adr
sに1を加える、ソースアドレスsource adr
s=$8003になる。
Latest stored data information ev od flag
Is 0, the fetched data is stored in the "even data register". Source address source adr
Add 1 to s, source address source adr
It becomes s = $ 8003.

【0038】最新格納データ情報ev od flag
を更新する。最新格納データ情報ev od flag
=8になる。ビットポインタbit pointerの
下位4ビットは‘1001’(=0)であるから、「シ
フトデータレジスタ9」より1バイトを取り出す。取り
出したデータは‘10010011’である。
Latest stored data information ev od flag
To update. Latest stored data information ev od flag
= 8. Bit pointer bit Since the lower 4 bits of the pointer are "1001" (= 0), one byte is taken out from the "shift data register 9". The extracted data is '10010011'.

【0039】処理を行う。ここでは、上記より4ビット
‘1001’を使用する。実際に使用したビット数=4
をビットポインタbit pointerに加算する。
Processing is performed. Here, 4 bits '1001' are used from the above. Number of bits actually used = 4
The bit pointer bit Add to pointer.

【0040】ビットポインタbit pointerの
第3ビットは1になっている。ev od flagのビ
ット3は0で、異なるため、ステップS1−4を実行す
る。図6にアドレスのメモリマップの例を示す。図7は
実際にデータの読み書きを行った場合の例で、原データ
{$68,$5C,$15,…}があったとし、最初の
2バイトを偶数データレジスタおよび奇数データレジス
タにセットした時の、各シフトレジスタをリードした時
の値を示す。このように、任意のビットバウンダリから
8ビット単位で読み出せることがわかる。また、マスク
レジスタの設定値を変更すれば、余分なビットを取り去
り、7ビット以下にしたビット列も読み出すことができ
る。
Bit pointer bit pointer
The third bit is 1. ev od Flag of flag
Since step 3 is 0, which is different, step S1-4 is executed.
It FIG. 6 shows an example of a memory map of addresses. Figure 7
In the example of actually reading and writing data, the original data
If there is {$ 68, $ 5C, $ 15, ...}, the first
2 bytes for even data register and odd data register
When each shift register is read when set to
Indicates the value of. Like this from any bit boundary
It can be seen that the data can be read in 8-bit units. Also a mask
Remove extra bits by changing register settings
It is also possible to read a bit string with 7 bits or less.
It

【0041】この例では、「ビットバウンダリ0:シフ
トデータレジスタ」から「ビットバウンダリ7:シフト
データレジスタ」までは、原データの先頭からの連続し
たビット列が得られるが、「ビットバウンダリ8:シフ
トデータレジスタ」から「ビットバウンダリF:シフト
データレジスタ」までを読み出すと、正しいビット列が
得られない。これらのレジスタにアクセスするとき、偶
数データレジスタには原データの3バイト目($15)
をセットしておく。即ち、原データの0〜7ビット目か
ら始まるビット列を使用する場合には偶数データレジス
タ、奇数データレジスタにはそれぞれ、原データの1バ
イト目と2バイト目を書き込んでおき、原データの8〜
15ビット目から始まるビット列を使用する場合には偶
数データレジスタ,奇数データレジスタにはそれぞれ、
原データの3バイト目と2バイト目を、原データの16
〜23ビット目から始まるビット列を使用する場合には
偶数データレジスタ、奇数データレジスタにはそれぞ
れ、原データの3バイト目と4バイト目を、というよう
に、偶数データレジスタ,奇数データレジスタの内容は
8ビット増加する毎に、交互に更新していく必要があ
る。
In this example, from "bit boundary 0: shift data register" to "bit boundary 7: shift data register", continuous bit strings from the beginning of the original data are obtained, but "bit boundary 8: shift data register" is obtained. When reading from "register" to "bit boundary F: shift data register", a correct bit string cannot be obtained. When accessing these registers, the 3rd byte ($ 15) of the original data is stored in the even data register.
Set. That is, when a bit string starting from the 0th to 7th bits of the original data is used, the 1st and 2nd bytes of the original data are written to the even data register and the odd data register respectively, and the 8th to 8th bits of the original data are written.
When using the bit string starting from the 15th bit, the even data register and the odd data register are
The 3rd and 2nd bytes of the original data are replaced with 16
When using a bit string starting from the 23rd bit, the contents of the even data register and the odd data register are as follows: the even data register and the odd data register are the third and fourth bytes of the original data, respectively. It must be updated alternately every time 8 bits are added.

【0042】本実施例では、レジスタの幅を全て8ビッ
トとしたが、使用するMPUや処理内容によってレジス
タのビット幅を変更してもよい。また、原データのレジ
スタサイズおよびシフトデータのレジスタのビット幅を
一致させる必要もない。本実施例によれば、通常MPU
は1バイト、8ビット単位のビットバウンダリでしかア
クセスするMPUを用いて、MPUからは通常の1バイ
ト、8ビット単位でのアクセスで、同じ速度で、任意の
ビットバウンダリで所望のビット列を取り出すとが可能
となる。しかも、あるビット列を取り出した後、連続す
る次のビット列へアクセスする時は、前に取り出したビ
ット列のビット長をアドレスに加算するだけで良く、処
理が非常に簡単になる。
In this embodiment, the register width is all 8 bits, but the register bit width may be changed depending on the MPU used and the processing contents. Further, it is not necessary to match the register size of the original data and the bit width of the shift data register. According to this embodiment, the normal MPU
Is an MPU that can be accessed only in 1-byte 8-bit units, and when the desired bit string is extracted from the MPU in normal 1-byte and 8-bit units at the same speed and at an arbitrary bit boundary. Is possible. In addition, when accessing a next successive bit string after extracting a certain bit string, all that is necessary is to add the bit length of the previously extracted bit string to the address, which simplifies the processing.

【0043】また、バイパス15aを用いて逆にマルチ
プレクサ18側よりデータを書き込んだ後、偶数データ
レジスタ17−1および奇数データレジスタ17−2を
読み出すことで、任意のビットバウンダリでデータを書
き込むこともできる。更に、上述のように、マルチプレ
クサ18より出力されたデータとマスクレジスタ19−
2に格納されているデータとの間で論理積を行い、その
結果を得るように構成することで、取り出すビット長を
変更することができる。
It is also possible to write data at an arbitrary bit boundary by reading data from the even-numbered data register 17-1 and odd-numbered data register 17-2 after writing data from the multiplexer 18 side by using the bypass 15a. it can. Further, as described above, the data output from the multiplexer 18 and the mask register 19-
The bit length to be taken out can be changed by performing a logical product with the data stored in 2 and obtaining the result.

【0044】図8に本発明の第2実施例のブロック図を
示す。同図中、図2と同一構成部分には同一符号を付
し、その説明は省略する。本実施例はバッファレジスタ
を設けず、メモリから直接データを読み込む構成とした
ものである。通常はアドレスが+1することで、アクセ
スするデータ位置は+1バイトされるが、任意ビットバ
ウンダリによるアクセスではアドレスが+8されてアク
セスデータが+1バイト変化する。そのため、ビットバ
ウンダリアクセスでは物理メモリ容量の8倍の仮想メモ
リ空間を設ける。
FIG. 8 shows a block diagram of the second embodiment of the present invention. 2, those parts which are the same as those corresponding parts in FIG. 2 are designated by the same reference numerals, and a description thereof will be omitted. In this embodiment, the buffer register is not provided and the data is directly read from the memory. Normally, when the address is incremented by 1, the data position to be accessed is incremented by +1 byte, but in the access by the arbitrary bit boundary, the address is incremented by 8 and the access data is changed by +1 byte. Therefore, in the bit boundary access, a virtual memory space that is eight times the physical memory capacity is provided.

【0045】メモリ31は偶数データ格納用メモリ32
と奇数データ格納用メモリ33からなり、メモリ31に
接続されるアドレスバスはアドレス生成部34で通常の
アクセス用のものと、任意ビットバウンダリアクセス用
の2種類のアドレスに分けられ、マルチプレクサ35,
36によってどちらかが選択される。通常アクセス用の
アドレスはアドレスバスから得られるアドレスと同じア
ドレスであるが、ビットバウンダリアクセス時のアドレ
スはアドレスバスの下位数ビットをマルチプレクサ18
のセレクト信号用に切り捨て、残りの上位アドレスを右
シフトして得る。切り捨てるビット数はメモリのデータ
バス幅により異なる。偶数データ格納用メモリ32をビ
ットバウンダリアクセスする場合にはアドレスが+1さ
れる場合が存在するため、加算器38が必要となる。こ
の加算器38でアドレスをそのまま使用するか+1して
使用するかを決定する。マルチプレクサ18は図2のも
のと同様で、アドレス生成部34で切り捨てたビットに
その上位1ビットを加えたにより決定されるビットバウ
ンダリからのビット列を出力する。マルチプレクサ37
は通常のアクセス用のデータバスとビットバウンダリア
クセスでのデータのどちらを使用するかを切り替える。
The memory 31 is an even data storage memory 32.
The address bus connected to the memory 31 is divided into two kinds of addresses for normal access and arbitrary bit boundary access by the address generator 34, and the multiplexer 35,
Either is selected by 36. The address for normal access is the same as the address obtained from the address bus, but the address at the time of bit boundary access uses the lower-order bits of the address bus in the multiplexer 18
It is rounded down for the select signal of, and the remaining upper address is right-shifted and obtained. The number of bits to be discarded depends on the data bus width of the memory. When the bit boundary access is made to the even data storage memory 32, there is a case where the address is incremented by 1. Therefore, the adder 38 is required. This adder 38 determines whether the address is used as it is or is incremented by one. The multiplexer 18 is similar to that of FIG. 2, and outputs a bit string from the bit boundary determined by adding the upper 1 bit to the bits truncated by the address generator 34. Multiplexer 37
Switches between using the data bus for normal access and the data for bit boundary access.

【0046】[0046]

【発明の効果】上述の如く、本発明の請求項1によれ
ば、任意のビットバウンダリから連続するビット列を抽
出する処理をビットバウンダリ保持手段とビット列選択
手段とにより行なうことができ、データ処理手段は必要
とするビット列を含むビットバウンダリ及びビットバウ
ンダリから必要とするビット列を選択する選択信号を供
給するだけで必要なビット列を得ることができるため、
データ処理手段での処理の負担を軽減でき、データ処理
を効率的に行なえる等の特長を有する。
As described above, according to claim 1 of the present invention, the processing for extracting a continuous bit string from an arbitrary bit boundary can be performed by the bit boundary holding means and the bit string selecting means, and the data processing means. Can obtain the required bit string simply by supplying a bit boundary including the required bit string and a selection signal for selecting the required bit string from the bit boundary.
It has features that the processing load on the data processing means can be reduced and the data processing can be performed efficiently.

【0047】請求項2によれば、ビットバウンダリ保持
部及びビット列選択手段を専用ハードウェアで構成する
ことにより、ビット列の抽出を高速に行なうことができ
る等の特長を有する。請求項3によれば、マスク手段を
設けることにより取り出したビット列り不要なビット部
分をカットすることができるため、必要なデータのみを
取り出すことができ、データ処理手段での処理を容易に
することができる等の特長を有する。
According to the second aspect of the present invention, the bit boundary holding unit and the bit string selecting means are composed of dedicated hardware, so that the bit string can be extracted at high speed. According to the third aspect, since the unnecessary bit portion of the extracted bit string can be cut by providing the mask means, only necessary data can be extracted and the processing by the data processing means is facilitated. It has features such as being able to.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

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

【図3】本発明の第1実施例のビット列抽出回路のブロ
ック図である。
FIG. 3 is a block diagram of a bit string extraction circuit according to the first embodiment of the present invention.

【図4】本発明の第1実施例の動作フローチャートであ
る。
FIG. 4 is an operation flowchart of the first embodiment of the present invention.

【図5】本発明の第1実施例の動作説明図である。FIG. 5 is an operation explanatory diagram of the first embodiment of the present invention.

【図6】本発明の第1実施例の動作説明図である。FIG. 6 is an operation explanatory diagram of the first embodiment of the present invention.

【図7】本発明の第1実施例の動作説明図である。FIG. 7 is an operation explanatory diagram of the first embodiment of the present invention.

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

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

1 データ処理手段 2 ビットバウンダリ保持手段 3 ビット列選択手段 10 データ処理装置 11 MPU 12 ビット列抽出回路 13 メモリ 14 入出力部 1 data processing means 2 bit boundary holding means 3 bit string selecting means 10 data processing device 11 MPU 12 bit string extracting circuit 13 memory 14 input / output unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 任意のビットバウンダリから連続したビ
ット列を抽出するデータ処理装置において、 所望のビット列を選択して所定の処理を行なうデータ処
理手段と、 前記データ処理手段で処理されるビット列を含むビット
バウンダリを保持する保持手段と、 前記保持手段に保持された前記ビットバウンダリの各ビ
ットのデータが供給され、前記データ処理手段から前記
所望のビット列に投じて供給される選択信号に応じて連
続するビット列を選択出力する選択手段とを有すること
を特徴とするデータ処理装置。
1. A data processing device for extracting a continuous bit string from an arbitrary bit boundary, comprising a data processing means for selecting a desired bit string and performing a predetermined process, and a bit including a bit string processed by the data processing means. Holding means for holding a boundary, data of each bit of the bit boundary held by the holding means is supplied, and a continuous bit string according to a selection signal supplied by the data processing means by throwing in the desired bit string. And a selection means for selectively outputting the data processing device.
【請求項2】 前記ビットバウンダリ保持手段及び前記
ビット列選択手段とは専用ハードウェアにより構成され
たことを特徴とする請求項1記載のデータ処理装置。
2. The data processing device according to claim 1, wherein the bit boundary holding means and the bit string selection means are configured by dedicated hardware.
【請求項3】 前記選択手段によって選択出力されたビ
ット列より不要なビットをマスクするマスク手段を有す
ることを特徴とする請求項1又は2記載のデータ処理装
置。
3. The data processing apparatus according to claim 1, further comprising masking means for masking unnecessary bits from the bit string selected and output by the selecting means.
JP2301895A 1995-02-10 1995-02-10 Data processing device Withdrawn JPH08221247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2301895A JPH08221247A (en) 1995-02-10 1995-02-10 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2301895A JPH08221247A (en) 1995-02-10 1995-02-10 Data processing device

Publications (1)

Publication Number Publication Date
JPH08221247A true JPH08221247A (en) 1996-08-30

Family

ID=12098756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2301895A Withdrawn JPH08221247A (en) 1995-02-10 1995-02-10 Data processing device

Country Status (1)

Country Link
JP (1) JPH08221247A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009094694A (en) * 2007-10-05 2009-04-30 Oki Semiconductor Co Ltd Table data generation apparatus and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009094694A (en) * 2007-10-05 2009-04-30 Oki Semiconductor Co Ltd Table data generation apparatus and method

Similar Documents

Publication Publication Date Title
KR880000298B1 (en) Multiword memory data storage and addressing technique and apparatus
JP3188467B2 (en) Minimum / maximum value search device
JPS60146368A (en) Binary image stretching method
JPH05265922A (en) Direct memory access controller
US5206942A (en) Partially storing control circuit used in a memory unit
JPS6041769B2 (en) Addressing method
JPH08221247A (en) Data processing device
US7159078B2 (en) Computer system embedding sequential buffers therein for performing a digital signal processing data access operation and a method thereof
JPS6211736B2 (en)
US20040054873A1 (en) Indirect indexing instructions
KR920002573B1 (en) Data processor
JPS6244661B2 (en)
JP3043861B2 (en) Data processing device
JPS6236258B2 (en)
JP3222647B2 (en) Automatic memory bank switching system
CN1297887C (en) Processor capable of aligning multiple register data across boundaries and method thereof
JPS6230455B2 (en)
JP2576589B2 (en) Virtual storage access control method
JPS6211426B2 (en)
JP2889479B2 (en) Histogram construction circuit
JPS6081660A (en) Data transfer method
JPH0646381B2 (en) Instruction fetching device
JPH06301600A (en) Storage device
JPS6214919B2 (en)
JPS59180635A (en) Method for controlling prefetch of instruction

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