WO2017006398A1 - Interrupt control device and interrupt control method - Google Patents

Interrupt control device and interrupt control method Download PDF

Info

Publication number
WO2017006398A1
WO2017006398A1 PCT/JP2015/069312 JP2015069312W WO2017006398A1 WO 2017006398 A1 WO2017006398 A1 WO 2017006398A1 JP 2015069312 W JP2015069312 W JP 2015069312W WO 2017006398 A1 WO2017006398 A1 WO 2017006398A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
control
interrupt process
stack
monitoring
Prior art date
Application number
PCT/JP2015/069312
Other languages
French (fr)
Japanese (ja)
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 PCT/JP2015/069312 priority Critical patent/WO2017006398A1/en
Publication of WO2017006398A1 publication Critical patent/WO2017006398A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present invention relates to a technique for controlling an interrupt of a computer in which a control module for system control and a monitoring module for system monitoring are executed.
  • Small-scale embedded software installed in white goods includes a main task that is a single task process that performs basic processing and a plurality of control interrupt processes that are interrupt processes having different priorities.
  • the embedded software has two stack areas: a task stack which is a stack area used by the main task, and a control stack which is a stack area used by interrupt processing.
  • Patent Document 1 describes an interrupt control method in an embedded system.
  • the interrupt control method described in Patent Document 1 it is determined whether an interrupt has occurred during execution of the main task or whether multiple interrupts have occurred during execution of the control interrupt process.
  • the stack area pointed to by SP is switched from the task stack to the control stack.
  • the SP value indicating the task stack area used up to that point is stored.
  • the stack area pointed to by the SP is returned to a position in the middle of using the task stack by the stored SP value.
  • Patent Document 2 describes an interrupt control method for controlling interrupts from a plurality of programs having different interrupt priorities.
  • the CPU SP is provided as many as the number corresponding to the stage of the interrupt priority and whether the program is at the privilege level or the non-privilege level.
  • a stack area corresponding to the corresponding priority is set in advance for each SP.
  • the SP to be used is selected and switched from the interrupt priority and the number of times the interrupt is multiplexed.
  • monitoring interrupt processing which is interrupt processing for periodically monitoring the system state
  • the control interrupt process does not affect the operation of the monitor interrupt process.
  • the monitoring stack which is a stack area used for monitoring interrupt processing, must be separated from the control stack used for control interrupt processing.
  • the control interrupt processing is performed.
  • the purpose is not to affect the monitoring interrupt processing.
  • the interrupt control device is: The type of interrupt processing that is occurring is divided into monitoring interrupt processing that monitors the system and control interrupt processing that controls the system, and the control interrupt processing is processed during the operation of the monitoring interrupt processing, and An interrupt management unit that manages and manages the processing that occurs during non-operation of the monitoring interrupt processing, When a new interrupt process occurs, whether the newly generated new interrupt process is the monitoring interrupt process or the control interrupt process, the type of the interrupt process being generated managed by the interrupt management unit, and From the control pointer area for the control stack used in the control interrupt processing and the monitoring pointer area for the monitoring stack used in the monitoring interrupt processing, the stack indicating the data reading destination of the arithmetic unit An entry stack determination unit that determines whether to store the address value set in the pointer; A stack storage unit for switching the address value of the stack pointer after storing the address value set in the stack pointer in the storage destination determined by the entry stack determination unit.
  • the SP storage destination is determined from the generation source of the new interrupt and the interrupt processing that is occurring. This makes it possible to prevent the control interrupt processing from affecting the monitoring interrupt processing even when the CPU can use only one SP.
  • FIG. 1 is a hardware configuration diagram of an interrupt control device 100 according to Embodiment 1.
  • FIG. 1 is a functional configuration diagram of an interrupt control device 100 according to Embodiment 1.
  • FIG. 3 is a flowchart showing the operation of the interrupt control device 100 according to the first embodiment.
  • 3 is a flowchart showing entrance processing according to the first embodiment.
  • 3 is a flowchart showing entrance processing according to the first embodiment.
  • 5 is a flowchart showing exit processing according to the first embodiment. 5 is a flowchart showing exit processing according to the first embodiment.
  • FIG. *** Explanation of configuration *** FIG. 1 is a hardware configuration diagram of the interrupt control device 100 according to the first embodiment.
  • the interrupt control device 100 includes a CPU 101, a ROM 102 (Read Only Memory), a RAM 103 (Random Access Memory), and a peripheral device 104.
  • the CPU 101 is an arithmetic device that controls the interrupt control device 100.
  • the CPU 101 includes a PC 105 (program counter), a PSW 106 (processor status word), an SP 107, and a general-purpose register 108.
  • the PC 105 holds an address value in which an instruction to be executed next is stored.
  • the PSW 106 holds the internal state of the processor.
  • the SP 107 holds the address value of the stack area to which the CPU 101 reads data.
  • the general-purpose register 108 is a register that can be used for various purposes.
  • the ROM 102 includes an interrupt vector area 109, a control module code area 110, and a monitoring module code area 111.
  • the interrupt vector area 109 stores an address value indicating a movement destination when accepting interrupt processing.
  • the control module code area 110 stores the program code of the control module 201.
  • the monitoring module code area 111 stores the program code of the monitoring module 210.
  • the interrupt vector area 109 may store an address value for each interrupt factor, or may store one address value shared by all interrupt factors.
  • an address value indicating a position where a program code to be executed first of an interrupt control mechanism 213 described later is stored is stored as one address value shared by all interrupt factors.
  • the RAM 103 includes a control module data area 112, a monitoring module data area 113, a control module stack area 114, and a monitoring module stack area 115.
  • the control module data area 112 data used by the control module 201 is stored.
  • the monitoring module data area 113 stores data used by the monitoring module 210.
  • the control module stack area 114 and the monitoring module stack area 115 store information held in the PC 105 and the PSW 106.
  • the control module stack area 114 and the monitoring module stack area 115 are selectively used according to the value of SP107.
  • the term “stack area” when the term “stack area” is simply used, it means both the control module stack area 114 and the monitoring module stack area 115.
  • Peripheral device 104 is an input / output device such as a timer and an A / D (Analog / Digital) converter.
  • the peripheral device 104 notifies the CPU 101 of an interrupt signal under conditions set by software.
  • the CPU 101 When the interrupt signal is notified, the CPU 101 performs interrupt mask comparison or priority comparison, and determines whether or not to accept interrupt processing. If the CPU 101 determines to accept the interrupt processing, the CPU 101 saves the information held in the PC 105 and the PSW 106 in the stack area indicated by the SP 107, and then executes the instruction stored in the address value stored in the interrupt vector area 109. Execute.
  • FIG. 2 is a functional configuration diagram of the interrupt control device 100 according to the first embodiment.
  • the interrupt control device 100 includes a control module 201 for system control and a monitoring module 210 for system monitoring.
  • the control module 201 and the monitoring module 210 are stored in the ROM 102 and the RAM 103 as different load modules, and operate on the CPU 101.
  • the control module 201 includes a main task 202 that performs basic processing, a plurality of control interrupt processes 203 having different priorities, a task stack 204, a control stack 205, and an interrupt handler table 206.
  • the main task 202 uses the task stack 204 that is the control module stack area 114 during execution.
  • Each control interrupt process 203 shares and uses one control stack 205 which is the control module stack area 114 during execution.
  • the control interrupt process 203 includes a process having a lower interrupt priority than the monitor interrupt process 211 and a process having a higher interrupt priority.
  • the interrupt handler table 206 is a table in which an address value indicating a position where a program code to be executed at the beginning of the corresponding control interrupt process 203 is stored is held for each interrupt factor.
  • the monitoring module 210 includes a monitoring interrupt process 211, a monitoring stack 212, and an interrupt control mechanism 213.
  • the monitoring interrupt process 211 is periodically executed by an interrupt using a timer device which is the peripheral device 104, and monitors the system state.
  • the monitoring interrupt process 211 uses the monitoring stack 212 which is the monitoring module stack area 115 during execution. Here, there is only one monitoring interrupt process 211.
  • the interrupt control mechanism 213 executes an entrance process until the interrupt process corresponding to the interrupt factor is called, an interrupt process call, and an exit process when the interrupt process ends.
  • the interrupt control mechanism 213 includes an interrupt entry processing unit 220, an interrupt process calling unit 221, an interrupt exit processing unit 222, an interrupt management unit 223, and an SP storage unit 224.
  • the interrupt entry processing unit 220 executes entry processing.
  • the interrupt entry processing unit 220 includes a general-purpose register storage unit 225, an entry stack determination unit 226, and a stack storage unit 227.
  • the general-purpose register storage unit 225 stores information on the general-purpose register 108 that is not stored in the stack area by the CPU 101 when an interrupt occurs in the stack area indicated by the SP 107.
  • the entrance stack determination unit 226 determines the address of the SP 107 based on whether the new interrupt processing is the monitoring interrupt processing 211 or the control interrupt processing 203 and the type of interrupt processing that is being managed, which is managed by the interrupt management unit 223 described later. Determine where to save the value.
  • the entry stack determination unit 226 determines which of the control pointer area 235, the monitoring pointer area 236, and the task pointer area 237 is to be the storage destination of the address value of the SP 107. In addition, the entrance stack determination unit 226 switches the SP 107 based on whether the new interrupt processing is the monitoring interrupt processing 211 or the control interrupt processing 203 and the type of interrupt processing being generated managed by the interrupt management unit 223. Determine the value. The switching value is the address value of the stack area to be used next.
  • the stack storage unit 227 stores the address value set in the SP 107 in the storage destination determined by the entry stack determination unit 226, and then switches the address value of the SP 107 to a switching value.
  • the interrupt process call unit 221 calls the interrupt process corresponding to the interrupt factor of the newly generated interrupt. Note that when calling the control interrupt process 203, the interrupt process calling unit 221 refers to the interrupt handler table 206 and obtains an address value that is executed first in the control interrupt process 203 corresponding to the interrupt factor. Then, the interrupt process calling unit 221 calls the program code stored at the position indicated by the acquired address value.
  • the interrupt exit processing unit 222 executes exit processing.
  • the interrupt exit processing unit 222 includes an exit stack determination unit 228, a stack restoration unit 229, and a general-purpose register restoration unit 230.
  • the exit stack determination unit 228 determines whether the completed end interrupt processing is the control interrupt processing 203 or the monitoring interrupt processing 211, and the interrupt processing that is being managed, which is managed by the interrupt management unit 223. From which the address value of SP 107 is read.
  • the exit stack determination unit 228 determines which of the control pointer area 235, the monitoring pointer area 236, and the task pointer area 237 is to be the address value reading destination of the SP 107.
  • the stack return unit 229 sets the address value stored in the read destination determined by the exit stack determination unit 228 in the SP 107.
  • the general-purpose register return unit 230 sets the information set in the stack area indicated by the address value set in the SP 107 by the stack return unit 229 in the general-purpose register 108.
  • the interrupt exit processing unit 222 sets the PC 105 and the PSW 106 in the CPU 101 by using the interrupt return instruction provided by the CPU 101, and returns control to the CPU 101.
  • the interrupt management unit 223 manages information used for determining the stack area to be used in the interrupt entry processing unit 220 and the interrupt exit processing unit 222.
  • the interrupt management unit 223 determines the type of interrupt processing that is occurring as a monitoring interrupt processing 211, a high-priority control interrupt processing that is a control interrupt processing 203 that occurs during the operation of the monitoring interrupt processing 211, and a monitoring interrupt processing. Management is divided into low-priority control interrupt processing which is control interrupt processing 203 generated during non-operation of 211.
  • the interrupt management unit 223 includes a monitoring interrupt identification information storage unit 231, a high priority counter 232, a low priority counter 233, and a monitoring stack use flag 234.
  • the monitoring interrupt identification information storage unit 231 stores information for determining whether or not the new interrupt processing is the monitoring interrupt processing 211.
  • the monitoring interrupt identification information storage unit 231 stores the interrupt factor number used in the monitoring interrupt processing 211.
  • the high priority counter 232 counts the number of high priority control interrupt processes that are occurring.
  • the high priority counter 232 is incremented by 1 when a high priority control interrupt process occurs, and is decremented by 1 when it is completed.
  • the low priority counter 233 counts the number of low priority control interrupt processes that are occurring.
  • the low priority counter 233 is incremented by 1 when a low priority control interrupt process occurs, and is decremented by 1 when it is completed.
  • the monitoring stack use flag 234 is set when the monitoring interrupt processing 211 is generated, and is cleared when the monitoring stack processing is finished.
  • the SP storage unit 224 stores the address value of the SP 107 before switching the stack area.
  • the SP storage unit 224 includes a control pointer area 235, a monitoring pointer area 236, and a task pointer area 237.
  • the control pointer area 235 is an area for storing a storage position in the control stack 205 used in the control interrupt process 203.
  • the monitoring pointer area 236 is an area for storing a storage position in the monitoring stack 212 used in the monitoring interrupt process 211.
  • the task pointer area 237 is an area for storing a storage position in the task stack 204 used by the main task 202 that is executed when neither a control interrupt nor a monitoring interrupt occurs.
  • FIG. 3 is a flowchart showing the operation of the interrupt control device 100 according to the first embodiment.
  • the operation of the interrupt control device 100 according to the first embodiment corresponds to the interrupt control method according to the first embodiment.
  • the operation of the interrupt control device 100 according to the first embodiment corresponds to the processing of the interrupt control program according to the first embodiment.
  • the interrupt entrance processing unit 220 executes entrance processing when a new interrupt processing occurs.
  • the address value of SP 107 and the information of general register 108 are saved, and the address value of SP 107 is switched.
  • the interrupt process call unit 221 calls the interrupt process corresponding to the interrupt factor of the new interrupt process.
  • the interrupt exit processing unit 222 executes the exit process when the interrupt process ends.
  • the address value of the SP 107 and the information of the general register 108 are returned to the information before the interrupt, and the process is returned to the process before the interrupt.
  • FIGS. 4 and 5 are flowcharts showing the entrance processing according to the first embodiment.
  • the interrupt entry processing unit 220 starts the entry process. It is assumed that the value of the interrupt vector area 109 is set in advance. Here, it is assumed that it is set when the interrupt control device 100 is initialized.
  • the general-purpose register saving unit 225 saves the information of the general-purpose register 108 that is not saved in the stack by the CPU 101 in the stack area indicated by the address value of the SP 107.
  • the entrance stack determination unit 226 determines whether or not the new interrupt process is the monitoring interrupt process 211.
  • the entry stack determination unit 226 acquires the new interrupt processing factor number from the register of the ICU (Interrupt Control Unit), and when it matches the factor number stored in the monitoring interrupt identification information storage unit 231, It is determined that the process is the monitoring interrupt process 211. If the new interrupt process is the monitor interrupt process 211 (YES in S103), the entrance stack determination unit 226 advances the process to S104. On the other hand, when the new interrupt process is not the monitor interrupt process 211 (NO in S103), the entrance stack determination unit 226 advances the process to S111.
  • the entrance stack determination unit 226 determines the bottom value of the monitoring stack 212 as the switching value when the new interrupt processing is the monitoring interrupt processing 211.
  • the entry stack determination unit 226 determines whether the process being executed is the main task 202 or the control interrupt process 203 having a lower priority than the monitoring interrupt process 211. Determine using. Specifically, if the value of the low priority counter 233 is 0, the entry stack determination unit 226 determines that the process being executed is the main task 202, and the value of the low priority counter 233 is other than 0. If there is, it is determined that the process being executed is the control interrupt process 203. If the process being executed is the main task 202 (YES in S105), the entrance stack determination unit 226 advances the process to S106. On the other hand, when the process being executed is the control interrupt process 203 (NO in S105), the entrance stack determination unit 226 advances the process to S110.
  • the stack saving unit 227 saves the address value of SP107 in the task pointer area 237.
  • the entrance stack determination unit 226 sets the monitoring stack use flag 234.
  • the stack storage unit 227 switches the SP107 address value to the determined switching value.
  • the interrupt entrance processing unit 220 ends the entrance process.
  • the stack saving unit 227 saves the address value of SP107 in the control pointer area 235 when the process being executed is the control interrupt process 203.
  • the processing from S108 to S109 is as described above.
  • the entrance stack determination unit 226 determines whether the monitoring stack 212 is in use by using the monitoring stack use flag 234. Specifically, the entrance stack determination unit 226 determines that the monitoring stack 212 is in use if the monitoring stack use flag 234 is set. If the monitoring stack 212 is in use (YES in S111), the entrance stack determination unit 226 advances the process to S112. On the other hand, when the monitoring stack 212 is not in use (NO in S111), the entrance stack determination unit 226 advances the process to S118.
  • the entrance stack determination unit 226 determines whether the high priority counter 232 is 0 when the monitoring stack 212 is in use. When the high priority counter 232 is 0, it means that multiple high priority control interrupt processes have not occurred. When the high priority counter 232 is 0 (YES in S112), the entrance stack determination unit 226 advances the process to S113. On the other hand, when the high priority counter 232 is not 0 (NO in S112), the entrance stack determination unit 226 advances the process to S116.
  • the entrance stack determination unit 226 determines whether the low priority counter 233 is 0 when the high priority counter 232 is 0. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs. When the low priority counter 233 is 0 (YES in S113), the entrance stack determination unit 226 advances the process to S114. On the other hand, when the low priority counter 233 is not 0 (NO in S113), the entrance stack determination unit 226 advances the process to S117.
  • the entry stack determination unit 226 uses the bottom value of the control stack 205 as the switching value because the control stack 205 is unused when the low priority counter 233 is 0. decide.
  • the stack saving unit 227 saves the SP107 value in the monitoring pointer area 236.
  • the entrance stack determination unit 226 adds 1 to the value of the high priority counter 232.
  • the processing from S108 to S109 is as described above.
  • the entry stack determination unit 226 uses the value stored in the control pointer area 235 because the control stack 205 is in use when the low priority counter 233 is not 0. Determine the switching value.
  • the processing from S115 to S116 and the processing from S108 to S109 are as described above.
  • the entrance stack determination unit 226 determines whether the low priority counter 233 is 0 when the monitoring stack 212 is not in use. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred and the main task 202 has been executed before the monitoring interrupt process 211 occurs. If the low priority counter 233 is 0 (YES in S118), the entrance stack determination unit 226 advances the process to S119. On the other hand, when the low priority counter 233 is not 0 (NO in S118), the entrance stack determination unit 226 advances the process to S121.
  • the entrance stack determination unit 226 uses the bottom value of the control stack 205 as the switching value because the control stack 205 is unused when the low priority counter 233 is 0. decide.
  • the stack saving unit 227 saves the SP107 value in the task pointer area 237.
  • the entrance stack determination unit 226 adds 1 to the value of the low priority counter 233.
  • the processing from S108 to S109 is as described above.
  • FIGS. 6 and 7 are flowcharts showing the exit processing according to the first embodiment.
  • the interrupt processing ends, control is transferred from the interrupt processing calling unit 221 to the interrupt exit processing unit 222, and the interrupt exit processing unit 222 starts exit processing.
  • the exit stack determination unit 228 determines whether or not the completed end interrupt process is the monitoring interrupt process 211.
  • the exit stack determination unit 228 acquires the cause number of the end interrupt process from the register of the ICU, and when the exit interrupt process matches the cause number stored in the monitor interrupt identification information storage unit 231, the exit interrupt process is the monitor interrupt process. 211. If the end interrupt process is the monitoring interrupt process 211 (YES in S302), the exit stack determination unit 228 advances the process to S303. On the other hand, when the end interrupt process is not the monitoring interrupt process 211 (NO in S302), the exit stack determination unit 228 advances the process to S310.
  • the exit stack determining unit 228 clears the monitor stack use flag 234 when the end interrupt process is the monitor interrupt process 211.
  • the exit stack determination unit 228 determines whether the low priority counter 233 is zero. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs. If the low priority counter 233 is 0 (YES in S304), the exit stack determination unit 228 advances the process to S305. On the other hand, when the low priority counter 233 is not 0 (NO in S304), the exit stack determination unit 228 advances the process to S309.
  • the stack recovery unit 229 uses the value stored in the task pointer area 237 as the SP107 because the low priority control interrupt process has not occurred when the low priority counter 233 is 0. Set to.
  • the general-purpose register restoration unit 230 stores the information stored in the stack area indicated by the address value set in the SP 107 in the general-purpose register 108.
  • the interrupt exit processing unit 222 executes the interrupt return instruction.
  • the interrupt exit processing unit 222 terminates the exit process.
  • the stack return unit 229 In the SP value return process of S309, the stack return unit 229 generates a low priority control interrupt process when the low priority counter 233 is not 0, so the value stored in the control pointer area 235 is set to SP107. Set.
  • the processing from S306 to S308 is as described above.
  • the exit stack determination unit 228 determines whether the monitoring stack 212 is in use by using the monitoring stack use flag 234. Specifically, the exit stack determination unit 228 determines that the monitoring stack 212 is in use if the monitoring stack use flag 234 is set. If the monitoring stack 212 is in use (YES in S310), the exit stack determination unit 228 advances the process to S311. On the other hand, when the monitoring stack 212 is not in use (NO in S310), the exit stack determination unit 228 advances the process to S316.
  • the exit stack determination unit 228 subtracts 1 from the value of the high priority counter 232 because the high priority control interrupt process is completed when the monitoring stack 212 is in use.
  • the exit stack determination unit 228 determines whether the high priority counter 232 is zero. If the high priority counter 232 is 0, no other high priority control interrupt processing has occurred. If the high priority counter 232 is 0 (YES in S312), the exit stack determination unit 228 advances the process to S313. On the other hand, when the high priority counter 232 is not 0 (NO in S312), the exit stack determination unit 228 advances the process to S306.
  • the exit stack determination unit 228 determines whether the low priority counter 233 is 0. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs. If the low priority counter 233 is 0 (YES in S313), the exit stack determination unit 228 advances the process to S314. On the other hand, when the low priority counter 233 is not 0 (NO in S313), the exit stack determination unit 228 advances the process to S315.
  • the stack recovery unit 229 sets the value stored in the monitoring pointer area 236 to SP107.
  • the processing from S306 to S308 is as described above.
  • the stack restoration unit 229 saves the value of SP107 in the control pointer area 235 when the low priority counter 233 is not zero. After that, the stack restoration unit 229 sets the value stored in the monitoring pointer area 236 in S ⁇ b> 314 in the SP 107. By storing the value of SP 107 in the control pointer area 235, it is possible to return the process from the middle of the control stack 205 when the monitoring interrupt process 211 is completed.
  • the processing from S306 to S308 is as described above.
  • the exit stack determination unit 228 subtracts 1 from the value of the low priority counter 233 because the low priority control interrupt process is completed.
  • the exit stack determination unit 228 determines whether the low priority counter 233 is zero. When the low priority counter 233 is 0, no other low priority control interrupt processing has occurred, and the main task 202 has been executed before the occurrence of the interrupt processing. If the low priority counter 233 is 0 (YES in S317), the exit stack determination unit 228 advances the process to S318. On the other hand, when the low priority counter 233 is not 0 (NO in S317), the exit stack determination unit 228 advances the process to S306.
  • the stack return unit 229 sets the value stored in the task pointer area 237 to SP107.
  • the processing from S306 to S308 is as described above.
  • the interrupt control device 100 has an appropriate process based on the interrupt processing that has occurred or ended in the interrupt entry processing and exit processing, and the type of interrupt processing that is occurring. Switch to the stack area. As a result, even when a high priority control interrupt process occurs during the execution of the monitoring interrupt process 211, it is possible to control so that the high priority control interrupt process does not use the monitoring stack 212. Therefore, it is possible to ensure that the control interrupt process 203 does not affect the monitoring interrupt process 211 even when the CPU 101 can use only one SP 107.
  • the control stack 205 can be used. Therefore, it is possible to share and use one stack in the control interrupt process 203.
  • the interrupt vector area 109 is provided in the ROM 102. However, the interrupt vector area 109 may be provided in the RAM 103.
  • the value stored in the SP storage unit 224 is stored in the RAM 103 as a global variable.
  • the value stored in the SP storage unit 224 may be stored in a stack area used in the interrupt processing that has occurred.
  • 100 interrupt control device 101 CPU, 102 ROM, 103 RAM, 104 peripheral device, 105 PC, 106 PSW, 107 SP, 108 general purpose register, 109 interrupt vector area, 110 control module code area, 111 monitoring module code area, 112 control Module data area, 113 Monitor module data area, 114 Control module stack area, 115 Monitor module stack area, 201 Control module, 202 Main task, 203 Control interrupt processing, 204 Task stack, 205 Control stack, 206 Interrupt handler table, 210 Monitor Module, 211 monitoring interrupt processing, 212 monitoring stack, 213 interrupt control mechanism, 220 interrupt entry processing unit, 2 1 interrupt processing call unit, 222 interrupt exit processing unit, 223 interrupt management unit, 224 SP storage unit, 225 general register storage unit, 226 entrance stack determination unit, 227 stack storage unit, 228 exit stack determination unit, 229 stack return unit, 230 General register return unit, 231 monitoring interrupt specific information storage unit, 232 high priority counter, 233 low priority counter, 234 monitoring stack use flag, 235 control pointer area, 236 monitoring

Abstract

An interrupt control mechanism (213) manages the classification of an interrupt process that has been generated as a system monitoring interrupt process (211), a control interrupt process (203) generated while the monitoring interrupt process (211) is in operation, and a control interrupt process (203) generated while said process (211) is not in operation. In an entry process when an interrupt process is generated and an exit process when an interrupt process has finished, a stack area in which the stack pointer (SP) of a CPU is saved and from which the SP is restored is determined by the interrupt control mechanism (213) based on whether the generated or finished interrupt process is the monitoring interrupt process (211) or the control interrupt process (203), and on the classification of the interrupt process being generated.

Description

割込み制御装置及び割込み制御方法Interrupt control device and interrupt control method
 この発明は、システム制御用の制御モジュールと、システム監視用の監視モジュールとが実行される計算機の割込みを制御する技術に関する。 The present invention relates to a technique for controlling an interrupt of a computer in which a control module for system control and a monitoring module for system monitoring are executed.
 小規模な組込みシステム向けのCPU(Central Processing Unit)では、SP(スタックポインタ)を1つしか実装していない場合が多い。
 白物家電に導入される小規模な組込みソフトウェアは、基本処理を行う単一のタスク処理であるメインタスクと、異なる優先度を持つ割込み処理である複数の制御割込み処理とから構成される。組込みソフトウェアは、メインタスクが使用するスタック領域であるタスクスタックと、割込み処理が使用するスタック領域である制御スタックとの2つのスタック領域を持つ。
CPUs (Central Processing Units) for small embedded systems often have only one SP (stack pointer) mounted.
Small-scale embedded software installed in white goods includes a main task that is a single task process that performs basic processing and a plurality of control interrupt processes that are interrupt processes having different priorities. The embedded software has two stack areas: a task stack which is a stack area used by the main task, and a control stack which is a stack area used by interrupt processing.
 特許文献1には、組込みシステムにおける割込み制御方法が記載されている。
 特許文献1に記載された割込み制御方法では、割込みがメインタスク実行中に発生したのか、割込みが制御割込み処理実行中に多重発生したのかが判定される。
 割込みがメインタスク実行中に発生した場合には、SPが指すスタック領域が、タスクスタックから制御スタックに切り替えられる。切り替えが行われる際には、その時点までに使用していたタスクスタックの領域を指すSPの値が保存される。割込み処理が終了してメインタスクに復帰する際には、保存されたSPの値により、SPが指すスタック領域がタスクスタックの使用途中の位置に戻される。
Patent Document 1 describes an interrupt control method in an embedded system.
In the interrupt control method described in Patent Document 1, it is determined whether an interrupt has occurred during execution of the main task or whether multiple interrupts have occurred during execution of the control interrupt process.
When an interrupt occurs during execution of the main task, the stack area pointed to by SP is switched from the task stack to the control stack. When switching is performed, the SP value indicating the task stack area used up to that point is stored. When the interrupt process ends and the process returns to the main task, the stack area pointed to by the SP is returned to a position in the middle of using the task stack by the stored SP value.
 特許文献2には、割込み優先度が異なる複数のプログラムからの割込みを制御する割込み制御方法が記載されている。
 特許文献2に記載された割込み制御方法では、CPUのSPが割込み優先度の段階と、プログラムが特権レベルであるか非特権レベルであるかとに応じた個数分だけ設けられていると認められる。そして、各SPには対応する優先度に応じたスタック領域が事前に設定されていると認められる。割込み発生時には、割込み優先度と割込みの多重回数とから使用するSPが選択され切り替えられる。
Patent Document 2 describes an interrupt control method for controlling interrupts from a plurality of programs having different interrupt priorities.
In the interrupt control method described in Patent Document 2, it is recognized that the CPU SP is provided as many as the number corresponding to the stage of the interrupt priority and whether the program is at the privilege level or the non-privilege level. Then, it is recognized that a stack area corresponding to the corresponding priority is set in advance for each SP. When an interrupt occurs, the SP to be used is selected and switched from the interrupt priority and the number of times the interrupt is multiplexed.
特開2005-050208号公報JP-A-2005-050208 特開平08-320794号公報Japanese Patent Laid-Open No. 08-320794
 近年、システムの安全性向上が求められており、IEC61508といった機能安全規格への対応が求められるようになってきている。
 機能安全規格に対応するための1つの方法として、メインタスクと制御割込み処理とに加えて、システムの状態を周期的に監視する割込み処理である監視割込み処理を追加する方法がある。この方法では、制御割込み処理が監視割込み処理の動作に影響を与えないことを保証しなければならない。そのため、制御割込み処理と監視割込み処理とが持つコード領域と、データ領域と、スタック領域とを異なるロードモジュールとして分離することが必須となる。つまり、監視割込み処理で使用するスタック領域である監視スタックを制御割込み処理で使用する制御スタックと分離して持たなければならない。
In recent years, there has been a demand for improving the safety of systems, and it has been required to comply with functional safety standards such as IEC61508.
As one method for complying with the functional safety standard, there is a method of adding monitoring interrupt processing, which is interrupt processing for periodically monitoring the system state, in addition to the main task and control interrupt processing. In this method, it must be ensured that the control interrupt process does not affect the operation of the monitor interrupt process. For this reason, it is essential to separate the code area, data area, and stack area of the control interrupt process and the monitoring interrupt process as different load modules. In other words, the monitoring stack, which is a stack area used for monitoring interrupt processing, must be separated from the control stack used for control interrupt processing.
 単一CPU上で、制御割込み処理を行うロードモジュールである制御モジュールと、監視割込み処理を行うロードモジュールである監視モジュールとの2つを動作させるとする。
 特許文献1に記載した割込み制御方法では、監視スタックを使用する監視割込み処理を実行中に、より高い優先度を持つ制御割込み処理が発生した場合に、SPが指すスタック領域を切り替える手段がない。そのため、高優先度の制御割込み処理が引き続き監視スタックを使用することになってしまう。したがって、制御割込み処理が監視割込み処理へ影響を与えないことを保証することができない。
 特許文献2に記載された割込み制御方法では、CPUにSPが割込み優先度の段階に応じた個数分実装されている必要がある。そのため、SPが1つしか実装されていないCPUには適用できない。
It is assumed that a control module that is a load module that performs control interrupt processing and a monitoring module that is a load module that performs monitoring interrupt processing are operated on a single CPU.
In the interrupt control method described in Patent Document 1, there is no means for switching the stack area pointed to by SP when a control interrupt process having a higher priority occurs during execution of the monitor interrupt process using the monitor stack. Therefore, high priority control interrupt processing will continue to use the monitoring stack. Therefore, it cannot be guaranteed that the control interrupt process does not affect the monitoring interrupt process.
In the interrupt control method described in Patent Document 2, it is necessary that the number of SPs corresponding to the interrupt priority level is mounted on the CPU. Therefore, it cannot be applied to a CPU on which only one SP is mounted.
 この発明は、CPUがSPを1つしか実装していない場合、及び、CPUがSPを2つ以上実装していてもソフトウェアの設定により1つしか利用しない場合であっても、制御割込み処理が監視割込み処理へ影響を与えないようにすることを目的とする。 In the present invention, even when the CPU has only one SP, and even when the CPU has two or more SPs and only one SP is used due to software settings, the control interrupt processing is performed. The purpose is not to affect the monitoring interrupt processing.
 この発明に係る割込み制御装置は、
 発生中の割込み処理の種別を、システムを監視する監視割込み処理と、前記システムを制御する制御割込み処理とに分け、前記制御割込み処理を、前記監視割込み処理の動作中に発生した処理と、前記監視割込み処理の非動作中に発生した処理とに分けて、管理する割込み管理部と、
 新たに割込み処理が発生した場合に、新たに発生した新割込み処理が前記監視割込み処理と前記制御割込み処理との何れであるかと、前記割込み管理部によって管理される発生中の割込み処理の種別とから、前記制御割込み処理で使用される制御スタックのための制御ポインタ領域と、前記監視割込み処理で使用される監視スタックのための監視ポインタ領域との何れを、演算装置のデータ読込先を示すスタックポインタに設定されたアドレス値の保存先にするかを決定する入口スタック決定部と、
 前記入口スタック決定部によって決定された保存先に前記スタックポインタに設定されたアドレス値を保存した上で、前記スタックポインタのアドレス値を切り替えるスタック保存部と
を備える。
The interrupt control device according to the present invention is:
The type of interrupt processing that is occurring is divided into monitoring interrupt processing that monitors the system and control interrupt processing that controls the system, and the control interrupt processing is processed during the operation of the monitoring interrupt processing, and An interrupt management unit that manages and manages the processing that occurs during non-operation of the monitoring interrupt processing,
When a new interrupt process occurs, whether the newly generated new interrupt process is the monitoring interrupt process or the control interrupt process, the type of the interrupt process being generated managed by the interrupt management unit, and From the control pointer area for the control stack used in the control interrupt processing and the monitoring pointer area for the monitoring stack used in the monitoring interrupt processing, the stack indicating the data reading destination of the arithmetic unit An entry stack determination unit that determines whether to store the address value set in the pointer;
A stack storage unit for switching the address value of the stack pointer after storing the address value set in the stack pointer in the storage destination determined by the entry stack determination unit.
 この発明では、新割込みの発生元と発生中の割込み処理とから、SPの保存先を決定する。これにより、CPUが利用可能なSPが1つである場合でも、制御割込み処理が監視割込み処理へ影響を与えないようにすることが可能となる。 In the present invention, the SP storage destination is determined from the generation source of the new interrupt and the interrupt processing that is occurring. This makes it possible to prevent the control interrupt processing from affecting the monitoring interrupt processing even when the CPU can use only one SP.
実施の形態1に係る割込み制御装置100のハードウェア構成図。1 is a hardware configuration diagram of an interrupt control device 100 according to Embodiment 1. FIG. 実施の形態1に係る割込み制御装置100の機能構成図。1 is a functional configuration diagram of an interrupt control device 100 according to Embodiment 1. FIG. 実施の形態1に係る割込み制御装置100の動作を示すフローチャート。3 is a flowchart showing the operation of the interrupt control device 100 according to the first embodiment. 実施の形態1に係る入口処理を示すフローチャート。3 is a flowchart showing entrance processing according to the first embodiment. 実施の形態1に係る入口処理を示すフローチャート。3 is a flowchart showing entrance processing according to the first embodiment. 実施の形態1に係る出口処理を示すフローチャート。5 is a flowchart showing exit processing according to the first embodiment. 実施の形態1に係る出口処理を示すフローチャート。5 is a flowchart showing exit processing according to the first embodiment.
 実施の形態1.
 ***構成の説明***
 図1は、実施の形態1に係る割込み制御装置100のハードウェア構成図である。
 割込み制御装置100は、CPU101と、ROM102(Read Only Memory)と、RAM103(Random Access Memory)と、周辺デバイス104とを備える。
Embodiment 1 FIG.
*** Explanation of configuration ***
FIG. 1 is a hardware configuration diagram of the interrupt control device 100 according to the first embodiment.
The interrupt control device 100 includes a CPU 101, a ROM 102 (Read Only Memory), a RAM 103 (Random Access Memory), and a peripheral device 104.
 CPU101は、割込み制御装置100の制御を行う演算装置である。CPU101は、PC105(プログラムカウンタ)と、PSW106(プロセッサステータスワード)と、SP107と、汎用レジスタ108とを備える。
 PC105は、次に実行する命令が格納されたアドレス値を保持する。PSW106は、プロセッサの内部状態を保持する。SP107は、CPU101のデータ読込先のスタック領域のアドレス値を保持する。汎用レジスタ108は、様々な用途に使用可能なレジスタである。
The CPU 101 is an arithmetic device that controls the interrupt control device 100. The CPU 101 includes a PC 105 (program counter), a PSW 106 (processor status word), an SP 107, and a general-purpose register 108.
The PC 105 holds an address value in which an instruction to be executed next is stored. The PSW 106 holds the internal state of the processor. The SP 107 holds the address value of the stack area to which the CPU 101 reads data. The general-purpose register 108 is a register that can be used for various purposes.
 ROM102は、割込みベクタ領域109と、制御モジュールコード領域110と、監視モジュールコード領域111とを備える。
 割込みベクタ領域109は、割込み処理を受理する場合の移動先を示すアドレス値が記憶されている。制御モジュールコード領域110は、制御モジュール201のプログラムコードが記憶されている。監視モジュールコード領域111は、監視モジュール210のプログラムコードが記憶されている。
 なお、割込みベクタ領域109は、割込み要因毎にアドレス値が記憶されていてもよいし、全ての割込み要因に共有する1つのアドレス値が記憶されていてもよい。ここでは、割込みベクタ領域109には、全ての割込み要因に共有する1つのアドレス値として、後述する割込み制御機構213の最初に実行されるプログラムコードが格納された位置を示すアドレス値が記憶されているとする。
The ROM 102 includes an interrupt vector area 109, a control module code area 110, and a monitoring module code area 111.
The interrupt vector area 109 stores an address value indicating a movement destination when accepting interrupt processing. The control module code area 110 stores the program code of the control module 201. The monitoring module code area 111 stores the program code of the monitoring module 210.
Note that the interrupt vector area 109 may store an address value for each interrupt factor, or may store one address value shared by all interrupt factors. Here, in the interrupt vector area 109, an address value indicating a position where a program code to be executed first of an interrupt control mechanism 213 described later is stored is stored as one address value shared by all interrupt factors. Suppose that
 RAM103は、制御モジュールデータ領域112と、監視モジュールデータ領域113と、制御モジュールスタック領域114と、監視モジュールスタック領域115とを備える。
 制御モジュールデータ領域112は、制御モジュール201が使用するデータが記憶される。監視モジュールデータ領域113は、監視モジュール210が使用するデータが記憶される。制御モジュールスタック領域114と、監視モジュールスタック領域115とは、PC105とPSW106とに保持された情報が記憶される。制御モジュールスタック領域114と、監視モジュールスタック領域115とは、SP107の値に応じて使い分けされる。なお、以下の説明において、単に“スタック領域”と言った場合、制御モジュールスタック領域114と、監視モジュールスタック領域115との両方を意味する。
The RAM 103 includes a control module data area 112, a monitoring module data area 113, a control module stack area 114, and a monitoring module stack area 115.
In the control module data area 112, data used by the control module 201 is stored. The monitoring module data area 113 stores data used by the monitoring module 210. The control module stack area 114 and the monitoring module stack area 115 store information held in the PC 105 and the PSW 106. The control module stack area 114 and the monitoring module stack area 115 are selectively used according to the value of SP107. In the following description, when the term “stack area” is simply used, it means both the control module stack area 114 and the monitoring module stack area 115.
 周辺デバイス104は、タイマとA/D(Analog/Degital)コンバータとのような入出力デバイスである。周辺デバイス104は、ソフトウェアにより設定された条件の下で、CPU101に割込み信号を通知する。 Peripheral device 104 is an input / output device such as a timer and an A / D (Analog / Digital) converter. The peripheral device 104 notifies the CPU 101 of an interrupt signal under conditions set by software.
 CPU101は、割込み信号が通知されると、割込みマスク比較、又は、優先度比較を行い、割込み処理を受理するか否かを判定する。CPU101は、割込み処理を受理すると判定した場合、SP107が示すスタック領域に、PC105とPSW106とに保持された情報を保存した上で、割込みベクタ領域109に記憶されたアドレス値に格納された命令を実行する。 When the interrupt signal is notified, the CPU 101 performs interrupt mask comparison or priority comparison, and determines whether or not to accept interrupt processing. If the CPU 101 determines to accept the interrupt processing, the CPU 101 saves the information held in the PC 105 and the PSW 106 in the stack area indicated by the SP 107, and then executes the instruction stored in the address value stored in the interrupt vector area 109. Execute.
 図2は、実施の形態1に係る割込み制御装置100の機能構成図である。
 ここでは、割込み制御装置100は、システム制御用の制御モジュール201と、システム監視用の監視モジュール210とを備える。制御モジュール201と監視モジュール210とは、異なるロードモジュールとしてROM102とRAM103とに格納され、CPU101上で動作する。
FIG. 2 is a functional configuration diagram of the interrupt control device 100 according to the first embodiment.
Here, the interrupt control device 100 includes a control module 201 for system control and a monitoring module 210 for system monitoring. The control module 201 and the monitoring module 210 are stored in the ROM 102 and the RAM 103 as different load modules, and operate on the CPU 101.
 制御モジュール201は、基本処理を行うメインタスク202と、異なる優先度を持つ複数の制御割込み処理203と、タスクスタック204と、制御スタック205と、割込みハンドラテーブル206とを備える。
 メインタスク202は、実行中に制御モジュールスタック領域114であるタスクスタック204を使用する。
 各制御割込み処理203は、実行中に、制御モジュールスタック領域114である1つの制御スタック205を共有して使用する。制御割込み処理203には、監視割込み処理211よりも割込みの優先度が低いものと、割込みの優先度が高いものとが存在する。
 割込みハンドラテーブル206は、割込み要因毎に、対応する制御割込み処理203の最初に実行されるプログラムコードが格納された位置を示すアドレス値が保持されたテーブルである。
The control module 201 includes a main task 202 that performs basic processing, a plurality of control interrupt processes 203 having different priorities, a task stack 204, a control stack 205, and an interrupt handler table 206.
The main task 202 uses the task stack 204 that is the control module stack area 114 during execution.
Each control interrupt process 203 shares and uses one control stack 205 which is the control module stack area 114 during execution. The control interrupt process 203 includes a process having a lower interrupt priority than the monitor interrupt process 211 and a process having a higher interrupt priority.
The interrupt handler table 206 is a table in which an address value indicating a position where a program code to be executed at the beginning of the corresponding control interrupt process 203 is stored is held for each interrupt factor.
 監視モジュール210は、監視割込み処理211と、監視スタック212と、割込み制御機構213とを備える。
 監視割込み処理211は、周辺デバイス104であるタイマデバイスを用いた割込みにより周期的に実行され、システムの状態を監視する。監視割込み処理211は、実行中に、監視モジュールスタック領域115である監視スタック212を使用する。ここでは、監視割込み処理211は1つのみである。
 割込み制御機構213は、新たに割込み処理が発生した場合に、割込み要因に応じた割込み処理を呼び出すまでの入口処理と、割込み処理の呼び出しと、割込み処理が終了した場合の出口処理とを実行する。割込み制御機構213は、割込み入口処理部220と、割込み処理呼出部221と、割込み出口処理部222と、割込み管理部223と、SP保存部224とを備える。
The monitoring module 210 includes a monitoring interrupt process 211, a monitoring stack 212, and an interrupt control mechanism 213.
The monitoring interrupt process 211 is periodically executed by an interrupt using a timer device which is the peripheral device 104, and monitors the system state. The monitoring interrupt process 211 uses the monitoring stack 212 which is the monitoring module stack area 115 during execution. Here, there is only one monitoring interrupt process 211.
When a new interrupt process occurs, the interrupt control mechanism 213 executes an entrance process until the interrupt process corresponding to the interrupt factor is called, an interrupt process call, and an exit process when the interrupt process ends. . The interrupt control mechanism 213 includes an interrupt entry processing unit 220, an interrupt process calling unit 221, an interrupt exit processing unit 222, an interrupt management unit 223, and an SP storage unit 224.
 割込み入口処理部220は、入口処理を実行する。割込み入口処理部220は、汎用レジスタ保存部225と、入口スタック決定部226と、スタック保存部227とを備える。
 汎用レジスタ保存部225は、割込み発生時にCPU101によりスタック領域に保存がされていない汎用レジスタ108の情報をSP107が指すスタック領域に保存する。
 入口スタック決定部226は、新割込み処理が監視割込み処理211と制御割込み処理203との何れであるかと、後述する割込み管理部223によって管理される発生中の割込み処理の種別とから、SP107のアドレス値の保存先を決定する。入口スタック決定部226は、制御ポインタ領域235と監視ポインタ領域236とタスクポインタ領域237との何れを、SP107のアドレス値の保存先にするかを決定する。また、入口スタック決定部226は、新割込み処理が監視割込み処理211と制御割込み処理203との何れであるかと、割込み管理部223によって管理される発生中の割込み処理の種別とから、SP107の切替値を決定する。切替値は、次に使用するスタック領域のアドレス値である。
 スタック保存部227は、入口スタック決定部226によって決定された保存先にSP107に設定されたアドレス値を保存した上で、SP107のアドレス値を切替値に切り替える。
The interrupt entry processing unit 220 executes entry processing. The interrupt entry processing unit 220 includes a general-purpose register storage unit 225, an entry stack determination unit 226, and a stack storage unit 227.
The general-purpose register storage unit 225 stores information on the general-purpose register 108 that is not stored in the stack area by the CPU 101 when an interrupt occurs in the stack area indicated by the SP 107.
The entrance stack determination unit 226 determines the address of the SP 107 based on whether the new interrupt processing is the monitoring interrupt processing 211 or the control interrupt processing 203 and the type of interrupt processing that is being managed, which is managed by the interrupt management unit 223 described later. Determine where to save the value. The entry stack determination unit 226 determines which of the control pointer area 235, the monitoring pointer area 236, and the task pointer area 237 is to be the storage destination of the address value of the SP 107. In addition, the entrance stack determination unit 226 switches the SP 107 based on whether the new interrupt processing is the monitoring interrupt processing 211 or the control interrupt processing 203 and the type of interrupt processing being generated managed by the interrupt management unit 223. Determine the value. The switching value is the address value of the stack area to be used next.
The stack storage unit 227 stores the address value set in the SP 107 in the storage destination determined by the entry stack determination unit 226, and then switches the address value of the SP 107 to a switching value.
 割込み処理呼出部221は、新たに発生した割込みの割込み要因に対応する割込み処理を呼び出す。
 なお、割込み処理呼出部221は、制御割込み処理203を呼び出す場合には、割込みハンドラテーブル206を参照し、割込み要因に対応する制御割込み処理203の最初に実行されるアドレス値を取得する。そして、割込み処理呼出部221は、取得したアドレス値が示す位置に格納されたプログラムコードを呼び出す。
The interrupt process call unit 221 calls the interrupt process corresponding to the interrupt factor of the newly generated interrupt.
Note that when calling the control interrupt process 203, the interrupt process calling unit 221 refers to the interrupt handler table 206 and obtains an address value that is executed first in the control interrupt process 203 corresponding to the interrupt factor. Then, the interrupt process calling unit 221 calls the program code stored at the position indicated by the acquired address value.
 割込み出口処理部222は、出口処理を実行する。割込み出口処理部222は、出口スタック決定部228と、スタック復帰部229と、汎用レジスタ復帰部230とを備える。
 出口スタック決定部228は、割込み処理が終了した場合に、終了した終了割込み処理が制御割込み処理203と監視割込み処理211との何れであるかと、割込み管理部223によって管理される発生中の割込み処理の種別とから、SP107のアドレス値の読込先を決定する。出口スタック決定部228は、制御ポインタ領域235と監視ポインタ領域236とタスクポインタ領域237との何れを、SP107のアドレス値の読込先にするかを決定する。
 スタック復帰部229は、出口スタック決定部228によって決定された読込先に保存されたアドレス値をSP107に設定する。
 汎用レジスタ復帰部230は、スタック復帰部229によってSP107に設定されたアドレス値が示すスタック領域に設定された情報を、汎用レジスタ108に設定する。
 最後に、割込み出口処理部222は、CPU101が提供する割込み復帰命令を用いることにより、CPU101にPC105とPSW106とを設定して、CPU101に制御を戻す。
The interrupt exit processing unit 222 executes exit processing. The interrupt exit processing unit 222 includes an exit stack determination unit 228, a stack restoration unit 229, and a general-purpose register restoration unit 230.
When the interrupt processing is completed, the exit stack determination unit 228 determines whether the completed end interrupt processing is the control interrupt processing 203 or the monitoring interrupt processing 211, and the interrupt processing that is being managed, which is managed by the interrupt management unit 223. From which the address value of SP 107 is read. The exit stack determination unit 228 determines which of the control pointer area 235, the monitoring pointer area 236, and the task pointer area 237 is to be the address value reading destination of the SP 107.
The stack return unit 229 sets the address value stored in the read destination determined by the exit stack determination unit 228 in the SP 107.
The general-purpose register return unit 230 sets the information set in the stack area indicated by the address value set in the SP 107 by the stack return unit 229 in the general-purpose register 108.
Finally, the interrupt exit processing unit 222 sets the PC 105 and the PSW 106 in the CPU 101 by using the interrupt return instruction provided by the CPU 101, and returns control to the CPU 101.
 割込み管理部223は、割込み入口処理部220と割込み出口処理部222において、使用するスタック領域の決定処理で利用される情報を管理する。特に、割込み管理部223は、発生中の割込み処理の種別を、監視割込み処理211と、監視割込み処理211の動作中に発生した制御割込み処理203である高優先度制御割込み処理と、監視割込み処理211の非動作中に発生した制御割込み処理203である低優先度制御割込み処理とに分けて、管理する。割込み管理部223は、監視割込み特定情報記憶部231と、高優先度カウンタ232と、低優先度カウンタ233と、監視スタック使用フラグ234とを備える。
 監視割込み特定情報記憶部231は、新割込み処理が監視割込み処理211であるか否かを判定するための情報を記憶する。ここでは、監視割込み特定情報記憶部231は、監視割込み処理211で使用される割込み要因番号を記憶する。
 高優先度カウンタ232は、発生中の高優先度制御割込み処理の数をカウントする。高優先度カウンタ232は、高優先度制御割込み処理が発生した際に1加算され、終了した際に1減算される。
 低優先度カウンタ233は、発生中の低優先度制御割込み処理の数をカウントする。低優先度カウンタ233は、低優先度制御割込み処理が発生した際に1加算され、終了した際に1減算される。
 監視スタック使用フラグ234は、監視割込み処理211が発生した際にセットされ、終了した際にクリアされる。
The interrupt management unit 223 manages information used for determining the stack area to be used in the interrupt entry processing unit 220 and the interrupt exit processing unit 222. In particular, the interrupt management unit 223 determines the type of interrupt processing that is occurring as a monitoring interrupt processing 211, a high-priority control interrupt processing that is a control interrupt processing 203 that occurs during the operation of the monitoring interrupt processing 211, and a monitoring interrupt processing. Management is divided into low-priority control interrupt processing which is control interrupt processing 203 generated during non-operation of 211. The interrupt management unit 223 includes a monitoring interrupt identification information storage unit 231, a high priority counter 232, a low priority counter 233, and a monitoring stack use flag 234.
The monitoring interrupt identification information storage unit 231 stores information for determining whether or not the new interrupt processing is the monitoring interrupt processing 211. Here, the monitoring interrupt identification information storage unit 231 stores the interrupt factor number used in the monitoring interrupt processing 211.
The high priority counter 232 counts the number of high priority control interrupt processes that are occurring. The high priority counter 232 is incremented by 1 when a high priority control interrupt process occurs, and is decremented by 1 when it is completed.
The low priority counter 233 counts the number of low priority control interrupt processes that are occurring. The low priority counter 233 is incremented by 1 when a low priority control interrupt process occurs, and is decremented by 1 when it is completed.
The monitoring stack use flag 234 is set when the monitoring interrupt processing 211 is generated, and is cleared when the monitoring stack processing is finished.
 SP保存部224は、スタック領域を切り替える前のSP107のアドレス値を保存する。SP保存部224は、制御ポインタ領域235と、監視ポインタ領域236と、タスクポインタ領域237とを備える。
 制御ポインタ領域235は、制御割込み処理203で使用される制御スタック205における記憶位置を保存するための領域である。監視ポインタ領域236は、監視割込み処理211で使用される監視スタック212における記憶位置を保存するための領域である。タスクポインタ領域237は、制御割込みと監視割込みとの何れの割込みも発生していない場合に実行されるメインタスク202で使用されるタスクスタック204における記憶位置を保存するための領域である。
The SP storage unit 224 stores the address value of the SP 107 before switching the stack area. The SP storage unit 224 includes a control pointer area 235, a monitoring pointer area 236, and a task pointer area 237.
The control pointer area 235 is an area for storing a storage position in the control stack 205 used in the control interrupt process 203. The monitoring pointer area 236 is an area for storing a storage position in the monitoring stack 212 used in the monitoring interrupt process 211. The task pointer area 237 is an area for storing a storage position in the task stack 204 used by the main task 202 that is executed when neither a control interrupt nor a monitoring interrupt occurs.
 ***動作の説明***
 図3は、実施の形態1に係る割込み制御装置100の動作を示すフローチャートである。
 実施の形態1に係る割込み制御装置100の動作は、実施の形態1に係る割込み制御方法に相当する。また、実施の形態1に係る割込み制御装置100の動作は、実施の形態1に係る割込み制御プログラムの処理に相当する。
*** Explanation of operation ***
FIG. 3 is a flowchart showing the operation of the interrupt control device 100 according to the first embodiment.
The operation of the interrupt control device 100 according to the first embodiment corresponds to the interrupt control method according to the first embodiment. The operation of the interrupt control device 100 according to the first embodiment corresponds to the processing of the interrupt control program according to the first embodiment.
 S1の入口処理では、割込み入口処理部220は、新割込み処理が発生すると、入口処理を実行する。入口処理により、SP107のアドレス値と、汎用レジスタ108の情報とが保存され、SP107のアドレス値が切り替えられる。 In the entrance processing of S1, the interrupt entrance processing unit 220 executes entrance processing when a new interrupt processing occurs. By the entry process, the address value of SP 107 and the information of general register 108 are saved, and the address value of SP 107 is switched.
 S2の呼出し処理では、割込み処理呼出部221は、新割込み処理の割込み要因に対応する割込み処理を呼び出す。 In the call process of S2, the interrupt process call unit 221 calls the interrupt process corresponding to the interrupt factor of the new interrupt process.
 S3の出口処理では、割込み出口処理部222は、割込み処理が終了すると、出口処理を実行する。出口処理により、SP107のアドレス値と、汎用レジスタ108の情報とが割込み前の情報に戻され、処理が割込み前の処理に戻される。 In the exit process of S3, the interrupt exit processing unit 222 executes the exit process when the interrupt process ends. By the exit process, the address value of the SP 107 and the information of the general register 108 are returned to the information before the interrupt, and the process is returned to the process before the interrupt.
 図4及び図5は、実施の形態1に係る入口処理を示すフローチャートである。
 S101の開始処理では、新割込み処理が発生し、CPU101が割込みベクタ領域109に記憶された割込み制御機構213のアドレス値が示す命令を実行すると、割込み入口処理部220が入口処理を開始する。
 なお、割込みベクタ領域109の値に関しては、事前に設定されているものとする。ここでは、割込み制御装置100の初期化時に設定されているものとする。
4 and 5 are flowcharts showing the entrance processing according to the first embodiment.
In the start process of S101, when a new interrupt process occurs and the CPU 101 executes an instruction indicated by the address value of the interrupt control mechanism 213 stored in the interrupt vector area 109, the interrupt entry processing unit 220 starts the entry process.
It is assumed that the value of the interrupt vector area 109 is set in advance. Here, it is assumed that it is set when the interrupt control device 100 is initialized.
 S102のレジスタ保存処理では、汎用レジスタ保存部225は、CPU101ではスタックに保存されない汎用レジスタ108の情報を、SP107のアドレス値が示すスタック領域に保存する。 In the register saving process of S102, the general-purpose register saving unit 225 saves the information of the general-purpose register 108 that is not saved in the stack by the CPU 101 in the stack area indicated by the address value of the SP 107.
 S103の割込み判定処理では、入口スタック決定部226は、新割込み処理が監視割込み処理211であるか否かを判定する。ここでは、入口スタック決定部226は、新割込み処理の要因番号をICU(Interrupt Control Unit)が持つレジスタから取得し、監視割込み特定情報記憶部231が記憶した要因番号と一致する場合に、新割込み処理が監視割込み処理211であると判定する。
 新割込み処理が監視割込み処理211である場合(S103でYES)、入口スタック決定部226は、処理をS104に進める。一方、新割込み処理が監視割込み処理211でない場合(S103でNO)、入口スタック決定部226は、処理をS111に進める。
In the interrupt determination process of S103, the entrance stack determination unit 226 determines whether or not the new interrupt process is the monitoring interrupt process 211. Here, the entry stack determination unit 226 acquires the new interrupt processing factor number from the register of the ICU (Interrupt Control Unit), and when it matches the factor number stored in the monitoring interrupt identification information storage unit 231, It is determined that the process is the monitoring interrupt process 211.
If the new interrupt process is the monitor interrupt process 211 (YES in S103), the entrance stack determination unit 226 advances the process to S104. On the other hand, when the new interrupt process is not the monitor interrupt process 211 (NO in S103), the entrance stack determination unit 226 advances the process to S111.
 S104の切替値決定処理では、入口スタック決定部226は、新割込み処理が監視割込み処理211である場合には、監視スタック212のボトム値を切替値に決定する。 In the switching value determination processing in S104, the entrance stack determination unit 226 determines the bottom value of the monitoring stack 212 as the switching value when the new interrupt processing is the monitoring interrupt processing 211.
 S105の処理判定処理では、入口スタック決定部226は、実行中の処理がメインタスク202であるか、監視割込み処理211よりも優先度が低い制御割込み処理203であるかを、低優先度カウンタ233を用いて判定する。具体的には、入口スタック決定部226は、低優先度カウンタ233の値が0であれば、実行中の処理がメインタスク202であると判定し、低優先度カウンタ233の値が0以外であれば、実行中の処理が制御割込み処理203であると判定する。
 実行中の処理がメインタスク202である場合(S105でYES)、入口スタック決定部226は、処理をS106に進める。一方、実行中の処理が制御割込み処理203である場合(S105でNO)、入口スタック決定部226は、処理をS110に進める。
In the process determination process of S105, the entry stack determination unit 226 determines whether the process being executed is the main task 202 or the control interrupt process 203 having a lower priority than the monitoring interrupt process 211. Determine using. Specifically, if the value of the low priority counter 233 is 0, the entry stack determination unit 226 determines that the process being executed is the main task 202, and the value of the low priority counter 233 is other than 0. If there is, it is determined that the process being executed is the control interrupt process 203.
If the process being executed is the main task 202 (YES in S105), the entrance stack determination unit 226 advances the process to S106. On the other hand, when the process being executed is the control interrupt process 203 (NO in S105), the entrance stack determination unit 226 advances the process to S110.
 S106のSP値保存処理では、スタック保存部227は、実行中の処理がメインタスク202である場合、SP107のアドレス値をタスクポインタ領域237に保存する。 In the SP value saving process of S106, when the process being executed is the main task 202, the stack saving unit 227 saves the address value of SP107 in the task pointer area 237.
 S107のフラグセット処理では、入口スタック決定部226は、監視スタック使用フラグ234をセットする。 In the flag setting process of S107, the entrance stack determination unit 226 sets the monitoring stack use flag 234.
 S108のSP値切替処理では、スタック保存部227は、SP107のアドレス値を決定した切替値に切り替える。 In the SP value switching process of S108, the stack storage unit 227 switches the SP107 address value to the determined switching value.
 S109の終了処理では、割込み入口処理部220は、入口処理を終了する。 In the end process of S109, the interrupt entrance processing unit 220 ends the entrance process.
 S110のSP値保存処理では、スタック保存部227は、実行中の処理が制御割込み処理203である場合、SP107のアドレス値を制御ポインタ領域235に保存する。
 S108からS109の処理は、上述した通りである。
In the SP value saving process of S110, the stack saving unit 227 saves the address value of SP107 in the control pointer area 235 when the process being executed is the control interrupt process 203.
The processing from S108 to S109 is as described above.
 S111の監視スタック判定処理では、入口スタック決定部226は、監視スタック212が使用中であるかを、監視スタック使用フラグ234を用いて判定する。具体的には、入口スタック決定部226は、監視スタック使用フラグ234がセットされていれば、監視スタック212が使用中であると判定する。
 監視スタック212が使用中である場合(S111でYES)、入口スタック決定部226は、処理をS112に進める。一方、監視スタック212が使用中でない場合(S111でNO)、入口スタック決定部226は、処理をS118に進める。
In the monitoring stack determination process of S111, the entrance stack determination unit 226 determines whether the monitoring stack 212 is in use by using the monitoring stack use flag 234. Specifically, the entrance stack determination unit 226 determines that the monitoring stack 212 is in use if the monitoring stack use flag 234 is set.
If the monitoring stack 212 is in use (YES in S111), the entrance stack determination unit 226 advances the process to S112. On the other hand, when the monitoring stack 212 is not in use (NO in S111), the entrance stack determination unit 226 advances the process to S118.
 S112の高優先度カウンタ判定処理では、入口スタック決定部226は、監視スタック212が使用中である場合、高優先度カウンタ232が0であるかを判定する。高優先度カウンタ232が0である場合、高優先度制御割込み処理が多重発生していないことになる。
 高優先度カウンタ232が0である場合(S112でYES)、入口スタック決定部226は、処理をS113に進める。一方、高優先度カウンタ232が0でない場合(S112でNO)、入口スタック決定部226は、処理をS116に進める。
In the high priority counter determination process of S112, the entrance stack determination unit 226 determines whether the high priority counter 232 is 0 when the monitoring stack 212 is in use. When the high priority counter 232 is 0, it means that multiple high priority control interrupt processes have not occurred.
When the high priority counter 232 is 0 (YES in S112), the entrance stack determination unit 226 advances the process to S113. On the other hand, when the high priority counter 232 is not 0 (NO in S112), the entrance stack determination unit 226 advances the process to S116.
 S113の低優先度カウンタ判定処理では、入口スタック決定部226は、高優先度カウンタ232が0である場合、低優先度カウンタ233が0であるかを判定する。低優先度カウンタ233が0である場合、監視割込み処理211が発生する以前に、低優先度制御割込み処理が発生していないことになる。
 低優先度カウンタ233が0である場合(S113でYES)、入口スタック決定部226は、処理をS114に進める。一方、低優先度カウンタ233が0でない場合(S113でNO)、入口スタック決定部226は、処理をS117に進める。
In the low priority counter determination process of S113, the entrance stack determination unit 226 determines whether the low priority counter 233 is 0 when the high priority counter 232 is 0. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs.
When the low priority counter 233 is 0 (YES in S113), the entrance stack determination unit 226 advances the process to S114. On the other hand, when the low priority counter 233 is not 0 (NO in S113), the entrance stack determination unit 226 advances the process to S117.
 S114の切替値決定処理では、入口スタック決定部226は、低優先度カウンタ233が0である場合には、制御スタック205は未使用の状態であるため、制御スタック205のボトム値を切替値に決定する。 In the switching value determination process of S114, the entry stack determination unit 226 uses the bottom value of the control stack 205 as the switching value because the control stack 205 is unused when the low priority counter 233 is 0. decide.
 S115のSP値保存処理では、スタック保存部227は、SP107の値を監視ポインタ領域236に保存する。 In the SP value saving process of S115, the stack saving unit 227 saves the SP107 value in the monitoring pointer area 236.
 S116のカウント処理では、入口スタック決定部226は、高優先度カウンタ232の値に1加算する。
 S108からS109の処理は、上述した通りである。
In the count process of S <b> 116, the entrance stack determination unit 226 adds 1 to the value of the high priority counter 232.
The processing from S108 to S109 is as described above.
 S117の切替値決定処理では、入口スタック決定部226は、低優先度カウンタ233が0でない場合には、制御スタック205は使用中の状態であるため、制御ポインタ領域235に保存されている値を切替値に決定する。
 S115からS116の処理と、S108からS109の処理は、上述した通りである。
In the switching value determination process of S117, the entry stack determination unit 226 uses the value stored in the control pointer area 235 because the control stack 205 is in use when the low priority counter 233 is not 0. Determine the switching value.
The processing from S115 to S116 and the processing from S108 to S109 are as described above.
 S112において、高優先度カウンタ232が0でない場合には、引き続き制御スタック205が使用される。そのため、SP107の値は切り替えされず、S116で高優先度カウンタ232が1加算される。 In S112, when the high priority counter 232 is not 0, the control stack 205 is continuously used. For this reason, the value of SP 107 is not switched, and the high priority counter 232 is incremented by 1 in S116.
 S118の低優先度カウンタ判定処理では、入口スタック決定部226は、監視スタック212が使用中でない場合、低優先度カウンタ233が0であるかを判定する。低優先度カウンタ233が0である場合、監視割込み処理211が発生する以前に、低優先度制御割込み処理が発生しておらず、メインタスク202が実行されていたことになる。
 低優先度カウンタ233が0である場合(S118でYES)、入口スタック決定部226は、処理をS119に進める。一方、低優先度カウンタ233が0でない場合(S118でNO)、入口スタック決定部226は、処理をS121に進める。
In the low priority counter determination process of S118, the entrance stack determination unit 226 determines whether the low priority counter 233 is 0 when the monitoring stack 212 is not in use. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred and the main task 202 has been executed before the monitoring interrupt process 211 occurs.
If the low priority counter 233 is 0 (YES in S118), the entrance stack determination unit 226 advances the process to S119. On the other hand, when the low priority counter 233 is not 0 (NO in S118), the entrance stack determination unit 226 advances the process to S121.
 S119の切替値決定処理では、入口スタック決定部226は、低優先度カウンタ233が0である場合には、制御スタック205は未使用の状態であるため、制御スタック205のボトム値を切替値に決定する。 In the switching value determination processing in S119, the entrance stack determination unit 226 uses the bottom value of the control stack 205 as the switching value because the control stack 205 is unused when the low priority counter 233 is 0. decide.
 S120のSP値保存処理では、スタック保存部227は、SP107の値をタスクポインタ領域237に保存する。 In the SP value saving process in S120, the stack saving unit 227 saves the SP107 value in the task pointer area 237.
 S121のカウント処理では、入口スタック決定部226は、低優先度カウンタ233の値に1加算する。
 S108からS109の処理は、上述した通りである。
In the count process of S121, the entrance stack determination unit 226 adds 1 to the value of the low priority counter 233.
The processing from S108 to S109 is as described above.
 S118において、低優先度カウンタ233が0でない場合には、引き続き制御スタック205が使用される。そのため、SP107の値は切り替えされず、S116で低優先度カウンタ233が1加算される。 In S118, when the low priority counter 233 is not 0, the control stack 205 is continuously used. Therefore, the value of SP 107 is not switched, and 1 is added to the low priority counter 233 in S116.
 図6及び図7は、実施の形態1に係る出口処理を示すフローチャートである。
 S301の開始処理では、割込み処理が終了し、割込み処理呼出部221から割込み出口処理部222に制御が移り、割込み出口処理部222が出口処理を開始する。
6 and 7 are flowcharts showing the exit processing according to the first embodiment.
In the start processing of S301, the interrupt processing ends, control is transferred from the interrupt processing calling unit 221 to the interrupt exit processing unit 222, and the interrupt exit processing unit 222 starts exit processing.
 S302の割込み判定処理では、出口スタック決定部228は、終了した終了割込み処理が監視割込み処理211であるか否かを判定する。ここでは、出口スタック決定部228は、終了割込み処理の要因番号をICUが持つレジスタから取得し、監視割込み特定情報記憶部231が記憶した要因番号と一致する場合に、終了割込み処理が監視割込み処理211であると判定する。
 終了割込み処理が監視割込み処理211である場合(S302でYES)、出口スタック決定部228は、処理をS303に進める。一方、終了割込み処理が監視割込み処理211でない場合(S302でNO)、出口スタック決定部228は、処理をS310に進める。
In the interrupt determination process of S302, the exit stack determination unit 228 determines whether or not the completed end interrupt process is the monitoring interrupt process 211. Here, the exit stack determination unit 228 acquires the cause number of the end interrupt process from the register of the ICU, and when the exit interrupt process matches the cause number stored in the monitor interrupt identification information storage unit 231, the exit interrupt process is the monitor interrupt process. 211.
If the end interrupt process is the monitoring interrupt process 211 (YES in S302), the exit stack determination unit 228 advances the process to S303. On the other hand, when the end interrupt process is not the monitoring interrupt process 211 (NO in S302), the exit stack determination unit 228 advances the process to S310.
 S303のフラグクリア処理では、出口スタック決定部228は、終了割込み処理が監視割込み処理211である場合、監視スタック使用フラグ234をクリアする。 In the flag clear process of S303, the exit stack determining unit 228 clears the monitor stack use flag 234 when the end interrupt process is the monitor interrupt process 211.
 S304の低優先度カウンタ判定処理では、出口スタック決定部228は、低優先度カウンタ233が0であるかを判定する。低優先度カウンタ233が0である場合、監視割込み処理211が発生する以前に、低優先度制御割込み処理が発生していないことになる。
 低優先度カウンタ233が0である場合(S304でYES)、出口スタック決定部228は、処理をS305に進める。一方、低優先度カウンタ233が0でない場合(S304でNO)、出口スタック決定部228は、処理をS309に進める。
In the low priority counter determination process of S304, the exit stack determination unit 228 determines whether the low priority counter 233 is zero. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs.
If the low priority counter 233 is 0 (YES in S304), the exit stack determination unit 228 advances the process to S305. On the other hand, when the low priority counter 233 is not 0 (NO in S304), the exit stack determination unit 228 advances the process to S309.
 S305のSP値復帰処理では、スタック復帰部229は、低優先度カウンタ233が0である場合、低優先度制御割込み処理が発生していないので、タスクポインタ領域237に保存されている値をSP107に設定する。 In the SP value recovery process of S305, the stack recovery unit 229 uses the value stored in the task pointer area 237 as the SP107 because the low priority control interrupt process has not occurred when the low priority counter 233 is 0. Set to.
 S306のレジスタ復帰処理では、汎用レジスタ復帰部230は、SP107に設定されたアドレス値が示すスタック領域に保存された情報を、汎用レジスタ108に格納する。 In the register restoration process in S306, the general-purpose register restoration unit 230 stores the information stored in the stack area indicated by the address value set in the SP 107 in the general-purpose register 108.
 S307の復帰命令処理では、割込み出口処理部222は、割込み復帰命令を実行する。 In the return instruction process of S307, the interrupt exit processing unit 222 executes the interrupt return instruction.
 S308の終了処理では、割込み出口処理部222は、出口処理を終了する。 In the termination process of S308, the interrupt exit processing unit 222 terminates the exit process.
 S309のSP値復帰処理では、スタック復帰部229は、低優先度カウンタ233が0でない場合、低優先度制御割込み処理が発生しているので、制御ポインタ領域235に保存されている値をSP107に設定する。
 S306からS308の処理は、上述した通りである。
In the SP value return process of S309, the stack return unit 229 generates a low priority control interrupt process when the low priority counter 233 is not 0, so the value stored in the control pointer area 235 is set to SP107. Set.
The processing from S306 to S308 is as described above.
 S310の監視スタック判定処理では、出口スタック決定部228は、監視スタック212が使用中であるかを、監視スタック使用フラグ234を用いて判定する。具体的には、出口スタック決定部228は、監視スタック使用フラグ234がセットされていれば、監視スタック212が使用中であると判定する。
 監視スタック212が使用中である場合(S310でYES)、出口スタック決定部228は、処理をS311に進める。一方、監視スタック212が使用中でない場合(S310でNO)、出口スタック決定部228は、処理をS316に進める。
In the monitoring stack determination process of S310, the exit stack determination unit 228 determines whether the monitoring stack 212 is in use by using the monitoring stack use flag 234. Specifically, the exit stack determination unit 228 determines that the monitoring stack 212 is in use if the monitoring stack use flag 234 is set.
If the monitoring stack 212 is in use (YES in S310), the exit stack determination unit 228 advances the process to S311. On the other hand, when the monitoring stack 212 is not in use (NO in S310), the exit stack determination unit 228 advances the process to S316.
 S311のカウント処理では、出口スタック決定部228は、監視スタック212が使用中である場合、高優先度制御割込み処理が終了したため、高優先度カウンタ232の値を1減算する。 In the count process of S311, the exit stack determination unit 228 subtracts 1 from the value of the high priority counter 232 because the high priority control interrupt process is completed when the monitoring stack 212 is in use.
 S312の高優先度カウンタ判定処理では、出口スタック決定部228は、高優先度カウンタ232が0であるかを判定する。高優先度カウンタ232が0である場合、高優先度制御割込み処理が他に発生していないことになる。
 高優先度カウンタ232が0である場合(S312でYES)、出口スタック決定部228は、処理をS313に進める。一方、高優先度カウンタ232が0でない場合(S312でNO)、出口スタック決定部228は、処理をS306に進める。
In the high priority counter determination process of S312, the exit stack determination unit 228 determines whether the high priority counter 232 is zero. If the high priority counter 232 is 0, no other high priority control interrupt processing has occurred.
If the high priority counter 232 is 0 (YES in S312), the exit stack determination unit 228 advances the process to S313. On the other hand, when the high priority counter 232 is not 0 (NO in S312), the exit stack determination unit 228 advances the process to S306.
 S313の低優先度カウンタ判定処理では、出口スタック決定部228は、高優先度カウンタ232が0である場合、低優先度カウンタ233が0であるかを判定する。低優先度カウンタ233が0である場合、監視割込み処理211が発生する以前に、低優先度制御割込み処理が発生していないことになる。
 低優先度カウンタ233が0である場合(S313でYES)、出口スタック決定部228は、処理をS314に進める。一方、低優先度カウンタ233が0でない場合(S313でNO)、出口スタック決定部228は、処理をS315に進める。
In the low priority counter determination process of S313, when the high priority counter 232 is 0, the exit stack determination unit 228 determines whether the low priority counter 233 is 0. When the low priority counter 233 is 0, the low priority control interrupt process has not occurred before the monitoring interrupt process 211 occurs.
If the low priority counter 233 is 0 (YES in S313), the exit stack determination unit 228 advances the process to S314. On the other hand, when the low priority counter 233 is not 0 (NO in S313), the exit stack determination unit 228 advances the process to S315.
 S314のSP値復帰処理では、スタック復帰部229は、低優先度カウンタ233が0である場合、監視ポインタ領域236に保存されている値をSP107に設定する。
 S306からS308の処理は、上述した通りである。
In the SP value recovery process of S314, when the low priority counter 233 is 0, the stack recovery unit 229 sets the value stored in the monitoring pointer area 236 to SP107.
The processing from S306 to S308 is as described above.
 S315のSP値保存処理では、スタック復帰部229は、低優先度カウンタ233が0でない場合、SP107の値を制御ポインタ領域235に保存する。その上で、スタック復帰部229は、S314で監視ポインタ領域236に保存されている値をSP107に設定する。SP107の値を制御ポインタ領域235に保存しておくことで、監視割込み処理211が終了した際に、制御スタック205の途中から処理を復帰させることが可能になる。
 S306からS308の処理は、上述した通りである。
In the SP value saving process of S315, the stack restoration unit 229 saves the value of SP107 in the control pointer area 235 when the low priority counter 233 is not zero. After that, the stack restoration unit 229 sets the value stored in the monitoring pointer area 236 in S <b> 314 in the SP 107. By storing the value of SP 107 in the control pointer area 235, it is possible to return the process from the middle of the control stack 205 when the monitoring interrupt process 211 is completed.
The processing from S306 to S308 is as described above.
 S312において、高優先度カウンタ232が0でない場合には、引き続き制御スタック205が使用される。そのため、SP107の値は切り替えされない。 In S312, when the high priority counter 232 is not 0, the control stack 205 is continuously used. For this reason, the value of SP 107 is not switched.
 S316のカウント処理では、出口スタック決定部228は、監視スタック212が使用中でない場合、低優先度制御割込み処理が終了したため、低優先度カウンタ233の値を1減算する。 In the count process of S316, when the monitoring stack 212 is not in use, the exit stack determination unit 228 subtracts 1 from the value of the low priority counter 233 because the low priority control interrupt process is completed.
 S317の低優先度カウンタ判定処理では、出口スタック決定部228は、低優先度カウンタ233が0であるかを判定する。低優先度カウンタ233が0である場合、低優先度制御割込み処理が他に発生しておらず、割込み処理の発生前にはメインタスク202が実行されていたことになる。
 低優先度カウンタ233が0である場合(S317でYES)、出口スタック決定部228は、処理をS318に進める。一方、低優先度カウンタ233が0でない場合(S317でNO)、出口スタック決定部228は、処理をS306に進める。
In the low priority counter determination processing in S317, the exit stack determination unit 228 determines whether the low priority counter 233 is zero. When the low priority counter 233 is 0, no other low priority control interrupt processing has occurred, and the main task 202 has been executed before the occurrence of the interrupt processing.
If the low priority counter 233 is 0 (YES in S317), the exit stack determination unit 228 advances the process to S318. On the other hand, when the low priority counter 233 is not 0 (NO in S317), the exit stack determination unit 228 advances the process to S306.
 S318のSP値復帰処理では、スタック復帰部229は、低優先度カウンタ233が0である場合、タスクポインタ領域237に保存されている値をSP107に設定する。
 S306からS308の処理は、上述した通りである。
In the SP value return process of S318, when the low priority counter 233 is 0, the stack return unit 229 sets the value stored in the task pointer area 237 to SP107.
The processing from S306 to S308 is as described above.
 S317において、低優先度カウンタ233が0でない場合には、引き続き制御スタック205が使用される。そのため、SP107の値は切り替えされない。 In S317, when the low priority counter 233 is not 0, the control stack 205 is continuously used. For this reason, the value of SP 107 is not switched.
 ***実施の形態1の効果***
 以上のように、実施の形態1に係る割込み制御装置100は、割込みの入口処理及び出口処理において、発生した割込み処理又は終了した割込み処理と、発生中の割込み処理の種別とに基づき、適切なスタック領域への切り替えを行う。
 これにより、監視割込み処理211の実行中に高優先度制御割込み処理が発生した場合でも、高優先度制御割込み処理が監視スタック212を使用しないように制御することが可能となる。そのため、CPU101が利用可能なSP107が1つである場合でも、制御割込み処理203が監視割込み処理211へ影響を与えないことを保証可能となる。
 また、低優先度制御割込みの実行中に監視割込みが発生し、さらに監視割込み処理211の実行中に高優先度制御割込みが発生した場合でも、後に低優先度制御割込みが使用していた位置から制御スタック205を使用することが可能となる。そのため、制御割込み処理203で1つのスタックを共有して利用することが可能となる。
*** Effects of Embodiment 1 ***
As described above, the interrupt control device 100 according to the first embodiment has an appropriate process based on the interrupt processing that has occurred or ended in the interrupt entry processing and exit processing, and the type of interrupt processing that is occurring. Switch to the stack area.
As a result, even when a high priority control interrupt process occurs during the execution of the monitoring interrupt process 211, it is possible to control so that the high priority control interrupt process does not use the monitoring stack 212. Therefore, it is possible to ensure that the control interrupt process 203 does not affect the monitoring interrupt process 211 even when the CPU 101 can use only one SP 107.
Even if a monitoring interrupt occurs during execution of a low priority control interrupt and a high priority control interrupt occurs during execution of the monitoring interrupt processing 211, the position from which the low priority control interrupt was used later The control stack 205 can be used. Therefore, it is possible to share and use one stack in the control interrupt process 203.
 ***他の構成***
 図2に示した構成では、割込みベクタ領域109は、ROM102に設けられていた。しかし、割込みベクタ領域109は、RAM103に設けられていてもよい。
*** Other configurations ***
In the configuration shown in FIG. 2, the interrupt vector area 109 is provided in the ROM 102. However, the interrupt vector area 109 may be provided in the RAM 103.
 また、図2に示した構成では、SP保存部224が記憶する値は、RAM103に大域変数として保存された。しかし、SP保存部224が記憶する値は、発生した割込み処理において使用するスタック領域に保存されてもよい。 In the configuration shown in FIG. 2, the value stored in the SP storage unit 224 is stored in the RAM 103 as a global variable. However, the value stored in the SP storage unit 224 may be stored in a stack area used in the interrupt processing that has occurred.
 100 割込み制御装置、101 CPU、102 ROM、103 RAM、104 周辺デバイス、105 PC、106 PSW、107 SP、108 汎用レジスタ、109 割込みベクタ領域、110 制御モジュールコード領域、111 監視モジュールコード領域、112 制御モジュールデータ領域、113 監視モジュールデータ領域、114 制御モジュールスタック領域、115 監視モジュールスタック領域、201 制御モジュール、202 メインタスク、203 制御割込み処理、204 タスクスタック、205 制御スタック、206 割込みハンドラテーブル、210 監視モジュール、211 監視割込み処理、212 監視スタック、213 割込み制御機構、220 割込み入口処理部、221 割込み処理呼出部、222 割込み出口処理部、223 割込み管理部、224 SP保存部、225 汎用レジスタ保存部、226 入口スタック決定部、227 スタック保存部、228 出口スタック決定部、229 スタック復帰部、230 汎用レジスタ復帰部、231 監視割込み特定情報記憶部、232 高優先度カウンタ、233 低優先度カウンタ、234 監視スタック使用フラグ、235 制御ポインタ領域、236 監視ポインタ領域、237 タスクポインタ領域。 100 interrupt control device, 101 CPU, 102 ROM, 103 RAM, 104 peripheral device, 105 PC, 106 PSW, 107 SP, 108 general purpose register, 109 interrupt vector area, 110 control module code area, 111 monitoring module code area, 112 control Module data area, 113 Monitor module data area, 114 Control module stack area, 115 Monitor module stack area, 201 Control module, 202 Main task, 203 Control interrupt processing, 204 Task stack, 205 Control stack, 206 Interrupt handler table, 210 Monitor Module, 211 monitoring interrupt processing, 212 monitoring stack, 213 interrupt control mechanism, 220 interrupt entry processing unit, 2 1 interrupt processing call unit, 222 interrupt exit processing unit, 223 interrupt management unit, 224 SP storage unit, 225 general register storage unit, 226 entrance stack determination unit, 227 stack storage unit, 228 exit stack determination unit, 229 stack return unit, 230 General register return unit, 231 monitoring interrupt specific information storage unit, 232 high priority counter, 233 low priority counter, 234 monitoring stack use flag, 235 control pointer area, 236 monitoring pointer area, 237 task pointer area.

Claims (10)

  1.  発生中の割込み処理の種別を、システムを監視する監視割込み処理と、前記システムを制御する制御割込み処理とに分け、前記制御割込み処理を、前記監視割込み処理の動作中に発生した処理と、前記監視割込み処理の非動作中に発生した処理とに分けて、管理する割込み管理部と、
     新たに割込み処理が発生した場合に、新たに発生した新割込み処理が前記監視割込み処理と前記制御割込み処理との何れであるかと、前記割込み管理部によって管理される発生中の割込み処理の種別とから、前記制御割込み処理で使用される制御スタックのための制御ポインタ領域と、前記監視割込み処理で使用される監視スタックのための監視ポインタ領域との何れを、演算装置のデータ読込先を示すスタックポインタに設定されたアドレス値の保存先にするかを決定する入口スタック決定部と、
     前記入口スタック決定部によって決定された保存先に前記スタックポインタに設定されたアドレス値を保存した上で、前記スタックポインタのアドレス値を切り替えるスタック保存部と
    を備える割込み制御装置。
    The type of interrupt processing that is occurring is divided into monitoring interrupt processing that monitors the system and control interrupt processing that controls the system, and the control interrupt processing is processed during the operation of the monitoring interrupt processing, and An interrupt management unit that manages and manages the processing that occurs during non-operation of the monitoring interrupt processing,
    When a new interrupt process occurs, whether the newly generated new interrupt process is the monitoring interrupt process or the control interrupt process, the type of the interrupt process being generated managed by the interrupt management unit, and From the control pointer area for the control stack used in the control interrupt processing and the monitoring pointer area for the monitoring stack used in the monitoring interrupt processing, the stack indicating the data reading destination of the arithmetic unit An entry stack determination unit that determines whether to store the address value set in the pointer;
    An interrupt control device comprising: a stack storage unit that switches the address value of the stack pointer after storing the address value set in the stack pointer in the storage destination determined by the entry stack determination unit.
  2.  前記入口スタック決定部は、前記制御割込み処理と前記監視割込み処理との何れの割込み処理も発生していない場合に実行されるメインタスクで使用されるタスクスタックのためのタスクポインタ領域と、前記制御ポインタ領域と、前記監視ポインタ領域との何れを、前記保存先にするかを決定する
    請求項1に記載の割込み制御装置。
    The entry stack determination unit includes a task pointer area for a task stack used in a main task that is executed when neither of the control interrupt process and the monitoring interrupt process occurs, and the control The interrupt control apparatus according to claim 1, wherein a pointer area or the monitoring pointer area is determined as the storage destination.
  3.  前記入口スタック決定部は、
     前記新割込み処理が前記監視割込み処理であり、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記タスクポインタ領域を前記保存先に決定し、
     前記新割込み処理が前記監視割込み処理であり、かつ、前記非動作中に発生した前記制御割込み処理がある場合には、前記制御ポインタ領域を前記保存先に決定し、
     前記新割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しており、かつ、前記動作中に発生した前記制御割込み処理がない場合には、前記監視ポインタ領域を前記保存先に決定し、
     前記新割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しておらず、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記タスクポインタ領域を前記保存先に決定する
    請求項2に記載の割込み制御装置。
    The entrance stack determination unit
    If the new interrupt process is the monitoring interrupt process and there is no control interrupt process that occurred during the non-operation, the task pointer area is determined as the storage destination,
    When the new interrupt process is the monitoring interrupt process and there is the control interrupt process generated during the non-operation, the control pointer area is determined as the storage destination,
    If the new interrupt process is the control interrupt process, the monitor interrupt process has occurred, and there is no control interrupt process that has occurred during the operation, the monitor pointer area is stored in the storage destination area. Decided on
    If the new interrupt process is the control interrupt process, the monitor interrupt process has not occurred, and there is no control interrupt process that occurred during the non-operation, the task pointer area is The interrupt control device according to claim 2, wherein the interrupt control device is determined as a storage destination.
  4.  前記割込み制御装置は、さらに、
     割込み処理が終了した場合に、終了した終了割込み処理が前記制御割込み処理と前記監視割込み処理との何れであるかと、前記割込み管理部によって管理される発生中の割込み処理の種別とから、前記制御ポインタ領域と前記監視ポインタ領域との何れを、前記スタックポインタに設定するアドレス値の読込先にするかを決定する出口スタック決定部と、
     前記出口スタック決定部によって決定された読込先に保存されたアドレス値を前記スタックポインタに設定するスタック復帰部と
    を備える請求項1に記載の割込み制御装置。
    The interrupt control device further includes:
    When the interrupt process is completed, the control is determined based on whether the ended interrupt process is the control interrupt process or the monitoring interrupt process and the type of the interrupt process that is being managed and managed by the interrupt management unit. An exit stack determination unit that determines which of the pointer area and the monitoring pointer area is to be read destination of the address value set in the stack pointer;
    The interrupt control device according to claim 1, further comprising: a stack return unit that sets an address value stored in a read destination determined by the exit stack determination unit in the stack pointer.
  5.  前記出口スタック決定部は、前記制御割込み処理と前記監視割込み処理との何れの割込み処理も発生していない場合に実行されるメインタスクで使用されるタスクスタックのためのタスクポインタ領域と、前記制御ポインタ領域と、前記監視ポインタ領域との何れを、前記読込先にするかを決定する
    請求項4に記載の割込み制御装置。
    The exit stack determination unit includes a task pointer area for a task stack used in a main task that is executed when neither of the control interrupt processing and the monitoring interrupt processing occurs, and the control The interrupt control device according to claim 4, wherein a pointer area or the monitoring pointer area is determined as the reading destination.
  6.  前記出口スタック決定部は、
     前記終了割込み処理が前記監視割込み処理であり、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記タスクポインタ領域を前記読込先に決定し、
     前記終了割込み処理が前記監視割込み処理であり、かつ、前記非動作中に発生した前記制御割込み処理がある場合には、前記制御ポインタ領域を前記読込先に決定し、
     前記終了割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しており、かつ、前記動作中に発生した前記制御割込み処理がない場合には、前記監視ポインタ領域を前記読込先に決定し、
     前記終了割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しておらず、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記タスクポインタ領域を前記読込先に決定する
    請求項5に記載の割込み制御装置。
    The exit stack determining unit
    If the end interrupt process is the monitoring interrupt process and there is no control interrupt process that occurred during the non-operation, the task pointer area is determined as the read destination,
    When the end interrupt process is the monitoring interrupt process and there is the control interrupt process that occurs during the non-operation, the control pointer area is determined as the read destination,
    When the end interrupt process is the control interrupt process, the monitor interrupt process is generated, and there is no control interrupt process generated during the operation, the monitor pointer area is set to the read destination. Decided on
    If the end interrupt process is the control interrupt process, the monitoring interrupt process has not occurred, and there is no control interrupt process generated during the non-operation, the task pointer area is The interrupt control apparatus according to claim 5, wherein the interrupt control apparatus determines a reading destination.
  7.  前記スタック復帰部は、前記終了割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しており、かつ、前記動作中に発生した前記制御割込み処理がなく、かつ、前記非動作中に発生した前記制御割込み処理がある場合には、前記制御ポインタ領域に前記スタックポインタに設定されたアドレス値を保存した上で、前記読込先に保存されたアドレス値を前記スタックポインタに設定する
    請求項6に記載の割込み制御装置。
    The stack return unit is configured such that the end interrupt process is the control interrupt process, the monitoring interrupt process is generated, the control interrupt process is not generated during the operation, and the non-operation is performed. If there is the control interrupt processing that has occurred in the memory, the address value set in the stack pointer is stored in the control pointer area, and the address value stored in the read destination is set in the stack pointer. The interrupt control device according to claim 6.
  8.  前記入口スタック決定部は、前記新割込み処理が前記制御割込み処理と前記監視割込み処理との何れであるかと、前記割込み管理部によって管理される発生中の割込み処理の種別とから、前記スタックポインタの切替値を決定し、
     前記スタック保存部は、前記入口スタック決定部によって決定された切替値に前記スタックポインタのアドレス値を切り替える
    請求項1に記載の割込み制御装置。
    The entrance stack determination unit determines whether the new interrupt processing is the control interrupt processing or the monitoring interrupt processing, and the type of interrupt processing being generated managed by the interrupt management unit. Determine the switching value,
    The interrupt control device according to claim 1, wherein the stack storage unit switches the address value of the stack pointer to a switching value determined by the entry stack determination unit.
  9.  前記入口スタック決定部は、
     前記新割込み処理が前記監視割込み処理である場合には、前記監視スタックのボトム値を前記切替値に決定し、
     前記新割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しており、かつ、前記動作中に発生した前記制御割込み処理がなく、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記制御スタックのボトム値を前記切替値に決定し、
     前記新割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しており、かつ、前記動作中に発生した前記制御割込み処理がなく、かつ、前記非動作中に発生した前記制御割込み処理がある場合には、前記制御ポインタ領域に保存された値を前記切替値に決定し、
     前記新割込み処理が前記制御割込み処理であり、かつ、前記監視割込み処理が発生しておらず、かつ、前記非動作中に発生した前記制御割込み処理がない場合には、前記制御スタックのボトム値を前記切替値に決定する
    請求項8に記載の割込み制御装置。
    The entrance stack determination unit
    If the new interrupt processing is the monitoring interrupt processing, the bottom value of the monitoring stack is determined as the switching value,
    The new interrupt process is the control interrupt process, the monitoring interrupt process has occurred, the control interrupt process has not occurred during the operation, and the control has occurred during the non-operation When there is no interrupt processing, the bottom value of the control stack is determined as the switching value,
    The new interrupt process is the control interrupt process, the monitoring interrupt process has occurred, the control interrupt process has not occurred during the operation, and the control has occurred during the non-operation If there is an interrupt process, the value stored in the control pointer area is determined as the switching value,
    If the new interrupt process is the control interrupt process, the monitor interrupt process has not occurred, and there is no control interrupt process that occurred during the non-operation, the bottom value of the control stack The interrupt control device according to claim 8, wherein the switching value is determined.
  10.  発生中の割込み処理の種別を、システムを監視する監視割込み処理と、前記システムを制御する制御割込み処理とに分け、前記制御割込み処理を、前記監視割込み処理の動作中に発生した処理と、前記監視割込み処理の非動作中に発生した処理とに分けて管理し、
     新たに割込み処理が発生した場合に、新たに発生した新割込み処理が前記監視割込み処理と前記制御割込み処理との何れであるかと、管理される発生中の割込み処理の種別とから、前記制御割込み処理で使用される制御スタックのための制御ポインタ領域と、前記監視割込み処理で使用される監視スタックのための監視ポインタ領域との何れを、演算装置のデータ読込先を示すスタックポインタに設定されたアドレス値の保存先にするかを決定し、
     決定された保存先に前記スタックポインタに設定されたアドレス値を保存した上で、前記スタックポインタのアドレス値を切り替える
    割込み制御方法。
    The type of interrupt processing that is occurring is divided into monitoring interrupt processing that monitors the system and control interrupt processing that controls the system, and the control interrupt processing is processed during the operation of the monitoring interrupt processing, and It is managed separately from the processing that occurred during non-operation of the monitoring interrupt processing,
    When a new interrupt process occurs, the control interrupt is determined based on whether the newly generated new interrupt process is the monitoring interrupt process or the control interrupt process and the type of the interrupt process currently being managed. Either the control pointer area for the control stack used in the processing or the monitoring pointer area for the monitoring stack used in the monitoring interrupt process is set as the stack pointer indicating the data reading destination of the arithmetic device Decide whether to save the address value,
    An interrupt control method for switching an address value of the stack pointer after storing an address value set in the stack pointer in a determined storage destination.
PCT/JP2015/069312 2015-07-03 2015-07-03 Interrupt control device and interrupt control method WO2017006398A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/069312 WO2017006398A1 (en) 2015-07-03 2015-07-03 Interrupt control device and interrupt control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/069312 WO2017006398A1 (en) 2015-07-03 2015-07-03 Interrupt control device and interrupt control method

Publications (1)

Publication Number Publication Date
WO2017006398A1 true WO2017006398A1 (en) 2017-01-12

Family

ID=57685246

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/069312 WO2017006398A1 (en) 2015-07-03 2015-07-03 Interrupt control device and interrupt control method

Country Status (1)

Country Link
WO (1) WO2017006398A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181560A (en) * 1998-12-18 2000-06-30 Fujitsu Ltd Automatic schedule control system for computer and recording medium therefor
WO2001022222A1 (en) * 1999-09-17 2001-03-29 Keihin Corporation Automobile control unit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181560A (en) * 1998-12-18 2000-06-30 Fujitsu Ltd Automatic schedule control system for computer and recording medium therefor
WO2001022222A1 (en) * 1999-09-17 2001-03-29 Keihin Corporation Automobile control unit

Similar Documents

Publication Publication Date Title
US7487503B2 (en) Scheduling threads in a multiprocessor computer
US9772879B2 (en) System and method for isolating I/O execution via compiler and OS support
US6128641A (en) Data processing unit with hardware assisted context switching capability
US7627705B2 (en) Method and apparatus for handling interrupts in embedded systems
US7689749B2 (en) Interrupt control function adapted to control the execution of interrupt requests of differing criticality
US5438677A (en) Mutual exclusion for computer system
US20040088704A1 (en) Method for running real-time tasks alongside a general purpose operating system
WO2009133669A1 (en) Virtual computer control device, virtual computer control method, and virtual computer control program
EP1189137A1 (en) Interruption managing device and interruption managing method
US8386684B2 (en) Data processing system and method of interrupt handling
US10489188B2 (en) Method for reducing interrupt latency in embedded systems
EP3265921B1 (en) Microcontroller or microprocessor with dual mode interrupt
WO2007047784A3 (en) Shared interrupt control method and system for a digital signal processor
WO2017006398A1 (en) Interrupt control device and interrupt control method
KR101838474B1 (en) Exception control in a multiprocessor system
US20090083754A1 (en) Implementation of multi-tasking on a digital signal processor
KR20120065097A (en) Apparatus for processing input device interrupt and method thereof
US9442761B2 (en) Sequence controller
US20030037227A1 (en) Processor enabling exception handling to be set by program
CN102549510A (en) Method for testing the real-time capability of an operating system
US10936357B2 (en) Semiconductor device
CN102804145A (en) Virtual multi-processor system
US20120069013A1 (en) Processor for three dimensional computer graphics
CN1049752C (en) Programmable multiple trunk priority arbitration device
CN102567104A (en) Method and device for realizing soft interrupt of real-time operating system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15897661

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 15897661

Country of ref document: EP

Kind code of ref document: A1