KR20210063851A - Apparatus and method for processing interrupt - Google Patents

Apparatus and method for processing interrupt Download PDF

Info

Publication number
KR20210063851A
KR20210063851A KR1020190152461A KR20190152461A KR20210063851A KR 20210063851 A KR20210063851 A KR 20210063851A KR 1020190152461 A KR1020190152461 A KR 1020190152461A KR 20190152461 A KR20190152461 A KR 20190152461A KR 20210063851 A KR20210063851 A KR 20210063851A
Authority
KR
South Korea
Prior art keywords
interrupt
context
stack pointer
module
pointer
Prior art date
Application number
KR1020190152461A
Other languages
Korean (ko)
Other versions
KR102340871B1 (en
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 KR1020190152461A priority Critical patent/KR102340871B1/en
Priority to PCT/KR2019/016355 priority patent/WO2021107173A1/en
Publication of KR20210063851A publication Critical patent/KR20210063851A/en
Application granted granted Critical
Publication of KR102340871B1 publication Critical patent/KR102340871B1/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
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • 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/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • 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/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection
    • G06F9/268Microinstruction selection not based on processing results, e.g. interrupt, patch, first cycle store, diagnostic programs
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/327Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for interrupts
    • 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

Abstract

The present invention relates to an interrupt processing device and a method thereof. According to an embodiment of the present invention, the interrupt processing device includes: a processor core; an interrupt control unit for generating an interrupt enable signal by determining the priority of interrupts generated when a task is processed in the processor core; a context information management unit for receiving the interrupt enable signal from the interrupt control unit and extracting a previous context pointer value which is a pointer value of a context register stored last in a context list; and a stack pointer management unit for receiving the previous context pointer value from the context information management unit and storing the previous context pointer value in a stack pointer. Accordingly, when a new interrupt occurs while performing an interrupt, existing interrupt context information is prevented from being overwritten.

Description

인터럽트 처리 장치 및 방법{APPARATUS AND METHOD FOR PROCESSING INTERRUPT}Interrupt handling device and method {APPARATUS AND METHOD FOR PROCESSING INTERRUPT}

본 발명은 인터럽트 처리 장치 및 방법에 관한 것으로, 보다 구체적으로는 인터럽트가 발생하는 경우에 있어서, 인터럽트 수행 시 데이터가 오버라이팅으로 인해 손실되는 것을 방지하고 인터럽트를 안정적으로 처리하기 위한 장치 및 방법에 관련된 것이다.The present invention relates to an apparatus and method for processing an interrupt, and more particularly, to an apparatus and method for stably handling an interrupt and preventing data from being lost due to overwriting when performing an interrupt when an interrupt occurs will be.

본 발명은 산업통상자원부 및 한국에너지기술평가원의 에너지수요관리핵심기술사업의 일환으로 수행한 연구로부터 도출된 것이다. [과제관리번호: 1415156896, 과제명: 초소형 전기차용 개방형 S/W 아키텍처 기반 에너지 효율 향상 제어시스템 개발]The present invention is derived from research conducted as part of the energy demand management core technology project of the Ministry of Trade, Industry and Energy and the Korea Energy Technology Evaluation and Planning Institute. [Project management number: 1415156896, task name: Development of energy efficiency improvement control system based on open S/W architecture for ultra-small electric vehicles]

인터럽트는 컴퓨터 작동 중에 발생한 예기치 않은 문제를 빠르게 처리하고 업무 처리가 계속될 수 있도록 하는 컴퓨터 운영체제의 한 기능으로, 컴퓨터 운영체제의 프로세서 코어에서 어떤 프로그램을 실행하고 있는데 당장 처리해야 하는 프로그램이 생겼을 경우, 인터럽트 신호를 보내서 먼저 처리해야 하는 프로그램을 처리하고 다시 예전 프로그램으로 돌아가는 것을 말한다.Interrupt is a function of the computer operating system that quickly handles unexpected problems that occur during computer operation and enables business processing to continue. It sends a signal to process the program that needs to be processed first and then returns to the previous program

일반적으로 한 개의 프로세서 코어는 한번에 하나의 작업만 할 수 있기 때문에, 여러 가지 작업이 있다면 여러 작업을 작게 쪼개어 하나씩 처리하게 된다. In general, since one processor core can only do one task at a time, if there are multiple tasks, they are divided into small tasks and processed one by one.

하지만 여러 가지 프로그램 중 어느 하나에 갑작스럽게 문제가 생긴다면 문제가 되는 부분을 빨리 해결하여 다른 프로그램을 이용하는 데에도 지장이 가지 않도록 처리하는 것이 필요하다. However, if a problem suddenly occurs in any one of several programs, it is necessary to quickly solve the problematic part so that it does not interfere with the use of other programs.

따라서, 프로세서 코어에서 다른 프로그램에도 기존에 진행하던 작업을 잠시 멈추고 문제가 있는 프로그램 먼저 해결할 수 있도록 신호를 보내 인터럽트를 수행하게 된다.Therefore, the processor core performs an interrupt by sending a signal to other programs to temporarily stop the existing work and to solve the problematic program first.

본 발명은 기존에 인터럽트를 수행하는 단계에서 발생하는 콘텍스트 정보의 오버라이팅을 방지하는 것이 가능한 인터럽트 처리 장치 및 방법을 제공하는 것을 목적으로 한다.An object of the present invention is to provide an interrupt processing apparatus and method capable of preventing overwriting of context information generated in the existing interrupt execution step.

한편, 본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.On the other hand, the technical problems to be achieved in the present invention are not limited to the technical problems mentioned above, and other technical problems that are not mentioned are clearly to those of ordinary skill in the technical field to which the present invention belongs from the following description. It will be understandable.

본 발명의 실시예에 따른 인터럽트 처리 장치 및 방법은 프로세서 코어; 상기 프로세서 코어에서 태스크 처리 시 발생하는 인터럽트의 우선순위를 판단하여 인터럽트 허용 신호를 생성하는 인터럽트 컨트롤부; 상기 인터럽트 컨트롤부로부터 인터럽트 허용 신호를 전달받고, 가장 최근에 저장된 콘텍스트 레지스터의 스택 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 콘텍스트 정보 관리부; 및 상기 콘텍스트 정보 관리부로부터 상기 이전 콘텍스트 포인터 값을 전달받고, 스택 포인터에 상기 이전 콘텍스트 포인터 값을 저장하는 스택 포인터 관리부;를 포함할 수 있다. An interrupt processing apparatus and method according to an embodiment of the present invention includes a processor core; an interrupt control unit for generating an interrupt enable signal by determining the priority of an interrupt generated during task processing in the processor core; a context information management unit that receives an interrupt enable signal from the interrupt control unit and extracts a previous context pointer value that is a stack pointer value of a most recently stored context register; and a stack pointer manager configured to receive the previous context pointer value from the context information manager and store the previous context pointer value in a stack pointer.

상기 인터럽트 컨트롤부는 상기 인터럽트의 우선순위를 판단하는 우선순위 판단 모듈; 상기 인터럽트의 허용 조건을 만족하는지 판단하는 인터럽트 허용 판단 모듈; 상기 인터럽트 허용 판단 모듈의 판단에 따라, 인터럽트를 활성화하는 글로벌 인터럽트 모듈; 및 상기 글로벌 인터럽트가 활성화되면 인터럽트 처리 함수를 불러오는 인터럽트 핸들러를 실행하는 인터럽트 핸들러 모듈을 포함할 수 있다. The interrupt control unit may include: a priority determination module for determining the priority of the interrupt; an interrupt permit determination module that determines whether the interrupt permit condition is satisfied; a global interrupt module activating an interrupt according to the determination of the interrupt permission determination module; and an interrupt handler module that executes an interrupt handler that calls an interrupt handling function when the global interrupt is activated.

상기 콘텍스트 정보 관리부는 콘텍스트 리스트를 작성하는 콘텍스트 리스트 모듈; 상기 콘텍스트 리스트에 마지막으로 저장된 레지스터의 스택 포인터 값을 추출하는 이전 콘텍스트 포인터 추출 모듈; 및 상기 이전 콘텍스트 포인터를 상기 스택 포인터 관리부에 전달하는 이전 콘텍스트 포인터 전달 모듈;을 포함할 수 있다. The context information management unit includes a context list module for creating a context list; a previous context pointer extraction module for extracting a stack pointer value of a register last stored in the context list; and a previous context pointer transfer module that transfers the previous context pointer to the stack pointer management unit.

상기 스택 포인터 관리부는 상기 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장하는 스택 포인터 저장 모듈; 및 상기 인터럽트 컨트롤부에 글로벌 인터럽트 활성화 신호를 전달하는 글로벌 인터럽트 활성화 신호 전달 모듈;을 포함할 수 있다.The stack pointer management unit may include: a stack pointer storage module configured to store the previous context pointer value in a stack pointer register; and a global interrupt enable signal transfer module that transmits a global interrupt enable signal to the interrupt control unit.

프로세서 코어를 포함하는 인터럽트 처리 장치가 복수의 태스크 실행 시 인터럽트를 처리하는 방법에 있어서, 인터럽트 컨트롤부가 상기 프로세서 코어에서 태스크 처리 시 발생하는 인터럽트의 우선순위를 판단하여 인터럽트 허용 신호를 생성하는 단계; 콘텍스트 정보 관리부가 상기 인터럽트 허용 신호를 전달받고, 콘텍스트 리스트에 마지막으로 저장된 콘텍스트 레지스터의 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 단계; 스택 포인터 관리부가 상기 이전 콘텍스트 포인터 값을 전달받고, 스택 포인터에 상기 이전 콘텍스트 포인터 값을 스택 포인터에 저장하는 단계; 및 인터럽트 컨트롤부가 상기 스택 포인터 관리부로부터 상기 글로벌 인터럽트 활성화 신호를 전달받아 인터럽트 핸들러를 실행하는 단계;를 포함할 수 있다.A method for an interrupt processing apparatus including a processor core to process an interrupt when a plurality of tasks are executed, the method comprising: generating an interrupt enable signal by determining the priority of an interrupt generated when the processor core processes a task; extracting, by a context information management unit, the previous context pointer value, which is a pointer value of a context register last stored in a context list, after receiving the interrupt enable signal; receiving, by a stack pointer management unit, the previous context pointer value, and storing the previous context pointer value in a stack pointer in a stack pointer; and executing an interrupt handler by an interrupt control unit receiving the global interrupt enable signal from the stack pointer management unit.

상기 인터럽트 허용 신호를 생성하는 단계는 우선순위 판단 모듈이 상기 인터럽트의 우선순위를 판단하는 단계; 및 인터럽트 허용 판단 모듈이 상기 인터럽트의 허용 조건을 만족하는지 판단하는 단계;를 포함할 수 있다. The generating of the interrupt enable signal may include: determining, by a priority determination module, the priority of the interrupt; and determining, by the interrupt permission determination module, whether the interrupt permission condition is satisfied.

상기 이전 콘텍스트 포인터 값을 추출하는 단계는 콘텍스트 리스트 모듈이 상기 프로세서 코어에서 태스크 처리 시 발생하는 콘텍스트의 리스트를 작성하는 단계; 이전 콘텍스트 포인터 추출 모듈이, 상기 상기 프로세서 코어에서 태스크 처리 시 발생하는 콘텍스트를 콘텍스트 리스트 모듈에 의해 작성된 콘텍스트 리스트에 마지막으로 저장된 레지스터의 스택 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 단계; 및 이전 콘텍스트 포인터 전달모듈이 상기 이전 콘텍스트 포인터를 상기 스택 포인터 관리부에 전달하는 단계;를 포함할 수 있다.The step of extracting the previous context pointer value may include: creating, by a context list module, a list of contexts generated during task processing in the processor core; extracting, by a previous context pointer extraction module, a previous context pointer value that is a stack pointer value of a register last stored in a context list created by a context list module with a context generated during task processing in the processor core; and transferring, by the previous context pointer transfer module, the previous context pointer to the stack pointer management unit.

상기 이전 콘텍스트 포인터 값을 스택 포인터에 저장하는 단계는 스택 포인터 저장 모듈이 상기 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장하는 단계; 및 글로벌 인터럽트 활성화 신호 전달 모듈이 상기 인터럽트 컨트롤부에 글로벌 인터럽트 활성화 신호를 전달하는 단계;를 포함할 수 있다.The storing of the previous context pointer value in the stack pointer may include: storing, by a stack pointer storage module, the previous context pointer value in a stack pointer register; and transmitting, by the global interrupt enable signal transfer module, a global interrupt enable signal to the interrupt control unit.

상기 인터럽트 핸들러를 실행하는 단계는 글로벌 인터럽트 모듈이 상기 스택 포인터 관리부로부터 전달받은 글로벌 인터럽트 활성화 신호에 따라, 인터럽트를 활성화하는 단계; 및 상기 글로벌 인터럽트가 활성화되면, 인터럽트 핸들러 모듈이 인터럽트 처리 함수를 불러오는 인터럽트 핸들러를 실행하는 단계;를 포함할 수 있다.The step of executing the interrupt handler may include: activating, by a global interrupt module, an interrupt according to a global interrupt activation signal received from the stack pointer manager; and when the global interrupt is activated, the interrupt handler module executing an interrupt handler that calls an interrupt handling function.

컴퓨터로 읽을 수 있는 기록 매체에 있어서, 제 6 항에 따른 인터럽트 처리 방법을 컴퓨터에서 실행시키기 위한 프로그램이 기록된 기록매체도 포함할 수 있다.A computer-readable recording medium may also include a recording medium in which a program for executing the interrupt processing method according to claim 6 in a computer is recorded.

본 발명의 실시예에 따른 인터럽트 처리 장치 및 방법은, 인터럽트를 수행하던 중에 새로운 인터럽트가 발생한 경우 기존의 인터럽트 콘텍스트 정보가 오버라이팅 되는 것을 방지하는 것이 가능하다.In the interrupt processing apparatus and method according to an embodiment of the present invention, when a new interrupt occurs while performing an interrupt, it is possible to prevent the existing interrupt context information from being overwritten.

또한 인터럽트의 현재 스택 포인터에 이전 콘텍스트 값을 저장하기 때문에 복수의 인터럽트가 발생하더라도 오버라이팅을 방지하고 인터럽트를 안정적으로 처리하는 것이 가능하다.In addition, since the previous context value is stored in the current stack pointer of the interrupt, it is possible to prevent overwriting and handle interrupts stably even if multiple interrupts occur.

한편, 본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.On the other hand, the effects obtainable in the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those of ordinary skill in the art from the following description. I will be able to.

도 1은 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 블록도이다.
도 2는 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 인터럽트 컨트롤부의 블록도이다.
도 3은 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 콘텍스트 정보 관리부의 블록도이다.
도 4는 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 스택 포인터 관리부의 블록도이다.
도 5는 본 발명의 일 실시예에 따른 인터럽트를 처리 장치의 작동을 설명하기 위한 도면이다.
1 is a block diagram of an interrupt processing apparatus according to an embodiment of the present invention.
2 is a block diagram of an interrupt control unit of an interrupt processing apparatus according to an embodiment of the present invention.
3 is a block diagram of a context information management unit of an interrupt processing apparatus according to an embodiment of the present invention.
4 is a block diagram of a stack pointer manager of an interrupt processing apparatus according to an embodiment of the present invention.
5 is a diagram for explaining the operation of an interrupt processing device according to an embodiment of the present invention.

본 발명의 다른 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술 되는 실시 예를 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시 예에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예는 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다.Other advantages and features of the present invention, and a method of achieving them will become apparent with reference to embodiments to be described later in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms. It is provided to completely inform the scope of the invention to the possessor, and the invention is only defined by the scope of the claims.

만일 정의되지 않더라도, 여기서 사용되는 모든 용어들(기술 혹은 과학 용어들을 포함)은 이 발명이 속한 종래 기술에서 보편적 기술에 의해 일반적으로 수용되는 것과 동일한 의미를 가진다. 일반적인 사전들에 의해 정의된 용어들은 관련된 기술 그리고/혹은 본 출원의 본문에 의미하는 것과 동일한 의미를 갖는 것으로 해석될 수 있고, 그리고 여기서 명확하게 정의된 표현이 아니더라도 개념화되거나 혹은 과도하게 형식적으로 해석되지 않을 것이다.Even if not defined, all terms (including technical or scientific terms) used herein have the same meaning as commonly accepted by universal technology in the prior art to which this invention belongs. Terms defined by general dictionaries may be construed as having the same meaning as the related description and/or the text of this application, and not conceptualized or excessively formalized, even if not clearly defined herein. Won't.

본 명세서에서 사용된 용어는 실시 예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 '포함한다' 및/또는 이 동사의 다양한 활용형들 예를 들어, '포함', '포함하는', '포함하고', '포함하며' 등은 언급된 조성, 성분, 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 조성, 성분, 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다. 본 명세서에서 '및/또는' 이라는 용어는 나열된 구성들 각각 또는 이들의 다양한 조합을 가리킨다.The terms used in this specification are for describing exemplary embodiments and are not intended to limit the present invention. In this specification, the singular form also includes the plural form unless specifically stated in the phrase. As used in the specification,'include' and/or various conjugated forms of this verb, for example,'including','including','including','including', and the like refer to the mentioned composition, ingredient, component, Steps, operations and/or elements do not exclude the presence or addition of one or more other compositions, components, components, steps, operations and/or elements. In the present specification, the term'and/or' refers to each of the listed components or various combinations thereof.

한편, 본 명세서 전체에서 사용되는 '~부', '~기', '~블록', '~모듈' 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미할 수 있다. 예를 들어 소프트웨어, FPGA 또는 ASIC과 같은 하드웨어 구성요소를 의미할 수 있다. 그렇지만 '~부', '~기', '~블록', '~모듈' 등이 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '~부', '~기', '~블록', '~모듈'은 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다.Meanwhile, terms such as'~ unit','~ group','~ block', and'~ module' used throughout this specification may mean a unit that processes at least one function or operation. For example, it can mean software, hardware components such as FPGAs or ASICs. However,'~bu','~gi','~block', and'~module' are not meant to be limited to software or hardware. '~ unit', '~ group', '~ block', and '~ module' may be configured to reside in an addressable storage medium or may be configured to reproduce one or more processors.

따라서, 일 예로서 '~부', '~기', '~블록', '~모듈'은 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다. 구성요소들과 '~부', '~기', '~블록', '~모듈'들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '~부', '~기', '~블록', '~모듈'들로 결합되거나 추가적인 구성요소들과 '~부', '~기', '~블록', '~모듈'들로 더 분리될 수 있다.Therefore, as an example,'~ unit','~ group','~ block', and'~ module' are components such as software components, object-oriented software components, class components, and task components. S, processes, functions, properties, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays and Include variables. The functions provided in the components and'~bu','~gi','~block', and'~module' include a smaller number of components and'~bu','~gi', and'~block. It may be combined into','~modules' or further separated into additional components and'~unit','~group','~block', and'~module'.

이하, 본 명세서의 첨부된 도면을 참조하여 본 발명의 실시예를 상세하게 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings of the present specification.

도 1은 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 블록도이다.1 is a block diagram of an interrupt processing apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시예에 따른 인터럽트 처리 장치(100)는 프로세서 코어(110), 저장창치(120), 인터럽트 컨트롤부(130), 콘텍스트 정보 관리부(140) 및 스택 포인터 관리부(150)을 포함할 수 있다.Referring to FIG. 1 , an interrupt processing apparatus 100 according to an embodiment of the present invention includes a processor core 110 , a storage unit 120 , an interrupt control unit 130 , a context information management unit 140 , and a stack pointer management unit. (150).

좀 더 구체적으로는, 상기 프로세서 코어(110)는 운영체제(OS)를 통해 데이터를 처리하는 것이 가능하다. 상기 운영체제는 소프트웨어 또는 각종 함수가 실행되는 환경으로서, 태스크를 처리할 수 있다. More specifically, the processor core 110 may process data through an operating system (OS). The operating system is an environment in which software or various functions are executed, and may process tasks.

상기 프로세서 코어(110)는 태스크의 콘텍스트를 전환으로 인해 발생하는 인터럽트를 데이터의 손실없이 처리하기 위하여, 상기 저장장치, 상기 인터럽트 컨트롤부(130), 상기 콘텍스트 정보 관리부(140) 및 상기 스택 포인터 관리부(150)의 동작을 제어할 수 있다.The processor core 110 processes the interrupt generated by switching the context of a task without loss of data, the storage device, the interrupt control unit 130 , the context information management unit 140 , and the stack pointer management unit The operation of 150 can be controlled.

상기 프로세서 코어(110)는 시스템 운영체제에 포함된 복수의 콘텍스트들을 상호 전환하는 동작을 수행할 수 있다.The processor core 110 may perform an operation of switching between a plurality of contexts included in the system operating system.

상기 저장장치(120)는 휘발성 및/또는 비휘발성 메모리를 포함할 수 있다. 또한, 본 발명의 일 실시예에 따른 상기 저장장치(120)는 인터럽트 처리 장치(100)에 포함된 구성요소와 관련된 명령 또는 데이터를 저장할 수 있다. The storage device 120 may include volatile and/or non-volatile memory. Also, the storage device 120 according to an embodiment of the present invention may store commands or data related to components included in the interrupt processing device 100 .

상기 저장장치(120)는 소프트웨어 및/또는 프로그램을 저장할 수 있다. The storage device 120 may store software and/or programs.

상기 프로그램은 커널, 미들웨어, 어플리케이션 프로그래밍 인터페이스(application programming interface(API)), 및/또는 어플리케이션 프로그램(또는 "어플리케이션") 등을 포함할 수 있다.The program may include a kernel, middleware, an application programming interface (API), and/or an application program (or "application"), and the like.

상기 인터럽트 컨트롤부(130)는 프로세서 코어에서 태스크 처리시 발생하는 콘텍스트 전환에 의한 인터럽트를 수행할 수 있다. The interrupt control unit 130 may perform an interrupt by a context switch that occurs during task processing in the processor core.

상기 인터럽트 컨트롤부(130)는 콘텍스트가 전환되어 인터럽트가 발생하면, 인터럽트 발생 신호를 상기 콘텍스트 정보 관리부(140)에 전달할 수 있다. The interrupt control unit 130 may transmit an interrupt generation signal to the context information management unit 140 when the context is switched and an interrupt occurs.

또한, 상기 인터럽트 컨트롤부(130)는 상기 스택 포인터 관리부(150)로부터 글로벌 인터럽트 활성화 신호를 전달받을 수 있으며, 상기 글로벌 인터럽트 활성화 신호를 전달받으면 글로벌 인터럽트를 활성화하고 인터럽트 핸들러를 실행할 수 있다.Also, the interrupt control unit 130 may receive a global interrupt enable signal from the stack pointer management unit 150 , and upon receiving the global interrupt enable signal, activate a global interrupt and execute an interrupt handler.

상기 콘텍스트 정보 관리부(140)는 각 태스크의 콘텍스트 정보를 스택하여 저장할 수 있다. 또한, 상기 인터럽트 컨트롤부(130)로부터 인터럽트 허용 신호를 전달받을 수 있으며, 상기 인터럽트 허용 신호를 전달받으면 콘텍스트 스택 포인터 레지스터에 접근하여 이전 콘텍스트 포인터 값을 추출할 수 있다.The context information manager 140 may stack and store context information of each task. In addition, an interrupt enable signal may be received from the interrupt control unit 130, and upon receiving the interrupt enable signal, a previous context pointer value may be extracted by accessing a context stack pointer register.

또한 상기 콘텍스트 정보 관리부(140)는 상기 스택 포인터 관리부(150))에 이전 콘텍스트 포인터 값을 전달할 수 있다.Also, the context information manager 140 may transmit a previous context pointer value to the stack pointer manager 150 .

상기 스택 포인터관리부(150)는 상기 콘텍스트 정보 관리부(140)에서 전달받은 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장할 수 있다.The stack pointer management unit 150 may store the previous context pointer value received from the context information management unit 140 in a stack pointer register.

또한, 상기 인터럽트 컨트롤부(130)에 글로벌 인터럽트 활성화 신호를 전달할 수 있다.Also, a global interrupt enable signal may be transmitted to the interrupt control unit 130 .

상기한 프로세서 코어, 저장장치, 레지스터 들은 본 발명의 기술적 사상을 수행하기 위한 하드웨어 및/또는 상기 하드웨어를 구동하기 위한 소프트웨어의 기능적 및/또는 구조적 결합을 의미할 수 있다.The above-described processor core, storage device, and registers may mean a functional and/or structural combination of hardware for carrying out the technical idea of the present invention and/or software for driving the hardware.

도 2는 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 인터럽트 컨트롤부(130)의 블록도이다.2 is a block diagram of the interrupt control unit 130 of the interrupt processing apparatus according to an embodiment of the present invention.

도 2를 참고하면, 본 발명의 일 실시예에 따른 인터럽트 컨트롤부는 우선순위 판단 모듈(131), 인터럽트 허용 판단 모듈(132), 글로벌 인터럽트 모듈(133) 및 인터럽트 핸들러 모듈(134)를 포함할 수 있다.Referring to FIG. 2 , the interrupt control unit according to an embodiment of the present invention may include a priority determination module 131 , an interrupt permission determination module 132 , a global interrupt module 133 , and an interrupt handler module 134 . have.

본 발명의 일 실시예에 따르면, 프로세서 코어에서 태스크 수행 중에 인터럽트가 발생하면, 상기 인터럽트 컨트롤부(130)의 우선순위 판단 모듈(131)에서 상기 인터럽트의 우선순위를 판단할 수 있다.According to an embodiment of the present invention, when an interrupt occurs while the processor core performs a task, the priority determination module 131 of the interrupt control unit 130 may determine the priority of the interrupt.

상기 인터럽트 허용 판단 모듈(132)은 우선순위 판단 모듈(131)에서 판단한 인터럽트의 우선순위 판단 결과를 바탕으로, 상기 인터럽트가 사전에 저장되어 있는 인터럽트 허용 조건을 만족하는지 판단할 수 있다.The interrupt permission determination module 132 may determine whether the interrupt satisfies a pre-stored interrupt permission condition based on the priority determination result of the interrupt determined by the priority determination module 131 .

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트가 미리 저장된 인터럽트 허용 조건을 만족하는 것으로 판단하는 경우에는 인터럽트 허용 신호를 생성할 수 있다. The interrupt enable determination module 132 may generate an interrupt enable signal when it is determined that the interrupt satisfies a pre-stored interrupt enable condition.

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트 허용 신호를 생성한 경우에는 상기 콘텍스트 정보 관리부(140)로 상기 인터럽트 허용 신호를 전달할 수 있다.The interrupt enable determination module 132 may transmit the interrupt enable signal to the context information management unit 140 when the interrupt enable signal is generated.

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트가 미리 저장된 인터럽트 허용 조건을 만족하지 않는 것으로 판단하는 경우에는 인터럽트 허용 신호를 생성하지 않을 수 있다.The interrupt enable determination module 132 may not generate an interrupt enable signal when it is determined that the interrupt does not satisfy the pre-stored interrupt enable condition.

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트 허용 신호를 생성하지 않은 경우에는 상기 인터럽트를 수행하지 않을 수 있다.The interrupt enable determination module 132 may not perform the interrupt when the interrupt enable signal is not generated.

상기 글로벌 인터럽트 모듈(133)은 상기 인터럽트의 활성화 여부를 판단할 수 있는 인터럽트 활성화 비트를 포함할 수 있다.The global interrupt module 133 may include an interrupt enable bit capable of determining whether the interrupt is enabled.

예를 들어, 상기 인터럽트 활성화 비트가 '0'으로 표시되어 상기 글로벌 인터럽트가 활성화되면, 상기 프로세서 코어에서는 미리 정해진 순서에 따라 상기 인터럽트를 수행할 수 있다.For example, when the global interrupt is activated because the interrupt enable bit is displayed as '0', the processor core may perform the interrupt according to a predetermined order.

또한, 상기 인터럽트 활성화 비트가 '0'으로 표시되면 상기 프로세서 코어에서는 추가적인 인터럽트가 실행되는 것을 방지할 수도 있다.In addition, when the interrupt enable bit is displayed as '0', the processor core may prevent an additional interrupt from being executed.

예를 들어, 상기 인터럽트 활성화 비트가 '1'로 표시되어 상기 글로벌 인터럽트가 비활성화 되면, 상기 프로세서 코어에서는 상기 인터럽트를 수행하지 않을 수 있다.For example, if the interrupt enable bit is displayed as '1' and the global interrupt is deactivated, the processor core may not perform the interrupt.

상기 인터럽트 핸들러 모듈(134)은 상기 글로벌 인터럽트가 활성화되면 기존에 저장된 인터럽트 처리 함수를 불러올 수 있다.The interrupt handler module 134 may call a previously stored interrupt handling function when the global interrupt is activated.

상기 인터럽트 처리 함수는 발생한 인터럽트에 대응하여 특정 기능을 처리하는 코드 루틴일 수 있으며, 인터럽트 발생 원인에 따라 다른 방식의 작업을 수행하는 함수를 불러올 수 있다.The interrupt handling function may be a code routine that processes a specific function in response to an interrupt that has occurred, and may call a function that performs a different operation according to the cause of the interrupt.

상기 인터럽트 핸들러 모듈(134)은 상기 글로벌 인터럽트가 비활성화되면 작동하지 않을 수 있다. The interrupt handler module 134 may not operate when the global interrupt is deactivated.

도 3은 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 콘텍스트 정보 관리부(140)의 블록도이다.3 is a block diagram of the context information management unit 140 of the interrupt processing apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따르면, 상기 콘텍스트 정보 관리부(140)는 콘텍스트 리스트를 작성하는 콘텍스트 리스트 모듈(141)과 상기 콘텍스트 리스트에 마지막으로 저장된 콘텍스트 레지스터의 포인터 값을 추출하는 이전 콘텍스트 포인터 추출 모듈(142) 및 이전 콘텍스트 포인터 전달 모듈(143)을 포함할 수 있다.According to an embodiment of the present invention, the context information management unit 140 includes a context list module 141 for creating a context list and a previous context pointer extraction module for extracting a pointer value of a context register last stored in the context list ( 142) and a previous context pointer transfer module 143.

상기 콘텍스트 정보 관리부(140)는 상기 프로세서 코어(110)에서 태스크를 처리하면서 상기 태스크의 흐름 정보인 콘텍스트 정보를 획득할 수 있다.The context information manager 140 may acquire context information that is flow information of the task while processing the task in the processor core 110 .

상기 콘텍스트 정보는 콘텍스트 리스트 모듈(141)의 콘텍스트 리스트에 저장될 수 있다.The context information may be stored in a context list of the context list module 141 .

상기 콘텍스트 리스트는 각각의 콘텍스트 정보를 저장할 수 있는 레지스터로 구성될 수 있다.The context list may be composed of a register capable of storing respective context information.

상기 콘텍스트 리스트의 레지스터에 콘텍스트 정보가 저장되는 방법을 예를 들어 설명하면 다음과 같다.A method in which context information is stored in the register of the context list will be described as an example.

상기 콘텍스트 정보는 태스크를 처리하는 순서대로 스택하여 저장될 수 있으며, 가장 최근에 처리된 태스크의 콘텍스트 정보는 콘텍스트 리스트의 가장 위에 저장될 수 있다.The context information may be stacked and stored in the order in which tasks are processed, and context information of the most recently processed task may be stored at the top of the context list.

상기 이전 콘텍스트 포인터 추출 모듈(142)은 상기 콘텍스트 리스트의 가장 위에 저장된 레지스터의 스택 포인터 정보를 추출할 수 있다,The previous context pointer extraction module 142 may extract stack pointer information of a register stored at the top of the context list.

상기 콘텍스트 리스트의 가장 위에 저장된 레지스터의 스택 포인터 정보는 상기 프로세서 코어(110)에서 수행하여 저장될 콘텍스트 정보의 이전 콘텍스트 정보라고 할 수 있다.The stack pointer information of the register stored at the top of the context list may be referred to as previous context information of context information to be executed and stored by the processor core 110 .

따라서, 상기 이전 콘텍스트 포인터 추출 모듈(142)은 상기 이전 콘텍스트 정보가 저장된 레지스터의 스택 포인터 정보를 추출할 수 있다.Accordingly, the previous context pointer extraction module 142 may extract stack pointer information of a register in which the previous context information is stored.

이러한 구성에 의하면, 콘텍스트 정보는 상기 프로세서 코어(110)에서 작업을 수행할 때에 생성되는 콘텍스트 정보가 순차적으로 스택되기 때문에, 새로운 인터럽트가 발생하여도 기존에 저장되었던 콘텍스트 정보가 오버라이팅되어 손실되는 것을 방지할 수 있다.According to this configuration, since the context information generated when the processor core 110 performs a task is sequentially stacked, even when a new interrupt occurs, the previously stored context information is overwritten and lost. can be prevented

도 4는 본 발명의 일 실시예에 따른 인터럽트 처리 장치의 스택 포인터 관리부(150)의 블록도이다.4 is a block diagram of the stack pointer management unit 150 of the interrupt processing apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 상기 스택 포인터 관리부(150)는 스택 포인터 저장 모듈(151)과 글로벌 인터럽트 활성화 신호 전달 모듈(152)를 포함할 수 있다.The stack pointer management unit 150 according to an embodiment of the present invention may include a stack pointer storage module 151 and a global interrupt enable signal transmission module 152 .

상기 스택 포인터 저장 모듈(151)은 상기 콘텍스트 정보 관리부(140)로부터 전달받은 이전 콘텍스트 포인터 값을 상기 스택 포인터 레지스터의 스택 포인터 레지스터에 저장할 수 있다.The stack pointer storage module 151 may store the previous context pointer value received from the context information manager 140 in a stack pointer register of the stack pointer register.

상기 글로벌 인터럽트 활성화 신호 전달 모듈(152)은 상기 스택 포인터 레지스터에 이전 콘텍스트 포인터 값을 저장한 뒤, 상기 인터럽트 컨트롤부(130)에 글로벌 인터럽트 활성화 신호를 전달할 수 있다.The global interrupt enable signal transfer module 152 may store a previous context pointer value in the stack pointer register, and then transfer the global interrupt enable signal to the interrupt control unit 130 .

도 5는 본 발명의 일 실시예에 따른 인터럽트를 처리 장치의 작동을 설명하기 위한 도면이다.5 is a diagram for explaining the operation of an interrupt processing device according to an embodiment of the present invention.

인터럽트 발생 단계(S100)에서, 상기 프로세서 코어(110)에서 복수의 태스크 실행 시 콘텍스트 전환으로 인해 인터럽트가 발생할 수 있다.In the interrupt generation step ( S100 ), an interrupt may be generated due to a context switch when a plurality of tasks are executed in the processor core 110 .

상기 인터럽트 컨트롤부(130)는 상기 인터럽트 발생 정보를 전달받고, 상기 인터럽트 컨트롤부의 상기 우선순위 판단 모듈(131)은 상기 인터럽트의 우선순위를 판단하는 단계를 포함할 수 있다.The interrupt control unit 130 may receive the interrupt generation information, and the priority determination module 131 of the interrupt control unit may include determining the priority of the interrupt.

상기 인터럽트 컨트롤부(130)의 인터럽트 허용 판단 모듈(132)은 상기 우선순위 판단 모듈(131)에서 판단한 인터럽트의 우선순위 판단 결과를 바탕으로, 상기 인터럽트가 사전에 저장되어 있는 인터럽트 허용 조건을 만족하는지 판단하는 단계를 포함할 수 있다.The interrupt permit determination module 132 of the interrupt control unit 130 determines whether the interrupt satisfies the interrupt permit condition stored in advance based on the priority determination result of the interrupt determined by the priority determination module 131 . It may include a step of judging.

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트가 미리 저장된 인터럽트 허용 조건을 만족하는 것으로 판단하는 경우에는 인터럽트 허용 신호를 생성할 수 있다.The interrupt enable determination module 132 may generate an interrupt enable signal when it is determined that the interrupt satisfies a pre-stored interrupt enable condition.

상기 인터럽트 허용 판단 모듈(132)은 상기 인터럽트가 미리 저장된 인터럽트 허용 조건을 만족하지 않는 것으로 판단하는 경우에는 인터럽트 허용 신호를 생성하지 않을 수 있다.The interrupt enable determination module 132 may not generate an interrupt enable signal when it is determined that the interrupt does not satisfy the pre-stored interrupt enable condition.

인터럽트 허용 신호를 전달하는 단계(S200)에서, 상기 인터럽트 허용 판단 모듈(132)에서 생성한 인터럽트 허용 신호를 상기 콘텍스트 정보 관리부(140)으로 전달할 수 있다.In the step of transmitting the interrupt enable signal ( S200 ), the interrupt enable signal generated by the interrupt enable determination module 132 may be transferred to the context information management unit 140 .

상기 콘텍스트 정보 관리부(140)는 상기 인터럽트 허용 신호를 전달받고, 콘텍스트 리스트 모듈(141)의 콘텍스트 리스트에 접근하는 단계를 포함할 수 있다.The context information management unit 140 may include receiving the interrupt enable signal and accessing the context list of the context list module 141 .

상기 콘텍스트 리스트는 각각의 레지스터 마다 스택 포인터 정보를 포함할 수 있다.The context list may include stack pointer information for each register.

또한, 상기 이전 콘텍스트 포인터 추출 모듈(142)은 상기 콘텍스트 리스트의 가장 위에 저장된 레지스터의 스택 포인터 정보인 이전 콘텍스트 포인터 값을 추출하는 단계를 포함할 수 있다In addition, the previous context pointer extraction module 142 may include extracting a previous context pointer value that is stack pointer information of a register stored at the top of the context list.

이전 콘텍스트 포인터 값을 전달하는 단계(S300)에서, 상기 이전 콘텍스트 포인터 값을 상기 스택 포인터 관리부(150)에 전달하는 단계를 포함할 수 있다.The step of transmitting the previous context pointer value ( S300 ) may include transmitting the previous context pointer value to the stack pointer management unit 150 .

상기 스택 포인터 관리부(150)의 스택 포인터 저장 모듈(151)은 전달 받은 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장하는 단계를 포함할 수 있다. The stack pointer storage module 151 of the stack pointer management unit 150 may include storing the received previous context pointer value in a stack pointer register.

상기 스택 포인터 관리부(150)의 글로벌 인터럽트 활성화 신호 전달 모듈(152)은 상기 인터럽트 컨트롤부(130)에 전달하기 위한 글로벌 인터럽트 활성화 신호를 생성할 수 있다.The global interrupt enable signal transfer module 152 of the stack pointer management unit 150 may generate a global interrupt enable signal to be transmitted to the interrupt control unit 130 .

글로벌 인터럽트 활성화 신호를 전달하는 단계(S400)에서, 상기 글로벌 인터럽트 활성화 신호 전달 모듈(152)에서 생성한 글로벌 인터럽트 활성화 신호를 상기 인터럽트 컨트롤부(130)에 전달하는 단계를 포함할 수 있다.In the step of transmitting the global interrupt enable signal ( S400 ), the step of transmitting the global interrupt enable signal generated by the global interrupt enable signal transfer module 152 to the interrupt control unit 130 may be included.

글로벌 인터럽트를 활성화하는 단계(S500)에서, 상기 인터럽트 컨트롤부(130)의 글로벌 인터럽트 모듈(133)은 인터럽트의 활성화 여부를 판단할 수 있는 인터럽트 활성화 비트를 포함할 수 있으며, 상기 인터럽트 활성화 비트를 변경하여 글로벌 인터럽트를 활성화하는 단계를 포함할 수 있다.In the step of activating the global interrupt ( S500 ), the global interrupt module 133 of the interrupt control unit 130 may include an interrupt enable bit capable of determining whether to activate the interrupt, and change the interrupt enable bit. to enable the global interrupt.

상기 인터럽트 핸들러 모듈(134)은 상기 글로벌 인터럽트가 활성화되면 기존에 저장된 인터럽트 처리 함수를 불러오는 단계를 포함할 수 있다.The interrupt handler module 134 may include a step of calling a previously stored interrupt handling function when the global interrupt is activated.

이상의 상세한 설명은 본 발명을 예시하는 것이다. 또한 전술한 내용은 본 발명의 바람직한 실시 형태를 나타내어 설명하는 것이며, 본 발명은 다양한 다른 조합, 변경 및 환경에서 사용할 수 있다. 즉 본 명세서에 개시된 발명의 개념의 범위, 저술한 개시 내용과 균등한 범위 및/또는 당업계의 기술 또는 지식의 범위내에서 변경 또는 수정이 가능하다. 저술한 실시예는 본 발명의 기술적 사상을 구현하기 위한 최선의 상태를 설명하는 것이며, 본 발명의 구체적인 적용 분야 및 용도에서 요구되는 다양한 변경도 가능하다. 따라서 이상의 발명의 상세한 설명은 개시된 실시 상태로 본 발명을 제한하려는 의도가 아니다. 또한 첨부된 청구범위는 다른 실시 상태도 포함하는 것으로 해석되어야 한다.The detailed description above is illustrative of the present invention. In addition, the above description shows and describes preferred embodiments of the present invention, and the present invention can be used in various other combinations, modifications, and environments. That is, changes or modifications may be made within the scope of the concept of the invention disclosed in the present specification, the scope equivalent to the disclosed contents, and/or the technology or knowledge in the art. The above-described embodiments are to describe the best state for implementing the technical idea of the present invention, and various changes required in the specific application fields and uses of the present invention are also possible. Therefore, the detailed description of the invention is not intended to limit the invention to the disclosed embodiment. In addition, the appended claims should be construed as including other embodiments.

400: 인터럽트 처리 장치
410: 프로세서 코어
420: 저장장치
430: 인터럽트 컨트롤 레지스터
440: 인터럽트 스택 포인터 레지스터
450: 스택 포인터 레지스터
460: 콘텍스트 저장 레지스터
400: interrupt handling unit
410: processor core
420: storage device
430: interrupt control register
440: interrupt stack pointer register
450: stack pointer register
460: Context save register

Claims (10)

프로세서 코어;
상기 프로세서 코어에서 태스크 처리 시 발생하는 인터럽트의 우선순위를 판단하여 인터럽트 허용 신호를 생성하는 인터럽트 컨트롤부;
상기 인터럽트 컨트롤부로부터 인터럽트 허용 신호를 전달받고, 가장 최근에 저장된 콘텍스트 레지스터의 스택 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 콘텍스트 정보 관리부; 및
상기 콘텍스트 정보 관리부로부터 상기 이전 콘텍스트 포인터 값을 전달받고, 스택 포인터에 상기 이전 콘텍스트 포인터 값을 저장하는 스택 포인터 관리부;
를 포함하는 인터럽트 처리 장치.
processor core;
an interrupt control unit for generating an interrupt enable signal by determining the priority of an interrupt generated during task processing in the processor core;
a context information management unit that receives an interrupt enable signal from the interrupt control unit and extracts a previous context pointer value that is a stack pointer value of a most recently stored context register; and
a stack pointer management unit receiving the previous context pointer value from the context information management unit and storing the previous context pointer value in a stack pointer;
Interrupt handling unit comprising a.
제 1항에 있어서,
상기 인터럽트 컨트롤부는:
상기 인터럽트의 우선순위를 판단하는 우선순위 판단 모듈;
상기 인터럽트의 허용 조건을 만족하는지 판단하는 인터럽트 허용 판단 모듈;
상기 인터럽트 허용 판단 모듈의 판단에 따라, 인터럽트를 활성화하는 글로벌 인터럽트 모듈; 및
상기 글로벌 인터럽트가 활성화되면 인터럽트 처리 함수를 불러오는 인터럽트 핸들러를 실행하는 인터럽트 핸들러 모듈
을 포함하는 인터럽트 처리 장치.
The method of claim 1,
The interrupt control unit:
a priority determination module for determining the priority of the interrupt;
an interrupt permit determination module that determines whether the interrupt permit condition is satisfied;
a global interrupt module activating an interrupt according to the determination of the interrupt permission determination module; and
An interrupt handler module that executes an interrupt handler that calls an interrupt handling function when the global interrupt is activated
Interrupt handling unit including.
제 2항에 있어서,
상기 콘텍스트 정보 관리부는:
콘텍스트 리스트를 작성하는 콘텍스트 리스트 모듈;
상기 콘텍스트 리스트에 마지막으로 저장된 레지스터의 스택 포인터 값을 추출하는 이전 콘텍스트 포인터 추출 모듈; 및
상기 이전 콘텍스트 포인터를 상기 스택 포인터 관리부에 전달하는 이전 콘텍스트 포인터 전달 모듈;
을 포함하는 인터럽트 처리 장치.
The method of claim 2,
The context information management unit:
a context list module for creating a context list;
a previous context pointer extraction module for extracting a stack pointer value of a register last stored in the context list; and
a previous context pointer transfer module for transferring the previous context pointer to the stack pointer management unit;
Interrupt handling unit including.
제 3항에 있어서,
상기 스택 포인터 관리부는:
상기 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장하는 스택 포인터 저장 모듈; 및
상기 인터럽트 컨트롤부에 글로벌 인터럽트 활성화 신호를 전달하는 글로벌 인터럽트 활성화 신호 전달 모듈;
을 포함하는 인터럽트 처리 장치.
The method of claim 3,
The stack pointer management unit includes:
a stack pointer storage module for storing the previous context pointer value in a stack pointer register; and
a global interrupt enable signal transfer module that transmits a global interrupt enable signal to the interrupt control unit;
Interrupt handling unit including.
프로세서 코어를 포함하는 인터럽트 처리 장치가 복수의 태스크 실행 시 인터럽트를 처리하는 방법에 있어서,
인터럽트 컨트롤부가 상기 프로세서 코어에서 태스크 처리 시 발생하는 인터럽트의 우선순위를 판단하여 인터럽트 허용 신호를 생성하는 단계;
콘텍스트 정보 관리부가 상기 인터럽트 허용 신호를 전달받고, 콘텍스트 리스트에 마지막으로 저장된 콘텍스트 레지스터의 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 단계;
스택 포인터 관리부가 상기 이전 콘텍스트 포인터 값을 전달받고, 스택 포인터에 상기 이전 콘텍스트 포인터 값을 스택 포인터에 저장하는 단계; 및
인터럽트 컨트롤부가 상기 스택 포인터 관리부로부터 상기 글로벌 인터럽트 활성화 신호를 전달받아 인터럽트 핸들러를 실행하는 단계;
를 포함하는 인터럽트 처리 방법.
A method for processing an interrupt when an interrupt processing device including a processor core executes a plurality of tasks, the method comprising:
generating, by an interrupt control unit, an interrupt enable signal by determining the priority of an interrupt generated during task processing in the processor core;
extracting, by a context information management unit, a previous context pointer value that is a pointer value of a context register last stored in a context list after receiving the interrupt enable signal;
receiving, by a stack pointer management unit, the previous context pointer value, and storing the previous context pointer value in a stack pointer in a stack pointer; and
executing an interrupt handler by an interrupt control unit receiving the global interrupt enable signal from the stack pointer management unit;
Interrupt handling method including.
제 5항에 있어서,
상기 인터럽트 허용 신호를 생성하는 단계는:
우선순위 판단 모듈이 상기 인터럽트의 우선순위를 판단하는 단계; 및
인터럽트 허용 판단 모듈이 상기 인터럽트의 허용 조건을 만족하는지 판단하는 단계;
를 포함하는 인터럽트 처리 방법.
The method of claim 5,
The step of generating the interrupt enable signal includes:
determining, by the priority determination module, the priority of the interrupt; and
determining, by an interrupt permit determination module, whether the interrupt permit condition is satisfied;
Interrupt handling method including.
제 6항에 있어서,
상기 이전 콘텍스트 포인터 값을 추출하는 단계는:
이전 콘텍스트 포인터 추출 모듈이, 상기 상기 프로세서 코어에서 태스크 처리 시 발생하는 콘텍스트를 콘텍스트 리스트 모듈에 의해 작성된 콘텍스트 리스트에 마지막으로 저장된 레지스터의 스택 포인터 값인 이전 콘텍스트 포인터 값을 추출하는 단계; 및
이전 콘텍스트 포인터 전달모듈이 상기 이전 콘텍스트 포인터를 상기 스택 포인터 관리부에 전달하는 단계;
를 포함하는 인터럽트 처리 방법.
The method of claim 6,
The step of extracting the previous context pointer value includes:
extracting, by a previous context pointer extraction module, a previous context pointer value that is a stack pointer value of a register last stored in a context list created by a context list module with a context generated during task processing in the processor core; and
transferring, by a previous context pointer transfer module, the previous context pointer to the stack pointer management unit;
Interrupt handling method including.
제 7항에 있어서,
상기 이전 콘텍스트 포인터 값을 스택 포인터에 저장하는 단계는:
스택 포인터 저장 모듈이 상기 이전 콘텍스트 포인터 값을 스택 포인터 레지스터에 저장하는 단계; 및
글로벌 인터럽트 활성화 신호 전달 모듈이 상기 인터럽트 컨트롤부에 글로벌 인터럽트 활성화 신호를 전달하는 단계;
를 포함하는 인터럽트 처리 방법.
The method of claim 7,
Storing the previous context pointer value in a stack pointer includes:
storing, by a stack pointer storage module, the previous context pointer value in a stack pointer register; and
transmitting, by the global interrupt enable signal transfer module, a global interrupt enable signal to the interrupt control unit;
Interrupt handling method including.
제 8항에 있어서,
상기 인터럽트 핸들러를 실행하는 단계는:
글로벌 인터럽트 모듈이 상기 스택 포인터 관리부로부터 전달받은 글로벌 인터럽트 활성화 신호에 따라, 인터럽트를 활성화하는 단계; 및
상기 글로벌 인터럽트가 활성화되면, 인터럽트 핸들러 모듈이 인터럽트 처리 함수를 불러오는 인터럽트 핸들러를 실행하는 단계;
를 포함하는 인터럽트 처리 방법.
The method of claim 8,
The steps of executing the interrupt handler are:
activating, by a global interrupt module, an interrupt according to the global interrupt enable signal received from the stack pointer manager; and
when the global interrupt is activated, the interrupt handler module executing an interrupt handler that calls an interrupt handling function;
Interrupt handling method including.
컴퓨터로 읽을 수 있는 기록 매체에 있어서,
제 5 항에 따른 인터럽트 처리 방법을 컴퓨터에서 실행시키기 위한 프로그램이 기록된 기록매체.
In a computer-readable recording medium,
A recording medium in which a program for executing the interrupt processing method according to claim 5 in a computer is recorded.
KR1020190152461A 2019-11-25 2019-11-25 Apparatus and method for processing interrupt KR102340871B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190152461A KR102340871B1 (en) 2019-11-25 2019-11-25 Apparatus and method for processing interrupt
PCT/KR2019/016355 WO2021107173A1 (en) 2019-11-25 2019-11-26 Apparatus and method for processing interrupt

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190152461A KR102340871B1 (en) 2019-11-25 2019-11-25 Apparatus and method for processing interrupt

Publications (2)

Publication Number Publication Date
KR20210063851A true KR20210063851A (en) 2021-06-02
KR102340871B1 KR102340871B1 (en) 2021-12-20

Family

ID=76130608

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190152461A KR102340871B1 (en) 2019-11-25 2019-11-25 Apparatus and method for processing interrupt

Country Status (2)

Country Link
KR (1) KR102340871B1 (en)
WO (1) WO2021107173A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010041142A (en) * 1998-12-22 2001-05-15 롤페스 요하네스 게라투스 알베르투스 Interrupt/software-controlled thread processing
US20020184423A1 (en) * 2001-05-10 2002-12-05 Safi Khan Mobile communication device having a prioritized interrupt controller
KR20040056125A (en) * 2002-12-23 2004-06-30 삼성전자주식회사 Interrupt control system providing for the least delay and method thereof
US20150220464A1 (en) * 2014-02-04 2015-08-06 Freescale Semiconductor, Inc. Dynamic interrupt stack protection
US20180203722A1 (en) * 2017-01-19 2018-07-19 Samsung Electronics Co., Ltd. Method for reducing interrupt latency in embedded systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010041142A (en) * 1998-12-22 2001-05-15 롤페스 요하네스 게라투스 알베르투스 Interrupt/software-controlled thread processing
US20020184423A1 (en) * 2001-05-10 2002-12-05 Safi Khan Mobile communication device having a prioritized interrupt controller
KR20040056125A (en) * 2002-12-23 2004-06-30 삼성전자주식회사 Interrupt control system providing for the least delay and method thereof
US20150220464A1 (en) * 2014-02-04 2015-08-06 Freescale Semiconductor, Inc. Dynamic interrupt stack protection
US20180203722A1 (en) * 2017-01-19 2018-07-19 Samsung Electronics Co., Ltd. Method for reducing interrupt latency in embedded systems

Also Published As

Publication number Publication date
WO2021107173A1 (en) 2021-06-03
KR102340871B1 (en) 2021-12-20

Similar Documents

Publication Publication Date Title
JP6185487B2 (en) Keeping secure data isolated from non-secure access when switching between domains
KR100537813B1 (en) Emulation coprocessor
US6658650B1 (en) Service entry point for use in debugging multi-job computer programs
US8176485B2 (en) Launching hypervisor under running operating system
JP4690988B2 (en) Apparatus, system and method for persistent user level threads
US8464033B2 (en) Setting a flag bit to defer event handling to one of multiple safe points in an instruction stream
EP2812836B1 (en) Exception handling in a data processing apparatus having a secure domain and a less secure domain
US10409745B2 (en) Interruption facility for adjunct processor queues
US9202071B2 (en) Exception handling in a data processing apparatus having a secure domain and a less secure domain
US10031773B2 (en) Method to communicate task context information and device therefor
CN101819539B (en) Interrupt nesting method for transplanting muCOS-II to ARM7
US6385718B1 (en) Computer system and method for executing interrupt instructions in operating modes
KR930002322B1 (en) Signalling attempted transfer to protected entry point bios routine
JP2006164266A (en) Improvement in performance of operating system
US9361114B1 (en) Instruction based interrupt masking for managing interrupts in a computer environment
KR102340871B1 (en) Apparatus and method for processing interrupt
US7293184B2 (en) Programmatic binding for power management events involving execution of instructions in a first programming system with a first interface and a second programming system with a second interface
US20030126520A1 (en) System and method for separating exception vectors in a multiprocessor data processing system
US7451300B1 (en) Explicit control of speculation
US11593159B2 (en) External exception handling
JPS61184643A (en) Starting control system for virtual computer
US20080307208A1 (en) Application specific processor having multiple contexts
JPH05216746A (en) Information processing system

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant