о: соabout: with
Оaf: Изобретение относитс к вычислительной технике и может быть использовано в ЦВМ и устройствах обработки цифровой информации повышен ной надежности. Известно арифметическое устройство с контролем по четности, содер жащее три регистра, комбинационный сумматор, коммутатор, две схемы . формировани четности и схему фикса ции сбо l . Недостатками данного устройства вл ютс сложностьи невысока достоверность контрол . Известно также арифметическое устройство, контролируемое с помощь остаточного кода и содержащее два регистра слагаемых и регистр суммы, сумматор, три схемы вычислени остатка по модулю, сумматор остатков и схему сравнени 2 , Недостатки указанного устройства также обусловлены сложностью и невысокой достоверностью контрол , так как, в частности, контроль по модулю принципиально не позвол ет обнаруживать ошибки при изменении результата суммировани на величину , краткую модулю контрол . Наиболее близкое к предлагаемому контролируемое арифметическое устройство содержит два регистра операндов , входы которых подключены к соответствующим информационным входам устройства, а выходы - к соответствующим входам сумматора, выход которого соединен с входом регистра результата и первым входом схемы сравнени кодов з . Недостатком известного устройства вл ютс большие аппаратурные, затраты. Цель изобретени - упрощение уст ройства. Поставленна цель достигаетс тем, что в контролируемое арифметическое устройство, содержащее регис рыпервого и второго операндов, сумматор, регистр результата и схему сравнени , причем перва и втора группы информационных входов устрой ства соединены с информационными входами регистров первого и второго операндов соответственно, выходы которых соединены с входами операндов сумматора, управл ющий вход уст ройства соединен с управл ющим входом сумматора, выход которого соеди нен с первым входом схемы сравнени и информационным входом регистра ре зультата, выходы регистра результата и схемы сравнени вл ютс соответственно информационным и контрол ным выходами устройства, выход реги ра результата соединен с вторым вхо дом схемы сравнени , управл ющий вход устройства соединен с управл ю щими входами регистров первого и вт рого операндов и входом блокировки записи регистра результата. На чертеже приведена структурна схема контролируемого арифметического устройства (двойными лини ми изображены информационные шины устройства ) . Устройство содержит регистры 1 и 2 операндов, сумматор 3, регистр 4 результата, схему 5 сравнени кодов.и управл ющий вход 6. Входы регистров 1 и 2 подключены к соответствующим информационным входам устройства. Выходы регистров 1 и 2 соединены с соответствующими входами сумматора 3, выход которого подключен к входу регистра 4 результата и первому входу схемы 5 сравнени кодов. Выход регистра 4 результата соединен- с вторым входом схемы 5 сравнени кодов. Управл ющий вход 6 подключен к управл ющим входам регистров 1 и 2, входу переноса сумматора 3 и входу блокировки записи регистра 4. Регистры 1 и 2 могут быть построены на триггерах со счетным входом, подключенным к управл ющему входу регистра. При контроле операции сложени используютс следующие соотношени между пр мыми и инверсными кодами операндов: , 8+ В Со, где А и 8 - пр мые п -разр дные двоич ные коды слагаемых. Аи 8 - инверсные п-разр дные двоичные коды слагаемых, С„ К,.. Сложим почленно первое и второе уравнени ( А1-В)ЦА1-В) 2С Так как 2 Сг) то, прибавив к левой и правой част м последнего равенства единицу, получим ( А.6()С,, ..И . п Отсюда следует, что Дч В « А+Э-И Таким образом, можно контролировать правильность выполнени сложени , сравнива поразр дно результаты суммировани пр мых и инверсных кодов слагаемых. Работа устройства состоит из двух тактов - рабочего и контрольного. На рабочем такте шина режима находитс в состо нии О. Операнды записываютс в регистры 1 и 2, после чего поступают на соответствующие входы сумматора 3. С выхода сумматора 3 сумма пр мых кодов операнда записываетс в регистр 4 результата. После этого осуществл етс контрольныйОaf: The invention relates to computing and can be used in digital computers and digital information processing devices with increased reliability. A parity-control arithmetic unit containing three registers, a combination adder, a switch, and two circuits are known. parity shaping and a fixation scheme l. The disadvantages of this device are the complexity and low reliability of the control. It is also known an arithmetic unit controlled by a residual code containing two registers of summands and a sum register, an adder, three modules for calculating a modulo residue, a residual adder and a comparison circuit 2, The disadvantages of this device are also due to the complexity and low reliability of the control, since In particular, modulo control does not fundamentally allow detecting errors when the sum result changes by an amount short to the control module. Closest to the proposed, the controlled arithmetic unit contains two registers of operands, the inputs of which are connected to the corresponding information inputs of the device, and the outputs to the corresponding inputs of the adder, the output of which is connected to the input of the result register and the first input of the code comparison circuit C. A disadvantage of the known device is a large hardware cost. The purpose of the invention is to simplify the device. The goal is achieved by the fact that a controlled arithmetic unit containing registers of the first and second operands, an adder, a result register and a comparison circuit, the first and second groups of information inputs of the device are connected to information inputs of the registers of the first and second operands, respectively, whose outputs are connected to the inputs of the adders of the adder, the control input of the device is connected to the control input of the adder, the output of which is connected to the first input of the comparison circuit and information input The output of the result register, the outputs of the result register and the comparison circuit are, respectively, the information and control outputs of the device, the output of the result register is connected to the second input of the comparison circuit, the control input of the device is connected to the control inputs of the registers of the first and second operands and input lock record of the register of the result. The drawing shows a block diagram of a controlled arithmetic unit (the device information buses are shown in double lines). The device contains registers 1 and 2 operands, adder 3, result register 4, circuit 5 comparison circuit and control input 6. The inputs of registers 1 and 2 are connected to the corresponding information inputs of the device. The outputs of registers 1 and 2 are connected to the corresponding inputs of the adder 3, the output of which is connected to the input of the result register 4 and the first input of the code comparison circuit 5. The output of the result register 4 is connected to the second input of the code comparison circuit 5. The control input 6 is connected to the control inputs of registers 1 and 2, the transfer input of the adder 3 and the write lock input register 4. Registers 1 and 2 can be built on triggers with a counting input connected to the control input of the register. In controlling the addition operation, the following ratios between the direct and inverse operand codes are used:, 8+ B Co, where A and 8 are the direct n-discharge binary codes of the terms. Au 8 - inverse n-bit binary codes of the terms, C "K, .. We add up the first and second equations (A1-B) TSA1-B) 2C, since 2 Cr is added to the left and right sides of the last equality unit, we get (А.6 () С ,, ..И. п. From this it follows that ДЧ В «А + ЭИ And» Thus, it is possible to control the correctness of the execution of the addition, comparing by bit the results of the summation of the direct and inverse codes of the terms. The operation of the device consists of two cycles — working and monitoring. On the working cycle, the mode bus is in the state O. The operands are written registers 1 and 2, and then provided to respective inputs of an adder 3. The output of the adder 3, the sum of the straight operand codes recorded in the register 4 results. Thereafter, a control is carried out
такт работы устройства. Дл этого шина 6 режима переводитс в состо ние 1. По этому сигналу в регистрах 1 и 2 производитс поразр дное инвертирование записанных входных операндов, в сумматоре 3 инверсные кода операндов су(,1мируютс с единицейв младшем разр де, котора поступает по шине 6.tact of the device. For this, the mode bus 6 is transferred to state 1. This signal in registers 1 and 2 performs a bitwise inversion of the recorded input operands, in the adder 3, the inverse codes of the operands c (, 1mutated with the unit of the least significant bit that goes through bus 6.
После установлени нового значени на выходе сумматора 3 схемой 5 сравнени кодов осуществл етс поразр дное сравнение содержимого регистра 4 результата со значением контрольной суммы, вычисленной на контрольном такте, В том случае, когда значени п-х разр дов суммы операндов и контрольной..суммы совпадают , схемой 5 сравнени кодов вырабатываетс , сигнал ошибки.After establishing a new value at the output of the adder 3 by the code comparison circuit 5, a bitwise comparison of the contents of the register 4 of the result with the checksum value calculated at the control cycle is performed. In the case when the values of the nth bits of the sum of the operands and the control .. sum , by code comparison circuit 5, an error signal is generated.
Предлагаемое устройство по сравнению с прототипом более просто и надежно, так как из-за меньших аппаратурных затрат в нем снижена веро тность возникновени сбоев. Кроме того, предлагаемое устройство предпочтительнее и по своим диагностическим возможност м, так как использование инверсных кодов позвол ет обнаруживать все константные отказы как на входах, так и на выходах сумматора, а также осуществл ть локализацию места возникновени с иибки благодар тому, что на контрольном такте точно вы вл етс разр д сумматора, в котором произошла ошибка.The proposed device as compared with the prototype is simpler and more reliable because, due to the lower hardware costs, the probability of occurrence of failures is reduced. In addition, the proposed device is preferable in its diagnostic capabilities, since the use of inverse codes allows detecting all constant failures both at the inputs and at the outputs of the adder, as well as localizing the location of the occurrence from the signal due to the fact that the accumulator in which the error occurred is accurately detected.