JP3185211B2 - Matrix data multiplier - Google Patents

Matrix data multiplier

Info

Publication number
JP3185211B2
JP3185211B2 JP32528989A JP32528989A JP3185211B2 JP 3185211 B2 JP3185211 B2 JP 3185211B2 JP 32528989 A JP32528989 A JP 32528989A JP 32528989 A JP32528989 A JP 32528989A JP 3185211 B2 JP3185211 B2 JP 3185211B2
Authority
JP
Japan
Prior art keywords
matrix
inner product
circuit
data
product operation
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 - Fee Related
Application number
JP32528989A
Other languages
Japanese (ja)
Other versions
JPH03186969A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP32528989A priority Critical patent/JP3185211B2/en
Publication of JPH03186969A publication Critical patent/JPH03186969A/en
Application granted granted Critical
Publication of JP3185211B2 publication Critical patent/JP3185211B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 以下の順序で本発明を説明する。DETAILED DESCRIPTION OF THE INVENTION The present invention will be described in the following order.

A 産業上の利用分野 B 発明の概要 C 従来の技術 D 発明が解決しようとする課題 E 課題を解決するための手段(第1図) F 作用 G 実施例 G1一実施例の構成(第1図〜第3図) G2一実施例の動作(第1図〜第11図) H 発明の効果 A 産業上の利用分野 この発明は、デジタル画像処理等に好適な行列データ
乗算装置に関する。
A Industrial Fields B Overview of the Invention C Prior Art D Problems to be Solved by the Invention E Means for Solving the Problems (FIG. 1) F Function G Example G 1 Configuration of One Example (First Example) (FIGS. 1 to 3) G 2 Operation of One Embodiment (FIGS. 1 to 11) H Effects of the Invention A Industrial Field of the Invention The present invention relates to a matrix data multiplication apparatus suitable for digital image processing and the like.

B 発明の概要 この発明は、行列の内積を演算する内積演算回路と、
行列のデータを並べ替える並べ替え回路とを備える行列
データ乗算装置において、所要の定数行列を複数の疎行
列に分解して、一方の疎行列の要素を0,+1及び−1と
すると共に、他方の低次の疎行列の要素を定数行列のデ
ータ成分とすることにより、内積演算回路の回路規模を
小さく、構成を簡単にすると共に、演算回数を低減して
演算速度を向上させるようにしたものである。
B SUMMARY OF THE INVENTION The present invention provides an inner product operation circuit for calculating an inner product of a matrix,
In a matrix data multiplying device including a rearrangement circuit for rearranging matrix data, a required constant matrix is decomposed into a plurality of sparse matrices, and elements of one sparse matrix are set to 0, +1 and -1, and the other By using the elements of the low-order sparse matrix as data elements of a constant matrix, the circuit scale of the inner product operation circuit is reduced, the configuration is simplified, and the number of operations is reduced to improve the operation speed. It is.

C 従来の技術 従来、デジタル画像処理に適した各種の離散的直交変
換が知られており、そのうち、離散的コサイン変換(Di
screte Cosine Tramsform,DCT)は帯域圧縮に通し、処
理方式が比較的簡単である。
C Prior Art Various discrete orthogonal transforms suitable for digital image processing have been known, and among them, a discrete cosine transform (Di
The screte cosine tramsform (DCT) passes through band compression and the processing method is relatively simple.

このDCTはN次の場合、第1行のすべてが 第2行以下は cos{(2x+1)kπ/2N} (x=0,1,‥‥N−1;k=1,‥‥N−1) の要素からなる行列を用いて、変換及び逆変換(IDCT)
が定義され、2次元の場合、次のように表わされる。
If this DCT is of order N, all of the first row The second and subsequent rows are transformed and inverse transformed using a matrix composed of the elements of cos {(2x + 1) kπ / 2N} (x = 0,1, ‥‥ N−1; k = 1, ‥‥ N−1). (IDCT)
Is defined, and in the case of two dimensions, it is expressed as follows.

〔Y〕=〔N〕・〔X〕・〔N〕 ‥‥(1a) 〔X〕=〔N〕・〔Y〕・〔N〕 ‥‥(1b) なお、行列の規模が2N行2N列のとき、(1a)式には1/
2N+1の係数が掛るが、N+1ビットのデータシフトと等
価であるから、この係数の記載は省略する。また、(1
a),(1b)式にそれぞれ1/2N-1の係数が掛かると定義
すれば、DCTとIDCTとが対称的になる。
[Y] = [N] · [X] · t [N] ‥‥ (1a) [X] = t [N] · [Y] · [N] ‥‥ (1b) Note that the matrix size is 2 N In the case of row 2 N columns, 1 /
Although a coefficient of 2 N + 1 is applied, description of this coefficient is omitted because it is equivalent to a data shift of N + 1 bits. Also, (1
If it is defined that the coefficients a) and (1b) are multiplied by 1/2 N-1 respectively, the DCT and the IDCT become symmetric.

ところで、(1a),(1b)式のような行列データの乗
算には、第12図に示すような、内積演算回路と並べ替え
回路(コーナターナ)とからなる乗算装置が従来用いら
れていた。
In the meantime, a multiplication device including an inner product operation circuit and a rearrangement circuit (corner turner) as shown in FIG. 12 has been conventionally used for multiplication of matrix data as in the equations (1a) and (1b).

第12図において、(10),(20)は内積演算回路であ
って、簡単のために、いずれも4行4列の規模の行列に
対応する4次構成とされ、コーナターナ(30)を介して
接続される。
In FIG. 12, (10) and (20) denote inner product operation circuits, each of which has, for simplicity, a quartic configuration corresponding to a matrix having a scale of 4 rows and 4 columns, and is provided via a corner turner (30). Connected.

即ち、端子INから次の(2)式のようなデータ行列
〔X〕が入力され、一方の内積演算回路(10)におい
て、(3)式のような係数行列〔A〕との内積演算が行
なわれる。
That is, a data matrix [X] as shown in the following equation (2) is input from the terminal IN, and an inner product operation with a coefficient matrix [A] as shown in equation (3) is performed in one inner product operation circuit (10). Done.

内積演算回路(10)は、3個の単位遅延器(111),
(112),(113)が逆順に縦続接続されて、その出力
端,両接続中点及び入力端に4個のラッチ(121),(1
22),(123)及び(124)がそれぞれ接続され、各ラッ
チ(121)〜(124)にそれぞれ縦続する乗算器(131
〜(134)に係数ROM(141)〜(144)がそれぞれ接続さ
れ、各乗算器(131)〜(134)の出力が加算器(15)に
接続されて、有限インパルス応答(Finite Impulse Res
ponse,FIR)型のトランスバーサルフィルタ構成とされ
る。
The inner product operation circuit (10) has three unit delay units (11 1 ),
(11 2 ) and (11 3 ) are cascaded in reverse order, and four latches (12 1 ) and (1
2 2 ), (12 3 ) and (12 4 ) are respectively connected, and multipliers (13 1 ) cascaded to the latches (12 1 ) to (12 4 ), respectively
- (13 4) to the coefficient ROM (14 1) to (14 4) are respectively connected, the output of which is connected to the adder (15) each multiplier (13 1) to (13 4), finite impulse response (Finite Impulse Res
ponse, FIR) type transversal filter.

同様に、内積演算回路(20)もFIR型トランスバーサ
ルフィルタ構成とされ、対応する各要素の符号の「10」
の位の数字を「2」に替えて重複説明を省略する。ただ
し、ROM(241)〜(244)に格納される係数bijがROM(1
41)〜(144)の係数aijと異なる。
Similarly, the inner product operation circuit (20) also has an FIR transversal filter configuration, and the sign of each corresponding element is “10”.
Is replaced by “2”, and redundant description is omitted. However, the coefficients bij stored in the ROMs (24 1 ) to (24 4 )
Different from the coefficients a ij of 4 1 ) to (14 4 ).

コーナターナ(30)は1対のRAM(31)及び(32)
と、入力側及び出力側の切換スイッチ(33)及び(34)
とで構成され、両スイッチ(33)及び(34)は、1対の
RAM(31)及び(32)の一方にデータが書き込まれる期
間に、他方からデータが読み出されるように連動して切
り換えられる。RAM(31)及び(32)の容量は、前述の
ような4行4列の規模の行列対応して、それぞれ16ワー
ドとされる。
Corner Turner (30) is a pair of RAM (31) and (32)
And input-side and output-side selector switches (33) and (34)
And both switches (33) and (34) are a pair of switches.
During a period in which data is written to one of the RAMs (31) and (32), the data is read out from the other and linked together. The capacities of the RAMs (31) and (32) are each 16 words, corresponding to a matrix having a size of 4 rows and 4 columns as described above.

次に、第13図を参照しながら、第12図の従来例の行列
データを乗算について説明する。
Next, multiplication of matrix data of the conventional example shown in FIG. 12 will be described with reference to FIG.

入力端子INから、第13図Aに示すような16ワード単位
の入力行列〔X〕のデータが第1列(x11,x21,x31,x
41)〜第4列(x14,x24,x34,x44)の順序で供給され
る。
From the input terminal IN, the data of the input matrix [X] in units of 16 words as shown in FIG. 13A is stored in the first column (x 11 , x 21 , x 31 , x 31) .
41) are supplied in the order of ~ fourth column (x 14, x 24, x 34, x 44).

単位データの入力開始時点t0から3サイクル分の時間
3Tが経過したt1時点では、単位遅延器(111),(112
及び(113)の各出力端に第1列のデータx11,x21及びx
31が存在すると共に、4番目のデータx41が遅延器(1
13)の入力端に存在する。
Time from the input start time t 0 of the unit data of three cycles
At time t 1 when 3T has elapsed, the unit delay units (11 1 ) and (11 2 )
And (11 3 ) output data x 11 , x 21 and x in the first column
With 31 is present, the fourth data x 41 is a delay unit (1
Present at the input terminal of the 1 3).

この状態で、各ラッチに共通のイネイブルパルスが供
給されて、第1列の4個のデータx11,x21,x31及びx41
4個のラッチ(121),(122),(123)及び(124)に
それぞれ取り込まれ、第13図B,D,F及びHに示すよう
に、入力開始時点t0から4T時間経過後のt2時点から4T時
間にわたって保持される。
In this state, the common Yi Neiburu pulse is supplied to each latch, four data x 11 of the first row, x 21, x 31 and x 41 are four latches (12 1), (12 2) , (12 3 ) and (12 4 ), respectively, and as shown in FIGS. 13, B, D, F and H, are held for 4 T time from the time t 2 after the elapse of 4 T time from the input start time t 0. You.

ROM(141),(142),(143)及び(144)には係数
行列〔A〕の各列の係数ai1,ai2,ai3及びai4(i=1,2,
3,4)が格納されており、同図C,E,G及びJに示すよう
に、t2時点以後の1サイクルごとに、対応する乗算器
(131),(132),(133)及び(134)に順次供給さ
れ、それぞれ対応するラッチ(121),(122),(1
23)及び(124)に保持された第1列のデータxi1(i=
1,2,3,4)と乗算される。
ROM (14 1), (14 2), (14 3) and the coefficient of each column (14 4) The coefficient matrix [A] a i1, a i2, a i3 and a i4 (i = 1,2,
3, 4) are stored, FIG. C, E, as shown in G and J, for each cycle of t 2 time points after a corresponding multiplier (13 1), (13 2), (13 3 ) and (13 4 ) are sequentially supplied, and the corresponding latches (12 1 ), (12 2 ), (1
2 3 ) and (12 4 ) held in the first column of data x i1 (i =
1,2,3,4).

即ち、t2時点以降の1,2,3及び4番目の各サイクル
で、係数行列の1,2,3及び4行の係数a1j,a2j,a3j及びa
4j(j=1,2,3,4)が入力行列の第1列のデータx11,
x21,x31及びx41と乗算される。
That is, in t 2 after the time of 1, 2, 3 and 4 th of each cycle, the coefficient a 1j of 1, 2, 3 and 4 rows of the coefficient matrix, a 2j, a 3j and a
4j (j = 1,2,3,4) is the data x 11 of the first column of the input matrix,
is multiplied by the x 21, x 31 and x 41.

加算器(15)において、各乗算器(131)〜(134)の
出力が加算されて、同図Kに示すように、t2時点以降の
4サイクルで次の(4)式に示すような積の行列〔U〕
の第1列のデータu11,u21,u31及びu41が得られる。
In the adder (15), the output is summed for each multiplier (13 1) to (13 4), as shown in FIG. K, shown in the following equation (4) at t 2 after the time of 4 cycles Product matrix [U]
, The data u 11 , u 21 , u 31 and u 41 of the first column are obtained.

〔U〕=〔A〕・〔X〕 ‥‥‥(4) 一方、同図Aに示すように、t2時点で行列〔X〕の第
2列のデータx12,x22,x32及びx42の入力が開始されて、
前述と同様に、t2時点から4T時間後の時点t3では、第2
列のデータx12,x22,x32及びx42がそれぞれラッチ(1
21),(122),(123)及び(124)にラッチされてい
る。また、t3時点以降の1サイクルごとに、ROM(1
41),(142),(143)及び(144)から、前述と同様
に、行列〔A〕の各列の係数ai1,ai2,ai3及びai4(i=
1,2,3,4)が順次出力される。
[U] = [A] · [X] ‥‥‥ (4) On the other hand, as shown in FIG. 7A, at time t 2 , data x 12 , x 22 , x 32 and 2 x 42 input starts,
As before, at the time point t 3 after 4T period from t 2 time, the second
Column of data x 12, x 22, x 32 and x 42 respectively latch (1
2 1 ), (12 2 ), (12 3 ) and (12 4 ). In addition, for each cycle of the t 3 point onward, ROM (1
From 4 1 ), (14 2 ), (14 3 ) and (14 4 ), similarly to the above, the coefficients a i1 , a i2 , a i3 and a i4 (i =
1, 2, 3, 4) are sequentially output.

以下前述と同様にして、t3時点以降の4サイクルで前
出(4)式に示すような積の行列〔U〕の第2列のデー
タu12,u22,u32及びu42が得られる。
Thereafter, in the same manner as described above, the data u 12 , u 22 , u 32 and u 42 of the second column of the product matrix [U] as shown in the above equation (4) are obtained in four cycles after time t 3. Can be

以下同様にして、次のt4時点以降の4サイクルで、積
の行列〔U〕の第3列のデータu13〜u43が得られ、その
次のt5時点以降の4サイクルで、積の行列〔U〕の第4
列のデータu14〜u44が得られる。
In the same manner, at the next t 4 after the time of 4 cycles, data u 13 ~u 43 of the third column of the matrix product [U] is obtained, in the next t 5 after the time of 4 cycles, the product Of the matrix [U]
Data u 14 ~u 44 columns are obtained.

上述のようにして得られた行列〔U〕の16ワードの列
順のデータはコーナターナ(30)のRAM(31)及び(3
2)に交互に書き込まれる。書き込み時のアドレスと読
み出し時のアドレスとを変えることにより、RAM(31)
及び(32)から行順で交互に読出された行列〔U〕のデ
ータが第2の内積演算回路(20)に供給され、上述と全
く同様にして、第2の係数行列〔B〕と乗算されて、次
の(5)式で表わされる積の行列〔Y〕のデータが端子
OUTに導出される。
The 16-word column-order data of the matrix [U] obtained as described above is stored in the RAMs (31) and (3) of the corner turner (30).
It is written alternately in 2). By changing the address for writing and the address for reading, RAM (31)
The data of the matrix [U] alternately read out in row order from (32) and (32) is supplied to the second inner product operation circuit (20), and multiplied with the second coefficient matrix [B] in the same manner as described above. The data of the product matrix [Y] expressed by the following equation (5) is
Derived to OUT.

〔Y〕=〔U〕・〔B〕 =〔A〕・〔X〕・〔B〕 ‥‥(5) D 発明が解決しようとする課題 ところで、行列の規模が8行8列の場合、(1)式の
定数行列〔N〕は、次の(6)式のように表される。
[Y] = [U]. [B] = [A]. [X]. [B] ‥‥ (5) D Problems to be Solved by the Invention By the way, when the size of the matrix is 8 rows and 8 columns, The constant matrix [N] in the expression (1) is represented by the following expression (6).

ここに、要素a〜nは、第14図に示すように、角度π
/16を単位とする所定角の余弦である。
Here, the elements a to n are, as shown in FIG.
This is a cosine of a predetermined angle in units of / 16.

また、DCT及びIDCTを定義する(1)式から明らかな
ように、行列〔Y〕の要素yijは行列〔X〕の要素xij
1次式で表現される。
Further, as is apparent from the equation (1) that defines DCT and IDCT, the element y ij of the matrix [Y] is expressed by a linear expression of the element x ij of the matrix [X].

従って、第15図に示すように、8行8列の要素x11〜x
88が列順に入力されて64次のベクトルとなる行列〔Xc〕
と、8行8列の要素y11〜y88が列順に出力されて64次の
ベクトルとなる行列〔Yc〕との間には、次の(7)式で
表される関係が成立する。
Therefore, as shown in FIG. 15, the elements x 11 to x of 8 rows and 8 columns
88 is entered 64 Next vector in column order matrix [Xc]
A matrix represented by the following equation (7) holds between the matrix and the matrix [Yc], in which elements y 11 to y 88 of 8 rows and 8 columns are output in column order and become a 64th-order vector.

〔Yc〕=〔M〕・〔Xc〕 ‥‥(7) ここに〔M〕は64行64列の定数行列である。 [Yc] = [M] · [Xc] (7) where [M] is a constant matrix of 64 rows and 64 columns.

ところが、前述のような従来の行列データ乗算装置で
は、この(7)式の演算を行う場合、例えば64次の内積
演算回路を用いて一挙に計算するため、回路規模が膨大
になり、構成が複雑になると共に、演算回数が多くなっ
て演算速度が制約されるという問題があった。
However, in the above-described conventional matrix data multiplication apparatus, when performing the operation of the equation (7), the calculation is performed at once using, for example, a 64th-order inner product operation circuit. There is a problem that the operation becomes complicated and the number of operations increases, thereby restricting the operation speed.

かかる点に鑑み、この発明の目的は、回路規模が小さ
く、構成が簡単であると共に、演算回数が減少して高速
演算が可能な行列データ乗算装置を提供するところにあ
る。
In view of the foregoing, it is an object of the present invention to provide a matrix data multiplication device which has a small circuit scale, a simple configuration, a reduced number of operations, and a high speed operation.

E 課題を解決するための手段 第1のこの発明は、行列の内積を演算する内積演算回
路と、行列のデータ成分を所定の順序に並べ替える並べ
替え回路とを備える行列データ乗算装置において、係数
が+1及び−1で4次の第1の内積演算回路(42)と、
係数が0,+1及び−1で16次の第2の内積演算回路(4
4)と、定数行列のデータ成分が格納されたメモリを含
む4次の第3の内積演算回路(45)とを設け、8行8列
の入力データを第1の並べ替え回路(41)を介して第1
の内積演算回路に供給し、当該第1の内積演算回路の出
力を第2の並べ替え回路(43)を介して第2の内積演算
回路に供給し、当該第2の内積演算回路の出力を直接に
第3の内積演算回路に供給すると共に、当該第3の内積
演算回路の出力を第3の並べ替え回路(46)を介して導
出するよにした行列データ乗算装置である。
E Means for Solving the Problems A first aspect of the present invention provides a matrix data multiplication apparatus including an inner product operation circuit for calculating an inner product of a matrix and a rearrangement circuit for rearranging the data components of the matrix in a predetermined order. A first inner product operation circuit (42) of order 4 with +1 and -1;
A 16th-order second inner product operation circuit with coefficients 0, +1 and -1 (4
4) and a fourth-order third inner product operation circuit (45) including a memory in which data components of a constant matrix are stored, and the input data of 8 rows and 8 columns is provided by a first rearrangement circuit (41). First through
And supplies the output of the first inner product operation circuit to the second inner product operation circuit via the second rearranging circuit (43), and outputs the output of the second inner product operation circuit. This is a matrix data multiplying device that is directly supplied to a third inner product operation circuit and derives an output of the third inner product operation circuit via a third rearrangement circuit (46).

F 作用 この発明によれば、内積演算回路の規模が小さく、構
成が簡単であると共に、演算回数が減少して高速演算が
可能になる。
According to the present invention, the scale of the inner product calculation circuit is small, the configuration is simple, and the number of calculations is reduced, thereby enabling high-speed calculation.

G 実施例 以下、第1図〜第11図を参照しながら、この発明によ
る行列データ乗算装置の一実施例について説明する。
G Embodiment Hereinafter, an embodiment of a matrix data multiplication device according to the present invention will be described with reference to FIGS. 1 to 11.

G1一実施例の構成 この発明の一実施例の構成を第1図に示し、その要部
の構成を第2図及び第3図に示す。
G 1 Configuration of One Embodiment FIG. 1 shows the configuration of one embodiment of the present invention, and FIG. 2 and FIG. 3 show the configuration of main parts thereof.

第1図において、入力端子INから8行8列のデータ
が、前出第31図の行列〔Xc〕に示すように、列順で入力
され、64ワードの第1のコーナターナ(41)を介して、
4次の第1の内積演算回路(42)に供給される。この内
積演算回路(42)の出力は、64ワードの第2のコーナタ
ーナ(43)を介して、16次の第2の内積演算回路(44)
に供給される。内積演算回路(44)の出力が4次の第3
の内積演算回路(45)に供給され、内積演算回路(45)
の出力は64ワードの第3のコーナターナ(46)を介し
て、出力端子OUTに導出される。
In FIG. 1, eight rows and eight columns of data are input in column order from the input terminal IN, as shown in the matrix [Xc] of FIG. 31 described above, and are transmitted via a first corner turner (41) of 64 words. hand,
It is supplied to a fourth-order first inner product calculation circuit (42). The output of the inner product operation circuit (42) is passed through the second corner turner (43) of 64 words to the 16th-order second inner product operation circuit (44).
Supplied to The output of the inner product operation circuit (44) is the third order of the fourth order.
Is supplied to the inner product arithmetic circuit (45) of the inner product arithmetic circuit (45).
Is output to an output terminal OUT via a 64-word third corner turner (46).

後述のように、第1の内積演算回路(42)の係数は、
+1及び−1だけであり、第2の内積演算回路(44)の
係数は、0,+1及び−1だけである。また、第3の内積
演算回路(45)の係数はDCTに特有の値となる。
As described later, the coefficient of the first inner product calculation circuit (42) is
There are only +1 and −1, and the coefficients of the second inner product operation circuit (44) are only 0, +1 and −1. The coefficient of the third inner product calculation circuit (45) is a value unique to DCT.

第2図において、(50)は4次の内積演算回路であっ
て、第1図の内積演算回路(42)に相当し、3個の単位
遅延器(511),(512),(513)が逆順に縦続接続さ
れて、その出力端,両接続中点及び入力端に4個のラッ
チ(521),(522),(523),(524)がそれぞれ接続
される。ラッチ(521)〜(524)の出力が、それぞれス
イッチ(531)〜(534)の+側接点に供給されると共
に、2の補数回路(541)〜(544)を介して、スイッチ
(531)〜(534)の−側接点にそれぞれ供給される。ス
イッチ(531)〜(534)の各出力が加算器(55)に供給
される。
In FIG. 2, (50) is a fourth-order inner product operation circuit, which corresponds to the inner product operation circuit (42) in FIG. 1, and includes three unit delay units (51 1 ), (51 2 ), (51 2 ) 51 3 ) are connected in cascade in reverse order, and four latches (52 1 ), (52 2 ), (52 3 ), and (52 4 ) are connected to the output terminal, both connection midpoints, and the input terminal, respectively. You. The outputs of the latches (52 1 ) to (52 4 ) are supplied to the positive contacts of the switches (53 1 ) to (53 4 ), respectively, and via the two's complement circuits (54 1 ) to (54 4 ). And supplied to the negative contacts of the switches (53 1 ) to (53 4 ). The outputs of the switches (53 1 ) to (53 4 ) are supplied to the adder (55).

各スイッチ(531)〜(534)は、各補数回路(541
〜(544)と共に係数が+1,−1だけの乗算器を構成
し、システム制御回路(56)により互いに独立に切り換
えられる。
Each switch (53 1 ) to (53 4 ) is a complement circuit (54 1 )
(54 4 ) constitutes a multiplier having coefficients of +1 and −1, and can be switched independently by the system control circuit (56).

また、2の補数回路(541)〜(544)は、周知のよう
に、否定回路と加算回路とで構成される。
As is well known, the two's complement circuits (54 1 ) to (54 4 ) include a negation circuit and an addition circuit.

第3図において、(60)は16次の内積演算回路であっ
て、第1図の内積演算回路(44)に相当し、15個の単位
遅延器(611),(612)〜(6115)が逆順に縦続接続さ
れて、その出力端,各接続中点及び入力端に16個のラッ
チ(621),(622)〜(6216)がそれぞれ接続される。
ラッチ(621)〜(6216)の出力が、それぞれ3接点切
換スイッチ(631)〜(6316)の+側接点に供給される
と共に、2の補数回路(641)〜(6416)を介して、ス
イッチ(631)〜(6316)の−側接点にそれぞれ供給さ
れる。スイッチ(631)〜(6316)の第3の接点には係
数0がそれぞれ供給され、スイッチ(631)〜(6316
の各出力が加算器(65)に供給される。
In FIG. 3, reference numeral (60) denotes a 16th-order inner product operation circuit, which corresponds to the inner product operation circuit (44) in FIG. 1, and includes 15 unit delay units (61 1 ), (61 2 ) to (61 2 ). 61 15) connected in cascade in reverse order, its output, each connecting node and the input terminal to the 16 latches (62 1), (62 2) to (62 16) are respectively connected.
The outputs of the latches (62 1 ) to (62 16 ) are supplied to the positive contacts of the three-contact selector switches (63 1 ) to (63 16 ), respectively, and the two's complement circuits (64 1 ) to (64 16 ) ) Are supplied to the negative contacts of the switches (63 1 ) to (63 16 ). Switch (63 1) to the coefficient 0 to the third contacts (63 16) are supplied, the switch (63 1) to (63 16)
Are supplied to the adder (65).

各スイッチ(631)〜(6316)は、各補数回路(641
〜(6416)と共に係数が0,+1,−1だけの乗算器を構成
し、システム制御回路(66)により互いに独立に切り換
えられる。
Each switch (63 1 ) to (63 16 ) is a complement circuit (64 1 )
(64 16 ) constitutes a multiplier having coefficients of only 0, +1 and −1, and can be switched independently by the system control circuit (66).

G2一実施例の動作 次に、第4図〜第11図をも参照しながら、第1図の実
施例の動作について説明する。
Operation of G 2 one embodiment Next, with reference also to Figure 4-Figure 11, the operation of the embodiment of Figure 1.

第1図の実施例においては、DCTのための64行63列の
定数行列〔M〕を次の(8)式に示すような6個の行列
に分解している。
In the embodiment of FIG. 1, a constant matrix [M] of 64 rows and 63 columns for DCT is decomposed into six matrices as shown in the following equation (8).

〔M〕=[W]・[V]・[TS] ・[R]・[L]・[Q]/8 ‥‥(8) 行列〔Q〕,〔R〕及び〔W〕が第1,第2及び第3の
コーナターナ(41),(43)及び(46)にそれぞれ対応
すると共に、行列〔L〕,〔TS〕及び〔V〕が第1,第2
及び第3の内積演算回路(42),(44)及び(45)にそ
れぞれ対応する。行列〔Q〕〜〔W〕は何れも64行64列
であり、第4図〜第11図に示されるように、それぞれ多
数の0要素を含む疎行列(Sparse Matrix)である。
[M] = [W] · [V] · [TS] · [R] · [L] · [Q] / 8 8 (8) The matrices [Q], [R] and [W] are the first, The matrices [L], [TS], and [V] correspond to the first and second corner turners (41), (43), and (46), respectively.
And the third inner product operation circuits (42), (44) and (45), respectively. Each of the matrices [Q] to [W] has 64 rows and 64 columns, and as shown in FIGS. 4 to 11, is a sparse matrix containing a large number of 0 elements.

なお、この第4図〜第11図において、+及び−はそれ
ぞれ+1及び−1を表しており、他の行列を示す後出各
図においても同様である。
In FIGS. 4 to 11, + and-represent +1 and -1, respectively, and the same applies to the following figures showing other matrices.

コーナターナ(41)では、第4図に示されるように、
行列〔Q〕の各行各列とも、1か所だけが+1で、残り
の63個の要素は全て0であるから、64ワードの入力デー
タXの並べ替えが行われる。
In corner turner (41), as shown in FIG.
In each row and each column of the matrix [Q], only one location is +1 and the remaining 63 elements are all 0, so that the input data X of 64 words is rearranged.

内積演算回路(42)において、この並べ替えられたデ
ータQXが、第5図の行列〔L〕で表されるような演算処
理を受ける。同図に明らかなように、この行列〔L〕
は、+1及び−1の要素のみで、同形の4行4列の小行
列が対角線上に16個並び、他の部分が全て0要素の疎行
列であるから、第2図に示したような4次の内積演算回
路(50)で演算処理することができる。
In the inner product operation circuit (42), the rearranged data QX undergoes an operation process represented by a matrix [L] in FIG. As is apparent from FIG.
Is a sparse matrix with only +1 and -1 elements, 16 diagonal 4-row, 4-column matrices of the same shape, and all other parts are sparse matrices with 0 elements, as shown in FIG. The arithmetic processing can be performed by the fourth-order inner product arithmetic circuit (50).

第2図において、入力端子INから、64ワード単位のデ
ータQXが供給され、それぞれ4個のデータが4個のラッ
チ(521),(522),(523),(524)に取り込まれ、
4T時間にわたって保持される。
In FIG. 2, data QX in units of 64 words is supplied from an input terminal IN, and four data are respectively supplied to four latches (52 1 ), (52 2 ), (52 3 ), and (52 4 ). Captured,
Holds for 4T hours.

4個のスイッチ(531),(532),(533),(534
は、行列〔L〕の4行4列の小行列の要素が+1である
か−1であるかにより、+側または−側に切り換えられ
て、各ラッチ(521)〜(524)に保持されたデータに+
1または−1の係数が乗算され、加算器(55)で加算さ
れて、端子OUTから出力される。
Four switches (53 1 ), (53 2 ), (53 3 ), (53 4 )
Is switched to the + side or the-side depending on whether the element of the 4-row, 4-column sub-matrix of the matrix [L] is +1 or −1, and each of the latches (52 1 ) to (52 4 ) + To retained data
The coefficient is multiplied by 1 or −1, added by the adder (55), and output from the terminal OUT.

内積演算回路(42)から出力された64ワードのデータ
LQXは、第2のコーナターナ(43)において、第6図及
び第7図A〜Dに示す行列〔R〕で表されるように並べ
替えられる。
64-word data output from the inner product operation circuit (42)
The LQXs are rearranged in the second corner turner (43) as represented by a matrix [R] shown in FIGS. 6 and 7A to 7D.

この並べ替えられたデータRLQXが、第2の内積演算回
路(44)において、第8図の行列〔TS〕で表されるよう
な演算処理を受ける。同図に明らかなように、この行列
〔TS〕は、それぞれ16行16列で、+1,−1及び0の要素
のみの小行列が対角線上に4個並び、他の部分が全て0
要素の疎行列であるから、第3図に示したような16次の
内積演算回路(60)で演算処理することができる。
The rearranged data RLQX is subjected to a calculation process represented by the matrix [TS] in FIG. 8 in the second inner product calculation circuit (44). As can be seen from the figure, this matrix [TS] has 16 rows and 16 columns, and four small matrices having only +1, -1 and 0 elements are arranged diagonally, and the other parts are all 0.
Since the matrix is a sparse matrix of elements, arithmetic processing can be performed by a 16th-order inner product arithmetic circuit (60) as shown in FIG.

第3図において、入力端子INから、64ワード単位のデ
ータRLQXが供給され、それぞれ16個のデータが16個のラ
ッチ(621)〜(6216)に取り込まれ、16T時間にわたっ
て保持される。
In FIG. 3, data RLQX in units of 64 words is supplied from an input terminal IN, and 16 data are fetched into 16 latches (62 1 ) to (62 16 ) and held for 16T time.

16個のスイッチ(631)〜(6316)は、行列〔TS〕の1
6行16列の小行列の要素が0,+1,−1のいずれであるか
により、0側,+側または−側に切り換えられて、各ラ
ッチ(621)〜(6216)に保持されたデータに0,+1ま
たは−1の係数が乗算され、加算器(65)で加算され
て、端子OUTから出力される。
The 16 switches (63 1 ) to (63 16 ) correspond to one of the matrix [TS].
6 rows and 16 columns of submatrix elements of 0, + 1, by whether it is a -1, 0 side, the + side or - is switched to the side, are held in the respective latches (62 1) to (62 16) The obtained data is multiplied by a coefficient of 0, +1 or −1, added by an adder (65), and output from a terminal OUT.

内積演算回路(44)から出力された64ワードのデータ
TSRLQXは、更に、第3の内積演算回路(45)において、
第9図の行列〔V〕で表されるような演算処理を受け
る。同図に明らかなように、この行列〔V〕は、それぞ
れ4行4列の小行列が対角線上に4個並び、他の部分が
全て0要素の疎行列であるから、前出第28図に示すよう
な通常の4次内積演算回路(45)で演算処理することが
できる。
64-word data output from the inner product operation circuit (44)
TSRLQX further includes a third inner product operation circuit (45)
It is subjected to an arithmetic operation represented by the matrix [V] in FIG. As apparent from FIG. 28, this matrix [V] is a sparse matrix having four rows and four columns, each of which is arranged diagonally and four other elements are all sparse matrices. The arithmetic processing can be performed by a normal fourth-order inner product arithmetic circuit (45) as shown in FIG.

内積演算回路(45)から出力された64ワードのデータ
VTSRLQXは、第3のコーナターナ(46)において、第10
図及び第11図A〜Dに示す行列〔W〕で表されるように
並べ替えられて、所望の出力データWVTSRLQXが得られ
る。
64-word data output from the inner product operation circuit (45)
VTSRLQX is in the third corner (46)
The desired output data WVTSRLQX is obtained by rearrangement as shown by the matrix [W] shown in FIGS. 11 and 11A to 11D.

第1図の実施例においては、各内積演算回路(42),
(44)及び(45)の演算処理を表す行列〔L〕,〔TS〕
及び〔V〕が何れも疎行列であるため、乗算回路を少な
くして、各内積演算回路を小規模にすることができる。
In the embodiment of FIG. 1, each inner product operation circuit (42),
Matrices [L] and [TS] representing the arithmetic processing of (44) and (45)
Since [V] and [V] are both sparse matrices, the number of multiplication circuits can be reduced, and the size of each inner product operation circuit can be reduced.

また、内積演算回路(42)及び(44)については、行
列〔L〕及び〔TS〕の係数が0と+1,−1だけであるた
め、第2図及び第3図に示すように、各乗算器の構成を
簡単にすることができると共に、内積演算時に丸め誤差
が発生することがない。
As for the inner product operation circuits (42) and (44), since the coefficients of the matrices [L] and [TS] are only 0 and +1 and −1, as shown in FIGS. The configuration of the multiplier can be simplified, and no rounding error occurs during the inner product operation.

更に、行列〔L〕,〔TS〕及び〔V〕は、それらを形
成する小行列が何れも対角線上に配列されており、各転
置行列も同様の形になるため、逆変換の場合にも、第1
図の実施例と同様の構成で対応することができる。
Further, the matrices [L], [TS] and [V] are such that the small matrices forming them are all arranged diagonally, and the transposed matrices have the same shape. , First
This can be dealt with by a configuration similar to that of the embodiment shown in FIG.

なお、行列〔TS〕及び〔V〕を合体して行列〔VTS〕
を形成した場合、それぞれ16次及び4次の内積演算回路
(44)及び(45)に代えて、単一の通常の16次内積演算
回路を用いることができる。
The matrix [TS] and [V] are combined to form a matrix [VTS].
Is formed, a single ordinary 16th-order inner product calculation circuit can be used instead of the 16th and 4th order inner product calculation circuits (44) and (45), respectively.

H 発明の効果 以上詳述のように、この発明によれば、所望の定数行
列を複数の疎行列に分解して、一方の疎行列の要素を0,
+1及び−1とすると共に、他方の低次の疎行列の要素
を定数行列のデータ成分とするようにしたので、内積演
算回路の回路規模が小さく、構成が簡単になると共に、
演算回数が低減して演算速度が向上した行列データ乗算
装置が得られる。
H Effects of the Invention As described in detail above, according to the present invention, a desired constant matrix is decomposed into a plurality of sparse matrices, and one sparse matrix element is set to 0,
In addition to +1 and −1, the other low-order sparse matrix element is used as a data component of a constant matrix. Therefore, the circuit scale of the inner product operation circuit is small, and the configuration is simplified.
A matrix data multiplication device in which the number of calculations is reduced and the calculation speed is improved can be obtained.

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

第1図はこの発明による行列データ乗算装置の一実施例
の構成を示すブロック図、第2図及び第3図はこの発明
の一実施例の要部の構成を示すブロック図、第4図〜第
11図はこの発明の一実施例の要部の動作を説明するため
の行列を示す図、第12図は従来の行列データ乗算装置の
構成例を示すブロック図、第13図は従来例の動作を説明
するためのタイムチャート、第14図及び第15図はこの発
明の説明のための図である。 (141)〜(144),(241)〜(244)はROM、(41),
(43),(46),(81),(83),(85),(87)は並
べ替え回路、(42),(44),(45),(47),(4
8),(49),(82),(84),(86)は内積演算回
路、(541)〜(544),(641)〜(6415),(751)〜
(758)は2の補数回路である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a matrix data multiplication device according to the present invention, FIGS. 2 and 3 are block diagrams showing a configuration of a main part of an embodiment of the present invention, and FIGS. No.
11 is a diagram showing a matrix for explaining the operation of the main part of one embodiment of the present invention, FIG. 12 is a block diagram showing a configuration example of a conventional matrix data multiplication device, and FIG. 13 is an operation of the conventional example FIG. 14 and FIG. 15 are diagrams for explaining the present invention. (14 1) to (14 4), (24 1) to (24 4) is ROM, (41),
(43), (46), (81), (83), (85), and (87) are rearranging circuits, and (42), (44), (45), (47), (4)
8), (49), (82), (84), and (86) are inner product operation circuits, (54 1 ) to (54 4 ), (64 1 ) to (64 15 ), and (75 1 )
(75 8 ) is a two's complement circuit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 IEEE Transactions on Acoustics,Spee ch and Signal Proc essing,vol.51 no.5, p.1304−1307 Signal Processin g,vol.5 no.1,p.81−85 (58)調査した分野(Int.Cl.7,DB名) G06F 17/14 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continuation of the front page (56) References IEEE Transactions on Acoustics, Speech and Signal Processing, vol. 51 no. 5, p. 1304-1307 Signal Processing, vol. 5 no. 1, p. 81-85 (58) Field surveyed (Int.Cl. 7 , DB name) G06F 17/14 JICST file (JOIS)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】行列の内積を演算する内積演算回路と、行
列のデータ成分を所定の順序に並べ替える並べ替え回路
とを備える行列データ乗算装置において、 係数が+1及び−1で4次の第1の内積演算回路と、 係数が0,+1及び−1で16次の第2の内積演算回路と、 定数行列のデータ成分が格納されたメモリを含む4次の
第3の内積演算回路とを設け、 8行8列の入力データを第1の並べ替え回路を介して上
記第1の内積演算回路に供給し、 該第1の内積演算回路の出力を第2の並べ替え回路を介
して上記第2の内積演算回路に供給し、 該第2の内積演算回路の出力を直接に上記第3の内積演
算回路に供給すると共に、 該第3の内積演算回路の出力を第3の並べ替え回路を介
して導出するようにしたことを特徴とする行列データ乗
算装置。
1. A matrix data multiplying device comprising: an inner product operation circuit for calculating an inner product of a matrix; and a rearranging circuit for rearranging the data components of the matrix in a predetermined order. 1, a 16th-order second inner product operation circuit having coefficients 0, +1 and -1; and a fourth-order third inner product operation circuit including a memory in which data components of a constant matrix are stored. Providing input data of 8 rows and 8 columns to the first inner product operation circuit via a first rearrangement circuit, and outputting the output of the first inner product operation circuit via a second rearrangement circuit. Supplying the output of the second inner product arithmetic circuit directly to the third inner product arithmetic circuit, and supplying the output of the third inner product arithmetic circuit to a third sorting circuit A matrix data multiplying device, wherein the matrix data multiplying device is derived through
JP32528989A 1989-12-15 1989-12-15 Matrix data multiplier Expired - Fee Related JP3185211B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32528989A JP3185211B2 (en) 1989-12-15 1989-12-15 Matrix data multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32528989A JP3185211B2 (en) 1989-12-15 1989-12-15 Matrix data multiplier

Related Child Applications (3)

Application Number Title Priority Date Filing Date
JP2001028420A Division JP2001256218A (en) 2001-02-05 2001-02-05 Matrix data multiplying device
JP2001028419A Division JP2001256217A (en) 2001-02-05 2001-02-05 Matrix data multiplying device
JP2001028421A Division JP2001249799A (en) 2001-02-05 2001-02-05 Matrix data multiplier

Publications (2)

Publication Number Publication Date
JPH03186969A JPH03186969A (en) 1991-08-14
JP3185211B2 true JP3185211B2 (en) 2001-07-09

Family

ID=18175154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32528989A Expired - Fee Related JP3185211B2 (en) 1989-12-15 1989-12-15 Matrix data multiplier

Country Status (1)

Country Link
JP (1) JP3185211B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04236664A (en) * 1991-01-18 1992-08-25 Sony Corp Arithmetic circuit
JP2866754B2 (en) * 1991-03-27 1999-03-08 三菱電機株式会社 Arithmetic processing unit
EP0557204A3 (en) * 1992-02-21 1995-10-18 Sony Corp Discrete cosine transform apparatus and inverse discrete cosine transform apparatus
KR940004467A (en) * 1992-08-26 1994-03-15 오오가 노리오 Discrete cosine inverters and their inverses
JPH06103301A (en) * 1992-09-17 1994-04-15 Sony Corp (8x8) discrete cosine transforming circuit and (8x8) discrete cosine inverse transforming circuit
JPH06149862A (en) * 1992-11-13 1994-05-31 Sony Corp Matrix data multiplying method and device
JP3971135B2 (en) * 2001-07-11 2007-09-05 株式会社テクノマセマティカル DCT matrix decomposition method and DCT apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IEEE Transactions on Acoustics,Speech and Signal Processing,vol.51 no.5,p.1304−1307
Signal Processing,vol.5 no.1,p.81−85

Also Published As

Publication number Publication date
JPH03186969A (en) 1991-08-14

Similar Documents

Publication Publication Date Title
JPH08235159A (en) Inverse cosine transformation device
JPH02189016A (en) Programmable digital filter
JP3185211B2 (en) Matrix data multiplier
WO2000062421A1 (en) Digital filter and method for performing a multiplication based on a look-up table
Budrikis et al. Moment calculations by digital filters
US6574649B2 (en) Efficient convolution method and apparatus
EP0450260A1 (en) Digital signal filter circuit
JP2677969B2 (en) Orthogonal transformer
US5928314A (en) Digital filter having a substantially equal number of negative and positive weighting factors
JP2001256217A (en) Matrix data multiplying device
JP2001256218A (en) Matrix data multiplying device
JPH07200539A (en) Two-dimensional dct arithmetic unit
JPH04330828A (en) Discrete cosine conversion circuit, and inverse conversion circuit for discrete cosine conversion
JP3046115B2 (en) Discrete cosine transformer
JP2001249799A (en) Matrix data multiplier
JPH0540776A (en) Two-dimensional dct matrix operation circuit
KR940007569B1 (en) Array multiplication circuit
JPH05300026A (en) Discrete cosine transformer device and inverse discrete cosine transformer device
JP2869668B2 (en) Discrete Fourier or cosine transform device for digital data
JPH0795671B2 (en) Digital Filter
JP2953918B2 (en) Arithmetic unit
JP2880580B2 (en) Acyclic digital filter circuit
JPH03196712A (en) Digital arithmetic circuit
JPS63247829A (en) Multiplier
EP0321584A1 (en) System for calculating sum of products

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees