JPS60159934A - Decimal code adding circuit - Google Patents

Decimal code adding circuit

Info

Publication number
JPS60159934A
JPS60159934A JP59014271A JP1427184A JPS60159934A JP S60159934 A JPS60159934 A JP S60159934A JP 59014271 A JP59014271 A JP 59014271A JP 1427184 A JP1427184 A JP 1427184A JP S60159934 A JPS60159934 A JP S60159934A
Authority
JP
Japan
Prior art keywords
data
code
processed
circuit
output
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
Application number
JP59014271A
Other languages
Japanese (ja)
Inventor
Tei Ishikawa
石川 禎
Kazutoshi Eguchi
江口 和俊
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP59014271A priority Critical patent/JPS60159934A/en
Publication of JPS60159934A publication Critical patent/JPS60159934A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a decimal code adding circuit which does not require a position matching circuit for adding a code, by constituting so that the code can be added to an optional position of a processing object data. CONSTITUTION:An input data line 10 leads a processing object data DI, and inputs it to a selecting circuit 20. A selector 21 becomes an output permitted state when an E input is low, and becomes an output high impedance when said input is high. A selector 22 is always in an output permitted state. A control signal ZONE for showing whether a data format of a data to be processed is a pack format or a zone format is supplied to a terminal E of the selector 21. Also, code adding position information SP of 2 bit is supplied to a terminal S of the selectors 21, 22. The information SP is supplied from a code adding position determining circuit 30, and indicates which byte part of the data DI on the input data line 10 the code adding position becomes, that is to say, which of DI0-DI3 it becomes.

Description

【発明の詳細な説明】 〔発明の技術分野〕 この発明は、パック形式とゾーン形式の10進データが
適用されるデータ処理装置に好適する10進数符号付加
回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a decimal code adding circuit suitable for a data processing device to which packed format and zone format decimal data are applied.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

10進数の表現形式には、パック形式とシー、ン形式が
ある。/ぐツク形式では、1品進数1桁が4ビツトで表
現されるので、第1鯖に示すように1バイトで2桁の1
0進数が表現される。
There are two formats for representing decimal numbers: pack format and scene format. In the /gutsuku format, one digit of a one-digit decimal number is expressed in four bits, so one byte can represent two digits as shown in the first column.
A 0-decimal number is represented.

また符号Sは最下位バイトの下位4ビツトで表わされる
。S=+Cで正、S=すDで負を示す。
Further, the code S is represented by the lower 4 bits of the least significant byte. S=+C indicates positive, S=suD indicates negative.

なお記号すは16進表現を示す。これに対し、ゾーン形
式では、10進数1桁が1バイトで表現される。ゾーン
形式には第2図(、)〜(d)に示す如く4通シの形式
がある。第2図(、)は符号後置きの符号混在型を示し
、第2図(b)は同じく符号分離型を示す。また、第2
図(C)は符号前置きの符号混在型を示し、第2図(d
)は同じく符号分離型を示す。なお、Zl(1=1.2
.・・・n)はゾーン(z1=22=・・・=zn=z
)、Dt(1=1 t 2 t”’n )は10進数で
ある。zlnt(1=1 、2 、 ・n )の部分は
、1バイトで数値1桁を表わす。また、SDi (l 
= 1121−n )の部分は、1バイトで符号と数値
1桁を表わし、S*の部分は、1バイトで符号のみを表
わす。
Note that symbols indicate hexadecimal representation. On the other hand, in the zone format, one decimal digit is expressed in one byte. There are four zone formats as shown in FIGS. 2(a) to 2(d). FIG. 2(,) shows a code-mixed type in which the code is placed after the code, and FIG. 2(b) similarly shows a code-separated type. Also, the second
Figure (C) shows the code mixed type of code prefix, and Figure 2 (d)
) also indicates the code-separated type. In addition, Zl (1=1.2
.. ...n) is the zone (z1=22=...=zn=z
), Dt (1=1 t 2 t”'n ) is a decimal number. The part zlnt (1=1 , 2 , ・n ) represents one digit of the numerical value with one byte. Also, SDi (l
= 1121-n) represents a code and one digit of a numerical value in one byte, and the S* part represents only a code in one byte.

この種の形式で表現された10進数は、10進演算回路
などで演算され、演算結果に応じた符号を付加されて、
メモリ或いはレジスタにストアされる。この符号付加は
、符号付加回路によって行なわれる。従来の符号付加回
路では、入力データ(処理対象データ)の特定の位置に
符号が付加される。一般に演算の対象となる10進数の
データ長(桁数)は不定である。したがって、符号付加
回路を用いて演算結果に符号を付加するためには、演算
結果の符号を表現するバイトを、符号付加回路において
符号付加可能な位置に位置合せする位置合せ回路が必要
である。また、符号付加回路によシ符号付加されたデー
タ(演算結果)をメモリ等に出力するためには、当該デ
ータの位置をそれを受ける側の回路の仕様に応じて正し
く位置合せする位置合せ回路が必要である。即ち、従来
の符号付加回路を備えたデータ処理装置では、符号付加
回路の前段および後段にそれぞれ位置合せ回路を必要と
する欠点があった。
A decimal number expressed in this type of format is calculated by a decimal calculation circuit, etc., and a sign is added according to the calculation result.
Stored in memory or registers. This code addition is performed by a code addition circuit. In a conventional code adding circuit, a code is added to a specific position of input data (data to be processed). Generally, the data length (number of digits) of a decimal number that is the object of an operation is undefined. Therefore, in order to add a code to a calculation result using a code addition circuit, a positioning circuit is required to align the byte representing the code of the calculation result to a position where the code can be added in the code addition circuit. In addition, in order to output the data (calculation results) added with a code by the code addition circuit to a memory, etc., a positioning circuit is required to correctly align the position of the data according to the specifications of the receiving circuit. is necessary. That is, a conventional data processing device equipped with a code addition circuit has the disadvantage that alignment circuits are required before and after the code addition circuit.

〔発明の目的〕[Purpose of the invention]

この発明は上記事情に鑑みてなされたものでその目的は
、処理対象データの任意の位置に符号付加が行なえ、も
って符号付加のための位置合せ回路を不要にできる10
進数符号付加回路を提供することにある。
This invention was made in view of the above circumstances, and its purpose is to add a code to any position of the data to be processed, thereby eliminating the need for a positioning circuit for adding the code.
The object of the present invention is to provide a base number code addition circuit.

〔発明の概要〕[Summary of the invention]

この発明では、可変長の被処理データ或いはその分割デ
ータを含む10進の処理対象データを導く入力データラ
インと、符号部位置を決定する符号位置決定手段と、符
号部データを生成する符号生成手段と、この符号生成手
段によって生成された符号部データを、符号付加指定情
報に応じ、符号位置決定手段によって決定された、被処
理データの、その該当位置に付加(設定)する符号付加
手段とが設けられる。符号位置決定手段は、ツクツク形
式10進数を扱うデータ処理装置では、□被処理データ
のデータ長に関する亀1種情報、およびデータ書き込み
光領域のメモリ先頭アドレスに関する第2種情報に基づ
いて処理対象データにおける符号部位置を決定する。ま
た、符号生成手段は、被処理データの正、負に応じ符号
部データを生成する。これに対し、少なくともゾーン形
式10進数を扱うデータ処理装置では、符号位置決定手
段は、上記第1種および第2種情報、更には符号部が前
置きであるか後置きであるかを示す第3種情報に基づい
て符号部位置を決定する。また、符号生成手段は、被処
理データの正、負、データ形式、更には必要があれば処
理対象データにおける符号付加位置のデータに応じ符号
部データを生成する。
In this invention, an input data line for guiding decimal data to be processed including variable-length data to be processed or its divided data, code position determining means for determining the position of a code part, and code generating means to generate code part data are provided. and a code addition means that adds (sets) the code part data generated by the code generation means to the corresponding position of the processed data determined by the code position determination means according to the code addition designation information. provided. In a data processing device that handles decimal format decimal numbers, the code position determining means determines the data to be processed based on type 1 information regarding the data length of the data to be processed and type 2 information regarding the memory start address of the data writing optical area. Determine the code part position in . Further, the code generation means generates code part data depending on whether the data to be processed is positive or negative. On the other hand, in a data processing device that handles at least a zoned decimal number, the code position determination means uses the first type and second type information, and also the third type information indicating whether the code part is a prefix or a postfix. The code part position is determined based on the species information. Further, the code generation means generates code part data according to the positive, negative, data format of the data to be processed, and further, if necessary, the data of the code addition position in the data to be processed.

〔発明の実施例〕[Embodiments of the invention]

第3図は、この発明の一実施例に係る10進数符号付加
回路の回路構成を示す。なお、この実施−例回路で取シ
扱われる処理対象データのデータ長は32ビツト(4バ
イト)である。第3図において、10は(可変長の被処
理データ或いはその分割データを含む)処理対象データ
DIを導く例えば4バイト幅の入力データライン、20
は選択回路である。選択回路20はセレクタ21.22
から、なる。セレクタ21は端子S。
FIG. 3 shows a circuit configuration of a decimal code adding circuit according to an embodiment of the present invention. The data length of the data to be processed handled by this embodiment circuit is 32 bits (4 bytes). In FIG. 3, 10 is, for example, a 4-byte wide input data line that leads to processing target data DI (including variable-length processing data or its divided data), and 20
is a selection circuit. The selection circuit 20 includes selectors 21 and 22.
From, it becomes. Selector 21 is terminal S.

Eを有し、セレクタ22は端子Sを有する。セレクタ2
1.22は、S入力(2ビツト)に応じ、データDIを
構成する4個の1バイトデータDI。〜DI3の各上位
4ビツト、各下位4ビツトのうちの1つを選択する。こ
のセレクタ21はE入力が”LOW”のとき出力許可状
態となシ、同じ(”HIGH”のとき出力ハイ・インピ
ーダンスとなる。これに対し、セレクタ22は出力制御
機能を有しておらず、常時出力許可状態となっている。
The selector 22 has a terminal S. Selector 2
1.22 is four 1-byte data DI that constitutes data DI according to the S input (2 bits). - Select one of each of the upper 4 bits and each of the lower 4 bits of DI3. This selector 21 is in the output permission state when the E input is "LOW", and is in the output high impedance state when the E input is "HIGH".On the other hand, the selector 22 does not have an output control function, Output is always enabled.

セレクタ21の端子Eには、(被処理データの)データ
形式がパック形式、ゾーン形式のいずれであるかを示す
制御信号ZONB(”HIGH”でゾーン形式を示す)
が供給される・また、セレクタ21.22の端子Sには
2ビツトの符号付加位置情報SPが供給される。情報S
Pは、符号付加位置決定回路30から供給されるもので
、符号付加位置(符号部データ設定バイト位置)が入力
データライン10上のデータDIのどのバイト部分と々
るか(即ちDI、〜D工3のいずれとなるか)を示す。
A control signal ZONB (“HIGH” indicates the zone format) indicating whether the data format (of the data to be processed) is a pack format or a zone format is connected to the terminal E of the selector 21.
Also, 2-bit code addition position information SP is supplied to the terminals S of the selectors 21 and 22. Information S
P is supplied from the code addition position determining circuit 30, and determines which byte part of the data DI on the input data line 10 the code addition position (code section data setting byte position) is targeted to (i.e., DI, ~D 3).

ここで、符号付加位置決定回路30の符号付加位置決定
論理について説明する。まず、この決定論理の理解を容
易にするために、演算結果の主記憶へのデータ転送につ
いて述べる。この実施例において、符号付加回路は10
進演算装V(図示せず)の出力段に設けられている。符
号付加回路によって符号を付加されたデータは、演算の
結果として主記憶制御回路(図示せず)に転送される。
Here, the code addition position determination logic of the code addition position determination circuit 30 will be explained. First, to facilitate understanding of this decision logic, we will describe data transfer of calculation results to main memory. In this example, the sign addition circuit is 10
It is provided at the output stage of a decimal arithmetic unit V (not shown). The data added with a code by the code addition circuit is transferred to a main memory control circuit (not shown) as a result of the operation.

そして、演算結果は、データの長さやデータ書き込みメ
モリ先頭アドレスに応じ、主記憶制御回路に用意された
書き込みモードを最適に組合せた形で、主記憶に書き込
まれる。この例では、書き込みモードとして、MF′w
(フルワード境界からのメモリアルワードライト)、M
Hw(ハーフワード境界からのメモリバー7ワードライ
ト)、MBW(バイト境界からのメモリバイトライト)
の3種類が用意されておシ、データは常に上位よシ主記
憶に転送される。
The calculation results are then written into the main memory in an optimal combination of write modes provided in the main memory control circuit, depending on the length of the data and the data write memory start address. In this example, as the write mode, MF'w
(Memorial word write from full word boundary), M
Hw (memory bar 7 word write from half word boundary), MBW (memory byte write from byte boundary)
There are three types available: data is always transferred to the upper level and main memory.

この場合における、データの主記憶中の位置と転送シー
ケンスの例を第4図(、)〜(d)に示す。なお、1ワ
ードは4バイトであシ、第4図(、)はバイト位置「0
」(フルワード境界)からの1乃至5バイト書き込み状
態と転送シーケンス(○卵内の数値で示される)、第4
図(b)はバイト位置「1」(のバイト境界)からの1
乃至5バイト書き込み状態と転送シーケンスを示す。ま
た、第4図(c)はバイト位置「2」(のハーフワード
境界)からの1乃至5バイト書き込み状態と転送シーケ
ンス、第4図(d)はバイト位置「3」(のバイト境界
)からの1乃至5バイト書き込み状態と転送シーケンス
を示す。この例では、主記憶制御回路に書き込みデータ
を供給するパスのデータ幅は4バイト(32ビツト)で
ある。
Examples of the data location in the main memory and the transfer sequence in this case are shown in FIGS. 4(,) to (d). Note that one word consists of 4 bytes, and Figure 4 (,) indicates the byte position "0".
” (full word boundary) 1 to 5 byte write status and transfer sequence (indicated by the number inside the circle), 4th
Figure (b) shows 1 from byte position “1” (byte boundary)
to 5-byte write state and transfer sequence are shown. Also, Fig. 4(c) shows the write state and transfer sequence of 1 to 5 bytes from byte position ``2'' (halfword boundary), and Fig. 4(d) shows the transfer sequence from byte position ``3'' (halfword boundary). 1 to 5 byte write status and transfer sequence are shown. In this example, the data width of the path that supplies write data to the main memory control circuit is 4 bytes (32 bits).

MFW (4バイト書き込み)以外の書き込みモード(
I1M/、MBW )の場合には、書き込みデータは、
このパス上を右詰めで転送される。この実施例では、符
号付加回路の処理データ幅は、上記パスのデータ幅に一
致している。そして、符号付加回路には、書き込みデー
タが、第3図に示す入力データライン10において右詰
めにされた形で供給される。
Write modes other than MFW (4-byte write)
I1M/, MBW), the write data is
Data is transferred right-aligned along this path. In this embodiment, the processing data width of the code addition circuit matches the data width of the path. Then, the write data is supplied to the code addition circuit in a right-aligned form on the input data line 10 shown in FIG.

ここで、入力データライン10上のデータ(処理対象デ
ータDI)と符号付加位置(符号部データ設定バイト位
置)との関係について述べる。まず、符号後置き(第1
図、第2図(a)。
Here, the relationship between the data on the input data line 10 (processing target data DI) and the code addition position (code section data setting byte position) will be described. First, the code suffix (first
Figure 2(a).

(b)参照)の場合、符号付加位置は、入力データライ
ン10上のデータの長さく4バイト、2バイト、1バイ
ト)に無関係に、最下位パイト(入力データライン10
上の、ノ々イト位置「3」のデータ部分)となる。これ
は、上述したように、書き込みデータが、入力データラ
イン10において右詰めにされた形で供給されることに
よる。これに対し、符号前置き(第2図(c) 、 (
d)参照)の場合、符号付加位置はデータの長さ、デー
タ書き込みメモリ先頭アドレスによって異なる。
(b)), the sign addition position is the lowest byte (input data line 10), regardless of the length of the data on input data line 10 (4 bytes, 2 bytes, 1 byte).
(The data part of Nonoito position "3" above). This is because, as described above, the write data is supplied in a right-justified form on the input data line 10. In contrast, the code prefix (Figure 2 (c), (
In the case of (see d)), the code addition position differs depending on the data length and the data writing memory start address.

まず、メモリ先頭アドレスの下位2ビツトが”oo”、
即ちバイト位置「0」(フルワード境界)からの書き込
みの場合、誉き込みデータ(被処理データ)のデータ長
が1バイトであれば、符号付加位置は入力データライン
10上の79イト位置「3」(最下位バイト位置)のデ
ータ部分となる。同じくデータ長が2バイトであれば、
符号付加位置は入力データライン10上の・ぐイト位置
「2」のデータ部分となる。また、データ長が3バイト
であれば、第4図(、)に示すように最初に2バイトが
転送されるため、符号付加位置は、データ長が2バイト
のときと同様に、バイト位置「2」となる。また、デー
タ長が4バイトであれば、符号付加位置はバイト位置「
0」(最上位バイト位置)となる。また、データ長が5
バイト以上であれば、最初に4バイトが転送されるため
、符号付加位置は、データ長が4バイトのときと同様に
、バイト位置「0」となる。但し、データ長が3バイト
の場合、および5バイト以上の場合には、2回目以降の
転送データに対する符号付加を禁止する必要がある。
First, the lower two bits of the memory start address are "oo",
That is, in the case of writing from byte position "0" (full word boundary), if the data length of the read data (data to be processed) is 1 byte, the code addition position is the 79 byte position "0" on the input data line 10. 3" (lowest byte position). Similarly, if the data length is 2 bytes,
The code addition position is the data portion at position "2" on the input data line 10. Also, if the data length is 3 bytes, 2 bytes are transferred first as shown in Figure 4 (,), so the code addition position is the same as when the data length is 2 bytes. 2". Also, if the data length is 4 bytes, the code addition position is byte position "
0” (most significant byte position). Also, the data length is 5
If it is more than a byte, 4 bytes are transferred first, so the code addition position becomes byte position "0", just like when the data length is 4 bytes. However, if the data length is 3 bytes or 5 bytes or more, it is necessary to prohibit the addition of codes to the second and subsequent transfer data.

次に、メモリ先頭アドレスの下位2ビツトがltQ l
 ff、即ちバイト位置「1」(のバイト境界)からの
書き込みの場合について説明する。この場合、第4図(
b)に示すように、書き込みデータのデータ長に無関係
に最初に1バイトが転送される。したがって、符号付加
位置は常に入力データライン10上のバイト位置「3」
のデータ部分となる。但し、データ長が2バイト以上の
場合には、2回目以降の転送データに対する符号付加を
禁止する必要がある。
Next, the lower two bits of the memory start address are ltQl
The case of writing from ff, that is, byte position "1" (byte boundary) will be explained. In this case, Figure 4 (
As shown in b), one byte is first transferred regardless of the data length of the write data. Therefore, the sign addition position is always byte position "3" on input data line 10.
This is the data part of However, if the data length is 2 bytes or more, it is necessary to prohibit adding codes to the second and subsequent transfer data.

次に、メモリ先頭アドレスの下位2ビツトが′10”、
即ちバイト位置「2」(のハーフワード境界)からの書
き込みの場合について説明する。まず、書き込みデータ
のデータ長が1バイトであれば符号付加位置は入力デー
タライン10上のバイト位置「3」のデータ部分となる
。これに対し、データ長が2バイト以上の場合、第4図
(、)に示すように、最初に2バイトが転送されるため
、符号付加位置は常に入力データライン10上のバイト
位置「2」のデータ部分となる。但し、データ長が3バ
イト以上の場合には、2回目以降の転送データに対する
符号付加を禁止する必要がある。
Next, the lower two bits of the memory start address are '10'',
That is, the case of writing from byte position "2" (halfword boundary) will be explained. First, if the data length of the write data is 1 byte, the code addition position is the data portion at byte position "3" on the input data line 10. On the other hand, when the data length is 2 bytes or more, as shown in FIG. This is the data part of However, if the data length is 3 bytes or more, it is necessary to prohibit the addition of codes to the second and subsequent transfer data.

最後に、メモリ先頭アドレスの下位2ビツトが11″、
即ちバイト位置「3」(のバイト境界)からの書き込み
の場合について説明する。
Finally, the lower two bits of the memory start address are 11'',
That is, the case of writing from byte position "3" (byte boundary) will be explained.

この場合、第4図(d)に示すように、書き込みデータ
のデータ長に無関係に最初に1バイトが転送される。し
たがって、符号付加位置は常に入力データライン10上
のバイト位置「3」のデータ部分となる。但し、データ
長が2バイト以上の場合には、2回目以降の転送データ
に対する符号付加を禁止する必要がある。
In this case, as shown in FIG. 4(d), one byte is first transferred regardless of the data length of the write data. Therefore, the sign addition position is always the data portion of byte position "3" on the input data line 10. However, if the data length is 2 bytes or more, it is necessary to prohibit adding codes to the second and subsequent transfer data.

以上の説明から明らかなように、入力データライン10
上のデータDIに対する符号付加位置(符号部データ設
定バイト位置)は、データ形式が符号前置きであるか後
置きであるか、被処理データの長さ、およびデータ書き
込みメモリ先頭アドレスの下位2ビツトによりて決定さ
れる。なお、データの長さについては、符号前置きで且
つメモリ先頭アドレスの下位2ビツトがOO”、′10
#のときに意味をもつ。そして、メモリ先頭アドレスの
下位2ビツトが′00#のときには、データ長が4バイ
ト以上であれば、符号付加位置はデータ長に無関係に一
定位置(バイト位置「0」)となる。同じくlO”のと
きには、データ長が2バイト以上であれば、符号付加位
置はデータ長に無関係に一定位置()ぐイト位置「2」
)となる。したがって、データの長さについては、デー
タの長さを示すデ−タ長情報の下位2ピツ) LENG
TH2と、データ長が4バイト以上あるか否かを示す信
号FULWDIとで代用可能である。
As is clear from the above description, the input data line 10
The code addition position (code part data setting byte position) for the above data DI depends on whether the data format is code prefix or postfix, the length of the data to be processed, and the lower two bits of the data write memory start address. Determined by Regarding the length of the data, the code prefix and the lower two bits of the memory start address are OO", '10
It has meaning when #. When the lower two bits of the memory start address are '00#', if the data length is 4 bytes or more, the code addition position is a fixed position (byte position '0') regardless of the data length. Similarly, when the data length is 2 bytes or more, the code addition position is fixed at a fixed position (2) regardless of the data length.
). Therefore, regarding the data length, the lower two bits of data length information indicating the data length) LENG
TH2 and a signal FULWDI indicating whether the data length is 4 bytes or more can be used instead.

そこで、この実施例では、以上の原理を踏まえて符号付
加位置決定回路30を構成している。
Therefore, in this embodiment, the code addition position determination circuit 30 is constructed based on the above principle.

この例において、符号付加位置決定回路3oは、第5図
に示すようにデータ長情報LENGTH2(2ビツト)
、信号FULWD 1 (論理“1”でデータ長が4バ
イト以上であることを示す)、データ書き込みメモリ先
頭アドレスの下位2ビツトADR82、および符号前置
きか否かを示す信号LEAD 1 (論理111#で符
号前置きであることを示す)からなる6ビツトの情報3
01に応じ、入力データライン10上のデータDIに対
する符号付加位置(符号部データ設定バイト位置)を示
す2ビツトの符号付加位置情報spを出力するように構
成されている。符号付加位置決定回路30の符号付加位
置決定論理を下記第1表に示す。
In this example, the code addition position determination circuit 3o receives data length information LENGTH2 (2 bits) as shown in FIG.
, signal FULWD 1 (logic "1" indicates that the data length is 4 bytes or more), lower 2 bits ADR82 of the data write memory start address, and signal LEAD 1 (logic 111# indicates whether or not the code is prefixed). 6-bit information 3 consisting of (indicating that it is a code prefix)
01, it is configured to output 2-bit code addition position information sp indicating the code addition position (code section data setting byte position) for the data DI on the input data line 10. The code addition position determination logic of the code addition position determination circuit 30 is shown in Table 1 below.

第1表 X = 1rrelevant 符号付加位置決定回路30は、情報301によってアド
レッシングされるROMである。
Table 1: X = 1 rrelevant The code addition position determination circuit 30 is a ROM addressed by information 301.

再び第3図を参照すると、40は符号生成回路である。Referring again to FIG. 3, 40 is a code generation circuit.

符号生成回路40には、セレクタ22からの出力221
と4ビツトの制御情報401が供給される。符号生成回
路40は、第6図に示すように符号生成用ROM 41
 、42からなる。
The code generation circuit 40 includes an output 221 from the selector 22.
and 4-bit control information 401 are supplied. The code generation circuit 40 includes a code generation ROM 41 as shown in FIG.
, 42.

符号生成用ROM 41 、42は出力221および情
報401の連結情報(8ビツト)によってアドレッシン
グされ、符号部データ(1バイト)の上位4ビツト40
2、下位4ビツト403を出力する。情報401は制御
信号(制御ビット)ZONE 、 5IGN 、 5P
RT 、 ABSOからなる。信号5IGNは符号の正
、負を示す(’HIGH”で負、”LOW”で正)。ま
た信号5PRTはゾーン形式のデータにおいて符号混在
型(第2図(、) 、 (c)参M)か或いは符号分離
型(第2図(b) 、 (d)参照)かを示しく“HI
GH”で符号分離型、′LOW“で符号混在型)、信号
AB 80は絶対値化の指定の有無を示す(”HIGH
″で指定有り、”LOW″で指定無し)0なお、信号Z
ONEについては前述の通シである。
The code generation ROMs 41 and 42 are addressed by the concatenation information (8 bits) of the output 221 and the information 401, and the upper 4 bits 40 of the code part data (1 byte)
2. Output the lower 4 bits 403. Information 401 is control signals (control bits) ZONE, 5IGN, 5P
It consists of RT and ABSO. Signal 5IGN indicates positive or negative sign ('HIGH' is negative, 'LOW' is positive). Also, signal 5PRT indicates mixed sign type in zone format data (see Figure 2(,), (c) M). “HI” indicates whether the
Signal AB80 indicates whether absolute value conversion is specified (“HIGH” indicates code-separated type; “LOW” indicates code mixed type).
” is specified, “LOW” is not specified) 0 In addition, the signal Z
The same applies to ONE as described above.

ここで符号生成用ROM 41 、42の符号生成論理
を説明するに際し、理解を容易にするために下記第2表
にゾーン形式10進数コード表を示す。
When explaining the code generation logic of the code generation ROMs 41 and 42, a zoned decimal code table is shown in Table 2 below to facilitate understanding.

さて、この実施例における符号生成論理は以下に示す通
シである。
Now, the code generation logic in this embodiment is generally as shown below.

a ) ZONE =″”x、ow’ (パック形式)
の場合5IGN−HIG)f′(正)、且つπ証=1H
IGH’(絶対値化指定無し)であれば 403=≠D ・・・(1) となる、それ以外であれば 403−4C・・・(2) となる。なお、出力402 (ROM 4 Jからの出
力)については、何であっても構わない。これは、zO
NE=″L、OW”(パック形式)の場合には、後述す
るように(ROM 41の出力402に代えて)セレク
タ21からの出力211が符号部データの上位4ビツト
として用いられることによる。
a) ZONE=″”x, ow' (pack format)
In the case of 5IGN-HIG) f' (positive), and π proof = 1H
If IGH' (absolute value conversion is not specified), 403=≠D (1); otherwise, 403-4C (2). Note that the output 402 (output from ROM 4 J) may be anything. This is zO
In the case of NE="L, OW" (packed format), the output 211 from the selector 21 (instead of the output 402 of the ROM 41) is used as the upper 4 bits of the code part data, as will be described later.

b) ZONE =″uxaH’ (ゾーン形式)、且
っ5PRT = ”I(IGH’ (符号分離m > 
(7)場合ABSO=″HIGH’ (絶対値化指定有
り)であれば、5IGNに無関係に 402=+2,403=+O・・・(3)となる。
b) ZONE = "uxaH' (zone format), and 5PRT = "I(IGH') (code separation m >
(7) If ABSO=“HIGH” (absolute value conversion specified), 402=+2, 403=+O (3) regardless of 5IGN.

一方、ABSO=″’LOW’ (絶対値化指定無し)
であれば、5IGNに依存し、もしS IGN = ”
HIGH” (負)であれば 402=42.403=+D ・・・(4)となシ、も
し5IGN = ”LOW”(正)であれば402=4
P2.403=すB ・・・(5)となる。
On the other hand, ABSO='''LOW' (no absolute value specified)
then depends on 5IGN, if S IGN = ”
If 5IGN = "LOW" (positive), then 402 = 42.403 = +D (4), if 5IGN = "LOW" (positive), 402 = 4
P2.403=B...(5).

c ) ZONg = ”HIGH’ (ゾーン形式)
、且つ5PRT = ”LOW”(符号混在型)の場合
5IGN = ”f(IGH” (正)、且つABSO
=6HIGH” (絶対値化指定無し)であれば 402.403はセレクタ22からの出力221をその
絶対値とする負の符号つき10進数の上位、下位 ・・
・(6) となり、それ以外であれば 402=≠3.403=出力221 ・・・(7)とな
る。
c) ZONg = “HIGH” (zone format)
, and when 5PRT = “LOW” (mixed code type), 5IGN = “f(IGH” (correct), and ABSO
=6HIGH" (no absolute value specified), 402.403 are the upper and lower decimal numbers with a negative sign whose absolute value is the output 221 from the selector 22...
・(6) Otherwise, 402=≠3.403=output 221 (7).

第3図において、50は符号生成回路40から出力され
る符号部データの上位4ビツト402が供給されるバッ
ファダートである。ノぐツファグート50は端子Eを有
し、E入力が’HIGH”のとき出力許可状態となり、
同じく“LOW”のとキ出力ハイ・インピーダンスとな
る。/々ツファダート50の端子Eには信号ZONFニ
ーが供給される。
In FIG. 3, reference numeral 50 denotes a buffer dart to which the upper 4 bits 402 of the code part data output from the code generation circuit 40 are supplied. The Nogutsu Fagut 50 has a terminal E, and when the E input is 'HIGH', the output is enabled.
Similarly, when it is "LOW", the output becomes high impedance. A signal ZONF knee is supplied to the terminal E of the TFA dart 50.

60は符号設定回路である。符号設定回路60はセレク
タ616〜613およびデコーダ(2to4デコーダ)
62からなる。セレクタ6Jo〜613の″′1#側入
力部には、入力データライン10上のデータD I6 
=D I3が供給される。一方、セレクタ61.〜61
3の″′0#側入力部には、セレクタ21からの出力2
11とノ々ツファr−) 50からの出力51とのワイ
アード・オア出力(4ビツト)、および符号生成回路4
0からの出力403(符号部データの下位4ビツト)の
連結情報(1バイト)が、真の符号部データSDとして
共通に供給される。セレクタ610〜6ハは端子Sを有
しており、S入力に応じて”′1″側入力データ(DI
o=DIs)、または″0#側入力データ(8D)のい
ずれか一方を選択出力する。セレクタ61.o〜613
の各選択出力は、連結され、処理対象データDIに対す
る符号付加データDOとして外部に出力される。デコー
ダ62には符号付加位置決定回路30からの符号付加位
置情報5P(2ビツト)が供給される。デ=−ダ62は
端子Eを有しておυ、E入力がLOW”のときイネーブ
ル状態となる。デコーダ62は、イネーブル状態のとき
、情報SPをデコードし、信号DECO= DEC3F
) 1 ツを′L0w#(’o’ )にする6また、デ
コーダ62は、E入力が’HIGH”のとき、情報sp
に無関係に信号DEQ〜DEC3を全て”HIGH’(
”1”)にする。デコーダ62の端子Eには制御信号5
ATHが供給される。信号5ATHは、第3図の符号付
加回路で符号付加を禁止する場合、例えば4バイトより
長い被処理データ(書も込みデータ)を数回に分けて出
力する場合や、符号付加を行なわず単にデータを通過さ
せたい場合などに用いられ・る。
60 is a code setting circuit. The code setting circuit 60 includes selectors 616 to 613 and a decoder (2to4 decoder)
It consists of 62. The data DI6 on the input data line 10 is input to the ``'1# side input section of the selectors 6Jo to 613.
=DI3 is supplied. On the other hand, selector 61. ~61
The output 2 from the selector 21 is input to the ``0# side input section of 3.
Wired OR output (4 bits) of the output 51 from the output 50 (4 bits) and the code generation circuit 4
The concatenated information (1 byte) of the output 403 (lower 4 bits of the code part data) from 0 is commonly supplied as the true code part data SD. The selectors 610 to 6C have a terminal S, and depending on the S input, input data on the "'1" side (DI
o=DIs) or ``0# side input data (8D).Selectors 61.o to 613
The respective selected outputs are concatenated and outputted to the outside as coded data DO for the processing target data DI. The decoder 62 is supplied with code addition position information 5P (2 bits) from the code addition position determination circuit 30. The decoder 62 has a terminal E and is enabled when the E input is LOW. When the decoder 62 is enabled, it decodes the information SP and outputs the signal DECO=DEC3F.
) 1 to 'L0w# ('o') 6 Also, when the E input is 'HIGH', the decoder 62 outputs the information sp.
All signals DEQ to DEC3 are set to ``HIGH'' (
“1”). The control signal 5 is connected to the terminal E of the decoder 62.
ATH is supplied. Signal 5ATH is used when code addition is prohibited in the code addition circuit shown in Fig. 3, for example, when data to be processed (written data) longer than 4 bytes is output in several parts, or when code addition is not performed and the code is simply output. It is used when you want to pass data.

次に、この発明の一実施例の動作を説明する。Next, the operation of one embodiment of the present invention will be explained.

第3図の符号付加回路は、符号のついていないデータ(
処理対象データDI)に符号を付加(設定)するもので
ある。符号のついテイナイデータとは、ノ!ツク形式の
場合、第1図に示すDI(i” 1 + 2 t・・・
n)のみで構成されるデータである。Sの部分は不定で
あシ、また何であっても構わない。これに対し、ゾーン
形式の場合、符号のついていないデータとは、全ての桁
(バイト)について下位4ビツトで数値を表わしている
データである。上位4ビツト、および符号分離形式での
符号バイト(符号部データ・ぐイト)部分については何
であっても構わない。
The code addition circuit in Figure 3 uses unsigned data (
This is to add (set) a code to the processing target data DI). What is signed data? In the case of tsuku format, DI(i" 1 + 2 t...
This data consists only of n). The S part is indeterminate and may be anything. On the other hand, in the case of the zone format, unsigned data is data in which the lower 4 bits of all digits (bytes) represent a numerical value. The upper 4 bits and the code byte (code part data) part in the code separated format may be anything.

今、このような符号のついていないデータが、処理対象
データDIとして第3図の符号付加回路に(入力データ
ライン10経出で)供給されたものとする。また、この
データがパック形式データであるものとする。まず、符
号付加位置決定回路30は、LEAD !、 ADR8
2,LENGTH2゜FULWD 1からなる6ビツト
の情報301に応じた符号付加位置情報sp(第1表参
照)を出力する。この例のパック形゛式のように符号後
置き(LEAD1= ”0’ )の場合、符号付加位置
決定回路30はADR82,LENGTH2,FULW
D 1に無関係に、s p = ”11”(即ち「3」
)である情報spを出力する。この情報SPはセレクタ
21.22の各端子S、およびデコーダ62に供給され
る。
Now, it is assumed that such unsigned data is supplied to the code addition circuit shown in FIG. 3 (through the input data line 10) as processing target data DI. It is also assumed that this data is pack format data. First, the code addition position determination circuit 30 selects LEAD! , ADR8
Code addition position information sp (see Table 1) corresponding to 6-bit information 301 consisting of 2, LENGTH 2°FULWD 1 is output. When the code is placed after the code (LEAD1=“0”) as in the pack type in this example, the code addition position determination circuit 30 selects ADR82, LENGTH2, FULW.
Regardless of D 1, s p = “11” (i.e. “3”
) is output. This information SP is supplied to each terminal S of the selector 21 , 22 and the decoder 62 .

セレクタ21の端子Eにはゾーン形式でないこと(即ち
・ぐツク形式であること)を示す“LOW’レベルの信
号ZONEが供給される。これによシセレクタ2ノは出
力許可状態となシ、入力データライン10上のデータD
Io%DIsの各上位4ビツトのうちの5p(=″’1
1’)で示されるデータ、即ちDI3の上位4ビツトを
出力211として選択出力する。一方、セレクタ22は
、データDI3の下位4ビツトを出力221として選択
出力する。
A “LOW” level signal ZONE indicating that the selector 21 is not in the zone format (that is, it is in the GUTSUKU format) is supplied to the terminal E of the selector 21. As a result, the selector 2 is in the output permission state, and the input Data D on data line 10
5p (=''1) of each upper 4 bits of Io%DIs
The data indicated by 1'), that is, the upper 4 bits of DI3, is selectively outputted as output 211. On the other hand, the selector 22 selectively outputs the lower 4 bits of the data DI3 as an output 221.

セレクタ22からの出力221(DI3の下位4ビツト
)は符号生成回路40に供給される。
Output 221 (lower 4 bits of DI3) from selector 22 is supplied to code generation circuit 40.

符号生成回路40にはABSO,ZONE、5IGN、
5PRTからなる4ビツトの制御情報401も供給され
る。
The code generation circuit 40 includes ABSO, ZONE, 5IGN,
4-bit control information 401 consisting of 5 PRTs is also supplied.

符号生成回路40は、ZONg=″’LOW”(パック
形式)の場合、a)の(1)、 (2)に示した如く、
信号5IGN、ABSOに応じすDまたは+Cのいずれ
かを出力403(符号生成回路40の出力の下位4ビツ
ト)として出力する。このとき、符号生成回路40の出
力の上位4ビツトとして出力される出力402は、次に
述べるように不要であるため、何であっても構わない。
When ZONg=''LOW'' (pack format), the code generation circuit 40 performs the following as shown in (1) and (2) of a).
Either D or +C corresponding to the signals 5IGN and ABSO is output as an output 403 (lower 4 bits of the output of the code generation circuit 40). At this time, the output 402 outputted as the upper 4 bits of the output of the code generation circuit 40 is unnecessary as described below, and therefore may be of any value.

即ち、符号生成回路40からの出力402はノ々ツファ
グート50に供給されるが、バッファp−ト50は信号
ZONBがLOW”レベルの場合、出カッ・イ・インピ
ーダンスとなるからでおる。この場合、セレクタ21か
らの出力211 (DIsの上位4ビツト)とバッフ了
ゲート50からの出力51とのワイアード・オア出力は
、出力211に一致する。
That is, the output 402 from the code generation circuit 40 is supplied to the node buffer 50, but when the signal ZONB is at the LOW level, the output impedance of the buffer point 50 becomes low. , the wired OR output of the output 211 (upper 4 bits of DIs) from the selector 21 and the output 51 from the buffer gate 50 matches the output 211.

これは、出力211および出力51の中から、出力21
1を選択したことと同じことである。
This is output 21 from output 211 and output 51.
This is the same as selecting option 1.

(出力211と出力51とのワイアード・オア出力であ
る)出力211、および符号生成回路40(内の符号生
成用ROM 4 、? )からの出力403は連結され
、符号部データ5D(1)々イト)としてセレクタ61
0〜6130°゛0”個入力部に共通に供給される。セ
レクタ610〜613の″1#側入力部にはデータDI
o#D1.が供給される。一方、デコーダ62は符号付
加位置決定回路30からのSP=″11′′である情報
SPをデコードし、信号DEC3だけを”LOW”レベ
ルにする。
The output 211 (which is a wired-OR output of the output 211 and the output 51) and the output 403 from the code generation circuit 40 (the code generation ROM 4, ?) are connected, and the code part data 5D(1) and the like are connected. selector 61 as
0~6130°゛0'' input parts are commonly supplied.Data DI is supplied to the ``1# side input parts of selectors 610~613.
o#D1. is supplied. On the other hand, the decoder 62 decodes the information SP of SP="11" from the code addition position determination circuit 30, and sets only the signal DEC3 to the "LOW" level.

セレクタ610〜613は、’HIG)4’レベルの信
号DECO−DEC2に応じ、1”個入力であるデータ
DI、%DI、を選択出力する。これに対し、セレクタ
613は、”’LOW”レベルの信号DEC3に応じ、
0”個入力である符号部データSDを選択出力する。こ
の結果、DIsに代えて符号部データSDが設定された
符号付加データDOが符号付加回路から出力される。更
に具体的に述べるならば、パック形式の場合、DI3の
下位4ビツトに代えて、符号生成回路40からの出力4
03(パック形式の符号)が設定される。
The selectors 610 to 613 select and output data DI and %DI, which are 1" inputs, in response to the signal DECO-DEC2 at the 'HIG)4' level. On the other hand, the selector 613 selects and outputs the data DI, %DI, which is at the 'LOW' level. In response to the signal DEC3 of
0" input code part data SD is selected and output. As a result, the code addition data DO in which the code part data SD is set instead of DIs is output from the code addition circuit. To be more specific, , in the case of the packed format, the output 4 from the code generation circuit 40 is used instead of the lower 4 bits of DI3.
03 (pack format code) is set.

次に、データDIがゾーン形式データである場合の動作
を説明する。この場合、ゾーン形式であることを示す“
HIGH”レベルの信号ZONEがセレクタ21および
バッファダート50の各端子Eに供給される。これによ
υセレクタ21は出力ハイ・インピーダンスとなる一方
、バッファダートsoは出力許可状態となる。この結果
、セレクタ21からの出力211とバッファゲート50
からの出力51とのワイアード・オア出力は、出力51
に一致する。バッファダート50からの出力51、およ
び符号生成回路40(内の符号生成用ROM 42 )
からの出力403は連結され、符号部データSDとして
セレクタ61゜〜6ハの″0#側入力部に共通に供給さ
れる。ノ々ッファr−)50からの出力51は、符号生
成回路40(内の符号生成用ROM 41 )からの出
力402に一致している。即ち、ゾーン形式データの符
号付加処理の場合、符号部データSDは上、下各4ビッ
トとも符号生成回路40で生成される。符号生成回路4
0からの出力402゜403は、前記したbx3)〜(
5)、e )(6) 、 (7)のいずれか1つのケー
スとなる。セレクタ61o〜613の″′1#側入力部
には、前述したようにデータDIo〜DI3が供給され
る。セレク′り61.〜613は信号DEC,−DEC
3に応じ″1#側入力データまたはMO″側入力データ
のいずれか一方を選択する。
Next, the operation when the data DI is zone format data will be explained. In this case, “
HIGH" level signal ZONE is supplied to each terminal E of the selector 21 and the buffer dart 50. As a result, the υ selector 21 becomes an output high impedance state, while the buffer dart so becomes an output enabled state. As a result, Output 211 from selector 21 and buffer gate 50
The wired-or output with output 51 from
matches. Output 51 from buffer dart 50 and code generation circuit 40 (code generation ROM 42 within)
The outputs 403 from the no-no buffer r-) 50 are concatenated and commonly supplied to the "0# side input parts of the selectors 61° to 6c as code part data SD. This corresponds to the output 402 from the code generation ROM 41 (within the code generation ROM 41).In other words, in the case of code addition processing for zone format data, both the upper and lower 4 bits of the code part data SD are generated by the code generation circuit 40. .Code generation circuit 4
The output 402°403 from 0 is the above-mentioned bx3) ~ (
5), e), (6), or (7). The data DIo to DI3 are supplied to the "'1# side input parts of the selectors 61o to 613 as described above. The selectors 61. to 613 are supplied with the signals DEC and -DEC.
3, select either the "1# side input data or the MO" side input data.

この信号DEC0〜DEC,はデコーダ62から出力さ
れるもので、信号5ATHが’LOW’のとき、符号付
加位置決定回路30からの情報spの示すバイト位置r
iJに対応する信号DECiだけが”HIGH”レベル
となる。これによシ、データDI中のDIiに代えて符
号部データSDが設定された、符号付加データDoが符
号付加回路から出力される。更に具体的に述べるならば
、ゾーン形式の場合、データDIのうち、SPの示すバ
イト位置riJにあるデータDliに代えて、符号生成
回路40からの出力402(上位4ビツト)、403(
下位4ビツト)が設定され、DIi以外のデータ部分は
そのまま通過する。
These signals DEC0 to DEC are output from the decoder 62, and when the signal 5ATH is 'LOW', the byte position r indicated by the information sp from the code addition position determination circuit 30
Only the signal DECi corresponding to iJ becomes "HIGH" level. As a result, the code addition data Do, in which the code part data SD is set instead of DIi in the data DI, is output from the code addition circuit. More specifically, in the case of the zone format, the outputs 402 (higher 4 bits), 403 (
(lower 4 bits) are set, and data portions other than DIi are passed through as is.

次に、この発明の他の実施例に係る10進数符号付加回
路について第7図を参照して説明する。なお、第3図と
同一部分には同一符号が付されている。第7図において
、70は選択回路である。選択回路70はセレクタ21
.72を有している。セレクタ72は符号付加位置決定
回路30からの情報spが供給される端子Sと、信号Z
ONgをレベル反転するインバータ80からの出力信号
(5面)が供給される端子Eとを有している。セレクタ
72は、第3図のセレクタ22と同様に、S入力(sp
)に応じてデータDI(1−=−DI3の各下位4ビツ
トのうちの1つを選択する。但し、セレクタ72はセレ
クタ22と異なって出力制御機能を有しており、E入力
(ZONE )が°’LOW”のとき、即ちゾーン形式
指定のとき出力許可状態となり、同じく”’HIG)I
”のとき、即ちパック形式指定のとき、出力“LOW”
(4ビツト共)となる。この結果、パック形式データの
処理時には、入力データライン10上のデータDIが確
かになる前に、セレクタ22の出力221(便宜上、第
3図のセレクタ22の出力と同一符号が付されている)
を(オールパ0”に)確定することができる。セレクタ
72の出力221が確定すると、符号生成回路40によ
る符号部データ生成動作が可能となる。パック形式デー
タの処理時(即ちZONF =”LOW”のとき)には
、符号生成回路40は、上記出力221”が確定さえし
ていれば出力221に無関係に(出力402.403か
らなる)符号部データを生成出力することができる。し
たがって、この実施例によれば、第3図の符号付加回路
のように、データDIが確かになり、D1.−DI。
Next, a decimal code adding circuit according to another embodiment of the present invention will be explained with reference to FIG. Note that the same parts as in FIG. 3 are given the same reference numerals. In FIG. 7, 70 is a selection circuit. The selection circuit 70 is the selector 21
.. 72. The selector 72 has a terminal S to which information sp from the code addition position determination circuit 30 is supplied, and a signal Z.
It has a terminal E to which an output signal (5th side) from an inverter 80 that inverts the level of ONg is supplied. The selector 72, like the selector 22 in FIG.
) selects one of the lower 4 bits of data DI (1-=-DI3).However, unlike selector 22, selector 72 has an output control function, and E input (ZONE) When is ``LOW'', that is, when zone format is specified, the output is enabled, and also ``HIG)I
”, that is, when specifying the pack format, the output is “LOW”
(all 4 bits). As a result, when processing packed format data, before the data DI on the input data line 10 is confirmed, the output 221 of the selector 22 (for convenience, the same reference numeral as the output of the selector 22 in FIG. 3 is given)
(to all pars 0"). When the output 221 of the selector 72 is determined, the code generation circuit 40 can generate the code part data. When processing packed format data (that is, ZONF = "LOW") ), the code generation circuit 40 can generate and output the code part data (consisting of outputs 402 and 403) regardless of the output 221 as long as the above output 221'' is determined. Therefore, according to this embodiment, like the code addition circuit shown in FIG. 3, the data DI becomes reliable and D1. -DI.

のうち1つがセレクタ22を通って符号生成回路4θに
達するのを待って符号部生成を開始する必要がないので
、パック形式データの符号付加処理の高速化が図れる。
Since it is not necessary to wait for one of the data to pass through the selector 22 and reach the code generation circuit 4θ before starting code part generation, it is possible to speed up the process of adding codes to packed format data.

なお、ゾーン形式データの処理動作は、第3図の符号付
加回路と同様である。
Note that the processing operation of zone format data is similar to that of the code addition circuit shown in FIG.

ところで、第3図および第7図の符号付加回路では、L
EAD 1 、 ADR82、LENGTH2、FUL
WD 1からなる6ビツトの情報301に基づいて符号
付加位置情報spを出力する符号付加位置決定回路3゜
が設けられているが、当核回路3oに代え、LEAD 
1および次に転送される転送バイト数を示す3ビツトの
情報BN(但し、BNは”ooi’。
By the way, in the code addition circuits of FIGS. 3 and 7, L
EAD 1, ADR82, LENGTH2, FUL
A code addition position determination circuit 3° is provided which outputs code addition position information sp based on 6-bit information 301 consisting of WD 1, but instead of this core circuit 3o, a LEAD
1 and 3-bit information BN indicating the number of transfer bytes to be transferred next (however, BN is "ooi".

”010”、”100”のいずれか)からなる4ピツト
の情報に基づいて情報spを出力する符号付加位置決定
回路を用いることも可能である。この符号付加位置決定
回路の符号付加位置決定論理を下記第3表に示す。
It is also possible to use a code addition position determination circuit that outputs information sp based on 4-pit information consisting of either "010" or "100". The code addition position determining logic of this code addition position determining circuit is shown in Table 3 below.

第 3 表 上記第3表は、LEAD 1 =“0#、即ち符号後置
きの場合、SPが転送バイト数に無関係に°°11#(
r3J)となることを示す。また、上記第3表は、LE
AD 1 = ”1”、即ち符号前置きの場合、転送バ
イト数が1バイト、2バイト、4バイトであればspが
それぞれIL’(r3J)、’1’O”(r2J)、’
oo’(rOJ)となることを示す。この決定論理は、
転送データ(書き込みデータ)が、入力データライン1
0において右詰めにされた形で符号決定回路に供給され
ることに基づいている。一般に主記憶制御回路には、次
に転送されるバイト数(転送バイト数)BNを管理する
データ転送制御回路が設けられている。したがって、符
号位置決定に際し、このデータ転送制御回路にて生成さ
れる転送バイト数BNを利用することが可能である。こ
のデータ転送制御回路の回路構成を第8図に示す。
Table 3 The above Table 3 shows that when LEAD 1 = "0#", that is, the sign is deferred, SP is 11 # (
r3J). In addition, Table 3 above shows that LE
When AD 1 = "1", that is, a code prefix, if the number of transferred bytes is 1 byte, 2 bytes, or 4 bytes, sp is IL' (r3J), '1'O' (r2J), ', respectively.
oo'(rOJ). This decision logic is
Transfer data (write data) is input data line 1
It is based on the fact that it is supplied to the sign determination circuit in a right-justified form at 0. Generally, the main memory control circuit is provided with a data transfer control circuit that manages the next number of bytes to be transferred (number of transferred bytes) BN. Therefore, when determining the code position, it is possible to use the number of transfer bytes BN generated by this data transfer control circuit. The circuit configuration of this data transfer control circuit is shown in FIG.

第8図において、91は転送残バイト数を保持するレジ
スタである。レジスタ91には被処理データのデータ長
(実際には被処理データのデータ長よりiバイト少ない
バイト数)が初期設定される。92は未転送データのメ
モリ先頭アドレスの下位2ビツトを保持するレジスタで
ある。レジスタ92には被処理データのメモリ先頭アド
レスの下位2ビツトが初期設定される。
In FIG. 8, 91 is a register that holds the number of bytes remaining to be transferred. The register 91 is initially set with the data length of the data to be processed (actually, the number of bytes is i bytes less than the data length of the data to be processed). A register 92 holds the lower two bits of the memory start address of untransferred data. In the register 92, the lower two bits of the memory start address of the data to be processed are initially set.

レジスタ91.92の保持内容は転送バイト数決定回路
93に供給される。決定回路93はレジスタ91.92
の各内容に基づいて転送バイト数BNを決定する。この
BNは減算器94のB個入力部、および加算器95のA
個入力部に供給される。減算器94のA個入力部にはレ
ジスタ91からの出力が供給され、加算器95のB個入
力部にはレジスタ92からの出力が供給される。減算器
94はA個入力データからB個入力データを減じ、次の
転送残バイト数を算出する。減算器940減算結果はレ
ジスタ91にロードされる。前述したように、レジスタ
9ノには被処理データのデータ長よシlバイト少ないバ
イト数が初期設定される。したがって、次なるデータ転
送が被処理データに関する最後のデータ転送となるとき
、減算器94からの出力は負となシ、減算器94からの
キャリー信号CRTは「偽J (false )となる
。この信号CRTは、符号後置きが指定されている場合
における、信号5ATI(の生成に用いられる。即ち、
符号後置きが指定されている場合、信号CRYが「真」
(true )であれば、信号5ATHは”HIGH’
レベルに設定され、対応する転送データに対する符号設
定が禁止される。これに対し、信号CRTが「偽」(f
alse )であれば、信号8ATHは”LOW’レベ
ルに設定され、対応する転送データに対する符号設定が
許可される。なお、符号前置きが指定されている場合に
は、被処理データに関する最初のデータ転送のときのみ
信号5ATHが”LOW’レベルに設定される。一方、
加算器95はA個入力データにB個入力データを加え、
次の転送データのメモリ先頭アドレスの下位2ビツトを
算出する。加算器95の加算結果はレジスタ92にロー
ドされる。
The contents held in the registers 91 and 92 are supplied to a transfer byte number determining circuit 93. The decision circuit 93 has registers 91 and 92.
The number of transfer bytes BN is determined based on each content of . This BN is input to B inputs of the subtracter 94 and A of the adder 95.
input section. The A inputs of the subtracter 94 are supplied with the output from the register 91, and the B inputs of the adder 95 are supplied with the output from the register 92. The subtracter 94 subtracts B input data from A input data to calculate the next number of remaining transfer bytes. The subtraction result of subtractor 940 is loaded into register 91. As described above, the register 9 is initially set to the number of bytes that is less than the data length of the data to be processed. Therefore, when the next data transfer is the last data transfer regarding the data to be processed, the output from the subtracter 94 will not be negative, and the carry signal CRT from the subtracter 94 will be "false." The signal CRT is used to generate the signal 5ATI (when the code postfix is specified. That is,
If the sign suffix is specified, the signal CRY is "true"
(true), the signal 5ATH is “HIGH”
level, and code setting for the corresponding transfer data is prohibited. In contrast, the signal CRT is “false” (f
(alse), the signal 8ATH is set to the "LOW" level, and the code setting for the corresponding transfer data is permitted.In addition, if the code prefix is specified, the first data transfer regarding the processed data Only when this happens, the signal 5ATH is set to the "LOW" level. on the other hand,
Adder 95 adds B input data to A input data,
Calculate the lower two bits of the memory start address of the next transfer data. The addition result of adder 95 is loaded into register 92.

なお、前記実施例では、パック形式、ゾーン形式いずれ
のデータ形式にも適用できる符号付加回路について説明
したが、パック形式またはゾーン形式のいずれか一方の
データだけを対象とする場合には、回路構成を簡略化す
ることが可能となる。例えばパック形式だけの場合、符
号生成用ROM 41およびバッファダート50は不要
となる。また、符号生成用ROM 42に代え、信号5
IGN、ABSOに応じて4ビツトの符号を生成するR
OM (或いは論理回路)を用いることができる。また
、第3図の例ではセレクタ21,22、第7図の例では
セレクタ21.72を不要にすることが可能である。こ
の場合、データD1.の上位4ビツトを符号部データS
Dの上位4ビツトとすればよい。更に、符号付加位置決
定回路30、セレクタ61.〜612、およびデコーダ
62を不要にすることが可能である。この場合、信号5
ATHをセレクタ613の端子Sに供給し、D工〇〜D
I、とセレクタ6ハの選択出力との連結情報をデータD
Oとすればよい。なお、転送データ(書き込みデータ)
が入力データライン10において、例えば左詰めにされ
た形で符号決定回路に供給される場合には、ノ母ツク形
式であっても、入力データライン10上のデータDIに
対する符号付加位置は、ADR8λLENGTH2など
によって変化するため、セレクタ2o、21、符号付加
位置決定回路30、セレクタ61.〜612、およびデ
コーダ62に相当する回路は必要となる。
In the above embodiment, the code addition circuit that can be applied to either the pack format or the zone format data has been described. However, if the target is only data in either the pack format or the zone format, the circuit configuration may be changed. It becomes possible to simplify. For example, in the case of only the pack format, the code generation ROM 41 and the buffer dart 50 are unnecessary. Also, instead of the code generation ROM 42, the signal 5
R generates a 4-bit code according to IGN and ABSO
OM (or logic circuit) can be used. Furthermore, it is possible to eliminate the need for the selectors 21 and 22 in the example of FIG. 3, and the selectors 21 and 72 in the example of FIG. In this case, data D1. The upper 4 bits of the code part data S
The upper 4 bits of D may be used. Further, a code addition position determining circuit 30, a selector 61 . .about.612 and decoder 62 can be made unnecessary. In this case, signal 5
Supply ATH to terminal S of selector 613,
The connection information between I and the selected output of selector 6c is data D.
It should be O. In addition, transfer data (write data)
is supplied to the sign determination circuit in the input data line 10 in a left-justified form, for example, even if it is in standard format, the sign addition position for the data DI on the input data line 10 is ADR8λLENGTH2. etc., the selectors 2o and 21, the code addition position determination circuit 30, the selector 61 . 612 and a circuit corresponding to the decoder 62 are required.

これに対し、ゾーン形式だけの場合、セレクタ21は不
要となる。また、バッファダート5゜も不要となる。こ
の場合、符号生成回路4oからの出力402,403の
連結情報を符号部データSDとすればよい。更に、ゾー
ン形式でも、符号分離のデータ形式だけの場合であれば
、符号生成条件に符号付加位置のデータ(セレクタ22
の出力221に相当するデータ)を用いることが不要と
なるため、セレクタ22を不要とすることが可能となる
と共に、符号生成回路4θの簡略化が図れる。
On the other hand, if only the zone format is used, the selector 21 is not necessary. Further, the buffer dart of 5° is also unnecessary. In this case, the concatenation information of the outputs 402 and 403 from the code generation circuit 4o may be used as the code part data SD. Furthermore, even in the zone format, if only the code-separated data format is used, the code addition position data (selector 22
Since it becomes unnecessary to use the data corresponding to the output 221 of , the selector 22 can be made unnecessary, and the code generation circuit 4θ can be simplified.

また、符号付加位置決定論理は、主記憶制御回路の仕様
や、主記憶へのデータ書き込み方法に依存し、前記実施
例に限定されるものではない。
Further, the code addition position determination logic depends on the specifications of the main memory control circuit and the method of writing data to the main memory, and is not limited to the above embodiment.

〔発明の効果〕〔Effect of the invention〕

以上詳述したように゛この発明によれば、処理対象デー
タの任意の位置に符号付加(符号設定)が行なえる。こ
の結果、符号付加のための位置合せ回路を不要にできる
As described in detail above, according to the present invention, a code can be added (code set) to any position of the data to be processed. As a result, it is possible to eliminate the need for an alignment circuit for adding codes.

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

第1図はパック形式の10進数のデータ、構造を示す図
、第2図はゾーン形式の10進数のデータ構造を示す図
、第3図はこの発明の一実施例に係る10進数符号付加
回路の構成を示す回路図、第4図は書き込みデータの主
記憶中の位置と転送シーケンスの対応例を示す図、第5
図は第3図に示す符号付加位置決定回路の入出力信号を
示す図、第6図は第3図に示す符号生成回路の内部構成
を示す図、第7図はこの発明の他の実施例に係る10進
数符号付加回路の構成を示す回路図、第8図はデータ転
送バイト数決定回路を有するデータ転送制御回路の構成
を示す図である。 10・・・入力データライン、21 、22.616〜
61m+72・・・セレクタ、3o・・・符号付加位置
決定回路、40・・・符号生成回路、41,421゜符
号生成用ROM、60・・・符号設定回路、62・・・
デコーダ。 出願人代理人 弁理士 鈴 江 武 彦第5図 jul 第 6 図 第 7 図 DI s8図 RY
FIG. 1 is a diagram showing the data structure of packed decimal numbers, FIG. 2 is a diagram showing the data structure of zoned decimal numbers, and FIG. 3 is a decimal code addition circuit according to an embodiment of the present invention. FIG. 4 is a circuit diagram showing the configuration of the main memory, and FIG.
The figure shows input and output signals of the code addition position determination circuit shown in FIG. 3, FIG. 6 shows the internal configuration of the code generation circuit shown in FIG. 3, and FIG. 7 shows another embodiment of the present invention. FIG. 8 is a circuit diagram showing the configuration of a decimal code addition circuit according to the present invention, and FIG. 8 is a diagram showing the configuration of a data transfer control circuit having a data transfer byte number determining circuit. 10... Input data line, 21, 22.616~
61m+72... Selector, 3o... Code addition position determining circuit, 40... Code generation circuit, 41,421° code generation ROM, 60... Code setting circuit, 62...
decoder. Applicant's Representative Patent Attorney Takehiko Suzue Figure 5 Jul Figure 6 Figure 7 Figure DI Figure s8 RY

Claims (3)

【特許請求の範囲】[Claims] (1)パ、り形式10進数を扱うデータ処理装置におい
て、可変長の被処理データ或いはその分割データを含む
10進の処理対象データを導く入力データラインと、上
記被処理データのデータ長に関する第1種情報、および
データ書き込み光領域のメモリ先頭アドレスに関する第
2種情報に基づいて上記入力データライン上の上記処理
対象データにおける符号部位置を決定する符号位置決定
手段と、上記被処理データの正、負に応じ符号部データ
を生成する符号生成手段と、この符号生成手段によって
生成された上記符号部データを、符号付加指定情報に応
じ、上記符号位置決定手段によって決定された、上記処
理対象データの該当位置に付加する符号付加手段とを具
備することを特徴とする10進数符号付加回路。
(1) In a data processing device that handles pars-format decimal numbers, there is an input data line that leads to decimal data to be processed including variable-length data to be processed or its divided data, and information regarding the data length of the data to be processed. code position determining means for determining the position of a code section in the data to be processed on the input data line based on type 1 information and type 2 information regarding the memory start address of the data writing optical area; , a code generation means for generating code part data in response to a negative value, and a code generation means for generating the code part data generated by the code generation means into the processing target data determined by the code position determination means in accordance with the code addition designation information. 1. A decimal code addition circuit comprising: code addition means for adding a code to a corresponding position.
(2)少なくともゾーン形式10進数を扱うデータ処理
装置において、可変長の被処理データ或いはその分割デ
ータを含む10進の処理対象データを導く入力データラ
インと、上記被処狸データのデータ長に関する第1種情
報、データ書き込み光領域のメモリ先頭アドレスに関す
る第2種情報、および符号部が前置きであるか後置きで
あるかを示す第3種情報に基づいて上記入力データライ
ン上の上記処理対象データにおける符号部位置を決定す
る符号位置決定手段と、少なくとも上記被処理データの
正、負およびデータ形式に応じ符号部データを生成する
符号生成手段と、この符号生成手段によって生成された
上記符号部データを、符号付加指定情報に応じ、上記符
号位置決定手段によって決定された、上記処理対象デー
タの該当位置に付加する符号付加手段とを具備すること
を特徴とする10進数符号付加回路。
(2) In a data processing device that handles at least zoned decimal numbers, an input data line that leads to decimal data to be processed including variable-length data to be processed or its divided data, and information regarding the data length of the raccoon data to be processed. The processing target data on the input data line is based on type 1 information, type 2 information regarding the memory start address of the data writing optical area, and type 3 information indicating whether the code part is a prefix or a postfix. a code position determining means for determining the position of the code part in the data; a code generating means for generating code part data according to at least the positive, negative and data format of the processed data; and the code part data generated by the code generating means. A decimal code addition circuit comprising code addition means for adding the following to a corresponding position of the processing target data determined by the code position determination means in accordance with code addition designation information.
(3)上記符号生成手段は、上記被処理データの正、負
、データ形式、および上記符号位置決定手段によって決
定された、上記処理対象データの該部位置のデータに応
じ符号部データを生成することを特徴とする特許稍求の
範囲第2項記載の10進数符号付加回路。
(3) The code generation means generates code part data according to the positive, negative, data format of the data to be processed, and the data of the part position of the data to be processed determined by the code position determination means. A decimal code addition circuit according to item 2 of the scope of the patent application, characterized in that:
JP59014271A 1984-01-31 1984-01-31 Decimal code adding circuit Pending JPS60159934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59014271A JPS60159934A (en) 1984-01-31 1984-01-31 Decimal code adding circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59014271A JPS60159934A (en) 1984-01-31 1984-01-31 Decimal code adding circuit

Publications (1)

Publication Number Publication Date
JPS60159934A true JPS60159934A (en) 1985-08-21

Family

ID=11856422

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59014271A Pending JPS60159934A (en) 1984-01-31 1984-01-31 Decimal code adding circuit

Country Status (1)

Country Link
JP (1) JPS60159934A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055958A (en) * 1994-02-17 2000-05-02 Yamaha Hatsudoki Kabushiki Kaisha Intake control system for generating tumble action

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055958A (en) * 1994-02-17 2000-05-02 Yamaha Hatsudoki Kabushiki Kaisha Intake control system for generating tumble action

Similar Documents

Publication Publication Date Title
US4825355A (en) Instruction format for program control type data processing systems
US6351806B1 (en) Risc processor using register codes for expanded instruction set
US5276891A (en) Alignment of sign, data, edit byte operand results for storage in memory
EP0199173B1 (en) Data processing system
US4591829A (en) Run length code decoder
JP3701401B2 (en) Microprocessor having saturated operation instructions
US6189086B1 (en) Data processing apparatus
JPH1153187A (en) Processor
KR980700603A (en) MICROPROCESSOR WITH COMPARE OPERATION OF COMPOSITE OPOERANDS
US6499099B1 (en) Central processing unit method and apparatus for extending general instructions with extension data of an extension register
EP0180157B1 (en) Information processing unit
US20030046516A1 (en) Method and apparatus for extending instructions with extension data of an extension register
JPS60159934A (en) Decimal code adding circuit
US5539900A (en) Information processing system
JPH027097B2 (en)
US20050256996A1 (en) Register read circuit using the remainders of modulo of a register number by the number of register sub-banks
US4831572A (en) Polynomial vector arithmetic operation control system
US5151993A (en) Data processor performing operation on data having length shorter than one-word length
US5708800A (en) High speed microprocessor for processing and transferring N-bits of M-bit data
US6931508B2 (en) Device and method for information processing
US5233695A (en) Microprocessor with a reduced size microprogram
JPS6217794B2 (en)
US5625786A (en) Microprogram memory output circuit for selectively outputting fields of microinstruction word to a plurality of data terminals
JPS604979A (en) Extra character processing system
JP2671325B2 (en) Data processing device