RU2451988C1 - High-speed apparatus for counting index numbers of high bits in data line - Google Patents

High-speed apparatus for counting index numbers of high bits in data line Download PDF

Info

Publication number
RU2451988C1
RU2451988C1 RU2011117695/08A RU2011117695A RU2451988C1 RU 2451988 C1 RU2451988 C1 RU 2451988C1 RU 2011117695/08 A RU2011117695/08 A RU 2011117695/08A RU 2011117695 A RU2011117695 A RU 2011117695A RU 2451988 C1 RU2451988 C1 RU 2451988C1
Authority
RU
Russia
Prior art keywords
level
input
output
bits
adder
Prior art date
Application number
RU2011117695/08A
Other languages
Russian (ru)
Inventor
Леонид Сергеевич Сотов (RU)
Леонид Сергеевич Сотов
Original Assignee
Государственное образовательное учреждение высшего профессионального образования "Саратовский государственный университет им. Н.Г. Чернышевского"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Государственное образовательное учреждение высшего профессионального образования "Саратовский государственный университет им. Н.Г. Чернышевского" filed Critical Государственное образовательное учреждение высшего профессионального образования "Саратовский государственный университет им. Н.Г. Чернышевского"
Priority to RU2011117695/08A priority Critical patent/RU2451988C1/en
Application granted granted Critical
Publication of RU2451988C1 publication Critical patent/RU2451988C1/en

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

FIELD: information technology.
SUBSTANCE: number of adders used must be greater than O(nlog2n), wherein a delay of not more than t3log2n in counting the index numbers of bits and the total number of high bits is provided, where t3 is the delay of the adder with retention of the carry-over, wherein the number of adders used in the apparatus is equal to nlog2n. The high-speed apparatus for counting the index numbers of high bits in a data line, according to solution, is characterised by that it has n binary inputs
Figure 00000041
for bits of the input data line, n outputs
Figure 00000045
for the index numbers of high bits, a POPCNT output for the number of high bits, n AND elements
Figure 00000046
each having an output Y connected to the output Qj, a first input X1 and a second binary input X2, hierarchical computation levels
Figure 00000047
each having 2m inputs Di and 2m outputs
Figure 00000048
Each computation level
Figure 00000049
consists of a first and a second computation level Lm-i and 2m-1 adders
Figure 00000050
having a first A and a second B input and an output C.
EFFECT: high-speed counting of index numbers of bits and total number of high bits in a data line with length n.
5 dwg

Description

Устройство относится к области обработки информации и может быть использовано в вычислительной технике, системах коммуникации и защиты информации от несанкционированного доступа.The device relates to the field of information processing and can be used in computer technology, communication systems and information protection from unauthorized access.

Известен многовходовый одноразрядный сумматор (см. патент на изобретение RU 2047216, МПК G06F 7/50). Многовходовый одноразрядный сумматор содержит К элементов сложения по модулю два (K[log2n] n разрядность входного двоичного слова), выход r-го из которых

Figure 00000001
соединен с r-м выходом сумматора, отличающийся тем, что содержит p мажоритарных элементов (p[n/2]), s-й из которых
Figure 00000002
имеет порог, равный 2s, i-й вход
Figure 00000003
сумматора соединен с i-м входом первого элемента сложения по модулю два и i-м входом s-го мажоритарного элемента, t-й вход j-го элемента сложения по модулю два
Figure 00000004
соединен с выходом мажоритарного элемента с порогом t·2j-1, (k+1)-й выход сумматора соединен с выходом мажоритарного элемента с порогом 2k.Known multi-input single-digit adder (see patent for invention RU 2047216, IPC G06F 7/50). A multi-input single-bit adder contains K modulo two addition elements (K [log 2 n] n is the bit depth of the input binary word), the output of the rth of which
Figure 00000001
connected to the rth output of the adder, characterized in that it contains p majority elements (p [n / 2]), the s-th of which
Figure 00000002
has a threshold equal to 2s, i-th input
Figure 00000003
the adder is connected to the ith input of the first addition element modulo two and the ith input of the sth majority element, the tth input of the jth addition element modulo two
Figure 00000004
connected to the output of the majority element with a threshold t · 2 j-1 , the (k + 1) -th output of the adder is connected to the output of the majority element with a threshold of 2 k .

Данный многовходовый одноразрядный сумматор можно использовать для расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n. Но для параллельной обработки необходимо использовать n многовходовых одноразрядных сумматоров. При этом общее число сумматоров, используемых в устройстве, составляет O(n2). Недостатком такого решения является существенное усложнение схемы с параллельной обработкой. При использовании последовательной обработки, при которой с использованием одного многовходового одноразрядного сумматора последовательно рассчитывается каждый порядковый номер, существенно возрастает время расчета порядковых номеров битов с высоким логическим уровнем.This multi-input single-bit adder can be used to calculate serial numbers of bits with a high logical level in a data string of length n. But for parallel processing, it is necessary to use n multi-input single-digit adders. Moreover, the total number of adders used in the device is O (n 2 ). The disadvantage of this solution is a significant complication of the circuit with parallel processing. When using sequential processing, in which each serial number is sequentially calculated using a single multi-input single-bit adder, the calculation time of the serial numbers of bits with a high logical level increases significantly.

Известен метод и устройство для подсчета количества бит с высоким логическим уровнем (см. патент на изобретение US 5541865, МПК G06F 7/60, G06F 007/50). Устройство, предназначенное для вычисления числа бит с высоким логическим уровнем элемента данных, включает: первый набор сумматоров с сохранением переноса, состоящий из первого, второго, третьего и четвертого сумматоров, входы которых соединены с входами устройства так, чтобы получить первую, вторую, третью и четвертую битовые части первого элемента данных соответственно, первый и второй сумматоры с сохранением переноса формируют на своих выходах первый многобитовый блок данных, а третий и четвертый сумматоры с сохранением переноса формируют на своих выходах второй многобитовый блок данных; второй набор сумматоров, состоящий из пятого и шестого сумматоров с сохранением переноса, входы которых соединены так, чтобы получить первый и второй многобитовые блоки данных соответственно, пятый и шестой сумматоры с сохранением переноса формируют на своих выходах третий многобитовый блок данных; седьмой сумматор с сохранением переноса, входы которого соединены так, чтобы получить третий многобитовый блок выходных данных, который формирует на своих выходах четвертый многобитовый блок данных; полный сумматор, входы которого соединены так, чтобы получить четвертый многобитовый блок данных, который формирует на своих выходах количество бит с высоким логическим уровнем. Каждый сумматор с сохранением переноса представляет собой 4-2 сумматор с сохранением переноса. Полный сумматор представляет собой четырехбитовый полный сумматор.A known method and device for counting the number of bits with a high logical level (see patent for invention US 5541865, IPC G06F 7/60, G06F 007/50). A device for calculating the number of bits with a high logical level of a data element includes: a first set of adders with conservation of transfer, consisting of the first, second, third and fourth adders, the inputs of which are connected to the inputs of the device so as to obtain the first, second, third and the fourth bit parts of the first data element, respectively, the first and second adders with saving transfer form the first multi-bit data block at their outputs, and the third and fourth adders with saving transfer pho second second multi-bit data block is outputted at its outputs; the second set of adders, consisting of the fifth and sixth adders with transfer conservation, the inputs of which are connected so as to obtain the first and second multi-bit data blocks, respectively, the fifth and sixth adders with transfer conservation form at their outputs a third multi-bit data block; a seventh adder with saving transfer, the inputs of which are connected so as to obtain a third multi-bit block of output data, which forms at its outputs a fourth multi-bit block of data; full adder, the inputs of which are connected in such a way as to obtain a fourth multi-bit data block, which generates at its outputs the number of bits with a high logical level. Each adder with conservation transfer is a 4-2 adder with conservation transfer. The full adder is a four-bit full adder.

Данное устройство можно использовать для расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n. Но для параллельной обработки необходимо использовать n устройств подсчета количества бит с высоким логическим уровнем, при этом общее число используемых сумматоров составляет O(n2). Недостатком такого решения является существенное усложнение схемы с параллельной обработкой. При использовании последовательной обработки существенно возрастает время расчета порядковых номеров битов с высоким логическим уровнем.This device can be used to calculate serial numbers of bits with a high logical level in a data string of length n. But for parallel processing, it is necessary to use n devices for counting the number of bits with a high logical level, while the total number of adders used is O (n 2 ). The disadvantage of this solution is a significant complication of the circuit with parallel processing. When using sequential processing, the calculation time of serial numbers of bits with a high logical level increases significantly.

Известно устройство для расчета количества бит с высоким логическим уровнем (см. патент на изобретение US 6754685, МПК G06F 5/01, G06F 7/60, G06F 007/00). Устройство выполняет функцию расчета количества бит с высоким логическим уровнем входной строки данных и функцию сдвига данных. Метод, положенный в основу работы устройства, обеспечивает баланс между нагрузкой счетчиков числа бит с высоким логическим уровнем и схем сдвига данных. Это приводит к увеличению скорости выполнения операции. Устройство имеет входы для битов первого вектора, второго вектора, средства для вычисления числа бит с высоким логическим уровнем первого вектора, средства для осуществления операции сдвига множества бит второго вектора на основе результатов расчета числа бит с высоким логическим уровнем первого вектора, средств для формирования третьего вектора, получающегося на основе операции сдвига. Устройство состоит из множества динамических уровней, за которыми следуют статические уровни. На динамических уровнях используются динамические узлы, которые вычисляют величины, зависящие от отдельных бит указателя и разреженного вектора. Устройство расширяется путем повторения базовой схемы, поэтому оно может быть изменено в соответствии с размером указателя и разреженного вектора.A known device for calculating the number of bits with a high logical level (see patent for invention US 6754685, IPC G06F 5/01, G06F 7/60, G06F 007/00). The device performs the function of calculating the number of bits with a high logical level of the input data string and the data shift function. The method underlying the operation of the device provides a balance between the load of counters of the number of bits with a high logical level and data shift schemes. This leads to an increase in the speed of the operation. The device has inputs for the bits of the first vector, the second vector, means for calculating the number of bits with a high logical level of the first vector, means for shifting the set of bits of the second vector based on the results of calculating the number of bits with a high logical level of the first vector, means for generating the third vector resulting from a shift operation. The device consists of many dynamic levels, followed by static levels. At dynamic levels, dynamic nodes are used that calculate values depending on the individual bits of the pointer and a sparse vector. The device is expanded by repeating the basic scheme, so it can be changed in accordance with the size of the pointer and the sparse vector.

Данное устройство можно использовать для расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n. Но для параллельной обработки необходимо использовать n устройств подсчета количества бит с высоким логическим уровнем, при этом аппаратурная сложность устройства составляет O(n2). Недостатком такого решения является существенное усложнение схемы с параллельной обработкой. При использовании последовательной обработки существенно возрастает время расчета порядковых номеров битов с высоким логическим уровнем.This device can be used to calculate serial numbers of bits with a high logical level in a data string of length n. But for parallel processing, it is necessary to use n devices for counting the number of bits with a high logical level, while the hardware complexity of the device is O (n 2 ). The disadvantage of this solution is a significant complication of the circuit with parallel processing. When using sequential processing, the calculation time of serial numbers of bits with a high logical level increases significantly.

Известно устройство и метод для расчета количества бит с высоким логическим уровнем (см. патент на изобретение US 5717616 США, МПК G06F 7/60, G06F 017/00). Устройство предназначено для вычисления числа бит с высоким логическим уровнем в строках большой длины. При этом вся строка разделяется более мелкие части и для каждой из частей рассчитывается число бит с высоким логическим уровнем. Для ускорения выполнения операции используются сумматоры с сохранением переноса. Устройство состоит из регистра данных, содержащего строку битов, в которой рассчитывается число битов с высоким логическим уровнем, множества полных сумматоров, каждый из которых имеет выход и суммирует биты с высоким логическим уровнем из уникального набора битов из регистра данных, множества сумматоров с сохранением переноса, каждый из которых имеет выход, и суммирует биты с высоким логическим уровнем из уникального набора битов из аккумулирующего регистра. Каждый из сумматоров с сохранением переноса формирует уникальный набор выходных данных в регистре назначения, где регистр назначения хранит количество бит с высоким логическим уровнем из подмножества бит регистра данных и группу бит из аккумулирующего регистра в формате суммы с сохранением переноса. Множество полных сумматоров образуют иерархическую структуру так, что первый уровень сумматоров рассчитывает число бит с высоким логическим уровнем, хранящихся в регистре данных. Входы полных сумматоров второго уровня соединены с выходами сумматоров первого уровня так, что каждый из сумматоров второго уровня складывает результаты на выходах двух сумматоров первого уровня, причем каждый из выходов сумматора первого уровня соединен с одним входом сумматора второго уровня. Число полных сумматоров первого уровня составляет половину от числа бит в регистре данных, число полных сумматоров на втором уровне составляет четверть от числа бит в регистре данных. Сумматоры с сохранением переноса суммируют одинаковое количество бит. Роль регистра назначения и аккумулирующего регистра выполняет один и тот же регистр.A device and method are known for calculating the number of bits with a high logical level (see US Patent No. 5717616, IPC G06F 7/60, G06F 017/00). The device is designed to calculate the number of bits with a high logical level in long strings. In this case, the entire line is divided into smaller parts and for each part the number of bits with a high logical level is calculated. To speed up the operation, adders are used with saving transfer. The device consists of a data register containing a string of bits in which the number of bits with a high logical level is calculated, a set of full adders, each of which has an output and sums bits with a high logical level from a unique set of bits from the data register, a set of adders with transfer preservation, each of which has an output, and sums the bits with a high logical level from a unique set of bits from the accumulation register. Each of the adders with transfer preservation forms a unique set of output data in the destination register, where the destination register stores the number of bits with a high logical level from a subset of bits of the data register and a group of bits from the accumulating register in the sum format with transfer preservation. Many complete adders form a hierarchical structure so that the first level of adders calculates the number of bits with a high logical level stored in the data register. The inputs of the full second-level adders are connected to the outputs of the first-level adders so that each of the second-level adders adds the results at the outputs of two first-level adders, and each of the outputs of the first-level adder is connected to one input of the second-level adder. The number of full adders of the first level is half the number of bits in the data register, the number of full adders in the second level is a quarter of the number of bits in the data register. Adders with saving transfer sum the same number of bits. The role of the destination register and the accumulating register is performed by the same register.

Данное устройство можно использовать для расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n. Но для параллельной обработки необходимо использовать n устройств подсчета количества бит с высоким логическим уровнем, при этом общее число используемых сумматоров составляет O(n2). Недостатком такого решения является существенное усложнение схемы с параллельной обработкой. При использовании последовательной обработки существенно возрастает время расчета порядковых номеров битов с высоким логическим уровнем.This device can be used to calculate serial numbers of bits with a high logical level in a data string of length n. But for parallel processing, it is necessary to use n devices for counting the number of bits with a high logical level, while the total number of adders used is O (n 2 ). The disadvantage of this solution is a significant complication of the circuit with parallel processing. When using sequential processing, the calculation time of serial numbers of bits with a high logical level increases significantly.

Задачей настоящего решения является разработка быстродействующего устройства расчета порядковых номеров битов и общего числа бит с высоким логическим уровнем в строке данных длиной n, при этом число используемых сумматоров должно быть более O(nlog2n).The objective of this solution is to develop a high-speed device for calculating serial numbers of bits and the total number of bits with a high logical level in a data string of length n, while the number of adders used should be more than O (nlog 2 n).

Техническим результатом является обеспечение задержки расчета порядковых номеров битов и общего числа бит с высоким логическим уровнем не более t3log2n, где t3 - задержка сумматора с сохранением переноса, при этом число используемых в устройстве сумматоров составляет nlog2n.The technical result is the delay in calculating the serial numbers of bits and the total number of bits with a high logical level of not more than t 3 log 2 n, where t 3 is the delay of the adder with saving transfer, while the number of adders used in the device is nlog 2 n.

Поставленная задача достигается тем, что быстродействующее устройство расчета порядковых номеров битов с высоким логическим уровнем в строке данных длинойThe problem is achieved in that a high-speed device for calculating serial numbers of bits with a high logical level in a data line of length

n=2k бит, где k - положительное целое число, согласно изобретению содержит n бинарных входов

Figure 00000005
битов входной строки данных, n выходов
Figure 00000006
порядковых номеров битов с высоким логическим уровнем, выход POPCNT количества битов с высоким логическим уровнем, n элементов логического умножения
Figure 00000007
, каждый из которых имеет выход Y, соединеный с выходом Qj, первый вход X1 и второй бинарный вход Х2, иерархические вычислительные уровни
Figure 00000008
, каждый из которых имеет 2m входов Di и 2m выходов
Figure 00000009
, причем каждый вычислительный уровень
Figure 00000010
состоит из первого и второго вычислительных уровней Lm-1 и 2m-1 сумматоров
Figure 00000011
, имеющих первый А и второй В входы и выход С, каждый вход
Figure 00000012
уровня Lm соединен с входом Di первого вычислительного уровня Lm-1, каждый вход Dq, где q=i+2m-1, уровня Lm соединен с входом Di второго уровня Lm-1, каждый выход Si первого уровня Lm-1 соединен с выходом Si уровня Lm, выход Sp, где p=2m-1, первого уровня Lm-1 дополнительно соединен со вторыми входами В сумматоров
Figure 00000013
, каждый выход Si второго уровня Lm-1 соединен с первым входом А сумматора SMi,m, каждый выход С сумматора SMi,m соединен с выходом Sq, где q=i+2m-1, уровня Lm, a каждый вычислительный уровень L1 состоит из сумматора SM11, имеющего первый А и второй В входы и выход С, причем первый вход А сумматора соединен с входом D1 и выходом S1, второй вход В сумматора соединен с входом D2, выход С сумматора соединен с выходом S2, каждый вход
Figure 00000014
вычислительного уровня Lk соединен с входом устройства DSj, каждый выход
Figure 00000015
уровня Lk соединен с первым входом X1 элемента Иj, выход Sn уровня Lk дополнительно соединен с выходом POPCNT устройства, каждый вход Dj уровня Lk дополнительно соединен со вторым бинарным входом Х2 элемента Иj.n = 2 k bits, where k is a positive integer, according to the invention contains n binary inputs
Figure 00000005
bits of input data string, n outputs
Figure 00000006
serial numbers of bits with a high logical level, output POPCNT the number of bits with a high logical level, n elements of logical multiplication
Figure 00000007
, each of which has an output Y connected to the output Q j , the first input X1 and the second binary input X2, hierarchical computing levels
Figure 00000008
, each of which has 2 m inputs D i and 2 m outputs
Figure 00000009
, and each computing level
Figure 00000010
consists of the first and second computational levels L m-1 and 2 m-1 adders
Figure 00000011
having first A and second B inputs and output C, each input
Figure 00000012
level L m is connected to the input D i of the first computing level L m-1 , each input D q , where q = i + 2 m-1 , level L m is connected to the input D i of the second level L m-1 , each output S i the first level L m-1 is connected to the output S i of the level L m , the output is S p , where p = 2 m-1 , the first level L m-1 is additionally connected to the second inputs B of the adders
Figure 00000013
, each output S i of the second level L m-1 is connected to the first input A of the adder SM i, m , each output C of the adder SM i, m is connected to the output S q , where q = i + 2 m-1 , level L m , a each computing level L 1 consists of an adder SM 11 having first A and second B inputs and output C, the first input A of the adder connected to input D 1 and output S 1 , the second input B of the adder connected to input D 2 , output C the adder is connected to the output S 2 , each input
Figure 00000014
computing level L k connected to the input of the device DS j , each output
Figure 00000015
the level L k is connected to the first input X1 of the element And j , the output S n of the level L k is additionally connected to the output POPCNT of the device, each input D j of the level L k is additionally connected to the second binary input X2 of the element And j .

Изобретение поясняется чертежами, где на фиг.1 приведена схема устройства расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n=8, на фиг.2 приведена схема вычислительного уровня L1, на фиг.3 приведена схема вычислительного уровня L2, на фиг.4 приведена структурно-функциональная схема вычислительного уровня L3 устройства, на фиг.5 приведена диаграмма орграфа матрицы сумматоров устройства для случая n=16, гдеThe invention is illustrated by drawings, where Fig. 1 shows a diagram of a device for calculating serial numbers of bits with a high logical level in a data string of length n = 8, Fig. 2 shows a diagram of a computing level L 1 , Fig. 3 shows a diagram of a computing level L 2 , figure 4 shows the structural-functional diagram of the computing level L 3 of the device, figure 5 shows a diagram of the digraph of the matrix of adders of the device for the case n = 16, where

SM11-SM43 сумматоры;SM 11 -SM 43 totalizers;

А, В - первый и второй входы сумматора;A, B - the first and second inputs of the adder;

С - выход сумматора;C is the output of the adder;

L1, L2, L3, - вычислительные уровни;L 1 , L 2 , L 3 - computing levels;

D1, D2 - входы вычислительного уровня L1;D 1 , D 2 - inputs of the computing level L 1 ;

D1-D4 - входы вычислительного уровня L2;D 1 -D 4 - inputs of the computing level L 2 ;

D1-D8 - входы вычислительного уровня L3;D 1 -D 8 - inputs of the computing level L 3 ;

D1-D16 - входы вычислительного уровня L4;D 1 -D 16 - inputs of the computing level L 4 ;

S1,S2 - выходы результатов суммирования вычислительного уровня L1;S 1 , S 2 - outputs of the summation results of the computational level L 1 ;

S1-S4 - выходы результатов суммирования вычислительного уровня L2;S 1 -S 4 - outputs of the summation of the computational level L 2 ;

S1-S8 - выходы результатов суммирования вычислительного уровня L3,S 1 -S 8 - the outputs of the summation of the computational level L 3 ,

S1-S16 - выходы результатов суммирования вычислительного уровня L4;S 1 -S 16 - outputs of the summation of the computational level L 4 ;

DS1-DS8 - бинарные входы битов входной строки данных устройства;DS 1 -DS 8 - binary inputs of the bits of the input data string of the device;

Q1-Q8 - выходы значений порядковых номеров битов с высоким логическим уровнем;Q 1 -Q 8 - outputs of the values of serial numbers of bits with a high logical level;

POPCNT - выход количества битов с высоким логическим уровнем;POPCNT - output of the number of bits with a high logical level;

И18 - логические элементы И;And 1 - And 8 - logical elements And;

X1 - первый вход логического элемента И;X1 - the first input of the logical element And;

Х2 - второй бинарный вход логического элемента И;X2 - the second binary input of the logical element And;

Y - выход логического элемента И.Y is the output of the logical element I.

В общем случае предлагаемое устройство имеет n бинарных входов DS1-DSn для получения битов входной строки данных, n выходов Q1-Qn результатов расчета порядковых номеров битов с высоким логическим уровнем, выход POPCNT результатов расчета количества бит с высоким логическим уровнем. Устройство содержит сумматоры SMi,j, имеющие первый А и второй В входы для подачи суммируемых величин и выход С результатов суммирования чисел, подаваемых на входы А и В. Сумматоры SMi,j образуют матрицу с k=log2n стадиями суммирования и n линиями (фиг.5), причем индекс i, указывающий номер сумматора, на стадии суммирования, меняется от 1 до 2k-1, а индекс j, указывающий номер стадии суммирования, меняется от 1 до k. На каждой стадии суммирования расположено n/2 сумматоров. Устройство также содержит n элементов логического умножения И1, И2…, Иn, каждый из которых имеет выход Y, первый вход X1 и второй бинарный вход Х2, при этом число на выходе Y равно числу на входе XI, если на вход Х2 подается сигнал с высоким логическим уровенем, если на вход Х2 подается сигнал с низким логическим уровнем, то на выходе Y образуется код числа, равного нулю.In the general case, the proposed device has n binary inputs DS 1 -DS n for receiving bits of an input data string, n outputs Q 1 -Q n results of calculating the serial numbers of bits with a high logical level, output POPCNT of the results of calculating the number of bits with a high logical level. The device contains adders SM i, j having first A and second B inputs for supplying summed quantities and output C of the results of summing the numbers supplied to inputs A and B. Adders SM i, j form a matrix with k = log 2 n stages of summation and n lines (Fig. 5), and the index i indicating the number of the adder at the stage of summation varies from 1 to 2 k-1 , and the index j indicating the number of the stage of summation varies from 1 to k. At each stage of the summation, n / 2 totalizers are located. The device also contains n logical multiplication elements AND 1 , AND 2 ..., AND n , each of which has an output Y, a first input X1 and a second binary input X2, while the number at the output Y is equal to the number at the input XI, if the input X2 is supplied a signal with a high logic level, if a signal with a low logic level is fed to input X2, then a code of a number equal to zero is generated at the output Y.

Ниже приведены два способа описания соединений сумматоров.The following are two ways to describe adder connections.

Для описания первого способа рассматривается матрица с числом линий n и числом стадий суммирования (столбцов) k=log2n.To describe the first method, we consider a matrix with the number of lines n and the number of stages of summation (columns) k = log 2 n.

Устройство содержит nk/2 сумматоров, которые располагаются в матрице приведенным ниже способом, при этом на каждой стадии суммирования находится n/2 сумматоров. Расположение сумматоров иллюстрируется диаграммой орграфа для случая n=16, k=4, представленной на фиг.5. Во всех вершинах, кроме висячих, определяющих входы и выходы матрицы, расположены сумматоры. Входы D1-D16 матрицы соединены с соответстующими входами DS1-DS16 устройства. Матрица имеет выходы S1-S16. Каждый выход

Figure 00000016
матрицы соединен с входом X1 элемента логического умножения Иi. На фиг.5 представлены 4 стадии суммирования j=1, j=2, j=3, j=4. Каждая вершина орграфа, в которой расположен сумматор, имеет две входящие дуги и одну или несколько исходящих дуг. Две входящие дуги определяют соединения первого А и второго В входов сумматора. Исходящие дуги определяют соединения выхода сумматора.The device contains nk / 2 adders, which are located in the matrix as described below, with n / 2 adders at each stage of the summation. The location of the adders is illustrated by a digraph diagram for the case n = 16, k = 4, presented in figure 5. At all vertices, except for the hanging ones, which determine the inputs and outputs of the matrix, adders are located. The inputs D 1 -D 16 matrix connected to the corresponding inputs DS 1 -DS 16 device. The matrix has outputs S 1 -S 16 . Every exit
Figure 00000016
matrix is connected to the input X1 of the element of logical multiplication And i . Figure 5 presents 4 stages of summation j = 1, j = 2, j = 3, j = 4. Each vertex of the digraph in which the adder is located has two incoming arcs and one or more outgoing arcs. Two incoming arcs define the connections of the first A and second B inputs of the adder. Outgoing arcs define the output connections of the adder.

Сумматоры первой стадии расположены на четных линиях с номерами 2i,

Figure 00000017
. Сумматоры второй стадии расположены на линиях с номерами 4i и
Figure 00000018
. Сумматоры третьей стадии расположены на линиях с номерами 8i, 8i-1, 8i-2,
Figure 00000019
. В общем случае сумматоры стадии
Figure 00000020
расположены на линиях с номерами
Figure 00000021
Каждый вход
Figure 00000022
соединен с входом A первого, ближайшего к входу DSi, сумматора, расположенного на линии i, если такого сумматора нет, вход DSi соединен с выходом Si. Выход С каждого сумматора, расположенного на линии
Figure 00000023
и стадии
Figure 00000024
соединен с входом А сумматора следующей за j стадии, расположенного на линии i, причем если на линии i нет ни одного сумматора на стадиях с номером, большим j, то выход С соединен с выходом Si.The first stage adders are located on even lines with numbers 2i,
Figure 00000017
. The second stage adders are located on the lines with numbers 4i and
Figure 00000018
. The adders of the third stage are located on the lines with numbers 8i, 8i-1, 8i-2,
Figure 00000019
. In general, stage adders
Figure 00000020
located on lines with numbers
Figure 00000021
Every entry
Figure 00000022
connected to input A of the first adder closest to input DS i located on line i; if there is no such adder, input DS i is connected to output S i . Output From each adder located on the line
Figure 00000023
and stages
Figure 00000024
connected to the input A of the adder of the next stage after j located on line i, and if on line i there are no adders in stages with a number greater than j, then output C is connected to output S i .

Каждый вход матрицы

Figure 00000025
дополнительно соединен с входом В сумматора МSi,1, расположенного на линии 2i первой стадии. Выход С каждого сумматора MSi,1, расположенного на линии
Figure 00000026
первой стадии дополнительно соединен с входами В двух сумматоров, расположенных на второй стадии, на линиях с номерами 4i и
Figure 00000018
. Выход С каждого сумматора, расположенного на линии
Figure 00000027
второй стадии дополнительно соединен с входами В четырех сумматоров, расположенных на четырех линиях с номерами 8i, 8i-1, 8i-2,
Figure 00000028
третьей стадии. В общем случае, выход С каждого сумматора стадии
Figure 00000029
расположенного на линии с номером
Figure 00000030
дополнительно соединен с входами В 2j сумматоров, расположенных на линиях с номерами
Figure 00000031
стадии j+1.Each matrix input
Figure 00000025
additionally connected to the input B of the adder MS i, 1 located on the line 2i of the first stage. Output From each adder MS i, 1 located on the line
Figure 00000026
the first stage is additionally connected to the inputs of two adders located in the second stage, on the lines with numbers 4i and
Figure 00000018
. Output From each adder located on the line
Figure 00000027
the second stage is additionally connected to the inputs of four adders located on four lines with numbers 8i, 8i-1, 8i-2,
Figure 00000028
third stage. In general, the output of each stage adder
Figure 00000029
located on the line with the number
Figure 00000030
additionally connected to the inputs of 2 j adders located on the lines with numbers
Figure 00000031
stage j + 1.

Описанная выше матрица с числом линий n и числом стадий суммирования k=log2n, имеющая входы D1-Dn и выходы S1-Sn представляет собой вычислительный уровень Lk c входами D1-Dn и выходами S1-Sn. Альтернативный способ построения уровня Lk и соединения входов D1-Dn и входов S1-Sn приведен далее.The matrix described above with the number of lines n and the number of stages of summation k = log 2 n, having inputs D 1 -D n and outputs S 1 -S n represents the computing level L k with inputs D 1 -D n and outputs S 1 -S n An alternative way of constructing the level L k and connecting the inputs D 1 -D n and the inputs S 1 -S n is given below.

Согласно второму способу для описания соединений сумматоры SMi,j удобно сгруппировать в вычислительные уровни

Figure 00000032
. Некоторые вычислительные уровни L1, L2, L3 выделены на диаграмме орграфа, представленной на фиг.5. Каждый уровень Lm имеет r=2m входов результатов вычислений D1, D2,…,Dr и r выходов результатов вычислений S1, S2,…,Sr. При этом, как показано на фиг.2, вычислительный уровень L1 состоит из сумматора SM11, первый вход А которого соединен с входом D1 и с выходом S1, второй вход В соединен с входом D2, а выход С соединен с выходом S2.According to the second method , it is convenient to group the adders SM i, j into the computational levels to describe the connections
Figure 00000032
. Some computational levels L 1 , L 2 , L 3 are highlighted in the digraph diagram shown in FIG. Each level L m has r = 2 m inputs of the results of calculations D 1 , D 2 , ..., D r and r outputs of the results of calculations S 1 , S 2 , ..., S r . Moreover, as shown in figure 2, the computing level L 1 consists of an adder SM 11 , the first input A of which is connected to the input D 1 and to the output S 1 , the second input B is connected to the input D 2 , and the output C is connected to the output S 2 .

На фиг.3 представлен вычислительный уровень L2. Он состоит из первого и второго уровней L1 и двух сумматоров SM12 и SM22. Входы D1-D4 уровня L2 образованы входами D1,D2 уровней L1. При этом вход D1 уровня L2 соединен с входом D1 первого уровня L1, вход D2 уровня L2 соединен с входом D2 первого уровня L1, вход D3, уровня L2 соединен с входом D1 второго уровня L1, вход D4 уровня L2 соединен с входом D2 второго уровня L1. Выход S1 уровня L2 соединен с выходом S1 первого уровня L1, выход S2 уровня L2 соединен с выходом S2 первого уровня L1, выход S3 уровня L2 соединен с выходом С первого сумматора SM12, а выход S4 уровня L2 соединен с выходом С второго сумматора SM22. При этом выход S2 первого уровня L1 дополнительно соединен с входом В первого сумматора SM12 и с входом В второго сумматора SM22, выход S1 второго уровня L1 соединен с входом А первого сумматора SM12, выход S2 второго уровня L1 соединен с входом А второго сумматора SM22.Figure 3 presents the computing level L 2 . It consists of the first and second levels L 1 and two adders SM 12 and SM 22 . The inputs D 1 -D 4 level L 2 formed by the inputs D 1 , D 2 levels L 1 . The input D 1 of level L 2 is connected to the input D 1 of the first level L 1 , the input D 2 of level L 2 is connected to the input D 2 of the first level L 1 , the input D 3 , level L 2 is connected to the input D 1 of the second level L 1 , the input D 4 of level L 2 is connected to the input D 2 of the second level L 1 . The output S 1 of level L 2 is connected to the output S 1 of the first level L 1 , the output S 2 of level L 2 is connected to the output S 2 of the first level L 1 , the output S 3 of level L 2 is connected to the output C of the first adder SM 12 , and the output S 4 levels L 2 is connected to the output C of the second adder SM 22 . Moreover, the output S 2 of the first level L 1 is additionally connected to the input B of the first adder SM 12 and to the input B of the second adder SM 22 , the output S 1 of the second level L 1 is connected to the input A of the first adder SM 12 , the output S 2 of the second level L 1 connected to input A of the second adder SM 22 .

На фиг.1 представлено устройство для расчета порядковых номеров битов с высоким логическим уровнем для случая n=8. Устройство содержит четыре вычислительных уровня L1, два вычислительных уровня L2, один вычислительный уровень L3. Причем уровни L1 находятся внутри уровней L2 и не изображены на фиг.1. Устройство также содержит элементы логического умножения И18. Выходы уровня L3 соединены через элементы логического умножения с выходами устройства. Уровень L3 включает первый и второй уровни L2 и четыре сумматора SM13, SM23, SM33, SM43. Входы D1-D4 уровня L3 образованы входами D1-D4 первого уровня L2. Входы D5-D8 уровня L3 образованы входами D1-D4, второго уровня L2. Выходы S1-S4 первого уровня L2 образуют выходы S1-S4 уровня L3 и соединены с первыми входами X1 элементов логического умножения И14. Выходы С сумматоров SM13, SM23, SM33, SM43 уровня L3 образуют выходы S5-S8 и соединены с первыми входами элементов логического умножения И58. Вторые бинарные входы Х2 элементов логического умножения И18 соединены с входами устройства D1-D8. Выход S4 первого уровня L2, входящего в состав уровня L3, дополнительно соединен с входами В сумматоров SM13, SM23, SM33, SM43. Выход POPCNT устройства соединен с выходом С сумматора SM43.Figure 1 shows a device for calculating the serial numbers of bits with a high logical level for the case n = 8. The device contains four computing levels L 1 , two computing levels L 2 , one computing level L 3 . Moreover, the levels of L 1 are inside the levels of L 2 and are not shown in Fig.1. The device also contains elements of logical multiplication AND 1 -AND 8 . The outputs of level L 3 are connected through the elements of logical multiplication with the outputs of the device. Level L 3 includes the first and second levels L 2 and four adders SM 13 , SM 23 , SM 33 , SM 43 . The inputs D 1 -D 4 level L 3 formed by the inputs D 1 -D 4 of the first level L 2 . The inputs D 5 -D 8 level L 3 formed by the inputs D 1 -D 4 , the second level L 2 . The outputs S 1 -S 4 of the first level L 2 form the outputs S 1 -S 4 of the level L 3 and are connected to the first inputs X1 of the elements of logical multiplication AND 1 -AND 4 . The outputs from the adders SM 13 , SM 23 , SM 33 , SM 43 level L 3 form the outputs S 5 -S 8 and are connected to the first inputs of the elements of logical multiplication AND 5 -and 8 . The second binary inputs X2 of the elements of logical multiplication AND 1 -AND 8 are connected to the inputs of the device D 1 -D 8 . The output S 4 of the first level L 2 , which is part of the level L 3 , is additionally connected to the inputs B of the adders SM 13 , SM 23 , SM 33 , SM 43 . The POPCNT output of the device is connected to the output C of the adder SM 43 .

В общем случае устройство для расчета порядковых номеров битов с высоким логическим уровнем в бинарной строке данных длиной n=2k, где k - положительное целое число, имеет n бинарных входов DS1,DS2,…,DSn битов входной строки данных, n выходов Q1,Q2,…,Qn порядковых номеров битов с высоким логическим уровнем, выход POPCNT количества битов с высоким логическим уровнем. Устройство содержит 2k-1 вычислительных уровней L1, 2k-2 вычислительных уровней L2, 2k-3 вычислительных уровней L3, один вычислительный уровень Lk. В общем случае устройство содержит 2k-m вычислительных уровней

Figure 00000033
. Каждый вычислительный уровень
Figure 00000010
состоит из первого и второго вычислительных уровней Lm-1 и 2m-1 сумматоров
Figure 00000034
, имеющих первый А и второй В входы для подачи суммируемых чисел и выход С результатов суммирования чисел на входах А и В. Каждый вход Di уровня Lm образован входом Di первого вычислительного уровня Lm-1, каждый вход Dq, где q=i+2m-1, уровня Lm образован входом Di второго уровня Lm-1. Каждый выход Si первого уровня Lm-1 образует выход Si уровня Lm, выход Sp, где p=2m-1, первого уровня Lm-1 дополнительно соединен со вторыми входами В сумматоров SMi,m. Каждый выход Si второго уровня Lm-1 соединен с первым входом А сумматора SMi,m, каждый выход С сумматора SMi,m образует выход Sq, где q=i+2m-1, уровня Lm. Вычислительный уровень L1 имеет бинарные входы D1,D2, выходы S1,S2 и состоит из сумматора SM11, имеющего первый А и второй В входы для подачи суммируемых чисел и выход С результатов суммировния чисел на входах А и В, причем первый вход А сумматора соединен с входом D1 и выходом S1, второй вход В сумматора соединен с входом D2, выход С сумматора соединен с выходом S2. Уровень Lk имеет n бинарных входов D1,D2,…,Dn, образующих входы устройства DS1,DS2,…,DSn, n выходов S1,S2…,Sn результатов суммирования. Устройство также содержит n элементов логического умножения И12,…,Иn. Каждый элемент логического умножения имеет выход Y, первый вход X1 и второй бинарный вход Х2, при этом число на выходе Y равно числу на входе X1, если на вход Х2 подается высокий логический уровень, если на входе Х2 низкий логический уровень, то число на выходе Y равно нулю. Каждый выход результатов суммирования Si уровня Lk соединен с первым входом X1 элемента логического умножения Иi, где i=1,…,n. Выход результатов суммирования Sn уровня Lk дополнительно соединен с выходом POPCNT устройства. Каждый вход Di уровня Lk соединен со вторым бинарным входом Х2 элемента логического умножения
Figure 00000035
. Каждый выход Y элемента логического умножения Иi образует выход Qi порядкового номера бита с высоким логическим уровнем.In the general case, a device for calculating serial numbers of bits with a high logical level in a binary data string of length n = 2 k , where k is a positive integer, has n binary inputs DS 1 , DS 2 , ..., DS n bits of the input data string, n outputs Q 1 , Q 2 , ..., Q n serial numbers of bits with a high logical level, output POPCNT the number of bits with a high logical level. The device contains 2 k-1 computing levels L 1 , 2 k-2 computing levels L 2 , 2 k-3 computing levels L 3 , one computing level L k . In general, a device contains 2 km of computational levels
Figure 00000033
. Every computing level
Figure 00000010
consists of the first and second computational levels L m-1 and 2 m-1 adders
Figure 00000034
having first A and second B inputs for supplying summed numbers and output C of the results of summing the numbers at inputs A and B. Each input D i of level L m is formed by input D i of the first computing level L m-1 , each input D q , where q = i + 2 m-1 , level L m is formed by the input D i of the second level L m-1 . Each output S i of the first level L m-1 forms the output S i of the level L m , the output S p , where p = 2 m-1 , of the first level L m-1 is additionally connected to the second inputs B of the adders SM i, m . Each output S i of the second level L m-1 is connected to the first input A of the adder SM i, m , each output C of the adder SM i, m forms the output S q , where q = i + 2 m-1 , level L m . The computing level L 1 has binary inputs D 1 , D 2 , outputs S 1 , S 2 and consists of an adder SM 11 having first A and second B inputs for supplying summed numbers and output C of the results of summing the numbers at inputs A and B, moreover the first input A of the adder is connected to the input D 1 and the output S 1 , the second input B of the adder is connected to the input D 2 , the output C of the adder is connected to the output S 2 . The level L k has n binary inputs D 1 , D 2 , ..., D n forming the inputs of the device DS 1 , DS 2 , ..., DS n , n outputs S 1 , S 2 ..., S n of the summation results. The device also contains n logical multiplication elements AND 1 , AND 2 , ..., AND n . Each logical multiplication element has an output Y, a first input X1 and a second binary input X2, while the number at output Y is equal to the number at input X1, if high logic level is applied to input X2, if logic level is low at input X2, then the number at output Y is zero. Each output of the summation results S i of the level L k is connected to the first input X1 of the logical multiplication element And i , where i = 1, ..., n. The output of the summation results S n of the level L k is additionally connected to the output of the POPCNT device. Each input D i of level L k is connected to the second binary input X2 of the logical multiplication element
Figure 00000035
. Each output Y of the logical multiplication element And i forms the output Q i of the serial number of the bit with a high logical level.

Устройство работает следующим образом. На бинарные входы DS1, DS2,…, DSn устройства для расчета порядковых номеров битов с высоким логическим уровнем поступают биты входной строки данных. Через время задержки t3 на выходах Q1,Q2,…,Qn устройства появляются значения порядковых номеров битов с высоким логическим уровнем во входной строке данных. Скорость выполнения операции зависит от типа используемых сумматоров. Если задержка сумматора не зависит от числа суммируемых разрядов и равна t3, задержка выполнения предлагаемым устройством расчета порядковых номеров битов с высоким логическим уровнем составляет t3log2(n)+tЗИ, где tЗИ - задержка на логическом элементе И, которой обычно можно пренебречь. Задержка формирования результата на выходе POPCNT равна t3log2(n).The device operates as follows. The binary inputs DS 1 , DS 2 , ..., DS n of the device for calculating the serial numbers of bits with a high logical level receive the bits of the input data line. After a delay time t 3 at the outputs Q 1 , Q 2 , ..., Q n of the device, the values of the serial numbers of bits with a high logical level appear in the input data line. The speed of the operation depends on the type of adders used. If the delay of the adder does not depend on the number of bits to be summed and is equal to t 3 , the delay in performing the proposed device for calculating the serial numbers of bits with a high logical level is t 3 log 2 (n) + t ЗИ , where t ЗИ is the delay on the logical element And, which usually can be neglected. The delay in generating the result at the output of POPCNT is t 3 log 2 (n).

В качестве сумматоров

Figure 00000036
могут использоваться сумматоры с сохранением переноса, сумматоры с последовательным переносом, сумматоры со сквозным переносом, сумматоры с ускоренным переносом и другие сумматоры, описанные, например, в книгах Жан М. Рабаи, Ананта Чандракасан, Боривож Николич. Цифровые интегральные схемы. Методология проектирования. М.: Вильямс, 2007. 912 с., или Хамахер К., Вранешич 3., Заки С. Организация ЭВМ. 5-е изд. СПб.: Питер; Киев: Изд. группа BHV, 2003. 848 с. При расчете порядковых номеров битов с высоким логическим уровнем в n разрядной строке данных используются сумматоры входных данных с числом разрядов от 1 до log2n.As adders
Figure 00000036
adders with conservation of transfer, adders with sequential transfer, adders with through transfer, adders with accelerated transfer and other adders described, for example, in the books of Jean M. Rabai, Ananta Chandrakasan, Borivozh Nikolic, can be used. Digital integrated circuits. Design methodology. M.: Williams, 2007. 912 pp., Or Hamacher K., Vranesic 3., Zaki S. Computer Organization. 5th ed. SPb .: Peter; Kiev: Publ. BHV Group, 2003.848 s. When calculating the serial numbers of bits with a high logical level in the n bit data row, input data adders with the number of bits from 1 to log 2 n are used.

В качестве сумматоров SMi,j могут также использоваться сумматоры по модулю 2. В этом случае устройство определяет четность или нечетность порядкового номера бита с высоким логическим уровнем в строке данных. В общем случае, если используются сумматоры по модулю d, порядковые номера битов с высоким логическим уровнем в строке данных также будут вычисляться по модулю d.Modulo 2 adders can also be used as adders SM i, j . In this case, the device determines the parity or oddness of the serial number of the bit with a high logical level in the data line. In the general case, if adders modulo d are used, the serial numbers of bits with a high logic level in the data line will also be computed modulo d.

Число разрядов суммируемых сумматорами SMi,j величин различно. У сумматора SMi,j уровня

Figure 00000037
на первый вход поступает число с количеством двоичных разрядов от 1 до j, а на второй вход поступает число с количеством двоичных разрядов j.The number of bits summed by the adders SM i, j is different. At the adder SM i, j level
Figure 00000037
the first input receives a number with the number of binary digits from 1 to j, and the second input receives a number with the number of binary digits j.

Для ускорения работы уровни L2, L3 и т.д. можно рассматривать как единые устройства, не имеющие иерархической структуры, реализующие логические функции в соответствии с приведенным описанием. При этом осуществляется оптимизация быстродействия уровней L2, L3 и т.д.To speed up the levels of L 2 , L 3 , etc. can be considered as single devices that do not have a hierarchical structure that implement logical functions in accordance with the above description. In this case, performance optimization of the levels L 2 , L 3 , etc.

Устройство можно использовать при значениях длины входной строки данных n, отличной от степени числа 2. При этом используется только часть сумматоров, на которые поступают биты строки входных данных. Неиспользуемые сумматоры можно исключить из устройства.The device can be used with values of the input data string length n different from the power of the number 2. In this case, only part of the adders that receive the bits of the input data string are used. Unused totalizers can be excluded from the device.

Таким образом, устройство выполняет расчет порядковых номеров битов с высоким логическим уровнем входной бинарной строки данных. Одновременно с расчетом порядковых номеров битов устройство осуществляет расчет количества битов с высоким логическим уровнем во входной строке данных. Устройство характеризуется высокой скоростью выполнения операции. Задержка выдачи результата составляет не более задержки известных устройств расчета количества бит с высоким логическим уровнем. Аппаратурная сложность устройства, определяемая количеством используемых сумматоров, составляет nlog2(n), где n - число бит входной строки данных. Это значительно меньше количества сумматоров, необходимого для расчета порядковых номеров битов с высоким логическим уровнем с использованием n устройств расчета количества бит с высоким логическим уровнем.Thus, the device calculates the serial numbers of bits with a high logical level of the input binary data string. Simultaneously with the calculation of the serial numbers of bits, the device calculates the number of bits with a high logical level in the input data line. The device is characterized by a high speed of operation. The delay in the output of the result is no more than the delay of known devices for calculating the number of bits with a high logical level. The hardware complexity of the device, determined by the number of adders used, is nlog 2 (n), where n is the number of bits of the input data string. This is significantly less than the number of adders needed to calculate the serial numbers of bits with a high logical level using n devices for calculating the number of bits with a high logical level.

Claims (1)

Быстродействующее устройство для расчета порядковых номеров битов с высоким логическим уровнем в строке данных длиной n=2k бит, где k - положительное целое число, характеризующееся тем, что оно содержит n бинарных входов
Figure 00000005

битов входной строки данных, n выходов
Figure 00000006
порядковых номеров битов с высоким логическим уровнем, выход POPCNT количества битов с высоким логическим уровнем, n элементов логического умножения
Figure 00000038
, каждый из которых имеет выход Y, соединений с выходом Qj, первый вход X1 и второй бинарный вход Х2, иерархические вычислительные уровни
Figure 00000008
, каждый из которых имеет 2m входов Di и 2m выходов
Figure 00000009
, причем каждый вычислительный уровень
Figure 00000039
состоит из первого и второго вычислительных уровней Lm-1 и 2m-l сумматоров
Figure 00000011
, имеющих первый А и второй В входы и выход С, каждый вход
Figure 00000040
уровня Lm соединен с входом Di первого вычислительного уровня Lm-1, каждый вход Dq, где q=i+2m-1, уровня Lm соединен с входом Di второго уровня Lm-1, каждый выход Si первого уровня Lm-1 соединен с выходом Si уровня Lm, выход Sp, где p=2m-l, первого уровня Lm-1 дополнительно соединен со вторыми входами В сумматоров
Figure 00000011
, каждый выход Si второго уровня Lm-1 соединен с первым входом А сумматора SMi,m, каждый выход С сумматора SMi,m соединен с выходом Sq, где q=i+2m-l, уровня Lm, а каждый вычислительный уровень L1 состоит из сумматора SМ11, имеющего первый А и второй В входы и выход С, причем первый вход А сумматора соединен с входом D1 и выходом S1, второй вход В сумматора соединен с входом D2, выход С сумматора соединен с выходом S2, каждый вход
Figure 00000014
вычислительного уровня Lk соединен с входом устройства DSj, каждый выход
Figure 00000015
уровня Lk соединен с первым входом X1 элемента Иj, выход Sn уровня Lk дополнительно соединен с выходом POPCNT устройства, каждый вход Dj уровня Lk дополнительно соединен со вторым бинарным входом Х2 элемента Иj.
High-speed device for calculating serial numbers of bits with a high logical level in a data string of length n = 2 k bits, where k is a positive integer, characterized in that it contains n binary inputs
Figure 00000005

bits of input data string, n outputs
Figure 00000006
serial numbers of bits with a high logical level, output POPCNT the number of bits with a high logical level, n elements of logical multiplication
Figure 00000038
, each of which has an output Y, connections with an output Q j , the first input X1 and the second binary input X2, hierarchical computing levels
Figure 00000008
, each of which has 2 m inputs D i and 2 m outputs
Figure 00000009
, and each computing level
Figure 00000039
consists of the first and second computational levels L m-1 and 2 ml totalizers
Figure 00000011
having first A and second B inputs and output C, each input
Figure 00000040
level L m is connected to the input D i of the first computing level L m-1 , each input D q , where q = i + 2 m-1 , level L m is connected to the input D i of the second level L m-1 , each output S i the first level L m-1 is connected to the output S i of the level L m , the output S p , where p = 2 ml , the first level L m-1 is additionally connected to the second inputs B of the adders
Figure 00000011
, each output S i of the second level L m-1 is connected to the first input A of the adder SM i, m , each output C of the adder SM i, m is connected to the output S q , where q = i + 2 ml , level L m , and each the computing level L 1 consists of an adder SM 11 having a first A and a second B inputs and an output C, the first input A of the adder connected to the input D 1 and the output S 1 , the second input B of the adder connected to the input D 2 , the output C of the adder connected with output S 2 , each input
Figure 00000014
computing level L k connected to the input of the device DS j , each output
Figure 00000015
level L k is connected to the first input X1 of the element And j , the output S n of the level L k is additionally connected to the output POPCNT of the device, each input D j of the level L k is additionally connected to the second binary input X2 of the element And j .
RU2011117695/08A 2011-05-05 2011-05-05 High-speed apparatus for counting index numbers of high bits in data line RU2451988C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2011117695/08A RU2451988C1 (en) 2011-05-05 2011-05-05 High-speed apparatus for counting index numbers of high bits in data line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2011117695/08A RU2451988C1 (en) 2011-05-05 2011-05-05 High-speed apparatus for counting index numbers of high bits in data line

Publications (1)

Publication Number Publication Date
RU2451988C1 true RU2451988C1 (en) 2012-05-27

Family

ID=46231786

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2011117695/08A RU2451988C1 (en) 2011-05-05 2011-05-05 High-speed apparatus for counting index numbers of high bits in data line

Country Status (1)

Country Link
RU (1) RU2451988C1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2047216C1 (en) * 1992-10-12 1995-10-27 Леонид Болеславович Авгуль Multiple-input single-bit adder
US5541865A (en) * 1993-12-30 1996-07-30 Intel Corporation Method and apparatus for performing a population count operation
US5717616A (en) * 1993-02-19 1998-02-10 Hewlett-Packard Company Computer hardware instruction and method for computing population counts
US6754685B2 (en) * 2000-12-21 2004-06-22 Sun Microsystems, Inc. Dynamic popcount/shift circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2047216C1 (en) * 1992-10-12 1995-10-27 Леонид Болеславович Авгуль Multiple-input single-bit adder
US5717616A (en) * 1993-02-19 1998-02-10 Hewlett-Packard Company Computer hardware instruction and method for computing population counts
US5541865A (en) * 1993-12-30 1996-07-30 Intel Corporation Method and apparatus for performing a population count operation
US6754685B2 (en) * 2000-12-21 2004-06-22 Sun Microsystems, Inc. Dynamic popcount/shift circuit

Similar Documents

Publication Publication Date Title
Tenca et al. High-radix design of a scalable modular multiplier
US8903882B2 (en) Method and data processing unit for calculating at least one multiply-sum of two carry-less multiplications of two input operands, data processing program and computer program product
KR100289513B1 (en) Calculation device and calculation and accumulation device of population count
US11169778B2 (en) Converting floating point numbers to reduce the precision
US20190235834A1 (en) Optimization apparatus and control method thereof
US10628124B2 (en) Stochastic rounding logic
US9933998B2 (en) Methods and apparatuses for performing multiplication
US4293922A (en) Device for multiplying binary numbers
Baliga et al. Design of high speed adders using CMOS and transmission gates in submicron technology: A comparative study
Hiasat Sign detector for the extended four‐moduli set
JP4273071B2 (en) Divide and square root calculator
CN101295237A (en) High-speed divider for quotient and balance
RU2451988C1 (en) High-speed apparatus for counting index numbers of high bits in data line
US7958180B2 (en) Multiplier engine
Zhou et al. Approximate comparator: Design and analysis
Mandal et al. A comparative study of Arithmetic Multipliers
US20100146031A1 (en) Direct Decimal Number Tripling in Binary Coded Adders
Chandu et al. Design and implementation of high efficiency square root circuit using Vedic mathematics
RU2451987C1 (en) Apparatus for counting index numbers of high bits in data line
Soni et al. An Enhanced Two-Speed, Radix-4 Multiplier using Spurious Power Suppression Technique
Abraham et al. An ASIC design of an optimized multiplication using twin precision
Liang et al. An innovative Booth algorithm
Ganesh et al. Constructing a low power multiplier using Modified Booth Encoding Algorithm in redundant binary number system
Patel et al. Vedic and conventional methods of N× N Binary Multiplication with hardware implementation
Kim et al. Improved Multiplication Algorithm by Clearing Leading Zeros of Binary Numbers based on Big Data Analysis

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20180506