JPH0748203B2 - Square matrix multiplier using three-dimensional device - Google Patents

Square matrix multiplier using three-dimensional device

Info

Publication number
JPH0748203B2
JPH0748203B2 JP63150492A JP15049288A JPH0748203B2 JP H0748203 B2 JPH0748203 B2 JP H0748203B2 JP 63150492 A JP63150492 A JP 63150492A JP 15049288 A JP15049288 A JP 15049288A JP H0748203 B2 JPH0748203 B2 JP H0748203B2
Authority
JP
Japan
Prior art keywords
storage
block
register
square matrix
pointer
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.)
Expired - Lifetime
Application number
JP63150492A
Other languages
Japanese (ja)
Other versions
JPH01316872A (en
Inventor
秀樹 安藤
雅夫 中屋
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63150492A priority Critical patent/JPH0748203B2/en
Publication of JPH01316872A publication Critical patent/JPH01316872A/en
Publication of JPH0748203B2 publication Critical patent/JPH0748203B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は行列乗算器、特に正方行列の乗算を高速で行
なうための3次元デバイスを用いた正方行列乗算器の構
成に関する。
Description: TECHNICAL FIELD The present invention relates to a matrix multiplier, and more particularly to a configuration of a square matrix multiplier using a three-dimensional device for performing multiplication of a square matrix at high speed.

[従来の技術および発明が解決しようとする課題] 科学計算などにおける数値演算処理の1つに正方行列の
乗算がある。従来においては、このような正方行列の乗
算はコンピュータを用いてソフトウェアに従って行なわ
れていた。しかしながら、ソフトウェアで正方行列の乗
算を行なう場合、メモリまたはレジスタからのデータの
読出、読出したデータの乗算および加算、演算結果のメ
モリまたはレジスタへの格納というステップが必然的に
必要とされるため、演算時間が長くなり、高速処理を行
なうことができないという問題がある。
[Problems to be Solved by Prior Art and Invention] One of the numerical operation processes in scientific calculation is multiplication of a square matrix. Conventionally, such multiplication of a square matrix has been performed according to software using a computer. However, when performing square matrix multiplication by software, steps of reading data from a memory or a register, multiplying and adding read data, and storing an operation result in a memory or a register are inevitably required. There is a problem that the calculation time becomes long and high-speed processing cannot be performed.

一方において、スカラ演算器等を用いてハードウェア的
にディスクリートな行列演算器を構成した場合、各演算
器間を接続する配線数が行列の要素数に応じて増大する
とともに、装置構成が大規模となりまた複雑化する。さ
らに、データ(行列要素)入力回路から演算結果(乗算
結果)出力回路までの配線長が長くなり、信号伝搬遅延
が生じ、高速で行列の乗算を行なうことができなくなる
という問題が発生する。
On the other hand, when a hardware-discrete matrix arithmetic unit is configured by using a scalar arithmetic unit or the like, the number of wires connecting each arithmetic unit increases according to the number of elements of the matrix, and the device configuration is large-scale. It becomes complicated again. Furthermore, the wiring length from the data (matrix element) input circuit to the operation result (multiplication result) output circuit becomes long, signal propagation delay occurs, and it becomes impossible to perform matrix multiplication at high speed.

したがって、ハードウェア構成により高速で行列演算を
行なうことのできるコンパクトな構成の正方行列乗算器
の実現が強く望まれていた。
Therefore, it has been strongly desired to realize a square matrix multiplier having a compact structure capable of performing matrix calculation at high speed by a hardware structure.

この発明は上述のような技術背景に鑑みてなされたもの
であり、正方行列の乗算を高速で行なうことのできるコ
ンパクトな構成の正方行列乗算器を提供することを目的
とする。
The present invention has been made in view of the above technical background, and an object of the present invention is to provide a square matrix multiplier having a compact structure capable of performing multiplication of a square matrix at high speed.

[課題を解決するための手段] この発明に係る正方行列乗算器は、行および列状に配列
され、各々が第1の正方行列の対応する要素を記憶する
複数の記憶素子からなる第1の記憶手段と、行および列
状に配列され、各々が第2の正方行列の対応する要素を
記憶する複数の記憶素子からなる第2の記憶手段と、行
および列状に配列され、各々が上記第1の正方行列と上
記第2の正方行列の乗算結果の対応する要素を記憶する
複数の記憶素子からなる第3の記憶手段と、上記第1の
記憶手段のうち上記第1の正方行列のi行k列(i,kは
共に自然数)の要素を格納する記憶素子位置および上記
第2の記憶手段のうち上記第2の正方行列のk行j列の
要素を格納する記憶素子位置をそれぞれ指定する情報を
発生するとともに、上記第3の記憶手段のi行j列の記
憶素子位置を示す情報を発生するポインタ手段と、上記
ポインタ手段により指定された第1および第2の記憶手
段の記憶素子内容を読出して乗算する手段と、上記乗算
手段出力と上記ポインタ手段で指定された第3の記憶手
段の記憶素子内容とを加算するとともに、該加算結果を
上記ポインタ手段で指定された同一の上記第3の記憶手
段の記憶素子内へ格納する加算手段とを備え、かつ上記
第1,第2および第3の記憶手段、上記ポインタ手段、上
記乗算手段ならびに上記加算手段を同一基板上に積層さ
れた複数層の半導体層上に形成して3次元デバイスを構
成したものである。
[Means for Solving the Problem] A square matrix multiplier according to the present invention includes a plurality of storage elements arranged in rows and columns, each storing a corresponding element of a first square matrix. Storage means and a second storage means arranged in rows and columns, each comprising a plurality of storage elements for storing corresponding elements of a second square matrix, and arranged in rows and columns, each of the above A third storage unit including a plurality of storage elements for storing corresponding elements of the multiplication results of the first square matrix and the second square matrix; and the first storage unit of the first square matrix of the first storage unit. The storage element position for storing the element of the i-th row and the k-th column (both i and k are natural numbers) and the storage element position for storing the k-th row and the j-th column element of the second square matrix in the second storage means are respectively set. The specified information is generated and the i of the third storage means is generated. Pointer means for generating information indicating the storage element position of row j column, means for reading and multiplying the storage element contents of the first and second storage means designated by the pointer means, the output of the multiplying means and the above Adder means for adding the storage element content of the third storage means designated by the pointer means and storing the addition result in the same storage element of the third storage means designated by the pointer means; And the first, second and third storage means, the pointer means, the multiplication means and the addition means are formed on a plurality of semiconductor layers laminated on the same substrate to form a three-dimensional device. It is composed.

好ましくは、上記第1の記憶手段は、各行それぞれをシ
フトレジスタで構成し各シフトレジスタ内容が行方向へ
巡回シフトするように構成されている。
Preferably, the first storage means is configured so that each row is composed of a shift register and the contents of each shift register are cyclically shifted in the row direction.

また、好ましくは上記第2の記憶手段はシフトレジスタ
で構成され、該シフトレジスタ内容は列方向に巡回シフ
トするように構成されている。
Further, preferably, the second storage means is composed of a shift register, and the contents of the shift register are arranged to cyclically shift in the column direction.

またさらに、好ましくは、上記第2の記憶手段の列方向
のシフト動作は、上記第1の記憶手段における行方向の
シフトが各行の要素を1回巡回させたときに1度列方向
にシフトされるように構成される。
Still further, preferably, the column-direction shift operation of the second storage means is performed once in the column direction when the row-direction shift in the first storage means makes one cycle through the elements of each row. To be configured.

また、上記第1の記憶手段のシフトレジスタは、各記憶
素子の対角線上の記憶素子内容が読出されるように上記
ポインタ手段により指定され、この状態が初期状態とさ
れる。
Further, the shift register of the first storage means is designated by the pointer means so that the storage element contents on the diagonal of each storage element are read out, and this state is set to the initial state.

[作用] 行列乗算を行なうのに必要とされる機能ブロックが積層
されて3次元デバイスを構成しているため、各機能ブロ
ックの対応する素子を平面図的に見て重なり合うように
配置することが可能となり、各機能ブロック間の接続配
線を、ディスクリート構成の場合と異なり、外部へ取出
す必要がなく、内部配線のみで構成することができ、配
線数および配線長を必要最少限の値にすることができる
とともに、内部配線が錯綜することもなく、コンパクト
な構成の高速正方行列乗算器を得ることができる。特
に、シフトレジスタを用いて第1および第2の記憶手段
を構成することにより、異なる行列の各要素間の接続配
線および各要素の選択構成は最も単純な構成となりかつ
配線長を最小値にすることが可能となる。
[Operation] Since the functional blocks required for performing matrix multiplication are stacked to form a three-dimensional device, it is possible to arrange corresponding elements of the functional blocks so as to overlap each other when seen in plan view. Unlike the discrete configuration, the connection wiring between each functional block does not need to be taken out to the outside, and can be configured with only internal wiring, and the number of wiring and wiring length can be set to the minimum required values. In addition, it is possible to obtain a high-speed square matrix multiplier having a compact structure without causing the internal wiring to be complicated. In particular, by configuring the first and second storage means using shift registers, the connection wiring between each element of different matrices and the selection configuration of each element become the simplest configuration and minimize the wiring length. It becomes possible.

[発明の実施例] 第1図はこの発明の一実施例である正方行列乗算器の全
体の概略構成を示す図であり、4×4(4行4列)の正
方行列A,Bの乗算を行なうための構成を6層構造の3次
元デバイスで実現した場合を一例として示す図である。
[Embodiment of the Invention] FIG. 1 is a diagram showing an overall schematic configuration of a square matrix multiplier according to an embodiment of the present invention, which is a multiplication of 4 × 4 (4 rows × 4 columns) square matrices A and B. FIG. 3 is a diagram showing, as an example, a case where a configuration for performing is realized by a three-dimensional device having a six-layer structure.

第1図を参照して、この発明に従う3次元デバイスを用
いた正方行列乗算器は、第1の記憶ブロック1と、第2
の記憶ブロック2と、第1および第2の記憶ブロック1,
2におけるアクセスされるべき記憶素子の位置情報を発
生するとともに第3の記憶ブロック6におけるアクセス
されるべき記憶素子位置情報を発生するポインタブロッ
ク3と、第1および第2の記憶ブロック1,2から読出さ
れた情報を掛算する乗算器ブロック4と、乗算器ブロッ
ク4出力と第3の記憶ブロック6のうちポインタブロッ
ク3により指定された記憶素子の内容との加算を行なう
加算器ブロック5と、加算器ブロック5出力を記憶する
第3の記憶ブロック6と、各機能ブロックにおける動作
を制御するためのタイミング制御信号を発生する制御信
号発生ブロック7とから構成される。第1の記憶ブロッ
ク1は、4行4列の正方行列Aの各要素を記憶する。第
2の記憶ブロック2は、第2の4行4列の正方行列Bの
各要素を記憶する。ポインタブロック3は、第1および
第2の正方行列A,Bのうち乗算されるべき要素を格納し
ている記憶素子位置情報を発生するとともに、該乗算結
果が格納されるべき第3の記憶ブロック6における記憶
素子位置情報を発生する。乗算器ブロック4は、第1の
正方行列Aと第2の正方行列Bの選択された要素の乗算
を行ない、加算器ブロック5へ与える。加算器ブロック
5は、乗算器ブロック4で乗算された結果とポインタブ
ロック3で選択された第3の記憶ブロックの記憶素子か
らの情報とを加算し、かつ該加算結果をもとの記憶素子
位置へ格納する。第3の記憶ブロック6は、第1の正方
行列Aと第2の正方行列Bの乗算結果を各行列要素対応
に格納する。
Referring to FIG. 1, a square matrix multiplier using a three-dimensional device according to the present invention includes a first storage block 1 and a second storage block 1.
Storage block 2 and the first and second storage blocks 1,
From the pointer block 3 that generates the position information of the storage element to be accessed in 2 and the position information of the storage element to be accessed in the third storage block 6, and the first and second storage blocks 1 and 2. A multiplier block 4 for multiplying the read information; an adder block 5 for adding the output of the multiplier block 4 and the contents of the storage element designated by the pointer block 3 in the third storage block 6; A third storage block 6 for storing the output of the functional block 5 and a control signal generation block 7 for generating a timing control signal for controlling the operation in each functional block. The first storage block 1 stores each element of a square matrix A of 4 rows and 4 columns. The second memory block 2 stores each element of the square matrix B of the second 4 rows and 4 columns. The pointer block 3 generates storage element position information storing an element to be multiplied of the first and second square matrices A and B, and a third storage block in which the multiplication result is stored. The storage element position information in 6 is generated. The multiplier block 4 multiplies selected elements of the first square matrix A and the second square matrix B, and supplies the result to the adder block 5. The adder block 5 adds the result multiplied by the multiplier block 4 and the information from the storage element of the third storage block selected by the pointer block 3, and the addition result is the original storage element position. Store to. The third storage block 6 stores the multiplication result of the first square matrix A and the second square matrix B in correspondence with each matrix element.

制御信号発生回路7は、クロック信号CLKをカウントと
し、カウント値が4,8,12に達するごとにパルス信号を発
生する16進カウンタ71と、16進カウンタ71からの4カウ
ント出力、8カウント出力および12カウント出力を受け
る3入力ORゲート72と、ORゲート72出力を反転するイン
バータ73と、クロック信号CLKとインバータ73出力とを
受けるANDゲート74と、ORゲート72出力とクロック信号C
LKとを受けるANDゲート75とを含む。ANDゲート74出力は
第1の記憶ブロック1におけるシフト動作タイミング信
号を与える。ANDゲート75出力は第2の記憶ブロック2
におけるシフト動作タイミング信号を与える。またクロ
ック信号CLKはポインタブロック3におけるシフト動作
タイミングを与えるとともに、第3の記憶ブロック6に
おけるデータの読出および書込動作タイミング信号を与
える。16進カウンタ71はリセット信号RESETに応答して
リセットされる。このリセット信号RESETは、また第1
の記憶ブロック1、第2の記憶ブロック2におけるデー
タの更新および巡回動作を選択するための選択信号SELE
CTとして用いられる。またこのリセット信号RESETはポ
インタブロック3および第3の記憶ブロック6における
リセット信号としても用いられる。
The control signal generation circuit 7 counts the clock signal CLK and generates a pulse signal each time the count value reaches 4, 8 and 12, and a hexadecimal counter 71 outputs 4 counts and 8 counts. A 3-input OR gate 72 for receiving 12 and 12 count outputs, an inverter 73 for inverting the output of the OR gate 72, an AND gate 74 for receiving the clock signal CLK and the output of the inverter 73, an OR gate 72 output and a clock signal C
AND gate 75 for receiving LK. The output of the AND gate 74 provides the shift operation timing signal in the first storage block 1. The output of the AND gate 75 is the second storage block 2
The shift operation timing signal is given. The clock signal CLK gives a shift operation timing in the pointer block 3 and a data read and write operation timing signal in the third memory block 6. The hexadecimal counter 71 is reset in response to the reset signal RESET. This reset signal RESET is the first
Selection signal SELE for selecting data update and cyclic operation in the memory block 1 and the second memory block 2 of
Used as CT. The reset signal RESET is also used as a reset signal in the pointer block 3 and the third storage block 6.

上述の構成において、各機能ブロック1〜6は同一基板
上に積層され3次元デバイスを構成している。この第1
図に示される実施例においては、各機能ブロック1〜6
は互いに異なる半導体層に形成され、6層の3次元デバ
イスを構成している。制御信号発生回路7は、外部回路
として設けられるか、またはいずれかの機能ブロックと
同一半導体層上に設けられる。
In the above configuration, the respective functional blocks 1 to 6 are laminated on the same substrate to form a three-dimensional device. This first
In the illustrated embodiment, each functional block 1-6
Are formed in different semiconductor layers to form a 6-layer three-dimensional device. The control signal generation circuit 7 is provided as an external circuit, or provided on the same semiconductor layer as any of the functional blocks.

上述のような3次元デバイスの構造はSOI(シリコン・
オン・インシュレータ)技術を用いて実現することがで
きる。したがって、各機能ブロック間の配線は、各機能
ブロックが設けられている半導体層間を分離する絶縁層
に設けられたバイアホールを介して接続される。次に各
機能ブロックの具体的構成について第2図ないし第7図
を参照して説明する。
The structure of the three-dimensional device as described above is SOI (silicon
On-insulator) technology can be used. Therefore, the wirings between the respective functional blocks are connected via the via holes provided in the insulating layer separating the semiconductor layers in which the respective functional blocks are provided. Next, a specific configuration of each functional block will be described with reference to FIGS. 2 to 7.

まず、第2図を参照して、第1の記憶ブロックの構成に
ついて説明する。第2図を参照して、第1の記憶ブロッ
ク1は、4行4列の正方行列の各要素をそれぞれ対応し
て記憶するために、4行4列の行列状に配置されたレジ
スタA11〜A44を備える。レジスタAijは初期状態として
行列Aのi行j列成分を記憶する。各行のレジスタAi1
〜Ai4(i=1〜4)は行方向に巡回シフト可能なシフ
トレジスタを構成する。各レジスタAijの内容はシフト
信号SHIFTの立上がりエッジに応答して1ビットずつ隣
接するシフトレジスタにシフトされる。各行の入力部に
は、新しいデータaiを受けるか、既に記憶されている行
列要素データを巡回させて通過させるかを選択するため
のセレクタ12が設けられる。セレクタ12は新しいデータ
と巡回データのいずれを通過させるかの動作がセレクト
信号SELECTにより制御される。各レジスタAij出力は第
3層のポインタブロックへ伝達される。第1の記憶ブロ
ック1へ与えられるシフト信号SHIFTはインバータ73出
力とクロック信号CLKとのANDをとることにより与えられ
るため、クロック信号CLKの立上がりエッジごとにレジ
スタ内容が行方向へ1ビットシフトするとともに、第4
番目のクロック時にはシフト動作は生じないようにされ
ている。
First, the configuration of the first memory block will be described with reference to FIG. Referring to FIG. 2, first storage block 1 stores registers A11 to 411 arranged in a matrix of 4 rows and 4 columns in order to respectively store respective elements of a square matrix of 4 rows and 4 columns. Equipped with A44. The register Aij stores the i-th row and j-th column component of the matrix A as an initial state. Register Ai1 for each row
Ai4 (i = 1 to 4) form a shift register that can cyclically shift in the row direction. The contents of each register Aij are shifted bit by bit in the adjacent shift register in response to the rising edge of the shift signal SHIFT. The input unit of each row is provided with a selector 12 for selecting whether to receive new data a i or to pass the already stored matrix element data in a circular manner. The select signal SELECT controls the operation of the selector 12 to pass new data or cyclic data. The output of each register Aij is transmitted to the pointer block of the third layer. Since the shift signal SHIFT given to the first memory block 1 is given by ANDing the output of the inverter 73 and the clock signal CLK, the register contents are shifted by 1 bit in the row direction at each rising edge of the clock signal CLK. , 4th
No shift operation occurs at the second clock.

第3図は第2の記憶ブロックの具体的構成を示す図であ
り、4×4の第2の正方行列Bの各要素を記憶するよう
に、4行4列の行列状にレジスタB11〜B44が配列され
る。第2の記憶ブロックのレジスタBijは第1の記憶ブ
ロックのレジスタAijと対応するように設けられている
が、第3図に示す構成においては、レジスタBijは列方
向に記憶内容が巡回し得るように構成されている。すな
わち、第2図に示される第1の記憶ブロックにおいては
行方向にシフトレジスタが構成されている一方、第3図
に示される第2の記憶ブロックにおいては、列方向に1
つのシフトレジスタが構成される。各列のデータ入力部
には、セレクト信号SELECTに応答して、新しいデータbi
を入力するか、既に書込まれている行列要素データを巡
回させて通過させるかのいずれかの動作を行なうセレク
タ22が設けられる。セレクタ22はセレクト信号SELECTが
“L"の場合巡回データを選択的に通過させ、セレクト信
号SELECTが“H"レベルのとき、新しいデータbiを選択的
に通過させる。このセレクタ22の構成および動作は第2
図に示されるセレクタ12と同様である。各レジスタBij
出力は第3層のポインタブロックへ伝達される。レジス
タBijの内容は4クロック毎に1ビット列方向にシフト
される。
FIG. 3 is a diagram showing a specific configuration of the second memory block. Registers B11 to B44 are arranged in a matrix of 4 rows and 4 columns so as to store each element of the 4 × 4 second square matrix B. Are arranged. The register Bij of the second memory block is provided so as to correspond to the register Aij of the first memory block, but in the configuration shown in FIG. 3, the register Bij is arranged so that the memory contents can circulate in the column direction. Is configured. That is, in the first storage block shown in FIG. 2, shift registers are arranged in the row direction, while in the second storage block shown in FIG.
Two shift registers are constructed. The data input section of each column responds to the select signal SELECT with new data bi.
Is provided, or a selector 22 is provided which performs either operation of inputting or passing through the matrix element data already written. The selector 22 selectively passes the cyclic data when the select signal SELECT is “L”, and selectively passes the new data bi when the select signal SELECT is “H” level. The configuration and operation of this selector 22 is the second
It is similar to the selector 12 shown in the figure. Each register Bij
The output is transmitted to the pointer block in the third layer. The contents of the register Bij are shifted in the direction of the 1-bit string every 4 clocks.

第4図はポインタブロックの具体的構成を示す図であ
り、各列に対応して4つのサブブロックP1〜P4が同一構
成を有して設けられる。第1行に対応するポインタサブ
ブロックP1は、行方向に巡回シフト可能な4ビットのシ
フトレジスタから構成される。このサブブロックP1にお
けるレジスタP1iは、第1の記憶ブロックにおける第1
行のレジスタのうちどのレジスタ出力を選択して第4層
へ送出するかを選択し、かつ第2層における第2の記憶
ブロックの第1行のどのレジスタ出力を選択して第4層
へ伝達するかを選択するとともに、第6層に含まれる第
3の記憶ブロックのレジスタ出力のうちどのレジスタ出
力を選択して第5層の加算器ブロックへ伝達するかを決
定する。第1行のサブブロックP1において、各ポインタ
レジスタP1i出力はスイッチングトランジスタSW1iのゲ
ートに接続されるとともに、このポインタ出力は第6層
の第3の記憶ブロックへ伝達される。選択スイッチSW1i
は第1の記憶ブロックからのレジスタA1i出力と第2の
記憶ブロックのレジスタB1i出力を受ける。第1の記憶
ブロックのレジスタA1iおよび第2の記憶ブロックの1
行目のレジスタB1i(i=1〜4)が対をなして選択さ
れて第4層の乗算器ブロックへ乗算されるべきデータa
1,b1として伝達される。この構成においては、各記憶ブ
ロックにおける同一行および同一列に位置するレジスタ
出力が第4層へ伝達される構成となる。各ポインタレジ
スタはリセット信号RESETによりリセットされ、かつシ
フト信号SHIFTに応答してその記憶内容がシフト1ビッ
トずつ行方向にシフトされる。このポインタブロックP1
へ与えられるシフト信号は制御信号発生回路7からのク
ロック信号でありしたがって各クロック信号CLKの立上
がりごとにポインタレジスタP1iの内容が1ビットずつ
行方向にシフトされる。他のサブブロックP2〜P4の構成
も同一であり、サブブロックP2からは第1および第2の
記憶ブロックの第2行目のレジスタA2i,B2i(i=1〜
4)が対をなして選択されて第4層の乗算器ブロックへ
伝達される。第3のサブブロックP3においは、第1の記
憶ブロックの第3行目のレジスタA3i,第2の記憶ブロッ
クの第3行目のレジスタB3iが対をなして選択されてそ
のレジスタ内容が第4層の乗算器へ与えられる。第4の
サブブロックP4は、第1の記憶ブロックおよび第2の記
憶ブロックの第4行目のレジスタA4i,B4iを選択し、そ
の出力を第4層の乗算器へ与える。サブブロックP2〜P4
からのポインタ出力は第1のサブブロックP1と同様に第
6層の第3の記憶ブロックへも与えられる。各ブロック
におけるリセット信号およびシフト信号が与えられるタ
イミングは第1のサブブロックP1と同様であり、同様の
シフト動作およびリセット動作を行なう。
FIG. 4 is a diagram showing a specific structure of the pointer block, and four sub blocks P1 to P4 having the same structure are provided corresponding to each column. The pointer sub-block P1 corresponding to the first row is composed of a 4-bit shift register capable of cyclic shift in the row direction. The register P1i in this sub-block P1 is the first register in the first memory block.
Which register output of the registers in the row is selected to be sent to the fourth layer, and which register output of the first row of the second storage block in the second layer is selected and transmitted to the fourth layer And which register output of the register outputs of the third memory block included in the sixth layer is selected and transmitted to the adder block of the fifth layer. In the sub-block P1 of the first row, each pointer register P1i output is connected to the gate of the switching transistor SW1i, and this pointer output is transmitted to the third storage block in the sixth layer. Select switch SW1i
Receives the register A1i output from the first storage block and the register B1i output of the second storage block. Register A1i of the first storage block and 1 of the second storage block
The data a to be multiplied by the multiplier block of the fourth layer by selecting the registers B1i (i = 1 to 4) in the row in pairs
Transmitted as 1, b1. In this structure, register outputs located in the same row and the same column in each memory block are transmitted to the fourth layer. Each pointer register is reset by the reset signal RESET, and its stored contents are shifted by one bit in the row direction in response to the shift signal SHIFT. This pointer block P1
The shift signal given to is a clock signal from control signal generating circuit 7, and therefore the contents of pointer register P1i are shifted by one bit in the row direction at each rising edge of each clock signal CLK. The other sub-blocks P2 to P4 have the same configuration, and from the sub-block P2, the registers A2i, B2i (i = 1 to 1) of the second row of the first and second storage blocks
4) are selected in pairs and transmitted to the multiplier block of the fourth layer. In the third sub-block P3, the register A3i in the third row of the first storage block and the register B3i in the third row of the second storage block are selected in a pair and the contents of the register are set to the fourth. It is applied to the layer multiplier. The fourth sub-block P4 selects the registers A4i, B4i in the fourth row of the first storage block and the second storage block and supplies the output to the multiplier of the fourth layer. Sub block P2-P4
The pointer output from is also applied to the third storage block in the sixth layer as well as the first sub-block P1. The timing of applying the reset signal and the shift signal in each block is the same as that of the first sub-block P1, and the same shift operation and reset operation are performed.

また上述のポインタの構成において、各ポインタの内容
はシフト信号SHIFTに応答して1ビットずつ行方向にシ
フトされるが、リセット信号RESETに応答して各レジス
タは次のようにセットされる。
Further, in the above-mentioned pointer structure, the contents of each pointer are shifted by one bit in the row direction in response to the shift signal SHIFT, but in response to the reset signal RESET, each register is set as follows.

すなわち、リセット時においては、4行4列の構成にお
いて対角線要素のレジスタのみが1にセットされる。
That is, at the time of reset, only the diagonal element registers are set to 1 in the configuration of 4 rows and 4 columns.

第5図を参照して、乗算器ブロックは、各行対応に設け
られた乗算器MPY1〜MPY4から構成される。乗算器MPY1は
第3層のポインタブロック(サブブロックP1)で選択さ
れた第1行のデータa1とb1との乗算を行ない、乗算結果
m1を第5層の加算器ブロックへ出力する。乗算器MPY2は
同様にポインタブロック(正確にはサブブロックP2)で
選択された第2行の要素a2,b2を第3層を介して受け、
その乗算結果m2=a2・b2を第5層の加算器ブロックへ出
力する。同様に乗算器MPY3は第3層のポインタブロック
(サブブロックP3)で選択された第3行の行列要素a3,b
3の積をとり、その乗算結果m3を第5層の加算器ブロッ
クへ与え、乗算器MPY4はポインタブロックP4で選択され
た行列要素a4とb4出力とを受けて乗算し、該乗算結果m4
を第5層の加算器ブロックへ伝達する。
Referring to FIG. 5, the multiplier block is composed of multipliers MPY1 to MPY4 provided corresponding to each row. The multiplier MPY1 multiplies the data a1 and b1 of the first row selected by the pointer block (sub-block P1) of the third layer by the multiplication result.
Output m1 to the fifth layer adder block. The multiplier MPY2 likewise receives, via the third layer, the elements a2, b2 of the second row selected by the pointer block (more precisely, the sub-block P2),
The multiplication result m2 = a2 · b2 is output to the fifth layer adder block. Similarly, the multiplier MPY3 is the matrix element a3, b of the third row selected by the pointer block (sub-block P3) of the third layer.
The product of 3 is taken and the multiplication result m3 is given to the fifth layer adder block, and the multiplier MPY4 receives and multiplies the matrix elements a4 and b4 output selected by the pointer block P4, and the multiplication result m4
To the adder block of the fifth layer.

第6図を参照して、加算器ブロックは、各行対応に設け
られた加算器ADD1〜ADD4から構成される。加算器ADD1は
第4層の乗算器MPY1出力m1と第6層の第3の記憶ブロッ
クのポインタ(サブブロックP1)により選択された第1
行のレジスタ出力C1-out出力とを受けて加算し、この加
算結果C1-inを再びもとの第3の記憶ブロックの記憶素
子へ格納する。加算器ADD2は、第4層の乗算器MPY2出力
m2と、第6層の第3の記憶ブロックの第2行のデータの
うちポインタ(サブブロックP2)により選択された出力
C2-outとを加算し、該加算結果C2-inを再びもとの記憶
素子位置へ格納する。加算器ADD3は第4層の乗算器MPY3
出力m3と第3の記憶ブロックの第3行の要素のうちポイ
ンタ(サブブロックP3)により選択されたレジスタ出力
C3-out出力とを加算し、この加算結果C3-inを再び選択
された記憶素子位置へ書込む。加算器ADD4は、第4層の
乗算器MPY4出力m4と第3の記憶ブロックの第4行のレジ
スタ出力のうちポインタ(サブブロックP4)により選択
された出力C4-out出力との加算を行ない、この加算結果
C4-inを再びもとの第3の記憶ブロックの第4行のもと
の記憶素子位置へ格納する。
Referring to FIG. 6, the adder block includes adders ADD1 to ADD4 provided corresponding to the respective rows. The adder ADD1 is the first selected by the output m1 of the multiplier MPY1 of the fourth layer and the pointer (sub-block P1) of the third storage block of the sixth layer.
The register output C1-out of the row is received and added, and the addition result C1-in is stored again in the storage element of the original third storage block. Adder ADD2 is the fourth layer multiplier MPY2 output
m2 and the output selected by the pointer (sub-block P2) of the data in the second row of the third storage block in the sixth layer
C2-out is added, and the addition result C2-in is stored again in the original storage element position. The adder ADD3 is the fourth layer multiplier MPY3
Output m3 and register output selected by the pointer (sub-block P3) of the elements in the third row of the third storage block
C3-out output is added, and the addition result C3-in is written again to the selected memory element position. The adder ADD4 adds the output MP4 of the multiplier MPY4 of the fourth layer and the output C4-out output selected by the pointer (sub-block P4) of the register outputs of the fourth row of the third storage block, The result of this addition
The C4-in is stored again in the original storage element position in the fourth row of the original third storage block.

第7図を参照して、第3の記憶ブロック6の構成につい
て説明する。第3の記憶ブロック6は、各行対応に設け
られたブロックC1〜C4から構成される。各ブロックC1〜
C4はそれぞれ同一の構成を有し、各ブロックは4つのレ
ジスタCijを有する。各レジスタCijの入出力部には、第
3層からのポインタ出力Pij出力に応答してオン状態と
なり対応のレジスタCijの入力部を第5層の対応する加
算器出力に結合するとともにレジスタCij出力部を対応
する加算器の入力部に結合するトランジスタスイッチTS
ijが設けられる。各レジスタCijは、クロック信号CLKの
立上がりに応答してその内容を出力し、クロック信号CL
Kの立下がりに応答して与えられたデータを書込み、リ
セット信号RESETの“H"レベルへの移行に応答してリセ
ットされ、各レジスタCij内容がクリアされる。この構
成において、各ブロックC1〜C4の各々はそれぞれ対応す
る加算器ADD1〜ADD4とデータの授受を行なう構成とな
る。
The configuration of the third storage block 6 will be described with reference to FIG. The third memory block 6 is composed of blocks C1 to C4 provided for each row. Each block C1 ~
C4 has the same configuration, and each block has four registers Cij. The input / output unit of each register Cij is turned on in response to the pointer output Pij output from the third layer, and the input unit of the corresponding register Cij is coupled to the corresponding adder output of the fifth layer and the register Cij output is output. Switch TS that couples a section to the input of the corresponding adder
ij is provided. Each register Cij outputs its contents in response to the rising edge of the clock signal CLK, and the clock signal CL
The supplied data is written in response to the fall of K, and it is reset in response to the transition of the reset signal RESET to "H" level, and the contents of each register Cij are cleared. In this configuration, each of the blocks C1 to C4 exchanges data with the corresponding adders ADD1 to ADD4.

第8図は、第2図ないし第7図を参照して説明した3次
元デバイスを用いた乗算器の構成のうちi行に沿って切
断した構成を示す図である。第8図から見られるよう
に、正方行列乗算器をb層の3次元デバイス構造とする
ことにより、各行の対応する構成要素を垂直方向に積層
することができ、平面図的に見て重なり合うように配置
することができ、各回路構成を接続する配線が錯綜する
こともなく、配線数を最小にしてコンパクトな構成の3
次元構造の正方行列乗算器が実現されている。上述の構
成により、各行列要素記憶部分から乗算結果を記憶する
記憶部分までの配線長を最小とすることができ、また各
回路構成がハードウェアで構成されているため、高速で
乗算を行なうことが可能となる。
FIG. 8 is a diagram showing a configuration of the multiplier using the three-dimensional device described with reference to FIGS. 2 to 7, taken along the i-th row. As can be seen from FIG. 8, the square matrix multiplier has a b-layer three-dimensional device structure, so that the corresponding constituent elements in each row can be vertically stacked so that they overlap each other in plan view. It is possible to arrange the circuit structure in a simple manner, and the wiring connecting each circuit configuration is not complicated, and the number of wirings is minimized to achieve a compact configuration.
A dimensional structured square matrix multiplier has been implemented. With the above configuration, the wiring length from each matrix element storage portion to the storage portion for storing the multiplication result can be minimized, and since each circuit configuration is configured by hardware, high-speed multiplication can be performed. Is possible.

次に第2図ないし第8図を参照して、この発明の一実施
例である正方行列乗算器の動作について説明する。ここ
で、第9図に動作波形図を示し、第10図に第1の記憶ブ
ロックおよび第2の記憶ブロックにおけるレジスタ内容
のシフト動作を具体的に示す。
Next, the operation of the square matrix multiplier according to the embodiment of the present invention will be described with reference to FIGS. Here, FIG. 9 shows an operation waveform diagram, and FIG. 10 specifically shows a shift operation of register contents in the first memory block and the second memory block.

(1)初期設定 まず、リセット信号RESETを“H"レベルにする。これに
より、セレクタ12,22はそれぞれ新しく外部から与えら
れるデータを通過させる状態となる。次に、計算すべき
行列A,Bの要素に対応するデータa1〜a4,データb1〜b4の
値を設定し、クロック信号CLKに応答して第1の記憶ブ
ロック1,第2の記憶ブロック2の各レジスタAij,Bijに
行列A,Bの対応する要素の値をセットする。この状態は
第10図における初期値の状態で示される。今リセット信
号RESETは“H"レベルにあり、第3の記憶ブロック6に
おけるレジスタCij、および16進カウンタ71はクリアさ
れており、その記憶内容およびカウンタ値は0である。
これと同時に、ポインタブロック3に含まれるポインタ
レジスタPijは、その対角線要素のみがすなわちPiiのみ
が“H"レベルを出力するようにセットされる。第10図に
おいて、破線より上は行列B、すなわち第2層における
第2の記憶ブロックの各レジスタの初期設定状態および
それ以降のシフト動作を示し、破線より下の部分は第1
の記憶ブロックにおける行列Aの各要素のシフト動作を
示している。したがって初期設定状態においては、第10
図において初期値として示される状態が各レジスタAij,
Bijにセットされている。またポインタレジスタPijがリ
セット信号RESETによりリセットされているため、第10
図において数字の下にアンダーラインを引いて示されて
いる部分の出力が選択される状態となっている。ここで
また第10図において、4行4列の構成のうち、i行j列
の位置は各レジスタAij,Bijを表わしており、各位置に
示されている数字(kl)は入力された行列のk行l列の
要素を表わしている。
(1) Initial setting First, the reset signal RESET is set to "H" level. As a result, the selectors 12 and 22 are in a state of respectively passing the data newly given from the outside. Next, the values of the data a1 to a4 and the data b1 to b4 corresponding to the elements of the matrices A and B to be calculated are set, and the first storage block 1 and the second storage block 2 are responsive to the clock signal CLK. The values of the corresponding elements of the matrices A and B are set in the respective registers Aij and Bij of. This state is shown as an initial state in FIG. Now, the reset signal RESET is at "H" level, the register Cij in the third storage block 6 and the hexadecimal counter 71 are cleared, and the stored contents and the counter value are zero.
At the same time, the pointer register Pij included in the pointer block 3 is set so that only its diagonal element, that is, only Pii outputs the "H" level. In FIG. 10, the part above the broken line shows the matrix B, that is, the initial setting state of each register of the second memory block in the second layer and the shift operation thereafter, and the part below the broken line shows the first part.
7 shows the shift operation of each element of the matrix A in the memory block of FIG. Therefore, in the initial setting state,
The state shown as the initial value in the figure is the register Aij,
It is set to Bij. Since the pointer register Pij is reset by the reset signal RESET,
In the figure, the output of the part indicated by underlining below the number is selected. Here again, in FIG. 10, in the configuration of 4 rows and 4 columns, the position of row i and column j represents each register Aij, Bij, and the number (kl) shown at each position is the input matrix. Represents the element of row k and row 1.

(2)乗算 リセット信号RESETを“L"レベルとし、クロック信号CLK
を動作させることにより、このクロック信号CLKに応答
して行列の乗算を行なう。
(2) Multiply Reset signal RESET is set to "L" level and clock signal CLK
Is operated to perform matrix multiplication in response to the clock signal CLK.

まずリセット信号RESETを“L"とする。これによ
り、セレクタ12,22は、外部データを受け付けず、内部
データを巡回させる。また、ポインタブロックにおける
対角線上のポインタPii出力を受けるスイッチSWiiがす
べてオン状態となり、第1の記憶ブロックからの対角線
要素aiiと第2の記憶ブロックの対角線要素biiとがそれ
ぞれ出力され、乗算器へ与えられる。乗算器MPY1〜MPY4
はそれぞれ与えられた行列要素の乗算を行なって第5層
の加算器へ与える。加算器ブロックに含まれるレジスタ
はポインタレジスタ出力に応答してCiiの対角線部分が
選択されているため、加算器ADD1〜ADD4の出力は ADD1=a11×b11+c11 ADD2=a22×b22+c22 ADD3=a33×b33+c33 ADD4=a44×b44+c44 となる。クロック信号CLKが“L"へ立下がると、第3の
記憶ブロックのレジスタCiiへ各対応の値が書込まれ、
そこでラッチされる。このクロック信号の立下がりに応
答して16進カウンタ71のカウント値が1つ進み1とな
る。
First, the reset signal RESET is set to "L". As a result, the selectors 12 and 22 do not accept the external data, and circulate the internal data. Further, all the switches SWii that receive the pointer Pii output on the diagonal line in the pointer block are turned on, and the diagonal element aii from the first storage block and the diagonal element bii of the second storage block are output to the multiplier. Given. Multiplier MPY1 to MPY4
Respectively apply the given matrix elements to the fifth layer adder. Since the diagonal part of Cii is selected in response to the pointer register output in the register included in the adder block, the outputs of the adders ADD1 to ADD4 are ADD1 = a11 x b11 + c11 ADD2 = a22 x b22 + c22 ADD3 = a33 x b33 + c33 ADD4 = A44 x b44 + c44. When the clock signal CLK falls to "L", the corresponding value is written in the register Cii of the third memory block,
It is latched there. In response to the fall of this clock signal, the count value of the hexadecimal counter 71 is incremented by 1 and becomes 1.

再びクロック信号CLKが立上がると、それに応答し
て、第1の記憶ブロックにおけるレジスタAijの内容が
1ビットずつ行方向にシフトされる。同時にポインタブ
ロックに含まれるポインタレジスタPijの出力も1ビッ
トずつ行方向へシフトされる。この結果、第1の記憶ブ
ロックにおけるレジスタAijの記憶内容は第10図のに
示す状態となる。一方において、記憶ブロック2におけ
る記憶内容は、そのシフト信号は16進カウンタ71のカウ
ント数が4となるごとに発生されるため、記憶ブロック
2における行列Bの記憶内容は変化しない。したがっ
て、加算器ADD1〜ADD4出力は、 ADD1=a11×b12+c12 ADD2=a22×b23+c23 ADD3=a33×b34+c34 ADD4=a44×b41+c41 となる。クロック信号CLKが“L"に移行すると、これら
の加算結果が、それぞれポインタレジスタにより選択さ
れた第3の記憶ブロックのレジスタC12,C23,C34,C41に
ラッチされる。また16進カウンタ71におけるカウント値
は1つインクリメントされ、2となる。
When the clock signal CLK rises again, in response thereto, the contents of the register Aij in the first storage block are shifted bit by bit in the row direction. At the same time, the output of the pointer register Pij included in the pointer block is also shifted by one bit in the row direction. As a result, the storage contents of the register Aij in the first storage block will be in the state shown in FIG. On the other hand, the storage content of the storage block 2 does not change because the shift signal is generated each time the count number of the hexadecimal counter 71 reaches 4. Therefore, the outputs of the adders ADD1 to ADD4 are ADD1 = a11 * b12 + c12 ADD2 = a22 * b23 + c23 ADD3 = a33 * b34 + c34 ADD4 = a44 * b41 + c41. When the clock signal CLK shifts to "L", these addition results are latched in the registers C12, C23, C34, C41 of the third storage block selected by the pointer register, respectively. Further, the count value in the hexadecimal counter 71 is incremented by one and becomes 2.

次に、クロック信号CLKが“H"へ移行すると、第1
の記憶ブロック1のレジスタAijの内容は1ビットずつ
行方向にシフトし、かつポインタレジスタPijの内容は
1ビットずつ行方向へシフトする。このとき、第2の記
憶ブロック2のレジスタBijの内容はシフトされず、初
期状態を保持している。この結果、ポインタレジスタPi
jにより選択されたレジスタAij,Bij,Cijがそれぞれステ
ップで選択されたレジスタと行方向に隣接するレジス
タとなる。したがって、加算器ADDi出力は、 ADD1=a11×b13+c13 ADD2=a22×b24+c24 ADD3=a33×b31+c31 ADD4=a44×b42+c42 となる。クロック信号CLKが“L"へ移行すると、この加
算器ADDi出力がそれぞれ第3のポインタレジスタPijに
より選択されているレジスタC13,C24,C31,C42にラッチ
される。16進カウンタ71のカウント値はこのクロック信
号の変化に応答して3となる。
Next, when the clock signal CLK shifts to "H", the first
The contents of the register Aij of the storage block 1 are shifted by 1 bit in the row direction, and the contents of the pointer register Pij are shifted by 1 bit in the row direction. At this time, the contents of the register Bij of the second storage block 2 are not shifted and the initial state is held. As a result, the pointer register Pi
The registers Aij, Bij, and Cij selected by j become the registers adjacent in the row direction to the registers selected in the step. Therefore, the output of the adder ADDi is ADD1 = a11 * b13 + c13 ADD2 = a22 * b24 + c24 ADD3 = a33 * b31 + c31 ADD4 = a44 * b42 + c42. When the clock signal CLK shifts to "L", the outputs of the adder ADDi are latched in the registers C13, C24, C31, C42 selected by the third pointer register Pij, respectively. The count value of the hexadecimal counter 71 becomes 3 in response to the change of this clock signal.

クロック信号CLKが“H"となると、上述のステップ
と同様にして、第1の記憶ブロックAijの内容は第10図
ので示されるようにその内容が行方向に1ビットずつ
シフトされるとともに、ポインタレジスタPij出力も1
ビットずつ行方向へシフトされる。このとき、まだ16進
カウンタ71のカウント値は3であるため、第2の記憶ブ
ロック2におけるレジスタBijの内容は変化しない。し
たがって、加算器ADDi出力は、 ADD1=a11×b14+c14 ADD2=a22×b21+c21 ADD3=a33×b32+c32 ADD4=a44×b43+c43 となる。クロック信号信号CLKが“L"へ移行すると、こ
れらの加算器出力がそれぞれポインタレジスタにより選
択されたレジスタC14,C21,C32,C43へ書込まれ、そこで
ラッチされる。また、16進カウンタ71のカウント値は1
つインクリメントされ4となる。
When the clock signal CLK becomes "H", the contents of the first memory block Aij are shifted by one bit in the row direction and the pointer is moved in the same manner as in the above steps, as shown in FIG. Register Pij output is also 1
Bitwise shifted in the row direction. At this time, since the count value of the hexadecimal counter 71 is still 3, the content of the register Bij in the second storage block 2 does not change. Therefore, the output of the adder ADDi is ADD1 = a11 * b14 + c14 ADD2 = a22 * b21 + c21 ADD3 = a33 * b32 + c32 ADD4 = a44 * b43 + c43. When the clock signal signal CLK shifts to "L", the outputs of these adders are written to the registers C14, C21, C32, C43 selected by the pointer registers, respectively, and latched there. In addition, the count value of the hexadecimal counter 71 is 1
Is incremented to 4 and becomes 4.

次にクロック信号CLKが“H"へ移行すると、第1の記
憶ブロック1のシフト信号は、インバータ73およびAND
ゲート74の働きにより与えられず、その記憶内容はシフ
トしない。一方、第2の記憶ブロック2に対するシフト
信号SHIFTは、クロック信号CLKの立上がりに応答してOR
ゲート72出力により発生され、記憶ブロック2における
レジスタBijの内容が列方向に1ビットずつシフトされ
る。また、ポインタブロック3のシフト信号SHIFTはク
ロック信号であり、その内容が1ビットずつ行方向にに
シフトされる。その結果、レジスタAij,Bijおよびポイ
ンタレジスタPijの内容は第10図に示す状態となり、
加算器ADDi出力は、 ADD1=a12×b21+c11 ADD2=a23×b32+c22 ADD3=a34×b43+c33 ADD4=a41×b14+c44 となる。クロック信号CLKは“L"へ移行すると、これら
の加算器出力がそれぞれ、ポインタレジスタPijにより
選択されている記憶レジスタC11,C22,C33,C44にそれぞ
れラッチされる。また、16進カウンタ71のカウント値は
5となる。
Next, when the clock signal CLK shifts to “H”, the shift signal of the first storage block 1 is transferred to the inverter 73 and the AND
It is not given by the action of the gate 74 and its stored contents do not shift. On the other hand, the shift signal SHIFT for the second memory block 2 is ORed in response to the rising of the clock signal CLK.
Generated by the output of the gate 72, the contents of the register Bij in the storage block 2 are shifted bit by bit in the column direction. The shift signal SHIFT of the pointer block 3 is a clock signal, and its contents are shifted bit by bit in the row direction. As a result, the contents of the registers Aij and Bij and the pointer register Pij are in the state shown in FIG.
The output of the adder ADDi is ADD1 = a12 x b21 + c11 ADD2 = a23 x b32 + c22 ADD3 = a34 x b43 + c33 ADD4 = a41 x b14 + c44. When the clock signal CLK shifts to "L", these adder outputs are respectively latched in the storage registers C11, C22, C33, C44 selected by the pointer register Pij. Further, the count value of the hexadecimal counter 71 is 5.

以下、上述のステップを繰返し、15回クロック信号CLK
を変化させることにより、16回目のクロック信号CLKが
立下がった時点において、第3の記憶ブロックのレジス
タCijには、 Cij=Σaikbkj,1≦i,k,j≦4 がラッチされている。したがって、第3の記憶ブロック
6においては、正方行列Aと正方行列Bの積結果がラッ
チされていることになる。
After repeating the above steps, the clock signal CLK is repeated 15 times.
By changing, Cij = Σa ik b kj , 1 ≦ i, k, j ≦ 4 is latched in the register Cij of the third memory block at the time when the 16th clock signal CLK falls. There is. Therefore, the product result of the square matrix A and the square matrix B is latched in the third storage block 6.

なお上述の実施例においては、第3の記憶ブロックにお
けるレジスタCij内容をこの正方行列乗算器より出力す
る方法を示していないが、この乗算結果を出力する回路
構成は、この乗算器の適用分野において決定される。す
なわち、たとえば第1の記憶ブロックおよび第2の記憶
ブロックにおけるレジスタAij,Bijへのデータ入力と同
様に、第3の記憶ブロックのレジスタCijをシフトレジ
スタ構成とすれば、乗算結果出力をベクトル単位で出力
することが可能となる。また、第7層にそのデータ処理
系が存在し、この乗算結果がその処理系で処理される場
合には、レジスタCij出力を並列に第7層へ出力する構
成としてもよい。
Although the above embodiment does not show the method of outputting the contents of the register Cij in the third storage block from this square matrix multiplier, the circuit configuration for outputting this multiplication result is in the application field of this multiplier. It is determined. That is, for example, if the register Cij of the third storage block has a shift register configuration as in the case of data input to the registers Aij and Bij in the first storage block and the second storage block, the multiplication result output is expressed in vector units. It becomes possible to output. When the data processing system exists in the seventh layer and the multiplication result is processed by the processing system, the output of the register Cij may be output in parallel to the seventh layer.

さらに、上記実施例においては、各機能ブロックが個々
の半導体層に形成された6層の3次元デバイス構造で正
方行列乗算器を実現した構成について説明したが、この
構成に代えて、いくつかの機能ブロックを1つの半導体
層に構成し、機能ブロック数よりも少ない半導体層から
なる3次元デバイス構成で行列乗算器を実現しても上記
実施例と同様の効果を得ることができる。
Further, in the above-described embodiment, the configuration in which the square matrix multiplier is realized by the six-layer three-dimensional device structure in which each functional block is formed in each semiconductor layer has been described. Even if the functional blocks are configured in one semiconductor layer and the matrix multiplier is realized by the three-dimensional device configuration including the semiconductor layers whose number is smaller than the number of functional blocks, the same effect as in the above embodiment can be obtained.

またさらに、タイミング信号発生回路7は、この3次元
デバイスが構成されたチップ基板の外部に設ける構成と
してもよいし、また同一基板上に集積する構成の場合に
は、各機能ブロックが構成されている半導体層のいずれ
かの層に集積化することにより集積度を改善することが
できる。
Furthermore, the timing signal generating circuit 7 may be provided outside the chip substrate in which this three-dimensional device is configured, or in the case of the configuration integrated on the same substrate, each functional block is configured. The degree of integration can be improved by integrating the semiconductor layer in any one of the existing semiconductor layers.

さらに、上記実施例においては、4×4(4行4列)の
正方行列乗算について説明したが、この発明による正方
行列乗算器はその次数が4に限定されず、他の次数の正
方行列においても適用可能である。
Furthermore, in the above embodiment, the 4 × 4 (4 rows × 4 columns) square matrix multiplication has been described. However, the square matrix multiplier according to the present invention is not limited to the order of 4, and square matrices of other orders may be used. Is also applicable.

[発明の効果] 以上のようにこの発明によれば、正方行列の乗算に必要
とされる機能ブロック、すなわち第1の正方行列の各要
素を格納する第1の記憶ブロック、第2の正方行列を記
憶する第2の記憶ブロック、乗算結果の正方行列の各要
素を記憶する第3の記憶ブロック、第1の記憶ブロック
および第2の記憶ブロックにおける乗算されるべき要素
を記憶する記憶素子の位置情報を発生するとともに、乗
算結果を格納すべき第3の記憶ブロックの記憶素子位置
情報を発生するポインタブロック、ポインタブロック出
力により選択された第1および第2の記憶ブロックの記
憶素子内容を乗算する乗算ブロック、乗算ブロックで乗
算された乗算結果およびポインタブロックにより指定さ
れた第3の記憶ブロックの記憶素子内容を加算するとと
もに、もとの記憶素子位置へ加算結果を格納する加算ブ
ロックとを同一基板上に積層して3次元デバイス構造と
しているため、簡易かつコンパクトな構成で正方行列乗
算器を実現することができ、かつ配線長および配線数を
必要最少限の値に留めることができ、高速乗算を行なう
ことのできるコンパクトな構成の正方行列乗算器を得る
ことができる。
[Effects of the Invention] As described above, according to the present invention, a functional block required for multiplication of a square matrix, that is, a first storage block that stores each element of the first square matrix, a second square matrix A second memory block for storing, a third memory block for storing each element of the square matrix of the multiplication result, and a position of a memory element for storing the element to be multiplied in the first memory block and the second memory block A pointer block for generating information and generating memory element position information of a third memory block for storing the multiplication result, and multiplying the memory element contents of the first and second memory blocks selected by the pointer block output The multiplication block, the multiplication result multiplied by the multiplication block, and the storage element contents of the third storage block designated by the pointer block are added together. In addition, since the addition block that stores the addition result in the original storage element position is stacked on the same substrate to form a three-dimensional device structure, a square matrix multiplier can be realized with a simple and compact configuration. Moreover, the wiring length and the number of wirings can be kept to the minimum necessary values, and a square matrix multiplier having a compact structure capable of performing high speed multiplication can be obtained.

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

第1図はこの発明の一実施例である正方行列乗算器の全
体の概略構成を示す図である。第2図は、この発明の一
実施例である正方行列乗算器における正方行列の各要素
を記憶する第1の記憶ブロックの概略構成を示す図であ
る。第3図はこの発明の一実施例である正方行列乗算器
において用いられる第2の正方行列の各要素を記憶する
第2の記憶ブロックの構成を示す図である。第4図はこ
の発明の一実施例である正方行列乗算器において用いら
れるポインタブロックの構成を示す図である。第5図は
この発明の一実施例である正方行列乗算器に用いられる
乗算器の概略構成を示す図である。第6図はこの発明の
一実施例である正方行列乗算器において用いられる加算
器ブロックの構成を示す図である。第7図はこの発明の
一実施例である正方行列乗算器において用いられる乗算
結果の正方行列を記憶する第3の記憶ブロックの構成を
示す図である。第8図はこの発明の一実施例である正方
行列乗算器の第i行の構成を示す図である。第9図はこ
の発明の一実施例である正方行列乗算器の動作タイミン
グを示す波形図である。第10図はこの発明の一実施例で
ある正方行列乗算器における第1の記憶ブロック、第2
の記憶ブロックおよびポインタブロックにおけるシフト
動作を示す図である。 図において、1は第1の記憶ブロック、2は第2の記憶
ブロック、3はポインタブロック、4は乗算器ブロッ
ク、5は加算器ブロック、6は第3の記憶ブロック、7
は制御タイミング信号発生回路、Aij(i,j=1〜4)は
第1の記憶ブロックの記憶素子であるレジスタ、Bij
(i,j=1〜4)は第2の記憶ブロックにおける記憶素
子であるレジスタ、Cij(i,j=1〜4)は第3の記憶ブ
ロックにおける記憶素子であるレジスタ、Pij(i,j=1
〜4)はポインタブロックに含まれるポインタレジス
タ、MPYi(i=1〜4)は乗算器、ADDi(i=1〜4)
は加算器、12,22は第1,第2の記憶ブロックにおけるデ
ータを巡回させるか外部データを入力するかのいずれか
を選択するセレクタ、TSij(i,j=1〜4)は第3の記
憶ブロックにおけるレジスタへの入出力を行なうための
トランジスタスイッチ、SWij(i,j=1〜4)は第1の
記憶ブロックおよび第2の記憶ブロックのレジスタを選
択するためのスイッチである。 なお、図中、同一符号は同一または相当部分を示す。
FIG. 1 is a diagram showing an overall schematic configuration of a square matrix multiplier which is an embodiment of the present invention. FIG. 2 is a diagram showing a schematic configuration of a first storage block for storing each element of the square matrix in the square matrix multiplier according to the embodiment of the present invention. FIG. 3 is a diagram showing a configuration of a second storage block for storing each element of the second square matrix used in the square matrix multiplier according to the embodiment of the present invention. FIG. 4 is a diagram showing the structure of a pointer block used in a square matrix multiplier according to an embodiment of the present invention. FIG. 5 is a diagram showing a schematic configuration of a multiplier used in a square matrix multiplier according to an embodiment of the present invention. FIG. 6 is a diagram showing the structure of an adder block used in a square matrix multiplier according to an embodiment of the present invention. FIG. 7 is a diagram showing the configuration of a third storage block for storing the square matrix of the multiplication result used in the square matrix multiplier according to the embodiment of the present invention. FIG. 8 is a diagram showing the configuration of the i-th row of the square matrix multiplier according to the embodiment of the present invention. FIG. 9 is a waveform diagram showing the operation timing of the square matrix multiplier according to the embodiment of the present invention. FIG. 10 shows a first storage block and a second storage block in a square matrix multiplier according to an embodiment of the present invention.
FIG. 6 is a diagram showing a shift operation in the storage block and the pointer block of FIG. In the figure, 1 is a first storage block, 2 is a second storage block, 3 is a pointer block, 4 is a multiplier block, 5 is an adder block, 6 is a third storage block, and 7 is a block.
Is a control timing signal generation circuit, Aij (i, j = 1 to 4) is a register which is a storage element of the first storage block, and Bij
(I, j = 1 to 4) is a register which is a storage element in the second storage block, Cij (i, j = 1 to 4) is a register which is a storage element in the third storage block, and Pij (i, j = 1
~ 4) is a pointer register included in the pointer block, MPYi (i = 1 to 4) is a multiplier, ADDi (i = 1 to 4)
Is an adder, 12 and 22 are selectors for selecting whether to circulate data in the first and second storage blocks or input external data, and TSij (i, j = 1 to 4) is a third selector A transistor switch SWij (i, j = 1 to 4) for inputting / outputting to / from a register in the memory block is a switch for selecting a register of the first memory block and the second memory block. In the drawings, the same reference numerals indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】n行n列(n:自然数)の第1および第2の
正方行列の乗算を行なうための乗算器であって、 行および列状に配列され、各々が前記第1の正方行列の
対応の要素データを記憶する複数の記憶素子を含み、か
つ前記行の方向に沿って巡回的に記憶データのシフト動
作が可能な第1の記憶手段と、 行および列状に配列され、各々が前記第2の正方行列の
対応の要素データを記憶する複数の記憶素子を含み、か
つ前記列の方向に沿って巡回的に記憶データのシフト動
作が可能な第2の記憶手段と、 行および列状に配列され、各々が前記第1の正方行列と
前記第2の正方行列の乗算結果の対応する要素データを
記憶する複数の記憶素子を含む第3の記憶手段と、 前記第1の記憶手段のうちの前記第1の正方行列のi行
k列(1≦i≦n,1≦k≦n)の要素データを記憶する
記憶素子の位置情報および前記第2の記憶手段のうちの
前記第2の正方行列のk行j列(1≦j≦n)の要素デ
ータを格納する記憶素子の位置情報をそれぞれ発生する
とともに、前記第3の記憶手段のi行j列の記憶素子の
位置情報を発生するための、各々が前記行の方向に沿っ
て保持情報を巡回的にシフト動作させることが可能であ
りかつ各行において1列を指定する位置情報を発生する
n行のポインタを含むポインタ手段と、 前記ポインタ手段が発生した位置情報に応答して、前記
第1および第2の記憶手段の指定された記憶素子の情報
を読出して乗算する乗算手段と、 前記乗算手段の出力と前記ポインタ手段からの位置情報
により指定された前記第3の記憶手段の記憶素子の内容
とを加算するとともに、該加算結果を前記ポインタ手段
により指定された前記第3の記憶手段の元の記憶素子へ
格納する加算手段とを備え、かつ 前記第1、第2および第3の記憶手段、前記ポインタ手
段、前記乗算手段ならびに前記加算手段は同一基板上に
積層された複数の半導体層に形成され、3次元デバイス
を構成する、3次元デバイスを用いた正方行列乗算器。
1. A multiplier for multiplying first and second square matrices of n rows and n columns (n: natural number) arranged in rows and columns, each of which is the first square. First storage means including a plurality of storage elements for storing corresponding element data of a matrix and capable of cyclically shifting the storage data along the direction of the row, and arranged in rows and columns, Second storage means each including a plurality of storage elements for storing corresponding element data of the second square matrix, and capable of cyclically shifting the storage data along the column direction; And a third storage unit arranged in columns, each of which includes a plurality of storage elements for storing corresponding element data of a multiplication result of the first square matrix and the second square matrix; The i-th row and k-th column (1≤i≤n, 1≤ of the first square matrix of the storage means Position information of a storage element that stores element data of ≦ n) and a storage element that stores the element data of k row and j column (1 ≦ j ≦ n) of the second square matrix of the second storage means. To generate position information of the storage element at the i-th row and the j-th column of the third storage means, each of them cyclically shifts the retained information along the direction of the row. Pointer means including pointers of n rows for generating position information designating one column in each row, and the first and second storage means in response to the position information generated by the pointer means. And multiplying the output of the multiplying means and the content of the storage element of the third storage means designated by the position information from the pointer means, and An addition means for storing the addition result in the original storage element of the third storage means designated by the pointer means, and the first, second and third storage means, the pointer means, A square matrix multiplier using a three-dimensional device in which the multiplying means and the adding means are formed on a plurality of semiconductor layers stacked on the same substrate to form a three-dimensional device.
JP63150492A 1988-06-17 1988-06-17 Square matrix multiplier using three-dimensional device Expired - Lifetime JPH0748203B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63150492A JPH0748203B2 (en) 1988-06-17 1988-06-17 Square matrix multiplier using three-dimensional device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63150492A JPH0748203B2 (en) 1988-06-17 1988-06-17 Square matrix multiplier using three-dimensional device

Publications (2)

Publication Number Publication Date
JPH01316872A JPH01316872A (en) 1989-12-21
JPH0748203B2 true JPH0748203B2 (en) 1995-05-24

Family

ID=15498053

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63150492A Expired - Lifetime JPH0748203B2 (en) 1988-06-17 1988-06-17 Square matrix multiplier using three-dimensional device

Country Status (1)

Country Link
JP (1) JPH0748203B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180007302A1 (en) 2016-07-01 2018-01-04 Google Inc. Block Operations For An Image Processor Having A Two-Dimensional Execution Lane Array and A Two-Dimensional Shift Register
CN112214726B (en) 2017-07-07 2024-05-03 华为技术有限公司 Operation accelerator

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50120535A (en) * 1974-03-06 1975-09-20
JPS613450A (en) * 1984-06-18 1986-01-09 Hiroshima Daigaku Shared memory integrated device of three-dimensional photo coupling

Also Published As

Publication number Publication date
JPH01316872A (en) 1989-12-21

Similar Documents

Publication Publication Date Title
KR102614616B1 (en) Homomorphic Processing Unit (HPU) for accelerating secure computations by homomorphic encryption
US3723715A (en) Fast modulo threshold operator binary adder for multi-number additions
Hatamian et al. A 70-MHz 8-bit/spl times/8-bit parallel pipelined multiplier in 2.5-/spl mu/m CMOS
Stenzel et al. A compact high-speed parallel multiplication scheme
JP3251421B2 (en) Semiconductor integrated circuit
US5596743A (en) Field programmable logic device with dynamic interconnections to a dynamic logic core
US5214747A (en) Segmented neural network with daisy chain control
US6721774B1 (en) Low power multiplier
US4601006A (en) Architecture for two dimensional fast fourier transform
JPH05224892A (en) Square circuit
GB2030743A (en) Multiplier for binary numbers in two's complement notation
Lin Reconfigurable parallel inner product processor architectures
JP2994390B2 (en) Transposition memory for data processing circuits
US9933998B2 (en) Methods and apparatuses for performing multiplication
Fisher et al. Design of the PSC: A programmable systolic chip
US5742534A (en) Electronic circuit for modular computation in a finite field
Lim et al. A serial-parallel architecture for two-dimensional discrete cosine and inverse discrete cosine transforms
JP2666411B2 (en) Integrated circuit device for orthogonal transformation of two-dimensional discrete data
WO2004088500A1 (en) Programmable logic device
JPH0748203B2 (en) Square matrix multiplier using three-dimensional device
US5550846A (en) Circuit for generating an output sequence of values
JP3515170B2 (en) Multiplier for real or complex numbers
EP0373714B1 (en) Coupling network for a data processor, comprising a series connection of at least one crossbar switch and at least one array of silos, and data processor comprising such a coupling network
Saqib et al. A parallel architecture for computing scalar multiplication on hessian elliptic curves
US11768663B1 (en) Compaction of multiplier and adder circuits