SU1325488A2 - Device for monitoring program run - Google Patents
Device for monitoring program run Download PDFInfo
- Publication number
- SU1325488A2 SU1325488A2 SU853975644A SU3975644A SU1325488A2 SU 1325488 A2 SU1325488 A2 SU 1325488A2 SU 853975644 A SU853975644 A SU 853975644A SU 3975644 A SU3975644 A SU 3975644A SU 1325488 A2 SU1325488 A2 SU 1325488A2
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- output
- signal
- cycle
- inputs
- Prior art date
Links
Landscapes
- Programmable Controllers (AREA)
Abstract
Изобретение относитс к автоматике и вычислительной технике и может быть использовано дл контрол кода программы ЭВМ, работающих в реальном масштабе времени. Целью изоб ретени вл етс расширение функцио4 сх 00 гоThe invention relates to automation and computing and can be used to monitor the code of a computer program operating in real time. The purpose of the invention is to expand the func
Description
нальных возможностей устройства за счет обеспечени возможности проверки выполнени циклических участков программы с не вно заданным числом повторений цикла. Устройство состоит из счетчиков 1,7,13 и 14 элементов И-НЕ 2 и 8, элементов И 3,4,9,10,12,17,18, 20 и 21, элементов ИЛИ 5 и 22, схемы 6 сравнени , триггеров 11,15 и 16 и генератора 19 одиночных сигналов. Устройство позвол ет обнаруживать ошибки следующих типов; несоответствие количества вьшолненных команд линейного участка программы количеству команд линейного участка; выполнениеof the device’s capabilities due to the possibility of checking the execution of cyclic program sections with an implicit number of loop repetitions. The device consists of counters 1,7,13 and 14 elements AND-HE 2 and 8, elements AND 3,4,9,10,12,17,18, 20 and 21, elements OR 5 and 22, comparison circuit 6, triggers 11.15 and 16 and the generator 19 single signals. The device allows to detect the following types of errors; discrepancy between the number of executed commands of the linear section of the program and the number of commands of the linear section; performance
1one
Изобретение относитс к области вычислительной техники, может быть использовано дл контрол хода программы специализированной ЭВМ в АСУ, работающих в ре,альном масштабе времени , и вл етс усовершенствованием устройства по авт.св. № 1242967.The invention relates to the field of computer technology, can be used to control the course of a specialized computer program in automated control systems operating in real time, and is an improvement to the device by author. No. 1242967.
Целью изобретени вл етс расширение функциональных возможностей устройства за счет возможности проверки циклических участков программ с не вно заданным числом повторений цикла.The aim of the invention is to expand the functionality of the device due to the possibility of checking the cyclic sections of programs with an implicit number of repetitions of the cycle.
На фиг. 1 приведена структурна схема устройства дл контрол хода программы; на фиг. 2 - структура.специальной команды.FIG. 1 shows a block diagram of a device for monitoring program progress; in fig. 2 - structure of a special team.
Устройство (фиг. 1) содержит первый счетчик 1, первый элемент И-НЕ 2, первый 3 и второй 4 элементы И, пер- вьй элемент ИЛИ 5, схему 6 сравнени , второй счетчик 7, второй элемент (И-НЕ 8, третий 9 и четвертьй 10 элементы И, первый триггер 11, п тый эле- мент И 12, третий 13 и четвертый 14 счетчики, второй 15 и третий 16 триггеры , первый 17 И второй 18 многовхо- довые элементы И, генератор 19 одиночных импульсов, седьмой 20 и шестой 21 элементы И, второй элемент ИЛИ 22. Управл клций вход записи кода на счетчик 1 вл етс входом 23 устройства, счетный вход счетчика 1 вл етс входом 24 устройства, установочньй вход счетчика 1 вл етс входом 25 устройства , единичные выходы счетчика 1 вкоманды условного перехода при отсутствии условий дл ее вьтолнени ; неправильна передача управлени при выполнении команды перехода; на одну ветвь программы осуществл етс переход из двух ветвей программы по разным значени м признака перехода; количество повторений цикла меньше вно заданного; зацикливание программы; несоответствие числа выполненных повторений цикла дл циклов с не вным заданием числа повторений цикла их не вно заданному числу; зациклинива- ние программы с не вно заданным числом повторений цикла, 2 ил.The device (Fig. 1) contains the first counter 1, the first element AND-NOT 2, the first 3 and the second 4 elements AND, the first element OR 5, the comparison circuit 6, the second counter 7, the second element (AND-HE 8, the third 9 and a quarter 10 elements And, the first trigger 11, the fifth element And 12, the third 13 and fourth 14 counters, the second 15 and third 16 triggers, the first 17 And the second 18 multi-input elements And, the generator 19 single pulses, the seventh 20 and the sixth 21 elements And, the second element OR 22. The control of the input code entry on counter 1 is the input 23 of the device, the count input of the counter 1 is device 24 stroke, the installation input of counter 1 is the device input 25, the single outputs of counter 1 in the conditional jump command in the absence of conditions for its fulfillment; incorrect control transfer when executing the jump command; one branch of the program jumps from two program branches at different values m sign of the transition; the number of repetitions of the cycle is less than the explicitly specified; program looping; inconsistency in the number of cycle repetitions performed for cycles with implicit assignment of the number of cycle repetitions to an implicit number; Looping the program with an implicit number of repetitions of the cycle, 2 Il.
л ютс выходом 26 устройства, второй вход 27 первого элемента И 3 вл етс входом признака конца контрол устройства, второй вход 28 второго элемента И 4 вл етс входом признака контрол перехода, первый 29 и второй 30 входы схемы 6 сравнени вл ютс входами признака перехода и одноразр дного признака услови , выход 31 вл етс выходом неисправности устройства , единичный вход 32 первого триггера 11 вл етс входом признака контрол цикла, вход 3,3 признака повторений гщкла и информационные выходы счетчика 7 вл ютс выходом 34 устройства , информационные входы 35 устройства , вход 36 устройства признака услови перехода, вход 37 устройства признака контрол цикла с не вно заданным числом повторений, информационные выходы 38 и 39 счетчиков 13 и 14 вход т в группу информационных выходов устройства.The device output 26, the second input 27 of the first element AND 3 is the input of the control end of the device, the second input 28 of the second element 4 is the input of the transition control sign, the first 29 and second 30 inputs of the comparison circuit 6 are the entrance signs of the transition and a one-bit sign of the condition, the output 31 is the output of the device malfunction, the single input 32 of the first trigger 11 is the input of the control of the cycle, the input 3.3 of the sign of repetition of the general and the information outputs of the counter 7 is the output 34 of the device, infor Device inputs 35 of the device, input 36 of the device of the sign of the transition condition, input 37 of the device of the control loop characteristic with an implicit number of repetitions, information outputs 38 and 39 of the counters 13 and 14 are included in the group of information outputs of the device.
Специальна команда (фиг. 2) включает поле 40, в котором записьтаетс код команды, одноразр дное поле 41, в которое записываетс 1, если необходимо контролировать правильность условного перехода на участок программы , которьй начинаетс этой специальной командой, и О, если правильность условного перехода не контролируетс , одноразр дное поле 42, в котором записываетс значение признака условного перехода, по которому на участок программы должен осуществить31325488The special command (Fig. 2) includes a field 40 in which the command code is written, a one-bit field 41 in which 1 is written if it is necessary to control the correctness of the conditional transition to the program section started by this special command, and O if the conditional correctness not monitored, a one-bit field 42 in which the value of the conditional transition flag is written, along which the program section must perform 31325488
с переход, одноразр дное поле 43 манды, преобразовываетс , в дополии- признака контрол цикла, в которое за- письшаетс 1, если необходимо контролировать правильность вьшолнени циклического участка программы, кото- рьй начинаетс специальной командой, и О, если правильность выполнени цикла не контролируетс , поле 44, в которое записьгоаетс число команд, Q подлежащих выполнению на участке программы , ограниченном специальной командой и первой, встретившейс после нее командой условного перехода или командой останова, поле 45, в кото- |5 то все разр ды счетчика 1 должны нахо- рое записываетс число повторений цик- дитьс в единичном состо нии. С вы- лического участка программы, одноразр дное поле 46 признака контрол с не вно заданным числом повторений, вA transition, a one-bit field 43 of the manda, is converted into an additional sign of controlling the cycle, in which 1 is written, if it is necessary to control the correctness of the cyclic program section that is started by a special command, and O, if the correctness of the execution of the cycle is not monitored , field 44, which records the number of commands Q to be executed on the program section, limited by a special command and the first one, met after it by a conditional branch command or a stop command, field 45, in which all bits of counter 1 must be recorded; the number of repetitions is cycled in one state. From the individual program area, a one-bit field 46 of the control sign with an implicit number of repetitions, in
тельный и поступает на счетчик 1. В конце выполнени каждой команды, кроме команды условного перехода и останова , на вход 24 устройства поступает сигнал, по которому содержимое счетчика 1 увеличиваетс на единицу.It is sent to counter 1. At the end of each command, except for the conditional jump and stop command, a signal is received at input 24 of the device that causes the contents of counter 1 to increase by one.
При вьшолнении команды останова на входе 27 устройства формируетс единичный сигнал признака конца контрол . Если ход программы не нарушен, т.е. не пропущена ни одна команда и не выполнено ни одной лишней команды.When executing the stop command at the device input 27, a single signal of the end of control sign is generated. If the course of the program is not disturbed, i.e. not a single command was missed and not a single extra command was executed.
хода элемента И-НЕ 2 на вход элемента И 3 поступает нулевой сигнал и на его выходе не формируетс единичныйthe course of the element AND-NOT 2 at the input of the element And 3 receives a zero signal and at its output does not form a single
которое записьгоаетс 1, если необ- 20 сигнал. Если при выполнении программы была пропущена хот бы одна команда , то к моменту выполнени команды останова не все разр ды счетчика 1 наход тс в, единичном состо нии, наwhich is recorded 1 if necessary 20 signal. If at least one command was missed during program execution, by the time the stop command is executed, not all bits of counter 1 are in the, single state, on
ходимо контролировать правильность вьшолнени циклического участка npoi- раммы с не вно заданным числом повторений , который начинаетс этой командой , и О, если правильность вьтол- 25 выходе элемента И-НЕ 2 присутствует нени цикла не контролируетс , поле единичный сигнал. При выполнении ко- 47, в которое заноситс минимальное манды останова единичный сигнал, пос- число не вно заданных повторений цик- тупающий на вход 27 устройства, сфор да, и поле 48, в которое заноситс мирует на выходе элемента И 3 также максимальное число повторений цикли- ЗО единичный сигнал, который поступаетIt is necessary to control the correctness of the execution of the cyclic section of the npoi- frame with an implicit number of repetitions, which is started by this command, and O, if the correctness of the 25 output element of the AND-NOT 2 is present during a cycle is not controlled, the single signal field. When a 47 is executed, in which the minimum stop command is entered, a single signal, a cycle of unspecified repetitions cycling to the device input 27, appears, and a field 48 in which the maximum number of repetitions is entered at the output of the And 3 element cycl-ao a single signal that arrives
на вход элемента ИЛИ 5. На входе элеческого участка программы.at the input of the element OR 5. At the entrance of the elementary section of the program.
Устройство работает следующим образом .The device works as follows.
Если в программе нет команд условмента ИЛИ 5 формируетс единичный сигнал, который поступает на выход 31 устройства и свидетельствует обIf there are no conditional commands in the program OR 5, a single signal is generated, which arrives at the device output 31 and indicates
ных переходов, то заранее можно ука- к ошибке в ходе программы. Если при выполнении программы выполнена лишн команда, то еще до вьшолнени команды останова на второй вход элемента ИЛИ 5 с выхода переноса из старшего р.аз40 р д;а счетчика 1 поступает единичньй сигнал и на выходе 31 устройства формируетс единичньй сигнал.transitions, the error can be indicated in advance during the program. If an extra command is executed when the program is executed, then even before the stop command is executed, the second input of the element OR 5 comes from the transfer output from the older section 40, and the counter 1 receives a single signal and a single signal is generated at the output 31 of the device.
Если в программе имеютс команды условного перехода, то заранее можноIf the program has conditional jump instructions, you can
45 указать число команд, выполн емых на участках программы от начала программы до первой команды условного перехода , между командами условного перехода и от последней ветви программы козать число команд, подлежащих выполнению . В этом случае в начале программы ставитс специальна команда, в поле 41 которой записан О, в поле 44 - число команд, подлежащих выполнению в программе без учета команды останова, в пол х 42, 43 и 45 записаны О. В этом случае устройство контрол хода программы работает следующим образом.45 indicate the number of commands executed in the program sections from the beginning of the program to the first conditional jump command, between the conditional jump commands and from the last program branch goat the number of commands to be executed. In this case, at the beginning of the program, a special command is put, in field 41 of which O is written, in field 44 - the number of commands to be executed in the program without considering the stop command, the fields 42, 43 and 45 are recorded in O. In this case, the progress control device The program works as follows.
При выполнении специальной команды в устройстве управлени ЦВМ производитс анализ кода специальной команды . Если в поле 41 специальной КОМАWhen a special command is executed in the control unit of the digital computer, the code of the special command is analyzed. If in the field 41 special KOMA
манды записан , на вход 28 устрой- QQ манды условного перехода до командыMandas is recorded, at input 28, QQ conditional jump commands up to the command
ства не поступает единичный сигнал признака контрол перехода, элемент И 4 закрыт и анализ правильности выполнени условного перехода не произостанова . Дл организации контрол хода программы, первой после каждого разветвлени программы, должна выполн тьс специальна команда. В этомThere is no single signal of the control of the transition, the element 4 is closed and the analysis of the correctness of the conditional transition is not stopped. In order to control the progress of the program, the first after each branch of the program, a special command must be executed. In that
водитс . На вход 25 устройства посту- gg случае при выполнении специальной копает управл гаций сигнал занесени ко- манды как провер етс правильность да на счетчик, по которому пр мой код выполнени условного перехода, так и числа команд, подлежащих выполнению, задаетс число команд, подлежащих вы- записанный в поле 44 специальной ко- полнению на участке программы, до посманды , преобразовываетс , в дополии- то все разр ды счетчика 1 должны нахо- дитьс в единичном состо нии. С вы- leads At the inlet 25 of the postgg device, when executing a special control copying, the command entry signal is checked both for the correctness of the counter and the number of commands to be executed, the number of commands to be performed. - recorded in the field 44 of the special replenishment at the program section, before the command is converted, in addition, all bits of the counter 1 must be in a single state. With you-
тельный и поступает на счетчик 1. В конце выполнени каждой команды, кроме команды условного перехода и останова , на вход 24 устройства поступает сигнал, по которому содержимое счетчика 1 увеличиваетс на единицу.It is sent to counter 1. At the end of each command, except for the conditional jump and stop command, a signal is received at input 24 of the device that causes the contents of counter 1 to increase by one.
При вьшолнении команды останова на входе 27 устройства формируетс единичный сигнал признака конца контрол . Если ход программы не нарушен, т.е. не пропущена ни одна команда и не выполнено ни одной лишней команды.When executing the stop command at the device input 27, a single signal of the end of control sign is generated. If the course of the program is not disturbed, i.e. not a single command was missed and not a single extra command was executed.
манды, преобразовываетс , в дополии- то все разр ды счетчика 1 должны нахо дитьс в единичном состо нии. С вы- The mandas are converted; additionally, all bits of counter 1 must be in a single state. With you-
хода элемента И-НЕ 2 на вход элемента И 3 поступает нулевой сигнал и на его выходе не формируетс единичныйthe course of the element AND-NOT 2 at the input of the element And 3 receives a zero signal and at its output does not form a single
мы была пропущена хот бы одна команда , то к моменту выполнени команды останова не все разр ды счетчика 1 наход тс в, единичном состо нии, наSince at least one command has been missed, by the time the stop command is executed, not all of the bits in counter 1 are in a single state, on
выходе элемента И-НЕ 2 присутствует единичный сигнал. При выполнении ко- манды останова единичный сигнал, пос- тупающий на вход 27 устройства, сформирует на выходе элемента И 3 также единичный сигнал, который поступаетoutput element AND NOT 2 there is a single signal. When executing the stop command, a single signal arriving at the device input 27 will form at the output of the element I 3 also a single signal that arrives
мента ИЛИ 5 формируетс единичный сигнал, который поступает на выход 31 устройства и свидетельствует обOR 5, a single signal is generated, which is fed to the output 31 of the device and indicates
останова. Дл организации контрол хода программы, первой после каждого разветвлени программы, должна выполн тьс специальна команда. В этомstop. In order to control the progress of the program, the first after each branch of the program, a special command must be executed. In that
5132548851325488
ледующей команды условного перехода или останова. При выполнении команды условного перехода на вход 27 признака конца контрол поступает единичный .сигнал как и при выполнении команды останова.conditional jump or stop command When the conditional jump instruction is executed, a single signal arrives at input 27 of the end of control sign as in the execution of the stop command.
При выполнении специальной команды участка программы, куда происходит пе-ра команд машины, в котором при выполнении спе1.;иальной команды находитс поле 42, где записано эталонное значение сигнала условного перехода. На выходе схемы 6 сравнени формируетс единичный сигнал, если значени сигналов условного перехода не совпадают с эталонным а): т иЗ и нулевой редача управлени по команде условно- ig сигнал, если совпадает, т.е.,если ус- го перехода, при вьшолнении которой осуществл етс контроль правильности перехода, устройство контрол хода программы работает следующим образом. I На вход 28 устройства поступает 15 единичньш сигнал, лсоторьш открьшает элемент И 4. На второй вход элемента И 4 поступает сигнал с выхода схемы 6 сравнени , на вход 29 которой поступает сигнал признака условного пере-2о хода, сформированный в машине, а на вход 30 поступает сигнал одноразр дг ного признака с того разр да регистра команд машины, в котором при выловный переход осуществл етс правильно , то на входы 29 и 30 устройства поступают одинаковые сигналы, с выхода схемы 6 на второй вход элемента И 4 поступает нулевой сигнал. Если ус- лозный переход осуществлен неправильно , то на входы 29 и 30 устройства поступают разные сигналы и с выхода схемы 6 на второй вход элемента И 4 поступает единичньй сигнал. С выхода элемента И 4 единичный сигнал поступает на третий вход элемента ИЛИ 5 и формирует на выходе 31 устройства единичный сигнал, свидетельствующийWhen executing a special command of the program section, where the machine commands are sent, in which when executing the special command; there is a field 42, where the reference value of the conditional transition signal is written. At the output of the comparison circuit 6, a single signal is formed if the values of the conditional transition signals do not coincide with the reference a): m T3 and zero control reduction by the command conditionally ig signal, if it is the same, i.e. which controls the correctness of the transition, the device controlling the progress of the program works as follows. I At the device input 28, a 15 unit signal is received, which removes the element AND 4. The signal from the output of the comparison circuit 6 arrives at the second input of the AND element 4, and the input signal 29 of which receives the conditional re-2o sign signal generated in the machine and the input 30 a single bit signal is received from the bit of the machine command register in which the catch transition is carried out correctly, the same signals arrive at the device inputs 29 and 30, and the output of circuit 6 is sent to the second input of the And 4 element a zero signal. If the subdirecting is performed incorrectly, then different signals are sent to the inputs 29 and 30 of the device and from the output of circuit 6 to the second input of the And 4 element a single signal arrives. From the output of the element And 4 a single signal is fed to the third input of the element OR 5 and generates at the output 31 of the device a single signal indicating
полнении специальной команды хранит- 25 (об ошибке в ходе программы.The filling of a special command stores 25 (an error during the program.
с значение одноразр дного кода, записанного в поле 42. Если условный переход осуществлен правильно, то на входы 29 и 30 устройства поступают одинаковые сигналы, с выхода схемы 6 на второй вход элемента И 4 поступает нулевой сигнал. Если условньй переход осуществлен неправильно, то на входы 29 и 30 устройства поступают разные сигналы, с выхода 6 на второй вход элемента И 4 поступает единичньй сигнал и с выхода элемента И 4 единичньй сигнал поступает на третий вход элемента ИЛИ 5. На выходе 31 устройства сформируетс единичный сигнал.with the value of a one-bit code recorded in field 42. If the conditional transition is carried out correctly, the same signals come to the inputs 29 and 30 of the device; from the output of circuit 6, the second input of the And 4 element receives a zero signal. If the conditional transition is incorrect, then different signals come to the inputs 29 and 30 of the device, from output 6 to the second input of element AND 4 a single signal comes in and from the output of element AND 4 a single signal goes to the third input of element OR 5. At output 31 of the device single signal.
При выполнении специальной команды участка программы, на который происходит передача управлени по команде условного перехода, устройство ра- ботает следующим образом. После дешифрации в устройстве управлени ЦВМ кода специальной команды, в поле 41 которой записана 1, на вход 28 устройства контрол хода программы поступает единичный сигнал, который открьшает по первому входу элемент И 4. На второй вход элемента И 4 поступает сигнал с выхода схемы 6 сравнени , на вход 29 которой поступает сигнал условного перехода, сформ1{рованный в машине.When executing a special command of a program section to which control is transferred upon a conditional branch command, the device operates as follows. After decoding the special command code in the control unit's digital computer, in field 41 of which 1 is written, a single signal arrives at the input 28 of the program progress control device, which opens element 4 at the first input. At the second input of element 4, a signal comes from the output of the comparison circuit 6 , to the input 29 of which receives a conditional transition signal, formed1 {ёny in the car.
На вход 30 схемы 6 сравнени поступает сигнал с того разр да регистThe input 30 of the comparison circuit 6 receives a signal from that bit of register
ра команд машины, в котором при выполнении спе1.;иальной команды находитс поле 42, где записано эталонное значение сигнала условного перехода. На выходе схемы 6 сравнени формируетс единичный сигнал, если значени сигналов условного перехода не совпадают с эталонным а): т иЗ и нулевой сигнал, если совпадает, т.е.,если ус- The command of the machine in which, when performing a special command; there is a field command, is field 42, where the reference value of the conditional jump signal is recorded. At the output of the comparison circuit 6, a single signal is formed if the values of the conditional transition signals do not coincide with the reference a): m C h and the zero signal if it matches, i.e.
ловный переход осуществл етс правильно , то на входы 29 и 30 устройства поступают одинаковые сигналы, с выхода схемы 6 на второй вход элемента И 4 поступает нулевой сигнал. Если ус- лозный переход осуществлен неправильно , то на входы 29 и 30 устройства поступают разные сигналы и с выхода схемы 6 на второй вход элемента И 4 поступает единичньй сигнал. С выхода элемента И 4 единичный сигнал поступает на третий вход элемента ИЛИ 5 и формирует на выходе 31 устройства единичный сигнал, свидетельствующийIf the transition is carried out correctly, then the same signals come to the inputs 29 and 30 of the device; from the output of the circuit 6 to the second input of the And 4 element, a zero signal arrives. If the subdirect transition is performed incorrectly, then different signals are sent to the inputs 29 and 30 of the device and from the output of circuit 6 to the second input of the And 4 element a single signal arrives. From the output of the element And 4 a single signal is fed to the third input of the element OR 5 and generates at the output 31 of the device a single signal indicating
(об ошибке в ходе программы.(an error during the program.
00
5five
00
00
5five
Если в программе имеютс циклические участки и заранее можно указать число повторений цикла, то в этом случае перед циклическим участком ставитс специальна команда, в поле 43 которой записана 1, в поле 45 - число повторений цикла в дополнительном коде. Первой командой циклического участка ставитс специальна команда , в поле 41 которой записана О, а в поле 44 - число команд, подлежащих выполнению в циклическом участке без учета команды условного перехода , в пол х 42, 43 и 45 записаны О. Первой командой участка программы , на который происходит передача управлени после выхода из цикла, ставитс специальна команда, в поле 41 которой записана 1, в поле 42 записано эталонное значение сигнала условного перехода, а в остальных пол х (43, 44 и 45) записаны О.If there are cyclic sections in the program and you can specify the number of repetitions of the cycle in advance, then a special command is placed in front of the cyclic section, in the field 43 which is written 1, in the field 45 - the number of repetitions of the cycle in the additional code. The first command of the cyclic section is a special command, in field 41 of which O is recorded, and in field 44, the number of commands to be executed in the cyclic section without taking into account the conditional branch command, in fields 42, 43 and 45 are written O. The first command of the program section, on which control is transferred after exiting the cycle, a special command is put, in field 41 of which 1 is written, in field 42 a reference value of the conditional transition signal is written, and in the remaining fields x (43, 44 and 45) O.
В этом случае устройство контрол хода программы работает следукхцим образом .In this case, the program control unit operates in the following way.
При начальных установках цикла в устройстве управлени ЦВМ производитс анализ кода специальной команды. Если в поле 43 специальной команды записана 1, на вход 32 ус гройства поступает единичный сигнал признака контрол цикла, которьй устанавливает в единичное состо ние триггер 11 и обнул ет все разр ды счетчика 7, наWith the initial cycle settings in the control unit of the digital computer, the code analysis of the special command is performed. If the special command field 43 is written 1, a single signal of the control character of the loop is sent to the input 32 of the device, which sets the trigger 11 to the single state and zeroes all bits of the counter 7 on
которьй после этого заноситс код из пол 45 специальной команды. При очередном выполнении циклического участка (тела цикла) в устройстве управлени ЦВМ производитс анализ кода специальной команды. Так как в поле 41 записан О, на вход 28 устройстAfter this, a code from the floor of the 45th special command is entered. During the next execution of the cyclic section (cycle body), the special command code is analyzed in the control unit of the digital computer. Since O is written in field 41, the device
ва не поступает единичный сигнал признака контрол перехода, элемент И 4 закрыт и анализ правильности условного перехода не производитс . На вход 25 устройства поступает сигнал, сбрасывающий счетчик 1 в нулевое состо ние . На вход 23 устройства поступает управл ющий сигнал занесени кода на счетчик, по которому пр мой код числа команд, подлежащих выполнению в циклическом участке, записанный в поле 44 специальной команды, преобразуетс в дополнительный и поступает на счетчик 1. В конце выполнени каждой команды, кроме команды условного пе- .рехода, на вход 24 устройства поступает сигнал,.по которому содержимое счетчика 1 увеличиваетс на единицу.You do not receive a single signal from the transition control feature, element 4 is closed, and the analysis of the correctness of the conditional transition is not performed. The input 25 of the device receives a signal resetting the counter 1 to the zero state. At the device input 23, a control signal is received to enter a code to a counter, according to which the direct code of the number of commands to be executed in the cyclic section recorded in the special command field 44 is converted to an additional one and goes to counter 1. At the end of each command, except commands of the conditional transition, to the input 24 of the device receives a signal, by which the contents of counter 1 is increased by one.
При выполнении команды условного перехода в начало цикла на входе 33 устройства формируетс единичный сигнал условного перехода, который поступает на входы первого 3 и третьего 9 элементов И. Если ход выполнени циклического участка не нарушен, т.е не пропущена ни одна команда и не выполнено ни одной лишней команды, то все разр ды счетчика 1 должны нахо- . дитьс в единичном состо нии. С выхода элемента И-НЕ 2 на вход элемента И 3 поступает нулевой сигнал и на его выходе не формируетс единичный сигнал.When executing a conditional jump command, a single conditional jump signal is generated at the input 33 of the device, which is fed to the inputs of the first 3 and third 9 I elements. If the progress of the cyclic section is not violated, i.e no command is missed and none one extra command, then all the bits of counter 1 should be. be in one state. From the output of the element AND-NOT 2 to the input of the element 3, the zero signal arrives and no single signal is generated at its output.
Если при вьшолнении циклического участка программы была пропущена хот бы одна команда, то на выходе элеменIf at executing the cyclic part of the program at least one command was missed, then at the output of the element
та И-НЕ 2 сформируетс единичный сиг- с рамма зациклилась, то на второй входthat AND-NO 2 a single signal is formed, the frame is looped, then to the second input
нал, который сформирует на выходе элемента И 3 также единичньй сигнал, которьй поступает на вход элемента ИЛИ 5. На выходе элемента ИЛИ 5 формируетс единичный сигнал, который поступает на выход 31 устройства и свидетельствует об ошибке в ходе программы . Если при выполнении программы выполнена лишн команда, то еще до выполнени команды перехода в начало цикла на второй вход элемента ШШ 5 с выхода переноса из старшего разр да счетчика 1 поступает единичный сигнал и на выходе 31 устройства формирует50The signal that forms at the output of the AND 3 element is also a single signal, which enters the input of the element OR 5. At the output of the element OR 5, a single signal is generated, which arrives at the output 31 of the device and indicates an error during the program. If an extra command is executed when executing the program, then even before executing the transition command to the beginning of the cycle, a single signal arrives from the high bit of counter 1 to the second input of the SH-5 element, and at the output 31 of the device it forms 50
5555
элемента ИЛИ 6 с выхода переноса из старшего разр да счетчика 7 поступает единичньй сигнал и на выходе 31 устройства формируетс единичный сигнал .the element OR 6 from the transfer output from the high bit of the counter 7 receives a single signal and a single signal is generated at the output 31 of the device.
Предлагаемое устройство способно контролировать ход программы и при наличии прерьшаний. При отработке пре рьшаний содержимое основных регистров машины запоминаетс в пам ти. С выходов 26 и 34 устройства контрол хода программы, соединенных с выходами единичных разр дов соответственно счетчиков 1 и 7, коды, наход щиес наThe proposed device is able to control the course of the program and if there are any alarms. When working off the shortcuts, the contents of the main registers of the machine are stored in memory. From the outputs 26 and 34 of the program control unit, connected to the outputs of the unit bits, respectively, of the counters 1 and 7, the codes located on
00
Q 5 Q 5
с единичный сигнал ошибки. Единичный сигнал условного перехода с входа 33 поступает на вход элемента И 9, который открыт разрешающим потенциалом с выхода триггера 11. На выходе элемента И 9 формируетс сигнал, поступающий на счетный вход счетчика 7, по которому его содержимое увеличиваетс на единицу.with a single error signal. A single signal of the conditional transition from input 33 is fed to the input of element AND 9, which is opened by the resolving potential from the output of trigger 11. At the output of element 9, a signal is generated that arrives at the counting input of counter 7, by which its content is increased by one.
При выходе из цикла по команде условного перехода в устройстве управлени ЦВМ производитс анализ специальной команды, выполн емой первой после выхода из цикла. В пол х 41 и 42 данной специальной команды записаны 1, который в виде единичных сигналов поступают с входов 28 и 30 устройства на первый и второй входы, элемента И 12, открытого по первому входу потенциалом выхода триггера 11. Элемент И 12 срабатывает и вьщает на выходе сигнал, устанавливающий в О триггер 11 и поступагаций на вход эле- 5 мента И 10. Если ход программы не нарушен , т.е. цикл вьшолнен заданное число раз, то все разр ды счетчика 7 должны находитьс в единичном состо нии . С выхода элемента И-НЕ 8 на вход элемента И 10 поступает нулевой сигнал и на его выходе не формируетс единичньй сигнал. Если цикл выполн лс число раз меньше заданного, то при выходе из цикла не все разр ды счетчика 7 наход тс в единичном состо 0When exiting the cycle, a special command is executed on the conditional jump command in the control unit of the digital computer that is executed first after exiting the loop. In fields x 41 and 42 of this special command, 1 is recorded, which in the form of single signals comes from the inputs 28 and 30 of the device to the first and second inputs of the And 12 element, opened at the first input by the output potential of the trigger 11. The And 12 element triggers and causes the output signal, which sets the trigger 11 in О О and inputs to the element 5 And 10. If the program flow is not disturbed, i.e. Since the cycle is completed a specified number of times, all bits of counter 7 must be in a single state. From the output of the element AND-NE 8 to the input of the element AND 10, a zero signal arrives and no single signal is generated at its output. If the cycle has been performed a number of times less than the specified one, then when exiting the cycle, not all bits of counter 7 are in the same state 0
5five
00
НИИ, на выходе элемента И-НЕ 8 присутствует единичньй сигнал, который сформирует на выходе элемента И 10 также единичный сигнал, который поступает на вход элемента. ИЛИ 5. На выходе элемента ИЛИ 5 формируетс еди- |ничный сигнал,который поступает на выход 31 устройства и свидетельствует об ошибке в ходе программы. Если программа зациклилась, то на второй входInstitute, at the output of the element AND-NO 8 there is a single signal that will form at the output of the element And 10 also a single signal, which is fed to the input of the element. OR 5. At the output of the element OR 5, a single signal is generated, which arrives at the output 31 of the device and indicates an error during the program. If the program is looped, then the second input
элемента ИЛИ 6 с выхода переноса из старшего разр да счетчика 7 поступает единичньй сигнал и на выходе 31 устройства формируетс единичный сигнал .the element OR 6 from the transfer output from the high bit of the counter 7 receives a single signal and a single signal is generated at the output 31 of the device.
Предлагаемое устройство способно контролировать ход программы и при наличии прерьшаний. При отработке пре- рьшаний содержимое основных регистров машины запоминаетс в пам ти. С выходов 26 и 34 устройства контрол хода программы, соединенных с выходами единичных разр дов соответственно счетчиков 1 и 7, коды, наход щиес наThe proposed device is able to control the course of the program and if there are any alarms. When working off interruptions, the contents of the main registers of the machine are stored in memory. From the outputs 26 and 34 of the program control unit, connected to the outputs of the unit bits, respectively, of the counters 1 and 7, the codes located on
счетчиках, поступают и запоминаютс в соответствующих чейках пам ти машины . При возвращении к прерванной программе необходимо восстановить на счетчиках 1 и 7 информацию, котора находитс в момент прихода сигнала пре- рьшани . Это делаетс путем вьшолнени специальной команды, в пол х 44 и 45 которой записаны коды, которые были записаны в пам ть.counters are received and stored in the corresponding memory locations of the machine. When returning to the interrupted program, it is necessary to restore on the counters 1 and 7 the information that is at the moment of arrival of the interruption signal. This is done by executing a special command, in fields x 44 and 45 of which the codes that were recorded in the memory are recorded.
Если программа содержит итеративные циклы, дл которых число повторени цикла зависит от значений исходных данных, дл каждого такого цикла заранее нельз указать точное число повторений.If the program contains iterative cycles for which the cycle repetition number depends on the values of the original data, it is impossible to specify in advance for each such cycle the exact number of repetitions.
В этом случае поступают следующим образом.In this case, proceed as follows.
Определ ютс области исходных дан- 20торый устанавливает в единичное сосных , которые вызьшают 1-,2-..., N-то ние триггеры 15 и 16 и обнул етThe areas of the original data are determined; the second sets pine trees into one, which are 1-, 2 -..., N-triggers 15 and 16, and zero
кратное повторение цикла. По функци мвсе разр ды счетчиков 13 и 14, распределени входных величин вычис- . Генератор 19 одиночных импульсовmultiple repetition of the cycle. According to the function of all the bits of the counters 13 and 14, the distribution of the input quantities is computed. 19 single pulse generator
л етс веро тность попадани исходныхпо высокому потенциалу на единичномThe probability of hitting the source at a high potential at a single
данных в каждую из этих областей. Оп- 25выходе триггера 15 вырабатьюает упредел ютс функции распределени вы-равл ющий сигнал занесени кодов на ходных величин при различном числе повторений цикла.data in each of these areas. The output of the trigger 15 generates distribution functions that distribute the corrective signal of entering the codes of the output variables with a different number of repetitions of the cycle.
Определ ют такое число N О повтосчетчики , по которому дополнительный код минимального числа повторений цикла, записанный в поле 47 спецйальрений цикла, дл которого выполн етс зо ой команды, заноситс на счетчикSuch a number N O reversal is determined, according to which the additional code of the minimum number of repetitions of the cycle recorded in the field 47 of special cycles of the cycle for which the command is executed is entered into the counter
условие Вер ()4J, где К - число повторений цикла; S - наперед заданное положительное число, определ ющее допустимую погрешность вычислени функции распределени выходной вели- чины.Ver condition () 4J, where K is the number of repetitions of the cycle; S is a predetermined positive number that determines the admissible error of calculating the distribution function of the output quantity.
Задава значение доверительной веро тности 7- попадани входной величины в интервалы исходных данных, .By setting the value of the confidence probability 7, the input value falls within the input data intervals,.
13, а обратньй код максимального чис ла повторений цикла, записанньй в по ле 48 специальной команды, заноситс на счетчик 14,13, and the reverse code of the maximum number of repetitions of the cycle, recorded in the field of the 48th special command, is entered into the counter 14,
При выполнении команды условного перехода в начало цикла на входе 33 устройства формируетс единичньй сиг нал условного перехода, который посрассчитьюают минимальное Н„„ и мак- 40 тупает на вход элемента И 21, котосимальное N,When executing a conditional jump command, a single conditional jump signal is formed at the beginning of the cycle at the device input 33, which is squandered by the minimum H "and the maximum 40 is input to the input of the element 21, co-optimal N,
количество повторенийnumber of repetitions
рый открыт разрешающим потенциалом с выхода триггера ,15. На выходе элемен та И 21 формируетс сигнал, поступающий на счетшзШ входы счетчиков 13 и 45 1 по которому их содержимое увеличиваетс на единицу.ry open resolving potential from the trigger output, 15. At the output of the element And 21, a signal is generated that arrives at the counting inputs of the counters 13 and 45 1 by which their contents increase by one.
цикла дл получени результатов с достоверностью (У , не меньше заданной.cycle to obtain results with certainty (Y, not less than the specified.
Дл контрол хода циклических участков программы с не вно заданным числом повторений цикла перед циклическим участком ставитс специальна команда, в поле 46 которой записана 1, в поле 47 - минимальное числоTo control the progress of the cyclic sections of the program with an implicit number of repetitions of the cycle, a special command is placed before the cyclic section, in field 46 of which 1 is written, in field 47 - the minimum number
повторений цикла в дополнительном ко- gg ленй ЭВМ производитс анализ специде , в поле 48 - максимальное число |повторений цикла в обратном коде. Первой командой циклического участка ставитс специальна команда, в поле 41 которой записан О, в поле 44 число команд, подлежап(их выполнению в циклическом участке без учета команды условного перехода, в пол х 42, 43, 45, 46, 47 и 48 записаны вrepetitions of the cycle in the additional co-gg computer are performed by analyzing, in field 48 - the maximum number of repetitions of the cycle in the reverse code. The first command of the cyclic section is a special command, in field 41 of which O is written, in field 44 the number of commands to be subject (they are executed in the cyclic section without taking into account the conditional jump command, in fields 42, 43, 45, 46, 47 and 48 are written in
альной- команды, выполн емой первой после выхода из цикла. В поле 41 этой команды записана 1, котора в виде единичного сигнала поступает с входа gg, 36 устройства на вход элемента И 20, второй вход которого управл етс потенциалом единичного выхода триггера. Если число повторений участка программы KTvN, , где - минималь the main command executed first after exiting the loop. In the field 41 of this command, 1 is recorded, which as a single signal comes from the input gg, 36 of the device to the input of the element AND 20, the second input of which is controlled by the potential of the single output of the trigger. If the number of repetitions of the program section KTvN,, where is the minimum
..
10 Первой командой участка программы , на которой происходит передача10 The first team of the program site where the transfer takes place.
управлени после выхода из цикла, ставитс специальна команда, в поле 41 которой записана 1, в поле 42 записано эталонное значение сигнала условного перехода, а в остальных пол х (43 - 48) записаны О.after the exit from the cycle, a special command is put, in field 41 of which 1 is recorded, in field 42 a reference value of the conditional transition signal is recorded, and in the remaining fields (43 - 48) O.
В этом случае устройство контрол хода программ работает следующим образом .In this case, the program control the progress of the programs works as follows.
Перед началом выполнени цикла в устройстве управлени ЭВМ производит- с анализ хода специальной команды. Если в поле 46 записана 1, на вход 37 устройства поступает единичный сигнал признака контрол цикла с не вно заданным числом повторений, коравл ющий сигнал занесени кодов на Before starting the execution of the cycle in the computer control unit, an analysis is made of the progress of the special command. If field 46 is recorded as 1, a single signal of the control character of the cycle with an implicit number of repetitions is received at the input 37 of the device, the coral signal of entering the codes to
счетчики, по которому дополнительный код минимального числа повторений цикла, записанный в поле 47 спецйаль13 , а обратньй код максимального числа повторений цикла, записанньй в поле 48 специальной команды, заноситс на счетчик 14,counters, according to which the additional code of the minimum number of repetitions of the cycle recorded in the field 47 special points13, and the reverse code of the maximum number of repetitions of the cycle recorded in the field 48 of the special command is entered into counter 14,
При выполнении команды условного перехода в начало цикла на входе 33 устройства формируетс единичньй сигнал условного перехода, который посрый открыт разрешающим потенциалом с выхода триггера ,15. На выходе элемента И 21 формируетс сигнал, поступающий на счетшзШ входы счетчиков 13 и 45 1 по которому их содержимое увеличиваетс на единицу.When the conditional jump command is executed, a single conditional jump signal is generated at the device input 33 at the beginning of the cycle, which is immediately open by the resolving potential from the trigger output, 15. At the output of the element 21, a signal is generated that arrives at the counting inputs of counters 13 and 45 1 by which their contents increase by one.
При выходе из цикла по команде условного перехода в устройстве управальной- команды, выполн емой первой после выхода из цикла. В поле 41 этой команды записана 1, котора в виде единичного сигнала поступает с входа gg, 36 устройства на вход элемента И 20, второй вход которого управл етс потенциалом единичного выхода триггера. Если число повторений участка программы KTvN, , где - минималь 1325488 2When exiting a loop, a conditional jump command is executed in the control-command device that is executed first after exiting the loop. In the field 41 of this command, 1 is recorded, which as a single signal comes from the input gg, 36 of the device to the input of the element AND 20, the second input of which is controlled by the potential of the single output of the trigger. If the number of repetitions of the program section KTvN,, where is the minimum of 1325488 2
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853975644A SU1325488A2 (en) | 1985-11-10 | 1985-11-10 | Device for monitoring program run |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853975644A SU1325488A2 (en) | 1985-11-10 | 1985-11-10 | Device for monitoring program run |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU1242967 Addition |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1325488A2 true SU1325488A2 (en) | 1987-07-23 |
Family
ID=21204944
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU853975644A SU1325488A2 (en) | 1985-11-10 | 1985-11-10 | Device for monitoring program run |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1325488A2 (en) |
-
1985
- 1985-11-10 SU SU853975644A patent/SU1325488A2/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1242967, кл. G 06 F 11/28, 1984. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5845064A (en) | Method for testing and verification of a CPU using a reference model | |
US4956807A (en) | Watchdog timer | |
JPH06139107A (en) | Brake address detecting circuit | |
US5671402A (en) | Method of evaluating a data processing rate using simulation | |
US4183462A (en) | Fault diagnosis apparatus and method for sequence control system | |
SU1325488A2 (en) | Device for monitoring program run | |
RU198966U1 (en) | A device for evaluating the probabilistic and temporal characteristics of signal formation in information management systems | |
SU1242967A2 (en) | Device for monitoring program run | |
KR100311366B1 (en) | Controller having watch dog timer function | |
SU1617442A1 (en) | Device for monitoring the running of programs | |
SU1681320A1 (en) | Training program set up device | |
SU446060A1 (en) | Computer control unit | |
RU2041487C1 (en) | Device for modeling technology of software development | |
SU892446A1 (en) | Program run checking device | |
SU881779A2 (en) | Device for simulating probability graph | |
SU1128258A1 (en) | Device for checking execution of sequence of commands of operator | |
SU1580388A1 (en) | Device for modeling activity of man-operator | |
SU1305690A1 (en) | Device for monitoring microprogram run | |
SU1432463A1 (en) | Device for checking diagnostics of radio-electronic equipment | |
SU1182566A2 (en) | Device for controlling system for training operators of control systems | |
SU563697A1 (en) | Device for monitoring long-time memories | |
JP2001060162A (en) | In-circuit emulator | |
SU1298743A1 (en) | Random process generator | |
SU976472A1 (en) | Device for evaluating professional fitness of operators of automated control systems | |
SU928360A1 (en) | Device for monitoring time of execution of programmes |