RU2050588C1 - Method for control and debug of real-time programs and device for its implementation - Google Patents

Method for control and debug of real-time programs and device for its implementation Download PDF

Info

Publication number
RU2050588C1
RU2050588C1 SU4933054A RU2050588C1 RU 2050588 C1 RU2050588 C1 RU 2050588C1 SU 4933054 A SU4933054 A SU 4933054A RU 2050588 C1 RU2050588 C1 RU 2050588C1
Authority
RU
Russia
Prior art keywords
input
output
inputs
control
elements
Prior art date
Application number
Other languages
Russian (ru)
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 SU4933054 priority Critical patent/RU2050588C1/en
Application granted granted Critical
Publication of RU2050588C1 publication Critical patent/RU2050588C1/en

Links

Images

Abstract

FIELD: computer engineering. SUBSTANCE: method involves measuring results after loop for error detection, error localization, which includes repeated execution of test, and error correction. New feature of method is measuring results for error detection by means of separation of decisive test into intervals. Error localization is performed for given interval or during execution of subsequent interval of decisive test. EFFECT: increased efficiency of debugging due to decreased number of repetitions for execution of decisive test. 5 cl, 1 dwg

Description

Изобретение относится к вычислительной технике и может быть использовано при контроле и отладке программ реального времени бортовых ЭВМ. The invention relates to computer technology and can be used in monitoring and debugging real-time programs of on-board computers.

Известны способы отладки программ, основанные на написании и проверке ряда утверждений, ожидаемых в каждой точке программы при помощи формальных математических методов (верификация программ) [1] Реализация этих способов затруднительна для программ большого объема и сложности, к которым можно отнести программы бортовых ЭВМ. Known methods for debugging programs based on writing and verifying a number of statements expected at each point in the program using formal mathematical methods (program verification) [1] The implementation of these methods is difficult for large-scale and complex programs, which include on-board computer programs.

Наиболее близким по технической сущности является способ отладки программ методом тестирования, основанный на многократном повторении трех этапов: обнаружения, локализации и исправлении ошибки [2]
При указанном способе отладки программ производится выполнение контрольного теста, измерение и анализ полученных результатов на этапе обнаружения ошибки. На этапе локализации ошибки используются устройства для отладки программ. Исправление ошибки производится путем изменения содержимого памяти ЭВМ. Для программ реального времени бортовых ЭВМ выполнение теста, измерение и анализ полученных результатов, например, можно представить как включение ЭВМ в работу; подключение к входным аналого-цифровым преобразователям ЭВМ определенных последовательностей напряжений; измерение выходных напряжений ЭВМ и сравнение их с эталонными. Локализация ошибки заключается в настройке устройства отладки программ на выбранный режим работы и фиксации с помощью устройства момента проявления ошибки путем, например, останова ЭВМ. Изменение содержимого памяти ЭВМ при исправлении ошибки производится, например, путем перекладки проводников из одних магнитных сердечников в другие или, например, прожигом микросхем памяти. Для программ реального времени бортовых ЭВМ выполнение теста это решение на ЭВМ взаимосвязанных контрольных задач в течение определенного времени. Частота решения этих задач (работа в реальном времени) определяется, как правило, тактирующими прерываниями, поступающими в ЭВМ из аппаратуры.
The closest in technical essence is the method of debugging programs by the testing method, based on the repeated repetition of three stages: detection, localization and error correction [2]
With the specified method of debugging programs, a control test is performed, measurement and analysis of the results obtained at the stage of error detection. At the stage of error localization, devices are used to debug programs. Error correction is carried out by changing the contents of the computer memory. For real-time on-board computer programs, the execution of a test, the measurement and analysis of the results obtained, for example, can be represented as the inclusion of a computer in the work; connection to input analog-to-digital computer converters of certain voltage sequences; measurement of computer output voltages and comparing them with reference ones. The localization of the error consists in setting the device for debugging programs to the selected operating mode and fixing, with the help of the device, the moment of occurrence of the error by, for example, stopping the computer. Changing the contents of the computer memory while correcting the error is made, for example, by transferring conductors from one magnetic core to another, or, for example, by burning memory chips. For real-time on-board computer programs, test execution is a computer solution of interrelated control tasks for a certain time. The frequency of solving these problems (real-time operation) is determined, as a rule, by clock interruptions coming into the computer from the equipment.

Во время отладки программ с целью сохранения реального масштаба времени производится измерение минимального количества результатов, а их анализ производится по окончании теста. Это приводит к тому, что определение источника ошибки на основании полученных результатов производится приближенно. Поэтому этап локализации ошибки включает повторное выполнение контрольного теста с предварительной настройкой устройства отладки программ на локализацию ошибки. Процедуры этапа локализации ошибки повторяются до тех пор, пока ошибка не будет локализована. Многократные повторы выполнения теста снижают производительность отладки. During debugging of programs in order to maintain a real time scale, the minimum number of results is measured, and their analysis is performed at the end of the test. This leads to the fact that the determination of the source of the error based on the results obtained is approximately. Therefore, the stage of error localization includes the repeated execution of the control test with the preliminary configuration of the program debugging device for error localization. The procedures of the error localization step are repeated until the error is localized. Repeated repetition of the test execution reduces the debugging performance.

Известны устройства для отладки программ, содержащие схемы анализа магистралей ЭВМ, узлы сравнения заданных точек анализа с текущим состоянием программ, позволяющие производить останов ЭВМ в заданной точке программы и выполнение процедур локализации ошибки. Недостатком известных устройств является нарушение реального времени выполнения программ из-за потерь времени на останов ЭВМ, или затрат времени на работу прерывающей программы. Known devices for debugging programs that contain circuit analysis of the mains of the computer, the nodes of the comparison of the specified points of analysis with the current state of the programs, allowing to stop the computer at a given point of the program and the implementation of the procedures for localizing errors. A disadvantage of the known devices is the violation of the real time of program execution due to loss of time to shut down the computer, or the time spent on the interrupt program.

Наиболее близким по технической сущности является устройство для формирования сигнала прерывания при отладке программ, содержащее регистры, узлы сравнения, группы элементов ИЛИ, группы элементов И, позволяющие прерывать отлаживаемую программу без остановов ЭВМ с переходом на прерывающую программу при обращении отлаживаемой программы к определенной ячейке памяти ЭВМ, при выполнении команды, адрес которой заранее указан, при обращении к определенному регистру процессора ЭВМ, при выполнении команд перехода, т.е. производить локализацию ошибки [3] При этом время, затрачиваемое на работу прерывающей программы и на локализацию ошибки, не учитывается. The closest in technical essence is a device for generating an interrupt signal when debugging programs, containing registers, comparison nodes, groups of OR elements, groups of AND elements that allow you to interrupt a debugged program without computer shutdowns and switch to an interrupt program when a debugged program accesses a specific computer memory cell , when executing a command whose address is previously specified, when accessing a specific register of the computer processor, when executing transition commands, i.e. localize the error [3] In this case, the time spent on the interrupt program and on the localization of the error is not taken into account.

Недостатком известного способа и устройства являются большие затраты времени, приводящие к искажению реального времени выполнения программы. Поэтому при отладке производится разделение процедур обнаружения и локализации ошибки. Такое разделение, проводимое с целью сохранения масштаба реального времени, приводит к необходимости многократного повторения контрольного теста для локализации одной ошибки. Все это снижает производительность отладки. The disadvantage of this method and device is the high cost of time, leading to distortion of the real time execution of the program. Therefore, when debugging, separation of error detection and localization procedures is performed. Such a separation, carried out in order to preserve the real-time scale, leads to the need for repeated repetition of the control test to localize one error. All this reduces debugging performance.

Цель изобретения повышение производительности отладки программ путем сокращения повторов выполнения контрольного теста. The purpose of the invention is to increase the productivity of debugging programs by reducing the repetitions of the control test.

Это достигается совмещением во времени процедур обнаружения и локализации ошибки за счет разбиения процедуры выполнения контрольного теста на интервалы. Производится измерение результатов после каждого интервала и при необходимости локализация ошибки на данном интервале. Это позволяет сузить зону проявления ошибки во времени, производить локализацию ошибки в момент ее обнаружения на основании измеренных в момент обнаружения результатов. С целью сохранения масштаба реального времени при обнаружении и локализации ошибки производится подсчет времени выполнения отлаживаемых программ, времени, оставшегося до выработки очередного тактирующего прерывания, и формирование тактирующего прерывания. В этом случае паузы между интервалами выполнения контрольного теста могут быть любой длительности, столько, сколько потребуется времени на локализацию ошибки, при этом величина времени локализации ошибки не имеет значения. This is achieved by combining in time the procedures for detecting and localizing errors by dividing the procedure for performing the control test into intervals. The results are measured after each interval and, if necessary, the error is localized on this interval. This allows you to narrow the area of error manifestation in time, to localize the error at the time of its detection based on the results measured at the time of detection. In order to preserve the real-time scale when detecting and localizing errors, the execution time of debugged programs, the time remaining until the next clock interrupt is generated, and the generation of the clock interrupt are calculated. In this case, the pauses between the intervals for performing the control test can be of any duration, as long as it takes time to localize the error, while the magnitude of the time to localize the error does not matter.

Цель также достигается тем, что в устройство для отладки программ, содержащее первый, второй и третий регистры, первый, второй и третий узлы сравнения, группу элементов ИЛИ, первый, второй и третий элементы ИЛИ, управляющий регистр, первую, вторую и третью группы элементов И, первый, второй, третий, четвертый, пятый, шестой, седьмой, восьмой элементы И и элемент НЕ, причем выходы первого и второго регистров соединены соответственно с первыми входами первого и второго узлов сравнения, первый информационный вход устройства соединен с вторыми входами первого и второго узлов сравнения, первый выход управляющего регистра соединен с первыми входами первого элемента И, первого элемента ИЛИ и первыми входами элементов И первой группы, второй выход управляющего регистра соединен с первыми входами второго элемента И, с первыми входами элементов И второй группы и вторым входом первого элемента ИЛИ, третий выход управляющего регистра соединен с первым входом третьего элемента И, первыми входами элементов И третьей группы и с третьим входом элемента ИЛИ, выход которого соединен с первым входом четвертого элемента И, четвертый выход управляющего регистра соединен с первым входом пятого элемента И, выход которого соединен с первым входом шестого элемента И, пятый выход управляющего регистра соединен с вторым входом шестого элемента И, первым входом седьмого элемента И и входом элемента НЕ, выход которого соединен с первым входом восьмого элемента И, выходы первого, второго и третьего элементов И соединены с входами второго элемента ИЛИ, выход которого соединен с управляющим входом третьего узла сравнения, выходы каждого элемента И первой, второй и третьей групп соединены с соответствующими входами элементов ИЛИ группы, выходы третьего регистра и выходы элементов ИЛИ группы соединены соответственно с первой и второй группами информационных входов третьего узла сравнения, выход которого соединен с вторым входом четвертого элемента И, выход которого соединен с вторыми входами седьмого и восьмого элементов И, выход восьмого элемента И соединен с первым управляющим выходом устройства, выходы шестого и седьмого элементов И соединены соответственно с первым и вторым входами третьего элемента ИЛИ, выход которого соединен с вторым управляющим выходом устройства, первый, второй, третий и четвертый управляющие входы устройства соединены соответственно с вторыми входами первого, второго, третьего и пятого элементов И, первый информационный вход устройства соединен с вторыми входами элементов И второй группы, второй и третий информационные входы устройства соединены с вторыми входами элементов И первой и третьей группы, введены триггер, генератор импульсов, девятый элемент И, счетчик, четвертый регистр, элемент задержки, управляющие выходы первого и второго узлов сравнения соединены соответственно с первым и вторым входами триггера, выход триггера соединен с первым входом девятого элемента И, второй вход девятого элемента И соединен с выходом генератора импульсов, выход девятого элемента И соединен со счетным входом счетчика, выход четвертого регистра соединен с информационным входом счетчика, выход переполнения которого соединен с третьим управляющим выходом устройства и входом элемента задержки, выход элемента задержки соединен с установочным входом счетчика, второй управляющий вход устройства соединен с управляющими входами первого и второго узлов сравнения. The goal is also achieved by the fact that in the device for debugging programs containing the first, second and third registers, the first, second and third comparison nodes, a group of OR elements, the first, second and third OR elements, the control register, the first, second and third groups of elements And, the first, second, third, fourth, fifth, sixth, seventh, eighth elements AND and the element NOT, and the outputs of the first and second registers are connected respectively to the first inputs of the first and second comparison nodes, the first information input of the device is connected to the second inputs In the first and second comparison nodes, the first output of the control register is connected to the first inputs of the first AND element, the first OR element and the first inputs of AND elements of the first group, the second output of the control register is connected to the first inputs of the second AND element, with the first inputs of the AND elements of the second group and the second input of the first OR element, the third output of the control register is connected to the first input of the third AND element, the first inputs of the AND elements of the third group and the third input of the OR element, the output of which is connected to the first by the fourth element And, the fourth output of the control register is connected to the first input of the fifth element And, the output of which is connected to the first input of the sixth element And, the fifth output of the control register is connected to the second input of the sixth element And, the first input of the seventh element And and the input of the element NOT, output which is connected to the first input of the eighth AND element, the outputs of the first, second and third AND elements are connected to the inputs of the second OR element, the output of which is connected to the control input of the third comparison node, the outputs of each The AND elements of the first, second and third groups are connected to the corresponding inputs of the OR elements of the group, the outputs of the third register and the outputs of the OR elements of the group are connected respectively to the first and second groups of information inputs of the third comparison node, the output of which is connected to the second input of the fourth AND element, the output of which is connected with the second inputs of the seventh and eighth elements AND, the output of the eighth element And is connected to the first control output of the device, the outputs of the sixth and seventh elements And are connected respectively to the first the second inputs of the third OR element, the output of which is connected to the second control output of the device, the first, second, third and fourth control inputs of the device are connected respectively to the second inputs of the first, second, third and fifth elements And, the first information input of the device is connected to the second inputs of the elements the second group, the second and third information inputs of the device are connected to the second inputs of the And elements of the first and third groups, a trigger, a pulse generator, the ninth And element, a counter, the fourth are introduced the register, the delay element, the control outputs of the first and second comparison nodes are connected respectively to the first and second inputs of the trigger, the trigger output is connected to the first input of the ninth element And the second input of the ninth element And is connected to the output of the pulse generator, the output of the ninth element And is connected to the counting input the counter, the output of the fourth register is connected to the information input of the counter, the overflow output of which is connected to the third control output of the device and the input of the delay element, the output of the delay element with union of a mounting counter input, a second control input device connected to the control inputs of said first and second comparing units.

Положительный эффект достигается тем, что после выполнения интервала контрольного теста в ЭВМ устройство обеспечивает прерывание выполнения программ и вклинивание прерывающей программы, с помощью которой производится измерение результатов и обнаружение ошибки. В случае обнаружения ошибки устройство настраивается на ее локализацию и локализация проводится на данном интервале выполнения контрольного теста либо на последующем. В результате происходит совмещение во времени процедур обнаружения и локализации ошибки. В большинстве случаев не требуется повторного запуска контрольного теста для проведения локализации ошибки. За счет этого производительность отладки повышается. Масштаб реального времени при этом полностью сохраняется, так как при переходе на прерывающую программу автоматически прекращается счет реального времени в счетчике, который одновременно служит и генератором тактирующих прерываний для ЭВМ. Этот счет автоматически возобновляется при передаче управления на отлаживаемую программу. Аналогично счет реального времени прекращается при переходе на прерывающую программу во время проведения отладки с помощью устройства, а также в случае останова ЭВМ с целью измерения результатов. A positive effect is achieved by the fact that after the interval of the control test in the computer, the device interrupts the execution of programs and wedged in the interrupt program, with which the results are measured and error detection is performed. If an error is detected, the device is configured to localize it and localization is carried out at a given interval of the control test or at a subsequent one. The result is a combination of the time procedures for detecting and localizing errors. In most cases, you do not need to restart the control test to localize the error. Due to this, debugging performance is improved. In this case, the real-time scale is completely preserved, since when switching to an interrupt program, the real-time count in the counter automatically stops, which simultaneously serves as a clock interrupt generator for computers. This account is automatically renewed upon transfer of control to the program being debugged. Similarly, the real-time count is terminated when switching to the interrupt program during debugging using the device, as well as in the event of a computer shutdown in order to measure the results.

На чертеже представлена схема устройства. The drawing shows a diagram of the device.

Устройство содержит первый регистр 1, первый узел 2 сравнения, второй узел 3 сравнения, триггер 4, второй регистр 5, входы первого 1 и второго 5 регистров соединены соответственно с первыми входами первого 2 и второго 3 узлов сравнения, выходы которых соединены соответственно с первым и вторым входами триггера 4. Первый информационный вход 6 устройства соединен с вторыми входами первого и второго узлов сравнения. Устройство содержит также управляющий регистр 7, третий регистр 8, третий узел 9 сравнения, первый элемент ИЛИ 10, второй элемент ИЛИ 11, первый, второй и третий элементы И 12-14, первую, вторую и третью группы элементов И 15-17, четвертый, пятый, шестой, седьмой элементы И 18-21, элемент НЕ 22, группу элементов ИЛИ 23, восьмой элемент И 24, третий элемент ИЛИ 25, первый, второй, третий и четвертый управляющие входы 26-29, второй и третий информационные входы 30 и 31, первый, второй и третий управляющие выходы 32-34, генератор 35 импульсов, девятый элемент И 36, четвертый регистр 37, счетчик 38. The device contains a first register 1, a first comparison node 2, a second comparison node 3, a trigger 4, a second register 5, the inputs of the first 1 and second 5 registers are connected respectively to the first inputs of the first 2 and second 3 comparison nodes, the outputs of which are connected respectively to the first and the second inputs of the trigger 4. The first information input 6 of the device is connected to the second inputs of the first and second nodes of comparison. The device also contains a control register 7, a third register 8, a third comparison node 9, the first element OR 10, the second element OR 11, the first, second and third elements AND 12-14, the first, second and third groups of elements AND 15-17, the fourth , fifth, sixth, seventh elements AND 18-21, element NOT 22, group of elements OR 23, eighth element AND 24, third element OR 25, first, second, third and fourth control inputs 26-29, second and third information inputs 30 and 31, the first, second and third control outputs 32-34, the pulse generator 35, the ninth element And 36, the fourth re bar 37, counter 38.

Кроме того, на чертеже показаны регистр 39 номера команды, регистр 40 адреса ячейки, регистр 41 сумматора, являющиеся частью ЭВМ, которые не входят в состав предлагаемого устройства, а служит лишь для пояснения его работы. Устройство содержит элемент задержки 42. Первый выход управляющего регистра 7 соединен с первыми входами первого элемента И 12, первого элемента ИЛИ 10 и всех элементов И 15 первой группы. Второй выход управляющего регистра 7 соединен с первыми входами второго элемента И 13, всех элементов И 16 второй группы и с вторым входом первого элемента ИЛИ 10. Третий выход управляющего регистра 7 соединен с первыми входами третьего элемента И 14, всех элементов И 17 третьей группы и с третьим входом первого элемента ИЛИ 10, выход которого соединен с первым входом четвертого элемента И 18. Четвертый выход управляющего регистра 7 соединен с первым входом пятого элемента И 19, выход которого соединен с первым входом шестого элемента И 20. Пятый выход управляющего регистра 7 соединен с вторым входом шестого элемента И 20, первым входом седьмого элемента И 21 и через элемент НЕ 22 с первым входом восьмого элемента И 24. Выходы первого, второго и третьего элементов И 12-14 соединены с входами второго элемента ИЛИ 11, выход которого соединен с управляющим входом третьего узла 9 сравнения. In addition, the drawing shows a register 39 of the command number, register 40 of the cell address, register 41 of the adder, which are part of the computer, which are not part of the proposed device, but serves only to explain its operation. The device contains a delay element 42. The first output of the control register 7 is connected to the first inputs of the first element And 12, the first element OR 10 and all elements And 15 of the first group. The second output of the control register 7 is connected to the first inputs of the second element And 13, all elements And 16 of the second group and to the second input of the first element OR 10. The third output of the control register 7 is connected to the first inputs of the third element And 14, all elements And 17 of the third group and with the third input of the first element OR 10, the output of which is connected to the first input of the fourth element And 18. The fourth output of the control register 7 is connected to the first input of the fifth element And 19, the output of which is connected to the first input of the sixth element And 20. The fifth output control register 7 is connected to the second input of the sixth element And 20, the first input of the seventh element And 21 and through the element NOT 22 with the first input of the eighth element And 24. The outputs of the first, second and third elements And 12-14 are connected to the inputs of the second element OR 11, the output of which is connected to the control input of the third node 9 comparison.

Выходы каждого элемента И 15-17 соответственно первой, второй и третьей групп соединены с входами соответствующих элементов ИЛИ группы 23. Выходы третьего регистра 8 и выходы группы элементов ИЛИ 23 соединены соответственно с первой и второй группами информационных входов третьего узла 9 сравнения, выход которой соединен с вторым входом четвертого элемента И 18, выход которого соединен с вторыми входами седьмого и восьмого элементов И 21 и 24. Выход 32 восьмого элемента И 24 является первым управляющим выходом устройства. Выходы шестого и седьмого элементов И 20 и 21 соединены соответственно с первым и вторым входами третьего элемента ИЛИ 25, выход 33 которого соединен с вторым управляющим выходом устройства. Первый, второй, третий и четвертый входы 26-29 устройства соединен соответственно с вторыми входами первого, второго, третьего и пятого элементов И 12-14 и 19. Второй управляющий вход 27 устройства соединен с управляющими входами первого и второго узлов сравнения. Выход триггера 4 соединен с первым входом элемента И 36, выход которого соединен со счетным входом счетчика 38. Выход генератора 35 импульсов соединен с вторым входом элемента И 36, выход четвертого регистра 37 соединен с информационным входом счетчика 38, выход которого соединен с третьим управляющим выходом 34 устройства и входом элемента задержки 42, выход элемента задержки соединен с установочным входом счетчика 38. Первый информационный вход 6 устройства соединен с вторыми входами элементов И 16 второй группы. Второй и третий информационные входы 30 и 31 устройства соединены соответственно с вторыми входами элементов И 15 и 17 первой и третьей групп. Регистры 1, 5, 7, 8 и 37 являются тумблерными регистрами. The outputs of each element And 15-17, respectively, of the first, second and third groups are connected to the inputs of the corresponding OR elements of group 23. The outputs of the third register 8 and the outputs of the group of elements OR 23 are connected respectively to the first and second groups of information inputs of the third comparison node 9, the output of which is connected with the second input of the fourth element And 18, the output of which is connected to the second inputs of the seventh and eighth elements And 21 and 24. The output 32 of the eighth element And 24 is the first control output of the device. The outputs of the sixth and seventh elements And 20 and 21 are connected respectively with the first and second inputs of the third element OR 25, the output 33 of which is connected to the second control output of the device. The first, second, third and fourth inputs of the device 26-29 are connected respectively to the second inputs of the first, second, third and fifth elements And 12-14 and 19. The second control input 27 of the device is connected to the control inputs of the first and second comparison nodes. The trigger output 4 is connected to the first input of the And 36 element, the output of which is connected to the counting input of the counter 38. The output of the pulse generator 35 is connected to the second input of the And 36 element, the output of the fourth register 37 is connected to the information input of the counter 38, the output of which is connected to the third control output 34 of the device and the input of the delay element 42, the output of the delay element is connected to the installation input of the counter 38. The first information input 6 of the device is connected to the second inputs of the elements And 16 of the second group. The second and third information inputs 30 and 31 of the device are connected respectively to the second inputs of the elements And 15 and 17 of the first and third groups. Registers 1, 5, 7, 8, and 37 are toggle registers.

Работа устройства во всех режимах начинается с установки на регистрах 1 и 5 начального и конечного адресов команд прерывающей программы. На регистре 37 устанавливается код периода основного такта обработки информации в ЭВМ. Этот код определяет длительность очередного шага выполнения отлаживаемых программ. Время очередного шага выполнения программ отсчитывается счетчиком 38. По окончании счета устройство вырабатывает сигнал на управляющем выходе 34, который поступает в систему прерывания ЭВМ. The operation of the device in all modes begins with the installation of registers 1 and 5 of the start and end addresses of the commands of the interrupting program. On the register 37 sets the period code of the main cycle of information processing in the computer. This code determines the duration of the next step in executing debugged programs. The time of the next step of program execution is counted by the counter 38. At the end of the count, the device generates a signal at the control output 34, which enters the computer interrupt system.

Во время выполнения прерывающей программы реальное время счетчиком не отсчитывается, и масштаб реального времени, определяемый периодом основного такта обработки информации в ЭВМ, не нарушается. During the execution of the interrupt program, the real time is not counted by the counter, and the real-time scale determined by the period of the main information processing cycle in the computer is not violated.

Устройство может работать в одном из четырех режимов локализации ошибки. В режиме "1" при обращении к ячейке, адрес которой (содержимое регистра 40) совпадает с адресом, набранным на тумблерном регистре 8, устройство вырабатывает сигнал на выходе 33, который также поступает в систему прерывания ЭВМ. Этот выход устройства (в отличие от выхода 34) используется для того, чтобы прерывающая программа могла отличить прерывание режима отладки от тактирующего, так как режим отладки может выполняться в любом месте внутри очередного шага выполнения отлаживаемых программ. Но и в этом случае потери времени на прерывающую программу, в том числе и на анализ, проводимый программистом, полностью учитывается счетчиком и реальный масштаб времени не нарушается. The device can operate in one of four error localization modes. In mode "1" when accessing a cell whose address (contents of register 40) matches the address dialed on toggle switch 8, the device generates a signal at output 33, which also enters the computer interrupt system. This device output (as opposed to output 34) is used so that the interrupt program can distinguish the interruption of the debug mode from the clock mode, since the debug mode can be executed anywhere inside the next step of executing debugged programs. But even in this case, the loss of time for the interrupting program, including the analysis carried out by the programmer, is fully taken into account by the counter and the real time scale is not violated.

Аналогично устройство работает в режиме "2". При совпадении адреса выполняемой команды (содержимое регистра 39) с содержимым регистра 8 на выходе 33 устройства вырабатывается управляющий сигнал. Similarly, the device operates in "2" mode. When the address of the executed command (the contents of register 39) coincides with the contents of register 8, a control signal is generated at the output 33 of the device.

Режим "3" отличается от режима "1" только тем, что сравнивается не содержимое регистра 40, а содержимое регистра 42 и сигнал прерывания вырабатывается не при обращении к ячейке, а при совпадении определенного числа, записанного в регистре 8, с содержимым регистра сумматора 41. В режиме "4" устройство вырабатывает сигнал на выходе 33 при выполнении команды перехода. The mode "3" differs from the mode "1" only in that it is not the contents of register 40 that are compared, but the contents of register 42 and the interrupt signal is generated not when the cell is accessed, but when a certain number recorded in register 8 coincides with the contents of the adder register 41 . In the "4" mode, the device generates a signal at the output 33 when the jump command is executed.

Работа устройства во всех режимах происходит следующим образом. The operation of the device in all modes is as follows.

При работе ЭВМ на регистре 39 адреса команды присутствует адрес выполняемой команды, который через первый информационный вход 6 устройства поступает на вторые входы первого и второго узлов 2 и 3 сравнения. На выходе первого узла 2 сравнения появляется импульс при совпадении начального адреса прерывающей программы с адресом, набранным на первом регистре 1, а на выходе второго узла 3 сравнения при совпадении конечного адреса прерывающей программы с адресом, набранным на втором регистре 5. When the computer is running on the command address register 39, the address of the command being executed is present, which, through the first information input 6 of the device, goes to the second inputs of the first and second comparison nodes 2 and 3. An output appears at the output of the first comparison node 2 when the start address of the interrupt program matches the address typed in the first register 1, and at the output of the second comparison node 3 when the end address of the interrupt program matches the address typed in the second register 5.

Включение каждой команды сопровождается управляющим сигналом, поступающим на вход 27. Этот сигнал приходит на управляющие входы узлов сравнения 2 и 3 для опроса узлов сравнения. На выходе триггера 4 появляется сигнал, равный по длительности времени выполнения прерывающей программы со всеми задержками, вызываемыми вмешательством программиста. Этот сигнал запрещает прохождение импульсов с генератора 35 на счетный вход счетчика 38 и, наоборот, разрешает работу счетчика при функционировании устройства в зоне рабочих отлаживаемых программ. На тумблерном регистре 37 набирается обратный код периода тактирующих прерываний, который перезаписывается на счетчик 38 в момент выработки последним сигнала переполнения. Сигнал переполнения поступает на третий управляющий выход 34 устройства. The inclusion of each command is accompanied by a control signal supplied to input 27. This signal comes to the control inputs of the comparison nodes 2 and 3 to poll the comparison nodes. At the output of trigger 4, a signal appears that is equal in length to the execution time of the interrupt program with all the delays caused by the intervention of the programmer. This signal prohibits the passage of pulses from the generator 35 to the counting input of the counter 38 and, conversely, allows the counter to operate when the device operates in the area of working debugged programs. On the tumbler register 37, the reverse code of the clock interrupt period is dialed, which is overwritten to the counter 38 at the time the last overflow signal is generated. The overflow signal is supplied to the third control output 34 of the device.

Работа устройства в отладочном режиме "1" проходит следующим образом. The operation of the device in debug mode "1" is as follows.

Программист, проводящий отладку программ, устанавливает на регистре 7 управления режим "1" и режим отладки. При этом на первом и пятом выходах регистра 7 появляются одиночные потенциалы. Каждая команда обращения в ОЗУ сопровождается управляющим потенциалом, который поступает из процессора через первый управляющий вход 26 устройства на второй вход элемента И 12, на первый вход которого поступает продолжительный потенциал первого выхода управляющего регистра 7. С выхода первого элемента И 12 положительный потенциал через второй элемент ИЛИ 11 поступает на управляющий вход третьего узла сравнения и тем самым разрешает сравнение информации, набранной на третьем регистре 8, с содержимым регистра 40 адреса ячейки. Содержимое регистра 40 адреса ячейки ОЗУ через первую группу элементов И 15 и элементов ИЛИ 23 поступает на второй информационный вход третьего узла 9 сравнения. При совпадении содержимого третьего регистра 8 с содержимым регистра 40 адреса ячейки на выходе узла 9 сравнения будет выработан разрешающий потенциал, который поступает на первый вход четвертого элемента И 18, на второй вход которого поступает разрешающий потенциал с выхода первого элемента ИЛИ 10. Сигнал с выхода четвертого элемента И 18 через седьмой элемент И 21 и третий элемент ИЛИ 25 поступает на второй управляющий выход 33 устройства, который соединен с регистром устройства ЭВМ. The programmer conducting the debugging of programs sets the control mode 7 to "1" and the debugging mode. In this case, single potentials appear at the first and fifth outputs of register 7. Each access command in RAM is accompanied by a control potential, which comes from the processor through the first control input 26 of the device to the second input of element And 12, the first input of which receives the continuous potential of the first output of the control register 7. From the output of the first element And 12 positive potential through the second element OR 11 enters the control input of the third comparison node and thereby allows the comparison of the information typed in the third register 8 with the contents of the cell address register 40. The contents of register 40 of the address of the RAM cell through the first group of AND elements 15 and OR elements 23 is supplied to the second information input of the third comparison node 9. If the contents of the third register 8 coincide with the contents of the register 40 of the cell address at the output of the comparison node 9, a resolving potential will be generated that goes to the first input of the fourth element AND 18, the second input of which receives the resolving potential from the output of the first element OR 10. The signal from the output of the fourth element And 18 through the seventh element And 21 and the third element OR 25 is supplied to the second control output 33 of the device, which is connected to the register of the computer device.

Аналогично работает устройство и в других режимах. The device works similarly in other modes.

В режиме "2" устройство вырабатывает сигнал прерывания при совпадении адреса команды, набранного на третьем регистре 8, с адресом на регистре 39 адреса команды. Управляющий сигнал, поступающий на вход 27 устройства, проходит через элемент И 13 и элемент ИЛИ 11 на опрос третьего узла 9 сравнения. In the "2" mode, the device generates an interrupt signal when the address of the command dialed on the third register 8 coincides with the address on the register 39 of the command address. The control signal supplied to the input 27 of the device passes through the element And 13 and the element OR 11 to the survey of the third node 9 comparison.

В режиме "3" устройство вырабатывает сигнал прерывания при обращении к одному из регистров общего назначения ЭВМ, номер которого совпадает с номером, набранным на третьем регистре 8. При обращении к регистру общего назначения ЭВМ вырабатывает управляющий сигнал на входе 26, который через элемент И 14 и элемент ИЛИ 11 поступает на опрос схемы сравнения, на второй вход которой с регистра 41 через вход 31, группу элементов ИЛИ 23 поступает номер регистра общего назначения. In "3" mode, the device generates an interrupt signal when accessing one of the general-purpose registers of a computer, the number of which coincides with the number dialed on the third register 8. When accessing the general-purpose register, the computer generates a control signal at input 26, which through the And 14 element and the OR element 11 goes to the poll of the comparison circuit, the second input of which from the register 41 through the input 31, the group of OR elements 23 receives the number of the general register.

В режиме "4" устройство вырабатывает сигнал прерывания при исполнении команды перехода. На четвертом и пятом выходах управляющего регистра 7 устанавливаются разрешающие потенциалы. При выполнении команды перехода на второй вход элемента ИЛИ 10 через четвертый управляющий вход 29 устройства поступает потенциал. Выходной сигнал через элемент И 20 и элемент ИЛИ 25 поступает в систему прерывания ЭВМ. In the "4" mode, the device generates an interrupt signal when the jump command is executed. At the fourth and fifth outputs of the control register 7, resolving potentials are set. When the command is transferred to the second input of the OR element 10, a potential is supplied through the fourth control input 29 of the device. The output signal through the element And 20 and the element OR 25 enters the computer interrupt system.

Предлагаемый способ и устройство для его осуществления позволяет совмещать во времени процедуры обнаружения и локализации ошибки. При обнаружении ошибки момент ее проявления фиксируется. При этом промежуточная информация, имеющаяся в преобразователях ЭВМ на данном интервале выполнения отлаживаемых программ, также фиксируется и может быть измерена. Это позволяет уже при первом выполнении теста локализовать ошибку, либо выбрать правильную версию об источнике ошибки, настроить устройство на один из отладочных режимов и сделать первую попытку для локализации ошибки на следующем интервале. The proposed method and device for its implementation allows you to combine in time the procedure for detecting and localizing errors. If an error is detected, the moment of its manifestation is recorded. In this case, the intermediate information available in computer converters at a given interval for executing debugged programs is also recorded and can be measured. This allows you to localize the error already at the first test run, or select the correct version about the source of the error, configure the device to one of the debug modes and make the first attempt to localize the error in the next interval.

Таким образом, предлагаемый способ и устройство позволяют как минимум на один сократить количество повторов тестов при локализации ошибки. Кроме того, устройство позволяет проводить отладку без нарушения масштаба реального времени, что приближает отладку программ ЭВМ максимально к работе в реальных условиях. Тем самым предлагаемый способ и устройство для его осуществления обеспечивает повышение производительности отладки программ в 1,5-2 раза по сравнению с прототипом, взятым в качестве базового объекта. Thus, the proposed method and device allows at least one to reduce the number of test repetitions when localizing the error. In addition, the device allows debugging without disrupting the real-time scale, which brings the debugging of computer programs as close as possible to work in real conditions. Thus, the proposed method and device for its implementation provides an increase in the productivity of debugging programs by 1.5-2 times in comparison with the prototype, taken as the base object.

Claims (5)

1. Способ контроля и отладки программ реального времени, находящихся в памяти ЭВМ, основанный на измерении результатов по окончании этапа обнаружения, включающего выполнение контрольного теста на ЭВМ, локализации ошибки с помощью устройства для отладки программ на основе сравнения полученных результатов с эталонными, включающей многократное повторение выполнение контрольного теста, и, в случае локализации ошибки, ее исправлении, включающем изменение содержимого памяти ЭВМ, отличающийся тем, что производится измерение результатов в процессе обнаружения ошибки путем разбиения выполнения контрольного теста на интервалы, локализация ошибки производится на данном интервале или при выполнении последующего интервала контрольного теста на основании измерения результатов, проводимого после выполнения очередного интервала контрольного теста. 1. A method for monitoring and debugging real-time programs stored in the computer’s memory, based on measuring the results at the end of the detection phase, including performing a control test on the computer, localizing the error using a device for debugging programs based on comparing the obtained results with the reference ones, including repeated repetition performance of the control test, and, in case of localization of the error, its correction, including changing the contents of the computer memory, characterized in that the results are measured in cession detection errors by performing control partitioning test intervals, the localization error is made in this range or when the subsequent control test interval based on the results of measurement conducted after the execution of the next control test interval. 2. Способ по п. 1, отличающийся тем, что разбиение выполнения контрольного теста на интервалы производится путем прерывания контрольного теста сигналами, генерируемыми в устройстве для отладки программ. 2. The method according to p. 1, characterized in that the breakdown of the execution of the control test into intervals is carried out by interrupting the control test with the signals generated in the device for debugging programs. 3. Способ по п. 1, отличающийся тем, что, с целью сокращения времени локализации, длительность каждого интервала разбиения выбрана равной длительности основного такта обработки информации в ЭВМ (периоду тактирующих прерываний). 3. The method according to p. 1, characterized in that, in order to reduce the localization time, the duration of each partition interval is chosen equal to the duration of the main cycle of information processing in a computer (period of clock interruptions). 4. Способ по п. 1, отличающийся тем, что, с целью сохранения масштаба реального времени выполнения программ, длительность интервала разбиения и момент генерации тактирующего прерывания определяются путем подсчета времени выполнения отлаживаемых программ и времени оставшегося до выработки очередного тактирующего прерывания с учетом затрат времени на измерение результатов. 4. The method according to p. 1, characterized in that, in order to preserve the real-time scale of program execution, the duration of the partition interval and the moment of generation of the clock interrupt are determined by counting the execution time of the debugged programs and the time remaining until the next clock interrupt is generated taking into account the time spent on measurement of results. 5. Устройство для контроля и отладки программ реального времени, содержащее первый, второй и третий регистры, первый, второй и третий узлы сравнения, группу элементов ИЛИ, первый, второй и третий элементы ИЛИ, управляющий регистр, первую, вторую и третью группы элементов И, первый, второй, третий, четвертый, пятый, шестой, седьмой, восьмой элементы И и элемент НЕ, причем выходы первого и второго регистров соединены соответственно с первыми входами первого и второго узлов сравнения, первый информационный вход устройства соединен с вторыми входами первого и второго узлов сравнения, первый выход управляющего регистра соединен с первыми входами первого элемента И, первого элемента ИЛИ и первыми входами элементов И первой группы, второй выход управляющего регистра соединен с первыми входами второго элемента И, первыми входами элементов И второй группы и вторым входом первого элемента ИЛИ, третий выход управляющего регистра соединен с первым входом третьего элемента И, первыми входами элементов И третьей группы и третьим входом первого элемента ИЛИ, выход которого соединен с первым входом четвертого элемента И, четвертый выход управляющего регистра соединен с первым входом пятого элемента И, выход которого соединен с первым входом шестого элемента И, пятый выход управляющего регистра соединен с вторым входом шестого элемента И, первым входом седьмого элемента И и входом элемента НЕ, выход которого соединен с первым входом восьмого элемента И, выходы первого, второго и третьего элементов И соединены с входами второго элемента ИЛИ, выход которого соединен с управляющим входом третьего узла сравнения, выходы каждого элемента И первой, второй и третьей групп соединены с соответствующими входами элементов ИЛИ группы, выходы третьего регистра и выходы элементов ИЛИ группы соединены соответственно с первой и второй группами информационных входов третьего узла сравнения, выход которого соединен с вторым входом четвертого элемента И, выход которого соединен с вторыми входами седьмого и восьмого элементов И, выход восьмого элемента И, соединен с первым управляющим выходом устройства, выходы шестого и седьмого элементов И соединены соответственно с первым и вторым входами третьего элемента ИЛИ, выход которого соединен с вторым управляющим входом устройства, первый, второй, третий и четвертый управляющие входы устройства соединены соответственно с вторыми входами первого, второго, третьего и пятого элементов И, первый информационный вход устройства соединен с вторыми входами элементов И второй группы, второй и третий информационные входы устройства соединены с вторыми входами элементов И первой и третьей групп соответственно, отличающееся тем, что в устройство введены триггер, генератор импульсов, девятый элемент И, счетчик, регистр, элемент задержки, управляющие выходы первого и второго узлов сравнения соединены соответственно с первым и вторым входами триггера, выход триггера соединен с первым входом девятого элемента И, второй вход девятого элемента И соединен с выходом генератора импульсов, выход девятого элемента И соединен со счетным входом счетчика, выход четвертого регистра соединен с информационным входом счетчика, выход переполнения которого соединен с третьим управляющим выходом устройства и входом элемента задержки, выход элемента задержки соединен с установочным входом счетчика, второй управляющий вход устройства соединен с управляющими входами первого и второго узлов сравнения. 5. A device for monitoring and debugging real-time programs, containing the first, second and third registers, first, second and third comparison nodes, a group of OR elements, first, second and third OR elements, a control register, the first, second and third groups of AND elements , the first, second, third, fourth, fifth, sixth, seventh, eighth elements AND and the element NOT, and the outputs of the first and second registers are connected respectively to the first inputs of the first and second comparison nodes, the first information input of the device is connected to the second input mi of the first and second comparison nodes, the first output of the control register is connected to the first inputs of the first AND element, the first OR element and the first inputs of the AND elements of the first group, the second output of the control register is connected to the first inputs of the second AND element, the first inputs of the AND elements of the second group and the second the input of the first OR element, the third output of the control register is connected to the first input of the third AND element, the first inputs of the AND elements of the third group and the third input of the first OR element, the output of which is connected to the first m the input of the fourth element And, the fourth output of the control register is connected to the first input of the fifth element And, the output of which is connected to the first input of the sixth element And, the fifth output of the control register is connected to the second input of the sixth element And, the first input of the seventh element And and the input of the element NOT, the output of which is connected to the first input of the eighth AND element, the outputs of the first, second, and third AND elements are connected to the inputs of the second OR element, whose output is connected to the control input of the third comparison node, the outputs of each the AND elements of the first, second and third groups are connected to the corresponding inputs of the OR elements of the group, the outputs of the third register and the outputs of the OR elements of the group are connected respectively to the first and second groups of information inputs of the third comparison node, the output of which is connected to the second input of the fourth AND element, the output of which is connected with the second inputs of the seventh and eighth elements And the output of the eighth element And is connected to the first control output of the device, the outputs of the sixth and seventh elements And are connected respectively to the first the second and second inputs of the third OR element, the output of which is connected to the second control input of the device, the first, second, third and fourth control inputs of the device are connected respectively to the second inputs of the first, second, third and fifth elements AND, the first information input of the device is connected to the second inputs elements And the second group, the second and third information inputs of the device are connected to the second inputs of the elements And the first and third groups, respectively, characterized in that the trigger, the generator pulse count, ninth AND element, counter, register, delay element, control outputs of the first and second comparison nodes are connected respectively to the first and second inputs of the trigger, the output of the trigger is connected to the first input of the ninth element And, the second input of the ninth element And is connected to the output of the pulse generator , the output of the ninth element AND is connected to the counting input of the counter, the output of the fourth register is connected to the information input of the counter, the overflow output of which is connected to the third control output of the device and the input of the coagulant delay output of the delay element is connected to the counter input of the installation, the second control input of the device connected to the control inputs of said first and second comparing units.
SU4933054 1991-03-13 1991-03-13 Method for control and debug of real-time programs and device for its implementation RU2050588C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU4933054 RU2050588C1 (en) 1991-03-13 1991-03-13 Method for control and debug of real-time programs and device for its implementation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU4933054 RU2050588C1 (en) 1991-03-13 1991-03-13 Method for control and debug of real-time programs and device for its implementation

Publications (1)

Publication Number Publication Date
RU2050588C1 true RU2050588C1 (en) 1995-12-20

Family

ID=21572831

Family Applications (1)

Application Number Title Priority Date Filing Date
SU4933054 RU2050588C1 (en) 1991-03-13 1991-03-13 Method for control and debug of real-time programs and device for its implementation

Country Status (1)

Country Link
RU (1) RU2050588C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007075128A2 (en) * 2005-12-27 2007-07-05 Iakov Arkadievich Gorbadey Gorbadey's method for ensuring the reliable operation of the program computing means

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
1. Дж.Т.Шварц. Обзор ошибок. В кн.: Средства отладки больших систем. М.: Статистика, 1977, с.15. *
2. Бутаков Е.А. Методы создания качественного программного обеспечения ЭВМ. М.: Энергоиздат, 1984, с.175-176. *
3. Авторское свидетельство СССР N 962945, кл. G 06F 11/28, 1980. *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007075128A2 (en) * 2005-12-27 2007-07-05 Iakov Arkadievich Gorbadey Gorbadey's method for ensuring the reliable operation of the program computing means
WO2007075128A3 (en) * 2005-12-27 2007-08-16 Iakov Arkadievich Gorbadey Gorbadey's method for ensuring the reliable operation of the program computing means
US7823014B2 (en) 2005-12-27 2010-10-26 Iakov Arkadievich Gorbadey Gorbadey's method for ensuring the reliable operation of the program computing means

Similar Documents

Publication Publication Date Title
US5257358A (en) Method for counting the number of program instruction completed by a microprocessor
CN110580226B (en) Object code coverage rate testing method, system and medium for operating system level program
EP0113393B1 (en) A self-clocked signature analyser
US5610925A (en) Failure analyzer for semiconductor tester
RU2050588C1 (en) Method for control and debug of real-time programs and device for its implementation
US7089468B2 (en) Program-controlled unit and method for identifying and/or analyzing errors in program-controlled units
RU2094842C1 (en) Device which controls controller operations
RU2029986C1 (en) Monitoring device
RU2099777C1 (en) Device which searches for alternating fails in microprocessor systems
RU2011216C1 (en) Device for monitoring control computer
SU1543409A1 (en) Device for monitoring program run
SU1495799A1 (en) Signature analyser for detection of intermittent faults
JP2668382B2 (en) Pseudo fault generation method for testing microprograms
SU1267424A1 (en) Device for checking microprocessor program units
SU1280636A1 (en) Device for debugging programs
SU1363218A1 (en) Program-debugging device
SU1339569A1 (en) Device for forming interruption signal in program debugging
SU1541618A1 (en) Device for checking program execution
SU1709321A2 (en) Device for checking stability of program performance
SU1529221A1 (en) Multichannel signature analyzer
SU555354A1 (en) Logical signal discriminator
SU1252785A1 (en) Device for checking control circuits
SU1388872A2 (en) Device for registering unstable failures
SU1104521A1 (en) Device for debugging programs
SU776320A1 (en) Computing system