RU1783512C - Device for sorting numbers - Google Patents
Device for sorting numbersInfo
- Publication number
- RU1783512C RU1783512C SU904822863A SU4822863A RU1783512C RU 1783512 C RU1783512 C RU 1783512C SU 904822863 A SU904822863 A SU 904822863A SU 4822863 A SU4822863 A SU 4822863A RU 1783512 C RU1783512 C RU 1783512C
- Authority
- RU
- Russia
- Prior art keywords
- input
- group
- output
- elements
- inputs
- Prior art date
Links
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Description
11
(21)4822863/24 (22) 07.05.90(21) 4822863/24 (22) 07.05.90
(46)23.12.92. Бюл. №47 (72) С.Н.Макарен , В.И Бенкевич, М.М.Татур и В.М.Булойчик(46) 12/23/92. Bull. No. 47 (72) S.N. Makaren, V.I. Benkevich, M.M. Tatur and V.M. Buloichik
(56)Авторское свидетельство СССР № 1300459,кл. G 06 F7/08, 1985(56) Copyright certificate of the USSR No. 1300459, cl. G 06 F7 / 08, 1985
Авторское свидетельство СССР Мг 1441384, кл, G 06 F 7/06,1986 (прототип). (54) УСТРОЙСТВО ДЛЯ СОРТИРОВКИ ЧИСЕЛUSSR copyright certificate Mg 1441384, class G 06 F 7 / 06.1986 (prototype). (54) NUMBER SORTING DEVICE
(57)Изобретение относитс к вычислительной технике, в частности к устройствам аппаратурной поддержки вычислительного процесса, и может быть использовано в специализированных вычислительных устройствах дл аппаратурной реализации функции сортировки чисел. Целью изобретени вл етс упрощение устройства. Устройство содержит кольцевые регистры сдвига 1, регистры сдвига результата 2, п триггеров 3. счетчик 4,группы элементов И 5, 6, 7, 12, элемент ИЛИ 8. элемент И 9. элементы задержки 10, 11. Устройство выполн ет упор дочение чисел по возрастанию . 2 ил.(57) The invention relates to computing, in particular to apparatuses for supporting the computing process, and can be used in specialized computing devices for apparatusing the function of sorting numbers. The aim of the invention is to simplify the device. The device contains ring shift registers 1, shift registers of the result 2, p triggers 3. counter 4, groups of elements AND 5, 6, 7, 12, element OR 8. element AND 9. delay elements 10, 11. The device performs ordering of numbers Ascending . 2 ill.
/J/ J
(Л(L
СWITH
vi со со елvi co co e
ГОGO
Фиг 1Fig 1
Устройство относитс к вычислительной технике, в частности к устройствам аппаратной поддержки вычислительного процесса, и может быть использовано в специализи- рованных вычислительных устройствах дл 5 аппаратной реализации функции сортировки чисел.The device relates to computing, in particular to devices for hardware support of the computing process, and can be used in specialized computing devices for 5 hardware implementations of the function of sorting numbers.
Известно устройство дл сортировки чисел (1), содержащее две группы из п счетчиков (п - количество сортируемых чисел), 10 группу из п элементов запрета, первый и второй входные элементы И, элемент ИЛИ, сдвиговый регистр и блок анализа, содержащий п триггеров, группу из п элементов ИЛИ, группу из (п-1) элементов И, элементы 15 И, НЕ.A device for sorting numbers (1) is known, containing two groups of n counters (n is the number of sortable numbers), 10 a group of n prohibition elements, the first and second input elements AND, an OR element, a shift register, and an analysis unit containing n triggers, a group of n elements OR, a group of (n-1) elements AND, elements 15 AND, NOT.
Наиболее близким к предполагаемому по технической сущности и достигаемому результату вл етс устройство дл сортировки чисел (2), выбранное в качестве про- 20 тотипа.The closest to the expected technical result and the achieved result is a device for sorting numbers (2), selected as a prototype.
Устройство содержит п т-разр дных кольцевых регистра сдвига, управл ющий элемент И-ИЛИ, п элементов 2И-ИЛИ, два элемента И, один элемент ИЛИ, блок управ- 25 лени , три группы триггеров, (п-2) элементов И. (п-1) элементов ИЛИ.The device contains p t-bit circular shift registers, an AND-OR control element, n 2-OR elements, two AND elements, one OR element, a laziness control unit, three trigger groups, (n-2) AND elements. (p-1) elements OR.
Недостатком указанного устройства вл етс больша сложность.The disadvantage of this device is its great complexity.
Целью изобретени вл етс упроще- до ние устройства.The aim of the invention is to simplify the device.
В состав устройства вход т п т-разр дных кольцевых регистров сдвига, где п - число сортируемых чисел, п триггеров, первую группу элементов И, элемент ИЛИ, эле- 35 мент И, причем информационные входы 1-го m-разр дного кольцевого регистра сдвига вл ютс входами соответствующих сортируемых чисел устройства, а выход старшего разр да соединен с первым входом 1-го эле- пThe device includes t m-bit circular shift registers, where n is the number of sortable numbers, n flip-flops, the first group of AND elements, OR element, 35 AND element, and the information inputs of the 1st m-bit circular register shift are the inputs of the corresponding sortable numbers of the device, and the high-order output is connected to the first input of the 1st element
мента И первой группы , второйcop And the first group, the second
вход которого соединен с выходом 1-го триггера , а выход подключен к i-му входу элемента ИЛИ. Устройство дополнительно содержит счетчик, вторую, третью и четвер- е тую группы элементов И, первый и второй элементы задержки, п регистров сдвига результата , причем выход элемента ИЛИ соединен с входом младшего разр да первого регистра сдвига результата и с первым вхо- 5(. дом элемента И, выход которого соединен с пр мыми входами элементов И второй группы , выходы которых подключены к входам установки в ноль соответствующих триггеров , синхровход устройства соединен с вторым входом элемента И и через первый элемент задержки с синхровходами т-разр дных кольцевых регистров сдвига, регистров сдвига результата и с суммирующим входом счетчика, выход переполнени кото55whose input is connected to the output of the 1st trigger, and the output is connected to the i-th input of the OR element. The device additionally contains a counter, the second, third and fourth groups of AND elements, the first and second delay elements, n result shift registers, the output of the OR element being connected to the least significant bit input of the first result shift register and with the first input 5 (. the house of the And element, the output of which is connected to the direct inputs of the And elements of the second group, the outputs of which are connected to the zero inputs of the corresponding triggers, the device sync input is connected to the second input of the And element and through the first delay element with the sync input E m-bit circular shift registers, the result of shift registers and summing inputs counter output overflow koto55
0 5 0 5
0 0
5 5
о about
5 п5 p
е (. e (.
55
рого соединен с первыми входами элементов И третьей группы и через второй элемент задержки с входами установки в единичное состо ние триггеров. Выход 1-го триггера соединен с инверсным входом 1-го элемента И четвертой группы и вторым входом элемента И третьей группы, выход которого подключен к входу обнулени 1-го m-разр дного кольцевого регистра сдвига. Пр мой вход первого элемента И четвертой группы соединен с третьим входом элемента И третьей группы и входом логической единицы устройства, выход j-ro элемента МIt is connected to the first inputs of the AND elements of the third group and through the second delay element with the inputs of the unit into the single state of the triggers. The output of the 1st trigger is connected to the inverse input of the 1st AND element of the fourth group and the second input of the AND element of the third group, the output of which is connected to the zeroing input of the 1st m-bit ring shift register. The direct input of the first element AND of the fourth group is connected to the third input of the element AND of the third group and the input of the logical unit of the device, the output j-ro of the element M
четвертой группы 0 1п-1) соединен сthe fourth group 0 1n-1) is connected to
пр мым входом 0+1)-го элемента И четвертой группы и с третьим входом элемента И третьей группы. Выход старшего разр да j-ro регистра сдвига результата соединен с входом младшего разр да Q+1)-ro регистра сдвига результата, выходы регистров сдвига результата вл ютс выходами сортируе- мых чисел устройства.the direct input of the 0 + 1) -th element AND of the fourth group and with the third input of the element AND of the third group. The output of the high-order bit j-ro of the result shift register is connected to the input of the low-order bit Q + 1) -ro of the result shift register, the outputs of the result shift registers are the outputs of the sortable numbers of the device.
На фиг. 1 представлена структурна схема устройства; на фиг. 2 - диаграмма работы .In FIG. 1 is a structural diagram of a device; in FIG. 2 is a work diagram.
Устройство дл сортировки п т-разр дных чисел содержит группу входных кольце- вых сдвиговых регистров 1. группу сдвиговых регистров результата 3, группу триггеров 3, счетчик 4, первую 5, вторую 6, третью 7 группы элементов И, элемент ИЛИ 8, элемент И 9, первый 10, второй 11 элементы задержки, четвертую группу элементов И 12.A device for sorting p-bit numbers contains a group of input ring shift registers 1. a group of shift registers of result 3, a group of triggers 3, a counter 4, a first 5, a second 6, a third 7 of a group of AND elements, an OR element 8, an AND element 9, the first 10, the second 11 delay elements, the fourth group of elements And 12.
Устройство имеет группу входов 13, синхровход 14, группу выходов 15,1-й вход устройства 13 (1 1, п) соединен с информационными входами {-го регистра 1, выход старшего разр да которого соединен с первым входом 1-го элемента И 5, выход которого соединен с i-м входом элемента ИЛИ. 8 и с инверсным входом 1-го элемента И 6, выход которого соединен с нулевым входом 1-го триггера 3, выход которого соединен со вторым входом 1-го элемента И 5, инверсным входом 1-го элемента И 7 и первым входом 1-го элемента И 12, выход которого соединен со входом обнулени 1-го регистра 1. Синхровход устройства 14 соединен со вторым, входом элемента И 9 и со входом элемента задержки 10, выход которого соединен с синхровходами регистров 1, 2 и с суммирующим входом счетчика 4, выход переполнени которого соединен с третьими входами элементов И 12 и со входом элемента задержки 11, выход которого соединен с единичными вхо- дами.триггеров 3. Выход J-ro элемента И 7 О Т, п-1) соединен с пр мым входом Q+1)-ro элемента И 7 и со вторым входом (j+1)-roThe device has a group of inputs 13, a synchro input 14, a group of outputs the 15.1st input of device 13 (1 1, p) is connected to the information inputs of the {register 1, the output of the highest category of which is connected to the first input of the 1st element And 5 whose output is connected to the ith input of the OR element. 8 and with the inverse input of the 1st element And 6, the output of which is connected to the zero input of the 1st trigger 3, the output of which is connected to the second input of the 1st element And 5, the inverse input of the 1st element And 7 and the first input 1- the first element And 12, the output of which is connected to the input of zeroing of the 1st register 1. The synchro input of the device 14 is connected to the second, the input of the element And 9 and the input of the delay element 10, the output of which is connected to the sync inputs of the registers 1, 2 and with the summing input of the counter 4 the overflow output of which is connected to the third inputs of the And 12 elements and to the input delay element 11, the output of which is connected to the unit inputs. triggers 3. The output J-ro of the element And 7 O T, n-1) is connected to the direct input Q + 1) -ro of the element And 7 and to the second input (j +1) -ro
элемента И 12, на пр мой вход первого элемента И 7 и на второй вход первого элемента И 12 подан потенциал логической единицы. Выход элемента ИЛИ 8 соединен со входом младшего разр да первого регистра 2 и с первым входом элемента И 9. выход которого соединен с пр мыми входами элементов И 6. Выход старшего разр да j-ro регистра 2 соединен со входом младшего разр да 0+ 1) го регистра 2. Выходы разр дов j-ro регистра 2 соединены с 1-м выходом устройства 15.of the And 12 element, the potential of a logical unit is applied to the direct input of the first And 7 element and to the second input of the first And 12 element. The output of the OR element 8 is connected to the input of the least significant bit of the first register 2 and with the first input of the And 9 element. The output of which is connected to the direct inputs of the And 6 elements. The output of the highest bit j-ro of Register 2 is connected to the input of the least significant bit 0+ 1 ) of register 2. The outputs of bits j-ro of register 2 are connected to the 1st output of device 15.
Принцип работы устройства заключаетс в следующем. В регистры 1 параллельным кодом записываютс исходные числа, на синхровход 14 подаетс последовательность из m.n импульсов, С приходом первых m импульсов (т - разр дность чисел) выдел етс максимальное из п чисел и последовательным кодом записываетс в первый регистр 2. Выделенное максимальное число исключаетс из дальнейшего рассмотрени (соответствующий регистр 1 обнул етс ), С приходом следующих m импульсов выдел етс максимальное из оставшихс (п-1) чисел , которое записываетс в первый регистр 2, а его содержимое переписываетс последовательным кодом во второй регистр 2 и т.д. Выделение максимального из п чисел заключаетс в последовательном анализе содержимого одноименных разр дов (начина со старших) сравниваемых чисел.The principle of operation of the device is as follows. Initial numbers are written in registers 1 by parallel code, a sequence of mn pulses is sent to sync input 14, With the arrival of the first m pulses (t is the bit capacity of the numbers), the maximum of n numbers is extracted and written in sequential code to the first register 2. The allocated maximum number is excluded from for further consideration (the corresponding register 1 is reset), With the arrival of the next m pulses, the maximum of the remaining (n-1) numbers is allocated, which is written in the first register 2, and its contents are rewritten after code in the second register 2, etc. Isolation of the maximum of n numbers consists in a sequential analysis of the contents of the same-rank bits (starting with the highest) of the compared numbers.
Устройствр работает следующим образом В исходном состо нии в регистры 1 по входам 13 записаны исходные числа, счет- чик 4 обнулен, триггеры 3 - в единичном состо нии, элементы И 5 открыты, старшие разр ды анализируемых чисел поступают на входы элемента ИЛИ 8. На вход 14 устройства поступает последовательность из m.n импульсов (фиг. 2, эпюра 1), С приходом первого импульса измен етс состо ние триггеров 3 по следующему правилу: если старшие разр ды всех чисел равны нулю, на выходе элемента ИЛИ 8 нуль, элемент И 9 закрыт, состо ние триггеров 3 не измен етс . Если старшие разр ды всех чисел равны единицы, на выходе элементы ИЛИ 8 - единица , элемент И 9 открыт, а все элементы И 6 закрыты, состо ние триггеров 3 не измен етс .The device operates as follows. In the initial state, the initial numbers are recorded in the registers 1 at the inputs 13, the counter 4 is reset, the triggers 3 are in the single state, the AND 5 elements are open, the high-order bits of the analyzed numbers go to the inputs of the OR 8. input 14 of the device receives a sequence of mn pulses (Fig. 2, plot 1). With the arrival of the first pulse, the state of triggers 3 changes according to the following rule: if the high-order bits of all numbers are zero, the output of OR 8 is zero, and 9 closed, trigger state 3 unchanged a. If the leading bits of all numbers are equal to one, the output of OR elements 8 is one, the And element 9 is open, and all And 6 elements are closed, the state of triggers 3 does not change.
Если старшие разр ды некоторых чисел равны единице, а старшие разр ды остальных чисел равны нулю, то на выходе элемента ИЛИ б единица, элемент И 9 открыт и открыты элементы И 6. на инверсный вход которых поступает сигнал логического нул . Импульс со входа 14 через элемент И 9 иIf the high-order bits of some numbers are equal to one, and the high-order bits of the remaining numbers are equal to zero, then at the output of the OR element, the unit, the And 9 element is open and the And 6 elements are open. The inverse input of which receives a logic zero signal. The pulse from input 14 through the element And 9 and
открытые элементы И 6 обнул ет соответствующие триггеры 3.open elements AND 6 nullifies the corresponding triggers 3.
При переходе 1-го триггера 3 в нулевоеWhen the 1st trigger 3 goes to zero
состо ние соответствующий ему элемент Иstate corresponding element AND
5 5 закрываетс , и соответствующее число из5 5 closes and the corresponding number of
регистра 1 исключаетс из дальнейшегоregister 1 is excluded from the following
рассмотрени .consideration.
Через врем задержки гю, определ емое элементом 10, синхроимпульс поступа0 ет на синхровходы регистров 1, 2 (фиг. 2, эпюра 2). При этом осуществл етс сдвиг информации в регистрах t, 2 на один разр д вправо. В младший разр д первого регистра 2 осуществл етс запись информации сAfter the delay time gy determined by element 10, the clock arrives at the clock inputs of registers 1, 2 (Fig. 2, diagram 2). In this case, the information in the t, 2 registers is shifted one bit to the right. In the low order of the first register 2, information is recorded from
5 выхода элемента ИЛИ 8. В кольцевом сдвиговом регистре 1 значение старшего разр да переписываетс в младший разр д. Импульс с выхода элемента задержки 10, кроме того, увеличивает состо ние счетчика5 of the output of the OR element 8. In the circular shift register 1, the value of the high order is overwritten in the low order. The pulse from the output of the delay element 10, in addition, increases the state of the counter
0 4 на единицу. Аналогично устройство работает и при поступлении следующих импульсов0 4 per unit. Similarly, the device works when the following pulses
С приходом гл-го по счету импульса осуществл етс анализ последнего (младшего)With the arrival of the hth pulse count, the analysis of the last (younger)
5 разр да исходных чисел и через врем задержки по осуществл етс сдвиг информации в регистрах. Таким образом, после поступлени первых импульсов синхронизации ( моментТ0на фиг. 2, эп. 2) в первом5 bits of the initial numbers and after the delay time the information in the registers is shifted. Thus, after the arrival of the first synchronization pulses (moment T0 in Fig. 2, ep. 2) in the first
0 регистре 2 находитс выделенное максимальное число, в регистрах 1 - исходные числа в их первоначальном представлении .In register 2 is the allocated maximum number, in registers 1 are the original numbers in their original representation.
С приходом m импульсов на вход счет5 чика 4 на его-выходе переполнени по вл етс импульс, а счетчик обнул етс . Импульс с выхода переполнени счетчика 4 (см. фиг. 2, эп. 3) поступает на вход элементов И 12 и на вход элемента задержки 11With the arrival of m pulses at the input of counter 5, an impulse appears at its overflow output, and the counter is reset. The pulse from the output of the overflow counter 4 (see Fig. 2, ep. 3) is fed to the input of the elements And 12 and to the input of the delay element 11
0 Группа элементов И 12 и на вход элемента задержки 11, Группа элементов И 7, И 12 представл ют собой схему приоритета и предназначено дл обнулени регистра 1, содержащего выделенное максимальное0 The group of elements And 12 and the input of the delay element 11, The group of elements And 7, And 12 are a priority scheme and is intended to reset the register 1 containing the selected maximum
5 число, на что указывает единичное состо ние соответствующего триггера 3. Если в регистрах 1 содержитс два и более одинаковых максимальных чисел, то несколько соответствующих триггеров 3 находитс в5 is a number, which is indicated by the single state of the corresponding trigger 3. If in registers 1 there are two or more identical maximum numbers, then several corresponding triggers 3 are in
Q единичном состо нии. С приходом импульса переполнени с выхода счетчика 4 на входы элементов И 12. на выходе одного из элементов И 12 формируетс импульс обнулени и при наличии двух и более одинакос вых максимальных чисел обнул етс соответствующий регистр 1 с минимальным пор дковым номером. Таким образом, выделенное максимальное число исключаетс из дальнейшего анализа.Q is a single state. With the arrival of an overflow pulse from the output of the counter 4 to the inputs of the elements And 12. At the output of one of the elements And 12, a zeroing pulse is generated and, if there are two or more identical maximum numbers, the corresponding register 1 with the minimum sequence number is reset. Thus, the allocated maximum number is excluded from further analysis.
Через врем задержки Гц, определ емое элементом 11 (см, фиг. 2, эп. 4) импульс переполнени устанавливает в единичное состо ние триггеры 3 и с приходом (т+1)-го импульса синхронизации начинаетс выде- ление максимального из оставшихс (п-1) чисел,After the delay time Hz, determined by element 11 (see, Fig. 2, ep. 4), the overflow pulse sets the triggers 3 to a single state and with the arrival of the (m + 1) th synchronization pulse, the separation of the maximum remaining (n -1) numbers
По окончании работы в регистрах 2 записана упор доченна последовательность чисел, причем в первом регистре 2 - мини- мальное из чисел, в n-ом регистре 2 - максимальное из чисел. Регистры 1 обнулены.At the end of work, registers 2 contain an ordered sequence of numbers, the first register 2 being the smallest of the numbers, and in the nth register 2 the maximum of the numbers. Registers 1 are reset.
Таким образом, предлагаемое устройство осуществл ет сортировку т-разр дных чисел и имеет меньшую сложность, чем из- вестное устройство.Thus, the proposed device sorts t-bit numbers and has less complexity than the known device.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU904822863A RU1783512C (en) | 1990-05-07 | 1990-05-07 | Device for sorting numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU904822863A RU1783512C (en) | 1990-05-07 | 1990-05-07 | Device for sorting numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
RU1783512C true RU1783512C (en) | 1992-12-23 |
Family
ID=21512890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU904822863A RU1783512C (en) | 1990-05-07 | 1990-05-07 | Device for sorting numbers |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU1783512C (en) |
-
1990
- 1990-05-07 RU SU904822863A patent/RU1783512C/en active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU1783512C (en) | Device for sorting numbers | |
SU1575192A1 (en) | Device for assigning space in external memory | |
SU1387016A1 (en) | Digital filter | |
SU1441384A1 (en) | Device for sorting numbers | |
SU1034188A1 (en) | Versions of threshold element | |
SU1695283A1 (en) | Controlled n-bit pulse distributor | |
RU1791812C (en) | Device for sorting of numbers | |
SU798810A1 (en) | Device for comparing code weights | |
SU651339A1 (en) | Maximum number determining arrangement | |
SU684539A1 (en) | Arrangement for taking logarithms of numbers | |
SU1487063A2 (en) | Combination exhaustive search unit | |
SU1644137A1 (en) | Device for random repmutation searching | |
SU1173402A1 (en) | Number generator | |
RU1797118C (en) | Multichannel signature analyzer | |
SU1653154A1 (en) | Frequency divider | |
SU1037246A1 (en) | Number sorting device | |
SU1273930A2 (en) | Device for sequential selecting of ones from n-bit binary code | |
SU1439748A1 (en) | Coder | |
SU1287262A1 (en) | Pulse shaper | |
SU1037242A2 (en) | Device for ordered parameter value retrieval | |
SU1370754A1 (en) | Pulse monitoring device | |
SU1619243A2 (en) | Generator of sequence of code weights | |
SU1188728A1 (en) | Device for implementing boolean functions | |
SU1481797A1 (en) | Distribution quantile determination device | |
RU1803909C (en) | Device for arranging in sequence number files |