RU2805939C1 - Device for conveyor summation of numbers according to arbitrary module - Google Patents

Device for conveyor summation of numbers according to arbitrary module Download PDF

Info

Publication number
RU2805939C1
RU2805939C1 RU2023118282A RU2023118282A RU2805939C1 RU 2805939 C1 RU2805939 C1 RU 2805939C1 RU 2023118282 A RU2023118282 A RU 2023118282A RU 2023118282 A RU2023118282 A RU 2023118282A RU 2805939 C1 RU2805939 C1 RU 2805939C1
Authority
RU
Russia
Prior art keywords
computing environment
information
information inputs
numbers
bit
Prior art date
Application number
RU2023118282A
Other languages
Russian (ru)
Inventor
Вячеслав Иванович Петренко
Original Assignee
федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет"
Filing date
Publication date
Application filed by федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" filed Critical федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет"
Application granted granted Critical
Publication of RU2805939C1 publication Critical patent/RU2805939C1/en

Links

Abstract

FIELD: computer technology.
SUBSTANCE: invention can be used in conveyor-type digital computing devices for constructing homogeneous computing environments, as well as in digital signal processing devices and cryptographic applications. The device contains a group of full single-bit adders, a first homogeneous computing environment of bit depth n, where n is the bit depth of the numbers being processed, a second homogeneous computing environment of bit depth (n+1), a multiplexer of bit depth n, the first, second and third information inputs, a clock input and information outputs with relevant connections.
EFFECT: implementation of the summation of numbers using arbitrary modulus.
1 cl, 5 dwg, 8 tbl

Description

ОбластьRegion техники,technology, кTo которойwhich относитсяapplies изобретениеinvention

Изобретение относится к вычислительной технике и может быть использовано в цифровых вычислительных устройствах конвейерного типа для построения однородных вычислительных сред, а также в устройствах цифровой обработки сигналов и в криптографических приложениях. The invention relates to computer technology and can be used in conveyor-type digital computing devices for constructing homogeneous computing environments, as well as in digital signal processing devices and cryptographic applications.

УровеньLevel техникиtechnology

Из существующего уровня техники известно техническое решение однородной вычислительной структуры для выполнения операций по заданному модулю, которая содержит N 2 полных сумматоров, N/2(N-1)2 элементов И, (N-2)(N-1) элементов ИЛИ, N/2(N-1)2 управляющих входов [1], предназначенное для выполнения арифметических операций по заданному модулю. Технической проблемой, которая не может быть решена при использовании данного технического решения, является низкая производительность арифметических операций по произвольному модулю, так как основной арифметической операции при работе устройства предшествует дополнительный режим коммутации, который определяет структуру устройства в зависимости от выбранного модуля.From the existing level of technology, a technical solution is known for a homogeneous computing structure for performing operations on a given module, which contains N 2 full adders, N /2( N -1) 2 AND elements, ( N -2)( N -1) OR elements, N /2( N -1) 2 control inputs [1], designed to perform arithmetic operations on a given module. A technical problem that cannot be solved using this technical solution is the low performance of arithmetic operations on an arbitrary module, since the main arithmetic operation during device operation is preceded by an additional switching mode, which determines the structure of the device depending on the selected module.

Наиболее близким к заявленному техническому решению по технической сущности и достигаемому техническому результату является устройство для конвейерных арифметических вычислений по заданному модулю, выбранное в качестве прототипа, содержащее однородную вычислительную среду, три таблицы подстановок, информационные входы и информационные выходы, тактовый вход, позволяющее выполнять суммирование чисел по произвольным простым модулям [2, фиг. 5]. Технической проблемой, которая не может быть решена при использовании данного технического решения при конвейерной обработке информации, является ограниченность функциональных возможностей устройства, так как устройство позволяет выполнять операции суммирования чисел только по модулям простых чисел. Кроме того, использование таблиц подстановки требует при каждой смене модуля менять содержимое таблиц подстановки, что не позволяет оперативно менять модуль при организации конвейерных вычислений.The closest to the claimed technical solution in terms of technical essence and achieved technical result is a device for pipeline arithmetic calculations according to a given module, selected as a prototype, containing a homogeneous computing environment, three substitution tables, information inputs and information outputs, a clock input that allows summation of numbers by arbitrary simple modules [2, Fig. 5]. A technical problem that cannot be solved when using this technical solution for pipeline information processing is the limited functionality of the device, since the device allows you to perform operations of summing numbers only modulo prime numbers. In addition, the use of lookup tables requires changing the contents of the lookup tables every time a module is changed, which does not allow quickly changing a module when organizing pipeline calculations.

Техническим результатом, обеспечиваемым приведенной совокупностью признаков, является расширение функциональных возможностей устройства при конвейерной обработке информации.The technical result provided by the given set of features is the expansion of the functionality of the device during pipeline processing of information.

РаскрытиеDisclosure сущностиessence изобретенияinventions

Указанный технический результат при осуществлении изобретения достигается тем, что в устройство для конвейерного суммирования чисел по произвольному модулю, содержащее первую однородную вычислительную среду разрядности n, где n - разрядность обрабатываемых чисел, первые, вторые и третьи информационные входы, информационные выходы и тактовый вход, который соединен со входом синхронизации первой однородной вычислительной среды, введены вторая однородная вычислительная среда разрядности (n+1), группа полных одноразрядных сумматоров и мультиплексор разрядности n, причем первые информационные входы устройства соединены с первыми информационными входами первой однородной вычислительной среды и с первыми информационными входами группы полных одноразрядных сумматоров, вторые информационные входы устройства соединены со вторыми информационными входами первой однородной вычислительной среды и со вторыми информационными входами группы полных одноразрядных сумматоров, третьи информационные входы устройства соединены с третьими информационными входами группы полных одноразрядных сумматоров, первые информационные выходы которой соединены с младшими n разрядами первых информационных входов второй однородной вычислительной среды, вторые информационные выходы соединены со вторыми информационными входами второй однородной вычислительной среды со сдвигом на один разряд в сторону старшего, на (n+1)-й разряд первых информационных входов и на первый разряд вторых информационных входов второй вычислительной среды подается сигнал логической единицы, вход синхронизации второй однородной вычислительной среды соединен с тактовым входом устройства, младшие n разрядов информационных выходов соединены со вторыми информационными входами мультиплексора, а выход разряда переноса соединен с управляющим входом мультиплексора, первые информационные входы которого соединены с информационными выходами первой однородной вычислительной среды, а выходы соединены с информационными выходами устройства.The specified technical result in the implementation of the invention is achieved by the fact that in a device for conveyor summation of numbers by an arbitrary modulus, containing a first homogeneous computing environment of bit depth n , where n is the bit depth of the numbers being processed, the first, second and third information inputs, information outputs and a clock input, which connected to the synchronization input of the first homogeneous computing environment, a second homogeneous computing environment of capacity ( n +1), a group of full single-bit adders and a multiplexer of capacity n are introduced, and the first information inputs of the device are connected to the first information inputs of the first homogeneous computing environment and to the first information inputs of the group full single-bit adders, the second information inputs of the device are connected to the second information inputs of the first homogeneous computing environment and to the second information inputs of the group of full single-bit adders, the third information inputs of the device are connected to the third information inputs of the group of full single-bit adders, the first information outputs of which are connected to the lowest n bits the first information inputs of the second homogeneous computing environment, the second information outputs are connected to the second information inputs of the second homogeneous computing environment with a shift by one digit towards the higher one, to the ( n +1)th digit of the first information inputs and to the first digit of the second information inputs of the second computing environment, a logical one signal is supplied, the synchronization input of the second homogeneous computing environment is connected to the clock input of the device, the low n bits of the information outputs are connected to the second information inputs of the multiplexer, and the output of the transfer bit is connected to the control input of the multiplexer, the first information inputs of which are connected to the information outputs of the first homogeneous computing environment, and the outputs are connected to the information outputs of the device.

Сущность изобретения заключается в реализации следующего способа суммирования чисел по произвольному модулю. Пусть S - сумма двух чисел A и B по произвольному модулю P The essence of the invention lies in the implementation of the following method for summing numbers modulo arbitrary. Let S be the sum of two numbers A and B modulo P

S (A+B) mod P, (1) S ( A + B ) mod P , (1)

где A и B - целые положительные числа, называемые соответственно первым и вторым слагаемым, причемwhere A and B are positive integers, called the first and second terms, respectively, and

0≤A, B<P, (2)0≤ A , B < P , (2)

P - целое положительное число, называемое модулем; P is a positive integer called modulus;

S - целое положительное число, являющееся суммой чисел A и B, приведенной по модулю P, при этом 0≤S<P. S is a positive integer that is the sum of numbers A and B , modulo P , with 0≤ S < P.

Все числа представлены в позиционной двоичной системе счисления.All numbers are represented in positional binary number system.

A = i = 0 n 1 a i 2 i , (3) A = i = 0 n 1 a i 2 i , (3)

B = i = 0 n 1 b i 2 i , (4) B = i = 0 n 1 b i 2 i , (4)

P = i = 0 n 1 p i 2 i , (5) P = i = 0 n 1 p i 2 i , (5)

S= i = 0 n 1 s i 2 i , (6) S = i = 0 n 1 s i 2 i , (6)

где a i , - коэффициенты, принимающие значение 0 или 1 в зависимости от значения числа A; where a i , - coefficients taking the value 0 or 1 depending on the value of the number A ;

b i , - коэффициенты, принимающие значение 0 или 1 в зависимости от значения числа B; b i , - coefficients taking the value 0 or 1 depending on the value of the number B ;

p i , - коэффициенты, принимающие значение 0 или 1 в зависимости от значения модуля P; p i , - coefficients taking the value 0 or 1 depending on the value of the module P ;

s i , - коэффициенты, принимающие значение 0 или 1 в зависимости от значения суммы S; s i , - coefficients taking the value 0 or 1 depending on the value of the sum S ;

n - количество разрядов в представлении чисел. n is the number of digits in the representation of numbers.

Задача состоит в том, чтобы по известным A и B отыскать сумму S по модулю P.The task is to find the sum S modulo P using known A and B.

Ввиду выполнения ограничения (2), сумма чисел A и B всегда будет находиться в диапазоне значений от 0 до 2P-2. Диапазон значений от 0 до 2P-2 может быть разделен на первый диапазон от 0 до P-1 и второй диапазон от P до 2P-2. Если сумма чисел A и B попадает в первый диапазон, то она и будет являться результатом суммирования чисел A и B по модулю P. Если сумма чисел A и B попадает во второй диапазон, то для приведения ее по модулю P достаточно вычесть из нее модуль P. Операция вычитания может быть выполнена путем суммирования уменьшаемого с вычитаемым, представленном в дополнительном коде. При этом индикатором попадания суммы чисел A и B в первый или второй диапазон будет являться отсутствие или наличие сигнала на выходе переноса сумматора, реализующего операцию вычитания. Этот сигнал управляет мультиплексором, который выбирает нужный результат.Due to the fulfillment of constraint (2), the sum of numbers A and B will always be in the range of values from 0 to 2 P -2. The value range from 0 to 2 P -2 can be divided into a first range from 0 to P -1 and a second range from P to 2 P -2. If the sum of numbers A and B falls into the first range, then it will be the result of the sum of numbers A and B modulo P. If the sum of numbers A and B falls into the second range, then to reduce it modulo P it is enough to subtract modulo P from it. The subtraction operation can be performed by adding the minuend with the subtrahend, represented in two's complement. In this case, an indicator of whether the sum of numbers A and B falls into the first or second range will be the absence or presence of a signal at the transfer output of the adder, which implements the subtraction operation. This signal controls the multiplexer, which selects the desired result.

В качестве сумматора в конвейерном режиме суммирования может выступать однородная вычислительная среда [2, фиг. 3] со структурой ячеек, представленной в [2, фиг. 1].A homogeneous computing environment can act as an adder in the pipeline summation mode [2, Fig. 3] with the cell structure presented in [2, Fig. 1].

Выполняя с помощью одной однородной вычислительной среды операцию суммирования потоков чисел A j и B j , j=1,2,3,…, а с помощью второй однородной вычислительной среды операцию (A j +B j -P j ), можно по результатам вычисления второй однородной вычислительной среды выбирать корректное значение для суммы S j Using one homogeneous computing environment, performing the operation of summing the streams of numbers A j and B j , j =1,2,3,..., and using a second homogeneous computing environment the operation ( A j + B j - P j ), using the results of the calculation second homogeneous computing environment, choose the correct value for the sum S j

S j (A j +B j ) mod P j . (7) Sj _ ( A j + B j ) mod P j . (7)

КраткоеBrief описаниеdescription чертежейdrawings

Сущность изобретения поясняется чертежами.The essence of the invention is illustrated by drawings.

На фиг. 1 представлена схема устройства для конвейерного суммирования чисел по произвольному модулю. Устройство для конвейерного суммирования чисел по произвольному модулю содержит группу полных одноразрядных сумматоров 1, первую однородную вычислительную среду 2.1 разрядности n, где n - разрядность обрабатываемых чисел, вторую однородную вычислительную среду 2.2 разрядности (n+1), мультиплексор 3 разрядности n, первые 4, вторые 5 и третьи 6 информационные входы устройства, тактовый вход 7 и информационные выходы 8 устройства. Первые информационные входы 4 устройства соединены с первыми информационными входами первой однородной вычислительной среды 2.1 и с первыми информационными входами группы полных одноразрядных сумматоров 1. Вторые информационные входы 5 устройства соединены со вторыми информационными входами первой однородной вычислительной среды 2.1 и со вторыми информационными входами группы полных одноразрядных сумматоров 1. Третьи информационные входы 6 устройства соединены с третьими информационными входами группы полных одноразрядных сумматоров 1, первые информационные выходы которой соединены с младшими n разрядами первых информационных входов второй однородной вычислительной среды 2.2, вторые информационные выходы соединены со вторыми информационными входами второй однородной вычислительной среды 2.2 со сдвигом на один разряд в сторону старшего. Тактовый вход устройства соединен со входами синхронизации первой 2.1 и второй 2.2 однородной вычислительной среды. Младшие n разрядов информационных выходов второй однородной вычислительной среды 2.2 соединены со вторыми информационными входами мультиплексора 3, а выход разряда переноса соединен с управляющим входом мультиплексора 3, первые информационные входы которого соединены с информационными выходами первой однородной вычислительной среды 2.1, а выходы соединены с информационными выходами 8 устройства. На (n+1)-й разряд первых информационных входов и на первый разряд вторых информационных входов второй вычислительной среды 2.2 подается сигнал логической единицы. На первые информационные входы 4 устройства подается поток кодов чисел A j , j=1,2,3,…, на вторые информационные входы 5 устройства подается поток кодов чисел B j , на третьи информационные входы 6 устройства подается поток инверсных кодов модулей P j . С информационных выходов 8 устройства снимаются коды суммы S j чисел A j и B j , по модулю P j .In fig. Figure 1 shows a diagram of a device for conveyor summation of numbers modulo arbitrary. A device for conveyor summation of numbers by an arbitrary modulo contains a group of full single-bit adders 1, a first homogeneous computing environment of 2.1 bits n , where n is the bit depth of the numbers being processed, a second homogeneous computing environment of 2.2 bits ( n +1), a multiplexer of 3 bits n , the first 4, the second 5 and third 6 information inputs of the device, clock input 7 and information outputs 8 of the device. The first information inputs 4 of the device are connected to the first information inputs of the first homogeneous computing environment 2.1 and to the first information inputs of the group of full single-bit adders 1. The second information inputs 5 of the device are connected to the second information inputs of the first homogeneous computing environment 2.1 and to the second information inputs of the group of full single-bit adders 1. The third information inputs 6 of the device are connected to the third information inputs of the group of full single-bit adders 1, the first information outputs of which are connected to the low-order n bits of the first information inputs of the second homogeneous computing environment 2.2, the second information outputs are connected to the second information inputs of the second homogeneous computing environment 2.2 with shift by one digit towards the higher one. The clock input of the device is connected to the synchronization inputs of the first 2.1 and second 2.2 homogeneous computing environment. The low-order n bits of the information outputs of the second homogeneous computing environment 2.2 are connected to the second information inputs of the multiplexer 3, and the output of the transfer bit is connected to the control input of the multiplexer 3, the first information inputs of which are connected to the information outputs of the first homogeneous computing environment 2.1, and the outputs are connected to information outputs 8 devices. A logical one signal is supplied to the ( n +1)th bit of the first information inputs and to the first bit of the second information inputs of the second computing environment 2.2. A stream of number codes A j , j =1,2,3,... is supplied to the first information inputs 4 of the device, a stream of number codes B j is supplied to the second information inputs 5 of the device, a stream of inverse module codes P j is supplied to the third information inputs 6 of the device. From the information outputs 8 of the device, the codes of the sum S j of the numbers A j and B j , modulo P j, are read.

ОсуществлениеImplementation изобретенияinventions

Устройство для конвейерного суммирования чисел по произвольному модулю работает следующим образом (см. фиг. 1).A device for conveyor summing of numbers modulo arbitrary operates as follows (see Fig. 1).

В исходном состоянии все ячейки первой 2.1 и второй 2.2 однородной вычислительной среды обнулены.In the initial state, all cells of the first 2.1 and second 2.2 of the homogeneous computing environment are reset to zero.

На тактовый вход устройства 7 поступают тактовые импульсы j=1,2,3,…,. На первые информационные входы 4 устройства и вторые информационные входы 5 устройства с каждым тактовым импульсом подаются соответственно числа A j и B j , для которых необходимо вычислить сумму S j по модулю P j . На третьи информационные входы 6 устройства подаётся инверсный код модуля P j . Сумма S j по модулю P j чисел A j и B j снимается с информационных выходов 8 устройства.The clock input of device 7 receives clock pulses j =1,2,3,…,. At the first information inputs 4 of the device and the second information inputs 5 of the device, with each clock pulse, numbers A j and B j are supplied, respectively, for which it is necessary to calculate the sum S j modulo P j . The inverse code of the module P j is supplied to the third information inputs 6 of the device. The sum S j modulo P j of the numbers A j and B j is taken from the information outputs 8 of the device.

Длина конвейера и латентный период работы конвейера зависит от структуры однородных вычислительных сред 2.1 и 2.2.The length of the pipeline and the latent period of the pipeline depend on the structure of homogeneous computing environments 2.1 and 2.2.

Для каждой пары чисел A j и B j , первая однородная вычислительная среда 2.1 вычисляет сумму (A j +B j ). Для каждой тройки чисел A j , B j , и P j вторая однородная вычислительная среда 2.2 совместно с группой полных одноразрядных сумматоров 1 вычисляет значение (A j +B j -P j ). Сумма (A j +B j ) и значение (A j +B j -P j ) появляются синхронно на каждом такте на первых и вторых информационных входах мультиплексора 3. В случае, если сумма (A j +B j )≥P j , то на выходе разряда переноса второй однородной вычислительной среды 2.2 появится сигнал переноса, который, поступая на управляющий вход мультиплексора 3, скоммутирует с его информационными выходами его вторые информационные входы, в результате на информационных выходах устройства окажется значение (A j +B j -P j ). В противном случае с информационными выходами мультиплексора 1 будут скоммутированы его первые информационные входы и на информационных выходах устройства окажется значение (A j +B j ).For each pair of numbers A j and B j , the first homogeneous computing environment 2.1 calculates the sum ( A j + B j ). For each triple of numbers A j , B j , and P j, the second homogeneous computing environment 2.2, together with a group of full one-bit adders 1, calculates the value ( A j + B j - P j ). The sum ( A j + B j ) and the value ( A j + B j - P j ) appear synchronously at each clock cycle at the first and second information inputs of multiplexer 3. If the sum ( A j + B j )≥ P j , then at the output of the transfer bit of the second homogeneous computing environment 2.2 a transfer signal will appear, which, arriving at the control input of the multiplexer 3, will connect its second information inputs with its information outputs, as a result, the information outputs of the device will have the value ( A j + B j - P j ). Otherwise, its first information inputs will be connected to the information outputs of multiplexer 1 and the value ( A j + B j ) will appear at the information outputs of the device.

Рассмотрим реализацию устройства для случая, когда разрядность обрабатываемых чисел n равна 4.Let's consider the implementation of the device for the case when the bit depth of the processed numbers n is 4.

На фиг. 2 представлена структура группы полных одноразрядных сумматоров 1, состоящая из четырех полных одноразрядных сумматоров 1.1÷1.4. Каждый полный одноразрядный сумматор 1.1÷1.4 имеет два информационных входа A и B, вход переноса P i , выход суммы S и выход переноса P o . На первые информационные входы A полных одноразрядных сумматоров 1.1÷1.4 поступают с первых информационных входов 4 устройства коды чисел A j , на вторые информационные входы B поступают со вторых информационных входов 5 устройства коды чисел B j , на входы переноса P i , поступают с третьих информационных входов 6 устройства инверсные коды модулей P j . Каждый полный одноразрядный сумматор 1.1÷1.4 формирует на своих выходах значение суммы и значение переноса в зависимости от значений входных сигналов, которые поступают на первые и вторые информационные выходы соответственно группы полных одноразрядных сумматоров 1, обозначенные как X j и Y j соответственно. При этом в соответствии с правилами сложения чисел разряды X j и Y j будут вычислены какIn fig. Figure 2 shows the structure of a group of full single-bit adders 1, consisting of four full single-bit adders 1.1÷1.4. Each full one-bit adder 1.1÷1.4 has two information inputs A and B , a carry input Pi , a sum output S and a carry output P o . The first information inputs A of full single-digit adders 1.1÷1.4 receive codes of numbers A j from the first information inputs 4 of the device, the codes of numbers B j arrive from the second information inputs of the device 5 from the second information inputs 5 of the device, the codes of numbers B j are supplied to the transfer inputs Pi from the third information inputs 6 devices inverse codes of modules P j . Each full one-bit adder 1.1÷1.4 generates at its outputs the sum value and the carry value depending on the values of the input signals that arrive at the first and second information outputs, respectively, of the group of full one-bit adders 1, designated as X j and Y j , respectively. In this case, in accordance with the rules for adding numbers, the digits X j and Y j will be calculated as

x i , j =a i , j b i , j p i , j , (8) x i , j =a i , j b i , j p i , j , (8)

y i , j =a i , j b i , j b i , j p i , j a i , j p i , j . (9) y i , j =a i , j b i , j b i , j p i , j a i , j p i , j . (9)

где i = 0, 1, 2, 3 - номер разряда в двоичном представлении чисел; where i = 0, 1, 2, 3 - the number of the digit in the binary representation of numbers;

j=1, 2, 3, …, - номер такта работы устройства; j =1, 2, 3, …, - number of the device’s operating cycle;

x i , j - i-ый разряд j-го числа X j , x i , j -i-th rankjon the thX j ,

y i , j - i-ый разряд j-го числа Y j ; y i , j -i-th rankjon the thY j ;

a i , j - i-ый разряд j-го числа A j ; a i , j -i-th rankjon the thA j ;

b i , j - i-ый разряд j-го числа B j ; b i , j -i-th rankjon the thB j ;

p i , j - i-ый разряд j-го числа P j ; p i , j -i-th rankjon the thP j ;

символ означает суммирование по модулю два;symbol means summation modulo two;

символ означает логическую дизъюнкцию. symbol means logical disjunction.

Тогда вычисление значения (A j +B j -P j ), состоящего из трех операндов, может быть сведено к вычислению значения (2 n +1+X j +2Y j +1), состоящего из двух операндов и двух констант, с увеличением на одну единицу разрядности вычислителя. Then the calculation of the value ( A j + B j - P j ), consisting of three operands, can be reduced to the calculation of the value (2 n +1 + X j +2 Y j +1), consisting of two operands and two constants, with increasing by one unit the bit capacity of the computer.

В качестве ячейки (CELL) для однородной вычислительной среды может быть использована ячейка, представленная на фиг. 3 [2, фиг. 1] и содержащая первый 9.1 и второй 9.2 триггеры, элемент ИСКЛЮЧАЮЩЕЕ ИЛИ 10, элемент И 11, два информационных входа a и b, вход синхронизации и два информационных выхода Q 1 и Q 2. Ячейка однородной структуры реализует следующую систему логических функций:The cell shown in FIG. 1 can be used as a cell (CELL) for a homogeneous computing environment. 3 [2, fig. 1] and containing the first 9.1 and second 9.2 triggers, the EXCLUSIVE OR element 10, the AND element 11, two information inputs a and b , a synchronization input and two information outputs Q 1 and Q 2 . A cell of a homogeneous structure implements the following system of logical functions:

Q 1= a b, (10) Q 1 = a b , (10)

Q 2= a⋅b. (11) Q 2 = a⋅b . (eleven)

Пример реализации первой однородной вычислительной среды 2.1 на базе ячейки однородной структуры для разрядности n=4 в соответствии с [2, фиг. 3] представлен на фиг. 4. Первая однородная вычислительная среда 2.1 для разрядности n=4 содержит 4 строки и 6 столбцов ячеек однородной структуры CELL n, m с соответствующими связями. Линии синхронизации подключены к каждой ячейке и на фиг. 4 не показаны. Информационные входы a и b ячеек первого столбца являются входами для разрядов суммируемых чисел A j и B j . Информационные выходы Q 1 ячеек шестого столбца являются информационными выходами суммы S j для случая, когда S j <P j .An example of the implementation of the first homogeneous computing environment 2.1 based on a cell of a homogeneous structure for bit capacity n = 4 in accordance with [2, Fig. 3] is shown in Fig. 4. The first homogeneous computing environment 2.1 for bit depth n = 4 contains 4 rows and 6 columns of cells of a homogeneous structure CELL n , m with the corresponding connections. Clock lines are connected to each cell and in FIG. 4 are not shown. Information inputs a and b of the cells of the first column are inputs for the digits of the summed numbers A j and B j . Information outputs Q 1 of the cells of the sixth column are information outputs of the sum S j for the case when S j < P j .

Пример реализации второй однородной вычислительной среды 2.2 на базе ячейки однородной структуры в соответствии с [2, фиг. 3] представлен на фиг. 5. Вторая однородная вычислительная среда 2.2 для разрядности входных чисел n=4 имеет входную разрядность равную пяти и содержит 6 строк и 6 столбцов ячеек однородной структуры CELL n, m с соответствующими связями, позволяющую формировать также сигнал переноса. Линии синхронизации подключены к каждой ячейке и на фиг. 5 не показаны. Информационные входы a и b ячеек первого столбца являются входами для разрядов суммируемых чисел X j и Y j . Вторая однородная вычислительная среда 2.2 выполняет операцию (25+X j +2Y j +1). На младшие 4 разряда первых информационных входов однородной вычислительной среды 2.2 с первых информационных выходов группы полных одноразрядных сумматоров 1 поступают значения X j , вычисленные в соответствии с (8). На пятый разряд подается значение логической 1. Значения Y j , вычисленные в соответствии с (9), со вторых информационных выходов группы полных одноразрядных сумматоров 1 поступают на вторые информационные входы однородной вычислительной среды 2.2 со сдвигом на один разряд в сторону старших, а на самый младший разряд подается сигнал логической 1. Информационные выходы Q 1 ячеек шестого столбца являются информационными выходами суммы S j однородной вычислительной среды 2.2 для случая, когда S j ≥P j . В качестве разрядов суммы S j используются первые четыре разряда информационных выходов однородной вычислительной среды 2.2, а в качестве разряда переноса используется информационный выход шестого разряда. Сигнал переноса с выхода переноса однородной вычислительной среды 2.2 управляет работой мультиплексора 3. Если сигнал переноса равен нулю, то это означает, что (A j +B j )<P j . B этом случае мультиплексор 3 коммутирует с первых информационных входов на свои выходы и далее на информационные выходы 8 устройства значение суммы (A j +B j ) с информационных выходов первой однородной вычислительной среды 2.1. В случае, если сигнал переноса равен единице, то это означает, что (A j +B j )≥P j . B этом случае мультиплексор 3 коммутирует со вторых информационных входов на свои выходы и далее на информационные выходы 8 устройства значение (A j +B j )-P j с информационных выходов второй однородной вычислительной среды 2.2. Таким образом, на информационных выходах 8 устройства всегда будет сформировано корректное значение S j в соответствии с (7).An example of the implementation of a second homogeneous computing environment 2.2 based on a cell of a homogeneous structure in accordance with [2, Fig. 3] is shown in Fig. 5. The second homogeneous computing environment 2.2 for the bit depth of input numbers n = 4 has an input bit width equal to five and contains 6 rows and 6 columns of cells of a homogeneous structure CELL n , m with appropriate connections, which also allows the formation of a carry signal. Clock lines are connected to each cell and in FIG. 5 are not shown. Information inputs a and b of the cells of the first column are inputs for the digits of the summed numbers X j and Y j . The second homogeneous computing environment 2.2 performs the operation (2 5 + X j +2 Y j +1). The lower 4 bits of the first information inputs of the homogeneous computing environment 2.2 from the first information outputs of the group of full single-bit adders 1 receive the values X j calculated in accordance with (8). The value of logical 1 is supplied to the fifth digit. The values of Y j , calculated in accordance with (9), from the second information outputs of the group of full single-bit adders 1 are supplied to the second information inputs of the homogeneous computing environment 2.2 with a shift of one digit towards the highest ones, and to the most the least significant digit sends a logical 1 signal. The information outputs Q 1 of the cells of the sixth column are the information outputs of the sum S j of the homogeneous computing environment 2.2 for the case when S j ≥P j . The first four bits of information outputs of the homogeneous computing environment 2.2 are used as bits of the sum S j , and the information output of the sixth bit is used as a transfer bit. The carry signal from the transfer output of the homogeneous computing environment 2.2 controls the operation of the multiplexer 3. If the carry signal is zero, this means that ( A j + B j )< P j . In this case, the multiplexer 3 switches from the first information inputs to its outputs and then to the information outputs 8 of the device the value of the sum ( A j + B j ) from the information outputs of the first homogeneous computing environment 2.1. If the transfer signal is equal to one, this means that ( A j + B j )≥ P j . In this case, the multiplexer 3 switches from the second information inputs to its outputs and then to the information outputs 8 of the device the value ( A j + B j ) - P j from the information outputs of the second homogeneous computing environment 2.2. Thus, the correct value S j will always be generated at the information outputs 8 of the device in accordance with (7).

Рассмотрим примеры работы устройства на конкретных значениях суммируемых чисел и модуля. В качестве первого примера рассмотрим случай, когда сумма входных чисел не превышает значения модуля. В качестве входных данных выберем для разрядности n=4 числа A=310 (00112), B=710 (01112) и модуль P=1210 (11002, инверсный код 00112). Состояния элементов устройства при вычислении суммы для первого примера представлены в табл. 1-4.Let's consider examples of the device's operation on specific values of the summed numbers and modulus. As a first example, consider the case when the sum of the input numbers does not exceed the modulus value. As input data, for the bit depth n =4 we choose the numbers A =3 10 (0011 2 ), B =7 10 (0111 2 ) and the module P =12 10 (1100 2 , inverse code 0011 2 ). The states of the device elements when calculating the sum for the first example are presented in table. 1-4.

Таблица 1 - Таблица состояний первой однородной вычислительной среды 2.1Table 1 - State table of the first homogeneous computing environment 2.1 ВходыInputs 11 22 33 44 55 66 ВыходыExits 11 a0 a 0 11 00 00 00 00 00 s0 s 0 00 b0 b 0 11 00 00 00 00 00 22 a1 a 1 11 11 00 00 00 00 s1 s 1 11 b1 b 1 11 00 11 11 11 11 33 a2 a 2 00 11 00 00 00 00 s2 s 2 00 b2 b 2 11 11 00 00 00 00 44 a3 a 3 00 00 11 00 00 00 s3 s 3 11 b3 b 3 00 00 00 11 11 11

В первом столбце таблицы 1 числами 1÷4 обозначены номера строк, а в строке 1 числами 1÷6 обозначены номера столбцов первой однородной вычислительной среды 2.1. На пересечении соответствующей строки и столбца указан сигнал на соответствующем входе соответствующей ячейки. В последнем столбце приведены значения сигналов на выходах суммы ячеек шестого столбца. Значения сигналов приведены для одного набора данных для шести тактовых состояний.In the first column of table 1, the numbers 1÷4 indicate the row numbers, and in line 1, the numbers 1÷6 indicate the column numbers of the first homogeneous computing environment 2.1. The intersection of the corresponding row and column indicates the signal at the corresponding input of the corresponding cell. The last column shows the values of the signals at the outputs of the sum of the cells of the sixth column. Signal values are given for one data set for six clock states.

Таблица 2 - Таблица состояний группы полных одноразрядных сумматоров 1Table 2 - State table of group of full single-bit adders 1 ВходыInputs ВыходыExits AA BB Pi P i SS P0 P0 1.11.1 11 11 11 11 11 1.21.2 11 11 11 11 11 1.31.3 00 11 00 11 00 1.41.4 00 00 00 00 00

В первом столбце таблицы 2 обозначения 1.1÷1.4 указывают на номера сумматоров в группе полных одноразрядных сумматоров 1. Значения сигналов приведены для одного набора данных для первого такта.In the first column of Table 2, designations 1.1÷1.4 indicate the numbers of adders in group of full single-bit adders 1. The signal values are given for one set of data for the first cycle.

Таблица 3 - Таблица состояний второй однородной вычислительной среды 2.2Table 3 - State table of the second homogeneous computing environment 2.2 ВходыInputs 11 22 33 44 55 66 ВыходыExits 11 x0 x 0 11 00 00 00 00 00 s0 s 0 00 11 11 00 00 00 00 00 22 x1 x 1 11 11 00 00 00 00 s1 s 1 11 y0 y 0 11 00 11 11 11 11 33 x2 x 2 11 11 00 00 00 00 s2 s 2 11 y1 y 1 11 00 11 11 11 11 44 x3 x 3 00 11 00 00 00 00 s3 s 3 11 y2 y 2 00 00 11 11 11 11 55 11 11 00 00 00 00 00 -- 11 y3 y 3 00 11 11 11 11 11 66 -- 00 00 00 00 00 00 s5 s 5 00 -- 00 00 00 00 00 00

Структура таблицы 3 аналогична структуре таблице 1.The structure of Table 3 is similar to the structure of Table 1.

Таблица 4 - Таблица состояний мультиплексора 3Table 4 - Multiplexer 3 status table ВходыInputs ВыходыExits AA BB SS 1 разряд1st category 00 00 00 2 разряд2nd category 11 11 11 3 разряд3rd category 00 11 00 4 разряд4th category 11 11 11

В таблице 4 приведены значения сигналов на информационных входах и на информационных выходах мультиплексора 3 на шестом такте. На управляющий вход мультиплексора в соответствии с таблицей 3 поступает сигнал s 5=0. В результате на информационные выходы 8 устройства на шестом такте поступает число 10102=1010. Непосредственной проверкой устанавливаем 3+710 mod 12.Table 4 shows the values of the signals at the information inputs and information outputs of multiplexer 3 at the sixth cycle. In accordance with Table 3, the control input of the multiplexer receives the signal s 5 =0. As a result, the number 1010 2 =10 10 is received at the information outputs 8 of the device in the sixth cycle. By direct check we set 3+7 10 mod 12.

В качестве второго примера рассмотрим случай, когда сумма входных чисел превышает значение модуля. В качестве входных данных выберем для разрядности n=4 числа A=8 (1000)2, B=9 (1001)2 и модуль P=1210 (11002, инверсный код 00112). Состояния элементов устройства при вычислении суммы для второго примера представлены в табл. 5-9.As a second example, consider the case when the sum of the input numbers exceeds the modulus value. As input data, for the bit depth n = 4, we choose the numbers A = 8 (1000) 2 , B = 9 (1001) 2 and the module P = 12 10 (1100 2 , inverse code 0011 2 ). The states of the device elements when calculating the sum for the second example are presented in table. 5-9.

Таблица 5 - Таблица состояний первой однородной вычислительной среды 2.1Table 5 - State table of the first homogeneous computing environment 2.1 ВходыInputs 11 22 33 44 55 66 ВыходыExits 11 a0 a 0 00 00 00 00 00 00 s0 s 0 11 b0 b 0 11 11 11 11 11 11 22 a1 a 1 00 00 00 00 00 00 s1 s 1 00 b1 b 1 00 00 00 00 00 00 33 a2 a 2 00 00 00 00 00 00 s2 s 2 00 b2 b 2 00 00 00 00 00 00 44 a3 a 3 11 00 00 00 00 00 s3 s 3 00 b3 b 3 11 00 00 00 00 00

В первом столбце таблицы 5 числами 1÷4 обозначены номера строк, а в строке 1 числами 1÷6 обозначены номера столбцов первой однородной вычислительной среды 2.1. На пересечении соответствующей строки и столбца указан сигнал на соответствующем входе соответствующей ячейки. В последнем столбце приведены значения сигналов на выходах суммы ячеек шестого столбца. Значения сигналов приведены для одного набора данных для шести тактовых состояний.In the first column of table 5, the numbers 1÷4 indicate the row numbers, and in line 1, the numbers 1÷6 indicate the column numbers of the first homogeneous computing environment 2.1. The intersection of the corresponding row and column indicates the signal at the corresponding input of the corresponding cell. The last column shows the values of the signals at the outputs of the sum of the cells of the sixth column. Signal values are given for one data set for six clock states.

Таблица 6 - Таблица состояний группы полных одноразрядных сумматоров 1Table 6 - State table of group of full single-bit adders 1 ВходыInputs ВыходыExits AA BB Pi P i SS P0 P0 1.11.1 00 11 11 00 11 1.21.2 00 00 11 11 00 1.31.3 00 00 00 00 00 1.41.4 11 11 00 00 11

В первом столбце таблицы 6 обозначения 1.1÷1.4 указывают на номера сумматоров в группе полных одноразрядных сумматоров 1. Значения сигналов приведены для одного набора данных для первого такта.In the first column of Table 6, designations 1.1÷1.4 indicate the numbers of adders in group of full single-bit adders 1. The signal values are given for one set of data for the first cycle.

Таблица 7 - Таблица состояний второй однородной вычислительной среды 2.2Table 7 - State table of the second homogeneous computing environment 2.2 ВходыInputs 11 22 33 44 55 66 ВыходыExits 11 x0 x 0 00 00 00 00 00 00 s0 s 0 11 11 11 11 11 11 11 11 22 x1 x 1 11 00 00 00 00 00 s1 s 1 00 y0 y 0 11 00 00 00 00 00 33 x2 x 2 00 11 00 00 00 00 s2 s 2 11 y1 y 1 00 00 11 11 11 11 44 x3 x 3 00 00 00 00 00 00 s3 s 3 00 y2 y 2 00 00 00 00 00 00 55 11 11 00 00 00 00 00 -- -- y3 y 3 11 00 00 00 00 00 66 -- 00 11 00 00 00 00 s5 s 5 11 -- 00 00 11 11 11 11

Структура таблицы 7 аналогична структуре таблице 5.The structure of table 7 is similar to the structure of table 5.

Таблица 8 - Таблица состояний мультиплексора 3Table 8 - Multiplexer 3 status table ВходыInputs ВыходыExits AA BB SS 1 разряд1st category 11 11 11 2 разряд2nd category 00 00 00 3 разряд3rd category 00 11 11 4 разряд4th category 00 00 00

В таблице 8 приведены значения сигналов на информационных входах и на информационных выходах мультиплексора 3 на шестом такте. На управляющий вход мультиплексора 3 в соответствии с таблицей 7 поступает сигнал s 5=1. В результате на информационные выходы 8 устройства на шестом такте поступает число 01012=510. Непосредственной проверкой устанавливаем 8+95 mod 12.Table 8 shows the values of the signals at the information inputs and information outputs of multiplexer 3 at the sixth cycle. In accordance with Table 7, the control input of multiplexer 3 receives the signal s 5 =1. As a result, the number 0101 2 =5 10 is received at the information outputs 8 of the device in the sixth cycle. By direct verification we establish 8+9 5 mod 12.

Изобретение позволяет выполнять операции конвейерного суммирования чисел по любым модулям, а не только по модулям простых чисел, кроме того, изобретение позволяет оперативно для каждой пары чисел задавать свой модуль, не требуя при этом дополнительных операций по предварительной настройке, что расширяет функциональные возможности устройства при конвейерной обработке информации.The invention makes it possible to perform operations of conveyor summation of numbers in any modules, and not just in modules of prime numbers; in addition, the invention allows you to quickly set its own module for each pair of numbers, without requiring additional preliminary configuration operations, which expands the functionality of the device during conveyor information processing.

Источники информации.Information sources.

1. Патент на изобретение RU 2310223 С1. МПК G06F 7/72 (2006.01). Однородная вычислительная структура для выполнения операций по заданному модулю. Опубликован 10.11.2007. Бюл. №31.1. Patent for invention RU 2310223 C1. IPC G06F 7/72 (2006.01). A homogeneous computing structure for performing operations according to a given module. Published 11/10/2007. Bull. No. 31.

2. Патент на изобретение RU 2477513 С1. МПК G06F 7/72 (2006.01). Ячейка однородной вычислительной среды, однородная вычислительная среда и устройство для конвейерных арифметических вычислений по заданному модулю. Опубликован 10.03.2013. Бюл. №7.2. Patent for invention RU 2477513 C1. IPC G06F 7/72 (2006.01). A cell of a homogeneous computing environment, a homogeneous computing environment and a device for pipeline arithmetic calculations according to a given module. Published 03/10/2013. Bull. No. 7.

Claims (1)

Устройство для конвейерного суммирования чисел по произвольному модулю, содержащее первую однородную вычислительную среду разрядности n, где n – разрядность обрабатываемых чисел, первые, вторые и третьи информационные входы, информационные выходы и тактовый вход, который соединен со входом синхронизации первой однородной вычислительной среды, отличающееся тем, что в него введены вторая однородная вычислительная среда разрядности (n+1), группа полных одноразрядных сумматоров и мультиплексор разрядности n, причем первые информационные входы устройства соединены с первыми информационными входами первой однородной вычислительной среды и с первыми информационными входами группы полных одноразрядных сумматоров, вторые информационные входы устройства соединены со вторыми информационными входами первой однородной вычислительной среды и со вторыми информационными входами группы полных одноразрядных сумматоров, третьи информационные входы устройства соединены с третьими информационными входами группы полных одноразрядных сумматоров, первые информационные выходы которой соединены с младшими n разрядами первых информационных входов второй однородной вычислительной среды, вторые информационные выходы соединены со вторыми информационными входами второй однородной вычислительной среды со сдвигом на один разряд в сторону старшего, на (n+1)-й разряд первых информационных входов и на первый разряд вторых информационных входов второй вычислительной среды подается сигнал логической единицы, вход синхронизации второй однородной вычислительной среды соединен с тактовым входом устройства, младшие n разрядов информационных выходов соединены со вторыми информационными входами мультиплексора, а выход разряда переноса соединен с управляющим входом мультиплексора, первые информационные входы которого соединены с информационными выходами первой однородной вычислительной среды, а выходы соединены с информационными выходами устройства.A device for conveyor summation of numbers by an arbitrary modulus, containing a first homogeneous computing environment of bit depth n , where n is the bit depth of the numbers being processed, first, second and third information inputs, information outputs and a clock input, which is connected to the synchronization input of the first homogeneous computing environment, characterized in that , that it contains a second homogeneous computing environment of capacity ( n +1), a group of full single-bit adders and a multiplexer of capacity n , and the first information inputs of the device are connected to the first information inputs of the first homogeneous computing environment and to the first information inputs of the group of complete single-bit adders, the second the information inputs of the device are connected to the second information inputs of the first homogeneous computing environment and to the second information inputs of the group of full single-bit adders, the third information inputs of the device are connected to the third information inputs of the group of full single-bit adders, the first information outputs of which are connected to the lower n bits of the first information inputs of the second homogeneous computing environment, the second information outputs are connected to the second information inputs of the second homogeneous computing environment with a shift of one bit towards the higher one, a logical one signal is supplied to the ( n +1)th bit of the first information inputs and to the first bit of the second information inputs of the second computing environment , the synchronization input of the second homogeneous computing environment is connected to the clock input of the device, the low n bits of the information outputs are connected to the second information inputs of the multiplexer, and the output of the transfer bit is connected to the control input of the multiplexer, the first information inputs of which are connected to the information outputs of the first homogeneous computing environment, and the outputs connected to the information outputs of the device.
RU2023118282A 2023-07-11 Device for conveyor summation of numbers according to arbitrary module RU2805939C1 (en)

Publications (1)

Publication Number Publication Date
RU2805939C1 true RU2805939C1 (en) 2023-10-24

Family

ID=

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU1067499A1 (en) * 1982-01-11 1984-01-15 Kozlov Vitalij Pipeline adder
US4887233A (en) * 1986-03-31 1989-12-12 American Telephone And Telegraph Company, At&T Bell Laboratories Pipeline arithmetic adder and multiplier
WO2002008885A1 (en) * 2000-07-21 2002-01-31 Xebeo Communications, Inc. HIGH-SPEED PARALLEL-PREFIX MODULO 2n-1 ADDERS
US7007059B1 (en) * 2001-07-30 2006-02-28 Cypress Semiconductor Corporation Fast pipelined adder/subtractor using increment/decrement function with reduced register utilization
RU2310223C2 (en) * 2005-10-03 2007-11-10 Пензенский государственный университет (ПГУ) Homogeneous computing structure for performing operations with given modulus
RU2477513C1 (en) * 2011-12-02 2013-03-10 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования Вятский государственный университет ФГБОУ ВПО "ВятГУ" Homogeneous computing environment cell, homogeneous computing environment and apparatus for pipeline arithmetic calculations on given modulo
RU2799035C1 (en) * 2023-04-06 2023-07-03 федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" Conveyor totalizer by modulo

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU1067499A1 (en) * 1982-01-11 1984-01-15 Kozlov Vitalij Pipeline adder
US4887233A (en) * 1986-03-31 1989-12-12 American Telephone And Telegraph Company, At&T Bell Laboratories Pipeline arithmetic adder and multiplier
WO2002008885A1 (en) * 2000-07-21 2002-01-31 Xebeo Communications, Inc. HIGH-SPEED PARALLEL-PREFIX MODULO 2n-1 ADDERS
US7007059B1 (en) * 2001-07-30 2006-02-28 Cypress Semiconductor Corporation Fast pipelined adder/subtractor using increment/decrement function with reduced register utilization
RU2310223C2 (en) * 2005-10-03 2007-11-10 Пензенский государственный университет (ПГУ) Homogeneous computing structure for performing operations with given modulus
RU2477513C1 (en) * 2011-12-02 2013-03-10 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования Вятский государственный университет ФГБОУ ВПО "ВятГУ" Homogeneous computing environment cell, homogeneous computing environment and apparatus for pipeline arithmetic calculations on given modulo
RU2799035C1 (en) * 2023-04-06 2023-07-03 федеральное государственное автономное образовательное учреждение высшего образования "Северо-Кавказский федеральный университет" Conveyor totalizer by modulo

Similar Documents

Publication Publication Date Title
US6397241B1 (en) Multiplier cell and method of computing
KR100267009B1 (en) Method and device for modular multiplication
US10817262B2 (en) Reduced and pipelined hardware architecture for Montgomery Modular Multiplication
US5289397A (en) High-speed modulo exponentiator device
US6182104B1 (en) Circuit and method of modulo multiplication
US6356636B1 (en) Circuit and method for fast modular multiplication
EP1471420A2 (en) Montgomery modular multiplier and method thereof using carry save addition
KR100591761B1 (en) Montgomery Modular Multiplication Method Using Montgomery Modular Multiplier and Carry Store Addition
Takagi A VLSI algorithm for modular division based on the binary GCD algorithm
Koç et al. Fast algorithm for modular reduction
US4293922A (en) Device for multiplying binary numbers
US20040125948A1 (en) Montgomery modular multiplier using a compressor and multiplication method
CN113032723B (en) Matrix multiplier realizing method and matrix multiplier device
US8244790B2 (en) Multiplier and cipher circuit
Orup et al. A high-radix hardware algorithm for calculating the exponential ME modulo N.
US20010054053A1 (en) Method and apparatus for finite field multiplication
RU2805939C1 (en) Device for conveyor summation of numbers according to arbitrary module
Morita A fast modular-multiplication algorithm based on a higher radix
Rouhifar et al. Fast overflow detection in moduli set {2n–1, 2n, 2n+ 1}
WO2000038047A1 (en) Circuit and method of cryptographic multiplication
KR100480997B1 (en) APPARATUS OF FIELD MULTIPLICATION OVER GF(p) AND GF(2^m)
KR100946256B1 (en) Scalable Dual-Field Montgomery Multiplier On Dual Field Using Multi-Precision Carry Save Adder
Lu et al. A programmable VLSI architecture for computing multiplication and polynomial evaluation modulo a positive integer
RU2799035C1 (en) Conveyor totalizer by modulo
SU1667059A2 (en) Device for multiplying two numbers