SU1621030A1 - Interrupt device for microprocessor system - Google Patents

Interrupt device for microprocessor system Download PDF

Info

Publication number
SU1621030A1
SU1621030A1 SU884475897A SU4475897A SU1621030A1 SU 1621030 A1 SU1621030 A1 SU 1621030A1 SU 884475897 A SU884475897 A SU 884475897A SU 4475897 A SU4475897 A SU 4475897A SU 1621030 A1 SU1621030 A1 SU 1621030A1
Authority
SU
USSR - Soviet Union
Prior art keywords
input
priority
interrupt
group
output
Prior art date
Application number
SU884475897A
Other languages
Russian (ru)
Inventor
Григорий Николаевич Тимонькин
Вячеслав Сергеевич Харченко
Сергей Николаевич Ткаченко
Сергей Феофанович Тюрин
Герман Константинович Подзолов
Николай Иванович Хлебников
Юрий Михайлович Гнедовский
Инна Анатольевна Маслова
Original Assignee
Предприятие П/Я М-5308
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 Предприятие П/Я М-5308 filed Critical Предприятие П/Я М-5308
Priority to SU884475897A priority Critical patent/SU1621030A1/en
Application granted granted Critical
Publication of SU1621030A1 publication Critical patent/SU1621030A1/en

Links

Abstract

Изобретение относитс  к микропроцессорной технике и предназначено дл  организации дисциплины приоритетных прерываний в микропроцессорных системах управл ющих и вычислительных комплексов о Цель изобретени  - повышение быстродействи  обработки прерываний,, Устройство прерываний микропроцессорной системы содержит групповой блок щшоригетнчх прерываний, группу блоков приоритетных прерываний, дешифратор, блок пам ти прерывании, первый ч второй мультиплексоры, шинный формирователь, счетчик, триггер, элементы П, ИТИ. Причем групповой блок приоритетных прерываний содержит приоритетным шифратор , регистр текущего приоритета, схему сравнени , D-триггср и элемент II, а каждый блок приоритетно прерываний содержит приоритетный ипчЬрч- тор, D-триггер и элемент И, Сочность изобретени  состоит в повышении быстродействи  устройства прерываний путем обеспечени  идентификации отдельного запроса из произвольного числа приоритетных запросов на прерывание в цикле прерывани  с использованием рестарта микропроцессора,, 2 ЗсП,. ф-лы, 3 ил о «The invention relates to microprocessor technology and is intended to organize the discipline of priority interruptions in microprocessor systems of control and computing systems. The purpose of the invention is to increase the speed of interrupt processing, the microprocessor system interrupt unit contains a group block of interrupt interrupts, a group of priority interrupt blocks, a decoder, a memory block. interrupt, first h second multiplexers, bus driver, counter, trigger, elements P, IIT. Moreover, the group block of priority interrupts contains the priority encoder, the current priority register, the comparison circuit, the D-trigger and element II, and each priority interrupt block contains the priority ipcr, the D-trigger and the And element. The inaccuracy of the invention consists in increasing the speed of the interrupt device by providing identification of a separate request from an arbitrary number of priority interrupt requests in an interrupt cycle using a microprocessor restart ,, 2 FAS ,. f-ly, 3 silt about

Description

Изобретение относитс  к микропроцессорной технике и предназначено дл  организации дисциплины приоритетных прерываний в микропроцессорных системах управл ющих и вычислительных комплексов.The invention relates to microprocessor technology and is intended to organize the discipline of priority interruptions in microprocessor systems of control and computing systems.

Цель изобретени  - повышение быстродействи  обработки прерываний.The purpose of the invention is to increase the interrupt processing speed.

На фиг. 1 представлена структурна  схема устройства; на фиг„ 2 - функциональна  схема блока приоритетных прерываний группы; на фиг. 3 - функциональна  схема группового блока приоритетных прерываний.FIG. 1 shows a block diagram of the device; Fig 2 is a functional diagram of the group priority interrupt block; in fig. 3 - functional diagram of the group block of priority interrupts.

Устройство прерываний микропроцессорной системы состоит из группового блока 1 приоритетных прерываний , содержащего информационные входы 1.1.1-b1cN, вход 1.2 синхронизации , первый вход 1„3 сброса , второй вход 1.4 сброса, выход 1„5 запроса прерывани , информационные выходы 1.6, блоков приоритетных прерываний группы 2.1-2..N, содержаюThe microprocessor system interrupt device consists of a group block 1 priority interrupts containing information inputs 1.1.1-b1cN, synchronization input 1.2, first input 1 „3 reset, second input 1.4 reset, output 1„ 5 interrupt request, information outputs 1.6, priority blocks interrupt group 2.1-2..N, contain

ИвIve

оabout

СЈ

К5ЧЯK5CHYA

щих входы .N.1 сброса, входы 2. 1.,NC2 синхронизации, выходы 2.1o3-2,N.3 запросов прерывани , информационные выходы 201,.4, де- шифратора 3, 4 пам ти,прерываний , мультиплексора 5, содержащего выход 5.1, мультиплексора 6, шинного формировател  7, счетчика 8, триггер 9, элементов ИЛИ 10-12, элементов И 13, t4, группы адресных входов 15, группы адресных входов 16, информационных выходов 17, входа 18 разрешени  прерывани  входа 19 сброса, входа 20 синхронизации, входа 21 приема, входа 22 подтверждени  прерывани , входа 23 синхронизации, входа 24 записи, выхода 25 запроса прервани , входа 26 управлени  чтением, информационных входов 2701-270N, при оритетного шифратора 28, элемента И 29, D-триггера 30, приоритетного шифратора 31, регистра 32 текущего приоритета, схемы 33 сравнени , I)- триггера 34, элемента И 350 .N.1 reset, inputs 2. 1., NC2 synchronization, outputs 2.1o3-2, N.3 interrupt requests, information outputs 201, .4, decoder 3, 4 memories, interrupts, multiplexer 5, containing output 5.1, multiplexer 6, bus driver 7, counter 8, trigger 9, elements OR 10-12, AND elements 13, t4, groups of address inputs 15, groups of address inputs 16, information outputs 17, inputs 18 for enabling interrupt input 19 synchronization input 20, reception input 21, interrupt acknowledgment input 22, synchronization input 23, write input 24, interrupt request output 25, stroke 26 the reading control, data inputs 2701-270N, when oritetnogo encoder 28, AND gate 29, D-flip-flop 30, the priority encoder 31, the register 32 of the current priority comparing circuit 33, I) - flip-flop 34, AND gate 350

Входы 15 и 16 устройства представл ют собой адресные входы дл  подключени  шины адреса микропроцессорной системы, выходы 17 устройства представл ют собой входы данных дл  под- клгачени  шины данных микропроцессорной системы, вход 18 устройства представл ет собой вход дл  подключени  разр да шины управлени  микропроцессорной системы, сигнализирующего о разрешении прерывани  в системе, например INTE дл  микропроцессора 580, вход 19 устройства представл ет собой вход дл  подключени  разр да шины управлени  микропроцессорной системы, управл ющего системным сбросом , например RESET дл  микропроцессора 580, вход 20 устройства предстал ет собой вход подключени  разр да тактового сигнала шины управлени  микропроцессорной системы, например t2 дл  микропроцессора 580, вход 2 устройства представл ет собой вход подключени  разр да шины управлени  микропроцессорной системы, управл ющего приемом информации с шины дан ных, например DBIN дл  микропроцессора 580, вход 22 устройства представл ет собой вход подключени  разр да шины управлени , сигнализирующего о подтверждении прерывани , т.е. о переходе микропроцессора в цикл обработки прерывани , например INTA дл  микропроцессора 580, вход 23Device inputs 15 and 16 are address inputs for connecting the microprocessor system address bus, device outputs 17 are data inputs for connecting the microprocessor system data bus, device input 18 is an input for connecting the microprocessor system control bus, interrupt signaling signaling in the system, for example, INTE for microprocessor 580, the device input 19 is an input for connecting the microprocessor system control bus bit, For example, a system reset, such as RESET for microprocessor 580, device input 20 represents the microprocessor system control bus clock signal input, for example, t2 for microprocessor 580, device 2 input represents the microprocessor control bus terminal input receiving information from the data bus, e.g., DBIN for microprocessor 580, the device input 22 is a control bus discharge input signaling the confirmation of the interruption, i.e. on the transition of the microprocessor to the interrupt processing cycle, for example, the INTA for the microprocessor 580, input 23

, ,

g д 20 5g d 20 5

о 35about 35

4040

4545

5050

5555

устройства представл ет собой вход подключени  разр да шины управлени , сигнализирующего о начале нового машинного цикла микропроцессора, например SYNC дл  микропроцессора 580, вход 24 устройства представл ет собой вход подключени  разр да шины управлени  микропроцессорной системы, сигнализирующего о выводе информации во внешнее устройство, например OUT дл  микропроцессора 580, выход 25 устройства  вл етс  выходом дл  ттод- ключени  к разр ду шины управлени  микропроцессорной системы, воспринимающему запросы на прерывание, например INT дл  микропроцессора 580the device is a control bus discharge input signaling the start of a new microprocessor machine cycle, for example, SYNC for a microprocessor 580, device input 24 is an input for a microprocessor system control bus discharge signal for outputting information to an external device, for example, OUT for microprocessor 580, the device output 25 is an output for switching to the control bus discharge of a microprocessor system that accepts interrupt requests, such as INT for Microprocessor 580

Устройство работает следующим об- разом0The device works as follows0

В исходном состо нии все триггеры и регистры обнулены по входу 19 устройства сигналом логической На информационные входы устройства 27„1- 27.N поступают комбинации запросов на прерывание от различных внешних устройств , требующих обслуживани  Причем больший приоритет имеют устройства , подключенные к блоку 2 приоритетных прерываний группы, имеющему больший номер, а среди устройств, подключенных к одному блоку приоритетных прерываний,; - устройства, подключенные к входу 27, имеющему больший номер. На выходах соответствующих приоритетных -шифраторов 28 по вл етс  информаци  о кодах запросов прерывани  в блоки.2 приоритетных прерываний группы, имеющих больший приоритет в каждом из блоков 2, и сигналы логической 1, свидетельствующие о наличии хот  бы одного запроса на прерывание Это приводит к тому, что по импульсу синхронизации , поступающему с. соответствущего входа устройства на входы 2, 1 .2-2.N.2 блоков 2 приоритетных прерываний группы, устанавливаютс  в состо ние логической 1 D-триггеры 30, на D- входы которых подан уровень логической 1. Таким образом, на входы 1.1-KN группового блока приоритетных прерываний поступают комбинации групповых запросов на прерывание, которые воспринимаютс  приоритетным шифратором 31, на выходе которого по вл етс  код запроса на прерывание наиболее приоритетного блока из блоков приори тетных прерываний,, требующих обслуживани  в данный момент Этот код лосту5162In the initial state, all the triggers and registers are reset to device input 19 by a logic signal. Information inputs of the device 27 "1 - 27.N receive combinations of interrupt requests from various external devices requiring service. Moreover, devices connected to block 2 of priority interrupts have higher priority groups having a larger number, and among devices connected to one priority interrupt block; - Devices connected to the input 27, having a larger number. At the outputs of the corresponding priority encoders 28, information about interrupt request codes in blocks 2 priority interrupts of the group that have a higher priority in each of blocks 2, and logical 1 signals, indicating the presence of at least one interrupt request, appears. that according to the synchronization pulse arriving with. the corresponding input of the device to the inputs 2, 1 .2-2.N.2 of the blocks 2 priority interrupts of the group are set to the logical 1 state of the D-flip-flops 30, the D-inputs of which are applied to the logical level 1. Thus, the inputs 1.1- The KN group interrupt priority block receives combinations of group interrupt requests that are perceived by the priority encoder 31, the output of which is the interrupt request code of the highest priority block from the priority interrupt blocks requiring the current service. tu5162

пает на первую группу информационных входов схемы 33 сравнени , где сравниваетс  с информацией на выходе регистра 32 текущего приоритета, выходы которого подключены к второй группе входов схемы 33 сравнени . Так как в исходном состо нии регистр 32 обнулен, на выходе схемы 33 сравнени  по вл етс  сигнал логической 1, который поступает на вход элемента И 35, на другой вход которого поступает сигнал логической 1, свидетельствующий о наличии запросов на прерывание По синхроимпульсу, поступающему с соответствующего входа устройства на вход 1.2 блока 1, установитс  D-триггер 34 вследствие того, что на его D-вход подан уровень логической Таким образом, на выходе 1.5 блока 1 устанавливаетс  сигнал логической 1, свидетельствующий о запросе на прерывание, имеющем больший приоритет в блоке приоритетного прерывани , имеющем, в свою очередь, больший приоритет в данный момент вре менИо По переднему фронту импульса на выходе D-триггера 34 в регистр 32 текущего приоритета записываетс  код приоритета на данный момент времени, который поступает на выходы 1.6 блока 1 оIt goes to the first group of information inputs of the comparison circuit 33, where it is compared with the information at the output of the current priority register 32, the outputs of which are connected to the second group of inputs of the comparison circuit 33. Since in the initial state the register 32 is reset, at the output of the comparison circuit 33 a logical 1 signal appears, which enters the input of the element 35, to the other input of which a logical 1 signal is received, indicating that there are interrupt requests. By the sync pulse coming from the corresponding input of the device to the input 1.2 of block 1, a D-flip-flop 34 is set due to the fact that a logical level is applied to its D-input. Thus, the output 1.5 of block 1 is set to a logical 1 signal indicating an interrupt request, I have A higher priority in the priority interrupt block, which, in turn, has a higher priority at the given time. On the leading edge of the pulse at the output of the D flip-flop 34, the priority code at the current time is written to the output block 1.6 at the current priority register 32 1 o

Следовательно, на выходе 25 устройства устанавливаетс  сигнал логической 1, а на адресных входах мультиплексора 6 - код блока 2 приоритетных прерываний группы, запрос на обслулмвание которого прин т в данный момент времени. Сигнал на выходе 25 /устройства воспринимаетс  микропроцессором в последнем такте последнего цикла текущей команды некоторой фоновой программы, и он перехолит в цикл обработки прерывани . При этом сбрасываетс  внутренний триггер прерывани  микропроцессора и с входа 18 разрешени  прерывани  устройства снимаетс  сигнал логической 1, вследствие чего на входы t.3 группового блока 1 приоритетных прерываний и входы 2.1.1 блоков 2 приоритетных прерываний группы подаетс  сигнал логической 1 с выхода элемента ИЛИ 12. Триггеры 30, 34 запроса прерывани  обнул ютс  и удерживаютс  в нулевом состо нии. Прерывани  запрещены По сигналам на входе 21 приема устройства (уровень логической 1 на котором свидетельствует о том, чтоConsequently, at the output 25 of the device, a logical 1 signal is set, and at the address inputs of multiplexer 6, the code of the group 2 priority interrupts of the group, the request for which is received at a given time. The signal at output 25 / of the device is perceived by the microprocessor in the last clock cycle of the current command of a certain background program, and it is overridden into the interrupt processing cycle. In this case, the microprocessor's internal interrupt trigger is reset and the logical 1 signal is removed from the device enable input 18, which results in a logical 1 signal from the output of the element OR 12 to the inputs t.3 of the group block 1 for priority interrupts and the inputs 2.1.1 for blocks 2 for the priority interrupts. The interrupt request triggers 30, 34 are zeroed out and held in the zero state. Interrupts are prohibited by the signals at the input 21 of the receiving device (a logic level of 1 which indicates that

03060306

микропроцессор находитс  в состо нии ввода информации с шины данных) и входе 22 подтверждени  прерывани  (уровень логической 1 на котором свидетельствует о том, что микропроцессор находитс  в цикле обработки прерывани ) происходит установка триггера 9 в состо ние логическойthe microprocessor is in the state of inputting information from the data bus) and the interrupt acknowledgment input 22 (the logic level 1 which indicates that the microprocessor is in the interrupt processing cycle) the trigger 9 is set to the logic

0 1 и подаетс  разрешающий сигнал0 1 and the enable signal is applied

на вход, управлени  шинного формировател  7, выходы которого подключаютс  к выходам данных устройства , В исходном положении выходы шинного форми5 ровател  7 наход тс  в высокоимпе- данском состо нии вследствие отсутстви  активного уровн  сигнала на его входе управлени . Вхочл ттннгто формировател  7 подключены к Р1гходамTo the input, control the bus driver 7, the outputs of which are connected to the data outputs of the device. In the initial position, the outputs of the bus generator 7 are in a high impedance state due to the absence of an active signal level at its control input. Inlet ttnngto shaper 7 are connected to R1 outlets

0 мультиплексора 6, которые сигналами на выходах 1 „6 группового блока 1 приоритетных прерппаппп подключены к выходам блока 9 приоритетного прерывани  группы, имеющего наивысшей0 multiplexer 6, which are connected to the outputs of block 1 to 6 of the group block 1 of the priority prerppapps connected to the outputs of the block 9 of the priority interrupt group having the highest

5 приоритет. Поэтому па выходах шинного формировател  7 устанавливаетс  информаци , соответствующа  коду запроса прерывани , имеющего наивысший приоритет в блоке 2 приоритетных преры0 ваний группы, имеюцсго в свою очередь наивысший приоритет среди ппуг х, требующих обслуживани  в данный момент . Сигнал логической 1 с выхода триггера 9 управл ет мультиплексором5 priority. Therefore, the pa output of the bus driver 7 sets the information corresponding to the interrupt request code, which has the highest priority in block 2 of the group's priority interrupts, which in turn has the highest priority among the currently required services. The logical 1 signal from the output of the trigger 9 controls the multiplexer

С 5, который в исходном положении при наличии на его входе адреса сигнала логического О передает на своп выходы и вторую группу адресных входов блока 4 пам ти прерывани  информациюC 5, which in its initial position, when there is an address of a logical signal O at its input, transmits the information to the swap outputs and the second group of address inputs of the interrupt memory unit 4

0 о состо нии части адресных входов 16 устройства Причем эта часть  вл етс  подмножеством адресных входов 16 устройства о При поступлении на вход адреса первого мультиплексора 5 сиг-0 about the state of the part of the address inputs 16 of the device. Moreover, this part is a subset of the address inputs of the device 16 When the address of the first multiplexer 5 signals arrives at the input

5 нала логической 1 с выхода триггера 9 на выходы мультиплексора 5 передаетс  информаци  с выходов 106 группового блока 1 приоритетных прерываний . Поэтому состо ние адресных вхо0 Д°в блока 4 пам ти прерываний определ етс  как состо нием части адресных входов 16 устройства, так и кодом блока 2 приоритетных прерываний, имеющего наивысший приоритет, запрос5 logic 1 from the output of the trigger 9 to the outputs of the multiplexer 5 is transmitted information from the outputs 106 of the group block 1 priority interrupt. Therefore, the state of the address inputs in the interrupt memory unit 4 is determined both by the state of the part of the device’s address inputs 16 and by the code of the priority interrupt unit 2, which has the highest priority, the request

е на прерывание от которого и выполн етс  в данный момент.e to interrupt from which is being executed at the moment.

Сигнал логической 1 с выхода триггера 9 поступает также на нторой вход элемента И 14, первый вход которого подключен к второму входу 23 синхронизации устройства, на который подаетс  синхросигнал, сопровождающий каждый цикл работы микропроцессора . Поэтому счетчик 8 по своему счетному входу начинает подсчет этих импульсов синхронизации.The logical 1 signal from the output of the trigger 9 is also fed to the second input of the AND 14 element, the first input of which is connected to the second synchronization input 23 of the device, to which the clock signal accompanying each cycle of the microprocessor is applied. Therefore, the counter 8 at its counting input starts counting these synchronization pulses.

Микропроцессор воспринимает вектор прерывани , поступающий с выхода шинного формировател  (разр ды шинного формировател  7, соответствующие разр дам 7, 6, 0, 1, 2 команды RST1Idddl11, подключены через ограничительный резистор к шине +5В источника питани ), и адресует первую команду обработки прерывани , адрес которой зависит не только от вектора прерывани , но и от кода блока приоритетного прерывани , выста- вившего этот вектор прерывани . Поэтому из блока 4 пам ти прерываний будет считана команда обработки прерывани  „ соответствующа  данному наиболее приоритетному запросу на пре- рывание, без дополнительной программной обработки. Эта команда считываетс  из блока 4 пам ти прерываний после подачи активного уровн  сигнал на вход 26 управлени  блока 4 пам ти прерывани  устройства, на который может быть подан, например, сигнал выборки кристалла с дешифратора микропроцессорной системы, и после подачи на вход 21 приема устройства сигнала логической 1, свидетельствующего о приеме информации по шине данных микропроцессора. При считывании команды выходы шинного формировател  7 перевод тс  в высоко- импедансное состо ние, так как с входа 22 подтвеждени  прерывани  сн  активный уровень сигнала вследствие того, что микропроцессор выполн ет цикл выборки команды из пам ти по- еле цикла прерывани  по значению команды рестарта.The microprocessor perceives the interrupt vector coming from the output of the bus driver (the bits of the bus driver 7 corresponding to bits 7, 6, 0, 1, 2 of the RST1Idddl11 command are connected via a limiting resistor to the + 5V bus from the power supply), and addresses the first interrupt processing command whose address depends not only on the interrupt vector, but also on the code of the preemptive interrupt block that generated this interrupt vector. Therefore, an interrupt processing command will be read from block 4 of the interrupt memory corresponding to the given highest priority interrupt request, without additional program processing. This command is read from the interrupt memory block 4 after the active level is supplied to the control input 26 of the interrupt memory block 4 of the device to which, for example, a chip sample signal from the microprocessor system decoder is fed, and after the signal 21 logical 1, indicating the receipt of information on the microprocessor data bus. When a command is read, the outputs of the bus driver 7 are transferred to the high-impedance state, since from the input 22 the interrupt signals confirm the active signal level due to the fact that the microprocessor executes the command sampling cycle from the memory of the interrupt cycle by the value of the restart command.

Перва  команда обработки прерывани  представл ет собой, например, команду безусловного перехода в об- ласть пам ти, где записана программа обработки конкретного прерывани . После осуществлени  такого перехода счетчик 8 обнул етс  и импульс с его выхода переполнени , поступающий на вход элемента ИЛИ 11, обнул ет триггер 9. Мультиплексор 5 отключаетс  от выходов 1„6 группового блока 1 приоритетных прерываний и вновь подключаетс  к части адресных линий адресных входов 16 устройства, что представл ет возможность его адресации по адресным лини м 16 при выполнении , например, программы прерывани .The first interrupt-handling command is, for example, an unconditional branch instruction to the memory area where a specific interrupt processing program is written. After such a transition is completed, the counter 8 nullifies and the pulse from its overflow output, which enters the input of the element OR 11, zeroes the trigger 9. The multiplexer 5 is disconnected from the outputs 1-6 of the group block 1 priority interrupts and re-connected to the part of the address lines of the address inputs 16 devices that represent the possibility of its addressing by address lines 16 when executing, for example, an interrupt program.

Выполн   программу обработки конкретного прерывани , микропроцессор об зательно осуществл ет операции записи в стек содержимого регистров общего назначени  и состо ни , а затем разрешает прерывани  специальной командой, что обеспечивает возможность многоуровневых прерываний,, Если после выполнени  этих операций поступил запрос на обслуживание с блока 2 приоритетных прерываний, имеющего больший приоритет, чем тот, чей запрос обслуживаетс , вновь по импульсу синхронизации, поступающему с входа 20 устройства на вход 1.2 группового блока 1 приоритетных прерываний, установитс  D-триггер 34 Это произойдет потому, что после программного разрешени  прерываний на входе 18 устройства вновь будет присутствовать сигнал логической 1, что снимет активный уровень сигнала с входов обнулени  1„ЗВ- триггера 34 и 2„1„1-20N ID-триггеров 30„ Установитс  D-триггер 30 в блоке приоритетных прерываний, имеющем больший приоритет, что вызовет изменение кода на выходе приоритетного шифратора 31, и, так как этот код будет больше кода, записанного в регистре 32, то вновь по витс  сигнал логической 1 на выходе схемы 33 сравнени .By executing a specific interrupt processing program, the microprocessor necessarily writes to the stack the contents of the general purpose and status registers, and then resolves the interrupts with a special command, which allows multilevel interrupts, if after performing these operations a service request is received from priority block 2 interrupts having a higher priority than the one whose request is being serviced, again on a synchronization pulse coming from the input 20 of the device to the input 1.2 of the group block and 1 priority interrupt, D-flip-flop 34 is set. This will happen because after programmatically enabling interrupts, a logical 1 signal will be present at device input 18 again, which will remove the active signal level from zeroing inputs 1 of the 3V trigger and 34 and 2 signals 1 -20N ID-flip-flops 30 "D-flip-flop 30 will be installed in the priority interrupt block with a higher priority, which will cause a code change at the output of the priority encoder 31, and, since this code will be greater than the code recorded in register 32, logical 1 output signal e comparison schemes 33.

II

Таким образом, произойдет очеред1- ное прерывание программы независимо от степени завершени  предыдущей.Thus, the next program interruption will occur, regardless of the degree of completion of the previous one.

Предлагаемое устройство предусматривает хранение запросов на прерывание в триггерах-флажках устройств, вызывающих прерывание по входам 27.1- 27.N. Эти флажки остаютс  установленными до завершени  программы обработки прерывани  от данного устройства и обнул ютс  микропроцессором при помощи технических средств данного внешнего устройства, например портов вывода с адресами, соответствующими внешним устройствам. Выходные сигналы дешифраторов этих портов вывода активизируют входы обнулени  триг- г ер ов-фл ажк о в„The proposed device provides for the storage of interrupt requests in the trigger-flags of devices that cause an interrupt on inputs 27.1-2.N. These flags remain set until the completion of the interrupt handler program from this device and are wrapped by a microprocessor using technical means of this external device, for example, output ports with addresses corresponding to external devices. The output signals of the decoders of these output ports activate the zero outputs of the trigger fl ov fl o

По завершении программы обработки прерывани  микропроцессор обнул ет флажок устройства, вызвавшего прерывание при помощи технических средств принадлежащих данному внешнему уст- ройству5 что приводит к сн тию запроса на прерывание с соответствующих входов 27.1-27.N.Upon completion of the interrupt processing program, the microprocessor resets the checkbox of the device that caused the interruption using technical means belonging to this external device5, which results in the removal of the interruption request from the corresponding inputs 27.1-27.N.

Микропроцессор обращаетс  к дешифратору 3 так же, как к устройству вывода, использу  вторые адресные входы устройства 15, которые могут быть совмещены с первыми адресными входами 16 устройства, и вход 24, в результате чего происходит по вление сигнала логической 1 на выходе дешифратора 3. При этом сигнал логической 1 поступает на первые входы элемента ИЛИ 10, ас его выхода - на вход 1 4 группового блока 1 приоритетных прерываний, что приводит к обнулению регистра 32„ Групповой бпо 1 приоритетных прерывании готов воспринимать следующий по приоритету запрос на прерывание . Перед выполнением перечисленных операций обнулени  флажков и регистра 32 текущего приоритета необходимо программно запретить прерывани , после чего происходит возврат из подпрограммы,The microprocessor accesses the decoder 3 in the same way as the output device using the second address inputs of the device 15, which can be combined with the first address inputs 16 of the device, and the input 24, resulting in the appearance of a signal of logical 1 at the output of the decoder 3. When This logical 1 signal goes to the first inputs of the OR 10 element, and its output goes to input 1 4 of group block 1 of priority interrupts, which leads to resetting the register 32 “Group bpo 1 of priority interrupts is ready to accept the next priority the interrupt request. Before performing the above operations of zeroing flags and register 32 of the current priority, it is necessary to prohibit interrupts programmatically, after which the subroutine returns,

В случае прерывани  программы обработки прерывани  запросом на прерывание большего приоритета после завершени  обработки запроса большего приоритета обработка запроса на прерывание предыдущего приоритета начнетс  вновь с первой команды программы обработки прерывани , если за это врем  не поступили запросы на прерывани  большего приоритета, Если же повторное выполнение прерывани программы нежелательно, тогда в данной программе не предусматриваетс  команда разрешени  прерывани  до окончани  программы.In case of interruption of the interrupt processing program by a request to interrupt a higher priority after completion of processing a request of a higher priority, the processing of the interruption request of the previous priority will start again from the first command of the interrupt processing program, if during this time no requests have been received for interrupting a higher priority. It is undesirable that then this program does not provide for an interrupt authorization command until the end of the program.

Таким образом, предлагаемое устроство обеспечивает идентификацию адреса первой команды отдельного запроса на прерывание в режиме, векторных прерываний с использованием рестарта микропроцессора в цикле прерывани  без дополнительной программной обработки.Thus, the proposed device identifies the address of the first command of an individual interrupt request in the mode of vector interrupts using the microprocessor restart in the interrupt cycle without additional program processing.

Рассмотрим пример конкретной реализации предлагаемого устройства дл  работы в составе микропроцессорной системы на основе микропроцессора 580 дл  14 уровней прерывани .Consider an example of a specific implementation of the proposed device for operation as part of a microprocessor system based on microprocessor 580 for 14 levels of interruption.

10ten

1515

21030ю21030

Используем два блока 2.1 и 2,2 приоритетных прерываний с приоритетными шифраторами 31, 28 на 7 входов. Разр дность сигналов регистра 32 logj. Ј 30 Выходы блоков 2.1 и 252 приоритетных прерываний подключены к первому 1.1.1 и второму 1.1.2 входам группового блока 1 приоритетных прерываний. На остальные входы подадим сигналы логического О.We use two blocks 2.1 and 2.2 priority interrupts with priority encoders 31, 28 for 7 inputs. The signal width of the register 32 logj. Ј 30 Outputs of blocks 2.1 and 252 of priority interrupts are connected to the first 1.1.1 and second 1.1.2 inputs of group block 1 of priority interrupts. On the remaining inputs give signals logical O.

Команда рестарта (RST) микропроцессора 580 имеет вид 11ddd111Ј„ Тогда 14 уровн м прерывани  будут соответствовать следующие векторы прерывани  :The restart command (RST) of microprocessor 580 has the form 11ddd111Ј "Then the following interrupt vectors will correspond to 14 interrupt levels:

OlOgOlog

О 2 ОдAbout 2 od

03080308

04 Ое04 Oe

050g050g

06 0 g06 0 g

07080708

Таким образом, один вектор прерывани  соответствует двум уровн м прерывани  Дл  идентификации запроса на прерывание по одному вектору прерывани , который определ ет адрес первой команды обработки прерывани , необходимо было бы предусмотреть команды ввода информации с выходов 1,6 группового блока приоритетных прерываний, котора  кодирует номер блока приоритетных прерываний из блоков 2.1-2.2, и по этой информации определить адрес первой команды программы обработки конкретного из двух прерывании ,Thus, one interrupt vector corresponds to two interrupt levels. To identify an interrupt request by one interrupt vector that determines the address of the first interrupt processing command, it would be necessary to provide commands for entering information from the outputs 1.6 of the group priority interrupt block that encodes the number block of priority interrupts from blocks 2.1-2.2, and using this information, determine the address of the first command of the processing program of a particular two interrupts,

2020

2525

30thirty

3535

В предлагаемом устройстве код на выходе 1,6 блока приоритетного прерывани  001 Ј кодирует запросы на прерывание 1-7, а код 010 - запросы 8-14. Таким образом, на первый вход мультиплексора 5 подключаетс  шестой разр д шлны адреса микропроцессора , а на его второй вход - второй разр д кода Кб, и по сигналу логической 1 с выхода триггера 9 состо ние вторых адресных входов блока 4 пам ти прерываний будет определ тьс  вторым разр дом кода 1i6 блока приоритетного прерывани . Тогда в блоке 4 пам ти прерываний начальные команды обработки прерываний необходимо разместить по следующим адресам (допустим, разр дность адресных линий блока пам ти равна 8):In the proposed device, the code at the output 1.6 of the priority interrupt block 001 Ј encodes interrupt requests 1-7, and the code 010 encodes requests 8-14. Thus, the sixth bit of the microprocessor address is connected to the first input of the multiplexer 5, and the second bit of the KB code is connected to its second input, and the signal from the logical 1 output of the trigger 9 will determine the state of the second address inputs of the interrupt memory block 4 the second bit of code 1i6 of the preemption block. Then, in block 4 of the interrupt memory, the initial interrupt handling commands must be placed at the following addresses (for example, the width of the address lines of the memory block is 8):

010|- перва  команда обработки010 | - first processing team

прерывани interruptions

и„and"

и пand n

1one

П. || 1P. || one

.. II.. II

7 8 97 8 9

10 11 12 13 1410 11 12 13 14

020$-- -2$ 20 - -2

0308-- -30308-- -3

0408-ч 0408-h

0508-- -5 06 08- 07081108120в130в- - 140815081608- 0508-- -5 06 08-707108120v130v- - 140815081608-

1708После перехода микропроцессора в цикл прерывани  блок 4 пам ти прерываний будет адресоватьс  как лини ми шины адреса адресных входов 16 устройства , так и выходом 501 первого мультиплексора 5с По адресам 010g- 170g разместим команды-вызовы подпрограмм обслуживани  прерываний 1-14, которые наход тс  вне блока 4 пам ти прерываний. Поэтому после выполнени  этих команд-вызовов необходимо сбросить триггер 9 дл  переключени  первого мультиплексора 5 с тем, чтобы при выполнении подпрограмм обработки прерываний было возможно по адресным входам 16 адресовать блок 4 пам ти прерываний. Поэтому коэффициент пересчета счетчика 8 должен быть равен количеству циклов (количеству синхроимпульсов на синхровыходе микропроцессора , подключенном к входу 23 устройства) записи в стек при выполнении команды RST (2 цикла) плюс количеству циклов выполнени  команды CALL (вызов подпрограммы) 3„1708 After the microprocessor enters the interrupt cycle, the interrupt memory block 4 will be addressed by the bus lines of the address of the device 16 address inputs and by the output 501 of the first multiplexer 5c. Add the commands-calls to the interrupt service routines 1-14, which are out of addresses 010g-170g. block 4 interrupt memory. Therefore, after these command calls have been made, it is necessary to reset trigger 9 in order to switch the first multiplexer 5 so that when executing the interrupt handling routines it is possible to address block 4 of the interrupt memory by address inputs 16. Therefore, the conversion factor of counter 8 should be equal to the number of cycles (the number of sync pulses on the microprocessor's sync output connected to the input 23 of the device) of writing to the stack when executing the RST command (2 cycles) plus the number of cycles of the CALL command (subroutine call) 3 „

Таким образом, коэффициент пересчета счетчика 8 равен 5, и после п того импульса происходит переключение первого мультиплексора 5.Thus, the conversion factor of the counter 8 is equal to 5, and after the fifth pulse, the first multiplexer 5 is switched.

Допустим, поступили запросы на прерывание на первый и второй входы 27. 1 о 1-27.1.2 блока 2.1 приоритетных прерываний и на третий вход 27о203 блока 202 приоритетных прерываний Тогда на выходе 2.1.4 блока 2.1 приоритетных прерываний установитс  код запроса на прерывание 010is a на выходе 2.-2Р4 блока 2.2. приоритетных прерываний - код 011. Так как блок 2 ,.2 приоритетных прерываний имеет больший приоритет, чем блок 2.1, то в регистр 32 при запросе на прерывание будет записан колSuppose interruption requests have been received for the first and second inputs 27. 1 about 1-27.1.2 of block 2.1 of priority interrupts and for the third input 27-203 of block 202 of priority interrupts Then the output 2.1.4 of block 2.1 of priority interrupts will set the interrupt request code 010is a at the output 2.-2P4 block 2.2. priority interrupt - code 011. Since block 2, .2 priority interrupt has a higher priority than block 2.1, then in register 32 when requesting an interrupt a count will be written

i 010 (второй блок). Поэтому после цикла прерывани  по команде рестарта RST 110111112. будет выбрана команда из  чейки 130о, котора  идентифицирует запрос приоритета 0113 из блока приоритетных прерываний, имеющего приоритет 0102 без дополнительной программы поиска номера бло- JQ ка, требующего обслуживани ,,i 010 (second block). Therefore, after the interrupt cycle, a restart command is issued on the RST 110111112 command. A command from the 130 ° cell will be selected that identifies the priority request 0113 from the priority interrupt block having priority 0102 without the additional program for searching the block number JQ

Claims (2)

Формула изобретени Invention Formula 10 Устройство прерываний микро .с процессорной системы, содержащее групповой блок приоритетных прерываний , группу блоков приоритетных прерываний и дешифратор, причем информационные входы блоков приоритет .,„ ных прерываний образуют группу информационных входов устройства, входы синхронизации группового блока приоритетных прерываний и блоков приоритетных прерываний группы объе25 динены и  вл ютс  первым входом синхронизации устройства, входы дешифратора  вл ютс  первой группой адресных входов устройства, отличающеес  тем, что, с целью10 Microprocessor interrupt device with a processor system containing a group block of priority interrupts, a group of blocks of priority interrupts and a decoder, the information inputs of priority blocks, interrupts form a group of information inputs of the device, synchronization inputs of a group block of priority interrupts and blocks of priority interrupts of a volume group 25 the dinenes are the first synchronization input of the device, the inputs of the decoder are the first group of address inputs of the device, characterized in that, with the purpose OQ повышени  быстродействи  обработки прерываний, в устройство введены блок пам ти прерываний, первый и второй мультиплексоры, шинный формирователь , счетчик, триггер, первый, второй и третий элементы ИЛИ, пер вый и второй элементы И, причем информационные выходы блоков приоритетных прерываний группы подключены к управл ющим входам второго мультиплексора , адресные входы которого подключены к информационным выходам группового блока приоритетных прерываний , выходы которого подключены к информационным входам шинного формировател , выход шинного формировател   вл етс  информационным выходом устройства, выходы запросов прерывани  блоков приоритетных прерываний группы подключены к информационным входам группового блока приоритетныхOQ of interrupt processing speed, an interrupt memory block, first and second multiplexers, bus driver, counter, trigger, first, second and third elements OR, first and second elements AND, the information outputs of the priority interrupt blocks of the group are connected to the device control inputs of the second multiplexer, the address inputs of which are connected to the information outputs of the group block of priority interrupts, the outputs of which are connected to the information inputs of the bus driver, in stroke shaper bus is a data output device outputs the interrupt request block priority interrupt groups are connected to the data inputs of the group priority unit 50 прерываний, выход запроса прерывани  группового блока приоритетных прерываний  вл етс  выходом запросов прерывани  устройства, перва  группа адресных входов блока пам ти прерываний50 interrupts, the interrupt request output of a group priority interrupt block is the output of device interrupt requests, the first group of address inputs of the interrupt memory block 55 и перва  группа информационных входов55 and the first group of information inputs первого мультиплексора  вл ютс  соот- ветственно первой и второй подгруппами группы адресных входов устрой40the first multiplexer are, respectively, the first and second subgroups of the group of address inputs of the device 40 4545 1313 ства, втора  группа информационных .входов первого мультиплексора подключена к группе информационных выходов группового блока приоритетных прерываний, а группа выходов первого мультиплексора подключена к второй группе адресных входов блока пам ти прерываний, первый вход разрешени  блока пам ти прерываний  вл етс  входом приема устройства, а второй вход разрешени  блока пам ти прерываний  вл етс  входом управлени  чтением устройства, выходы которого  вл ютс  информационными выходами устройства, выход стробировани  дешифратора  вл етс  входом записи устройства, выход дешифратора подключен к первому входу первого элемента ИЛИ, второй вход которого подключен к первым входам второго и третьего элементов ИЛИ,  вл  сь входом сброса устройства, выход первого элемента ИЛИ подключен к второму вхо ду сброса группового блока приоритетных прерываний, первый БХОД сброса которого подключен к выходу третьего элемента ИЛИ и к входам сброса блоков приоритетных прерываний группы, второй вход третьего элемента ИЛИ  в- л етс  входом разрешени  прорывани  устройства, первый и второй входы первого элемента И  вл ютс  соответственно входами приема и подтверждени  прерывани  устройства, выход первого элемента И подключен к входу разрешени  шинного формировател  и к входу установки триггера, выход которого подключен к адресному входу первого мультиплексора и к перлону входу второго элемента И, второй вход которого  вл етс  вторым входом синхрони/за- ции устройства, а выход второго элемента И подключен к счетному входу счетчика, вход сброса которого подключен к-входу сброса устройства, а выход которого подключен к второму входу второго элемента ИЛИ, выход второго элемента ИЛИ подключен к вхо/ду сброса триггера.The second group of information inputs of the first multiplexer is connected to the group of information outputs of the priority interrupt group block, and the group of outputs of the first multiplexer is connected to the second group of address inputs of the interrupt memory block, the first enable input of the interrupt memory block is the receive input of the device, and the second The interrupt memory enable input is the read control input of the device whose outputs are information outputs of the device, the output of the decoder gating is the recording entry of the device, the output of the decoder is connected to the first input of the first OR element, the second input of which is connected to the first inputs of the second and third OR elements, is the device reset input, the output of the first OR element is connected to the second input of the priority group interrupts reset, the first inlet reset of which is connected to the output of the third element OR and to the reset inputs of the priority interrupt blocks of the group, the second input of the third element OR is the input to enable the device to break through, the first The first and second inputs of the first element I are, respectively, the inputs for receiving and confirming the interrupt of the device, the output of the first element I is connected to the enable input of the bus driver and to the input of the trigger setup, the output of which is connected to the address input of the first multiplexer and to the perlon input of the second element I, second the input of which is the second input of synchronization / device of the device, and the output of the second element I is connected to the counting input of the counter, the reset input of which is connected to the input input of the device, and the output of which is for prison to the second input of the second OR gate, the output of the second OR element connected to WMO / dy reset trigger. 2„ Устройство по п„ 1, отличающеес  тем, что групповой блок приоритетных прерываний содержит приоритетный шифратор, регистр теку- щего приоритета, схему сравнени , D-триггер и элемент И, причем информационные входы приоритетного шифра-2, a device according to claim 1, wherein the group block of priority interrupts contains a priority encoder, a current priority register, a comparison circuit, a D flip-flop and an AND element, the information inputs of the priority cipher 16210301621030 1414 00 5five 00 5five 0 0 00 5five тора  вл ютс  информационными входами группового блока приоритетных прерываний , информационный РЫХОД приоритетного шифратора подключен к информационному входу регистра текущего приоритета и к первому входу схемы сравнени , выход регистра текущего приоритета подк-лючен к второму входу схемы сравнени  и  вл етс  информационным выходом группового блока приоритетных прерываний, выход схемы сравнени  подключен к первому входу элемента И, второй вход которого подключен к сигнальному выходу приоритетного шифратора, третий вход элемента И  вл етс  входом синхронизации группового блока приоритетных прерываний, выход элемента И подключен к входу синхронизации D-триггера, информационный вход которого подключен к шине логической единицы устройства , выход D-триггера  вл етс  выходом запроса прерывани  группового блока приоритетных прерываний и подключен к входу синхронизации регистра текущего приоритета, вход сброса D-триггера  вл етс  первым входом сброса группового блока приоритетных прерываний, а вход сброса регистра текущего приоритета  вл етс  вторым входом сброса группового блока приоритетных прерываний,Toors are informational inputs of the priority interrupt group block, the information encoder of the priority encoder is connected to the information input of the current priority register and to the first input of the comparison circuit, the output of the current priority register is connected to the second input of the comparison circuit and is the information output of the group block of priority interrupts, the output of the comparison circuit is connected to the first input of the AND element, the second input of which is connected to the signal output of the priority encoder, the third input of the element This is the synchronization input of the group preemptive interrupt unit, the output of the And element is connected to the D-flip-flop synchronization input, the information input of which is connected to the bus of the logical unit of the device, the D-flip-flop output is the interrupt request output of the group preemptive interrupt and connected to the sync input the current priority register, the D-flip-flop input is the first reset input of the group block of priority interrupts, and the current priority register reset input is the second input reset unit group priority interrupts, 3, Устройство по пп. 1 и 2, отличающеес  тем, что каждый блок приоритетных прерываний группы содержит приоритетный шифратор, D- триггер и элемент И, причем информационные входы приоритетного шифратора  вл ютс  информационными входами блока приоритетных прерываний, информационные выходы приоритетного шифратора  вл ютс  информационными выходами блока приоритетных прерываний , сигнальный выход приоритетного шифратора подключен к первому входу элемента И, второй вход которого  вл етс  входом синхронизации блока приоритетных прерываний группы, а выход отемента И подключен к входу синхронизации D-триггера, информационный вход которого подключен к шине логической единицы устройства, выход Ь-триггсра  вл етс  выходом запроса прерывани  блока приоритетных прерываний группы, а вход сброса D- трнггера  вл етс  входом сброса блока приоритетных прерываний группы,,3, the Device in PP. 1 and 2, characterized in that each group's priority interrupt block contains a priority encoder, a D-trigger and an AND element, the information inputs of the priority encoder are information inputs of the priority interrupt block, the information outputs of the priority encoder are information outputs of the priority interrupt block, the signal the output of the priority encoder is connected to the first input of the AND element, the second input of which is the synchronization input of the group priority interrupt block, and the output of The input AND is connected to the D-flip-flop synchronization input, the information input of which is connected to the bus of the logical unit of the device, the L-flip-flop output is the group preemptive interrupt request interrupt request output, and the D-tringer reset input is the group preemptive reset input. Фиг. 1.FIG. one. х 27/7x 27/7 282282 27.1227.12 « в" at mi 2.1.2mi 2.1.2 2828 28.128.1 21.121.1 2.Щ 02.Shch 0 2.7.32.7.3 2929 30thirty 2.7(2 2 Z.N)2.7 (2 2 Z.N) Фиг. 2FIG. 2
SU884475897A 1988-08-23 1988-08-23 Interrupt device for microprocessor system SU1621030A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU884475897A SU1621030A1 (en) 1988-08-23 1988-08-23 Interrupt device for microprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU884475897A SU1621030A1 (en) 1988-08-23 1988-08-23 Interrupt device for microprocessor system

Publications (1)

Publication Number Publication Date
SU1621030A1 true SU1621030A1 (en) 1991-01-15

Family

ID=21396352

Family Applications (1)

Application Number Title Priority Date Filing Date
SU884475897A SU1621030A1 (en) 1988-08-23 1988-08-23 Interrupt device for microprocessor system

Country Status (1)

Country Link
SU (1) SU1621030A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР W 1546979, кл„ G 06 F 9/46, 19850 Березенко А.И. и др. Микропроцессорные комплекты повышенного быстродействи ,,- М.: Радио и св зь, 1981, с 40-50„ *

Similar Documents

Publication Publication Date Title
JPH0258649B2 (en)
GB1469299A (en) Circuit arrangement for data processing devices
US3680054A (en) Input/output channel
SU1621030A1 (en) Interrupt device for microprocessor system
GB2060943A (en) Electronic control for timing hammers in impact printers
US3623008A (en) Program-controlled data-processing system
SU1160427A1 (en) Selector channel
SU1029175A2 (en) Selector channel
SU1072045A1 (en) Device for program interruption
SU1026163A1 (en) Information writing/readout control device
SU1264174A1 (en) Device for servicing interrogations
SU1524062A2 (en) Device for interfacing digital computer with peripherals
SU1026138A1 (en) Device for interfacing magnetic tape store to digital computer
SU1403069A1 (en) Computer to peripherals interface
SU752318A1 (en) Multiplexor channel
SU521559A1 (en) Multiplex channel multiprocessor computing system
SU1594553A1 (en) Computer to subscriber interface
SU1621029A1 (en) Electronic computer for fast handling of interrupt signals
SU1193729A1 (en) Device for regenerating information in dynamic memory
SU1171790A1 (en) Control unit
SU1587523A2 (en) Two-channel device for interfacing two electronic machines
SU1474656A1 (en) Debugging unit
SU1464162A1 (en) Arrangement for checking and restarting an electronic computer
SU1062679A2 (en) Device for interface among digital computer and peripheral units
SU1559351A1 (en) Device for interfacing two computers