RU2034327C1 - Device for sorting data - Google Patents

Device for sorting data Download PDF

Info

Publication number
RU2034327C1
RU2034327C1 RU93015991A RU93015991A RU2034327C1 RU 2034327 C1 RU2034327 C1 RU 2034327C1 RU 93015991 A RU93015991 A RU 93015991A RU 93015991 A RU93015991 A RU 93015991A RU 2034327 C1 RU2034327 C1 RU 2034327C1
Authority
RU
Russia
Prior art keywords
block
gaw
control
input
output
Prior art date
Application number
RU93015991A
Other languages
Russian (ru)
Other versions
RU93015991A (en
Inventor
В.М. Довгаль
С.С. Шевелев
И.Н. Силакова
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 RU93015991A priority Critical patent/RU2034327C1/en
Application granted granted Critical
Publication of RU2034327C1 publication Critical patent/RU2034327C1/en
Publication of RU93015991A publication Critical patent/RU93015991A/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

FIELD: automation and computer engineering. SUBSTANCE: device has input and output channels, two memory unit with stack architecture, comparison unit, memory unit, control unit, control unit of memory unit, counter, register, comparison unit, stacks, commutator, code generator, address bus generator. Device provides on-line sorting of data while they arrive. Sorted array is output in either ascending or descending order. New feature of the described device is separation of data into standard length constituents (characters). Process of data sorting runs along with information input. This results in possibility to simplify hardware, in particular decreased number of memory circuits for processing variable length data, as well as in possibility to decrease time of data sorting when slow external device is used. EFFECT: simplified design, increased efficiency. 9 dwg

Description

Изобретение относится к техническим средствам автоматики и вычислительной техники и может быть использовано в устройствах обработки информации, в частности, для составления словарей, справочников, создания без данных. The invention relates to technical means of automation and computer technology and can be used in information processing devices, in particular, for compiling dictionaries, reference books, creating without data.

Известны устройства для сортировки чисел [1,2] позволяющие упорядочить массив чисел в возрастающем и убывающем порядке. Known devices for sorting numbers [1,2] allow you to sort an array of numbers in ascending and descending order.

В качестве прототипа выбрано устройство сортировки информации [3] позволяющее упорядочить массивы данных. As a prototype of the selected device information sorting [3] allows you to organize data arrays.

Недостатком известного устройства является ограниченность функциональных возможностей постоянной длиной данных, либо аппаратная избыточность при обработке данных переменной длины. A disadvantage of the known device is the limited functionality of a constant data length, or hardware redundancy in the processing of data of variable length.

Поставлена цель расширения функциональных возможностей и снижения аппаратной избыточности устройства. The goal is to expand the functionality and reduce the hardware redundancy of the device.

Изобретение позволяет организовать посимвольную работу с данными, что сводит к минимуму затраты, например, на схемы памяти при работе с данными переменной длины. The invention allows to organize character-by-character work with data, which minimizes costs, for example, on memory circuits when working with data of variable length.

Решение задачи достигается тем, что в устройство сортировки информации, содержащее два стековых блока памяти, элемент сравнения, блок управления, введены входной и выходной каналы, блок оперативной памяти, блок коммутации и идентификации, причем с первого по пятый управляющие выходы блока управления соединены соответственно с первым по пятый управляющими входами блока оперативной памяти, информационный вход которого соединен с входным каналом, управляющий выход соединен с четвертым управляющим входом блока управления, информационный выход соединен с первым информационным входом элемента сравнения и вторым информационным входом блока коммутации и идентификации, управляющий выход последнего соединен с четырнадцатым управляющим входом блока управления, с первого по третий управляющие входы соединены соответственно с десятого по двенадцатый управляющими выходами последнего, второй информационный выход соединен с выходным каналом, первый информационный выход соединен с информационным входом второго стекового блока памяти, первый и второй управляющие входы последнего соединены соответственно с шестым и седьмым управляющими выходами блока управления, первый и второй управляющие выходы соединены соот- ветственно с десятым и одиннадцатым управляющими входами последнего, информационный выход соединен с информационным входом первого стекового блока памяти, первый и второй управляющие входы которого соединены соответственно с восьмым и девятым управляющими выходами блока управления, первый и второй управляющие выходы соединены соответственно с двенадцатым и тринадцатым управляющими входами последнего, информационный выход соединен с первым информационным входом блока коммутации и идентификации и с вторым информационным входом элемента сравнения, с первого по третий управляющие выходы последнего соединены соответственно с управляющими входами с пятого по седьмой, блока управления, с первого по третий управляющие входы блока управления "ЗАГР", "ЧТПР", "ЧТОБ", а также восьмой и девятый управляющие входы "СБРОС" и "ПУСК" последнего являются внешними входами устройства, тринадцатый и четырнадцатый управляющие выходы "ГТ" и "СИН" блока управления являются внешними выходами устройства. The solution to the problem is achieved by the fact that in the information sorting device containing two stacked memory blocks, a comparison element, a control unit, input and output channels, a random access memory unit, a switching and identification unit are introduced, the first to fifth control outputs of the control unit being connected respectively to the first to fifth control inputs of the random access memory unit, the information input of which is connected to the input channel, the control output is connected to the fourth control input of the control unit, information the output is connected to the first information input of the comparison element and the second information input of the switching and identification unit, the control output of the latter is connected to the fourteenth control input of the control unit, the first to third control inputs are connected respectively from the tenth to twelfth control outputs of the latter, the second information output is connected to the output channel, the first information output is connected to the information input of the second stack memory block, the first and second control inputs are it is connected respectively to the sixth and seventh control outputs of the control unit, the first and second control outputs are connected to the tenth and eleventh control inputs of the latter, the information output is connected to the information input of the first stack memory block, the first and second control inputs of which are connected respectively to the eighth and the ninth control outputs of the control unit, the first and second control outputs are connected to the twelfth and thirteenth control inputs respectively one, the information output is connected to the first information input of the switching and identification unit and to the second information input of the comparison element, the first to third control outputs of the latter are connected respectively to the control inputs from the fifth to the seventh, control unit, from the first to third control inputs of the control unit ZAGR "," ChTPR "," WHAT ", as well as the eighth and ninth control inputs" RESET "and" START "of the latter are external inputs of the device, the thirteenth and fourteenth control outputs of the" GT "and" BLUE "block The controls are the external outputs of the device.

Входной канал (ВХК) служит для приема данных, блок оперативной памяти (БОП) для временного хранения принятого слова (числа). The input channel (VHK) is used to receive data, a block of random access memory (BOP) for temporary storage of the received word (number).

Элемент сравнения (ЭС) сравнивает символы принятого слова (числа) и уже упорядоченных слов (чисел). The comparison element (ES) compares the characters of the received word (number) and already ordered words (numbers).

Стековые блоки памяти 1 и 2 (СБП1 и СБП2) служат для хранения части отсортированного массива и организации сортировки. Stacked memory blocks 1 and 2 (SBP1 and SBP2) are used to store part of the sorted array and organize sorting.

Блок коммутации и идентификации (БКиИ) служит для коммутации информации с различных источников на информационный вход блока СБП2, коммутации информационного выхода блока СБП1 на выходной канал, а также для определения границ слоев упорядоченного массива. The switching and identification unit (БКиИ) serves for switching information from various sources to the information input of the SBP2 block, switching the information output of the SBP1 block to the output channel, and also for determining the layer boundaries of the ordered array.

Выходной канал (ВЫХК) служит для выдачи данных. The output channel (OUT) is used to output data.

Блок управления (БУ) управляет другими блоками устройства. The control unit (CU) controls the other units of the device.

Теория нормальных алгоритмов универсальна по отношению к любым алгоритмическим схемам. Известны алгоритмы, позволяющие упорядочивать слова из массива, например, по признаку алфавитного порядка. Известны универсальные устройства для реализации формул подстановок в виде алгорифмов Маркова (1). Под алгорифмом Маркова понимается конечная последовательность формул вида: S ->> T, где S образец, Т подстановка, S и T произвольные слова в фиксированном алфавите. Работа формулы заключается в обнаружении в слове фрагмента, совпадающего с образцом, и замене обнаруженного фрагмента на слово-подстановку. Следовательно, когда обрабатываемое слово представлено в виде:
Р R1 S R2, где знак графического равенства; R1, R2 любые слова в фиксированном алфавите, результат работы формулы имеет вид: РR1 T R2.
The theory of normal algorithms is universal with respect to any algorithmic schemes. Known algorithms that allow you to arrange words from an array, for example, on the basis of alphabetical order. Universal devices for implementing substitution formulas in the form of Markov algorithms are known (1). By the Markov algorithm we mean a finite sequence of formulas of the form: S - >> T, where S is a sample, T is a permutation, S and T are arbitrary words in a fixed alphabet. The formula works by detecting a fragment in the word that matches the sample and replacing the detected fragment with a substitution word. Therefore, when the word being processed is represented as:
P R 1 SR 2 , where the graphic equal sign; R 1 , R 2 any words in a fixed alphabet, the result of the formula is: PR 1 TR 2 .

Обнаружение фрагмента, совпадающего с образцом осуществляется слева направо по обрабатываемому слову. Detection of a fragment that matches the pattern is carried out from left to right by the word being processed.

Упорядочение (сортировка) слов в теории нормальных алгорифмов занимает особое место, поскольку относится к труднореализуемым задачам, в которых используются формулы (продукции), содержащие образцы с заданными в их структуре операциями. В данном случае речь идет об операции компарации на "больше", "меньше" и "равно". Подстановка в формулах "S ->> T" также имеет свою специфику и семантически не совпадает с обрабатываемым словом, а представляет собой вспомогательное служебное слово, указывающее позицию слова среди других слов в заданном правиле упорядочения. Ordering (sorting) of words in the theory of normal algorithms occupies a special place, since it relates to difficult tasks in which formulas (products) are used that contain patterns with operations specified in their structure. In this case, we are talking about the operation of comparing "more", "less" and "equal". The substitution in the formulas "S - >> T" also has its own specifics and does not semantically coincide with the word being processed, but is an auxiliary service word indicating the position of the word among other words in a given ordering rule.

В основу работы предлагаемого устройства сортировки информации положен модифицированный алгоритм, который содержит образец и подстановку с указанными выше особенностями. Устройство сортировки информации реализует формулы следующего вида:
S1 ⊗ S2 ->> T1/T2 (1) где S1 и S2 компаранды образца; ⊗- символ, обозначающий операцию компарации на "больше", "меньше" и "равно", а также сопоставление длины компарандов; Т1 указатель позиции в частично упорядоченном массиве одного из компарандов в зависимости от результата компарации или сопоставления длин слов; Т2 указатель следующего (текущего) компаранда или правила построения образца по результатам сравнения слов; /, разделители в форме служебных символов, не входящих в основной алфавит.
The work of the proposed device for sorting information is based on a modified algorithm that contains a sample and a substitution with the above features. The information sorting device implements formulas of the following form:
S 1 ⊗ S 2 - >> T 1 / T 2 (1) where S 1 and S 2 are the sample comparads; ⊗ - a symbol denoting the operation of comparing by "more", "less" and "equal", as well as a comparison of the length of the comparads; T 1 is a position indicator in a partially ordered array of one of the comparands depending on the result of the comparison or comparison of the word lengths; T 2 is the pointer to the next (current) command or rule for constructing a sample based on the results of word comparison; /, delimiters in the form of service characters not included in the main alphabet.

В предлагаемом устройстве смысл фрагмента подстановки Т2заключается в приеме очередного символа с входного канала.In the proposed device, the meaning of the substitution fragment T 2 is to receive the next character from the input channel.

Формула вида (1) задает рекурсивную реализацию процесса упорядочения. A formula of the form (1) defines a recursive implementation of the ordering process.

На фиг.1 изображена структурная схема устройства сортировки информации; на фиг.2 схема блока оперативной памяти; на фиг.3 схема элемента сравнения; на фиг.4 схема СБП2; на фиг.5 схема СБП1; на фиг.6 схема блока коммутации и идентификации; на фиг.7 и 8 содержательная ГСА работы блока управления; на фиг.9 размеченная ГСА работы блока управления. Figure 1 shows a structural diagram of a device for sorting information; figure 2 circuit block RAM; figure 3 diagram of the comparison element; figure 4 diagram of SBP2; figure 5 diagram of SBP1; 6 is a diagram of a switching and identification unit; Figures 7 and 8 informative GAW work of the control unit; figure 9 marked GAW operation of the control unit.

Устройство сортировки информации (фиг.1) содержит входной канал 1, блок 2 оперативной памяти, элемент 3 сравнения, стековый блок 4 памяти (СБП2), стековый блок 5 памяти (СБП1), блок 6 коммутации и идентификации, выходной канал 7, блок 8 управления. The information sorting device (Fig. 1) contains an input channel 1, a RAM block 2, a comparison element 3, a memory stack block 4 (SBP2), a memory stack block 5 (SBP1), a switching and identification unit 6, an output channel 7, block 8 management.

Для описания алгоритма работы блока 8 управления используются следующие идентификаторы:
1. ЗАГР сигнал записи в устройство.
To describe the operation algorithm of control unit 8, the following identifiers are used:
1. ZAGR recording signal to the device.

2. ЧТПР сигнал выдачи устройством упорядоченного массива в возрастающем порядке. 2. ChTPR signal issuing device ordered array in ascending order.

3. ЧТОБ сигнал выдачи устройством упорядоченного массива в убывающем порядке. 3. So that the device gives out an ordered array in descending order.

4. ОБСЧ сигнал обнуления, поступающий на вход счетчика блока БОП. 4. OBSH zeroing signal received at the input of the counter of the BOP unit.

5. ИНСЧ сигнал инкрементации содержимого счетчика блока БОП. 5. INSC signal incrementing the contents of the counter block BOP.

6. ЗПРГ сигнал записи в регистр РГ блока БОП информации из счетчика СЧ блока БОП. 6. ZPRG signal write to the register RG block BOP information from the counter midrange block BOP.

7. ЗПОЗУ сигнал записи/не чтения ОЗУ блока БОП. 7. ZPOZU signal write / not read RAM unit BOP.

8. ВК1 сигнал выбора кристалла ОЗУ блока БОП (инверсный). 8. VK1 signal selection chip RAM RAM unit BOP (inverse).

9. КС признак конца слова, находящегося в блоке БОП. 9. COP sign of the end of the word located in the BOP unit.

10. БОЛЬШЕ признак того, что символ И2 больше символа И3. 10. MORE sign that the I2 symbol is larger than the I3 symbol.

11. РАВНО признак того, что символ И2 равен символу И3. 11. Equal sign that the symbol I2 is equal to the symbol I3.

12. МЕНЬШЕ признак того, что символ И2 меньше символа И3. 12. LESS sign that the I2 symbol is less than the I3 symbol.

13. СБРОС сигнал сброса устройства. 13. RESET device reset signal.

14. ПУСК сигнал пуска устройства. 14. START device start signal.

15. ЗПС2 сигнал записи в стек блока СБП2. 15. ZPS2 signal write to the stack block SBP2.

16. ЧТС2 сигнал чтения из стека блока СБП2. 16. ЧТС2 read signal from the stack of SBP2 block.

17. С2ПН признак того, что стек блока СБП2 полон. 17. C2PN is an indication that the stack of the SBP2 block is full.

18. С2ПТ признак того, что стек блока СБП2 пуст. 18. C2PT indicates that the stack of the SBP2 block is empty.

19. ЗПС1 сигнал записи в стек блока СБП1. 19. ZPS1 signal write to the stack of the block SBP1.

20. ЧТС1 сигнал чтения из стека блока СБП1. 20. ЧТС1 read signal from the stack of SBP1 block.

21. С1ПН признак того, что стек блока СБП1 полон. 21. C1PN is an indication that the stack of the SBP1 block is full.

22. С1ПТ признак того, что стек блока СБП1 пуст. 22. C1PT indicates that the stack of SBP1 is empty.

23. ГС признак границы между словами упорядоченного массива. 23. HS sign of the boundary between the words of an ordered array.

24. А1 адрес 1, подаваемый на вход коммутатора КМ блока БКиИ. 24. A1 address 1, supplied to the input of the switch KM block BCI.

25. А2 адрес 2, подаваемый на вход коммутатора КМ блока БКиИ. 25. A2 address 2 supplied to the input of the switch KM block BCI.

26. РВ сигнал разрешения выдачи информации на выходной канал. 26. RV signal permission to issue information to the output channel.

27. ГТ сигнал готовности устройства. 27. GT signal of readiness of the device.

28. СИН внешний выходной синхронизирующий сигнал. 28. BLU external synchronization output signal.

29. И1 входные данные ОЗУ блока БОП. 29. I1 input RAM of the BOP unit.

30. И2 выходные данные ОЗУ блока БОП. 30. And2 the output of the RAM unit BOP.

31. И3 выходные данные стека блока СБП1. 31. I3 the output of the stack block SBP1.

32. И4 выходные данные стека блока СБП2. 32. And4 the output of the stack block SBP2.

33. И5 выходные данные коммутатора КМ блока БКиИ. 33. I5 the output of the switch KM block BCI.

34. И6 выходные данные шинного формирователя ШФ блока БКиИ. 34. I6 output data of the bus driver ShF block БКиИ.

Работа алгоритма управления устройства. The operation of the device control algorithm.

Содержательная ГСА управления приведена на фиг.7 и отражает работу блока управления (фиг.1). Content GAW control is shown in Fig.7 and reflects the operation of the control unit (Fig.1).

По сигналу "СБРОС" (блок 2 граф-схемы алгоритма) происходит сброс информации, хранящейся в стеках блоков СБП1 и СБП2, по командам "ЧТС2:1" и "ЧТС1: 1" (блок 4 ГСА) до тех пор, пока стеки не станут пусты и не установятся признаки "С1ПТ=1" и "С2ПТ=1" (блок 3 ГСА) (фиг.7). The signal "RESET" (block 2 of the flowchart of the algorithm) resets the information stored in the stacks of the blocks SBP1 and SBP2, by the commands "CTS2: 1" and "CTS1: 1" (block 4 GAU) until the stacks will become empty and the signs "S1PT = 1" and "C2PT = 1" (block 3 GAW) will not be established (Fig.7).

По сигналу "ПУСК" (блок 5 ГСА) осуществляется переход на блок 6 ГСА, иначе на блок 5 ГСА. The signal "START" (block 5 GAW) is the transition to block 6 GAW, otherwise to block 5 GAW.

По сигналу "ЧТОБ" (блок 6 ГСА) осуществляется переход на блок 63 алгоритма. По сигналу "ЧТПР" (блок 7 ГСА) осуществляется переход на блок 58 ГСА. The signal “WHAT” (block 6 GAW) is the transition to block 63 of the algorithm. The signal "ChTPR" (block 7 GAW) is the transition to block 58 GAW.

По сигналу "ЗАГР" (блок 8 ГСА) происходит загрузка входного слова в БОП (фиг.1), иначе осуществляется переход на блок 6 ГСА. The signal "ZAGR" (block 8 GAW) is loading the input word in the BOP (figure 1), otherwise the transition to block 6 GAW.

В блоке 9 ГСА по команде "ОБСЧ:1" обнуляется счетчик (СЧ) блока БОП (фиг. 2). До тех пор, пока не будет снят сигнал "ЗАГР" (блок 10 ГСА), по команде "ЗПОЗУ:1" происходит запись входного символа в ОЗУ по адресу, хранящемуся в счетчике СЧ (фиг.2) и одновременно выдача внешнего синхронизирующего сигнала "СИН: 1" (блок 11 ГСА) (фиг.1). В блоке 12 ГСА по команде "ИНСЧ:1" содержимое счетчика СЧ увеличивается на единицу (фиг.2), осуществляется переход на блок 10 ГСА. In block 9 of the GAW, the command "OSCH: 1" resets the counter (MF) of the BOP unit (Fig. 2). Until the signal "ZAGR" is removed (block 10 GAU), by the command "RAM: 1", the input symbol is written into RAM at the address stored in the MF counter (Fig. 2) and at the same time, the output of the external synchronizing signal " SIN: 1 "(block 11 GAW) (figure 1). In block 12 GAW by the command "INSC: 1" the content of the midrange counter is increased by one (figure 2), the transition to block 10 GAW.

В блоке 13 ГСА по команде "ЗПРГ:1" происходит запись в регистр РГ состояния счетчика СЧ (фиг.2), в данном случае равного количеству символов в принятом слове. In block 13 of the GAW, by the command "ZPRG: 1", the state of the MF counter is recorded in the register RG (figure 2), in this case equal to the number of characters in the received word.

В блоке 14 ГСА анализируется признак пустоты стека блока СБП1 (фиг.5) "С1ПТ=1". По этому признаку осуществляется переход на блок 16 алгоритма. In block 14 GAW analyzes the sign of the emptyness of the stack block SBP1 (figure 5) "C1PT = 1". On this basis, the transition to block 16 of the algorithm.

В блоке 15 ГСА по команде "ОБСЧ:1" происходит обнуление счетчика СЧ (фиг. 2), по командам "ЧТС1:1", "А1:1", "А2:1" и "ЗПС2:1" происходит запись символа из блока СБП1 в блок СБП2, при этом сигналы "А1" и "А2", подаваемые на адресные входы коммутатора (КМ), соединяют его выход со входом И3 (фиг. 6). Осуществляется переход на блок 19 ГСА. In block 15 of the GAW, the MSC counter is reset to zero using the “OCCH: 1” command (Fig. 2), the character is recorded from the “ЧТС1: 1”, “A1: 1”, “A2: 1” and “ЗПС2: 1” commands block SBP1 to block SBP2, while the signals "A1" and "A2" supplied to the address inputs of the switch (KM) connect its output to input I3 (Fig. 6). The transition to block 19 GAW.

В блоке 16 ГСА анализируется признак пустоты стека бока СБП2 (фиг.4) "С2ПТ= 1". По этому признаку осуществляется переход на блок 40 ГСА, иначе происходит запись слова из СБП2 в СБП1 (фиг.1). In block 16 GAW analyzes the sign of the emptiness of the side stack SBP2 (figure 4) "C2PT = 1". On this basis, the transition to the block 40 GAW, otherwise the word is recorded from SBP2 in SBP1 (figure 1).

В блоке 17 ГСА анализируется признак границы между словами в стековых блоках памяти (фиг.1) "ГС=1", идентифицируемый специальным служебным кодом. По этому признаку осуществляется переход на блок 15 ГСА. In block 17 GAW analyzes the sign of the boundary between words in the stacked blocks of memory (figure 1) "HS = 1", identified by a special service code. On this basis, the transition to block 15 GAW.

В блоке 18 ГСА по командам "ЧТС2:1" и "ЗПС1:1" происходит запись очередного символа из стека блока СБП2 в стек блока СБП1 (фиг.4,5). Осуществляется переход на блок 17 ГСА. In block 18 of the GAW by the commands "CTS2: 1" and "ZPS1: 1", the next character is recorded from the stack of the SBP2 block to the stack of the SBP1 block (Fig. 4.5). The transition to block 17 GAW.

В блоке 19 ГСА анализируется признак того, что И2 меньше И3 "МЕНЬШЕ=1", выдаваемый элементом сравнения (фиг. 1). По этому признаку осуществляется переход на блок 20 ГСА, иначе на блок 35 ГСА. In block 19 of the GAW, the sign that I2 is less than I3 “LESS = 1”, issued by the comparison element (FIG. 1), is analyzed. On this basis, the transition to block 20 GAW, otherwise to block 35 GAW.

В блоке 20 ГСА анализируется признак границы между словами в стеках (фиг.4,5) "ГС=1". По этому признаку осуществляется переход на блок 22 ГСА. In the block 20 GAW analyzes the sign of the boundary between the words in the stacks (Fig 4,5) "HS = 1". On this basis, the transition to block 22 GAW.

В блоке 21 ГСА по командам "ЧТС2:1" и "ЗПС1:1" происходит запись символа из СБП2 в СБП1 (фиг.1). Осуществляется переход на блок 20 ГСА. In block 21 of the GAW, the commands “ЧТС2: 1” and “ЗПС1: 1” record the character from SBP2 to SBP1 (Fig. 1). The transition to block 20 GAW.

В блоке 22 ГСА анализируется признак пустоты стека блока СБП2 (фиг.4) "С2ПТ=1". По этому признаку осуществляется переход на блок 40 ГСА. In block 22 GAW analyzes the sign of the emptiness of the stack block SBP2 (figure 4) "C2PT = 1". On this basis, the transition to the block 40 GAW.

В блоке 23 ГСА по командам "ЧТС2:1" и "ЗПС1:1" происходит запись символа из СБП2 в СБП1 (фиг.1). In block 23 of the GAW, the commands “CTS2: 1” and “ZPS1: 1” record the character from SBP2 to SBP1 (Fig. 1).

В блоке 24 ГСА анализируется признак границы слов в стеках блоков СБП2 и СБП1 (фиг. 4,5) "ГС=1". По этому признаку осуществляется переход на блок 25 ГСА, иначе на блок 23 алгоритма. In block 24 GAW analyzes the sign of the word boundary in the stacks of blocks SBP2 and SBP1 (Fig. 4,5) "GS = 1". On this basis, the transition to block 25 GAW, otherwise to block 23 of the algorithm.

В блоке 25 ГСА по команде "обсч:1" происходит обнуление счетчика СЧ блока БОП (фиг. 2), по командам "ЧТС1:1", "ЗПС2:1", "А1:1", "А2:1" происходит запись символа из СБП1 в СБП2 (фиг.1). In block 25 of the GAW, the command “obsch: 1” resets the counter of the midrange of the BOP unit (Fig. 2), the commands “ЧТС1: 1”, “ЗПС2: 1”, “A1: 1”, “А2: 1” record character from SBP1 to SBP2 (figure 1).

В блоке 26 ГСА анализируется признак того, что И2 меньше И3 "МЕНЬШЕ=1", по которому осуществляется переход на блок 20 ГСА. In block 26 of the GAW, the sign that I2 is less than I3 "LESS = 1" is analyzed, according to which the transition to block 20 of the GAW is performed.

В блоке 27 ГСА анализируется признак того, что И2 равно И3 "РАВНО=1", по которому осуществляется переход на блок 31 ГСА. In the block 27 GAW analyzes the sign that I2 is equal to I3 "EQUAL = 1", by which the transition to block 31 GAW.

В блоке 28 ГСА анализируется признак того, что И2 больше И3 "БОЛЬШЕ=1", выдаваемый элементом сравнения ЭС (фиг.1). По этому признаку осуществляется переход на блок 29 ГСА, иначе на блок 26 ГСА, и признаки проверяются заново. In block 28 of the GAW, a sign is analyzed that I2 is greater than I3 “MORE = 1”, issued by the ES comparison element (FIG. 1). On this basis, the transition to block 29 GAW, otherwise to block 26 GAW, and signs are checked again.

В блоке 29 ГСА анализируется признак границы слов в стеках (фиг.4,5) "ГС=1", по которому осуществляется переход на блок 40 ГСА. In the block 29 GAW analyzes the sign of the word boundary in the stacks (Fig. 4,5) "GS = 1", which is the transition to block 40 GAW.

В блоке 30 ГСА по командам "ЧТС1:1", "А1:1", "А2:1", "ЗПС2:1" происходит запись в СБП2 символа из блока СБП1 (фиг.1). Осуществляется переход на блок 29 ГСА. In the block 30 GAU for the commands "CTS1: 1", "A1: 1", "A2: 1", "ZPS2: 1" is the entry in SBP2 character from block SBP1 (figure 1). The transition to block 29 GAW.

В блоке 31 ГСА по команде "ИНСЧ:1" содержимое счетчика СЧ увеличивается на единицу (фиг.2). По командам "ЧТС1:1", "А1:1", "А2:1", "ЗПС2:1" происходит запись в СБП2 символа из СБП1 (фиг.1). In block 31 GAW by the command "INSC: 1" the content of the midrange counter is increased by one (figure 2). By the commands "ЧТС1: 1", "A1: 1", "A2: 1", "ЗПС2: 1", the character from SBP1 is recorded in SBP2 (Fig. 1).

В блоке 32 ГСА анализируется признак границы слов в стеках (фиг.4,5) "ГС=1" или пустоты стека блока СБП2 "С2ПТ" (фиг.4). По этому признаку осуществляется переход на блок 34 ГСА. In block 32 GAW analyzes the sign of the word boundary in the stacks (Fig. 4,5) "HS = 1" or the empty space of the stack block SBP2 "C2PT" (Fig.4). On this basis, the transition to block 34 GAW.

В блоке 33 ГСА анализируется признак конца слова, хранящегося в БОП "КС= 1" (фиг. 1), выдаваемый при равенстве состояний счетчика СЧ и регистра РГ блока БОП (фиг.2). По этому признаку осуществляется переход на блок 20 ГСА, иначе на блок 26 ГСА. In the block 33 GAW analyzes the sign of the end of the word stored in the BOP "KS = 1" (Fig. 1), issued with the equality of the states of the MF counter and the register RG of the BOP block (Fig.2). On this basis, the transition to block 20 GAW, otherwise to block 26 GAW.

В блоке 34 ГСА анализируется признак конца слова в БОП "КС=1" (фиг.1). По этому признаку осуществляется переход на блок 40 ГСА, иначе на блок 29 ГСА. In the block 34 GAW analyzes the sign of the end of the word in the BOP "KS = 1" (figure 1). On this basis, the transition to block 40 GAW, otherwise to block 29 GAW.

В блоке 35 ГСА анализируется признак того, что И2 равна И3 "РАВНО=1" (фиг.1). Если "РАВНО=0", осуществляется переход на блок 44 ГСА. In block 35 GAW analyzes the sign that I2 is equal to I3 "EQUAL = 1" (figure 1). If "EQUAL = 0", the transition to block 44 GAW.

В блоке 36 ГСА по команде "ИНСЧ:1" содержимое счетчика СЧ увеличивается на единицу (фиг.2). По командам "ЧТС1:1", "А1:1", "А2:1", "ЗПС2:1" происходит запись в СБП2 символа из СБП1 (фиг.1). In block 36 GAW by the command "INSC: 1" the content of the midrange counter is increased by one (figure 2). By the commands "ЧТС1: 1", "A1: 1", "A2: 1", "ЗПС2: 1", the character from SBP1 is recorded in SBP2 (Fig. 1).

В блоке 37 ГСА анализируется признак границы слов в стеках или пустоты стека блока СБП2, соответственно "ГС= 1" и "С2ПТ=1" (фиг.4,5). По этому признаку осуществляется переход на блок 39 ГСА. In block 37 GAW analyzes the sign of the word boundary in the stacks or the empty space of the stack block SBP2, respectively, "GS = 1" and "C2PT = 1" (Fig.5.5). On this basis, the transition to block 39 GAW.

В блоке 38 ГСА анализируется признак конца слова в БОП "КС=1" (фиг.1). По этому признаку осуществляется переход на блок 20 ГСА, иначе на блок 19 ГСА. In block 38 GAW analyzes the sign of the end of the word in the BOP "KS = 1" (figure 1). On this basis, the transition to block 20 GAW, otherwise to block 19 GAW.

В блоке 39 ГСА анализируется признак конца слова в БОП "КС=1" (фиг.1). По этому признаку осуществляется переход на блок 40 ГСА, иначе на блок 45 ГСА. In block 39 GAW analyzes the sign of the end of the word in the BOP "KS = 1" (figure 1). On this basis, the transition to block 40 GAW, otherwise to block 45 GAW.

В блоке 40 ГСА по команде "ОБСЧ:1" обнуляется счетчик СЧ (фиг.2), по командам "ЗПС2: 1" и "А2:1" в стек блока СБП2 (фиг.4) записывается служебный код границы между словами, причем сигналом "А2", поступающим на адресный вход коммутатора (КМ) блока БКиИ, коммутируется выход формирователя кодов ФК, генерирующего служебный код, на выход коммутатора КМ (фиг.6). In the block 40 GAW by the command "OSCH: 1" the MF counter is cleared (Fig. 2), by the commands "ZPS2: 1" and "A2: 1" the service code of the boundary between the words is written to the stack of the SBP2 block (Fig. 4), and the signal "A2", arriving at the address input of the switch (CM) of the BCI unit, the output of the FC code generator generating the service code is switched to the output of the switch CM (Fig.6).

В блоке 41 ГСА анализируется признак конца слова в БОП "КС=1" (фиг.1). По признаку осуществляется переход на блок 71 ГСА. In block 41 GAW analyzes the sign of the end of the word in the BOP "KS = 1" (figure 1). On the basis of the transition to block 71 GAW.

В блоке 42 ГСА по командам "ЗПС2:1" и "А1:1" происходит запись символа из ОЗУ с адресом, хранящимся в счетчике СЧ (фиг.2), в СБП2 (фиг.1), при этом на адресный вход коммутатора КМ блока БКиИ поступает сигнал "А1" и коммутирует вход И2 на выход КМ (фиг.6). In block 42 of the GAU, the commands “ZPS2: 1” and “A1: 1” record the character from RAM with the address stored in the MF counter (FIG. 2), in SBP2 (FIG. 1), at the same time, to the address input of the KM switch block BCI receives the signal "A1" and commutes the input And2 to the output of the CM (Fig.6).

В блоке 43 ГСА по команде "ИНСЧ:1" происходит увеличение на единицу содержимого счетчика СЧ (фиг.2). Осуществляется переход на блок 41 ГСА. In block 43 GAW by the command "INSC: 1" there is an increase by one unit of the contents of the midrange counter (figure 2). The transition to block 41 GAW.

В блоке 44 ГСА анализируется признак того, что И2 больше И3 "БОЛЬШЕ=1" (фиг.1). Если "БОЛЬШЕ=0", осуществляется переход на блок 19 ГСА. In block 44 of the GAW, a sign is analyzed that I2 is greater than I3 "MORE = 1" (Fig. 1). If "MORE = 0", the transition to block 19 GAW.

В блоке 45 ГСА анализируется признак границы слов "ГС=1" в стеках или пустоты стека блока СБП2 "С2ПТ=1" (фиг.4,5). По этому признаку осуществляется переход на блок 47 ГСА. In the block 45 GAW analyzes the sign of the word boundary "HS = 1" in the stacks or the empty space of the stack block SBP2 "C2PT = 1" (Fig. 4,5). On this basis, the transition to block 47 GAW.

В блоке 46 ГСА по командам "ЧТС1:1", "ЗПС2:1", "А1:1", "А2:1" происходит запись в СБП2 символа из СБП1 (фиг.1). Осуществляется переход на блок 45 ГСА. In block 46 GAU for the commands "CTS1: 1", "ZPS2: 1", "A1: 1", "A2: 1" is a record in SBP2 character from SBP1 (figure 1). The transition to block 45 GAW.

В блоке 47 алгоритма анализируется признак пустоты СБП1 "С1ПТ=1" (фиг. 1). По признаку осуществляется переход на блок 40 ГСА. In block 47 of the algorithm, the sign of emptiness SBP1 "C1PT = 1" is analyzed (Fig. 1). On the basis of the transition to block 40 GAW.

В блоке 48 ГСА по команде "ОБСЧ:1" происходит обнуление счетчика СЧ (фиг. 2), по командам "ЧТС1:1", "ЗПС2:1", "А1:1", "А2:1" происходит запись в СБП2 символа из СБП1 (фиг.1). In block 48 of the GAW, the command “OSCH: 1” resets the MF counter (Fig. 2), and the commands “ЧТС1: 1”, “ЗПС2: 1”, “А1: 1”, “А2: 1” record in SBP2 character from SBP1 (figure 1).

В блоке 49 ГСА анализируется признак того, что И2 меньше И3 "МЕНЬШЕ=1" (фиг.1). По признаку осуществляется переход на блок 56 ГСА. In block 49 of the GAW, a sign is analyzed that I2 is less than I3 “LESS = 1” (FIG. 1). On the basis of the transition to block 56 GAW.

В блоке 50 ГСА анализируется признак того, что И2 равно И3 "РАВНО=1" (фиг.1). По признаку осуществляется переход на блок 52 ГСА. In block 50 GAW analyzes the sign that I2 is equal to I3 "EQUAL = 1" (figure 1). On the basis of the transition to block 52 GAW.

В блоке 51 ГСА анализируется признак того, что И2 больше И3 "БОЛЬШЕ=1" (фиг.1). По признаку осуществляется переход на блок 45 ГСА, иначе на блок 49 ГСА. In block 51 of the GAW, a sign is analyzed that I2 is greater than I3 "MORE = 1" (Fig. 1). On the basis of the transition to block 45 GAW, otherwise to block 49 GAW.

В блоке 52 ГСА по команде "ИHСЧ:1" cодержимое cчетчика СЧ увеличиваетcя на единицу (фиг. 2), по командам "ЧТС1:1", "ЗПС2:1", "А1:1", "А2:1" проиcходит запиcь cимвола в СБП2 из СБП1 (фиг. 1). In block 52 of the GAW, by the command “INSCH: 1”, the content of the midrange counter is increased by one (Fig. 2), by the commands “CTS1: 1”, “ZPS2: 1”, “A1: 1”, “A2: 1”, the recording the symbol in SBP2 from SBP1 (Fig. 1).

В блоке 53 ГСА анализируется признак границы слов "ГС=1" в стеках или пустоты стека блока СБП2 "С2ПТ=1" (фиг.4,5). Если признак равен нулю, осуществляется переход на блок 55 ГСА. In block 53 GAW analyzes the sign of the word boundary "HS = 1" in the stacks or the empty space of the stack block SBP2 "C2PT = 1" (Fig.5.5). If the sign is equal to zero, the transition to block 55 GAW.

В блоке 54 ГСА анализируется признак конца слова в БОП "КС=1" (фиг.1). По этому признаку осуществляется переход на блок 40 ГСА,иначе на блок 45 ГСА. In block 54 GAW analyzes the sign of the end of the word in the BOP "KS = 1" (figure 1). On this basis, the transition to block 40 GAW, otherwise to block 45 GAW.

В блоке 55 ГСА анализируется признак конца слова в БОП "КС=1". Если "КС= 0", осуществляется переход на блок 49 ГСА. In the block 55 GAW analyzes the sign of the end of the word in the BOP "KS = 1". If "KS = 0", the transition to block 49 GAW.

В блоке 56 ГСА анализируется признак границы между словами в стеках "ГС= 1" (фиг.4,5). По признаку осуществляется переход на блок 40 алгоритма. In block 56 GAW analyzes the sign of the boundary between the words in the stacks "HS = 1" (Fig 4,5). On the basis of the transition to the block 40 of the algorithm.

В блоке 57 ГСА по командам "ЧТС2:1" и "ЗПС1:1" переписывается символ из СБП2 в СБП1 (фиг.1). Осуществляется переход на блок 56 ГСА. In block 57 of the GAW, the symbol “SBT2: 1” and “ZPS1: 1” rewrites the symbol from SBP2 to SBP1 (Fig. 1). The transition to block 56 GAW.

В блоке 58 ГСА анализируется признак пустоты СБП2 "С2ПТ". Если "С2ПТ=1", осуществляется переход на блок 60 ГСА. In block 58 of the GAW, the sign of emptiness SBP2 "C2PT" is analyzed. If "C2PT = 1", the transition to block 60 GAW.

В блоке 59 ГСА по командам "ЧТС2:1" и "ЗПС1:1" переписывается символ из СБП2 в СБП1 (фиг.1). Осуществляется переход на блок 58 ГСА. In block 59 of the GAW, the symbol “SBT2: 1” and “ZPS1: 1” rewrites the symbol from SBP2 to SBP1 (Fig. 1). The transition to block 58 GAW.

В блоке 60 ГСА анализируется признак наличия сигнала "ЧТПР" (фиг.1). Если "ЧТПР=1", осуществляется переход на блок 61 ГСА, иначе на блок 60 ГСА. In block 60 GAW analyzes the sign of the presence of the signal "CHTPR" (figure 1). If "ChTPR = 1", the transition to block 61 GAW, otherwise to block 60 GAW.

В блоке 61 ГСА анализируется признак пустоты СБП1 "С1ПТ=1" (фиг.1). По признаку осуществляется переход на блок 72 ГСА. In block 61 GAW analyzes the sign of emptiness SBP1 "C1PT = 1" (figure 1). On the basis of the transition to block 72 GAW.

В блоке 62 ГСА происходит выдача символа из СБП1 на выходной канал по командам "ЧТС1:1" и "РВ:1" и одновременно выдача выходного синхронизирующего сигнала "СИН: 1". При этом сигналом "РВ" выход шинного формирователя подключается к его входу (фиг.6). In block 62 GAW, the symbol is issued from SBP1 to the output channel by the commands "CTS1: 1" and "PB: 1" and at the same time the synchronization output signal "SIN: 1" is issued. When this signal "RV" the output of the bus driver is connected to its input (Fig.6).

В блоке 63 ГСА анализируется признак пустоты СБП1 "С1ПТ=1" (фиг.1). По признаку осуществляется переход на блок 65 ГСА. In block 63 GAW analyzed the sign of the void SBP1 "S1PT = 1" (figure 1). On the basis of the transition to block 65 GAW.

В блоке 64 ГСА по командам "ЧТС1:1", "ЗПС2:1", "А1:1", "А2:1" происходит запись символа из СБП1 в СБП2 (фиг.1). Осуществляется переход на блок 63 ГСА. In block 64 of the GAW, the commands “ЧТС1: 1”, “ЗПС2: 1”, “А1: 1”, “А2: 1” record the character from SBP1 to SBP2 (Fig. 1). The transition to block 63 GAW.

В блоке 65 ГСА анализируется наличие сигнала "ЧТОБ=1" (фиг.1). Если "ЧТОБ=1", осуществляется переход на блок 66 ГСА, иначе на блок 65 ГСА. In block 65 GAW analyzes the presence of the signal "WHAT = 1" (figure 1). If "WHAT = 1", the transition to block 66 GAW, otherwise to block 65 GAW.

В блоке 66 ГСА анализируется признак пустоты СБП2 "С2ПТ=1" (фиг.1). По признаку осуществляется переход на блок 72 ГСА. In block 66 GAW analyzes the sign of emptiness SBP2 "C2PT = 1" (figure 1). On the basis of the transition to block 72 GAW.

В блоке 67 ГСА анализируется признак границы между словами в стеках (фиг.4,5) "ГС". Если "ГС=1", осуществляется переход на блок 69 ГСА. In block 67 GAW analyzes the sign of the boundary between the words in the stacks (Fig. 4,5) "GS". If "HS = 1", the transition to block 69 GAW.

В блоке 68 ГСА по командам "ЧТС2:1", "ЗПС1:1" переписывается символ из СБП2 в СБП1 (фиг.1). Осуществляется переход на блок 67 ГСА. In block 68 of the GAW, the commands “CTS2: 1”, “ZPS1: 1” correspond to the symbol from SBP2 to SBP1 (Fig. 1). The transition to block 67 GAW.

В блоке 69 ГСА анализируется признак пустоты СБП1 "С1ПТ" (фиг.1). Если "С1ПТ=1", осуществляется переход на блок 65 ГСА. In block 69 GAW analyzes the sign of the emptiness SBP1 "S1PT" (figure 1). If "S1PT = 1", the transition to block 65 GAW.

В блоке 70 ГСА происходит выдача символа на выходной канал из СБП1 по командам "РВ:1", "ЧТС1:1 и одновременно выдача сигнала "СИН:1". Осуществляется переход на блок 69 ГСА. In block 70 GAW, the symbol is output to the output channel from SBP1 by the commands “РВ: 1”, “ЧТС1: 1 and at the same time the signal“ SYN: 1 ”is issued. The transition to block 69 GAW.

В блоке 71 ГСА анализируется признак СБП1 или СБП2 полон "С1ПН или С2ПН" (фиг. 1). Если признак равен нулю, происходит переход на блок 6 ГСА, иначе сортировка экстренно прекращается и осуществляется переход на блок 72 ГСА. In block 71, the GAW analyzes the sign of SBP1 or SBP2 is full of "C1PN or C2PN" (Fig. 1). If the sign is equal to zero, there is a transition to block 6 GAW, otherwise the sorting is urgently stopped and the transition to block 72 GAW.

В блоке 72 ГСА выдается внешний сигнал готовности устройства "ГТ:1" (фиг.1). In block 72 GAW issued an external signal of readiness of the device "GT: 1" (figure 1).

Работа устройства сортировки информации заключается в следующем. The operation of the information sorting device is as follows.

Внешние управляющие сигналы "ЗАГР", "ЧТПР", "ЧТОБ", "ПУСК" и "СБРОС" поступают в блок 8 управления, сигналы "ГТ" и "СИН" из блока 8 управления. Входной канал представляет собой интерфейс, по которому посимвольно поступают слова, подлежащие сортировке. Выходной канал-интерфейс, по которому посимвольно поступающие отсортированные слова выдаются на внешнее устройство. External control signals "ZAGR", "CHTPR", "WHAT", "START" and "RESET" are received in the control unit 8, the signals "GT" and "SIN" from the control unit 8. The input channel is an interface by which words to be sorted arrive character by character. The output channel is an interface through which sorted words are received character-by-character to an external device.

Основная идея работы заключается в следующем. The main idea of the work is as follows.

Сортировка данных происходит по мере их поступления. На вход устройства сортировки посимвольно поступает и записывается в БОП текущее слово (число), где символом является составляющая слова, имеющая фиксированную длину. Началом отсортированного массива считается первый символ наименьшего числа (слова), концом последний символ наибольшего, при этом массив хранится в стеках блоков СБП1 и СБП2 (фиг.1). Указанные стеки (фиг.4,5) организованы в виде очередей типа LIFO (последним пришел первым ушел), причем начало отсортированного массива является первым пришедшим в стек блока СБП2, а конец первым пришедшим в стек блока СБП1. Осуществляется поиск весового места слова текущего) в массиве уже упорядоченных данных посредством посимвольных сравнений элементом сравнения ЭС текущего слова со словами массива упорядоченных данных. Весовое место слова такая позиция текущего слова в упорядоченном массиве, когда ближайшее к нему стоящее на позицию раньше слово меньше либо равно ему, а стоящее на позицию позже слово больше либо равно ему. Sorting data occurs as it becomes available. At the input of the sorting device, the current word (number) is received and written into the BOP, where the symbol is a component of the word, which has a fixed length. The beginning of the sorted array is considered the first character of the smallest number (words), the end is the last character of the largest, while the array is stored in the stacks of blocks SBP1 and SBP2 (Fig. 1). The indicated stacks (Fig. 4,5) are organized in the form of LIFO queues (the last to come first went), the beginning of the sorted array being the first to come on the stack of SBP2, and the end to go first to the stack of SBP1. A search is made for the weight place of the current word in the array of already ordered data by symbol-by-symbol comparisons by the ES comparison element of the current word with the words in the array of ordered data. The weighted place of a word is the position of the current word in the ordered array, when the word closest to it, which is one position earlier, is less than or equal to it, and the word that is placed one position later is greater than or equal to it.

Поиск весового места слова (текущего) осуществляется следующим образом. Первый символ текущего слова сравнивается элементом сравнения (ЭС) с первым символом первого слова из стека блока СБП1 (фиг.1).Если результатом сравнения является равенство, сравниваются вторые символы и т.д. до тех пор, пока результатом сравнения не станет "больше" или "меньше", или одно из слов не кончилось. Причем сравненные символы переписываются из СБП1 в СБП2. Результат сравнения двух слов: если слова кончились одновременно они равны, если элементом сравнения (ЭС) был выдан сигнал "БОЛЬШЕ=1" (т.е. символ слова из БОП больше символа слова из СБП1), либо слово блока СБП1 кончилось, а слово БОП нет текущее слово, находящееся в БОП, больше исследованного числа из СБП1. Если элементом сравнения выдан сигнал "МЕНЬШЕ=1" (т.е. символ слова из БОП меньше символа слова из СБП1), либо текущее слово кончилось, а исследуемое (из СБП1) нет текущее слово больше исследованного. Далее, если текущее слово равно исследованному, оно записывается за ним в СБП2, если текущее слово больше, оно сравнивается с ближайшим большим исследованному слову, пока текущее слово не станет равно очередному слову из стека, тогда оно записывается за очередным исследованным словом, либо не станет меньше очередного, тогда текущее слово из БОП записывается перед ним, либо не будет достигнут конец массива, при достижении конца массива текущее слово из БОП записывается в конец. Если текущее слово меньше исследованного, то оно сравнивается с очередным ближайшим меньшим исследованному, пока не станет равно очередному, либо больше его, тогда слово из БОП записывается в массив за исследованным словом (т.е. на позицию ближе к концу массива), либо не будет достигнуто начало массива, при достижении начала слово из БОП записывается в массив первым. Search for the weight of the word (current) is as follows. The first character of the current word is compared by a comparison element (ES) with the first character of the first word from the stack of the SBP1 block (Fig. 1). If the result of the comparison is equality, the second characters are compared, etc. until the result of the comparison is “more” or “less,” or one of the words does not end. Moreover, the compared characters are overwritten from SBP1 to SBP2. The result of the comparison of two words: if the words ended at the same time, they are equal, if the signal “MORE = 1” was issued by the comparison element (ES) (that is, the word symbol from the BOP is larger than the word symbol from SBP1), or the word of the block SBP1 has ended, and the word BOP no current word in BOP, more than the investigated number from SBP1. If the signal “LESS = 1” is issued by the comparison element (that is, the word character from BOP is less than the word character from SBP1), or the current word has ended, and the word being studied (from SBP1) is not the current word larger than the word studied. Further, if the current word is equal to the word studied, it is written behind it in SBP2, if the current word is larger, it is compared with the next largest word studied, until the current word is equal to the next word from the stack, then it is written after the next word studied, or it won’t less than the next one, then the current word from the BOP is written in front of it, or the end of the array is not reached, when the end of the array is reached, the current word from the BOP is written to the end. If the current word is less than the studied one, then it is compared with the next nearest smaller studied one until it becomes equal to the next one, or more than it, then the word from the BOP is written to the array behind the studied word (i.e., a position closer to the end of the array), or not the beginning of the array will be reached, when the beginning is reached, the word from the BOP is written to the array first.

Вышеописанные запись в БОП, поиск весового места и запись в стековые блоки памяти, хранящие отсортированный массив, происходят посимвольно, повторяются n раз, где n количество слов, подлежащих сортировке. После этого упорядоченная информация посимвольно выдается на выходной канал в возрастающем либо в убывающем порядке. The above-described entries in the BOP, the search for a weight place and the entry in the stacked memory blocks storing the sorted array occur character-by-character, are repeated n times, where n is the number of words to be sorted. After that, the ordered information is symbolically issued to the output channel in ascending or descending order.

Блок 2 оперативной памяти содержит счетчик (СЧ), регистр (РГ), оперативное запоминающее устройство (ОЗУ) и компаратор (КП) (фиг.2). На инверсный вход ОЗУ выбор кристалла подается константа "0" (не ВК). Входная информация И1 поступает на вход ОЗУ. По сигналу "ОБСЧ=1" происходит обнуление счетчика. По сигналу "ЗПОЗУ=1" записывается входной символ в ОЗУ по адресу, хранящемуся в счетчике. По сигналу "ИНСЧ=1" содержимое счетчика увеличивается на единицу. По сигналу "ЗПРГ=1", выдаваемому по окончании загрузки слова, содержимое счетчика, в данном случае равно количеству символов в слове, записывается в регистр. Если "ЗПОЗУ=0", на выход ОЗУ И2 выдается символ, находящийся по адресу, хранящемуся в счетчике. Компаратор (КП), входами которого являются выходы регистра и счетчика, определяет признак конца слова "КС", выдаваемый в блок 8 управления при равенстве этих кодов (фиг.1). Block 2 of RAM contains a counter (MF), a register (WG), random access memory (RAM) and a comparator (KP) (figure 2). To the inverse input of RAM, the choice of the crystal is fed by the constant "0" (not VK). Input information I1 goes to RAM input. The signal "OSCH = 1" is the zeroing of the counter. By the signal "RAM = 1" the input symbol is written into RAM at the address stored in the counter. By the signal "INSC = 1" the content of the counter is increased by one. By the signal "ЗПРГ = 1", issued at the end of the word download, the contents of the counter, in this case equal to the number of characters in the word, are recorded in the register. If "ZPOZU = 0", the symbol located at the address stored in the counter is output to the output of RAM I2. The comparator (KP), the inputs of which are the outputs of the register and the counter, determines the sign of the end of the word "KS", issued to the control unit 8 with the equality of these codes (figure 1).

Элемент 3 сравнения содержит компаратор (КП) (фиг.3), который сравнивает поступающие на его входы символы И2 и И3 и выдает в блок 8 управления (фиг. 1) сигналы "БОЛЬШЕ=1" (если И2 больше И3), "МЕНЬШЕ=1" (если И2 меньше И3), "РАВНО=1" (если И2 равно И3). Comparison element 3 contains a comparator (KP) (Fig. 3), which compares the I2 and I3 symbols arriving at its inputs and outputs to the control unit 8 (Fig. 1) signals "MORE = 1" (if I2 is greater than I3), "LESS = 1 "(if I2 is less than I3)," EQUAL = 1 "(if I2 is equal to I3).

Стековый блок 4 памяти содержит стек (фиг.4) и служит для хранения части отсортированного массива. По сигналу "ЗПС2=1" в вершину стека записывается символ И5, по сигналу "ЧТС2=1" из вершины стека считывается символ на выход И4. При этом стеком выдаются сигналы в блок 8 управления (фиг.1) "С2ПН=1" (если стек полон) и "С2ПТ=1" (если стек пуст). The stack block 4 of the memory contains a stack (figure 4) and serves to store part of the sorted array. By the signal "ZPS2 = 1", the I5 symbol is written to the top of the stack, by the signal "CTS2 = 1", the symbol to the I4 output is read from the top of the stack. When this stack signals are issued to the control unit 8 (figure 1) "C2PN = 1" (if the stack is full) and "C2PT = 1" (if the stack is empty).

Стековый блок 5 памяти содержит стек (фиг.5) и служит для хранения другой части отсортированного массива. По сигналу "ЧТС1=1" из вершины стека считывается символ на выход И3, по сигналу "ЗПС1=1" в вершину стека записывается символ И4. При этом стеком выдаются сигналы в блок 8 управления (фиг. 1) "С1ПН=1" (если стек полон) и "С1ПТ=1" (если стек пуст). Stack unit 5 memory contains a stack (figure 5) and serves to store another part of the sorted array. By the signal "ЧТС1 = 1", the symbol for the I3 output is read from the top of the stack, by the signal "ЗПС1 = 1" the I4 symbol is written to the top of the stack. When this stack signals are issued to the control unit 8 (Fig. 1) "C1PN = 1" (if the stack is full) and "C1PT = 1" (if the stack is empty).

Блок 6 коммутации и идентификации (фиг.6) содержит шинный формирователь (ШФ) с тремя состояниями на выходе, компаратор (КП), коммутатор (КМ), формирователь кодов (ФК). Служит для выдачи упорядоченного массива слов на выходной канал ВЫХК и коммутации сигналов от трех источников на вход СБП2 (фиг. 1). По сигналу "РВ=1" информация со входа ШФ И3 передается на его выход И6. Когда "РВ=0", его выход находится в высокоимпедансном состоянии. Сигналы А1 и А2 поступают на адресные входы коммутатора КМ, И5 является его выходом, на который передается входная информация И3 по "А1=1", "А2=1", передается И2 по "А1=1", "А2=0", либо передается служебный код границы между словами, генерируемый формирователем кодов (ФК), указанное подключение осуществляется при "А1=0", "А2=1". Выход И5 коммутатора поступает на вход СБП2 (фиг.1). Компаратор, на входы которого поступают И3 и выход ФК, определяет признак границы между упорядоченными словами "ГС", выдаваемый в блок 8 управления (фиг.1) при равенстве символа, находящегося в вершине стека СБП1, служебному коду. Block 6 switching and identification (Fig.6) contains a bus driver (BF) with three output states, a comparator (CP), a switch (KM), a code generator (FC). Serves for issuing an ordered array of words to the output channel OUT and switching signals from three sources to input SBP2 (Fig. 1). By the signal "RV = 1" information from the input of the IF I3 is transmitted to its output I6. When "PB = 0", its output is in a high impedance state. Signals A1 and A2 go to the address inputs of the KM switch, I5 is its output, to which I3 input information is transmitted via "A1 = 1", "A2 = 1", I2 is transmitted through "A1 = 1", "A2 = 0", or the service code of the boundary between words generated by the code generator (FC) is transmitted, the specified connection is made with "A1 = 0", "A2 = 1". The output of the switch I5 is fed to the input SBP2 (figure 1). The comparator, at the inputs of which I3 and the FC output go, determines the sign of the boundary between the ordered words "GS", issued to the control unit 8 (Fig. 1) when the symbol located at the top of the SBP1 stack is equal to the service code.

Блок 8 управления синтезируется на основе ГСА управления (фиг.7) известным способом (2). The control unit 8 is synthesized based on the GAW control (Fig.7) in a known manner (2).

Размеченная ГСА работы блока 8 управления приведена на фиг.8, где обозначено. Marked GAW operation of the control unit 8 is shown in Fig.8, where indicated.

Логические условия:
Х1: "СБРОС"
Х2: "ПУСК"
Х3: "С2ПТ и С1ПТ"
Х4: "ЧТОБ"
Х5: "ЧТПР"
Х6: "ЗАГР"
Х7: "С2ПТ"
Х8: "МЕНЬШЕ"
Х9: "ГС"
Х10: "ГС или С2ПТ"
Х11: "БОЛЬШЕ"
Х12: "РАВНО"
Х13: "КС"
Х14: "С1ПТ"
Х15: "С2ПН или С1ПН"
Операторы:
У1: "ЧТС1:1"
У2: "ЧТС2:1"
У3: "ОБСЧ:1"
У4: "РВ:1"
У5: "ЗПОЗУ:1"
У6: "СИН:1"
У7: "ИНСЧ:1"
У8: "ЗПРГ:1"
У9: "А1:1"
У10: "А2:1"
У11: "ЗПС1:1"
У12: "ГТ:1"
У13: "ЗПС2:1"
Logical conditions:
X1: RESET
X2: "START"
X3: "S2PT and C1PT"
X4: "WHAT"
X5: "ChTPR"
X6: ZAGR
X7: "S2PT"
X8: LESS
X9: "GS"
X10: "GS or C2PT"
X11: "MORE"
X12: "EQUAL"
X13: "KS"
X14: C1PT
X15: "S2PN or C1PN"
Operators:
U1: "TTS1: 1"
U2: "TTS2: 1"
U3: "OSSH: 1"
U4: RV: 1
U5: "RAM: 1"
Y6: "SIN: 1"
U7: "INSC: 1"
U8: "ZPRG: 1"
U9: “A1: 1”
U10: “A2: 1”
U11: "ZPS1: 1"
U12: "GT: 1"
U13: "ZPS2: 1"

Claims (1)

УСТРОЙСТВО СОРТИРОВКИ ИНФОРМАЦИИ, содержащее два стековых блока памяти, элемент сравнения, блок управления, отличающееся тем, что в него введены входной и выходной каналы, блок оперативной памяти, блок коммутации и идентификации, причем с первого по пятый управляющие выходы блока управления соединены соответственно с первого по пятый управляющими входами блока оперативной памяти, информационный вход которого соединен с входным каналом, управляющий выход с четвертым управляющим входом блока управления, информационный выход с первым информационным входом элемента сравнения и вторым информационным входом блока коммутации и идентификации, управляющий выход последнего соединен с четырнадцатым управляющим входом блока управления, с первого по третий управляющие входы соединены соответственно с десятого по двенадцатый управляющими выходами последнего, второй информационный выход с выходным каналом, первый информационный выход с информационным входом второго стекового блока памяти, первый и второй управляющие входы последнего соединены соответственно с шестым и седьмым управляющими выходами блока управления, первый и второй управляющие выходы соответственно с десятым и одиннадцатым управляющими входами последнего, информационный выход с информационным входом первого стекового блока памяти, первый и второй управляющие входы которого соединены соответственно с восьмым и девятым управляющими выходами блока управления, первый и второй управляющие выходы - соответственно с двенадцатым и тринадцатым управляющими входами последнего, информационный выход с первым информационным входом блока коммутации и идентификации и с вторым информационным входом элемента сравнения, с первого по третий управляющие выходы последнего соединены соответственно с пятого по седьмой управляющими входами блока управления, с первого по третий управляющие входы блока управления, а также восьмой и девятый управляющие входы последнего являются внешними входами устройства, тринадцатый и четырнадцатый управляющие выходы блока управления являются внешними выходами устройства. INFORMATION SORTING DEVICE comprising two stacked memory blocks, a comparison element, a control unit, characterized in that input and output channels, a random access memory unit, a switching and identification unit are introduced therein, the first to fifth control outputs of the control unit being connected respectively from the first the fifth control inputs of the RAM block, the information input of which is connected to the input channel, the control output with the fourth control input of the control unit, the information output with the first the input of the comparison element and the second information input of the switching and identification unit, the control output of the latter is connected to the fourteenth control input of the control unit, the first to third control inputs are connected respectively from the tenth to twelfth control outputs of the last, the second information output with the output channel, the first information output with the information input of the second stacked memory block, the first and second control inputs of the latter are connected respectively to the sixth and seventh control outputs of the control unit, the first and second control outputs, respectively, with the tenth and eleventh control inputs of the latter, an information output with the information input of the first stack memory block, the first and second control inputs of which are connected to the eighth and ninth control outputs of the control unit, the first and second control outputs - respectively with the twelfth and thirteenth control inputs of the last, information output with the first information input of the switching unit identification and identification and with the second information input of the comparison element, the first to third control outputs of the latter are connected respectively to the fifth to seventh control inputs of the control unit, from the first to third control inputs of the control unit, as well as the eighth and ninth control inputs of the latter are external inputs of the device , thirteenth and fourteenth control outputs of the control unit are external outputs of the device.
RU93015991A 1993-03-29 1993-03-29 Device for sorting data RU2034327C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU93015991A RU2034327C1 (en) 1993-03-29 1993-03-29 Device for sorting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU93015991A RU2034327C1 (en) 1993-03-29 1993-03-29 Device for sorting data

Publications (2)

Publication Number Publication Date
RU2034327C1 true RU2034327C1 (en) 1995-04-30
RU93015991A RU93015991A (en) 1997-03-20

Family

ID=20139322

Family Applications (1)

Application Number Title Priority Date Filing Date
RU93015991A RU2034327C1 (en) 1993-03-29 1993-03-29 Device for sorting data

Country Status (1)

Country Link
RU (1) RU2034327C1 (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР N 1304015, кл. G 06F 7/06, опублик.1987. *
2. Авторское свидетельство СССР N 1277091, кл. G 06F 7/06, 1986. *
3. Авторское свидетельство СССР N 1594521, кл. G 06F 7/06, 1990. *

Similar Documents

Publication Publication Date Title
US4507760A (en) First-in, first-out (FIFO) memory configuration for queue storage
KR101648235B1 (en) Pattern-recognition processor with matching-data reporting module
US4996663A (en) Methods and apparatus for decontaminating hash tables
US4341929A (en) Memory accessing system
EP0062121B1 (en) Text processing apparatus with two-stage formatting of text
US4152762A (en) Associative crosspoint processor system
US3422401A (en) Electric data handling apparatus
KR100309658B1 (en) Fast vector loading for automatic test equipment
US5761688A (en) Dictionary retrieval apparatus
US4183464A (en) Hash-coding data storage apparatus with error suppression
RU2034327C1 (en) Device for sorting data
US2983904A (en) Sorting method and apparatus
US6904116B2 (en) Shift register
US9703484B2 (en) Memory with compressed key
US4327407A (en) Data driven processor
RU2274893C2 (en) Information sorting device
US5953454A (en) Minimum distance storage device
KR950001482A (en) Data flow control device and memory device
US6684271B1 (en) Method and apparatus for changing context in link channelization
RU2128855C1 (en) Device for information sorting
US4115869A (en) Methods and apparatus for processing data including a characteristic mark or error
RU2223538C2 (en) Words sorting-out device
RU1837327C (en) Device for morphological analysis of words from natural languages and languages used in business
JPH1051469A (en) Atm switch
JPH064581A (en) Page turning system in electronic filing system