RU1793446C - Device for matrix multiplication - Google Patents
Device for matrix multiplicationInfo
- Publication number
- RU1793446C RU1793446C SU904819892A SU4819892A RU1793446C RU 1793446 C RU1793446 C RU 1793446C SU 904819892 A SU904819892 A SU 904819892A SU 4819892 A SU4819892 A SU 4819892A RU 1793446 C RU1793446 C RU 1793446C
- Authority
- RU
- Russia
- Prior art keywords
- input
- output
- computing module
- information
- elements
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к вычислительной технике и может быть использовано в специализированных вычислительных машинах и устройствах обработки сигналов дл умножени (пхп)-матрицы на вектор. Цель изобретени - сокращение аппаратурных затрат. Цель достигаетс тем, что устройство содержит m вычислительных модулей первого типа и вычислительный модуль второго типа, причем вычислительный модуль первого типа содерхшт п ть регистров , умножитель, сумматор, триггер и элемент И, а вычислительный модуль второго типа содержит п+1 регистров, сумматор, триггер и группу элементов И, Умножение (пхп)-матрицы на вектор осуществл етс с помощью фиксированного числа m вычислительных модулей (т п). 2 ил. 1 табл.The invention relates to computer technology and can be used in specialized computing machines and signal processing devices for multiplying a (PCP) matrix by a vector. The purpose of the invention is to reduce hardware costs. The goal is achieved in that the device contains m computing modules of the first type and a computing module of the second type, wherein the computing module of the first type contains five registers, the multiplier, adder, trigger and element And, and the computing module of the second type contains n + 1 registers, the adder, a trigger and a group of AND elements. Multiplication of a (php) matrix by a vector is carried out using a fixed number m of computational modules (t n). 2 ill. 1 tab.
Description
Изобретение относитс к вычислительной технике и может быть использовано в специализированных вычислительных машинах и устройствах обработки сигналов.The invention relates to computer technology and can be used in specialized computers and signal processing devices.
Известно устройство дл умножени (пхп)-матриц, содержащее Зп-2 (п - размерность перемножаемых матриц) вычислительных модулей, причем каждый вычислительный модуль содержит четыре регистра, умножитель, сумматор и узел задержки на п+1 тактов.A device for multiplying (PCR) -matrices is known, containing Zn-2 (n is the dimension of the multiplied matrices) of the computing modules, each computing module containing four registers, a multiplier, an adder, and a delay unit of n + 1 clock cycles.
Недостатками этого устройства вл ютс большой объем оборудовани (Зп-2 вычислительных модул ) и низкое быстродействие (врем перемножени двух матриц равно Зп+4п-4 тактов).The disadvantages of this device are the large amount of equipment (Zn-2 computing modules) and low speed (the time of multiplication of two matrices is equal to Zn + 4n-4 clock cycles).
Наиболее близким по технической сущности к изобретению вл етс устройство дл умножени пхп матриц, содержащее 2п- 1 вычислительных модулей, причем каждый вычислительный модуль содержит три регистра , узел задержки на п тактов, умножитель , сумматор, триггер и группу элементов И.Closest to the technical nature of the invention is a device for multiplying PCR matrices containing 2n-1 computational modules, each computational module containing three registers, a delay node by p clocks, a multiplier, an adder, a trigger and a group of elements I.
Недостатком такого устройства вл етс большой объем оборудовани за счет большого числа вычислительных модулей - 2п-1, а также большого числа выходов - (2п- 1), m-разр дных выходов, где т - разр дность элементов матриц.The disadvantage of this device is the large amount of equipment due to the large number of computing modules - 2n-1, as well as a large number of outputs - (2n-1), m-bit outputs, where m is the bit depth of the matrix elements.
Цель изобретени - сокращение объема оборудовани устройства.The purpose of the invention is to reduce the scope of equipment of the device.
Цель достигаетс тем, что-устройство дл умножени матриц AIXQ x BQXJ содержит Q вычислительных модулей 7, причем первый 1, второй 2 и третий 3 информационные входы, первый 4 и второй 5 настроечные входы устройства подключены соответственно к первому, второму, третьему информационным входам, к первому и второму настроечным входам первого вычислительного модул 7i, первый, второй и третий информационные выходы, первый и второйThe goal is achieved by the fact that the device for matrix multiplication AIXQ x BQXJ contains Q computing modules 7, the first 1, second 2 and third 3 information inputs, the first 4 and second 5 tuning inputs of the device connected to the first, second, third information inputs, to the first and second training inputs of the first computing module 7i, the first, second and third information outputs, the first and second
ю ыyou
оabout
настроечные выходы 7i-ro вычислительного модул (i 1, Q-1 j подключены соответственно к первому, второму и третьему информационным входам, к первому и второму настроечным входам 7(i+i)-ro вычислительного модул вл етс выходом 8 устройства, синхровход которого подключен к синхров- ходам всех вычислительных модулей 7. Каждый вычислительный модуль 7 выполнен с возможностью реализации функцийthe tuning outputs 7i-ro of the computing module (i 1, Q-1 j are connected respectively to the first, second and third information inputs, to the first and second tuning inputs 7 (i + i) -ro of the computing module is the output 8 of the device whose sync input connected to the clocks of all computing modules 7. Each computing module 7 is configured to implement functions
авых аьх avih ah
. l+d+2 к. i Ьвых- Dbx. l + d + 2 K. i bout - Dbx
- I+2 r I , вых v-bx +- I + 2 r I, out v-bx +
ТУ;2 Т1TU; 2 T1
Т2в1;2 т2еT2v1; 2 t2e
аьх1 Ььх1 если (Г1вх,г2вх) (1.1): -Ььх еслиbx1 bx1 if (G1bx, r2bx) (1.1): -bx if
(Г1вх,Г2вх(0,1);(Г1вх, Г2вх (0,1);
аьх Ььх , еслиbx bx if
(Т1вх,Т2вх)(1,0);(T1in, T2in) (1.0);
Ььх . если Bx. if
(Т1вх,Т2вх) (0,0)(T1vh, T2vh) (0,0)
1вх1in
где аьх bbx1, Сьх1 - соответственно значени на первом, втором, третьем информационных входах вычислительного модул на 1-м :такте;where abx bbx1, Cx1 are the values on the first, second, third information inputs of the computing module on the 1st: clock;
тАвх и - соответственно значени на первом и втором настроечных входах вычислительного модул на i-м такте;tAvh and - respectively, the values at the first and second tuning inputs of the computing module on the i-th clock;
авых , Ьвых1, Свых - соответственно значени на первом, втором, третьем информационных выходах вычислительного модул на i-м такте;avy, bvy1, svy - respectively the values on the first, second, third information outputs of the computing module on the i-th clock;
мвх TZBX соответственно значени на первом и втором настроечных выходах вычислительного модул на 1-м такте;mvh TZBX, respectively, values at the first and second training outputs of the computing module on the 1st cycle;
Р параметр, определ емый алгоритмом (р б, D-1);P parameter determined by the algorithm (p b, D-1);
D max {J, Q} - параметр, определ е- мый размерностью матриц.D max {J, Q} is the parameter determined by the dimension of the matrices.
На фиг. 1 показана структурна схема устройства дл умножени матриц; на фиг. 2 - пример вычислительного модул .In FIG. 1 shows a block diagram of a device for matrix multiplication; in FIG. 2 is an example of a computing module.
Устройство дл умножени матриц (фиг. 1) содержит первый 1, второй 2 и третий 3 информационные входы, первый 4 и второй 5 настроечные входы, синухровход 6, вычислительные модули 7i (i 1, Q) и выход 8.The device for matrix multiplication (Fig. 1) contains the first 1, second 2 and third 3 information inputs, the first 4 and second 5 tuning inputs, sinus input 6, computational modules 7i (i 1, Q) and output 8.
Вычислительный модуль 7 (фиг, 2) содержит первый 9, второй 10 и третий 11 информационные входы, первый 12 и второй 13 настроечные входы, синхровход 14, умножитель 15, сумматор 16, регист р ы 17, 18, 19. 20, 21i (i Г D) и 22i (I - 1, D+2), триггеры 23, 24, 25 и 26, группы элементов И 27, 28 и 29, группу элементов ИЛИ 30, элемент НЕ 31, первый 32, второй 33 и тре0Computing module 7 (FIG. 2) contains the first 9, second 10 and third 11 information inputs, the first 12 and second 13 tuning inputs, clock input 14, multiplier 15, adder 16, registers 17, 18, 19. 20, 21i ( i D) and 22i (I - 1, D + 2), triggers 23, 24, 25 and 26, element groups AND 27, 28 and 29, element group OR 30, element HE 31, first 32, second 33 and tre0
55
00
55
00
55
00
55
00
55
тий 34 информационные выходы, первый 35 и второй 36 настроечные выходы.tiy 34 information outputs, the first 35 and second 36 tuning outputs.
В основу работы положен алгоритмThe basis of the work is an algorithm
Ci/o) 0,1 1, ,J 1, J; Cij ) + aik bkj, l 1,l,J 1,J,k 1,Q:. Ci / o) 0.1 1,, J 1, J; Cij) + aik bkj, l 1, l, J 1, J, k 1, Q :.
Ci/Q)Cij, I 1,I,J 1,J.Ci / Q) Cij, I 1, I, J 1, J.
Вычислительный модуль 7 работает в четырех режимах, которые задаютс значени ми управл ющих сигналов п и Г2 , подаваемыми на настроечные входы 12 и 13 соответственно. На выходах 35 и 36 управл ющие сигналы т и Т2 выдаютс с задержкой на два такта.Computing module 7 operates in four modes, which are set by the values of the control signals n and G2 supplied to the tuning inputs 12 and 13, respectively. At outputs 35 and 36, control signals m and T2 are output with a delay of two clock cycles.
В первом режиме работы т, Т2 (1,1) на входы 9, 10 и 11 подаютс соответственно элементы С, а и Ь. При этом элемент С записываетс в регистр 17, элемент а - в- регистры 18 и 19 (группа элементов И 27 открыта при TI 1) и элемент b - в регистры 211 и 22i (группа элементов И 29 открыта при Т2 1). На выходе умножител 15 формируетс значение а-Ь, на выходе сумматора 16 - значение (С + а-Ь), которое выдаетс на выход 32 с задержкой на один такт. Элемент а выдаетс на выход 33 с задержкой на один такт, а элемент b - на выход 34 с задержкой на D+2 тактов,In the first operating mode m, T2 (1,1), elements C, a and b are respectively supplied to the inputs 9, 10 and 11. In this case, element C is recorded in register 17, element a is recorded in registers 18 and 19 (group of elements And 27 is open at TI 1) and element b is in registers 211 and 22i (group of elements And 29 is open at T2 1). At the output of the multiplier 15, the value a-b is generated, at the output of the adder 16, the value (C + a-b) is generated, which is output 32 with a delay of one clock cycle. Element a is output 33 with a delay of one clock cycle, and element b is output 34 with a delay of D + 2 clocks,
Во втором режиме работы т , Т2 (0,1) аналогичным образом подаютс элементы С, а и Ь. При этом элемент С записываетс в регистр 17. элемент а - в регистр 18, эле- мент b - в регистры 211 и 221, из регистров 21| и22|( 1, D+1) элементы записываютс в регистры 21(ц-1) и 22(1+1) соответственно. На выходе умножител 15 формируетс значение а -Ь, где элемент а был записан в регистр 19 ранее при подаче т 1, на выходе сумматора 16 формируетс значение С + а1 -Ь, которое выдаетс на выход 32 с задержкой на один такт.In the second operating mode m, T2 (0,1), elements C, a and b are similarly supplied. In this case, the element C is recorded in the register 17. The element a - in the register 18, the element b - in the registers 211 and 221, from the registers 21 | and 22 | (1, D + 1) elements are recorded in registers 21 (n-1) and 22 (1 + 1), respectively. At the output of the multiplier 15, the value a-b is generated, where the element a was recorded in register 19 earlier when m 1 was supplied, at the output of the adder 16, the value C + a1-b is generated, which is output 32 with a delay of one clock cycle.
В третьем режиме работы т, тг (1,0) аналогично подаютс элементы С, а и Ь. При этом элемент С записываетс в регистр 17, элемент а - в регистры 18 и 19 (группа элементов И 27 открыта), элемент b - в регистр . 221, элемент Ь1 (записанный в регистре 21 о) переписываетс через открытую группу элементов И 28 и группу элементов ИЛИ 30 в регистр 211, элементы из регистров 21| и 22i (, D-.1) переписываютс соответственно в регистры 21(1+1) и 22(i+i), на выходе умножител 15 формируетс значение (а -Ь ), на выходе сумматора 16 - значение С + а-Ь1, которое через регистр 20 выдаетс на выход 32.In the third mode of operation m, mr (1.0), elements C, a and b are similarly supplied. In this case, the element C is recorded in the register 17, the element a in the registers 18 and 19 (the group of elements And 27 is open), the element b in the register. 221, the element b1 (recorded in the register 21 about) is overwritten through the open group of elements AND 28 and the group of elements OR 30 into the register 211, elements from registers 21 | and 22i (, D-.1) are written respectively in registers 21 (1 + 1) and 22 (i + i), the value (a-b) is generated at the output of the multiplier 15, and the value C + a-b1 is output at the output of the adder 16 which, through register 20, is output 32.
В четвертом режиме работы л , Г2 (0,0) элементы С, а и b подаютс аналогичным образом. Элемент а1, записанный в регистре 19 при TI 1, подаетс на вход умножител 15, на второй вход которого подаетс через регистр 211 элемент b . На выходе сумматора 16 формируетс значение (С + а -Ь1). Из регистров 21) и 22i осуществл етс перезапись элементов соответственно в регистры 21(1+1) и 2(|-и).In the fourth mode of operation l, G2 (0,0), elements C, a and b are supplied in a similar manner. The element a1 recorded in the register 19 at TI 1 is supplied to the input of the multiplier 15, the second input of which is fed through the register 211 to the element b. At the output of the adder 16, a value (C + a-L1) is generated. From registers 21) and 22i, elements are rewritten into registers 21 (1 + 1) and 2 (| -i), respectively.
Организаци входного потока элементов aij, bij и Ci/° управл ющих сигналов TI и Г2 выходного потока элементов Cij за- даетс известными выражени ми.The organization of the input stream of the elements aij, bij and Ci / ° of the control signals TI and G2 of the output stream of the elements Cij is given by well-known expressions.
Элементы aik подаютс на вход 2 в моменты времени Elements aik are fed to input 2 at time points
taik D-l + k + 2 + tp. I-1,1, k 1,Q, где to (Q - 2)-D - 2, D max {J, Q}.taik D-l + k + 2 + tp. I-1,1, k 1, Q, where to (Q - 2) -D - 2, D max {J, Q}.
Элементы bkj подаютс на вход 3 в моменты времени Elements bkj are fed to input 3 at times
tbkj J - Р -k + 2 -D + 2 + to, | 1 ,J, k Ш Элементы Ci/o) D -i + J + 2 + to, I П. J 1,J.tbkj J - P -k + 2 -D + 2 + to, | 1, J, k Ш Elements Ci / o) D -i + J + 2 + to, I P.J 1, J.
Управл ющий сигнал г 1 подаетс на вход А в моменты времениThe control signal g 1 is applied to input A at time instants.
tn D-l + 3 + t0, I-2:QJ, в остальные моменты подаютс п 0. tn D-l + 3 + t0, I-2: QJ, at other times n 0 is supplied.
Управл ющий сигнал тг 1 подаетс на вход 5 в моменты времениThe control signal tg 1 is fed to input 5 at times
tra j + D + 2 + to. j Го, в остальные моменты подаютс Г2 0.tra j + D + 2 + to. j Go, at other times, G2 0 is applied.
На выходе 8 устройства формируютс элементы Cij в моменты времениAt the output 8 of the device, elements Cij are formed at times
tcij D -1 + j + 2Q + 1 + to.tcij D -1 + j + 2Q + 1 + to.
Рассмотрим работу устройства дл случа l J 2nQ 3. Состо ни триггеров 23Let us consider the operation of the device for the case l J 2nQ 3. Trigger states 23
00
55
и 25. регистров 17, 18, 29, 20, 211, 21з. 22i и 22s, значени на выходе сумматора 16 вычислительных модулей 7i, 72 и 7з и значени на выходе 8 устройства приведены в таблице . В данном случае элементы аш, bik и Ci/° подаютс в моменты времениand 25. registers 17, 18, 29, 20, 211, 21z. 22i and 22s, the values at the output of the adder 16 of the computing modules 7i, 72 and 7z and the values at the output 8 of the device are shown in the table. In this case, the elements ash, bik and Ci / ° are supplied at time points
tai k 31 + k + 3,1 1JJ, k - П;tai k 31 + k + 3.1 1JJ, k is P;
+ 9, ,3, J Q; + 9,, 3, J Q;
+ j + 3, I f2,j 0. + j + 3, I f2, j 0.
Значени результирующей матрицы формируютс в моменты времениThe values of the resulting matrix are formed at time instants.
tC|j 3i + j + 8.tC | j 3i + j + 8.
Врем вычислени последнего элемента Спп равно (I + Q-2)-D + 2Q +J- 1 тактам. В данном случае элемент С22 формируетс на 16-м такте (см, таблицу).The time to calculate the last element of Cnn is (I + Q-2) -D + 2Q + J- 1 clock cycles. In this case, element C22 is formed on the 16th clock cycle (see table).
Период ввода элементов дл умножени последующих матриц А и В равен (I + Q - 1)-D - 1 тактам.The input period for multiplying the subsequent matrices A and B is (I + Q - 1) -D - 1 clock cycles.
Таким образом, предлагаемое устройство содержит меньший объем оборудовани по сравнению с прототипом, т.е. содержит п вычислительных модулей (дл I J n), a прототип - 2п-1 вычислительных модулей (основу оборудовани вычислительных модулей составл ют умножитель и сумматор). Кроме того, предлагаемое устройство содержит меньшее число выводов (один т- разр дный выход, т - разр дность элементов матриц), а прототип - (2n-1) m- разр дных выходов, что существенно при проектировании устройства на основе сверхбольших интегральных схем.Thus, the proposed device contains a smaller amount of equipment compared to the prototype, i.e. contains n computing modules (for I J n), and the prototype contains 2n-1 computing modules (the basis of the computing module equipment is a multiplier and an adder). In addition, the proposed device contains a smaller number of outputs (one t-bit output, t is the bit depth of the matrix elements), and the prototype contains (2n-1) m-bit outputs, which is essential when designing a device based on ultra-large integrated circuits.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU904819892A RU1793446C (en) | 1990-04-28 | 1990-04-28 | Device for matrix multiplication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU904819892A RU1793446C (en) | 1990-04-28 | 1990-04-28 | Device for matrix multiplication |
Publications (1)
Publication Number | Publication Date |
---|---|
RU1793446C true RU1793446C (en) | 1993-02-07 |
Family
ID=21511321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU904819892A RU1793446C (en) | 1990-04-28 | 1990-04-28 | Device for matrix multiplication |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU1793446C (en) |
-
1990
- 1990-04-28 RU SU904819892A patent/RU1793446C/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1619304, кл. G 06 F 15/347, 1989. Авторское свидетельство СССР № 1619305, кл. G 06 F 1.5/347, 1989. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU1793446C (en) | Device for matrix multiplication | |
SU1677709A1 (en) | Matrix multiplier | |
RU1774348C (en) | Ribbon matrix multiplier | |
RU1774347C (en) | Matrix multiplier | |
SU1191917A1 (en) | Device for calculating values of functions of two arguments | |
RU2024933C1 (en) | Device for multiplying three matrices | |
RU2011221C1 (en) | Device for multiplying matrixes | |
SU1751780A1 (en) | Processor for multiplying vector by matrix | |
RU2012048C1 (en) | Device for computation of two-dimensional discrete fourier transform | |
SU1472901A1 (en) | Function generator | |
SU1275432A1 (en) | Multiplying device | |
SU1062693A1 (en) | Device for calculating values of function y equal to l in the power of x | |
SU962926A1 (en) | Device for taking logarithms | |
SU1474673A1 (en) | Discrete fourier transform computation device | |
SU1035601A2 (en) | Multiplication device | |
SU1631554A1 (en) | Device for computing fourier-galoiz transform | |
SU920714A1 (en) | Device for calculation of second-degree polynomial | |
SU1716536A1 (en) | Device for multiplying matrices | |
SU1092499A1 (en) | Device for digital presentation of cosine function | |
SU1444759A1 (en) | Computing apparatus | |
SU1571580A1 (en) | Device for multiplication | |
SU1151956A1 (en) | Squaring device | |
SU1541581A1 (en) | Digital function generator | |
RU1791818C (en) | Device for control of modulo three residual code | |
SU1472899A1 (en) | Multiplier |