JPH05346935A - Device and method for matrix data multiplication - Google Patents

Device and method for matrix data multiplication

Info

Publication number
JPH05346935A
JPH05346935A JP18047592A JP18047592A JPH05346935A JP H05346935 A JPH05346935 A JP H05346935A JP 18047592 A JP18047592 A JP 18047592A JP 18047592 A JP18047592 A JP 18047592A JP H05346935 A JPH05346935 A JP H05346935A
Authority
JP
Japan
Prior art keywords
data
circuit
multiplication
matrix
order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP18047592A
Other languages
Japanese (ja)
Inventor
Mitsuharu Oki
光晴 大木
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 JP18047592A priority Critical patent/JPH05346935A/en
Publication of JPH05346935A publication Critical patent/JPH05346935A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE:To provide the matrix data multiplying device which can perform matrix multiplication and its transposed matrix multiplication by using the same circuit and same matrix data. CONSTITUTION:Unit arithmetic circuits 110 each consisting of a holding circuit 10 which holds serial input data as many as the dimensions of the matrix, a multiplying circuit 50 which multiplies the input by matrix data, and an adding circuit 70 which cumulatively adds the multiplication result of the precedent stage or its multiplication result are provided as many as the dimensions of the data matrix. At first, the unit arithmetic circuit 110 inputs the input data to the holding circuit 10 or multiplying circuit 50 according to a selection signal. Then the multiplication result of the precedent stage or its own addition result is selectively inputted to the adding circuit 70. By this selection, the input/output relation of the unit arithmetic circuit 110 can be changed between the relation for the matrix multiplication of the input or its transposed matrix multiplication of the input. With the selection signal, the output of a parallel/serial converting circuit 80 or the output of the register 63 of a final stage is selected.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、デジタル信号処理にお
ける行列データ乗算装置、特に離散余弦変換(DCT)
および逆離散余弦変換(IDCT)演算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a matrix data multiplication device in digital signal processing, and more particularly to a discrete cosine transform (DCT).
And an inverse discrete cosine transform (IDCT) computing device.

【0002】[0002]

【従来の技術】入力データI0、I1、I2、I3がn
ビット並列に、順次時間順(シリアル)に入力され、式
1の演算を行われた結果として出力データY0、Y1、
Y2、Y3がnビット並列に、順次シリアルに出力され
る装置構成として、図7、図8に示される装置構成が知
られている。
2. Description of the Related Art Input data I0, I1, I2 and I3 are n
Output data Y0, Y1, as a result of the operation of Equation 1 being input bit-parallel sequentially in time order (serial)
A device configuration shown in FIGS. 7 and 8 is known as a device configuration in which Y2 and Y3 are sequentially output serially in parallel in n bits.

【数1】 [Equation 1]

【0003】(装置2の装置構成の動作説明)図7は従
来の行列データ乗算装置2の構成を示した図である。図
7の回路構成の行列データ乗算装置2で式1の演算を行
う場合の動作は以下の通り。図7中のレジスタ60、6
1、62、63は、入力データI0、I1、I2、I3
の入力に先立ち、初期化(クリア)される。その後、図
2に示すタイミングで動作サイクル信号100に同期し
た入力データI0、I1、I2、I3が各乗算回路5
0、51、52、53に順次シリアル入力される。これ
と同時に、各メモリ41、42、43、44より各乗算
回路50、51、52、53にそれぞれ係数データ“A
0〜A3”、“B0〜B3”、“C0〜C3”、“D0
〜D3”が読みだされる。各係数メモリ40〜43から
読みだされた係数データ“A0〜A3”、“B0〜B
3”、“C0〜C3”、“D0〜D3”は、それぞれI
0〜I3と乗算回路50、51、52、53において乗
算される。これらの演算結果は、それぞれ加算回路70
とレジスタ60、加算回路71とレジスタ61、加算回
路72とレジスタ62、加算回路73とレジスタ63に
より構成される累加算回路により累加算の結果、Y0〜
Y3が計算される。各累加算回路で計算されたY0〜Y
3は、並列/直列変換回路(パラレル/シリアル変換回
路)80によりシリアル変換され、出力される。
(Description of Operation of Device Configuration of Device 2) FIG. 7 is a diagram showing a configuration of a conventional matrix data multiplication device 2. The operation of the matrix data multiplication device 2 having the circuit configuration shown in FIG. Registers 60 and 6 in FIG.
1, 62, 63 are input data I0, I1, I2, I3
Initialized (cleared) before input of. After that, the input data I0, I1, I2, and I3 synchronized with the operation cycle signal 100 at the timings shown in FIG.
Serial inputs are sequentially input to 0, 51, 52, and 53. At the same time, the coefficient data “A” is stored in the multiplication circuits 50, 51, 52, 53 from the memories 41, 42, 43, 44, respectively.
0-A3 "," B0-B3 "," C0-C3 "," D0
To D3 "are read out. The coefficient data" A0 to A3 "and" B0 to B "read out from the coefficient memories 40 to 43, respectively.
3 ”,“ C0 to C3 ”, and“ D0 to D3 ”are respectively I
0 to I3 are multiplied in the multiplication circuits 50, 51, 52 and 53. These calculation results are respectively added to the adder circuit 70.
And register 60, adder circuit 71 and register 61, adder circuit 72 and register 62, and adder circuit 73 and register 63.
Y3 is calculated. Y0 to Y calculated by each cumulative addition circuit
3 is serial-converted by a parallel / serial conversion circuit (parallel / serial conversion circuit) 80 and output.

【0004】この場合、演算に当たり、メモリ40に
は、A0,A1,A2,A3 を格納し、メモリ41に
は、B0,B1,B2,B3 を格納し、メモリ42に
は、C0,C1,C2,C3 を格納し、メモリ43に
は、D0,D1,D2,D3 を格納することにより行
列計算をすることができ、さらにメモリ40には、A
0,B0,C0,D0 を格納し、メモリ41には、A
1,B1,C1,D1 を格納し、メモリ42には、A
2,B2,C2,D2 を格納し、メモリ43には、A
3,B3,C3,D3 を格納することにより、式1の
定数行列の転置行列の計算をすることができる。よっ
て、一つの行列データ乗算装置で定数行列による乗算
と、その転置行列による乗算を行う場合、メモリ40に
は、A0,A1,A2,A3,B0,C0,D0 を格
納し、メモリ41には、B0,B1,B2,B3,A
1,C1,D1 を格納し、メモリ42には、C0,C
1,C2,C3,A2,B2,D2 を格納し、メモリ
43には、D0,D1,D2,D3,A3,B3,C3
を格納することが必要となる。
In this case, in the calculation, the memory 40 stores A0, A1, A2, A3, the memory 41 stores B0, B1, B2, B3, and the memory 42 stores C0, C1, By storing C2 and C3 and storing D0, D1, D2 and D3 in the memory 43, matrix calculation can be performed.
0, B0, C0, D0 are stored, and A is stored in the memory 41.
1, B1, C1, D1 are stored, and A is stored in the memory 42.
2, B2, C2, D2 are stored, and A is stored in the memory 43.
By storing 3, B3, C3, D3, the transposed matrix of the constant matrix of Expression 1 can be calculated. Therefore, when performing multiplication by a constant matrix and multiplication by its transposed matrix by one matrix data multiplication device, A0, A1, A2, A3, B0, C0, D0 are stored in the memory 40, and the memory 41 is stored in the memory 41. , B0, B1, B2, B3, A
1, C1, D1 are stored, and C0, C are stored in the memory 42.
1, C2, C3, A2, B2, D2 are stored, and D0, D1, D2, D3, A3, B3, C3 are stored in the memory 43.
Will need to be stored.

【0005】(装置3の装置構成の動作説明)図8は従
来の行列データ乗算装置3の構成を示した図である。図
8の装置構成で式1の演算を行う場合の動作は以下の通
り。図8中のホールド回路10、11、12、13は、
入力データI0、I1、I2、I3の入力に先立ちクリ
アされる。その後、図3に示すタイミングで入力データ
I0、I1、I2、I3は、ホールド回路制御信号94
により、各ホールド回路10、11、12、13に4動
作サイクルの間保持される。また、図2に示されるタイ
ミングで、各メモリ44、45、46、47より各乗算
回路51、52、53、54にそれぞれ係数データ“A
0、B0、C0、D0”、“A1、B1、C1、D
1”、“A2、B2、C2、D2”、“A3、B3、C
3、D3”が読みだされる。各係数メモリから読みださ
れた係数データ“A0、B0、C0、D0”、“A1、
B1、C1、D1”、“A2、B2、C2、D2”、
“A3、B3、C3、D3”とホールド回路に保持され
た入力データI0〜I3は乗算回路50、51、52、
53において乗算される。これらの演算結果は、それぞ
れ加算回路70、71、72、73により加算されてゆ
くが、そのつどレジスタ60、61、62、63を介す
るので1動作サイクル信号ずれた乗算結果が加算され、
この結果Y0〜Y3がシリアル出力される。
(Description of Operation of Device Configuration of Device 3) FIG. 8 is a diagram showing a configuration of a conventional matrix data multiplication device 3. The operation when the calculation of Expression 1 is performed with the device configuration of FIG. 8 is as follows. The hold circuits 10, 11, 12, and 13 in FIG.
The input data I0, I1, I2, and I3 are cleared prior to input. After that, at the timing shown in FIG. 3, the input data I0, I1, I2, and I3 are transferred to the hold circuit control signal 94.
As a result, the holding circuits 10, 11, 12, 13 are held for four operation cycles. Further, at the timing shown in FIG. 2, the coefficient data “A” is supplied from the memories 44, 45, 46, 47 to the multiplication circuits 51, 52, 53, 54, respectively.
0, B0, C0, D0 "," A1, B1, C1, D
1 "," A2, B2, C2, D2 "," A3, B3, C
3, D3 "is read out. The coefficient data" A0, B0, C0, D0 "," A1, "read out from each coefficient memory.
B1, C1, D1 "," A2, B2, C2, D2 ",
“A3, B3, C3, D3” and the input data I0 to I3 held in the hold circuits are multiplied by the multiplication circuits 50, 51, 52,
It is multiplied at 53. These calculation results are added by the adder circuits 70, 71, 72 and 73, respectively, but since they are respectively passed through the registers 60, 61, 62 and 63, the multiplication results shifted by one operation cycle signal are added,
As a result, Y0 to Y3 are serially output.

【0006】この場合、演算に当たり、メモリ44に
は、A0,B0,C0,D0 を格納し、メモリ45に
は、A1,B1,C1,D1 を格納し、メモリ46に
は、A2,B2,C2,D2 を格納し、メモリ47に
は、A3,B3,C3,D3 を格納することにより行
列計算をすることができ、さらにメモリ44には、A
0,A1,A2,A3 を格納し、メモリ45には、B
0,B1,B2,B3 を格納し、メモリ46には、C
0,C1,C2,C3 を格納し、メモリ47には、D
0,D1,D2,D3 を格納することにより、式1の
定数行列の転置行列の計算をすることができる。よっ
て、一つの行列演算装置で定数行列による乗算と、その
転置行列による乗算を行う場合、行列データ乗算装置3
の装置構成の動作説明で示したのと同じく、メモリ44
には、A0,A1,A2,A3,B0,C0,D0 を
格納し、メモリ45には、B0,B1,B2,B3,A
1,C1,D1 を格納し、メモリ46には、C0,C
1,C2,C3,A2,B2,D2 を格納し、メモリ
47には、D0,D1,D2,D3,A3,B3,C3
を格納することが必要となる。
In this case, in the calculation, A0, B0, C0, D0 is stored in the memory 44, A1, B1, C1, D1 are stored in the memory 45, and A2, B2 is stored in the memory 46. Matrix calculation can be performed by storing C2, D2 and A3, B3, C3, D3 in the memory 47.
0, A1, A2, A3 are stored, and B is stored in the memory 45.
0, B1, B2, B3 are stored, and C is stored in the memory 46.
0, C1, C2, C3 are stored, and D is stored in the memory 47.
By storing 0, D1, D2, D3, the transposed matrix of the constant matrix of Expression 1 can be calculated. Therefore, when performing multiplication by a constant matrix and multiplication by its transposed matrix in one matrix operation device, the matrix data multiplication device 3
The memory 44 is the same as that shown in the explanation of the operation of the device configuration of
A0, A1, A2, A3, B0, C0, D0 are stored in the memory, and B0, B1, B2, B3, A are stored in the memory 45.
1, C1 and D1 are stored, and C0 and C are stored in the memory 46.
1, C2, C3, A2, B2, D2 are stored in the memory 47, and D0, D1, D2, D3, A3, B3, C3 are stored in the memory 47.
Will need to be stored.

【0007】次に、離散余弦変換(DCT)とその逆変
換である逆離散余弦変換(IDCT)を上記の行列デー
タ乗算回路で計算する場合について述べる。DCTの計
Next, a case will be described in which the discrete cosine transform (DCT) and its inverse, the inverse discrete cosine transform (IDCT), are calculated by the above matrix data multiplication circuit. Calculation of DCT

【数2】 と、その逆変換であるIDCTの計算[Equation 2] And the inverse transformation, IDCT calculation

【数3】 を行う場合である。但し、式2、および式3において、 E=cos(2π/8)、F=cos(1π/8)、G=cos(3π/8) ・・・式4 とする。[Equation 3] Is the case. However, in the equations 2 and 3, E = cos (2π / 8), F = cos (1π / 8), G = cos (3π / 8) ...

【0008】(DCT/IDCTの計算を行列データ乗
算装置2で行う場合の従来例)DCTの計算(式2)を
従来の行列データ乗算装置2で行う場合は、式1におけ
る各定数を、 A0= E, A1= E, A2= E, A3= E B0= F, B1= G, B2=−G, B3=−F C0= E, C1=−E, C2=−E, C3= E D0= G, D1=−F, D2= F, D3=−G ・・・式5 と考えることにより計算することができる。すなわち、
メモリ40には、E を格納し、
メモリ41には、F, G,−F,−G を格納し、
メモリ42には、E,−E を格納し、
メモリ43には、F, G,−F,−G を格納する
ことにより、DCTの計算(式2)を従来の行列データ
乗算装置2で行うことができる。
(Conventional Example in which Calculation of DCT / IDCT is Performed by Matrix Data Multiplier 2) When the calculation of DCT (Equation 2) is performed by the conventional matrix data multiplier 2, each constant in Equation 1 is set to A0. = E, A1 = E, A2 = E, A3 = E B0 = F, B1 = G, B2 = -G, B3 = -F C0 = E, C1 = -E, C2 = -E, C3 = E D0 = G, D1 = -F, D2 = F, D3 = -G ... It can be calculated by considering as Formula 5. That is,
E is stored in the memory 40,
F, G, -F, -G are stored in the memory 41,
The memory 42 stores E, −E,
By storing F, G, -F, -G in the memory 43, the DCT calculation (formula 2) can be performed by the conventional matrix data multiplication device 2.

【0009】IDCTの計算(式3)を従来の行列デー
タ乗算装置3で行う場合は、式1における各定数を、 A0= E, A1= F, A2= E, A3= G B0= E, B1= G, B2=−E, B3=−F C0= E, C1=−G, C2=−E, C3= F D0= E, D1=−F, D2= E, D3=−G ・・・式6 と考えることにより計算することができる。すなわち、
メモリ40には、 E, F, G を格納
し、メモリ41には、 F, G,−F,−G を格
納し、メモリ42には、 E, F,−E,−G を
格納し、メモリ43には、 E,−F,−G
を格納することにより、IDCTの計算(式3)を従来
の回路(図7)で行うことができる。したがって、メモ
リ40には、E, F, G を格
納し、メモリ41には、E, F, G,−E,−F,
−G を格納し、メモリ42には、E, F,−E,−
G を格納し、メモリ43には、E,
F, G,−F,−G を格納することによっ
て、DCTおよびIDCTの演算を行うことができる。
When the IDCT calculation (formula 3) is performed by the conventional matrix data multiplication device 3, the constants in formula 1 are set to A0 = E, A1 = F, A2 = E, A3 = GB0 = E, B1. = G, B2 = -E, B3 = -F C0 = E, C1 = -G, C2 = -E, C3 = F D0 = E, D1 = -F, D2 = E, D3 = -G ... Formula It can be calculated by considering 6. That is,
The memory 40 stores E, F, G, the memory 41 stores F, G, -F, -G, and the memory 42 stores E, F, -E, -G. In the memory 43, E, -F, -G
By storing IDCT, the IDCT calculation (formula 3) can be performed by the conventional circuit (FIG. 7). Therefore, the memory 40 stores E, F, G, and the memory 41 stores E, F, G, -E, -F,
-G is stored, and the memory 42 stores E, F, -E,-.
G is stored and the memory 43 stores E,
By storing F, G, -F, -G, DCT and IDCT operations can be performed.

【0010】(DCT/IDCTの計算を図8の回路で
行う場合の従来例)DCTの計算(式2)を従来の装置
3で行う場合は、図7の回路と同様に考えて、メモリ4
4には、 E, F, G を格納し、メモリ
45には、 F, G,−E,−F を格納し、メモ
リ46には、 E, F,−E,−G を格納し、メ
モリ47には、 E,−F,−G を格納する
ことにより、DCTの計算(式2)を行うことができ
る。
(Conventional example in which calculation of DCT / IDCT is performed by the circuit of FIG. 8) When calculation of DCT (formula 2) is performed by the conventional device 3, the memory 4 is considered in the same manner as the circuit of FIG.
4 stores E, F, G, memory 45 stores F, G, -E, -F, and memory 46 stores E, F, -E, -G. By storing E, −F, and −G in 47, the DCT calculation (formula 2) can be performed.

【0011】IDCTの計算(式3)を行列データ乗算
装置3で行う場合は、行列デ─タ乗算装置2と同様に考
えて、メモリ44には、 E を
格納し、メモリ45には、 F, G,−F,−G
を格納し、メモリ46には、 E,−E
を格納し、メモリ47には、 E, G,−F,−G
を格納することにより、IDCTの計算(式3)を
行うことができる。したがって、図7の回路と同様に、
メモリ44には、E, F, G
を格納し、メモリ45には、E, F, G,−E,−
F,−G を格納し、メモリ46には、E, F,−
E,−G を格納し、メモリ47には、
E, F, G,−F,−G を格納することに
よって、DCTおよびIDCTの演算を行うことができ
る。
When the IDCT calculation (formula 3) is performed by the matrix data multiplication device 3, E is stored in the memory 44 and F is stored in the memory 45 in the same manner as in the matrix data multiplication device 2. , G, -F, -G
And the memory 46 stores E, −E
And the memory 47 stores E, G, -F, -G
By storing, the IDCT can be calculated (Equation 3). Therefore, like the circuit of FIG.
The memory 44 stores E, F, G
And the memory 45 stores E, F, G, −E, −.
F, −G is stored, and the memory 46 stores E, F, −.
E, −G are stored, and in the memory 47,
By storing E, F, G, -F, -G, DCT and IDCT operations can be performed.

【0012】[0012]

【発明が解決しようとする課題】DCTとIDCT演算
のような、定数行列の乗算とその転置行列の乗算の関係
にある計算を一つの演算装置で行いたいという要請があ
るが、例えば4×4の定数行列の場合、定数行列あるい
はその転置行列の一方の乗算を行う場合に必要なデータ
は16個なのに対し、定数行列とその転置行列の乗算を
一つの演算装置で行おうとすると、一般的には28個の
データをメモリ上に格納しておく必要がある。また、同
じく4×4の定数行列によるDCT、IDCT演算に限
った場合でも、どちらか片方の乗算のみを行う場合、必
要なデータは11個であるのに対し、双方の乗算を行う
ためには、18個のデータをメモリ上に格納しておく必
要があり、メモリが大きくなりすぎるという問題があっ
た。この問題は整数データに比べて定数データのビット
数が大きくなる浮動小数点データを取り扱う乗算を行う
場合、特に重要となる。本発明は、このような従来技術
の問題点に鑑みてなされたものであり、定数行列乗算お
よびその転置行列乗算を同一の装置で行うことができ、
しかも定数行列乗算のみを行う乗算装置、あるいはその
転置行列演算のみを行う乗算装置に比べて定数データ格
納用メモリの大きさが増えない定数行列およびその転置
行列データ乗算用装置を提供することを目的とする。
There is a demand that a single arithmetic unit should perform a calculation such as a DCT and IDCT operation which involves multiplication of a constant matrix and multiplication of its transposed matrix. For example, 4 × 4. In the case of the constant matrix of, the number of data required to multiply one of the constant matrix and its transposed matrix is 16, whereas when the multiplication of the constant matrix and its transposed matrix is performed by one arithmetic unit, Needs to store 28 pieces of data in the memory. Similarly, even in the case of DCT or IDCT operation using a 4 × 4 constant matrix, if only one of the multiplications is performed, the required data is 11, but in order to perform both multiplications, It is necessary to store 18 pieces of data in the memory, which causes a problem that the memory becomes too large. This problem becomes particularly important when performing multiplication that handles floating-point data in which the number of bits of constant data is larger than that of integer data. The present invention has been made in view of the above problems of the conventional technique, and constant matrix multiplication and its transposed matrix multiplication can be performed by the same device,
Moreover, it is an object of the present invention to provide a constant matrix and its transposed matrix data multiplication device in which the size of the memory for storing constant data does not increase as compared with a multiplication device that performs only constant matrix multiplication or a transposed matrix operation thereof. And

【0013】[0013]

【課題を解決するための手段】上記目的を達成するため
に、本発明の行列データ演算回路は、対応する次数の入
力データをその次数分だけ保持し、順次出力するデータ
保持回路と、選択信号に応じて上記入力データ、また、
上記データ保持回路からの保持データを選択的に出力す
るセレクタ回路と、定数行列の次数分だけ対応する次数
の係数を保持している係数保持回路と、上記セレクタ回
路からの出力と、上記係数保持回路からの係数を乗算す
る乗算回路と、上記選択信号に応じて、前段のデータ、
また、自己の累加算結果と上記乗算回路の乗算結果との
累加算を行う累加算回路からなる単位演算回路が次数分
並列に設けられ、前段の累加算結果が次段累加算回路の
入力のひとつとして接続されることを特徴としている。
In order to achieve the above object, a matrix data operation circuit of the present invention has a data holding circuit for holding input data of a corresponding order by the order and sequentially outputting it, and a selection signal. Depending on the above input data,
A selector circuit that selectively outputs the held data from the data holding circuit, a coefficient holding circuit that holds a coefficient of an order corresponding to the order of a constant matrix, an output from the selector circuit, and the coefficient holding A multiplication circuit for multiplying the coefficient from the circuit, and the data of the previous stage according to the selection signal,
Further, a unit operation circuit including a cumulative addition circuit for performing cumulative addition of the self cumulative addition result and the multiplication result of the multiplication circuit is provided in parallel for the degree, and the previous stage cumulative addition result is input to the next stage cumulative addition circuit. It is characterized by being connected as one.

【0014】[0014]

【作用】図1の行列データ乗算装置1の動作について述
べる。本発明に係る図1の行列データ乗算装置1は、図
7、および図8に示したような、同一の定数行列データ
を使用した場合、入出力が互いに定数行列データとして
転置行列データを使用し乗算を行ったのと等価の関係に
なる二種類の行列データ乗算装置2、3を含む。行列デ
ータ乗算装置1は、内包する行列データ乗算装置2、3
を制御信号により用途に合わせて選択することにより内
部構成を変更し、入出力関係を変更する。よって、行列
データ乗算装置1は、同一の行列データ乗算装置および
同一の行列データによって定数行列およびその転置行列
による乗算を行うことができる。本発明によれば、同一
の行列データ乗算装置および同一の行列データによって
定数行列およびその転置行列による乗算を行う行列デ─
タ乗算装置および行列デ─タ乗算方法を得ることができ
る。なお、この行列デ─タ乗算装置および行列デ─タ乗
算方法はDCTおよびIDCT演算に好適である。
The operation of the matrix data multiplication device 1 of FIG. 1 will be described. In the matrix data multiplication device 1 of FIG. 1 according to the present invention, when the same constant matrix data as shown in FIGS. 7 and 8 is used, the input and output use transposed matrix data as constant matrix data. It includes two types of matrix data multiplication devices 2 and 3 which have an equivalent relation to the multiplication. The matrix data multiplication device 1 includes matrix data multiplication devices 2 and 3 included therein.
The internal configuration is changed and the input / output relation is changed by selecting the signal according to the application by the control signal. Therefore, the matrix data multiplication device 1 can perform multiplication by the constant matrix and its transposed matrix by the same matrix data multiplication device and the same matrix data. According to the present invention, the same matrix data multiplication device and matrix matrix that performs multiplication by a constant matrix and its transposed matrix by the same matrix data
It is possible to obtain a data multiplication device and a matrix data multiplication method. The matrix data multiplication device and matrix data multiplication method are suitable for DCT and IDCT operations.

【0015】[0015]

【実施例】以下、本発明の第一実施例を図面を参照して
説明する。図1は本発明に係る行列データ乗算装置1の
装置構成図である。図1において、ホールド回路10、
セレクタ20、24、メモリ30、乗算回路50、レジ
スタ60、および加算回路70は単位演算回路110を
構成する。他の単位演算回路111、112、113、
114についても同様である。パラレル/シリアル変換
回路80、出力バッファ81とセレクタ28は出力回路
120を構成する。ホールド回路10、11、12、1
3は入力データをデータ入力から定数行列の次数分の動
作サイクルの間保持する。本実施例では定数行列は4次
であるため、4動作サイクルの間保持する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a device configuration diagram of a matrix data multiplication device 1 according to the present invention. In FIG. 1, the hold circuit 10,
The selectors 20 and 24, the memory 30, the multiplication circuit 50, the register 60, and the addition circuit 70 form a unit arithmetic circuit 110. Other unit arithmetic circuits 111, 112, 113,
The same applies to 114. The parallel / serial conversion circuit 80, the output buffer 81, and the selector 28 form an output circuit 120. Hold circuits 10, 11, 12, 1
3 holds the input data during the operation cycle for the degree of the constant matrix from the data input. In the present embodiment, since the constant matrix is fourth-order, it is held for four operation cycles.

【0016】セレクタ20、21、22、23、24、
25、26、27、28は行列演算制御回路90から出
力されるセレクタ制御用信号91により制御され、それ
ぞれ2入力のうちひとつを選択し、出力する。この内、
セレクタ20〜23は入力データ選択用のセレクタであ
り、0側に選択された場合、入力信号をそのまま乗算回
路50、51、52、53に入力し、1側に選択された
場合、ホールド回路を介した入力信号を乗算回路50、
51、52、53に入力する。セレクタ24、25、2
6、27は加算回路70、71、72、73に入力され
るデータを選択する。0側に選択された場合、加算回路
71、72、73に入力されるデータはそれぞれレジス
タ60、61、62の出力となり、1側に選択された場
合、それぞれ前段のレジスタの値が加算回路71、7
2、73に入力される。出力回路120のセレクタ28
は行列データ乗算装置1の出力を選択する。0側に選択
された場合、行列データ乗算装置1の出力はパラレル/
シリアル変換回路80からのものとなり、1側に選択さ
れた場合、レジスタ63の出力が行列データ乗算装置1
の出力となる。この際、出力バッファ81は出力Y0、
Y1、Y2、Y3のない場合、行列演算制御回路90か
ら出力される出力制御信号95により制御され、ハイイ
ンピーダンス状態となるものとする。
Selectors 20, 21, 22, 23, 24,
25, 26, 27 and 28 are controlled by the selector control signal 91 output from the matrix operation control circuit 90, and select and output one of the two inputs. Of this,
The selectors 20 to 23 are selectors for selecting input data, and when selected to the 0 side, the input signal is input to the multiplication circuits 50, 51, 52 and 53 as they are, and when selected to the 1 side, the hold circuit is operated. The input signal via the multiplication circuit 50,
Input to 51, 52, 53. Selectors 24, 25, 2
Reference numerals 6 and 27 select the data input to the adder circuits 70, 71, 72 and 73. When it is selected to the 0 side, the data input to the adder circuits 71, 72 and 73 becomes the outputs of the registers 60, 61 and 62, respectively, and when it is selected to the 1 side, the value of the register in the previous stage is added to the adder circuit 71. , 7
It is input to 2, 73. Selector 28 of output circuit 120
Selects the output of the matrix data multiplication device 1. When selected to the 0 side, the output of the matrix data multiplication device 1 is parallel /
When the data is from the serial conversion circuit 80 and is selected to be 1 side, the output of the register 63 is the matrix data multiplication device 1
Is output. At this time, the output buffer 81 outputs the output Y0,
When there is no Y1, Y2, or Y3, it is controlled by the output control signal 95 output from the matrix operation control circuit 90 and is in a high impedance state.

【0017】メモリ30、31、32、33は定数デー
タ格納用のメモリである。乗算回路50、51、52、
53は入力データとメモリ30、31、32、33に格
納された定数データの乗算を行う。レジスタ60、6
1、62、63は加算回路70、71、72、73の結
果を格納する。加算回路70、71、72、73は乗算
回路50、51、52、53の出力を累加算する。レジ
スタ60と加算回路70、レジスタ61と加算回路7
1、レジスタ62と加算回路72、レジスタ63と加算
回路73がそれぞれ組になり、累加算回路を形成する。
パラレル/シリアル変換回路80は加算回路70、7
1、72、73に格納されるパラレルデータをシリアル
に変換し、出力する。行列演算制御回路90は行列デー
タ乗算装置1のセレクタ制御、初期化制御、メモリ制
御、ホールド回路制御および出力回路制御を行う。セレ
クタ制御信号用91は、行列演算制御回路90から出力
され、セレクタ20、21、22、23、24、25、
26、27、28の制御を行う。初期化制御用信号92
は、行列演算制御回路90から出力され、レジスタ6
0、61、62、63およびホールド回路10、11、
12、13の初期化を制御する。メモリ制御信号93
は、行列演算制御回路90から出力され、定数乗算時の
メモリ制御を行う。ホールド回路制御用信号94は、行
列演算制御回路90から出力され、定数乗算時のメモリ
制御を行う。出力制御用信号95は出力回路120を制
御する。制御信号91〜94はいずれもハイアクテイブ
の制御信号である。動作サイクル信号100は行列デー
タ乗算装置1の動作サイクルのタイミングを規定する。
単位演算回路110、111、112、113はセレク
タ20、21、22、23により機能選択され、セレク
タの0側を選択された場合、入力データI0、I1、I
2、I3と行列の各行ごとの演算を行い、セレクタの1
側を選択された場合、入力データI0、I1、I2、I
3と行列の各列ごとの演算を行う。出力回路120は乗
算結果の出力制御を行う。なお、上記各回路は特に断ら
ない限り、デジタル論理回路で構成されるものとする。
The memories 30, 31, 32 and 33 are memories for storing constant data. Multiplication circuits 50, 51, 52,
Reference numeral 53 multiplies the input data by the constant data stored in the memories 30, 31, 32 and 33. Registers 60 and 6
1, 62 and 63 store the results of the adder circuits 70, 71, 72 and 73. The adder circuits 70, 71, 72, 73 cumulatively add the outputs of the multiplier circuits 50, 51, 52, 53. Register 60 and adder circuit 70, register 61 and adder circuit 7
1, the register 62 and the adder circuit 72, and the register 63 and the adder circuit 73 form a set to form a cumulative adder circuit.
The parallel / serial conversion circuit 80 is an addition circuit 70, 7
The parallel data stored in 1, 72, 73 is converted to serial and output. The matrix operation control circuit 90 performs selector control, initialization control, memory control, hold circuit control and output circuit control of the matrix data multiplication device 1. The selector control signal 91 is output from the matrix operation control circuit 90, and the selectors 20, 21, 22, 23, 24, 25,
26, 27 and 28 are controlled. Initialization control signal 92
Is output from the matrix operation control circuit 90, and the register 6
0, 61, 62, 63 and hold circuits 10, 11,
Control the initialization of 12 and 13. Memory control signal 93
Is output from the matrix operation control circuit 90 and performs memory control during constant multiplication. The hold circuit control signal 94 is output from the matrix operation control circuit 90 and performs memory control during constant multiplication. The output control signal 95 controls the output circuit 120. The control signals 91 to 94 are all high-active control signals. The operation cycle signal 100 defines the timing of the operation cycle of the matrix data multiplication device 1.
The unit arithmetic circuits 110, 111, 112, 113 are function-selected by the selectors 20, 21, 22, 23, and when the selector 0 side is selected, the input data I0, I1, I
2, I3 and each row of the matrix are calculated, and the selector 1
When the side is selected, the input data I0, I1, I2, I
3 and each column of the matrix are calculated. The output circuit 120 controls the output of the multiplication result. Unless otherwise specified, each of the above circuits is composed of a digital logic circuit.

【0018】行列データ乗算装置1は以上のように構成
されるので、図1の行列データ乗算装置1は2入力1出
力のセレクタ20、21、22、23、24、25、2
6、27、28を連動して0側に切り換えることによ
り、図7の行列データ乗算装置2と同じ入出力関係を有
するように設定でき、同じく1側に設定することにより
図8の行列データ乗算装置3と同じ入出力関係を有する
ように設定できる。
Since the matrix data multiplying apparatus 1 is configured as described above, the matrix data multiplying apparatus 1 of FIG. 1 has a 2-input 1-output selector 20, 21, 22, 23, 24, 25, 2.
By switching 6, 27 and 28 to the 0 side in conjunction with each other, it is possible to set the matrix data multiplication device 2 to have the same input / output relationship as that of the matrix data multiplication apparatus 2 of FIG. It can be set to have the same input / output relationship as the device 3.

【0019】式1の演算を行うためにメモリ30に A
0,A1,A2,A3 を格納し、メモリ31に B
0,B1,B2,B3 を格納し、メモリ32に C
0,C1,C2,C3 を格納し、メモリ33に D
0,D1,D2,D3 を格納し、さらに2入力1出力
のセレクタ20、21、22、23、24、25、2
6、27、28を0側に設定することにより、図7の行
列データ乗算装置2と同一の入出力関係になるように設
定する。図1の回路構成で式1の演算を行う場合の動作
は以下の通り。図1中の各単位演算回路110、11
1、112、113に含まれるレジスタ60、61、6
2、63は、入力データI0、I1、I2、I3の入力
に先立ち、初期化用制御信号92によりクリアされる。
その後、図2に示すタイミングで動作サイクル信号10
0に同期した入力データI0、I1、I2、I3がnビ
ット並列(n=16)に、各乗算回路50、51、5
2、53に順次シリアル入力される。これと同時に、メ
モリ制御信号93により、各係数メモリ30、31、3
2、33より各乗算回路50、51、52、53にそれ
ぞれ係数データ“A0〜A3”、“B0〜B3”、“C
0〜C3”、“D0〜D3”が読みだされる。この際の
行列データ乗算装置1のメモリセル30内部のメモリセ
ル30a〜30dとメモリセル制御信号93a〜93d
の関係を図6Aに示す。図6Aにはメモリ30のみの構
成の詳細を記すが、メモリ31、32、33についても
同様の構成である。各係数メモリから読みだされた係数
データ“A0〜A3”、“B0〜B3”、“C0〜C
3”、“D0〜D3”は、それぞれI0〜I3と乗算回
路50、51、52、53において乗算される。これら
の演算結果は、それぞれ加算回路70とレジスタ69、
加算回路71とレジスタ61、加算回路72とレジスタ
62、加算回路73とレジスタ63により構成される累
加算器により累加算の結果、Y0〜Y3が計算される。
各累加算器で計算されたY0〜Y3は、パラレル/シリ
アル変換回路80によりシリアル変換され、nビット並
列に出力される。つまり、図7の行列演算装置おけるメ
モリ40、41、42、43をそれぞれメモリ30、3
1、32、33に置き換えたことと等価である。
A is stored in the memory 30 in order to perform the operation of Equation 1.
0, A1, A2, A3 are stored and B is stored in the memory 31.
0, B1, B2, B3 are stored and C is stored in the memory 32.
0, C1, C2, C3 are stored and D is stored in the memory 33.
0, D1, D2, D3 are stored and selectors 20, 21, 22, 23, 24, 25, 2 of 2 inputs and 1 output are further stored.
By setting 6, 27 and 28 to the 0 side, the same input / output relationship as that of the matrix data multiplication device 2 of FIG. 7 is set. The operation when the calculation of Expression 1 is performed with the circuit configuration of FIG. 1 is as follows. Each unit arithmetic circuit 110, 11 in FIG.
Registers 60, 61, 6 included in 1, 112, 113
2, 63 are cleared by the initialization control signal 92 before inputting the input data I0, I1, I2, I3.
After that, at the timing shown in FIG.
Input data I0, I1, I2, and I3 synchronized with 0 are arranged in n bits in parallel (n = 16) in the respective multiplication circuits 50, 51, and 5.
Serially input to 2, 53. At the same time, by the memory control signal 93, each coefficient memory 30, 31, 3
2 and 33, the coefficient data “A0 to A3”, “B0 to B3”, and “C” are supplied to the multiplication circuits 50, 51, 52, and 53, respectively.
0 to C3 "and" D0 to D3 "are read out. At this time, the memory cells 30a to 30d and the memory cell control signals 93a to 93d in the memory cell 30 of the matrix data multiplication device 1 are read.
The relationship is shown in FIG. 6A. 6A shows the details of the configuration of only the memory 30, but the memories 31, 32, and 33 have the same configuration. Coefficient data “A0 to A3”, “B0 to B3”, “C0 to C” read from each coefficient memory
3 "and" D0 to D3 "are respectively multiplied by I0 to I3 in the multiplication circuits 50, 51, 52 and 53. The calculation results are added circuit 70 and register 69, respectively.
As a result of cumulative addition, Y0 to Y3 are calculated by the cumulative adder including the adder circuit 71 and the register 61, the adder circuit 72 and the register 62, and the adder circuit 73 and the register 63.
Y0 to Y3 calculated by each cumulative adder are serial-converted by the parallel / serial conversion circuit 80 and output in parallel in n bits. That is, the memories 40, 41, 42 and 43 in the matrix calculation device of FIG.
It is equivalent to replacing with 1, 32, 33.

【0020】次に図1の行列データ乗算装置1により転
置行列演算を行う場合について述べる。この場合、メモ
リ30、31、32、33の内容は変えず、セレクタ制
御信号81により、2入力1出力のセレクタ20、2
1、22、23、24、25、25、27、28を1側
に設定することにより、図8の行列データ乗算装置3と
同一の入出力関係になるように設定する。図1中の各単
位演算回路110、111、112、113に含まれる
ホールド回路10、11、12、13は、入力データI
0、I1、I2、I3の入力に先立ち、図2に示すのと
同様のタイミングで初期化用制御信号92によりクリア
される。その後、図3に示すタイミングで動作サイクル
信号100に同期した入力データI0、I1、I2、I
3は、ホールド回路制御信号94a〜dにより、各ホー
ルド回路10、11、12、13に4動作サイクルの間
保持される。また、図3に示されるタイミングで、メモ
リ制御信号93により、各係数メモリ30、31、3
2、33より各乗算回路70、71、72、73にそれ
ぞれ係数データ“A0〜A3”、“B0〜B3”、“C
0〜C3”、“D0〜D3”が読みだされる。各係数メ
モリから読みだされた係数データ“A0〜A3”、“B
0〜B3”、“C0〜C3”、“D0〜D3”とホール
ド回路に保持された入力データI0〜I3は乗算回路5
0、51、52、53において乗算される。これらの演
算結果は、それぞれ加算回路70、71、72、73に
より加算されてゆくが、そのつどレジスタ60、61、
62、63を介するので1動作サイクルずれた乗算結果
が加算され、この結果Y0〜Y3が出力回路120より
シリアル出力される。この動作は図8のメモリ44、4
5、46、47をそれぞれメモリ30、31、32、3
3に置き換え、メモリ30の内容を、A0,B0,C
0,D0の転置行列用定数に相当するA0,A1,A
2,A3に置き換え、メモリ31の内容を、A1,B
1,C1,D1の転置行列用定数に相当するA0,A
1,A2,A3に置き換え、メモリ32の内容を、A
2,B2,C2,D2の転置行列用定数に相当するC
0,C1,C2,C3に置き換え、メモリ33の内容
を、A3,B3,C3,D3の転置行列用定数に相当す
るD0,D1,D2,D3に置き換えたことに等価であ
る。以上のように、2入力1出力のセレクタ20、2
1、22、23、24、25、26、27、28を切り
換えることにより同一の行列データ乗算装置1におい
て、メモリ量を増やすことなく行列乗算とその転置行列
乗算を行うことができる。なお、初期入力96は行列デ
─タ乗算装置1を多段に重ねて使用する場合の外部入力
であり、この実施例ではここから入力される信号を0と
する。
Next, the case of performing transposed matrix operation by the matrix data multiplication device 1 of FIG. 1 will be described. In this case, the contents of the memories 30, 31, 32, and 33 are not changed, and the selector control signal 81 causes the selectors 20 and 2 to output 2 inputs and 1 output.
By setting 1, 22, 23, 24, 25, 25, 27, 28 to the 1 side, the same input / output relationship as that of the matrix data multiplication device 3 of FIG. 8 is set. The hold circuits 10, 11, 12, and 13 included in the unit arithmetic circuits 110, 111, 112, and 113 shown in FIG.
Prior to the input of 0, I1, I2, and I3, it is cleared by the initialization control signal 92 at the same timing as shown in FIG. After that, input data I0, I1, I2, I synchronized with the operation cycle signal 100 at the timing shown in FIG.
3 is held in each of the hold circuits 10, 11, 12, and 13 for four operation cycles by the hold circuit control signals 94a to 94d. Further, at the timing shown in FIG. 3, the coefficient control memory 93 causes the coefficient memories 30, 31, 3 to be changed.
2 and 33, the coefficient data “A0 to A3”, “B0 to B3”, and “C” are supplied to the multiplication circuits 70, 71, 72, and 73, respectively.
0 to C3 "and" D0 to D3 "are read out. The coefficient data" A0 to A3 "and" B "read out from each coefficient memory.
0-B3 "," C0-C3 "," D0-D3 "and the input data I0-I3 held in the hold circuit are multiplied by the multiplication circuit 5
Multiply at 0, 51, 52, 53. These calculation results are added by the adder circuits 70, 71, 72 and 73, respectively.
Since they are passed through 62 and 63, the multiplication results shifted by one operation cycle are added, and the results Y0 to Y3 are serially output from the output circuit 120. This operation is performed by the memories 44 and 4 in FIG.
5, 46, and 47 are stored in memories 30, 31, 32, and 3, respectively.
3 and replace the contents of memory 30 with A0, B0, C
A0, A1, A corresponding to the transposed constants of 0, D0
2 and A3, and the contents of the memory 31 are changed to A1 and B
A0, A corresponding to the transposed matrix constants of 1, C1, D1
1, A2, A3, and the contents of the memory 32, A
C corresponding to the constant for the transposed matrix of 2, B2, C2, D2
0, C1, C2, C3, and the contents of the memory 33 are equivalent to D0, D1, D2, D3 corresponding to the transposed constants of A3, B3, C3, D3. As described above, the 2-input 1-output selectors 20, 2
By switching 1, 22, 23, 24, 25, 26, 27, 28, the same matrix data multiplication device 1 can perform matrix multiplication and its transposed matrix multiplication without increasing the memory amount. It should be noted that the initial input 96 is an external input when the matrix data multiplication device 1 is used in multiple layers, and in this embodiment, the signal input from this is zero.

【0021】以下、本発明の第2実施例について述べ
る。ここでは、本発明の行列データ乗算装置1で離散余
弦変換(DCT)とその逆変換である逆離散余弦変換
(IDCT)を計算する場合について述べる。DCTの
計算およびその逆変換であるIDCTの計算についての
は従来例の説明で述べた通りである。DCTの計算(式
2)を行列データ乗算装置1で行う場合は、先ず、メモ
リ30に、E を格納し、メモリ
31に、F, G,−G,−F を格納し、メモリ3
2に、E,−E を格納し、メモリ33
に、G,─F, F,−G を格納する。また、セレ
クタ20〜28を0側に選択し、入出力関係を行列デー
タ乗算装置2と等価になるように設定する。メモリ30
は常にEを出力するように設定し、メモリ32はE、−
E、−E、Eの順に、その他のメモリ31、33は上記
の通りの順番で出力するようメモリ30、31、32、
33を制御する構成とする。メモリ30、31、32、
33中の各メモリセル30a、31a、31b、32a
〜32d、33a〜33dはメモリセル制御信号93a
〜dがハイレベルでその内容を出力する。この際の行列
データ乗算装置1の入出力関係を図4に、メモリセルと
メモリ制御信号の関係を図6Bに示す。このような設
定、構成とすることにより、第1実施例でセレクタ20
〜29を0側に選択した場合について述べたのと同様の
動作でDCT演算を行うことができる。IDCT演算を
行う場合はセレクタ20〜29を1側に選択する。他の
構成はDCT演算と同じとする。この際の行列データ乗
算装置1の入出力関係を図5に示す。セレクタ20〜2
9を1側に選択することにより、第1実施例でセレクタ
20〜29を0側に選択した場合について述べたのと同
様の動作でIDCT演算を行うことができる。各種制御
信号は本実施例では全てハイアクテイブの信号とした
が、回路の構成上必要に応じてローアクテイブの信号と
してもよい。
The second embodiment of the present invention will be described below. Here, a case will be described in which the matrix data multiplication device 1 of the present invention calculates the discrete cosine transform (DCT) and its inverse, the inverse discrete cosine transform (IDCT). The calculation of DCT and the calculation of IDCT which is the inverse transform thereof are as described in the description of the conventional example. When the DCT calculation (formula 2) is performed by the matrix data multiplication device 1, first, E is stored in the memory 30, F, G, −G, and −F are stored in the memory 31, and the memory 3 is stored.
2, E and −E are stored in the memory 33.
, G, --F, F, -G are stored. Further, the selectors 20 to 28 are selected to the 0 side, and the input / output relationship is set to be equivalent to that of the matrix data multiplication device 2. Memory 30
Is set to always output E, and the memory 32 stores E, −
In order of E, −E, E, the other memories 31, 33 output the memories 30, 31, 32, in order as described above.
33 is configured to be controlled. Memories 30, 31, 32,
Memory cells 30a, 31a, 31b, 32a in 33
32d and 33a to 33d are memory cell control signals 93a.
The contents of ~ d are output at a high level. The input / output relationship of the matrix data multiplication device 1 at this time is shown in FIG. 4, and the relationship between the memory cell and the memory control signal is shown in FIG. 6B. With such settings and configurations, the selector 20 in the first embodiment is
The DCT calculation can be performed by the same operation as that described when .about.29 is selected to the 0 side. When performing the IDCT calculation, the selectors 20 to 29 are selected to the 1 side. Other configurations are the same as the DCT calculation. The input / output relationship of the matrix data multiplication device 1 at this time is shown in FIG. Selector 20-2
By selecting 9 on the 1 side, the IDCT operation can be performed by the same operation as that described in the case of selecting the selectors 20 to 29 on the 0 side in the first embodiment. Although various control signals are all high-active signals in this embodiment, they may be low-active signals if necessary in terms of circuit configuration.

【0022】なお、本発明の実施例では、メモリ30〜
33に定数行列データを設定し、セレクタ20〜28を
0側に選択して行う演算を行列乗算とし、セレクタ20
〜28を1側に設定して行う演算を転置行列演算とした
が、メモリ30〜33に上記行列と転置関係にある定数
行列データを設定し、セレクタ20〜28を1側に選択
して行う演算を行列乗算とし、セレクタ20〜28を0
側に設定して行う演算を転置行列乗算としてもよい。こ
れと同様の関係はDCTおよびIDCT演算についても
同じである。
In the embodiment of the present invention, the memory 30-
The constant matrix data is set in 33, the operation performed by selecting the selectors 20 to 28 on the 0 side is matrix multiplication, and the selector 20
Although the operation performed by setting ~ 28 to the 1 side is the transposed matrix operation, constant matrix data having a transposed relationship with the above matrix is set in the memories 30 to 33, and the selectors 20 to 28 are selected to the 1 side to perform the operation. The operation is matrix multiplication, and the selectors 20 to 28 are set to 0.
The calculation performed on the side may be transposed matrix multiplication. A similar relationship is the same for DCT and IDCT operations.

【0023】また、本発明の実施例では、4×4行列に
ついてのみ述べたが、単位演算回路を次数分だけ設け、
それに応じた定数データ格納用メモリの構成とし、定数
データ格納用メモリに定数を格納することにより、任意
の次数の行列乗算についての本発明に係る行列データ乗
算装置を得ることができる。これはDCTおよびIDC
T演算についても同様である。また、本発明の実施例に
示した各単位演算回路は同等の機能を有する他の回路構
成に置き換えることができる。また、入出力形式として
本実施例ではシリアル入出力としたが、用途によっては
全ての入出力をパラレル入出力としてもよい。また、本
発明の実施例では入出力データは16ビット並列(n=
16)としたが、nは他の値としてもよい。さらに、シ
リアル入出力(n=1)としてもよい。また、入力と出
力のビット長が同じでなくともよい。また、本発明の実
施例では、係数データ格納メモリと乗算回路を有するこ
とにより入力データと係数データの乗算を行っている
が、ルックアップテーブルを用いて乗算を行ってもよ
い。
In the embodiment of the present invention, only the 4 × 4 matrix is described. However, unit arithmetic circuits are provided for the orders,
A matrix data multiplication device according to the present invention for a matrix multiplication of an arbitrary order can be obtained by configuring the constant data storage memory in accordance therewith and storing the constant in the constant data storage memory. This is DCT and IDC
The same applies to the T calculation. Further, each unit arithmetic circuit shown in the embodiment of the present invention can be replaced with another circuit configuration having an equivalent function. Although the input / output format is serial input / output in this embodiment, all input / output may be parallel input / output depending on the application. In the embodiment of the present invention, the input / output data is 16-bit parallel (n =
16), but n may have another value. Further, serial input / output (n = 1) may be used. Further, the bit lengths of the input and the output do not have to be the same. In the embodiment of the present invention, the input data and the coefficient data are multiplied by having the coefficient data storage memory and the multiplication circuit. However, the multiplication may be performed using a lookup table.

【0024】[0024]

【発明の効果】以上述べたように本発明の行列データ乗
算装置によれば、互いに同一定数格納メモリ内の定数デ
ータについて乗算をした場合、入出力関係が定数行列と
その転置行列の乗算となる乗算装置を内蔵し、それらを
セレクタにて切り換えて乗算を行うので、一種類の定数
用メモリを使用して、定数行列乗算と、その転置行列乗
算を同一回路で行うことができ、定数行列とその転置行
列の両方を入力について行うことができるにもかかわら
ず、いずれか一方のみを行う行列データ乗算装置と比べ
て定数データ格納用メモリが増大しない行列データ乗算
装置を得ることができる。
As described above, according to the matrix data multiplication device of the present invention, when the constant data in the same constant storage memory are multiplied, the input / output relationship is the multiplication of the constant matrix and its transposed matrix. Since a multiplication device is built-in and they are switched by the selector to perform multiplication, constant matrix multiplication and its transposed matrix multiplication can be performed in the same circuit using one type of constant memory, and constant matrix multiplication can be performed. It is possible to obtain a matrix data multiplication device in which the constant data storage memory does not increase as compared with a matrix data multiplication device which performs only one of the transposed matrices, although it can perform both of its transposed matrices.

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

【図1】本発明の行列データ乗算装置である。FIG. 1 is a matrix data multiplication device of the present invention.

【図2】本発明の行列データ乗算装置1および第1の従
来の行列データ乗算装置の定数行列乗算動作のタイミン
グを示す図である。
FIG. 2 is a diagram showing the timing of a constant matrix multiplication operation of the matrix data multiplication device 1 of the present invention and the first conventional matrix data multiplication device.

【図3】本発明の行列データ乗算装置および第2の従来
の行列データ乗算装置の転置定数行列乗算動作のタイミ
ングを示す図である。
FIG. 3 is a diagram showing the timing of a transposed constant matrix multiplication operation of the matrix data multiplication device of the present invention and the second conventional matrix data multiplication device.

【図4】本発明の行列データ乗算装置におけるDCT演
算のタイミングを示す図である。
FIG. 4 is a diagram showing the timing of DCT calculation in the matrix data multiplication device of the present invention.

【図5】本発明の行列データ乗算装置におけるIDCT
演算のタイミングを示す図である。
FIG. 5 is an IDCT in the matrix data multiplication device of the present invention.
It is a figure which shows the timing of calculation.

【図6】本発明の実施例の行列データ乗算装置における
メモリ構成とメモリ制御信号のタイミングを示す図であ
る。
FIG. 6 is a diagram showing a memory configuration and a timing of a memory control signal in the matrix data multiplication device of the embodiment of the present invention.

【図7】第1の従来の行列データ乗算装置の構成図であ
る。
FIG. 7 is a configuration diagram of a first conventional matrix data multiplication device.

【図8】第2の従来の行列データ乗算装置の動作タイミ
ングを示す図である。
FIG. 8 is a diagram showing operation timing of a second conventional matrix data multiplication device.

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

1・・・本発明の実施例の行列データ乗算装置 10〜13・・・ホールド回路 20〜28・・・セレクタ 30〜33・・・本発明の定数データ格納用メモリ 30a〜33d・・・メモリセル 50〜53・・・乗算回路 60〜63・・・レジスタ 70〜73・・・加算回路 80・・・パラレル/シリアル変換回路 81・・・出力バッファ 90・・・行列演算制御回路 91・・・セレクタ制御用信号 92・・・初期化用制御信号 93・・・メモリ制御信号 93a〜93d・・・メモリセル制御信号 94・・・ホールド制御信号 94a〜94d・・・各ホールド回路へのホールド制御
信号 95・・・出力制御信号 96・・・外部入力 100・・・動作サイクル信号 110〜113・・・単位演算回路 120・・・出力回路
DESCRIPTION OF SYMBOLS 1 ... Matrix data multiplication device of the Example of this invention 10-13 ... Hold circuit 20-28 ... Selector 30-33 ... Constant data storage memory 30a-33d ... Memory of this invention Cell 50-53 ... Multiplier circuit 60-63 ... Register 70-73 ... Adder circuit 80 ... Parallel / serial conversion circuit 81 ... Output buffer 90 ... Matrix operation control circuit 91 ... Selector control signal 92 ... Initialization control signal 93 ... Memory control signal 93a to 93d ... Memory cell control signal 94 ... Hold control signal 94a to 94d ... Hold to each hold circuit Control signal 95 ... Output control signal 96 ... External input 100 ... Operation cycle signal 110-113 ... Unit arithmetic circuit 120 ... Output circuit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】対応する次数の入力データをその次数分だ
け保持し、順次出力するデータ保持回路と、 選択信号に応じて上記入力データ、または上記データ保
持回路からの保持データを選択的に出力するセレクタ回
路と、 定数行列の次数分だけ対応する次数の係数を保持してい
る係数保持回路と、 上記セレクタ回路からの出力と、上記係数保持回路から
の係数を乗算する乗算回路と、 上記選択信号に応じて、前段のデータ、または自己の累
加算結果と上記乗算回路の乗算結果との累加算を行う累
加算回路からなる単位演算回路が次数分並列に設けら
れ、前段の累加算結果が次段累加算回路の入力のひとつ
として接続される行列データ乗算装置。
1. A data holding circuit that holds input data of a corresponding order by the order and outputs the data sequentially, and selectively outputs the input data or the held data from the data holding circuit according to a selection signal. Selector circuit, a coefficient holding circuit that holds a coefficient of an order corresponding to the order of the constant matrix, a multiplication circuit that multiplies the output from the selector circuit by the coefficient from the coefficient holding circuit, and the selection Depending on the signal, a unit arithmetic circuit including a cumulative addition circuit that performs cumulative addition of the previous stage data or the self cumulative result and the multiplication result of the above multiplying circuit is provided in parallel for the order, and the previous stage cumulative addition result is A matrix data multiplication device connected as one of the inputs of the next-stage cumulative addition circuit.
【請求項2】対応する次数の入力データをその次数分だ
け保持し、順次出力するデータ保持回路と、 選択信号に応じて上記入力データ、または上記データ保
持回路からの保持データを選択的に出力するセレクタ回
路と、 定数行列の次数分だけ対応する次数の離散余弦変換およ
び逆離散余弦変換に使用する係数を保持している係数保
持回路と、 上記セレクタ回路からの出力と、上記係数保持回路から
の係数を乗算する乗算回路と、 上記選択信号に応じて、前段のデータ、または自己の累
加算結果と上記乗算回路の乗算結果との累加算を行う累
加算回路からなる単位演算回路が次数分並列に設けら
れ、前段の累加算結果が次段累加算回路の入力のひとつ
として接続される離散余弦変換および逆離散余弦変換演
算装置。
2. A data holding circuit that holds input data of a corresponding order by the order and outputs the data sequentially, and selectively outputs the input data or the held data from the data holding circuit according to a selection signal. Selector circuit, a coefficient holding circuit that holds the coefficients used for the discrete cosine transform and the inverse discrete cosine transform of the order corresponding to the order of the constant matrix, the output from the selector circuit, and the coefficient holding circuit A unit arithmetic circuit consisting of a multiplication circuit for multiplying the coefficient of and a cumulative addition circuit for performing the cumulative addition of the preceding stage data or its own cumulative addition result and the multiplication result of the multiplication circuit according to the selection signal A discrete cosine transform and inverse discrete cosine transform calculation device that is provided in parallel and that the result of the cumulative addition of the preceding stage is connected as one of the inputs of the cumulative addition circuit of the next stage.
【請求項3】対応する次数の入力データをその次数分だ
け保持し、順次出力し、 選択信号に応じて上記入力データと、または上記保持さ
れ、順次出力されたデータを選択的に出力し、 定数行列の次数分だけ対応する次数の係数を保持し、 上記入力データと、または上記保持され、順次出力され
たデータと、上記係数を乗算し、 上記選択信号に応じて、前段のデータ、または自己の累
加算結果と上記乗算結果との累加算を行い、これらの単
位演算を次数分並列に行い、前段の累加算結果が次段累
加算の入力のひとつとなる行列データ乗算方法。
3. The input data of a corresponding order is held by that order and sequentially output, and the input data or the held and sequentially output data is selectively output according to a selection signal, The coefficient of the order corresponding to the order of the constant matrix is held, the input data is multiplied, or the held and sequentially output data is multiplied by the coefficient, and the data of the preceding stage, or A matrix data multiplication method in which the cumulative addition result of the self and the above multiplication result are cumulatively performed, these unit operations are performed in parallel for the degree, and the cumulative addition result of the preceding stage is one of the inputs of the cumulative addition of the next stage.
【請求項4】対応する次数の入力データをその次数分だ
け保持し、順次出力し、 選択信号に応じて上記入力データと、または上記保持さ
れ、順次出力されたデータを選択的に出力し、 定数行列の次数分だけ対応する次数の離散余弦変換およ
び逆離散余弦変換に使用する係数を保持し、 上記入力データと、または上記保持され、順次出力され
たデータと、上記係数を乗算し、 上記選択信号に応じて、前段のデータ、または自己の累
加算結果と上記乗算結果との累加算を行い、これらの単
位演算を次数分並列に行い、前段の累加算結果が次段累
加算の入力のひとつとなる離散余弦変換および逆離散余
弦変換演算方法。
4. An input data of a corresponding order is held for that order and sequentially output, and the input data or the held and sequentially output data is selectively output according to a selection signal, The coefficient used for the discrete cosine transform and the inverse discrete cosine transform corresponding to the order of the constant matrix is held, and the input data or the held and sequentially output data is multiplied by the coefficient, Depending on the selection signal, the previous stage data or its own cumulative addition result and the above multiplication result are cumulatively added, these unit operations are performed in parallel for the degree, and the previous stage cumulative addition result is input to the next stage cumulative addition. Discrete Cosine Transform and Inverse Discrete Cosine Transform calculation method.
JP18047592A 1992-06-15 1992-06-15 Device and method for matrix data multiplication Pending JPH05346935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18047592A JPH05346935A (en) 1992-06-15 1992-06-15 Device and method for matrix data multiplication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18047592A JPH05346935A (en) 1992-06-15 1992-06-15 Device and method for matrix data multiplication

Publications (1)

Publication Number Publication Date
JPH05346935A true JPH05346935A (en) 1993-12-27

Family

ID=16083873

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18047592A Pending JPH05346935A (en) 1992-06-15 1992-06-15 Device and method for matrix data multiplication

Country Status (1)

Country Link
JP (1) JPH05346935A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009535721A (en) * 2006-04-28 2009-10-01 クゥアルコム・インコーポレイテッド General array processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009535721A (en) * 2006-04-28 2009-10-01 クゥアルコム・インコーポレイテッド General array processing
US8250337B2 (en) 2006-04-28 2012-08-21 Qualcomm Incorporated Array processor with two parallel processing paths of multipliers and ALUs with idle operation capability controlled by portions of opcode including indication of valid output

Similar Documents

Publication Publication Date Title
CN110383237B (en) Reconfigurable matrix multiplier system and method
JP4307987B2 (en) Reconfigurable digital filter with multiple filtering modes
US20220261220A1 (en) Calculating a Floating-Point Function using Multiple Lookup Tables
US5669010A (en) Cascaded two-stage computational SIMD engine having multi-port memory and multiple arithmetic units
Ebeling et al. Mapping applications to the RaPiD configurable architecture
US7340562B2 (en) Cache for instruction set architecture
US7529139B2 (en) N-port memory circuits allowing M memory addresses to be accessed concurrently and signal processing methods thereof
US5331585A (en) Orthogonal transformation processor for compressing information
US20130212353A1 (en) System for implementing vector look-up table operations in a SIMD processor
JP2007503039A (en) Parallel processing array
JPH11203272A (en) Device, system and method for east fourier transformation processing
KR20090127462A (en) Fast fourier transform/inverse fast fourier transform operating core
US20010039557A1 (en) Digital signal processor
WO2021102000A1 (en) Look-up table with input offsetting
WO2020197699A1 (en) Multiplier-accumulator circuitry having processing pipelines and methods of operating same
GB2352309A (en) A system for performing modular multiplication
JPH04503720A (en) Flexible control device and method for digital signal processing device
WO2004088500A1 (en) Programmable logic device
JPH05346935A (en) Device and method for matrix data multiplication
US11443014B1 (en) Sparse matrix multiplier in hardware and a reconfigurable data processor including same
US5359549A (en) Orthogonal transformation processor for compressing information
KR100235537B1 (en) Variable tap of digital filter and multiplier circuit thereof
JP4248027B2 (en) Device for converting a sequence of data elements
Kwan et al. Implementation of DSP-RAM: an architecture for parallel digital signal processing in memory
JPH0298777A (en) Parallel sum of product arithmetic circuit and vector matrix product arithmetic method