Claims (2)
М соединены с первой группой входов выходного регистра и группой входов блока управлени , группа выходов которого соединена с.группой входов преобразовател параллельного входного кода в двоичный код, группа выходов которого соединена с группами входов вычитающего счетчика и дешифратора, группа выходов которого соединена с второй группой входов выходлого регистра, второй вход вычитающего счетчика соединен с первым выходом делител частоты, а выход подключен к третьему входу блока -управлени , четвертый и п тый выходы которого соединены с первым и вторым входами деигафратора Соответственно, четвертый вход входаого регистра подключен к второму выходу делител частоты. Блок управлени содержит три группы элементов И, группу элементов НЕ, группу элемен тов ИЛИ, четыре элемента ИЛИ, элемент НЕ, элемешы И и триггер, первый, второй и третий входы которого вл ютс соответственно первым , вторым и третьим входами блока управлени , а выход соединен с первым вхоДом первого элемента И, выход которого подключен к третьему выходу блока управлени , а второй вход соединен с выходом элемента НЕ, вход которого соединен с первым входом второго; элемента И, выход которого подключен к первому входу первого элемента ИЛИ, выход Kdторого вл етс вторым выходом блока управлени , второй и третий входы которого соединены с вторыми входами второго элемента И и первого элемента ИЛИ соответственно, выход первого элемента ИЛИ группы соединен с первым входом второго элемента И, а выходы остальных элементов ИЛИ группы соединены с входами второго элемента ИЛИ и группой выходов блока управлени , выход второго элемента ИЛИ соединен с первым выходом блока управлени , группа входов которого соединена слервыми входами элементов И первой группы выход каждого i-ro элемента которой (,... п,где п - разр дность входного кода) соединен с входом (i-l)-ro элемента этой же группы, первым входом (i-l)-ro элемента И второй гругшы и входом i-ro элемента НЕ группы, выход которого соединен с вторым входом i-ro элемента И второй группы, выход которого сое динен с первым входом элемента И третьей группы, вторые входы которого соединены с вторым входом блока управлени , выход i-ro элеме1тта И второй группы соединен с первым и входом (-у)-го элемента ИЛИ группы и (- -)-м входом третьего элемента ИЛИ, при i-четном, и с вторым входом (-)-го элемента ИЛИ -г-)-м ВХОДОМ четвертого элемента ИЛИ, при (-нечетном, второй и первый входы п-ых элементов И первой и второй групп соотBCTCTBeHiio соединены с входом логической единицы , выходы третьего и четвертого элементов ИЛИ соединены с четвертым и п тым выходами блока У11рав;(ени соответственно, а выходы 24 элементов И третьей группы вл ютс второй группой выходов блока управлени . На фиг. 1 приведена структурна схема предлагаемого устройства; на фиг. 2 и 3 схема блока управлени ; на фиг. 4 - график исходной и аппроксимирующей функции. Устройство содержит входной регистр 1 (Р1), генератор 2 импульсов (ГСИ), делитель 3 частоты (ДЧ), элемент И 4, вычитающий счетчик 5 (СИ), преобразователь 6 параллельного входного кода в двоичный код (ПК), блок 7 управлени (БУ), дешифратор 8 (ДШ), выходной регистр 9 (Р2), первую, вторую и третью группы элементов И 10, 11 и 12, группу элементов НЕ 13, группу элементов ИЛИ 14, первый, второй, третий и четвертый элементы ИЛИ 15, 16, 17 и 18, элемент НЕ 19, первый и второй элементы И 20 и 21 и триггер 22. Устройство работает следующим образом. Входна величина N в виде параллельного кода поступает на входной регистр I, который вл етс сдвигоВ| 1м регистром. С его выхода код NX поступав в блок 7 управлени , который анализирует, в какую пару попала старша значаща единица Ny, т.е. определ ет номер интервала, который затем в преобразователе .6 кодов преобразуетс в двоичный код. Двоичный код номера интервала аппроксимации заноситс в вычитающий счетчик 5 и поступает на дешифратор 8, на который также из блока 7 управлени поступает информа1щ о том, какому сегменту интервала аппроксимации (левому или правому) соответствует старша значаща единица кода Nf, В дешифраторе образуетс соответствующа установленному интервалу аппроксимации характеристика функции. Чтобы получить значение приращени аргумента на данном интервале, необходимо из кода N вычесть значение JНо так как любое значение х вл етс целой степенью числа 2, то операцию вычитани можно исключить. При этом в регистре 1 необходимо установить в ноль значение соответствующего X; двоичного разр да. Эту операцию осуществл ет блок 7 управлени , и в регистре 1 получаем приращение аргумента Дх. Если текущее значение входной величины N находитс с в нулевом интервале аппроксимации, где коэффициент наклона К - 1, значение ДХ j, равно мантиссе функции, и поэтому последующее масштабирование не требуетс . Код, соответствующий Zix , заноситс в регистр 9, куда также помещаетс характеристика. Занесение кода Лх в регистр 9 осуществл етс так, что каждый разр д- кода, содержащий нуль, не измен ет состо ни соответствующих разр дов регистра 9, а единичные разр ды кода осуществл ют установку разр дов регистра 9 в едини- нле состо ние. При такой операции, очевидно. значащие разр ды характеристики никогда не будут перекрыватьс со значащими разр дами мантиссы функвди, т. е. наибольшее значение последней на любом сегменте любого интервал аппроксимации не будет превышать соответствующего этому сегменту значени младшего разр да характеристики. Например, дл участка с номером -2 можно записать Хе Г2.8), лХдез(.,р 5Л), Д , 1Цл левого сегмента максимальна мантисса будет определ тьс неравенством .ев.(ч.)).( Код Млей.(-а)шсЛ1 QO OO-0 Дл левого сегмента характеристика будет Vnf Леб.(-аг °° -- 00 °Млев леас-а )тах. в регистре 9 получаем результат преобразовани Наибольшее врем преобразовани определ етс несколькими операци ми сдвигов и, в отличии от известного устройства, не включает врем выполнени операции сложени /вычитани , поэтому быстродействие предлагаемого устройства существенно повыииетс по сравнению с известным устройством. Формула изобретени 1. Устройство дл извлечени квадратного корн , содержащее входной регистр, выходной регистр, генератор импульсов, делитель частоты блок управлени , первый и второй выходы которого подключены к первым входам входного и выходного регистров соответственно, выход генератора импульсов соединен с входом делите л частоты, первый и второй выходы которого соединены с первым и вторым входами блока управлени соответственно, первый вход которо го соединен также со вторым входом входного регистра, отличающеес тем, что, с целью повышени быстродействи , в него введены вычитающий счетчик, дешифратор, преобразователь 11ара;и1ельного входного кода в двоичный код и элемент И, первый вход которого соединен с выходом генератора импульсов, второй вход соединен с третьим выходом блока управлени , а выход подключен к первому вхо ду вычитающего счетчика и третьему входу входного регистра, выходы которого ;оединены с первой группой входов выходного регистра и группой входов блока управлени , группа вы26 ходов которого соединена с группой входов Преобразовател параллельного входного кода в двоичный код, группа выходов которого соединена с группами входов вьиитающего счетчика и дешифратора, группа выходов которого соединена со второй группой входов выходного регистра , второй вход вычитающего счетчика соединен с первым выходом делител частоты, а выход подключен к третьему входу блока управлени , четвертый и п тый выходы которого соединены с первым и вторым входами дешифратора соответственно, четвертый вход входного регистра подключен ко второму выходу делител частоты. M is connected to the first group of inputs of the output register and the group of inputs of the control unit whose output group is connected to the input group of the converter of the parallel input code to binary code, the output group of which is connected to the input groups of the detracting counter and the decoder, the output group of which is connected to the second group of inputs output register, the second input of the counting counter is connected to the first output of the frequency splitter, and the output is connected to the third input of the control unit, the fourth and fifth outputs of which are connected enes with the first and second inputs deigafratora Accordingly, vhodaogo fourth input register connected to the second output of the frequency divider. The control unit contains three groups of elements AND, a group of elements NOT, a group of elements OR, four elements OR, element NOT, elements AND and a trigger, the first, second and third inputs of which are respectively the first, second and third inputs of the control unit, and the output connected to the first input of the first element AND, the output of which is connected to the third output of the control unit, and the second input is connected to the output of the NOT element, the input of which is connected to the first input of the second; AND element whose output is connected to the first input of the first OR element, the second output of Kd is the second output of the control unit, the second and third inputs of which are connected to the second inputs of the second AND element and the first OR element, respectively, the output of the first OR element of the group is connected to the first input of the second of the AND element, and the outputs of the remaining OR elements of the group are connected to the inputs of the second OR element and the group of outputs of the control unit, the output of the second element OR is connected to the first output of the control unit, the group of inputs of which Connected with the first inputs of elements AND of the first group, the output of each i-ro element of which (, ... n, where n is the width of the input code) is connected to the input (il) -ro of the element of the same group, the first input (il) -ro of the element And the second group and the input of the i-ro element of the NOT group, the output of which is connected to the second input of the i-ro element of the second group, the output of which is connected to the first input of the element AND of the third group, the second inputs of which are connected to the second input of the control unit, output i -ro element And the second group is connected to the first and the input (-th) -th element of the OR group and (- -) - the input of the third element OR, with i-even, and with the second input of (-) - th element OR -g -) - m INPUT of the fourth element OR, with (-odd, second and first inputs of the n-th elements of the first and second groups The BCTCTBeHiio's are connected to the input of the logical unit, the outputs of the third and fourth elements OR are connected to the fourth and fifth outputs of the block U11ra (respectively, and the outputs of 24 elements AND of the third group are the second group of outputs of the control unit. FIG. 1 shows a block diagram of the proposed device; in fig. 2 and 3 of the control unit circuit; in fig. 4 is a graph of the original and approximation functions. The device contains an input register 1 (P1), a generator of 2 pulses (GSI), a frequency divider 3 (DCH), an element 4, a subtractive counter 5 (SI), a converter 6 parallel input code into a binary code (PC), a control unit 7 ( BU), decoder 8 (LH), output register 9 (P2), first, second and third groups of elements AND 10, 11 and 12, a group of elements NOT 13, a group of elements OR 14, first, second, third, and fourth elements OR 15 , 16, 17 and 18, the element is NOT 19, the first and second elements are And 20 and 21 and the trigger 22. The device operates as follows. The input value N in the form of a parallel code is fed to the input register I, which is shifted | 1m register. From its output, the NX code is entered into control block 7, which analyzes which pair has the highest significant unit Ny, i.e. determines the slot number, which is then converted into a binary code in the .6 code converter. The binary code of the approximation interval number is entered into the subtractive counter 5 and fed to the decoder 8, which also receives information from the control unit 7 about which segment of the approximation interval (left or right) corresponds to the highest significant unit of the Nf code. approximation characteristic of the function. To get the increment value of the argument in a given interval, it is necessary to subtract from the N code the value of JBut, since any value of x is an integer power of 2, then the subtraction operation can be eliminated. In this case, in register 1 it is necessary to set to zero the value of the corresponding X; binary bit This operation is performed by control block 7, and in register 1 we obtain the increment of the argument Dx. If the current value of the input value N is in the zero approximation interval, where the slope coefficient is K - 1, the value of DH j is equal to the mantissa of the function, and therefore subsequent scaling is not required. The code corresponding to Zix is entered in register 9, where the characteristic is also placed. The introduction of the Lh code into the register 9 is carried out so that each bit of the code containing zero does not change the state of the corresponding bits of the register 9, and the unit bits of the code set the bits of the register 9 in the unit state. With such an operation, obviously. the significant bits of the characteristics will never overlap with the significant bits of the mantissa function, i.e. the highest value of the last on any segment of any interval of approximation will not exceed the value of the lower bit of the characteristic corresponding to this segment. For example, for the section with the number -2 you can write Xe G2.8), lHdez (., P 5L), D, 1Cl of the left segment, the maximum mantissa will be determined by the inequality .ev. (H)) (Code Mley. (- a) csl1 QO OO-0 For the left segment, the characteristic will be Vnf Loeb. (- ar ° ° - 00 ° Mlev leas) a. In register 9, we get the result of the conversion. The longest conversion time is determined by several shift operations and, unlike from the known device does not include the time of the operation of addition / subtraction, therefore, the speed of the proposed device is significantly higher c in comparison with a known device. Formula of the invention 1. A device for extracting a square root, containing an input register, an output register, a pulse generator, a frequency divider control unit, the first and second outputs of which are connected to the first inputs of the input and output registers, respectively, the output of the pulse generator connected to the input of a shared frequency, the first and second outputs of which are connected to the first and second inputs of the control unit, respectively, the first input of which is also connected to the second input A second register, characterized in that, in order to increase speed, a subtractive counter, a decoder, an 11ara converter were inserted into it; one input code into a binary code and an element, whose first input is connected to the output of the pulse generator, the second input is connected to the third output of the block control, and the output is connected to the first input of the detracting counter and the third input of the input register, the outputs of which are connected to the first group of inputs of the output register and the input group of the control unit whose output group of turns is connected With a group of inputs Converter parallel input code into a binary code, a group of outputs of which is connected to groups of inputs of a live counter and a decoder, a group of outputs of which is connected to the second group of inputs of the output register, the second input of the downloader counter is connected to the first output of the frequency divider, and the output is connected to the third the input of the control unit, the fourth and fifth outputs of which are connected to the first and second inputs of the decoder, respectively, the fourth input of the input register is connected to the second output g frequency solver.
2. Устройство по п. , о т л и ч а ю щ ее с тем, что блок управлени содержит три группы элементов И, группу элементов НЕ, группу элементов ИЛИ, четыре элемента ИЛИ, элемент НЕ, элементы И и триггер, первый, второй у. третий входы которого вл ютс соответственно первым, вторым и третьим входами блока управлени , а выход соединен с первым входом первого элемента И, выход которого подключен к третьему выходу блока управлени , а второй вход соединен с выходом элемента НЕ, вход которого соединен с первым входом второго элемента И, выход которого подключен к первому входу первого элемента ИЛИ, выход которого вл етс вторым выходом блока управлени , второй и третий входь которого соединены с вторыми входами второго элемента И и первого элемента ИЛИ соответствешсо , выход первого элемента ИЛИ группы соединен с первым входом второго элемента И, а выходы остальных элементов ИЛИ группы соединены с входами второго элемента ИЛИ и группой выходов блока управлени , выход второго элемента ИЛИ соединен с первым выходом блока управлени , группа входов которого соединена с первыми входами элементов И первой группы, Е.ЫХОД каждого i-ro элемента которой (,...,n, где п-разр дность входного кода) соединен с входом (i-l)-ro элемента этой же группы, первъ1м входом (i-l)-ro элемента И в-торой группы и входом i-ro элемента НЕ группы, выход которого соединен с вторым входом i-ro элемента И второй группы, выход которого соединен с первым входом элемента И третьей группы, вторые входы которого соединены с вторым входом блока управлени , выход i-ro элемента И второй группы соединен с первь1м входом (-5-)-го элемента ИЛИ группы и (-1-) - м входом третьего элемента ИЛИ, при -четном, и с вторым входом fi)-ro элемента ИЛИ группы и () -м входом четвертого элемента ИЛИ, при i-нечетном, второй и первый входы п-ых элементов И первой и второй групп соответственно соединены с входом логической единицы, выходы третьего и четвертого элементов ИЛИ соединены с четвертым и2. The device according to claim. 1, so that the control unit contains three groups of elements AND, a group of elements NOT, a group of elements OR, four elements OR, an element NOT, elements AND and a trigger, the first, second u. the third inputs of which are respectively the first, second and third inputs of the control unit, and the output is connected to the first input of the first element AND, the output of which is connected to the third output of the control unit, and the second input is connected to the output of the element NO, whose input is connected to the first input of the second element AND, the output of which is connected to the first input of the first element OR, the output of which is the second output of the control unit, the second and third input of which is connected to the second inputs of the second element AND and the first element OR respectively This is true, the output of the first OR element is connected to the first input of the second element AND, and the outputs of the remaining OR elements are connected to the inputs of the second OR element and the output group of the control unit, the output of the second OR element is connected to the first output of the control unit, the group of inputs of which is connected to the first the inputs of the elements of the first group, E.YOCH of each i-ro element of which (, ..., n, where the n-width of the input code) is connected to the input (il) -ro of the element of the same group, the first input (il) - ro element And in the second group and the input of the i-ro element NOT a group, the output of which is connected to the second input of the i-ro element AND the second group, the output of which is connected to the first input of the element AND of the third group, the second inputs of which are connected to the second input of the control unit, the output of the i-ro element And the second group is connected to the first 1 input (-5 -) - element of the OR group and (-1-) - input of the third element OR, added, and with the second input fi) -ro element OR of the group and () -th input of the fourth element OR, with i -Odd, the second and first inputs of the n-th elements And the first and second groups, respectively, are connected to the input logic units, the outputs of the third and fourth elements OR are connected to the fourth and
7857982878579828
п тым выходами блока управлени соответствен-1. Авторское свидетельство СССР № 546880the fifth outputs of the control unit, respectively-1. USSR Copyright Certificate № 546880
но, а выходы элементов И третьей группы вл - кл. G 06 F 7/38, 1977.but, and the outputs of the elements And the third group of owner - cl. G 06 F 7/38, 1977.
ютс второй группой выходов блока управлени . ..j С25087The second group of outputs of the control unit. ..j S25087
Источники информации,2. Авторское свидетельство СССР N 525087,Sources of information, 2. USSR author's certificate N 525087,
прин тые во внимание при экспертизеj кл. G 06 F 7/38, 1976 (прототип).taken into account in the examination of cl. G 06 F 7/38, 1976 (prototype).
5 I f5 I f
2Z2Z
&&
JJ
бми ynpatMMtfbmi ynpatMMtf