SU1100627A1 - Device for debugging programs - Google Patents

Device for debugging programs Download PDF

Info

Publication number
SU1100627A1
SU1100627A1 SU823476468A SU3476468A SU1100627A1 SU 1100627 A1 SU1100627 A1 SU 1100627A1 SU 823476468 A SU823476468 A SU 823476468A SU 3476468 A SU3476468 A SU 3476468A SU 1100627 A1 SU1100627 A1 SU 1100627A1
Authority
SU
USSR - Soviet Union
Prior art keywords
input
control
output
inputs
unit
Prior art date
Application number
SU823476468A
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 SU823476468A priority Critical patent/SU1100627A1/en
Application granted granted Critical
Publication of SU1100627A1 publication Critical patent/SU1100627A1/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

УСТРОЙСТВО ДЛЯ ОТЛАДКИ ПРОГРАММ , содержащее наладёчный блок пам ти, блок управлени , блок формировани  адреса и регистр режима, причем информационные вход и выход устройства через шину данных соединены соответственно с входом и выходами данных наладочного блока пам ти и блока управлени , адресные входы наладочного блока пам ти и блока формировани  адреса образуют входную адресную шину устройства, управл ющие, входы наладочного блока пам ти, блока управлени  и регистра режима образуют управл ющую шину устройства,выход регистра режима соединен с входом режима блока управлени , отличиющ е е с   тем, что, с целью расширени  функциональных возможностей устройства за счет наращивани  сервисных операций, в устройство введен блок отображени  Kn optjiaiifm причем первый, второй. Третий и четверть1|й выходы блока правлени  соединены соответственно с первым, вторым, третьим входами блока Формировани  адреса и упрЪ  ющим выходом разрешени  выборки основной пам ти устройства, третий выход блока управлени  соединен с управл ющими входами наладочного блока пам ти и блока отображени  информации, шина данных устройства соединена с входом и выходом данных блока формировани  адреса и с первыми входами блока отображени  информации , управл юща  шина устройства соединена с вторым входом блока отображени  информации, причем блок управлени  содержит п ть триггеров, команды перехода, группу элементов И, шесть элементов И-НЕ, первый, второй и третий дешифраторы, О) элемент ИЖ-НЕ и элемент НЕ, причем первый разр д управл ющего входа блока соединен с D-входом первого триггера , с первыми входами первого и второго элементов И-НЕ, второй разр д управл ющего входа блока соединен с вторыми входами первого и второго элементов И-НЕ и с входом синхронизации первого триггера, третий разр д управл кицего входа блока соединен с входом синхронизации второго тригге- , ра и через элемент НЕ с управл ющими входами третьего, четвертого, п того и шестого элементов И-НЕ, четвертый разр д управл ющего входа блока соединен с входами установки нул  второго и третьего триггеров и с первым входом элемента ИЛИ-НЕ, выход которого соединен с входом установки нул  четвертого триггера, вход данных блока соединен с информационными входами первогои второго дешифраторов, вы , ходы которых соединены соответственно сГ -входами четвертого триггера иDEVICE FOR DEBUGGING PROGRAMS containing a fixing memory block, a control block, an address generation block and a mode register, where the information input and output of the device are connected via a data bus to the input and data outputs of the adjusting memory block and the control block, the address inputs of the adjusting memory block These and address generation units form the device’s input address bus, the control, the inputs of the memory setup unit, the control unit, and the mode register form the device control bus, the register output the mode is connected to the input of the control unit mode, distinguishing it from the fact that, in order to expand the functionality of the device by increasing service operations, the display unit has been entered into the unit Kn optjiaiifm with the first, second. The third and quarter 1 | th outputs of the control unit are connected respectively to the first, second, third inputs of the Address Formation block and the control output of the device’s main memory access resolution, the third output of the control unit is connected to the control inputs of the setup memory block and the display unit, bus device data is connected to the input and output of the data of the address generation unit and to the first inputs of the information display unit, the control bus of the device is connected to the second input of the information display unit and, the control unit contains five triggers, transition commands, a group of AND elements, six AND-NOT elements, the first, second and third decoders, O) the IL-NOT element and the NOT element, the first bit of the control input of the block is connected to The D input of the first trigger, with the first inputs of the first and second AND-NOT elements, the second bit of the control input of the block is connected to the second inputs of the first and second elements of the AND-NO and the synchronization input of the first trigger, the third bit of the control input of the block is connected with sync input second the trigger- and through the element NOT with the control inputs of the third, fourth, fifth and sixth elements AND-NOT, the fourth bit of the control input of the block is connected to the inputs of the zero setting of the second and third triggers and to the first input of the element OR NOT, the output of which is connected to the input of setting zero of the fourth trigger, the data input of the block is connected to the information inputs of the first and second decoders, you, whose paths are connected respectively with SG by the inputs of the fourth trigger and

Description

с первым входом шестого элемента ИНЕ , вход режима блока управлени  соединен с третьими входами первого и второго элементов И-НЕ, выход первого триггера соединен с первым управл ющим входом первого дешифратора, с управл ющим входом второго дешифратора , выход второго триггера соединен с входом третьего элемента И-НЕ, выход которого соединен с управл ющими входами элементов И группы, единичный выход третьего триггера соединен с первым входом четвертого элемента , с первым входом третьего дешифратора, с четвертым входом второго элемента И-НЕ, с вторым управл ющим входом первого дешифратора с входом п того элемента И-НЕ и вторым входом шестого элемента И-НЕ, Нулевой выход третьего триггер а соединен с четвертым входом первого элемента И-НЕ, выход которого соединен с единичными входами второго иwith the first input of the sixth INE element, the mode input of the control unit is connected to the third inputs of the first and second AND-NOT elements, the output of the first trigger is connected to the first control input of the first decoder, to the control input of the second decoder, the output of the second trigger is connected to the input of the third element NAND, the output of which is connected to the control inputs of the AND elements of the group, the unit output of the third trigger is connected to the first input of the fourth element, to the first input of the third decoder, to the fourth input of the second element This AND-NOT, with the second control input of the first decoder with the input of the fifth element AND-NOT and the second input of the sixth element AND-NOT, Zero output of the third trigger and connected to the fourth input of the first element AND-NOT, the output of which is connected to single inputs second and

третьего триггеров,,- с вторым входом элемента ИЛИ-НЕ и  вл етс  первым выходом блока, выход четвертого триггера соединен с вторым входом третьего дешифратора, с входом синхронизации третьего триггера и вторым входом четвертого элемента И-НЕ, выход которого  вл етс  вторым выходом блока, выход п того триггера соединен с третьим входом третьего дешифратора, первый и второй выходы которого  вл ютс  соответственно третьим и четвертым выходами блока, выходы п того и шестого элементов И-НЕ соединены соответственно с входами синхронизации четвертого и п того триггеров, выход второго элемента И-НЕ соединен с третьим входом элемента ИЛИ-НЕ и единичным вьпсодом п того триггера, выход регистра команды перехода соединен с информационными входами элементов И группы, выходы которых соединены с выходом да:нных блока.the third trigger, - with the second input of the element OR NOT and is the first output of the block, the output of the fourth trigger is connected to the second input of the third decoder, with the synchronization input of the third trigger and the second input of the fourth AND-NOT element, the output of which is the second output of the block , the output of the fifth trigger is connected to the third input of the third decoder, the first and second outputs of which are respectively the third and fourth outputs of the block, the outputs of the fifth and sixth elements AND-NOT are connected to the synchronization inputs fourth and fifth flip-flops, an output of second AND-NO element is connected to the third input of OR-NO element and the fifth unit vpsodom trigger branch instruction register output is connected to information inputs of the AND group whose outputs are connected to the output yes: nnyh block.

Иэобретение относитс  к вычислительной технике и может бьтп использовано дл  отладки программ и тестировани  микропроцессорных систем. . . Известно устройство дл  отладки программ, содержащее блок управлени , блок переключени  с запоминающим устройством, блок приема и вывода информации, блок контрол  и регистр дешифратора t1.The invention relates to computing and can be used to debug programs and test microprocessor systems. . . A device for debugging programs is known comprising a control unit, a switching unit with a memory device, an information receiving and receiving unit, a control unit and a decoder register t1.

Но известное устройство обладает узкими функциональными возможност ми, так как отлаживающие программы вход т в объем основной пам ти oтлaживae oй системы.But the known device has narrow functionality, since the debugging programs are included in the main memory of the corresponding system.

Известно также устройство дл  отладки микропроцессорных систем, содержащее блок пам ти, общий дл  устройства и отлаживаемой системы, коммутатор информационных шин, блок управлени , св занный с шинами управлени  отлаживаемой системы L23.It is also known a device for debugging microprocessor systems comprising a memory block, common to the device and the system being debugged, an information bus switch, a control block associated with the control buses of the debugging system L23.

Устройство позвол ет производить отладку программы системы в различных режимах, однако  вл етс  достаточно сложным, так как включает в себ  собственный микропроцессор с соответствующим оборудованием. Кроме того.The device allows debugging of the program of the system in various modes, however, it is rather complicated as it includes its own microprocessor with the appropriate equipment. Besides.

данное уст зойство переводит систему в отладки по сигналу прерывани , что посто нно требует соответствующего режима отлаживаемой системы.This device translates the system into debugs by an interrupt signal, which constantly requires an appropriate mode of the system being debugged.

Наиболее близким к изобретению по технической сущности  вл етс  устройство дл  отладки программ, содержащее наладочный запоминающийThe closest to the invention to the technical essence is a device for debugging programs, containing a setup memory

блок, соединенный информационным входом и выходом с первым выходом и входом блока приема и вьщачи чисел и команд второй выход которого  вл етс  информационнымвыходом устройства , блок формировани  адреса, соединенньй выходом с адресным входом наладочного запоминающего блока, а первым входом - с адресным входом устройства, и блок управлени , перfibie вход и выход которого  вл ютс  входом команды обращени  и выходом команд устройства, а второй выход подключен ко входу обращени  наладочного запоминающего блока. Устроиство содержит также регистр режима програм, входы которого  вл ютс  управл ющими, а выход подключен ко второму входу блока управлени  СЗ. .Недостатком прототипа  вл етс  необходимость наличи  разрешени  пре рывани  на участке отлаживаемой прог раммы, принадлежность пол  адресов пам ти,, хран щей наладочные программ к множеству адресов основной пам ти отлаживаемой системы. Последнее ограничивает функциональные возможности как по расширению наладочных прог рамм, faK и по разрешенному объему основной пам ти. изобретени  - расширение функциональных возможностей системы за счет наращивани  сервисных операций программным путем. Поставленна  цель достигаетс  тем что в устройство дл  отладки програм содержащее наладочный блок пам ти, блок управлени , блок формировани  адреса и регистр режима, причем информационные вход и выход устройства через шину данных соединены соответственно с входом и выходами данных наладочного блока пам ти и блока управлени , адресные входы наладочного блока пам ти и блока формировани  адреса образуют входную адресную шину устройства, управл ющие входы наладочного блока пам ти, блока управл ни  и регистра режима образуют управ л ющую шину устройства, выход регист ра режима соединен с входом режима блока управлени , введен блок отображени  информации, причем первый, второй, третий и четввртьй выходы блока управлени  соединены соответст венно с первым, вторым, третьим входами блока формировани  адреса и управл ющим вькодом разрешени  выбор ки основной пам ти устройства, третий выход блока управлени  соединен с управл ющими входами наладочного блока пам ти и блока отображени  информации, шина данных устройства соединена с входом и выходом данных блока формировани  адреса и с первыми входами блока отображени  информа ции, управл юща  шина устройства сое динена с вторым входом блока отображени  информации, причем блок управлени  содержит п ть триггеров, регистр команды перехода, группу элементов И, шесть элементов И-НЕ, первый , второй и третий дешифраторы,, элемент ИЛИ-НЕ.и элемент НЕ, причем первый разр д управл ющего блока первый разр д управл ющего входа блока соединен с D -входом первого триггера, с первыми входами первого 1 274 и второго элементов И-НЁ, второй разр д управл ющего входа блока соединен с вторыми входами первого и второго элементов И-НЕ и с входом синхронизации первого триггера, третий разр д управл ющегс- входа блока соединен с входом синхронизации второго три1тера и через элемент НЕ с управл ющими входами третьего, четвертого , п того и шестого элементов И-НЕ, четвертый разр д, управл ющего входа блока соединен с входами установки нул  второго и третьего триггеров и с первым входом элемента ИЛИ-НЕ, выход которого соединен с входом установки нул  четвертого триггера, вход данньк блока соединен с информационными входами первого и второго дешифраторов , вькоды которых соединены соответственно с Б -входами четврртото триггера и с первым входом шестого элемента И-НЕ, вход режима блока управлени  соединен с третьими входами первого и второго элементов И-НЕ, выход первого триггера соединен с первым управл ющим входом первого дешифратора, с управл ющим входом второго дешифратора, выход второго триггера соединен с входом третьего элемента И-НЕ, выход которого соединен с управл ющими входами элементов И группы, единичньй выход третьего триггера соединен с первым входом четвертого элемента И-НЕ, с первым входом третьего дешифратора, с четвертым входом второго элемента И-НЕ, с вторым управл ющим входом первого дешифратора, с входом п того элемента И-НЕ и вторым входом шестого элемента И-НЕ, нулевой выход третьего триггера соединен с четвертым входом первого элемента И-НЕ, выход которо-. го соединен с единичными входами второго и третьего триггеров, с вторым входом элемента ИПИ-НЕ и  вл етс  первым выходом блока, вькод четвертого триггера соединен с вторым входом третьего дешифратора, с входом синхронизации третьего триггера и вторым входом четвертого элемента И-НЕ, выход которого  вл етс  вторым выходом блока, выход п того триггера соединен с третьим входом третьего дешиф- ратора, первый и второй выходы кото- . рого  вл ютс  соответственно третьим и четвертым выходами блока, выходы п того и шестого элементов И-НЕ соединены соответственно с входами синхронизации четвертого и п того тригге- ров, выход второго элемента И-НЕ сое динен с третьим входом элемента ИЛИНЕ и единичным выходом п того тригге ра, выход регистра команды переходи соединен с информационными входами элементов И группы, выходы которых соединеньГ с выходом данных блока. Сущность изЬбретени  заключаетс  в том, что при переходе в режим отладки адрес очередной команды, извле ченной микропроцессором из основной пам ти дл  выполнени , запоминаетс  в блоке формировани  адреса, а код ее на шинах данных элементов замен етс  с помощью блока управлени  на код команды перехода к. определенному участку программы наладочйого блока пам ти (НБП). Поскольку одновременно блок управлени  устройства разрешает работу наладочного запоминающего блока и запрещает работу основной пам ти процессора то тем самым обеспечиваемс  переход к вьтолне нию программы отладки записанной в НБП. Возвращение к продолжению выполне ни  программы основной пам ти происходит по соответствующему указанию О7 регистра режима согласно адресу, хран щемус  в блоке формировани  адреса , и сопровождаетс  обратным пере ключением блоков пам ти. Такое решение устройства приводит к Tofty, что поле адресов пам ти наладочного блока пам ти не может совпадать с полем адресов памйти отлаживае1 ой Микропро цессорной системы, и переход процессора из рабочего режима в режим отла ки (теста) не требует наличи  разрешени  прерьшани , а увеличение набора сервисных операций св зано лишь с увеличением подпрограмм в НБП. Кажда  из подпрограмм отладки, записанных в НЁП, начинаетс  с сохра нени  слова состо ни  микропроцессора и содержимого его внутренних регистров , а перед возвратом к основно программе происходит восстановление этих параметров. Результаты работы отладочной (тестовой) операции вьгоод тс  на блок отображени , также управл емого программой в НБП. Таким образом, контролируема  мик ропроцессорна  система, остава сь в автоматическом режиме работы, может обеспечить на любом участке програм мы как автоматическое, так и покоманд ное выполнение основной программы, смену программ, чтение и запись по любому адресу основной пам ти, чтение слов состо ни  программы на каждом шаге отладки, автоматический ввод и вывод участков основной программы с помощью технических средств и т.д. При этом только путем наращивани  прогjpaMMHoro обеспечени  в НБП можно полу чить широкий спектр сервисных операций в объеме полной пам ти, адресуе ой микропроцессором, без ограничений на объем.и содержание сглаживаемой программы, наход щейс  в основнЬй пам ти. На фиг. 1 представлена структурна  схема устройства дл  отладки про раммг на фиг. 2 - функциональна  схема блока управлени ; на фиг. 3 таблица истинности дешифратора блока управлени } на фиг. 4 - функциональна  схема блока формировани  адреса; на фиг. 5 - функциональна  схема регистра режима| на фиг. 6 - функциональна  схема наладочного блока пам ти, на фиг. 7 - функциональна  схема блока отображени  информации; на фиг, 8 - временна  диаграмма работы блока управлени  при переходе из основной программы в работу с НБП; на фиг. 9 - структура программного обеспечени , записанного с НБП; на фиг. 10 - временна  диаграмма работы блока управлени  при вьтолнении ,ко манд чтени  и записи, на фиг. 11 временна  диаграмма работы блока управлени  при выходе в основную программу. Предлагаемое устройство (фиг. 1) состоит из блока 1 управлени , соединенного двусторонней св зью,с шиной данных, с блоком 2 формировани  адреса , наладочным блоком пам ти 3, блоком 4 отображени  информации,регистром 5 режима и щинами управлени . К щи-, нам данных присоединены также блоки 2-5, а блоки 2 и 4 подсоединены также к адресным шинам контролируемой микропроцессорной системы. Кроме того , блок управлени  св зан с входом разрешени  выборки основной пам ти микропроцессора, а также входами разрешени  выборки блоков 2, 3 и 4. , На фиг. 2 изображена функциональна  схема блока управлени , представ ющего собой автомат, содержащий п ть триггеров 6-10, шесть элементов И-НЕ 11-16, элемент НЕ 17, элемент ИЛИ-НЕ 18, дешифратор 19.1 (кода команды возврата), дешифратор 19.2 (кода команды обращени  к пам ти), группу элементов И 20, регистр 21 команды перехода и дешифратор 22, таблица истинности которого представлена на фиг. 3. На фиг. 4 изображена функциочальна  схема блока 2 формировани  адреса , представл ющего собой регистр 23 пам ти, входной г-гультиплексор 24, под ключающий на вход регистра 23 шину адреса или шину данных, и выходной набор трехстабильных ключей 25. На фиг. 5 изображена функциональна  схема регистра 5 режима,представл юща  собой многоразр дный регистр 26, на входы которого поступают управ л ющие воздействи , определ ющие режим работы и тип обслуживающей опера ции, а также набор трех стабильных ключей 27, подсоединенный к шине данных. На фиг. 6 изображена функциональна  схема наладочного блока 3 пам ти , построенного по изве,стной схеме с применением элементов пам ти ОЗУ и ПЗУ на интегральных схемах. Элементы 28 28 представл ют собой подмножество элементов ОЗУ, необходимых дл  работы отладочных программ, записанных в ПЗУ на элементах 29 -29 Дешифратор 30 адреса имеет вход разре шени  выборки, св занный с выходом Ъ; блока 1. Св зь с шиной данных (ШД) микропроцессора осуществл етс  через двунаправленный буфер 31. Блок А сопр гаетс  с микропроцессо ром, как стандартное внешнее устройство через шины данных, адреса и управлени . В качестве отображающего г модул  могут быть использованы различные устройства, например стандартна  индикаторна  панель ПИУ-2. Струк турна  схема блока 4 показана на фиг, 7. В него вход т регистр 32 и модуль отображени  33. Устройство работает следующим обр зом. В исходном состо нии на выходе Ъ блока управлени  1 единичный сигнал запрета НБП, а на выходе bg нулевой потенциал разрешени  выборки основно пам ти. Микропроцессор работает в ав томатическом режиме. Подключенное устройство не создает помех нормальному функционированию микропроцессор ной системе. Сигнал начала режима от ладки поступает в форме единичного уровн  с выхода с регистра режима на вход dj блока 1 управлени . По этому сигналу в цикле выборки микророцессором очередной команды из основной пам ти элементом И-НЕ 11 блока управлени  1 вырабатываетс  сигнал, KOTojJhrt по Ъ, ,j, передаетс  на eJj блока 2 форьшровани  адреса вход как сигнал записи ачреса  чейки основной пам ти, из которой должна быть счшана очередна  команда. При отсутствии сигнала разрешени  на выходе Ъ блока.1, соединенного с входом 3 блоха 2 зерез мультиплексор 24, на вход регистра 23 подключена шина адреса. В результате в регистре 23 блока 2 оказываетс  записанным соответствующий адрес. Одновременно с этим устанавливаютс  в t триггеры 7 и 8 и переключаетс  сигнал разрешени  выборки пам ти с 15ыхода Ъу на .Ь4 блока 1. С приходом от шины управлени  по входу « сигнала блок 1 -выдает через элемент И-НЕ 13 по входу Ъ на шину данных код команды перехода к начальной области пам ти блока 3, котора  в последующего циклах вьтолн етс  микропроцессором . Задним фронтом сигнала fhi сбрасываетс  триггер 7. Временна  диаграмма работы блока 1 на этапе перехода в режим отладки показана на фиг, 8. Таким образом, устройство переводит микропроцессор в режим работы с отладочной программой, записанной в элементах ПЗУ.наладочного блока 3 пам ти. Структура отладочной программы показана на фиг. 9. Программа .начинаетс  с запоминани  слова состо ни  процессора и содержани  внутренних регистров, затем по коду режима, считанного с регистра 5 режима, осуществл етс  переход к тому или иному модулю (подпрограмме) сервисного обслу- живани  (N -N), среди которых могут быть операции Пуск, Чтение регистров , Фотоввод, Чтение из пам ти , Запись в пам ть, Тест и т.д. Количество этих модулей, т.е. объем пам ти НБП, ограничено только возможност ми адресации микропроцес-, сора, так как в общем виде объем НБП может быть равен полному объему основной пам ти микропроцессорной системы . Все модули (подпрограммы) сервисного обслуживани , за исключением модул  Пуск, о.беспечивают переход на модуль обслуживани  блока отображени , куда вывод тс  результаты операции. Затем программа переходит снова к модулю опроса регистра режима 5, ожида  нового указани . Только после выполнени  указани  Пуск осуществл етс  восстановление регистров и слова состо ни  основной программы и переход к работе с основной j пам тью. Отдельно остановимс  на работе устройства в режиме обращени  (чтени /записи) к основной пам ти. Модули (подпрограммы) НБП, реализующие операции чтени /записи в основ- fo ную пам ть, используют непосредственно дл  реализации операции чтени /записи по одной из модификаций команд чтени /записи, которые не должны быть использованы в НБП. дл  других целей, tf С приходом кода команд (обращени  к пам ти на шину данных (вход а,, блока Т управлени ) срабатывает дешифратор 19. 2 кода этих команд, и по заднему фронту сигнала через эле- 20 мент И-НЕ 16 включаетс  триггер 10, что вызьгоает, согласно таблице (фиг. 3), обратное переключение сигналов разрешени  выборки основной пам ти и НБП (выходы Ъ, у « 25a unit connected by information input and output to the first output and input of the receiving and sending numbers and commands, the second output of which is the information output of the device, the address generation unit connected to the address input of the setup memory block, and the first input to the address input of the device, and a control unit, the input and output of which are the input of the access command and the output of the device commands, and the second output is connected to the access input of the setup memory block. The facility also contains the program mode register, whose inputs are control, and the output is connected to the second input of the SOC control unit. The disadvantage of the prototype is the need for resolving the interruption in the debugging program area, the belonging of the field of memory addresses, which stores the setup programs to the set of addresses of the main memory of the system being debugged. The latter limits the functionality of both the expansion of the setup programs, the faK, and the allowed amount of main memory. the invention is the expansion of the functionality of the system by increasing service operations programmatically. This goal is achieved by the fact that a device for debugging a program contains a setup memory block, a control block, an address generation block and a mode register, the information input and output of the device being connected via a data bus to the input and data outputs of the setup memory block and the control block, the address inputs of the setup memory and the address generation unit form the input address bus of the device, the control inputs of the setup memory unit, the control unit and the mode register form the control The device bus, the output of the mode register is connected to the mode input of the control unit, the information displaying unit is entered, the first, second, third and fourth outputs of the control unit are connected to the first, second, third inputs of the address generation unit and the control resolution code respectively device memory, the third output of the control unit is connected to the control inputs of the setup memory block and the information display unit, the device data bus is connected to the input and output data of the forming unit addresses and with the first inputs of the information display unit, the control bus of the device is connected to the second input of the information display unit, the control unit contains five flip-flops, a transition command register, a group of AND elements, six AND-NOT elements, the first, second and third decoders ,, element OR NONE. and element NOT, and the first discharge of the control unit the first discharge of the control input of the unit is connected to the D input of the first trigger, with the first inputs of the first 1,274 and second AND elements, the second discharge control input block Inen with the second inputs of the first and second elements AND-NOT and with the synchronization input of the first trigger, the third discharge of the control input of the block is connected to the synchronization input of the second triple and through the element NOT with the control inputs of the third, fourth, fifth and sixth elements AND - NOT, the fourth bit, the control input of the block is connected to the inputs of the zero setting of the second and third triggers and the first input of the OR-NOT element, the output of which is connected to the input of the zero setting of the fourth trigger, the input of the data block is connected to the information the inputs of the first and second decoders, the codes of which are connected respectively to the B-inputs of the four trigger and to the first input of the sixth AND-NOT element, the mode input of the control unit is connected to the third inputs of the first and second elements of the IS-NE, the output of the first trigger is connected to the first control the input of the first decoder, with the control input of the second decoder, the output of the second trigger is connected to the input of the third AND-NOT element, the output of which is connected to the control inputs of the AND elements of the group, the unit output of the third trigger inen with the first input of the fourth NAND element, with the first input of the third decoder, with the fourth input of the second NAND element, with the second control input of the first decoder, with the input of the fifth NAND element and the second input of the sixth AND NAND element, the zero output of the third trigger is connected to the fourth input of the first NAND element, the output of which is. It is connected to the single inputs of the second and third flip-flops, with the second input of the IPN-NOT element and is the first output of the block, the code of the fourth trigger is connected to the second input of the third decoder, the synchronization input of the third trigger and the second input of the fourth AND-NOT element, the output of which is the second output of the unit, the output of the fifth trigger is connected to the third input of the third decoder, the first and second outputs of which are. The third and fourth outputs of the unit are NOT – are connected to the synchronization inputs of the fourth and fifth triggers, the output of the second AND – NE element is connected to the third input of the ILINE element and the single output of the fifth the trigger, the output of the command transition register is connected to the information inputs of the AND elements of the group, the outputs of which are connected to the data output of the block. The essence of the matter is that when going into debug mode, the address of the next command extracted by the microprocessor from the main memory for execution is stored in the address generation unit, and the code on the data buses of the elements is replaced with a specific part of the program of the adjustment memory block (NBP). Since at the same time the control unit of the device permits the operation of the setup memory block and prohibits the operation of the main memory of the processor, thus ensuring the transition to the execution of the debugging program recorded in the NBP. The return to the continuation of the execution of the program of the main memory occurs according to the corresponding instruction O7 of the mode register according to the address stored in the address generation unit, and is followed by the reverse switching of the memory blocks. Such a solution of the device leads to the Tofty that the memory address field of the setup memory block cannot coincide with the memory address field of the Microprocessor-based debugging of the Microprocessor system, and the transition of the processor from the working mode to the fix mode (test) does not require the resolution of the fault, but increasing the set of service operations is associated only with an increase in subroutines in the NBP. Each of the debugging routines written to the LEP begins with the preservation of the microprocessor state word and the contents of its internal registers, and before returning to the main program, these parameters are restored. The results of the debugging (test) operation on the display unit, also controlled by the program in the NBP. Thus, a microprocessor controlled system, remaining in the automatic mode of operation, can provide on any part of the program both automatic and command execution of the main program, program change, reading and writing to any address of the main memory, reading the state words programs at each debugging step, automatic input and output of sections of the main program using technical tools, etc. At the same time, only by building up the software in the NBP it is possible to obtain a wide range of service operations in the amount of full memory addressed by the microprocessor, without restrictions on the volume and content of the program being smoothed, which is in the main memory. FIG. 1 is a block diagram of the debugging device of FIG. 2 is a functional block diagram of the control unit; in fig. 3 the truth table of the decoder of the control unit} in FIG. 4 is a functional diagram of an address generation unit; in fig. 5 - functional register mode register | in fig. 6 is a functional diagram of an adjustment memory block; FIG. 7 is a functional diagram of the information display unit; Fig. 8 is a timing diagram of the operation of the control unit when moving from the main program to the work with the NBP; in fig. 9 shows the structure of software recorded from the NBP; in fig. 10 is a timing diagram of the operation of the control unit in the execution, read and write command; FIG. 11 time diagram of the operation of the control unit when entering the main program. The proposed device (Fig. 1) consists of a control unit 1 connected by two-way communication with a data bus, an address generation unit 2, a setup memory unit 3, an information display unit 4, a mode register 5 and control ladders. To shchi-, data blocks are also attached to us 2-5, and blocks 2 and 4 are also connected to the address buses of a controlled microprocessor system. In addition, the control unit is connected to the microprocessor main memory sample enable input, as well as the sample enable inputs of blocks 2, 3, and 4. In FIG. 2 shows a functional block diagram of the control unit, which is an automaton containing five triggers 6-10, six elements AND-NO 11-16, element NOT 17, element OR-NOT 18, decoder 19.1 (return command code), decoder 19.2 ( memory access command code), a group of elements AND 20, a transition command register 21 and a decoder 22, the truth table of which is shown in FIG. 3. In FIG. 4 shows a functional block diagram of an address generation unit 2, which is a memory register 23, an input r -multiplexer 24, which connects an address bus or a data bus to the input register 23, and an output set of three-stable keys 25. FIG. 5 shows a functional diagram of the register 5 of the mode, which is a multi-bit register 26, the inputs of which receive control actions that determine the mode of operation and the type of serving operation, as well as a set of three stable switches 27 connected to the data bus. FIG. 6 shows a functional diagram of a setup memory block 3 built according to a known circuit using RAM and ROM memory elements on integrated circuits. Elements 28-28 are a subset of the RAM elements necessary for the operation of the debugging programs recorded in the ROM on the elements 29-29. The address decoder 30 has a sample enable input associated with the output b; unit 1. Communication with the microprocessor data bus (SM) is via bi-directional buffer 31. Block A is interfaced with the microprocessor as a standard external device via data, address and control buses. Various devices can be used as a display module g, for example, a standard display panel ПИУ-2. The structure of the block 4 is shown in FIG. 7. It includes a register 32 and a display module 33. The device operates as follows. In the initial state at the output b of the control unit 1 there is a single NBP prohibition signal, and at the output bg there is a zero potential for resolving the sample of the main memory. The microprocessor operates in automatic mode. A connected device does not interfere with the normal operation of the microprocessor system. The signal of the start of the mode from the frame arrives in the form of a single level from the output from the mode register to the input dj of control unit 1. This signal in the next-instruction microprocessor cycle from the main memory by the I-NE unit 11 of the control unit 1 produces a signal, KOTojJhrt along b, j, is transmitted to the eJj of the forcing of the address input as a recording signal of the frequency of the main memory from which Should be next team. In the absence of a permission signal at output b of block 1, connected to input 3 of a flea 2 through a multiplexer 24, an address bus is connected to the input of register 23. As a result, the corresponding address is recorded in register 23 of block 2. Simultaneously, the triggers 7 and 8 are set to t and the memory sample enable signal is switched from 15th output b to Ь4 of block 1. With the arrival of a control signal on the input "signal, block 1 sends through the IS-NE 13 input b to the bus The data is the code of the transition command to the initial memory area of block 3, which is executed by the microprocessor in subsequent cycles. The falling edge of the signal fhi is reset by trigger 7. The timing diagram of the operation of block 1 during the transition to debug mode is shown in FIG. 8. Thus, the device places the microprocessor in the mode of operation with a debugging program recorded in the ROM of the setup memory 3. The structure of the debugging program is shown in FIG. 9. The program begins with memorizing the processor status word and the contents of the internal registers, then, using the mode code read from mode register 5, it goes to one or another module (subroutine) of service maintenance (N -N), among which There may be Start, Read registers, Photo drive, Read from memory, Write to memory, Test, etc. The number of these modules, i.e. the size of the NBP memory is limited only by the microprocessor and coping addressing capabilities, since in general the NBP volume can be equal to the total volume of the main memory of the microprocessor system. All service modules (subroutines), with the exception of the Start-up module, provide the transition to the service module of the display unit, where the results of the operation are output. The program then goes back to the polling module of the mode register 5, waiting for a new indication. Only after the execution of the Start instruction, the registers and the word of the state of the main program are restored and the transition to working with the main j memory is performed. Separately, we stop the operation of the device in the read / write mode of the main memory. NBP modules (subprograms) that implement read / write operations to the main memory are used directly to implement a read / write operation on one of the modifications of read / write commands that should not be used in the NBP. for other purposes, tf With the arrival of a command code (memory accesses to the data bus (input a, control unit T)) the decoder 19 is triggered. 2 codes of these commands, and on the falling edge of the signal through the IS-NE element 16, turns on trigger 10, which indicates, according to the table (Fig. 3), the reverse switching of the resolution signals of the main memory and the NBP (outputs b, for "25

Временна  диаграмма работы блока 1 при обращении к основной пам ти при; ведена на фиг. 10. Обратное переключение , т.е. возврат к работе с НБП, происходит с приходом признака выбор-зо ки очередной команды. Таким образом, устройство обеспечиват выборку команды чтени  из Н-БП, а исполнение операционной части команды чтени /записи с подключенной основной пам тью. The timing diagram of the operation of unit 1 when accessing the main memory at; shown in FIG. 10. Reverse switching, i.e. the return to work with the NBP takes place with the arrival of the sign of the choice of the next team. Thus, the device provides sampling of the read command from the N-PSU, and execution of the operating part of the read / write command with the connected main memory.

Переход к вьтолнению программ основной пам ти процессора также осуществл етс  по коду, считанному с регистра режима (код операции пуск). Перейд  к соответствующему модулю о (подпрограмме) в НБП (фиг. 3), микропроцессор выполн ет одну из модификаций команды возврата, котора   вл етс  запрещенной в других участках пам ти НБП. Временна  диаграмма рабо-45 ты блока управлени  по переходу к работе с основной пам тью показана на фиг. 11. С приходом в цикле выборки команды кода указанной модификации на вход «3 блока 1 управлени  срабатывает дешифратор 19.1 и по заднему фронту сигнала rtri включаетс  триггер 9. При этом согласно логике дешифратора-22 блока 1 (фиг. 3) снимаетс  разрешение с выходов Ь4 Ц 45 блока 1. И во врем  исполнени  операционной части команды возврата на элементе 14 форштруетс  импульс вьщачи на шину данных адреса перехода , хранимого в блоке 3 формировани  адреса. Этот импульс с выхода ч блока 1 поступает на вход cfj блока 3 и разрешает вьвдачу на ШД кода из регистра 23, которьй считываетс  микропроцессором и определ ет адрес следующей выполн емой команды.С приходом очередного признака выборки команды сигналом с выхода элемента ИЛИНЕ 18 выключаютс  последовательно триггеры 9 и 8, что согласно логике работы дешифратора 22 определ ет разрешение выборки основной пам ти ) и запрещение выборки НБП l . На этом переход к выполнению отлаживаемой программы завершаетс .The transition to the execution of the processor's main memory programs is also carried out according to the code read from the mode register (start operation code). Moving to the corresponding module o (subroutine) in the NBP (Fig. 3), the microprocessor performs one of the modifications of the return command that is prohibited in other parts of the NBP memory. The timing diagram of the operation of the control unit for switching to main memory is shown in FIG. 11. With the arrival in the sampling cycle of the command code of the specified modification to the input 3 of control block 1, the decoder 19.1 is triggered and the trigger is activated on the rising edge of the rtri signal 9. In this case, according to the logic of the decoder-22 of block 1 (Fig. 3), the resolution is removed from the outputs of L4 D 45 of block 1. And during the execution of the operational part of the return command, the pulse 14 will force a pulse on the data bus of the transition address stored in block 3 of the formation of the address. This pulse from the output of block 1 enters the input cfj of block 3 and enables the transfer of the code from register 23 to the SD, which is read by the microprocessor and determines the address of the next command to be executed. With the arrival of the next indication of the command selection, the signal from the output of the element ILINE 18 is switched off sequentially by the trigger 9 and 8, which, according to the logic of operation of the decoder 22, determines the resolution of the sampling of the main memory and the prohibition of the NBP sampling l. At this point, the transition to executing the program being debugged is completed.

Предложенное устройство позвол ет производить процесс отладки программных и программно-аппаратных средств, работающих под управлением микропроцессоров. Отладка может осуществл тьс  с помощью широкого набора отладочных операций. Расширение и изменение отладочных функций .не требует увеличени  или изменени  ;аппаратных средств в устройстве, а лишь увеличени  или изменени  программного обеспечени , записанного в НБП. Емкость НБП может быть увеличена до объема всей пам ти, адресуемой микропроцессором. При этом переход в режим отладки не требует ограничений на содержание программы (например , разрешени  прерьгоани ) в основной пам ти микропроцессорной системы. Кроме того, отлаживаема  микропроцессорна  система может не иметь аппаратных средств работы в шаговом режиме и средств индикации. Даже наход сь посто нно в автоматическом режиме работы , микропроцессор с помощью предложенного устройства может обеспечить пошаговое выполнение программы и индикацию всей необходимой наладочной информации. С учетом указанных возможностей предложенное устройство позвол ет повысить эффективность процесса отладки и дает возможность испольэовать его в качестве простого переносного пульта дл  отладки, контрол  и диагностики микропроцессорных систем.The proposed device allows for the process of debugging software and hardware and software operating under microprocessor control. Debugging can be done using a wide range of debugging operations. Expanding and modifying debugging functions does not require an increase or change in the hardware in the device, but only an increase or change in the software recorded in the NBP. The capacity of the NBP can be increased to the volume of the entire memory addressed by the microprocessor. At the same time, the transition to the debugging mode does not require restrictions on the contents of the program (for example, resolution of the pregloanie) in the main memory of the microprocessor system. In addition, the microprocessor system being debugged may not have hardware in step mode and display facilities. Even being constantly in the automatic mode of operation, the microprocessor with the help of the proposed device can provide step-by-step execution of the program and an indication of all the necessary setup information. Taking into account these possibilities, the proposed device allows to increase the efficiency of the debugging process and makes it possible to use it as a simple portable console for debugging, monitoring and diagnosing microprocessor systems.

/Lм-V/ Lm-v

(g

ofj , oofj, o

М ejM ej

WS Д4 ШЧ. / WS D4 SCH. /

оу/-/ afMff7e/ou / - / afMff7e /

Ч RfUL.H rful.

gA/ / gA / /

Г/G /

22

/ ринечание: а, Выгодной сигнал О/ Cinech: a, Favorable O signal

VrVr

((

fiS/i inc разрешающим 57 х- anpeutef/ffoe состав HuefiS / i inc allowing 57 x- anpeutef / ffoe composition Hue

hi.Shi.S

KllIDKllID

оabout

ФигЛFy

KttAKttA

/ ytu/pffue/ ytu / pffue

MofKuom6 l{St} фMofKuom6 l {St} f

Фиг.99

4/2. Л4/2. L

Claims (1)

УСТРОЙСТВО ДЛЯ ОТЛАДКИ ПРОГРАММ, содержащее наладочный блок памяти, блок управления, блок формирования адреса и регистр режима, причем информационные вход и выход устройства через шину данных соединены соответственно с входом и выходами данных наладочного блока памяти и блока управления, адресные входы наладочного блока памяти и блока формирования адреса образуют входную адресную шину устройства, управляющие, входы наладочного блока памяти, блока управления и регистра режима образуют управляющую шину устройства,выход регистра режима соединен с входом режима блока управления, отличающее с я тем, что, с целью расширения функциональных возможностей устройства за счет наращивания сервисных операций, в устройство введен блок отображения информации, причем первый, второй, третий и четвертый выходы блока ^’правления соединены соответственно с первым, вторым, треть им входами блока формирования адреса и управляющим выходом разрешения выборки основной памяти устройства, третий выход блока управления соединен с управляющими входами наладочного блока памяти и блока отображения информации, шина данных устройства соединена с входом и выходом данных блока формирования адреса и с первыми входами блока отображения информации, управляющая шина устройства соединена с вторым входом блока отображения информации, причем блок управления содержит пять триггеров, регистр команды перехода, группу элементов И, шесть элементов И-НЕ, первый, второй и третий дешифраторы, элемент ИЛИ-HE и элемент НЕ, причем (первый разряд управляющего входа блока соединен с D-входом первого триггера, с первыми входами первого и второго элементов И-НЕ, второй разряд управляющего входа блока соединен с вторыми входами первого и второго элементов И-НЕ и с входом синхронизации ‘ первого триггера,· третий разряд управляющего входа блока соединен с входом синхронизации второго тригГе- . ра и через элемент НЕ с управляющими входами третьего, четвертого, пятого и шестого элементов И-НЕ, четвертый разряд управляющего входа блока соединен с входами установки нуля второго и третьего триггеров и с первым входом элемента ИЛИ-HE, выход которого > соединен с входом установки нуля четвертого триггера, вход данных блока соединен с информационными входами первого’и второго дешифраторов, выходы которых' соединены соответственно cD -входами четвертого триггера и , 129.0.01 (’“Ж’ с первым входом шестого элемента ИНЕ, вход режима блока управления соединен с третьими входами первого и второго элементов И-НЕ, выход первого триггера соединен с первым управляющим входом первого дешифратора, с управляющим входом второго дешифратора, выход второго триггера соединен с входом третьего элемента И-НЕ, выход которого соединен с управляющими входами элементов И группы, единичный выход третьего триггера соединен с первым входом четвертого элемента И-НЕ, с первым входом третьего дешифратора, с четвертым входом второго элемента И-НЕ, с вторым управляющим входом первого дешифратора; с входом пятого элемента И-НЕ и вторым входом шестого элемента И-НЕ, нулевой выход третьего триггера соединен с четвертым входом первого* элемента И-НЕ, выход которого соединен с единичными входами второго и третьего триггеров,,- с вторым входом элемента ИЛИ-HE и является первым выходом блока, выход четвертого триггера соединен с вторым входом третьего дешифратора, с входом синхронизации третьего триггера и вторым входом четвертого элемента И-НЕ, выход которого является вторым выходом блока, выход пятого триггера соединен с третьим входом третьего дешифратора, первый и второй выходы которого являются соответственно третьим и четвертым выходами блока, выходы пятого и шестого элементов И-НЕ соединены соответственно с входами синхрониза'ции четвертого и пятого триггеров, ' выход второго элемента И-НЕ соединен с третьим входом элемента ИЛИ-HE и единичным выходом пятого триггера, выход регистра команды перехода соединен с информационными входами элементов И группы, выходы которых соединены с выходом данных блока.DEVICE FOR DEBUGGING PROGRAMS, comprising a setup memory unit, a control unit, an address generation unit and a mode register, wherein the information input and output of the device via the data bus are connected respectively to the input and output data of the setup memory unit and the control unit, address inputs of the setup memory unit and unit the formation of the address form the input address bus of the device, control, the inputs of the adjustment memory unit, the control unit and the mode register form the control bus of the device, the output of the mode register connected to the control unit mode input, characterized in that, in order to expand the functionality of the device by increasing service operations, an information display unit is introduced into the device, the first, second, third and fourth outputs of the control unit ^ 'being connected to the first , second, third by the inputs of the address generation unit and the control output of the sampling resolution of the main memory of the device, the third output of the control unit is connected to the control inputs of the adjustment memory unit and the display unit For information, the data bus of the device is connected to the input and output of the data of the address generation unit and to the first inputs of the information display unit, the control bus of the device is connected to the second input of the information display unit, and the control unit contains five triggers, a jump instruction register, a group of AND elements, six AND-NOT elements, first, second and third decoders, OR-HE element and NOT element, moreover (the first bit of the control input of the unit is connected to the D-input of the first trigger, with the first inputs of the first and second elements s NAND, a second discharge control input unit is connected to the second inputs of the first and second AND-NO element and to the input of sync 'of the first flip-flop, a third · discharge unit control input connected to the input of the second synchronization trigGe-. and through the NOT element with the control inputs of the third, fourth, fifth and sixth AND-NOT elements, the fourth bit of the control input of the unit is connected to the zero-setting inputs of the second and third triggers and to the first input of the OR-HE element, the output of which> is connected to the installation input zero of the fourth trigger, the data input of the block is connected to the information inputs of the first and second decoders, the outputs of which are connected respectively to the D inputs of the fourth trigger and, 129.0.01 (“Zh” with the first input of the sixth INE element, control unit mode input the phenomenon is connected to the third inputs of the first and second AND-NOT elements, the output of the first trigger is connected to the first control input of the first decoder, to the control input of the second decoder, the output of the second trigger is connected to the input of the third AND-NOT element, the output of which is connected to the control inputs of AND elements group, the single output of the third trigger is connected to the first input of the fourth AND-NOT element, with the first input of the third decoder, with the fourth input of the second AND-NOT element, with the second control input of the first decoder; with the input of the fifth AND-NOT element and the second input of the sixth AND-NOT element, the zero output of the third trigger is connected to the fourth input of the first * AND-NOT element, the output of which is connected to the unit inputs of the second and third triggers, - with the second input of the OR element- HE is the first output of the block, the output of the fourth trigger is connected to the second input of the third decoder, with the synchronization input of the third trigger and the second input of the fourth NAND element, the output of which is the second output of the block, the output of the fifth trigger is connected to the third input a third decoder, the first and second outputs of which are the third and fourth outputs of the block, respectively, the outputs of the fifth and sixth AND elements are NOT connected respectively to the synchronization inputs of the fourth and fifth triggers, the output of the second AND element is NOT connected to the third input of the OR element HE and a single output of the fifth trigger, the output of the transition command register is connected to the information inputs of elements AND groups, the outputs of which are connected to the data output of the block.
SU823476468A 1982-07-12 1982-07-12 Device for debugging programs SU1100627A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU823476468A SU1100627A1 (en) 1982-07-12 1982-07-12 Device for debugging programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU823476468A SU1100627A1 (en) 1982-07-12 1982-07-12 Device for debugging programs

Publications (1)

Publication Number Publication Date
SU1100627A1 true SU1100627A1 (en) 1984-06-30

Family

ID=21024385

Family Applications (1)

Application Number Title Priority Date Filing Date
SU823476468A SU1100627A1 (en) 1982-07-12 1982-07-12 Device for debugging programs

Country Status (1)

Country Link
SU (1) SU1100627A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР №277410, кл. G 06 F 9/00, 1968. 2.Патент US № 4231087, кл. G 06 F 11/00, опублик. 1980. 3.Авторское свидетельство СССР 690482, кл. G 06 F 7/50, 1977 (прототип). *

Similar Documents

Publication Publication Date Title
US5566303A (en) Microcomputer with multiple CPU'S on a single chip with provision for testing and emulation of sub CPU's
US5515530A (en) Method and apparatus for asynchronous, bi-directional communication between first and second logic elements having a fixed priority arbitrator
US4698754A (en) Error detection of scan-out in a diagnostic circuit of a computer
SU1100627A1 (en) Device for debugging programs
SU1608673A1 (en) Device for debugging programs
SU1282139A1 (en) Device for debugging software-hardware units
SU1312591A1 (en) Interface for linking electronic computer with peripheral unit
KR100460761B1 (en) Device supporting microcontroller development system
SU1456996A1 (en) Device for monitoring memory units
SU1425683A1 (en) Device for debugging software/hardware blocks
SU1315974A1 (en) Microprogram control device
SU1462326A1 (en) Device for debugging microprocessor systems
SU1282140A1 (en) Device for modifying address of memory areas in debugging programs
SU936035A1 (en) Redundancy storage
SU1442990A1 (en) Memory addressing device
SU1553981A1 (en) Device for checkout of microcomputer
SU1363223A1 (en) Computer storage dispatcher
SU1075247A1 (en) Device for holding computer bus
SU1363219A1 (en) Device for debugging program-equipment units
SU1247877A1 (en) Device for debugging microcomputers
SU1737454A1 (en) Device for storing route of interprocessor exchanges in multiprocessor systems
KR19990079373A (en) Debugging with Boundary Scan Standard Interface on Microcontrollers
SU1661768A1 (en) Digital unit testing device
SU1228108A1 (en) System for checking microprocessor devices
SU1348839A1 (en) Device for debugging program hardware-controlled units