RU2024933C1 - Device for multiplying three matrices - Google Patents
Device for multiplying three matrices Download PDFInfo
- Publication number
- RU2024933C1 RU2024933C1 SU4888518A RU2024933C1 RU 2024933 C1 RU2024933 C1 RU 2024933C1 SU 4888518 A SU4888518 A SU 4888518A RU 2024933 C1 RU2024933 C1 RU 2024933C1
- Authority
- RU
- Russia
- Prior art keywords
- output
- input
- elements
- computing module
- information
- Prior art date
Links
Images
Landscapes
- Complex Calculations (AREA)
Abstract
Description
Изобретение относится к вычислительной технике и может быть использовано в высокопроизводительных специализированных вычислительных машинах и устройствах обработки сигналов для перемножения трех матриц. The invention relates to computer technology and can be used in high-performance specialized computing machines and signal processing devices for multiplying three matrices.
Известно устройство для перемножения трех матриц FIxP x CPxQ x DQxJ, содержащее Р вычислительных модулей первого типа и Р вычислительных модулей второго типа, причем каждый вычислительный модуль первого типа содержит три регистра, два триггера, умножитель, сумматор, две группы элементов И, две группы элементов ИЛИ, элемент И и узел задержки, а каждый вычислительный модуль второго типа содержит три регистра, два триггера, умножитель, сумматор, шесть групп элементов И, три группы элементов ИЛИ и узел задержки.A device for multiplying three matrices F IxP x C PxQ x D QxJ containing P computing modules of the first type and P computing modules of the second type, each computing module of the first type contains three registers, two triggers, a multiplier, an adder, two groups of elements And, two groups of OR elements, an AND element, and a delay node, and each computing module of the second type contains three registers, two triggers, a multiplier, an adder, six groups of AND elements, three groups of OR elements, and a delay node.
Недостатком этого устройства является большой объем оборудования. The disadvantage of this device is the large amount of equipment.
К наиболее близким по технической сущности к предлагаемому изобретению относится устройство для перемножения трех матриц FIxP x CPxQ x DQxJ, содержащее I + J + P + Q - 2 вычислительных модулей, причем каждый вычислительный модуль содержит четыре регистра, два узла задержки, три триггера, умножитель, сумматор, восемь групп элементов И, четыре группы элементов ИЛИ, два элемента И и два элемента НЕ.The closest in technical essence to the present invention relates to a device for multiplying three matrices F IxP x C PxQ x D QxJ , containing I + J + P + Q - 2 computing modules, and each computing module contains four registers, two delay nodes, three trigger, multiplier, adder, eight groups of AND elements, four groups of OR elements, two AND elements and two NOT elements.
Недостатком такого устройства является большой объем оборудования (содержит I + J + P + Q - 2 вычислительных модулей). The disadvantage of this device is the large amount of equipment (contains I + J + P + Q - 2 computing modules).
Цель изобретения - сокращение объема оборудования устройства. The purpose of the invention is to reduce the volume of equipment of the device.
Цель достигается тем, что устройство для перемножения трех матриц AIxP, XPxQ, DQxJ, где I, J, P и Q - размерности матриц (фиг.1), содержит m(2≅ m ≅ J) вычислительных модулей 5, P(Q+I)-2m параллельных n-разрядных регистров 6(n-разрядность чисел), P(Q + I) - 2m параллельных трехразрядных регистров 7, две группы элементов ИЛИ 8 и 9, причем первый информационный вход 1 устройства подключен к первому информационному входу вычислительного модуля 51, второй информационный вход 2 и настроечный вход 3 устройства подключены соответственно к первым входам групп элементов ИЛИ 8 и 9, выходы которых подключены соответственно ко второму информационному входу и настроечному входу вычислительного модуля 51, первый и второй информационные выходы, настроечный выход 5i-го вычислительного модуля (i = ) подключены соответственно к первому и второму информационному входу, настроечному входу 5(i + 1)-го вычислительного модуля, первый информационный выход 5m-го вычислительного модуля является выходом 10 устройства, второй информационный выход 5m-го вычислительного модуля подключен к информационному входу параллельного n-разрядного регистра 61, выход 6i-го регистра (i = ) подключен к информационному входу 6(i+ 1)-го регистра, выход 6(P(Q + I) - 2m-го регистра подключен ко второму входу группы элементов ИЛИ 8, настроечный выход 5m-го вычислительного модуля подключен к информационному входу трехразрядного параллельного регистра 71, выход 7i-го регистра (i = ) подключен к информационному входу 7(i+1)-го регистра, выход 7(P(Q + I) - 2m)-го регистра подключен ко второму входу группы элементов ИЛИ 9, синхровход устройства подключен к синхровходам всех вычислительных модулей 5iрегистров 6i, 7i.
На фиг. 1 представлена структурная схема устройства для перемножения трех матриц; на фиг.2 - структурная схема устройства для I = 2, J = 4, P = 3, Q = 3 и m=2; на фиг.3 - схема вычислительного модуля 5; на фиг.4 - временная диаграмма работы вычислительного модуля в пределах одного такта.The goal is achieved in that the device for multiplying the three matrices A IxP , X PxQ , D QxJ , where I, J, P and Q are the dimensions of the matrices (Fig. 1), contains m (2≅ m ≅ J)
In FIG. 1 is a structural diagram of a device for multiplying three matrices; figure 2 is a structural diagram of a device for I = 2, J = 4, P = 3, Q = 3 and m = 2; figure 3 - diagram of the
Устройство для перемножения трех матриц (фиг.1) содержит первый 1 и второй 2 информационные входы, настроечный вход 3, синхровход 4, вычислительные модули 5i, n-разрядные параллельные регистры 6iтрехразрядные параллельные регистры 7i, группы элементов ИЛИ 8, 9 и выход 10.A device for multiplying three matrices (figure 1) contains the first 1 and second 2 information inputs,
Вычислительный модуль 5 (фиг.3) содержит первый 11 и второй 12 информационные входы, настроечный вход 13, регистры 14-18, умножитель 19, сумматор 20, триггеры 21-33, группы элементов И 34-46, группы элементов ИЛИ 47-51, элементы И 52-59, элементы НЕ 60-62, первый 63 и второй 64 информационные выходы, настроечный выход 65 и синхровход 66. Computing module 5 (figure 3) contains the first 11 and second 12 information inputs,
В основу работы устройства для перемножения матриц A = {aip} , X {xpq} , D = {dqj} i= , j = , = , q = положен следующий алгоритм
B= {bpj} = X·D, bpj= xpq· dqj
Y= { yij} = A·B, yij= aip· dpj который представляется рекуррентными соотношениями:
P = , j = , q = :
b(p,j,0) = xpodoj, b(p,j,q) = b(p,j,q-1) + xpq· dqj ,
bpj= b(p,j,Q-1);
i = , j = , p = :
y(i,j,0) = aio· boj, y(i,j,p) = y(i,j,p-1)+ aip·bpj ,
yij = y(i,j, P-1).The basis of the operation of the device for matrix multiplication A = {a ip }, X {x pq }, D = {d qj } i = , j = , = , q = put the following algorithm
B = {b pj } = X · D, b pj = x pq d qj
Y = {y ij } = A · B, y ij = a ip · d pj which is represented by recurrence relations:
P = , j = , q = :
b (p, j, 0) = x po d oj , b (p, j, q) = b (p, j, q-1) + x pq d qj ,
b pj = b (p, j, Q-1);
i = , j = , p = :
y (i, j, 0) = a io b oj , y (i, j, p) = y (i, j, p-1) + a ip b b pj ,
y ij = y (i, j, P-1).
Число m выбирается фиксированным, m =
Предполагается, что число Jm = J/m - целое. Если Jm не целое, то J выбирается таким, чтобы J/m , где - ближайшее сверху целое. При этом матрица D дополняется нулевыми столбцами.The number m is chosen fixed, m =
It is assumed that the number J m = J / m is an integer. If J m is not an integer, then J is chosen so that J / m where - the closest whole one from above. Moreover, the matrix D is supplemented by zero columns.
Вычислительный модуль 5 работает в семи режимах (фиг.3), которые задаются значениями управляющих сигналов α , β и γ , подаваемыми соответственно на настроечные входы 131, 132 и 133.
Во всех режимах работы значение b, подаваемое на вход 12, выдается на выход 64 с задержкой на два такта. Управляющие сигналы α , β и γ выдаются соответственно на выходы 651, 652 и 653 с задержкой на два такта. Информация, записанная в регистр 18i-й ((i = )), на очередном такте переписывается в 18i+1-й регистр. Управляющий сигнал δi tобеспечивает запись информации в регистр на t-м такте, а управляющий сигнал μi t - на (t + 1)-м такте.In all operating modes, the value of b supplied to
В первом режиме работы подаются управляющие сигналы (α , β , γ )= (0, 1, 1). При этом формируются сигналы δ1 = 1 и μ1 = 1. Сигнал δ1открывает группу элементов И 40 и элемент 59. Элемент а, подаваемый на вход 11, через группы элементов И 40 и ИЛИ 49 подается на информационный вход регистра 17. Элемент записывается в регистр 17 по заднему фронту тактового импульса, проходящего через элемент И 59 на синхровход регистра 17. На первом такте сигнал μ1 открывает группу элементов И 35, элемент а с выхода регистра 14 через группы элементов И 35 и ИЛИ 48 подается на первый вход умножителя 19, на его второй вход подается элемент b (с выхода регистра 15), на выходе умножителя 19 формируется значение а˙ b. Временная диаграмма работы в пределах одного такта приведена на фиг.4.In the first operation mode, control signals (α, β, γ) = (0, 1, 1) are given. In this case, the signals δ 1 = 1 and μ 1 = 1 are formed. The signal δ 1 opens the group of elements AND 40 and
Во втором режиме работы (α , β , γ ) = =(0,0,1) формируется сигнал μ2= 1. Сигнал δ2 открывает группы элементов И 34 и 38. Значение а с выхода регистра 14 через группы элементов И 34 и ИЛИ 47 подается на выход 63. Содержимое регистра 17 через группы элементов И 38 и ИЛИ 48 подается на первый вход умножителя 19, на второй вход которого подается значение b с выхода регистра 15. На выходе умножителя 19 формируется значение <Рег.17> х b.In the second operating mode (α, β, γ) = = (0,0,1), the signal μ 2 = 1 is generated. The signal δ 2 opens the groups of elements And 34 and 38. The value of a from the output of the
В третьем режиме работы (α , β , γ ) = =(0,1,0). Формируются сигналы δ3 = 1 и μ3= =1. По сигналу δ3 в регистр 17 записывается элемент а. Сигнал μ3 открывает группы элементов И 35 и 46. На выходе умножителя 19 формируется значение а. b, на выходе сумматора 20 - значение <Рег.18р >+ a .b.In the third mode of operation (α, β, γ) = = (0,1,0). The signals δ 3 = 1 and μ 3 = = 1 are formed. The signal δ 3 in the
В четвертом режиме работы (α , β , γ ) = =(0,0,0). Формируется сигнал μ4 = 1. Сигнал μ4 открывает группы элементов И 34, 38 и 46. Значение а с выхода регистра 14 через группы элементов И 34 и ИЛИ 47 подается на выход 63. На выходе умножителя 19 формируется значение <Рег.17> x b, на выходе сумматора 20 - значение <Рег.8р> + <Рег.17 > .b.In the fourth mode of operation (α, β, γ) = = (0,0,0). The signal μ 4 = 1 is generated. The signal μ 4 opens the groups of elements And 34, 38 and 46. The value of a from the output of the
В пятом режиме работы (α , β , γ ) = =(1,0,1). Формируются сигналы δ5 = 1 и μ5 = =1. Сигнал δ5 открывает группу элементов И 45. Содержимое регистра 18р через группы элементов И 45 и ИЛИ 50 записывается в регистр 181. Сигнал μ5 открывает группы элементов И 34, 41 и элемент И 59. Значение а с выхода регистра 14 подается на выход 63. На выходе умножителя 19 формируется значение <181>. b, которое подается через группу элементов И 41 и ИЛИ 49 на информационный вход регистра 17 для записи на следующем такте.In the fifth operating mode (α, β, γ) = = (1,0,1). The signals δ 5 = 1 and μ 5 = = 1 are formed. The signal δ 5 opens the group of elements AND 45. The contents of the register 18r through the group of elements AND 45 and OR 50 is recorded in the
В шестом режиме работы (α , β , γ) = =(1,0,0). Формируются сигналы δ6 = 1 и μ6 =1. Сигнал δ6 открывает группу элементов И 45. В регистр 181 записывается содержимое регистра 18р. Сигнал μ6 открывает группы элементов И 34, 37, 39, 44 и элемент И 59. На выход 63 подается значение а. На выходе сумматора 20 формируется значение< Рег.17 >+ <Рег.181> . b, которое через группы элементов И 39 и ИЛИ 49 подается на информационный вход регистра 17 для записи на следующем такте.In the sixth mode of operation (α, β, γ) = = (1,0,0). Signals δ 6 = 1 and μ 6 = 1 are generated. The signal δ 6 opens the group of elements AND 45. The contents of the
В седьмом режиме (α , β , γ) = (1,1,0). Формируются сигналы δ7=1 и μ7 = 1. Сигнал δ7 открывает группу элементов И 45 и в регистр 181 записывается содержимое регистра 18р. Сигнал μ7 открывает группы элементов И 36, 37, 39, 44 и элемент И 59. Содержимое регистра 17 через группы элементов И 36 и ИЛИ 47 подается на выход 63. На выходе сумматора 20 формируется значение <Рег. 17 >+ <Рег.181> . b, которое подается через группы элементов И 39 и ИЛИ 49 на информационный вход регистра 17 для записи на следующем такте.In the seventh mode (α, β, γ) = (1,1,0). The signals δ 7 = 1 and μ 7 = 1 are generated. The signal δ 7 opens the group of elements AND 45 and the contents of
Рассмотрим работу устройства (фиг.1)
Управляющие сигналы τig = (α , β , γ ) , i = , j= представляются в виде матрицы
и подаются на вход 3 в моменты времени
t= i P +j.Consider the operation of the device (figure 1)
Control signals τ ig = (α, β, γ), i = , j = are presented in the form of a matrix
and served on
t = i P + j.
На вход 1 подаются элементы dqj в моменты времени
t= (l-1) P (Q+I)+ ρ ++Pq, где j = ρ + (l-1)m, ρ = , l = .
t = (l-1) P (Q + I) + ρ ++ Pq, where j = ρ + (l-1) m, ρ = , l = .
На вход 2 подаются элементы xpq, aip в моменты времени
t= p + Pq , t= p+ P(Q+I-i-1).At
t = p + Pq, t = p + P (Q + Ii-1).
На выходе 10 формируются элементы yi , ρ + (l -1 ) m в моменты времени t = yi,p+(l-1)m = =lP(Q + I) + m + ρ - P. i - 2.At the
На фиг. 2 приведена структура устройства с входным и выходным потоками данных для I = 2, J = 4, P = 3, Q = 3 и m = 2. Значения на входах и выходах состояния регистров вычислительных модулей 51 (табл. 1) и 52 (табл.2), состояния регистров 7 и 8 приведены в таблице, которая является временной диаграммой работы устройства.In FIG. Figure 2 shows the structure of the device with input and output data streams for I = 2, J = 4, P = 3, Q = 3, and m = 2. Values at the inputs and outputs of the state of the registers of computing modules 5 1 (Table 1) and 5 2 (table 2), the status of
Таким образом, предлагаемое устройство содержит меньший объем оборудования по сравнению с прототипом, т.е. предлагаемое устройство содержит m вычислительных модулей, а прототип - J вычислительных модулей (m ≅J). Thus, the proposed device contains a smaller amount of equipment compared to the prototype, i.e. the proposed device contains m computing modules, and the prototype contains J computing modules (m ≅J).
Claims (1)
u j+2 = α j ;
v j+2 = β j ;
w j+2 = γ j ;
Aj+1 =
cj =
dj-1 =
fj-2 =
ej-1 =
B j+2 = b j ;
μ1 j+1 = δ1 j = (αj, βj, γj) = (0, 1, 1);
μ2 j+1 = δ2 j = (αj, βj, γj) = (0, 0, 1);
μ3 j+1 = δ3 j = (αj, βj, γj) = (0, 1, 0);
μ4 j+1 = δ4 j = (αj, βj, γj) = (0, 0, 0);
μ5 j+1 = δ5 j = (αj, βj, γj) = (1, 0, 1);
μ6 j+1 = δ6 j = (αj, βj, γj) = (1, 0, 0);
μ7 j+1 = δ7 j = (αj, βj, γj) = (1, 1, 0),
где α j, β j, γ j - значения соответственно на первом, втором и третьем разрядах настроечного входа вычислительного модуля на j-м такте;
uj, vj, wj - значения соответственно на первом, втором и третьем разрядах настроечного выхода вычислительного модуля на j-м такте;
aj, bj - значения соответственно на первом и втором информационных входах вычислительного модуля на j-м такте;
Aj, Bj - значения соответственно на первом и втором информационных выходах вычислительного модуля на j-м такте.DEVICE FOR REPRODUCING THREE MATRICES, each 1 × P, P · Q, Q × τ, respectively, containing m (2 ≅ m ≅ τ) computing modules, the first information input of the device being connected to the first information input of the first computing module, the first and second information outputs and tuning output of the i-th computing module (i = ) are connected respectively to the first and second information inputs and the tuning input of the (i + 1) -th computing module, the first information output of the m-th computing module is the output of the device, the sync input of which is connected to the sync inputs of all computing modules, characterized in that, for the purpose of reducing the amount of equipment, two groups of OR elements, [P (Q + I) -2m] parallel n-bit registers and [P (Q + I) -2m] parallel three-bit registers (n is the number of bits) are introduced into it, and the second device information input connected to the first inputs of the OR elements of the first group, the outputs of which are connected to the second information input of the first computing module, the second information output of the m-th computing module is connected to the information input of the first parallel n-bit register, the output of the j-th parallel n-bit register (j = 1 connected to the information input of the (j + 1) -th parallel n-bit register, the outputs of the [P (Q + I) -2m] -th parallel n-bit register bits are connected to the second inputs of the OR elements of the first group, the device configuration input is connected to the first inputs of the OR elements of the second group, the outputs of which are connected to the tuning input of the first computing module, the tuning output of the m-th computing module is connected to the information input of the first parallel three-bit register, the output of the j-th parallel three-bit register it is connected to the information input of the (j + 1) th parallel three-bit register, the output of the [P (Q + I) -2m] th parallel three-bit register is connected to the second inputs of the OR elements of the second group, the device sync input is connected to the sync inputs of all the registers, each the computing module has the ability to implement functions
u j + 2 = α j ;
v j + 2 = β j ;
w j + 2 = γ j ;
A j + 1 =
c j =
d j-1 =
f j-2 =
e j-1 =
B j + 2 = b j ;
μ 1 j + 1 = δ 1 j = (α j , β j , γ j ) = (0, 1, 1);
μ 2 j + 1 = δ 2 j = (α j , β j , γ j ) = (0, 0, 1);
μ 3 j + 1 = δ 3 j = (α j , β j , γ j ) = (0, 1, 0);
μ 4 j + 1 = δ 4 j = (α j , β j , γ j ) = (0, 0, 0);
μ 5 j + 1 = δ 5 j = (α j , β j , γ j ) = (1, 0, 1);
μ 6 j + 1 = δ 6 j = (α j , β j , γ j ) = (1, 0, 0);
μ 7 j + 1 = δ 7 j = (α j , β j , γ j ) = (1, 1, 0),
where α j , β j , γ j - values, respectively, at the first, second and third digits of the tuning input of the computing module on the j-th clock;
u j , v j , w j - values, respectively, at the first, second and third bits of the tuning output of the computing module on the j-th clock;
a j , b j - values, respectively, at the first and second information inputs of the computing module on the j-th clock;
A j , B j - values, respectively, at the first and second information outputs of the computing module on the j-th clock.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU4888518 RU2024933C1 (en) | 1990-12-04 | 1990-12-04 | Device for multiplying three matrices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU4888518 RU2024933C1 (en) | 1990-12-04 | 1990-12-04 | Device for multiplying three matrices |
Publications (1)
Publication Number | Publication Date |
---|---|
RU2024933C1 true RU2024933C1 (en) | 1994-12-15 |
Family
ID=21548627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU4888518 RU2024933C1 (en) | 1990-12-04 | 1990-12-04 | Device for multiplying three matrices |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2024933C1 (en) |
-
1990
- 1990-12-04 RU SU4888518 patent/RU2024933C1/en active
Non-Patent Citations (2)
Title |
---|
Авторское свидетельство СССР N 1832989, кл. G 06F 15/347,1989. * |
Авторское свидетельство СССР N 1832990, кл. G 06F 15/347, 1989. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2024933C1 (en) | Device for multiplying three matrices | |
SU1716536A1 (en) | Device for multiplying matrices | |
RU2011221C1 (en) | Device for multiplying matrixes | |
RU2037199C1 (en) | Device for inverting n x n matrices | |
RU2037197C1 (en) | Device for solving systems of linear algebraic equations | |
RU1774347C (en) | Matrix multiplier | |
RU2012048C1 (en) | Device for computation of two-dimensional discrete fourier transform | |
SU1322269A1 (en) | Device for extracting root of sum of squares of three numbers | |
SU1034188A1 (en) | Versions of threshold element | |
RU2163391C1 (en) | Method and device for digital processing of signals | |
RU1777155C (en) | Device for lv-resolution of matrixes | |
RU2116667C1 (en) | Device which solves systems of linear algebraic equations | |
RU2012050C1 (en) | Device for computation of eigenvalues of (n x n) matrix | |
RU2012049C1 (en) | Device for solution of system of linear algebraic equations | |
RU2022339C1 (en) | Multiplier | |
SU1191917A1 (en) | Device for calculating values of functions of two arguments | |
SU1444817A1 (en) | Device for computing walsh coefficients | |
RU2051411C1 (en) | Device for solving three-dimensional problems in mathematical physics | |
SU888132A1 (en) | Conveyer device for computing elementary functions | |
SU1062693A1 (en) | Device for calculating values of function y equal to l in the power of x | |
SU1072042A1 (en) | Device for extracting cube root | |
SU1134947A1 (en) | Device for calculating values of polynominal m-th order | |
RU1807499C (en) | Matrix multiplier | |
RU2024932C1 (en) | Device for multiplying three matrices | |
RU1839262C (en) | Device for multiplication of matrices |