JPS6374307A - Digital arithmetic circuit - Google Patents

Digital arithmetic circuit

Info

Publication number
JPS6374307A
JPS6374307A JP61220115A JP22011586A JPS6374307A JP S6374307 A JPS6374307 A JP S6374307A JP 61220115 A JP61220115 A JP 61220115A JP 22011586 A JP22011586 A JP 22011586A JP S6374307 A JPS6374307 A JP S6374307A
Authority
JP
Japan
Prior art keywords
output
value
input
carry
adder
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
JP61220115A
Other languages
Japanese (ja)
Inventor
Yoshiro Omotani
重谷 好郎
Kenta Sagawa
寒川 賢太
Hiroaki Ozeki
浩明 尾関
Atsushi Ishizu
石津 厚
Masanobu Tanaka
正信 田中
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP61220115A priority Critical patent/JPS6374307A/en
Publication of JPS6374307A publication Critical patent/JPS6374307A/en
Pending legal-status Critical Current

Links

Landscapes

  • Tone Control, Compression And Expansion, Limiting Amplitude (AREA)

Abstract

PURPOSE:To attain the clip processing in a simple way by adopting the constitution in which an input value is used as an output value when a carry output of the most significant bit of an adder is logical '1' from an output switch circuit and a prescribed value from a constant output circuit is used as the output value when logical '0'. CONSTITUTION:An input value 10 of 5-bit in natural binary notation is given to input lines 11-15 from an input terminal 1. A constant output value 30 from a constant output circuit 3 is given to a logical inverting circuit 7 through constant output lines 31-35 and the output inverted logically is given to an adder 4 as a logically inverted output value 70 through logical inverting output lines 71-75. The input value 10 and the logically inverted output value 70 are added by adders 4a-4e of the adder 4 and a carry output 49 from the most significant bit is outputted. Depending on the logic of the multiplexer, when the carry output 49 is logical '1', the input lines 11-15 are selected and when the carry output 49 is logical '0', the constant output lines 31-35 are selected and the result is outputted to an output terminal 9 through output lines 61-65. Thus, the clip processing is attained by using adders and a very small number of control circuits without increasing number of components of a digital arithmetic circuit applying clip processing.

Description

【発明の詳細な説明】 産業上の利用分野 本発明はディジタル信号処理における非線形演算回路に
関するものであり、ディジタル信号の比較的低レベルの
振幅成分をクリップするような特性を有するディジタル
演算回路を提供しようとするものである。
Detailed Description of the Invention Field of the Invention The present invention relates to a nonlinear arithmetic circuit in digital signal processing, and provides a digital arithmetic circuit having a characteristic of clipping relatively low-level amplitude components of a digital signal. This is what I am trying to do.

従来の技術 近年、ディジタル技術の進歩に伴ない、論理素子、記憶
素子等の大集積化、高速化がめざましく、このため従来
のアナログ信号処理手法に替えてディジタル信号処理手
法の導入が高まっている。ディジタル信号処理手法では
信号を2進表現の数値として取り扱い、これらの数値に
対して種々の演算を行うことにより処理される。このよ
うなディジタル信号処理の1つとして非線形演算が挙げ
られる。この非線形処理は文字通り非線形演算により処
理されるが、一般に非線形演算は演算のアルゴリズムが
線形演算である加算演算等に比べて複雑となる。このた
め簡易な方法として、ROM(リードオンリーメモリ:
続出し専用メモリ)による演算テーブル参照方式と呼ば
れる方式が従来より用いられている。ROMによる演算
テーブル参照方式は、あらかじめ所望の非線形特性をR
OMに記憶しておき、ROMに入力値が与えられること
により非線形特性に応じた出力値が出力されるようにし
たものである。
Conventional technology In recent years, with the advancement of digital technology, logic elements, memory elements, etc. have become more integrated and faster, and as a result, digital signal processing methods are increasingly being introduced in place of conventional analog signal processing methods. . In digital signal processing techniques, signals are treated as numerical values expressed in binary, and these numerical values are processed by performing various operations. One example of such digital signal processing is nonlinear operation. This nonlinear processing is literally performed by nonlinear calculations, but nonlinear calculations are generally more complex than addition calculations, etc. whose calculation algorithms are linear calculations. For this reason, a simple method is to use ROM (read-only memory).
Conventionally, a method called an arithmetic table reference method using a sequential read-only memory has been used. In the calculation table reference method using ROM, the desired nonlinear characteristics are determined in advance by R.
The input value is stored in the OM, and when the input value is given to the ROM, an output value corresponding to the nonlinear characteristic is output.

上記方式を用いた非線形処理の1つとして、入力値が所
定値の範囲内のときにはあらかじめ定めた最小値を出力
値とし、入力値が所定値の範囲外のときには入力値を出
力値とするクリップ処理がある。
One of the nonlinear processes using the above method is a clip that uses a predetermined minimum value as the output value when the input value is within a predetermined value range, and uses the input value as the output value when the input value is outside the predetermined value range. There is processing.

このクリップ処理はディジタル信号に重畳した微少振幅
の雑音除去等に用いられており、特に上記演算テーブル
参照方式を用いることにより所望の特性が任意に可変で
きるなど柔軟な処理が可能となり、アナログ信号処理に
比べて大きな利点がある。
This clip processing is used to remove minute amplitude noise superimposed on digital signals, etc. In particular, by using the calculation table reference method mentioned above, it is possible to perform flexible processing such as arbitrarily changing desired characteristics, and analog signal processing has a big advantage over.

以下図面を参照しながら上述した従来の演算テーブル参
照方式によりクリップ処理を行うディジタル演算回路の
一例について説明する。
An example of a digital arithmetic circuit that performs clip processing using the conventional arithmetic table reference method described above will be described below with reference to the drawings.

第7図は従来の演算テーブル参照方式によりクリップ処
理を行うディジタル演算回路の構成を示すブロック図で
あり、第8図は具体例を示すブロック図である。また第
2図にクリップ処理の入出力特性の一例を示す、実線(
1)で表わしたのが入出力特性である。第7図において
1は入力値を入力する入力端子、9はクリップ処理を行
なった出力値を出力する出力端子、2は従来の演算テー
ブル参照方式によりクリップ処理を行うクリップ処理回
路である。第8図で第7図と同じ番号を付したものはそ
れぞれ対応しており、2aは入力値に対応した各アドレ
スに第2図に示すような出力値をデータとして記憶した
ROMであり、2bはROM2aのアドレス端子、2C
はROMのデータ出力端子である。
FIG. 7 is a block diagram showing the configuration of a digital arithmetic circuit that performs clip processing using a conventional arithmetic table reference method, and FIG. 8 is a block diagram showing a specific example. In addition, Fig. 2 shows an example of the input/output characteristics of clip processing, with a solid line (
1) is the input/output characteristic. In FIG. 7, 1 is an input terminal for inputting an input value, 9 is an output terminal for outputting an output value subjected to clip processing, and 2 is a clip processing circuit that performs clip processing using a conventional arithmetic table reference method. In FIG. 8, the same numbers as in FIG. 7 correspond to each other, and 2a is a ROM that stores output values as data shown in FIG. 2 at each address corresponding to an input value, and 2b is the address terminal of ROM2a, 2C
is a data output terminal of the ROM.

以上のように構成された演算テーブル参照方式によりク
リップ処理を行うディジタル演算回路について、以下そ
の動作について説明する。入力端子1および出力端子9
はそれぞれROM2aのアている。またROM2aは入
力端子1からの入力値に対応した各アドレスに第2図の
実線(11に示すような出力値をデータとして記憶して
いる。これより、まず入力端子1に入力値が与えられる
と、入力値に対応したROM2aのアドレスが選択され
る。このアドレスには第2図の実線(1)に示すような
出力値がデータとしてあらかじめ記tαされているため
、この結果データ出力端子2Cには入力値が所定値の範
囲内(第2図では”0”から”k”まで)のときにはあ
らかじめ定めた最小値を、入力値が所定値の範囲外(第
2図では”k”以上)のときには入力値を出力値として
得ることができ、これによりクリップ処理が実現できる
。(参考文献:村上、榎並:カラー補正器、テレビジョ
ン学会誌、33.4 (1979)P291〜295)
発明が解決しようとする問題点 しかしながら上記のような構成では、ROMを用いてい
るため入力値のビット数が増えるに従いROMの容量が
増大(入力ビツト数をnビット増す夫宛署け9n泊kか
み)すみので、去竿Yヶ鳴く北常に多くなり、例えば上
記のような構成をディジタル信号処理用のLSI(大規
模集積回路)に導入しようとした場合LSIの規模が非
常に大きくなるというような問題点を有していた。
The operation of the digital arithmetic circuit that performs clip processing using the arithmetic table reference method configured as described above will be described below. Input terminal 1 and output terminal 9
are respectively located in ROM2a. In addition, the ROM 2a stores output values as data as shown by the solid line (11) in FIG. 2 at each address corresponding to the input value from input terminal 1. Then, the address of the ROM 2a corresponding to the input value is selected. Since the output value as shown in the solid line (1) in FIG. When the input value is within the predetermined range (from "0" to "k" in Figure 2), the predetermined minimum value is set; ), the input value can be obtained as the output value, thereby realizing clipping processing. (Reference: Murakami, Enami: Color corrector, Journal of the Society of Television Engineers, 33.4 (1979) P291-295)
Problems to be Solved by the Invention However, in the above configuration, since a ROM is used, the capacity of the ROM increases as the number of bits of the input value increases (increase the number of input bits by n bits). However, if you try to introduce the above configuration into an LSI (large scale integrated circuit) for digital signal processing, the scale of the LSI will become very large. It had some problems.

本発明は上記問題点に鑑み、ディジタル演算回路を構成
する素子数を増大することなく、また入力値のビット数
増加が素子数増加に大きく影響を与えるということのな
いディジタル演算回路を提供するものである。
In view of the above problems, the present invention provides a digital arithmetic circuit without increasing the number of elements constituting the digital arithmetic circuit, and in which an increase in the number of bits of an input value does not significantly affect the increase in the number of elements. It is.

問題点を解決するための手段 上記問題点を解決するために本発明のディジタル演算回
路は、Nビン) (Nは0以上の任意の整数)の自然2
進表現の入力値を入力し、Nビットの自然2進表現の所
定値を出力する定数出力回路と、前記定数出力回路の出
力を入力し、前記定数出力回路の出力を論理反転して出
力する論理反転回路と、前記入力値と前記論理反転回路
の出力とを加算し加算結果の最上位ビットからのキャリ
ーを出力する加算器と、前記加算器の最上位ビットから
のキャリーが論理値”1”の場合には前記入力値を出力
値とし、前記加算器の最上位ビットからのキャリーが論
理値”0”の場合には前記定数出力回路の出力を出力値
とする出カスインチ回路とを備えたものである。
Means for Solving the Problems In order to solve the above problems, the digital arithmetic circuit of the present invention has a natural 2
a constant output circuit that inputs an input value in decimal representation and outputs a predetermined value in N-bit natural binary representation; and inputs the output of the constant output circuit, and outputs the output after logically inverting the output of the constant output circuit. a logic inversion circuit, an adder that adds the input value and the output of the logic inversion circuit and outputs a carry from the most significant bit of the addition result, and the carry from the most significant bit of the adder has a logic value of "1"; ”, the input value is used as the output value, and when the carry from the most significant bit of the adder is a logical value “0”, the output value is the output value of the constant output circuit. It is something that

作用 本発明は上記した構成により、まず加算器、定数出力回
路及び論理反転回路によって、入力値と所定値(第2図
の実線(1)で示すようなりリップ処理を行う場合、所
定値は”k”)の論理反転出力とを加算し、入力値がク
リップ処理を行う所定範囲外(第2図では”k”以上)
では加算器の最上位ビットからのキャリー出力が論理値
′1”であり、入力値がクリップ処理を行う所定範囲内
(第2図では0”から”k”まで)では加算器の最上位
ビットからのキャリー出力が論理値”0”であることを
利用し、出力スイッチ回路により加算器の最上位ビット
のキャリー出力が論理値゛1”の場合には入力値を出力
値とし、論理値”O”の場合には定数出力回路からの所
定値を出力値とすることにより、所望のクリップ処理を
行う特性を加算器とわずかなコントロール回路により実
現している。
According to the above-described configuration, the present invention first uses an adder, a constant output circuit, and a logic inversion circuit to perform rip processing on an input value and a predetermined value (as shown by the solid line (1) in FIG. 2), the predetermined value is " If the input value is outside the predetermined range for clipping (more than "k" in Figure 2),
In this case, the carry output from the most significant bit of the adder is the logical value '1'', and if the input value is within the predetermined range for clipping (from 0'' to 'k' in Figure 2), the carry output from the most significant bit of the adder is Utilizing the fact that the carry output from the adder is a logical value "0", when the carry output of the most significant bit of the adder is a logical value "1", the input value is set as the output value by the output switch circuit, and the logical value "1" is set as the input value. In the case of "0", a predetermined value from the constant output circuit is used as the output value, thereby realizing the characteristic of performing the desired clipping process using an adder and a small number of control circuits.

実施例 以下本発明のディジタル演算回路の一実施例について、
図面を用いて説明する。
Embodiment Hereinafter, an embodiment of the digital arithmetic circuit of the present invention will be described.
This will be explained using drawings.

第1図は本発明のクリップ処理を行うディジタル演算回
路の構成を示すブロック図である。第1図において1は
入力端子でありNビット(Nは0以上の任意の整数)の
自然2進表現の入力値10を入力する。3は定数出力回
路でありNビットの自然2進表現の定数”k”を定数出
力値30としている。ここでNビットの自然2進表現と
は、ゼロ〜2N−1の正整数XをNビットの符号x1(
i=1−N)を用いて符号列(xl+x2゜X  ・・
・・・・、xN)とし、 a ― として表現することである。また以下x1を最上位ピッ
)、XNを最下位ビットと呼ぶ0例えば5には符号列(
00011)となる。
FIG. 1 is a block diagram showing the configuration of a digital arithmetic circuit that performs clip processing according to the present invention. In FIG. 1, 1 is an input terminal to which an input value 10 in natural binary representation of N bits (N is any integer greater than or equal to 0) is input. 3 is a constant output circuit, which has an N-bit natural binary representation constant "k" as a constant output value 30. Here, the N-bit natural binary representation means that a positive integer X from zero to 2N-1 is expressed as an N-bit code x1 (
i=1-N), code string (xl+x2°X...
..., xN) and express it as a -. Also, hereafter x1 is called the most significant bit) and XN is called the least significant bit. For example, 5 is the code string (
00011).

7は論理反転回路であり定数出力回路3からの定数出力
値30の論理反転をとり、論理反転出力値70を出力す
る。すなわち定数出力値30が符号列(00011)と
表現されていたとすると、論理反転出力値70は符号列
(11100)と表現される。
7 is a logic inversion circuit which takes the logic inversion of the constant output value 30 from the constant output circuit 3 and outputs a logic inversion output value 70; That is, if the constant output value 30 is expressed as a code string (00011), the logically inverted output value 70 is expressed as a code string (11100).

4は加算器であり、入力値10と論理反転出力値70と
を加算し、最上位ビットからのキャリー出力49を出力
する。ここで最上位ビットからのキャリー出力とはNビ
ット目から(N+1)ビット目への桁上りを意味する。
4 is an adder which adds the input value 10 and the logically inverted output value 70, and outputs a carry output 49 from the most significant bit. Here, the carry output from the most significant bit means a carry from the Nth bit to the (N+1)th bit.

すなわち例えば5ビーツトの自然2進数表現の正整数”
3”を表現する符号列(00011)と、符号列(11
111)とを加算した場合、最上位ビットからのキャリ
ー出力は符号列5ビツト目から桁上りが生じるため論理
値”l”となる。
In other words, for example, a positive integer expressed as a 5-beat natural binary number.
A code string (00011) expressing 3” and a code string (11
111), the carry output from the most significant bit becomes a logical value "1" because a carry occurs from the 5th bit of the code string.

6は出力スイッチ回路であり、加算器4からのキャリー
出力49と入力値10と定数出力値30J一本人力76
−スイ1.壬63乙ごより、加算器4からのキャリー出
力49が論理値”1”の場合には入力値10を出カスイ
ンチ回路6の出力値6oとし、論理値”0”の場合には
定数出力値3oを出カスインチ回路6の出力値60とし
ている。9は出力端子でありクリップ処理を行なった出
力値6oを出力する。
6 is an output switch circuit, which has a carry output 49 from the adder 4, an input value 10, and a constant output value 30J, one input power 76
-Sui 1. 63 From the above, when the carry output 49 from the adder 4 is a logical value "1", the input value 10 is set as the output value 6o of the output inch circuit 6, and when the carry output 49 from the adder 4 is a logical value "0", it is set as the constant output value. 3o is taken as the output value 60 of the output inch circuit 6. Reference numeral 9 denotes an output terminal which outputs an output value 6o that has been subjected to clip processing.

以上のように構成されたクリ、ブ処理を行うディジタル
演算回路について、以下第1図及び第2図を用いてその
動作を説明する。
The operation of the digital arithmetic circuit configured as described above for performing crib processing will be described below with reference to FIGS. 1 and 2.

まず第2図は本発明のクリップ処理を行うディジタル演
算回路の入出力特性を示すものであって実線(11で示
しである。また点線(2)で示したのは加算器4の加算
値と入力値10との入出力特性である。実線(3)は加
算器4からのキャリー出力49と入力値10との入出力
特性であり、入力値10が”k”以下ではキャリー出力
49は論理値”0”であり、”k+l”以上ではキャリ
ー出力49は論理値”13である。
First, FIG. 2 shows the input/output characteristics of the digital arithmetic circuit that performs the clipping process of the present invention, and the solid line (indicated by 11) shows the added value of the adder 4 and the dotted line (2). This is the input/output characteristic with the input value 10. The solid line (3) is the input/output characteristic between the carry output 49 from the adder 4 and the input value 10. When the input value 10 is "k" or less, the carry output 49 is logic. The carry output 49 has a logic value of "13" when the value is "0" and the value is "k+l" or more.

ここで入力端子1に入力値10が与えられると、加算器
4により、入力値10と定数出力値30の論理反転出力
値70が加算され、加算された結果をキャリー出力49
として出力される。第2図において点線(2)で示した
のが加算値である。ここで第2図において入力値10が
°k”以下のときにはキャリー出力49が論理値”0”
であり、入力値10が″に+1゛以上のときはキャリー
出力49が論理値”l”となっている、すなわちキャリ
ー出力49が論理値”O″のときには出力値60を°k
”にし、キャリー出力49が論理値”1”のときには入
力値10を出力値60とすることにより第2図の実線(
1)で示すような所望の入出力特性を得ることができる
。この処理を行なっているのが次に述べる出カスインチ
回路6である。
Here, when an input value 10 is given to the input terminal 1, the adder 4 adds a logically inverted output value 70 of the input value 10 and the constant output value 30, and the added result is carried to the carry output 49.
is output as In FIG. 2, the dotted line (2) indicates the added value. Here, in Fig. 2, when the input value 10 is less than °k'', the carry output 49 has the logical value ``0''.
When the input value 10 is +1° or more, the carry output 49 has a logic value "L", that is, when the carry output 49 has a logic value "O", the output value 60 is set to °k.
”, and when the carry output 49 has the logical value “1”, the input value 10 is set to the output value 60, so that the solid line (
Desired input/output characteristics as shown in 1) can be obtained. This process is performed by the output cusp inch circuit 6, which will be described next.

出カスインチ回路6は加算器4からキャリー出力49と
入力値10と定数出力値30とを入力し、スイッチ65
により、キャリー出力49が論理値”1”の場合には入
力値10を選択し、キャリー出力49が論理値”O゛の
場合には定数出力値30を選択して、この選択された値
が出力値60として出力される。すなわちこの出力値6
0は入力値10が”02からk”までの範囲は1に″で
あり、”k+l”以上では入力値10であり、この結果
入力値10と出力値60の入出力特性は第2図の実線(
1)で示すようになる。
The output inch circuit 6 inputs the carry output 49, the input value 10, and the constant output value 30 from the adder 4, and switches the switch 65.
Therefore, when the carry output 49 has a logical value "1", the input value 10 is selected, and when the carry output 49 has the logical value "O", the constant output value 30 is selected, and this selected value is It is output as an output value 60. That is, this output value 6
0 means that the input value 10 is "1" in the range from "02 to k", and the input value is 10 above "k+l".As a result, the input/output characteristics of the input value 10 and the output value 60 are as shown in Figure 2. solid line(
1).

定数出力回路3はレジスタにより、論理反転回路7はイ
ンバータにより、また出力スイッチ回路6のスイッチ6
5はマルチプレクサにより実現でき、加算器4はアダー
により実現できる。
The constant output circuit 3 uses a register, the logic inversion circuit 7 uses an inverter, and the switch 6 of the output switch circuit 6
5 can be realized by a multiplexer, and adder 4 can be realized by an adder.

以上のように本実施例によれば、加算器4、定数出力回
路3および論理反転回路7により、Nピッ) (Nは0
以上の任意の整数)の自然2進表現の入力値10と、N
ビットの自然2進表現の”koなる定数出力値30の論
理反転出力値70とを加算することにより、クリップ処
理を行う所定範囲において、加算器4からのキャリー出
力49が論理値”0”であることを利用し、出力スイッ
チ回路6により、キャリー出力49が論理値”■”のと
きには入力値10を出力値60とし、キャリー出力49
が論理値”O”の場合には”koなる定数出力4a30
を出カイ1lr60とするご、1−L7よめ一筆2図の
実&1t1)で示したようなりリップ処理を行う入出力
特性を有するディジタル演算回路を加算器とわずかなコ
ントロール回路により実現している。
As described above, according to this embodiment, the adder 4, the constant output circuit 3, and the logic inversion circuit 7 generate N pins (N is 0
The input value 10 of the natural binary representation of (any integer above) and N
By adding the logical inverted output value 70 of the constant output value 30, which is the natural binary representation of the bit, the carry output 49 from the adder 4 becomes a logical value ``0'' in the predetermined range in which the clipping process is performed. Taking advantage of this fact, when the carry output 49 has the logical value "■", the output switch circuit 6 sets the input value 10 to the output value 60, and the carry output 49
When is the logical value “O”, the constant output 4a30 becomes “ko”.
Assuming that the output is 1lr60, a digital arithmetic circuit having input/output characteristics for performing rip processing as shown in 1-L7, 1-L7, 1-L7, Figure 1 and 1t1) is realized using an adder and a small number of control circuits.

第3図は本発明のクリップ処理を行うディジタル演算回
路の一具体例を示すブロック図である。
FIG. 3 is a block diagram showing a specific example of a digital arithmetic circuit that performs clip processing according to the present invention.

ここでは説明をわかりやすくするため、第1図の入力値
10.定数出力値30および出力値60のビット数を5
ビツトとし、クリップ処理を行う範囲を”0”から3”
までとした例を挙げて説明する。第3図において第1図
と同じ番号を付したものはそれぞれ対応している。第1
図の入力値10に対応するのが第3図の入力線11〜1
5であり、11が最上位ビット、15が最下位ビア)で
あって入力線11〜1.5により5ビツトの入力値10
を表わしている。同様に定数出力値30は定数出力線3
1〜35.論理反転出力値70は論理反転出力線71〜
75.出力値60は出力線61〜65により表わしてい
る。4a〜4eは加算器を構成する加算素子(以下アダ
ーと呼ぶ)であり、2つの加算されるべき入力値を入力
する入力端子a、bと、下位ビットからのキャリーを入
力するキャリー入力端子C0と下位ビットへキャリーを
出力するキャリー出力端子C8と、加算結果を出力する
出力端子Sとを具備しており、また6a〜6eはマルチ
プレクサであり、3つの入力端子a、b、sと1つの出
力端子Oとを具備しており、7a〜7eはインバータで
あり、入力端子Iと出力端子0とを具備しており、これ
らの入出力論理を第6図に示す。
In order to make the explanation easier to understand, input values 10. The number of bits of constant output value 30 and output value 60 is set to 5.
bit, and set the range for clip processing from "0" to "3".
Let me explain by giving an example. In FIG. 3, the same numbers as in FIG. 1 correspond to each other. 1st
The input lines 11 to 1 in Fig. 3 correspond to the input value 10 in the figure.
5, 11 is the most significant bit, 15 is the least significant via), and input lines 11 to 1.5 input the 5-bit input value 10.
It represents. Similarly, constant output value 30 is constant output line 3
1-35. The logic inversion output value 70 is the logic inversion output line 71~
75. Output value 60 is represented by output lines 61-65. 4a to 4e are addition elements (hereinafter referred to as adders) constituting an adder, and have input terminals a and b that input two input values to be added, and a carry input terminal C0 that inputs a carry from the lower bit. and a carry output terminal C8 that outputs a carry to the lower bit, and an output terminal S that outputs the addition result, and 6a to 6e are multiplexers, which have three input terminals a, b, and s and one Inverters 7a to 7e are provided with an input terminal I and an output terminal 0, and their input/output logic is shown in FIG.

以上のように構成されたクリップ処理を行うディジタル
演算回路の一具体例について説明する。
A specific example of the digital arithmetic circuit configured as described above that performs clip processing will be described.

まず入力端子1より5ビツトの自然2進表現の入力値1
0が入力線11〜15により入力される。
First, input value 1 of 5-bit natural binary representation from input terminal 1.
0 is input via input lines 11-15.

定数出力回路3からの定数出力値30は定数出力線31
〜35により論理反転回路7に入力され、論理反転した
出力が論理反転出力値70として論理反転出力線71〜
75により加算器4に出力される。入力値10と論理反
転出力値70は加算器4のアダー4a〜4eにより加算
され最上位ビットからのキャリー出力49が出力される
。本具体例ではクリップ処理を行う範囲を”0”から3
”までとした例を挙げていることより、定数出力値30
が表現する数値”k”は”3”であり、定数出力線31
〜35により(00011)と表現される。ここで例え
ば入力値lOを2とした場合入力線11〜15は(00
010)と表現され、加算器4の加算値は(11110
)となりかつキャリー出力49は”θ″となる。同様に
入力値10が0”から31”までに対しての加算値は、
第2図においてk”−3″としたときの点線(2)とな
り、キャリー出力49は実線(3)となる。キャリー出
力は出力スイッチ回路6に出力され、マルチプレクサ6
a〜6eのセレクト端子Sに接続される。第6図に示す
ようなマルチプレクサの論理により、キャリー出力49
が”1”のときには入力線41〜45が選択され、キャ
リー出力49が”0”のときには定数出力線31〜35
が選択され、出力線61〜65を通して出力端子9に出
力される。
Constant output value 30 from constant output circuit 3 is connected to constant output line 31
~35 is input to the logic inversion circuit 7, and the logically inverted output is output as the logic inversion output value 70 to the logic inversion output line 71~
75 outputs it to the adder 4. The input value 10 and the logically inverted output value 70 are added by the adders 4a to 4e of the adder 4, and a carry output 49 is output from the most significant bit. In this specific example, the range for clip processing is from “0” to 3.
” From the example given above, the constant output value 30
The numerical value "k" expressed by is "3", and the constant output line 31
~35 is expressed as (00011). For example, if the input value lO is 2, the input lines 11 to 15 are (00
010), and the added value of adder 4 is (11110
) and the carry output 49 becomes "θ". Similarly, the additional value for input value 10 from 0" to 31" is:
In FIG. 2, the dotted line (2) represents k''-3'', and the carry output 49 represents the solid line (3). The carry output is output to the output switch circuit 6, and the multiplexer 6
Connected to select terminals S of a to 6e. The logic of the multiplexer as shown in FIG.
When the carry output 49 is "1", the input lines 41 to 45 are selected, and when the carry output 49 is "0", the constant output lines 31 to 35 are selected.
is selected and output to the output terminal 9 through the output lines 61 to 65.

以上の動作により本具体例では第2図において”k″−
3″となるようなりリップ処理を行う入出力特性が得ら
れる。
With the above operation, in this specific example, "k"-
3'', and input/output characteristics for performing rip processing can be obtained.

第5図は本具体例において、入力値10.キャリー出力
49.加算値、出力値60のそれぞれの比較を具体的に
示したものである。なお、本具体例では入出力のビット
数を5ビツト、クリップ処理を行う範囲をO″〜″3”
までとしたが、これは説明をわかりやすくするための例
で入出力のビット数に応じアダー、マルチプレクサ、イ
ンバータを増減すればよい、またクリップ処理を行う範
囲は所望の値を定数出力回路3に設定すればよい。
FIG. 5 shows the input value 10. Carry output 49. The comparison between the added value and the output value 60 is specifically shown. In this specific example, the number of input/output bits is 5 bits, and the range for clipping is O''~''3''.
However, this is an example to make the explanation easier to understand. Adders, multiplexers, and inverters can be increased or decreased depending on the number of input/output bits. Also, the range for clipping can be determined by applying the desired value to the constant output circuit 3. Just set it.

第4図は本発明のクリップ処理を行うディジタル演算回
路の他の具体例を示すブロック図である。
FIG. 4 is a block diagram showing another specific example of a digital arithmetic circuit that performs clip processing according to the present invention.

同図において第3図と同じ番号を付したものはそれぞれ
対応している。またここでのクリップ処理を行う入出力
ビット数、クリップ処理の特性については先の具体例と
全く同等である。第3図の構成と異なるのは、第3図に
おけるアダー4c、4d。
In this figure, the same numbers as in FIG. 3 correspond to each other. Further, the number of input/output bits for performing clip processing and the characteristics of clip processing are completely the same as in the previous specific example. What differs from the configuration in FIG. 3 are the adders 4c and 4d in FIG.

き、入力線13をアダー4bのキャリー入力端子CIに
接続した点であ。
This is the point where the input line 13 is connected to the carry input terminal CI of the adder 4b.

以上のように構成されたクリップ処理を行うディジタル
演算回路の他の具体例について説明する。
Another specific example of the digital arithmetic circuit configured as described above that performs clip processing will be described.

第3図において加算器4のアダー4eに注目した場合、
アダー4eの人力すおよびC,は常に論理値”0”であ
るため、アダー4eの出力C8も常に論理値”O゛であ
る。同様にアダーe、  dについても出力c0は常に
論理値”0”となる。アダー4cについては、入力すは
常に論理値”1”であり人力C1は常に論理値”0”で
あるため、入力線13が論理値”1”の場合、アダー4
Cの出力C6は論理値”1”であり、入力線13が論理
値”O”の場合、アダー4Cの出力C0は論理値30′
となる。以上の理由より、第3図における加算器4の7
ダー4c、4d、4eは削除でき、入力線13をアダー
4bの入力C1に接続することによっても第3図と等し
い論理構成を得ることができる。これを実現したのが第
4図である。
When paying attention to the adder 4e of the adder 4 in FIG.
Since the inputs C and C of the adder 4e always have a logical value of "0", the output C8 of the adder 4e also always has a logical value of "O". Similarly, the output c0 of the adders e and d always has a logical value of "0". ”.For the adder 4c, the input line C1 is always the logical value “1” and the human power C1 is always the logical value “0”, so if the input line 13 is the logical value “1”, the adder 4
The output C6 of the adder 4C has a logic value "1", and when the input line 13 has a logic value "O", the output C0 of the adder 4C has a logic value 30'.
becomes. For the above reasons, 7 of adder 4 in FIG.
The adders 4c, 4d, and 4e can be deleted, and a logic configuration equivalent to that shown in FIG. 3 can also be obtained by connecting the input line 13 to the input C1 of the adder 4b. Figure 4 shows how this has been achieved.

となったのは定数出力回路3からの定数出力値30を3
”、すなわち定数出力線31〜35を(00011)と
表現したからであるが、一般に定数出力値30を実現し
ている定数出力線の最下位ビットより上位ビットへ論理
値”1”が続く場合同様に加算器4のアダーを削除する
ことができる。例えば定数出力線の最下位ビットより上
位ビットへ論理値″1″がL個続く場合には(L+1)
個のアダーを削除でき最下位ビットより(L+2)個目
に相当するアダーの入力C1に最下位ビットより(L+
1)個目の入力線を接続することにより所望の特性を得
ることが可能である。
The reason is that the constant output value 30 from the constant output circuit 3 is
”, that is, the constant output lines 31 to 35 are expressed as (00011), but in general, when the logical value “1” continues from the lowest bit to the upper bit of the constant output line that realizes the constant output value 30. Similarly, the adder of adder 4 can be deleted.For example, if L logical values "1" continue from the lowest bit to the upper bit of the constant output line, (L+1)
Adders corresponding to (L+2) from the least significant bit can be deleted from the input C1 of the adder corresponding to (L+2) from the least significant bit.
1) Desired characteristics can be obtained by connecting the second input line.

言い換えると、入力値がNビットの場合M=N−Lとす
れば、入力線は上位ビットよりMビットのみを入力し、
入力線の上位ビットよりMビット目は、アダーの上位ビ
ットより (M−1)ビット目のキャリー入力端子に接
続することにより所望の特性を得ることができる。
In other words, if the input value is N bits and M=N-L, the input line inputs only M bits from the higher bits,
Desired characteristics can be obtained by connecting the Mth bit from the upper bit of the input line to the carry input terminal of the (M-1)th bit from the upper bit of the adder.

このように第4図の具体例に示すような構成とすること
により加算器4のアダーを削減できるためさらに回路規
模を小さくすることが可能となる。
By adopting the configuration shown in the specific example of FIG. 4 in this manner, the number of adders in the adder 4 can be reduced, making it possible to further reduce the circuit scale.

発明の効果 以上のように本発明は、加算器、定数出力回路および論
理反転回路によって、入力値と所定値の論理反転出力と
を加算し、入力値がクリップ処理を行う所定範囲外では
加算器の最上位ピー/ )からのキャリー出力が論理値
”1”であり、入力値がクリップ処理を行う所定範囲内
では加算器の最上位ビットからのキャリー出力が論理値
”0”であることを利用し、出力スイッチ回路により加
算器の最上位ビットのキャリー出力が論理値”1”の場
合には入力値を出力値とし、論理値”O”の場合には定
数出力回路からの所定値を出力値とするように構成して
いるので、クリップ処理を行うディジタル演算回路を構
成する素子数を増大することなく、また入力値のビット
数増加が素子数増加に大きな影響を与えるということも
なく、加算器とわずかなコントロール回路によりクリッ
プ処理を行うディジタル演算回路が実現できるという優
れた効果が得られる。
Effects of the Invention As described above, the present invention adds an input value and a logic inversion output of a predetermined value using an adder, a constant output circuit, and a logic inversion circuit, and when the input value is outside a predetermined range in which clipping processing is performed, the adder The carry output from the most significant bit of the adder is a logical value "1", and the carry output from the most significant bit of the adder is a logical value "0" when the input value is within a predetermined range for clipping. When the carry output of the most significant bit of the adder is a logical value "1", the input value is set as the output value, and when the carry output of the most significant bit of the adder is a logical value "O", the predetermined value from the constant output circuit is set as the output value. Since the output value is configured to be used as an output value, there is no need to increase the number of elements that make up the digital arithmetic circuit that performs clip processing, and an increase in the number of bits of the input value does not have a large effect on the increase in the number of elements. , an excellent effect can be obtained in that a digital arithmetic circuit that performs clip processing can be realized using an adder and a small number of control circuits.

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

第1図は本発明の実施例におけるディジタル演算回路の
ブロック図、第2図は本発明のディジタル演算回路の入
出力特性を示す入出力特性図、第3図は本発明の一興体
例におけるディジタル演算回路のブロック図、第4図は
本発明の他の一員体例におけるディジタル演算回路のブ
ロック図、第5図は本発明の具体例の入出力値を比較し
た入出力特性図、第6図は第3図および第4図の各論理
素子の論理を示す論理図、第7図は従来のディジタル演
算回路の構成を示すブロック図、第8図は第7図の具体
例を示すブロック図である。 1・・・・・・入力端子、9・・・・・・出力端子、3
・・・・・・定数出力回路、4・・・・・・加算器、7
・・・・・・論理反転回路、6・・・・・・出力スイッ
チ回路、2・・・・・・従来のディジタル演算回路。 代理人の氏名 弁理士 中尾敏男 はか1名第1図 4′:? 第2図 第5図 怨幼値(000//) 暮甲11ミ飯ぽ成力ti(/)100)第6図 第7図 第8図
FIG. 1 is a block diagram of a digital arithmetic circuit according to an embodiment of the present invention, FIG. 2 is an input/output characteristic diagram showing the input/output characteristics of the digital arithmetic circuit of the present invention, and FIG. 4 is a block diagram of a digital arithmetic circuit in another example of the present invention, FIG. 5 is an input/output characteristic diagram comparing input and output values of a specific example of the present invention, and FIG. 3 and 4 are logic diagrams showing the logic of each logic element, FIG. 7 is a block diagram showing the configuration of a conventional digital arithmetic circuit, and FIG. 8 is a block diagram showing a specific example of FIG. 7. 1...Input terminal, 9...Output terminal, 3
...Constant output circuit, 4...Adder, 7
...Logic inversion circuit, 6 ... Output switch circuit, 2 ... Conventional digital arithmetic circuit. Name of agent: Patent attorney Toshio Nakao (1 person) Figure 1: 4':? Figure 2 Figure 5 Graduation value (000//) Figure 6 Figure 7 Figure 8

Claims (3)

【特許請求の範囲】[Claims] (1)Nビット(Nは0以上の任意の整数)の自然2進
表現の入力値を入力し、Nビットの自然2進表現の所定
値を出力する定数出力回路と、前記定数出力回路の出力
を入力し、前記定数出力回路の出力を論理反転して出力
する論理反転回路と、前記入力値と前記論理反転回路の
出力とを加算し加算結果の最上位ビットからのキャリー
を出力する加算器と、前記加算器の最上位ビットからの
キャリーが論理値“1”の場合には前記入力値を出力値
とし、前記加算器の最上位ビットからのキャリーが論理
値“0”の場合には前記定数出力回路の出力を出力値と
する出力スイッチ回路を有することを特徴とするディジ
タル演算回路。
(1) A constant output circuit that receives an input value in natural binary representation of N bits (N is any integer greater than or equal to 0) and outputs a predetermined value in natural binary representation of N bits; a logic inversion circuit that inputs an output, logically inverts the output of the constant output circuit and outputs it; and an addition that adds the input value and the output of the logic inversion circuit and outputs a carry from the most significant bit of the addition result. When the carry from the most significant bit of the adder is a logical value "1", the input value is the output value, and when the carry from the most significant bit of the adder is a logical value "0", the input value is the output value. A digital arithmetic circuit comprising an output switch circuit whose output value is the output of the constant output circuit.
(2)加算器は、少くとも2つの加算されるべき入力値
を入力する入力端子と下位ビットからのキャリーを入力
するキャリー入力端子と、上位ビットへキャリーを出力
するキャリー出力端子を具備した加算素子の集合により
構成され、かつ前記加算素子のキャリー入力端子は下位
ビットのキャリー出力端子に各ビット毎に接続されてお
り、最下位ビットの前記加算素子のキャリー入力端子に
は、論理値“0”が接続されており、最上位ビットの前
記加算素子のキャリー出力端子は前記加算器の最上位ビ
ットからのキャリーとして前記出力スイッチ回路に出力
することを特徴とする特許請求の範囲第(1)項記載の
ディジタル演算回路。
(2) The adder has an input terminal that inputs at least two input values to be added, a carry input terminal that inputs the carry from the lower bit, and a carry output terminal that outputs the carry to the upper bit. The carry input terminal of the addition element is connected to the carry output terminal of the lower bit for each bit, and the carry input terminal of the addition element of the lowest bit has a logic value "0". ” is connected, and the carry output terminal of the adder element of the most significant bit outputs to the output switch circuit as a carry from the most significant bit of the adder. The digital arithmetic circuit described in Section 1.
(3)加算器は、入力値の上位ビットよりMビット(た
だしMは0以上かつN以下の整数)を入力し、前記入力
値の上位ビットよりMビット目は、前記加算素子の上位
ビットより(M−1)ビット目のキャリー入力端子に接
続されたことを特徴とする特許請求の範囲第(1)項記
載のディジタル演算回路。
(3) The adder inputs M bits from the upper bits of the input value (M is an integer greater than or equal to 0 and less than or equal to N), and the M-th bit from the upper bits of the input value is input from the upper bits of the addition element. The digital arithmetic circuit according to claim 1, wherein the digital arithmetic circuit is connected to the carry input terminal of the (M-1)th bit.
JP61220115A 1986-09-18 1986-09-18 Digital arithmetic circuit Pending JPS6374307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61220115A JPS6374307A (en) 1986-09-18 1986-09-18 Digital arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61220115A JPS6374307A (en) 1986-09-18 1986-09-18 Digital arithmetic circuit

Publications (1)

Publication Number Publication Date
JPS6374307A true JPS6374307A (en) 1988-04-04

Family

ID=16746148

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61220115A Pending JPS6374307A (en) 1986-09-18 1986-09-18 Digital arithmetic circuit

Country Status (1)

Country Link
JP (1) JPS6374307A (en)

Similar Documents

Publication Publication Date Title
KR910001535A (en) Multiplication Method and Circuit of Real-Time 2'S Complement Code Numeric Code in Digital Signal Processing System
KR100221517B1 (en) High speed dynamic binary incrementer
JPS6374307A (en) Digital arithmetic circuit
JPH09222991A (en) Adding method and adder
JPS6374310A (en) Digital arithmetic circuit
JPS58137045A (en) Parallel multiplier
JPS6374311A (en) Digital arithmetic circuit
JPS63262910A (en) Digital arithmetic circuit
JP2621535B2 (en) Code conversion circuit
JPH051498B2 (en)
JPS62173530A (en) Digital arithmetic circuit
JPS6374309A (en) Digital arithmetic circuit
JPS61143845A (en) Digital arithmetic circuit
JP2558739B2 (en) Absolute value circuit
JPS6374308A (en) Digital arithmetic circuit
JPS63262909A (en) Digital arithmetic circuit
JP2606339B2 (en) Multiplier
JPS6399607A (en) Digital arithmetic circuit
JP3123060B2 (en) Digital arithmetic circuit
KR100196520B1 (en) Apparatus for conversion of two's complement numbers
GB2067799A (en) Improvements in or Relating to Digital Filters
JP4042215B2 (en) Arithmetic processing apparatus and method
JPS6399608A (en) Digital arithmetic circuit
JP2907276B2 (en) Arithmetic processing unit
US3769499A (en) Threshold logic three-input adder