JPH08190471A - Multiplier - Google Patents

Multiplier

Info

Publication number
JPH08190471A
JPH08190471A JP4140340A JP14034092A JPH08190471A JP H08190471 A JPH08190471 A JP H08190471A JP 4140340 A JP4140340 A JP 4140340A JP 14034092 A JP14034092 A JP 14034092A JP H08190471 A JPH08190471 A JP H08190471A
Authority
JP
Japan
Prior art keywords
output
input
data
latch
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
JP4140340A
Other languages
Japanese (ja)
Inventor
Akira Suzuki
彰 鈴木
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.)
Seiko Epson Corp
Hudson Soft Co Ltd
Original Assignee
Seiko Epson Corp
Hudson Soft 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 Seiko Epson Corp, Hudson Soft Co Ltd filed Critical Seiko Epson Corp
Priority to JP4140340A priority Critical patent/JPH08190471A/en
Publication of JPH08190471A publication Critical patent/JPH08190471A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To perform multiplication by the use of one adder as for the multiplier which performs binary multiplication. CONSTITUTION: A 1st input B is outputted, bit by bit, from a serial/parallel converter 111 to a selecting means 104 with a clock signal. The selecting means 104 selects and outputs one of 2nd input data 101, the inverted data 102 of the data 101, and zero data 103 according to the output 112 of the serial/parallel converter. An adding means 107 adds the output 105 of the selecting means 104, the output 106 of a storage means 109, and the output 112 of the parallel/ serial converter 111 together and outputs their addition result 108. A storage means 109 stores the addition result 108 according to the control signal of a control means 113 and supplies it to the adder 107.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、任意の二つの値の乗算
を行う乗算器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplier for multiplying any two values.

【0002】[0002]

【従来の技術】従来の乗算器では、図6に示すものがあ
った。ここでは入力Aと入力Bがそれぞれ4ビットの場
合を例にとって説明する。図6において、Bからの入力
603は下位ビットから順次1ビットずつ選択手段60
4に入力され、前記選択手段604はAから入力される
データ601とゼロデータ602のいずれか1つを前記
のBからの入力に応じて選択出力し、加算器607は、
前記選択手段604の出力605とゼロデータ606を
加算してその結果を記憶手段613と加算器608に出
力する。以下同様に、加算器608、609、610は
それぞれ前記加算器607、608、609の出力と選
択手段604の出力605を加算してその結果をそれぞ
れ前記加算器609、610、記憶手段613に出力す
る。前記記憶手段613は前記4つの加算器607、6
08、609、610の出力を制御手段614の出力に
応じて記憶しかつ出力し、前記制御手段614は前記記
憶手段613に制御信号を出力する。
2. Description of the Related Art A conventional multiplier is shown in FIG. Here, the case where the input A and the input B are each 4 bits will be described as an example. In FIG. 6, the input 603 from B is selection means 60 one bit at a time from the lower bit.
4 and the selecting means 604 selectively outputs one of the data 601 and the zero data 602 input from A according to the input from B, and the adder 607
The output 605 of the selection means 604 and the zero data 606 are added, and the result is output to the storage means 613 and the adder 608. Similarly, the adders 608, 609 and 610 respectively add the outputs of the adders 607, 608 and 609 and the output 605 of the selection means 604 and output the results to the adders 609 and 610 and the storage means 613, respectively. To do. The storage means 613 stores the four adders 607, 6
The outputs of 08, 609 and 610 are stored and output according to the output of the control means 614, and the control means 614 outputs a control signal to the storage means 613.

【0003】次に動作について説明する。まず、Bから
入力Bの最下位ビットの値が入力され、この信号603
は選択手段604に出力される。前記選択手段604は
前記信号603の出力によりAからの入力601とゼロ
データ602のいずれかを選択し、かつ前記選択された
データの4ビット目の数を5ビット目につけたし5ビッ
トとし(以下符号拡張と呼ぶ)出力する。前記選択手段
出力604は加算器607でゼロデータ606と加算さ
れて記憶手段613に出力され、かつ上位4ビットが5
ビットに符号拡張され加算器608に出力される。前記
記憶手段613は制御手段614の制御信号により前記
加算器607の出力611の最下位ビットを記憶する。
Next, the operation will be described. First, the value of the least significant bit of input B is input from B, and this signal 603 is input.
Is output to the selection unit 604. The selecting means 604 selects either the input 601 from A or the zero data 602 by the output of the signal 603, and sets the number of the 4th bit of the selected data to the 5th bit or 5 bits (hereinafter It is called sign extension). The selecting means output 604 is added to the zero data 606 by the adder 607 and output to the storage means 613, and the upper 4 bits are 5
The bits are sign-extended and output to the adder 608. The storage means 613 stores the least significant bit of the output 611 of the adder 607 according to the control signal of the control means 614.

【0004】次に、入力Bの2ビット目の値が入力さ
れ、この信号603は選択手段604に出力される。前
記選択手段604は前記信号603の出力によりAから
の入力601とゼロデータ602のいずれかを選択し、
かつ5ビットに符号拡張して出力する。加算器608に
おいて前記選択手段出力605は前述の加算器607の
加算結果611と加算されて記憶手段613に出力さ
れ、かつ上位4ビットが5ビットに符号拡張され加算器
609に出力される。前記記憶手段613は制御手段6
14の制御信号により前記加算器608の出力の最下位
ビットを記憶する。
Next, the value of the second bit of the input B is input, and this signal 603 is output to the selecting means 604. The selecting means 604 selects either the input 601 from A or the zero data 602 according to the output of the signal 603,
In addition, it sign-extends to 5 bits and outputs. In the adder 608, the selection means output 605 is added to the addition result 611 of the adder 607 and output to the storage means 613, and the upper 4 bits are sign-extended to 5 bits and output to the adder 609. The storage means 613 is the control means 6
The control signal of 14 stores the least significant bit of the output of the adder 608.

【0005】このように、入力Bの3ビット目、続いて
4ビット目の値についても同様に動作し、結果としてB
からの入力の最下位ビットとAからの入力との乗算結果
と、Bからの入力の2番目のビットとAからの入力との
乗算結果と、Bからの入力の3番目のビットとAからの
入力との乗算結果のそれぞれ最下位ビットが記憶手段6
13に記憶され、かつBからの入力の最上位ビットとA
からの入力との乗算結果が前記記憶手段613に記憶さ
れ、制御手段614の制御信号により前記記憶手段61
3から出力される。
In this way, the same operation is performed for the value of the third bit of the input B, and subsequently the value of the fourth bit, resulting in B
The result of multiplication of the least significant bit of the input from A and the input from A, the result of the multiplication of the second bit of the input from B and the input from A, and the third bit of the input from B and A The least significant bit of the multiplication result with the input of
13 and the most significant bit of the input from B and A
The multiplication result with the input from is stored in the storage means 613, and the storage means 61 is controlled by the control signal of the control means 614.
It is output from 3.

【0006】[0006]

【発明が解決しようとする課題】しかし、前述の従来技
術では乗数の数だけ加算器を必要とし回路規模が大きく
なるという問題を有する。例えば、二つの入力が4ビッ
トのとき必要な加算器は四つである。そこで本発明はこ
のような問題を解決するもので、その目的とするところ
は一つの加算器で乗算器を構成するところにある。
However, the above-mentioned conventional technique has a problem that the number of multipliers is required and the circuit scale becomes large. For example, if two inputs are 4 bits, then four adders are required. Therefore, the present invention solves such a problem, and an object of the present invention is to configure a multiplier with one adder.

【0007】[0007]

【課題を解決するための手段】任意の二つの入力の乗算
を行う乗算器において、第一の入力をクロックにより1
ビットずつ順次出力するパラレル・シリアル変換器と、
前記パラレル・シリアル変換器の出力値に応じて第二の
入力データと前記第二の入力のすべてのビットを反転し
たデータとゼロデータとのいずれかを選択する選択手段
と、前記選択手段の出力と記憶手段の出力と前記パラレ
ル・シリアル変換器の出力により選択されるキャリー入
力を加算する加算手段と、クロックにより前記記憶手段
へのパルスを作成するパルス発生手段と、前記加算手段
の出力の最下位ビットを前記パルス発生手段によるパル
スに同期して記憶し、かつ前記加算手段の出力結果を前
記加算手段に出力する記憶手段により構成する。
In a multiplier for multiplying any two inputs, the first input is set to 1 by a clock.
A parallel / serial converter that outputs bit by bit,
Selecting means for selecting either the second input data, the data obtained by inverting all the bits of the second input, or the zero data according to the output value of the parallel-serial converter; and the output of the selecting means. An adding means for adding a carry input selected by the output of the storing means and the output of the parallel-serial converter, a pulse generating means for generating a pulse to the storing means by a clock, and an output of the adding means. The lower bit is stored in synchronization with the pulse generated by the pulse generating means, and the output result of the adding means is output to the adding means.

【0008】[0008]

【実施例】図1に本発明の概略図を示す。パラレル・シ
リアル変換器111は、外部より入力される第一のデー
タ110をクロック信号に同期して下位ビットから順次
1ビットずつシリアル出力112を出力し、選択手段1
04は外部より入力される第二のデータ101と前記入
力データ101のすべてのビットを反転したデータ10
2とゼロデータ103のうちのいずれか一つを前記パラ
レル・シリアル変換器111からの出力112に応じて
選択出力し、加算手段107は前記選択手段104の出
力105と記憶手段109の出力106とを加算してそ
の加算結果108を出力し、前記記憶手段109は制御
手段113からの出力に応じて前記加算結果108の最
下位ビットを記憶しかつ最下位ビット以外のビットを前
記加算手段107に出力し、前記制御手段113はクロ
ック信号の入力により前記記憶手段109に制御パルス
を出力する。
FIG. 1 shows a schematic diagram of the present invention. The parallel-serial converter 111 outputs the serial output 112 bit by bit in order from the lower bit in synchronization with the first data 110 input from the outside in synchronization with the clock signal, and the selection unit 1
Reference numeral 04 denotes the second data 101 inputted from the outside and the data 10 obtained by inverting all the bits of the input data 101.
2 or zero data 103 is selectively output according to the output 112 from the parallel-serial converter 111, and the adding means 107 outputs the output 105 of the selecting means 104 and the output 106 of the storing means 109. Are added and the addition result 108 is output, and the storage means 109 stores the least significant bit of the addition result 108 according to the output from the control means 113 and outputs the bits other than the least significant bit to the addition means 107. Then, the control means 113 outputs a control pulse to the storage means 109 in response to the input of the clock signal.

【0009】図2に本発明の一実施例を示す。この例で
は基本クロックSCLKとリセット信号RESETと乗
算を実行可能にするイネーブル信号ENとの三つの制御
信号により二つの入力データである第一の入力Bと第二
の入力Aを乗算してその結果Mを出力する。なお、第一
の入力Bと第二の入力A及び出力Mはいずれも2の補数
表現となっている。まずRESETを切り換え、続いて
ENを切り換えることにより外部からの第一の入力21
5はパラレル・シリアル変換器216にロードされ、前
記パラレル・シリアル変換器216は基本クロックSC
LKにより下位ビットから順次1ビットずつシリアル出
力217を出力する。なお、このパラレル・シリアル変
換器216は、例えばパラレル入力シリアル出力のシフ
トレジスタなどで構成される。第二の入力201はセレ
クタ203において、前記パラレル・シリアル変換器2
16の出力する第一の入力Bの最上位ビットB3の値が
1のとき第二の入力Aのすべてのビットを反転したデー
タ202がセレクタ204の入力となり、このB3の値
が0のときには第二の入力201がそのままセレクタ2
04の入力となる。前記セレクタ204は前記パラレル
・シリアル変換器216の出力が1のとき前記第二の入
力、0のときゼロデータを選択し、そのデータの最上位
ビットと同じ値を次の上位桁に付け足し(以下符号拡張
という)セレクタ出力205として出力する。加算器2
07は、前記セレクタ出力205とデータラッチ209
からの符号拡張された出力214を加算し加算結果20
8を出力する。なおセレクタ206において、前記パラ
レル・シリアル変換器216の出力する第一の入力の最
上位ビットB3の値が1のときキャリー入力として1
を、B3の値が0のときキャリー入力を0として加算を
行う。この動作は、第一の入力、第二の入力が2の補数
表現された値であり、第二の入力のすべてのビット反転
と最下位ビットに1を加えることにより第二の入力の符
号反転を行っていることを意味する。ラッチクロック発
生器218は例えばシフトレジスタなどで構成され、基
本クロックSCLKより1乗算シーケンスに一つのパル
スを持つ信号を生成し、そのパルス発生の順番でラッチ
213、ラッチ212、ラッチ211、ラッチ210に
ラッチクロック219として出力する。前記ラッチ21
3、212、211、210はラッチクロック発生器2
18からのラッチクロック219により前記加算結果2
08の最下位ビットをラッチし、前記データラッチ20
9は最下位ビットを除くすべてのビットを基本クロック
SCLKによりラッチし前記加算器207の入力214
として供給する。
FIG. 2 shows an embodiment of the present invention. In this example, two input data, that is, a first input B and a second input A are multiplied by three control signals of a basic clock SCLK, a reset signal RESET, and an enable signal EN for enabling multiplication, and the result is obtained. Output M. The first input B, the second input A, and the output M are all represented in 2's complement. First, by switching RESET and then by switching EN, the first input 21 from the outside
5 is loaded into the parallel / serial converter 216, and the parallel / serial converter 216 receives the basic clock SC.
The serial output 217 is sequentially output bit by bit from the lower bit by LK. The parallel / serial converter 216 is composed of, for example, a shift register for parallel input / serial output. The second input 201 is the selector 203, and the parallel / serial converter 2
When the value of the most significant bit B3 of the first input B output from 16 is 1, the data 202 obtained by inverting all the bits of the second input A becomes the input of the selector 204, and when the value of B3 is 0, The second input 201 is the selector 2 as it is
It becomes the input of 04. The selector 204 selects the second input when the output of the parallel-serial converter 216 is 1, and zero data when the output is 0, and adds the same value as the most significant bit of the data to the next higher digit (hereinafter It is output as a selector output 205 (referred to as sign extension). Adder 2
07 is the selector output 205 and the data latch 209
And the sign-extended output 214 from
8 is output. In the selector 206, when the value of the most significant bit B3 of the first input output from the parallel / serial converter 216 is 1, the carry input is 1
When the value of B3 is 0, carry input is set to 0 and addition is performed. This operation is such that the first input and the second input are values expressed in two's complement, and all the bit inversions of the second input and the sign inversion of the second input by adding 1 to the least significant bit. Means that you are doing. The latch clock generator 218 is composed of, for example, a shift register or the like, generates a signal having one pulse in one multiplication sequence from the basic clock SCLK, and outputs it to the latch 213, the latch 212, the latch 211, and the latch 210 in the order of pulse generation. It is output as the latch clock 219. The latch 21
3, 212, 211 and 210 are latch clock generators 2
The addition result 2 by the latch clock 219 from 18
08 least significant bit is latched and the data latch 20
9 latches all bits except the least significant bit by the basic clock SCLK, and inputs 214 of the adder 207.
Supply as.

【0010】図3は図2の実施例の各部の動作をタイミ
ングチャートで表したものである。イネーブル信号EN
の立ち下がり後に第一の入力がパラレル・シリアル変換
器216にロードされ、基本クロックSCLKの最初の
立ち上がりエッジで最下位ビットB0がセレクタ204
に出力される。前記セレクタ204では第二の入力Aの
データが選択されるのでこのデータとラッチ209の出
力214が加算器207で加算されS0が出力される。
この加算器出力S0の最下位ビットはラッチクロック発
生器218が出力するラッチ213へのラッチクロック
219(ラッチクロック0)によりラッチ213でラッ
チされ、同時に上位4ビットは次の基本クロックSCL
Kの立ち上がりエッジでラッチ209でラッチされ、符
号拡張されて加算器207に供給される。このラッチ2
09のラッチパルスとなる基本クロックSCLKの立ち
上がりと同時に第一の入力の2番目のビットB1がセレ
クタ204に出力され、以下同様に動作して加算結果S
1の最下位ビットがラッチ212へのラッチクロック2
19(ラッチクロック1)によりラッチ212にラッチ
される。結果として加算結果S2の最下位ビットがラッ
チ211へのラッチクロック219(ラッチクロック
2)によりラッチ211に、加算結果S3の最下位ビッ
トがラッチ210へのラッチクロック219(ラッチク
ロック3)によりラッチ210にそれぞれラッチされ、
イネーブル信号ENの立ち下がり後の基本クロックSC
LKの5番目の立ち上がりエッジでラッチ209に上位
4ビットが出揃い、8ビットの乗算結果となる。
FIG. 3 is a timing chart showing the operation of each part of the embodiment shown in FIG. Enable signal EN
The first input is loaded into the parallel-to-serial converter 216 after the falling edge of, and the least significant bit B0 is transferred to the selector 204 at the first rising edge of the basic clock SCLK.
Is output to Since the data of the second input A is selected by the selector 204, this data and the output 214 of the latch 209 are added by the adder 207 and S0 is output.
The least significant bit of this adder output S0 is latched in the latch 213 by the latch clock 219 (latch clock 0) to the latch 213 output from the latch clock generator 218, and at the same time, the upper 4 bits are the next basic clock SCL.
At the rising edge of K, it is latched by the latch 209, sign-extended, and supplied to the adder 207. This latch 2
The second bit B1 of the first input is output to the selector 204 at the same time as the rising of the basic clock SCLK that serves as the latch pulse of 09, and the same operation is performed thereafter.
The least significant bit of 1 is the latch clock 2 to the latch 212
It is latched in the latch 212 by 19 (latch clock 1). As a result, the least significant bit of the addition result S2 is sent to the latch 211 by the latch clock 219 (latch clock 2) to the latch 211, and the least significant bit of the addition result S3 is sent to the latch 210 by the latch clock 219 (latch clock 3). Respectively latched to
Basic clock SC after the fall of enable signal EN
At the 5th rising edge of LK, the upper 4 bits are aligned in the latch 209, resulting in an 8-bit multiplication result.

【0011】次に、図4に示した入力データに従って動
作について説明する。なお、入力例はA、Bともに4ビ
ットであり、入力の最上位ビットが1のときその入力は
負の数とし、2の補数表現されたデータとする。従って
入力Aは正の数、入力Bは負の数を表す。また、加算器
105の入力となるラッチ209からの出力214の初
期値をゼロデータとする。
Next, the operation will be described according to the input data shown in FIG. In the input example, both A and B have 4 bits, and when the most significant bit of the input is 1, the input is a negative number and is represented as 2's complement data. Therefore, the input A represents a positive number and the input B represents a negative number. Further, the initial value of the output 214 from the latch 209 which is the input of the adder 105 is set to zero data.

【0012】リセット信号RESETを0レベルに切り
換え、続いてイネーブル信号ENを0レベルに切り換え
ると第一の入力B、第二の入力Aがロードされる。第一
の入力Bはパラレル・シリアル変換器216にロードさ
れ、基本クロックSCLKの立ち上がりエッジに同期し
て最下位ビットB0の値1がシリアル出力217として
出力される。第二の入力Aはそのままセレクタ204に
ロードされ、前記セレクタ204は前記シリアル出力2
17の1により第二の入力Aのデータを選択し、符号拡
張してセレクタ出力205として出力する。ラッチ20
9の出力214の初期値はゼロデータであるので、加算
器207ではそのゼロデータと前記セレクタ出力205
の値を加算し、加算器出力208をデータラッチ部22
0に出力する。前記データラッチ部220は、ラッチク
ロック発生器218からのクロック219により前記加
算器出力208の最下位ビットをラッチ213がラッチ
し、上位4ビットはラッチ209から加算器207に供
給される。
When the reset signal RESET is switched to 0 level and then the enable signal EN is switched to 0 level, the first input B and the second input A are loaded. The first input B is loaded into the parallel / serial converter 216, and the value 1 of the least significant bit B0 is output as the serial output 217 in synchronization with the rising edge of the basic clock SCLK. The second input A is loaded to the selector 204 as it is, and the selector 204 outputs the serial output 2
The data of the second input A is selected by 1 of 17 and is sign-extended and output as the selector output 205. Latch 20
Since the initial value of the output 214 of 9 is zero data, the zero data and the selector output 205 are added in the adder 207.
Value is added to output the adder output 208 to the data latch unit 22.
Output to 0. In the data latch unit 220, the latch 213 latches the least significant bit of the adder output 208 by the clock 219 from the latch clock generator 218, and the upper 4 bits are supplied from the latch 209 to the adder 207.

【0013】次の基本クロックSCLKの立ち上がりエ
ッジに同期してB1の値1、その次の基本クロックSC
LKの立ち上がりエッジでB2の値0、そして最後にB
3の値1がパラレル・シリアル変換器216からセレク
タ204に出力され、これらのシリアル出力217が1
のときには第二の入力Aを符号拡張してそのまま加算器
207に出力し、0のときにはゼロデータ4ビットを符
号拡張し前記加算器207に出力する。また、B3は1
なのでセレクタ203において第二の入力Aのすべて反
転したデータ(1の補数)が選択されてセレクタ204
の入力となり、符号拡張されて加算器207に出力さ
れ、さらにセレクタ206において加算器207のキャ
リー入力に1を選択する(2の補数)。前記加算器20
7では前回のラッチ209の出力214と前記セレクタ
出力205と、最上位ビットB3の乗算時にはキャリー
入力が加算される。2回目、3回目の5ビットの加算結
果208の上位4ビットはさらに符号拡張して加算器2
07の入力となり、最下位ビットはそれぞれラッチ21
2、ラッチ211でラッチされ、4回目の加算結果20
8の最下位ビットがラッチ210に、そして上位4ビッ
トがラッチ209にラッチされ、最終的に8ビットの乗
算結果が出揃う。
The value 1 of B1 and the next basic clock SC in synchronization with the rising edge of the next basic clock SCLK.
The value of B2 is 0 at the rising edge of LK, and finally B
The value 1 of 3 is output from the parallel / serial converter 216 to the selector 204, and these serial outputs 217 are set to 1
In the case of, the second input A is sign-extended and output as it is to the adder 207, and in the case of 0, the zero data 4 bits are sign-extended and output to the adder 207. Also, B3 is 1
Therefore, the selector 203 selects all the inverted data (1's complement) of the second input A and selects the selector 204.
Is input to the adder 207 and is sign-extended. Then, the selector 206 selects 1 as the carry input of the adder 207 (two's complement). The adder 20
In No. 7, the carry input is added when the output 214 of the latch 209, the selector output 205, and the most significant bit B3 were previously multiplied. The higher 4 bits of the addition result 208 of the 5th bit of the 2nd time and the 3rd time are sign-extended and added to the adder 2
It becomes the input of 07, and the least significant bit is latch 21 respectively.
2, latched by the latch 211, and the fourth addition result 20
The 8 least significant bits are latched in the latch 210, and the upper 4 bits are latched in the latch 209, and finally the 8-bit multiplication results are obtained.

【0014】図4の入力データによる実施例の計算過程
を図5に示す。なお、図4の入力データを10進数で表
すとAは+5、Bは負の数で2の補数表現となっており
−5となる。図5のはセレクタ204の出力デ
ータ205を示し、が第二の入力をそのまま選択し
たデータ201であり、がゼロデータを選択した値で
あり、が第二の入力のすべてのビットを反転したデー
タ202を選択した値である。また、は加算器
207の出力データを示し、がの上位4ビットを符
号拡張した値にラッチ209の初期出力であるゼロデー
タを加算した結果であり、がの上位4ビットを符号
拡張した値にラッチ209の出力214である前記を
加算した結果であり、同様にがの上位4ビットを符
号拡張した値にラッチ209の出力214である前記
を加算した結果である。はセレクタ206における加
算器207へのキャリー入力を示す。はの上位4ビ
ットを符号拡張した値にラッチ209の出力214であ
る前記と前記キャリー入力を加算した結果である。
JKは結果としてデータラッチ部220より出力される
乗算結果を示す。この乗算結果は2の補数表現となって
おり10進数で表すと−25となり、この実施例による
乗算が確かに正しいことがわかる。
The calculation process of the embodiment using the input data of FIG. 4 is shown in FIG. When the input data of FIG. 4 is represented by a decimal number, A is +5, B is a negative number, which is a two's complement representation, and is -5. 5 shows the output data 205 of the selector 204, is the data 201 with the second input selected as it is, is the value with zero data selected, and is the data obtained by inverting all the bits of the second input. This is the value for which 202 is selected. Further, is the output data of the adder 207, and is the result of adding zero data that is the initial output of the latch 209 to the value obtained by sign-extending the upper 4 bits of This is the result of adding the above output 214 of the latch 209, and similarly is the result of adding the above output 214 of the latch 209 to the sign-extended value of the upper 4 bits of. Indicates a carry input to the adder 207 in the selector 206. Is a result obtained by adding the carry input and the output 214 of the latch 209 to a value obtained by sign-extending the upper 4 bits of the.
JK indicates the multiplication result output from the data latch unit 220 as a result. The result of this multiplication is a two's complement representation, which is -25 when expressed in a decimal number, and it can be seen that the multiplication according to this embodiment is certainly correct.

【0015】このようにある値を1度加算した際、最下
位ビットを記憶してそれ以外のビット拡張した桁を次の
加算の入力にすれば一つの加算器で何桁の乗算器でも構
成することが可能である。
As described above, when a certain value is added once, if the least significant bit is stored and the other bit-extended digit is used as the input for the next addition, one adder can be used to multiply the number of digits. It is possible to

【0016】[0016]

【発明の効果】以上のように、本発明によれば一つの加
算器で乗算器を構成できるので、回路規模の小規模化が
可能となる。また、図3をみてもわかるように乗算に要
する時間はイネーブル信号ENが0レベルに変化した次
の基本クロックSCLKの立ち上がりから5クロックで
結果が確定し前記イネーブル信号ENが1レベルになる
まで保持していることがわかる。このような時分割処理
が使用できるアプリケーションの一つに画像処理に多用
される拡大縮小回転を行うアフィン変換があり、このよ
うな使用の場合には回路規模の小規模化のみならず低消
費電力化も可能となる。
As described above, according to the present invention, since a multiplier can be configured with one adder, the circuit scale can be reduced. Further, as can be seen from FIG. 3, the time required for the multiplication is held until the result is fixed at 5 clocks from the next rise of the basic clock SCLK when the enable signal EN changes to 0 level and the enable signal EN becomes 1 level. You can see that One of the applications that can use such time-division processing is affine transformation that performs scaling rotation, which is often used for image processing. In such use, not only the circuit scale is reduced but also low power consumption is achieved. It becomes possible.

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

【図1】 本発明の概略を示すブロック図。FIG. 1 is a block diagram showing an outline of the present invention.

【図2】 本発明の一実施例を示すブロック図。FIG. 2 is a block diagram showing an embodiment of the present invention.

【図4】 本発明の説明に用いた入力データ図。FIG. 4 is an input data diagram used for explaining the present invention.

【図5】 本発明の説明に用いた出力データ図。FIG. 5 is an output data diagram used for explaining the present invention.

【図6】 従来例を示すブロック図。FIG. 6 is a block diagram showing a conventional example.

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

101 第二の入力データ4ビット 102 第二の入力データ4ビットの反転 103 ゼロデータ 104 選択手段 105 選択手段の出力5ビット 106 記憶手段109の出力5ビット 107 加算器 108 加算器の出力5ビット 109 記憶手段 110 第一の入力データ4ビット 111 パラレル・シリアル変換器 112 パラレル・シリアル変換器111のシリアル出
力 113 制御手段 201 第二の入力データ4ビットA0、A1、A2、
A3 202 201の反転データ4ビット 203 201と202のセレクタ 204 セレクタ 205 セレクタ204の出力5ビット 206 加算器207のキャリー入力のセレクタ 207 加算器 208 加算器207の出力 209 208の上位4ビットのラッチ 210 208(4回目の加算結果)の最下位ビットの
ラッチ 211 208(3回目の加算結果)の最下位ビットの
ラッチ 212 208(2回目の加算結果)の最下位ビットの
ラッチ 213 208(1回目の加算結果)の最下位ビットの
ラッチ 214 符号拡張されたラッチ209の出力 215 第一の入力データ4ビットB0、B1、B2、
B3 216 パラレル・シリアル変換器 217 パラレル・シリアル変換器216のシリアル出
力 218 ラッチクロック発生器 219 ラッチクロック発生器218の出力4ビット 220 データラッチ部 601 Aからの入力データ4ビット 602 ゼロデータ 603 1ビットずつ入力されるBからの入力データ 604 選択手段 605 選択手段出力604 606 ゼロデータ 607 加算器 608 加算器 609 加算器 610 加算器 611 加算器607の出力データ5ビット 612 加算器610の出力データ5ビット 613 記憶手段 614 制御手段
101 Second Input Data 4 Bits 102 Second Input Data 4 Bits Inversion 103 Zero Data 104 Selection Means 105 Selection Means Output 5 Bits 106 Storage Means 109 Output 5 Bits 107 Adder 108 Adder Output 5 Bits 109 Storage means 110 First input data 4 bits 111 Parallel / serial converter 112 Serial output of parallel / serial converter 111 113 Control means 201 Second input data 4 bits A0, A1, A2,
A3 202 Inverted data of 201 201 4 selectors of 201 and 202 204 Selector 205 Output of selector 204 5 bits 206 Adder 207 carry input selector 207 Adder 208 Adder 207 output 209 209 Upper 4 bit latch 210 Latch of the least significant bit of 208 (the result of the fourth addition) 211 Latch of the least significant bit of 208 (the result of the third addition) 212 208 Latch of the least significant bit of 208 (the result of the second addition) 213 208 (the first time) Latch of least significant bit of addition result) 214 Output of latch 209 sign-extended 215 First input data 4 bits B0, B1, B2,
B3 216 Parallel / serial converter 217 Serial output of parallel / serial converter 216 218 Latch clock generator 219 Output of latch clock generator 218 4 bits 220 Data latch unit 601 4 bits of input data from A 602 Zero data 603 1 bit Input data from B 604 selection means 605 selection means output 604 606 zero data 607 adder 608 adder 609 adder 610 adder 611 adder 607 output data 5 bits 612 adder 610 output data 5 bits 613 storage means 614 control means

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成5年11月25日[Submission date] November 25, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図面の簡単な説明[Name of item to be corrected] Brief description of the drawing

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

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

【図1】 本発明の概略を示すブロック図。FIG. 1 is a block diagram showing an outline of the present invention.

【図2】 本発明の一実施例を示すブロック図。FIG. 2 is a block diagram showing an embodiment of the present invention.

【図3】 図2の実施例の各部の動作のタイミングチャ
ート。
FIG. 3 is a timing chart of the operation of each part of the embodiment of FIG.

【図4】 本発明の説明に用いた入力データ図。FIG. 4 is an input data diagram used for explaining the present invention.

【図5】 本発明の説明に用いた出力データ図。FIG. 5 is an output data diagram used for explaining the present invention.

【図6】 従来例を示すブロック図。FIG. 6 is a block diagram showing a conventional example.

【符号の説明】 101 第二の入力データ4ビット 102 第二の入力データ4ビットの反転 103 ゼロデータ 104 選択手段 105 選択手段の出力5ビット 106 記憶手段109の出力5ビット 107 加算器 108 加算器の出力5ビット 109 記憶手段 110 第一の入力データ4ビット 111 パラレル・シリアル変換器 112 パラレル・シリアル変換器111のシリアル出
力 113 制御手段 201 第二の入力データ4ビットA0、A1、A2、
A3 202 201の反転データ4ビット 203 201と202のセレクタ 204 セレクタ 205 セレクタ204の出力5ビット 206 加算器207のキャリー入力のセレクタ 207 加算器 208 加算器207の出力 209 208の上位4ビットのラッチ 210 208(4回目の加算結果)の最下位ビットの
ラッチ 211 208(3回目の加算結果)の最下位ビットの
ラッチ 212 208(2回目の加算結果)の最下位ビットの
ラッチ 213 208(1回目の加算結果)の最下位ビットの
ラッチ 214 符号拡張されたラッチ209の出力 215 第一の入力データ4ビットB0、B1、B2、
B3 216 パラレル・シリアル変換器 217 パラレル・シリアル変換器216のシリアル出
力 218 ラッチクロック発生器 219 ラッチクロック発生器218の出力4ビット 220 データラッチ部 601 Aからの入力データ4ビット 602 ゼロデータ 603 1ビットずつ入力されるBからの入力データ 604 選択手段 605 選択手段出力604 606 ゼロデータ 607 加算器 608 加算器 609 加算器 610 加算器 611 加算器607の出力データ5ビット 612 加算器610の出力データ5ビット 613 記憶手段 614 制御手段
[Description of Reference Signs] 101 second input data 4 bits 102 second input data 4 bits inversion 103 zero data 104 selection means 105 output 5 bits of selection means 106 output 5 bits of storage means 107 adder 108 adder Output 5 bits 109 storage means 110 first input data 4 bits 111 parallel-serial converter 112 serial output of parallel-serial converter 111 113 control means 201 second input data 4 bits A0, A1, A2,
A3 202 Inverted data of 201 201 4 selectors of 201 and 202 204 Selector 205 Output of selector 204 5 bits 206 Adder 207 carry input selector 207 Adder 208 Adder 207 output 209 209 Upper 4 bit latch 210 Latch of the least significant bit of 208 (the result of the fourth addition) 211 Latch of the least significant bit of 208 (the result of the third addition) 212 208 Latch of the least significant bit of 208 (the result of the second addition) 213 208 (the first time) Latch of least significant bit of addition result) 214 Output of latch 209 sign-extended 215 First input data 4 bits B0, B1, B2,
B3 216 Parallel / serial converter 217 Serial output of parallel / serial converter 216 218 Latch clock generator 219 Output of latch clock generator 218 4 bits 220 Data latch unit 601 4 bits of input data from A 602 Zero data 603 1 bit Input data from B 604 selection means 605 selection means output 604 606 zero data 607 adder 608 adder 609 adder 610 adder 611 adder 607 output data 5 bits 612 adder 610 output data 5 bits 613 storage means 614 control means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 任意の二つの入力の乗算を行う乗算器に
おいて、第一の入力をクロックにより1ビットずつ順次
出力するパラレル・シリアル変換器と、前記パラレル・
シリアル変換器の出力値に応じて第二の入力データと前
記第二の入力のすべてのビットを反転したデータとゼロ
データとのいずれかを選択する選択手段と、前記選択手
段の出力と記憶手段の出力と前記パラレル・シリアル変
換器の出力により選択されるキャリー入力を加算する加
算手段と、クロックにより前記記憶手段へのパルスを作
成するパルス発生手段と、前記加算手段の出力の最下位
ビットを前記パルス発生手段によるパルスに同期して記
憶し、かつ前記加算手段の出力結果を前記加算手段に出
力する記憶手段よりなることを特徴とする乗算器。
1. A multiplier that multiplies any two inputs, a parallel-serial converter that sequentially outputs the first input bit by bit by a clock, and the parallel-serial converter.
Selection means for selecting either the second input data, the data obtained by inverting all the bits of the second input, or the zero data according to the output value of the serial converter, and the output and storage means of the selection means. Of the carry input selected by the output of the parallel-to-serial converter, pulse generating means for creating a pulse to the storage means by a clock, and the least significant bit of the output of the adding means. A multiplier comprising storage means for storing in synchronism with a pulse generated by the pulse generating means and for outputting an output result of the adding means to the adding means.
JP4140340A 1992-06-01 1992-06-01 Multiplier Pending JPH08190471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4140340A JPH08190471A (en) 1992-06-01 1992-06-01 Multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4140340A JPH08190471A (en) 1992-06-01 1992-06-01 Multiplier

Publications (1)

Publication Number Publication Date
JPH08190471A true JPH08190471A (en) 1996-07-23

Family

ID=15266559

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4140340A Pending JPH08190471A (en) 1992-06-01 1992-06-01 Multiplier

Country Status (1)

Country Link
JP (1) JPH08190471A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005085973A1 (en) * 2004-03-04 2005-09-15 Nec Corporation Data update system, data update method, date update program, and robot system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005085973A1 (en) * 2004-03-04 2005-09-15 Nec Corporation Data update system, data update method, date update program, and robot system

Similar Documents

Publication Publication Date Title
US4635292A (en) Image processor
JPS588009B2 (en) digital multiplier
JPH02202632A (en) Multiplier
JPH0831025B2 (en) Multiplication circuit
US3878985A (en) Serial-parallel multiplier using booth{3 s algorithm with combined carry-borrow feature
US4677583A (en) Apparatus for decimal multiplication
JP2002328915A (en) Matrix calculator of time-sharing system
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JPH05158659A (en) Multiplier
JPH08190471A (en) Multiplier
JP3660075B2 (en) Dividing device
JPS58137045A (en) Parallel multiplier
JP3222313B2 (en) Arithmetic device and arithmetic method
JPS58129653A (en) Multiplication system
JP3461706B2 (en) Digit serial multiplier
JPH1049347A (en) Multiplicator
US6470369B1 (en) Euclid mutual division arithmetic circuit and processing circuit
JPS58151644A (en) Digital operating device
JP2777265B2 (en) High radix square root arithmetic unit
JP3460780B2 (en) Numerical arithmetic unit
JP2968718B2 (en) Arithmetic unit
JPH02114324A (en) Multiplier
JPH0784762A (en) Multiplication circuit
KR0154569B1 (en) Device and method generating random number
JP2001034457A (en) Adding and subtracting circuit