# US 11,113,098 B2 · Interrupt processing method, master chip, slave chip, and multi-chip system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,113,098 B2
- Document ID: US11113098B2
- Status: Granted
- Kind: B2
- Application number: 16/697,111
- Filed: 2019-11-26
- Published: 2020-03-26
- Granted: 2021-09-07
- Earliest claimed: 2018-08-23
- Assignees: Shenzhen Goodix Technology Co., Ltd.
- Applicants: Shenzhen Goodix Technology Co., Ltd.
- Inventors: Zhibing Liang; Yifan Li; Zekai Chen
- Web page: https://patentgrep.com/patent/US11113098B2

## CPC

- G06F 9/4812: {by interrupt, e.g. masked}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/30101: {Special purpose registers}
- G06F 9/3865: {using deferred exception handling, e.g. exception flags}
- G06F 13/26: with priority control
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

The present disclosure relates to the field of a multi-chip system, and provides an interrupt processing method, a master chip, a slave chip, and a multi-chip system. An interrupt processing method is applied to a master chip and includes: when an interrupt transport request sent by a slave chip through an interrupt line is detected, obtaining all current interrupt requests (irq_s_1-irq_s_N) of the slave chip, the interrupt request (irq_s_1_-irq_s_N) is generated by a first peripheral (4) of the slave chip; obtaining an interrupt subroutine corresponding to each of the interrupt requests (irq_s_1-irq_s_N), and processing the corresponding interrupt request (irq_s_1-irq_s_N) by using the interrupt subroutine. In the embodiments of the present disclosure, all the interrupt requests (irq_s_1-irq_s_N) of the slave chip are mapped to the master chip, so that the interrupt processing flow of the peripheral on the slave chip is simplified.

## Claims

### Claim 1

An interrupt processing method applied to a master chip, comprising:
obtaining all current interrupt requests of a slave chip when an interrupt transport request sent by the slave chip through an interrupt line is detected, wherein the interrupt transport request is generated by a first peripheral of the slave chip, wherein the interrupt transport request is a level signal; and
obtaining an interrupt subroutine corresponding to each interrupt request of all the current interrupt requests, and processing the corresponding interrupt request by using the interrupt subroutine, wherein all current interrupt requests of the slave chip are mapped to the master chip in advance, and each interrupt request mapped to the master chip has a corresponding interrupt subroutine on the master chip.

### Claim 2 (depends on 1)

The interrupt processing method according to claim 1, wherein the obtaining all current interrupt requests of a slave chip comprises:
reading a current value of a first interrupt register of the slave chip, and writing the current value to a second interrupt register of the master chip, to obtain all current interrupt requests of the slave chip, wherein the first interrupt register stores all the current interrupt requests of the slave chip.

### Claim 3 (depends on 1)

The interrupt processing method according to claim 1, wherein the obtaining all current interrupt requests of a slave chip comprises:
obtaining all the current interrupt requests of the slave chip through a transport subroutine corresponding to the slave chip.

### Claim 4 (depends on 2)

The interrupt processing method according to claim 2, wherein after the corresponding interrupt request is processed by using the interrupt subroutine, or after any of the interrupt requests is processed, the method further comprises:
clearing an interrupt flag of the first peripheral corresponding to the processed interrupt request, the current value of the first interrupt register is synchronously adjusted with the clearing of the interrupt flag of the first peripheral.

### Claim 5 (depends on 4)

The interrupt processing method according to claim 4, wherein after clearing an interrupt flag of the first peripheral corresponding to the processed interrupt request, the method further comprises:
clearing an interrupt request corresponding to an interrupt flag in the second interrupt register.

### Claim 6 (depends on 4)

The interrupt processing method according to claim 4, wherein after clearing interrupt flags of the first peripheral corresponding to all the current interrupt requests of the slave chip, the method further comprises:
clearing the interrupt transport request.

### Claim 7 (depends on 5)

The interrupt processing method according to claim 5, wherein after clearing an interrupt request corresponding to the interrupt flag in the second interrupt register, the method further comprises:
clearing the interrupt transport request.

### Claim 8 (depends on 1)

The interrupt processing method according to claim 1, wherein the processing the corresponding interrupt request by using the interrupt subroutine comprises:
performing sorting in order of priority on the interrupt transport request of the slave chip, an interrupt request generated by a second peripheral of the master chip, and the interrupt transport request; and
processing, by using the corresponding interrupt subroutine in descending order of priority, the interrupt request of the slave chip, the interrupt request generated by the second peripheral of the master chip, and the interrupt transport request, wherein a priority level of the interrupt transport request is lower than that of the interrupt request of the slave chip.

### Claim 9

A master chip, comprising an interrupt controller, a Micro Controller Unit (MCU), and an interrupt detection module, wherein the interrupt controller is respectively connected to the MCU and the interrupt detection module and wherein:
the interrupt detection module is configured to send, when detecting that there is an interrupt transport request sent by a slave chip on an interrupt line, the interrupt transport request to the interrupt controller, wherein the interrupt transport request is a level signal;
the interrupt controller is configured to send an interrupt request acquisition notification to the MCU when receiving the interrupt transport request; and
the MCU is configured to obtain all current interrupt requests of the slave chip when receiving the interrupt request acquisition notification, obtain an interrupt subroutine corresponding to each interrupt request of all the current interrupt requests, and process the corresponding interrupt request by using the interrupt subroutine, and the interrupt transport request is generated by a first peripheral of the slave chip, wherein all current interrupt requests of the slave chip are mapped to the master chip in advance, and each interrupt request mapped to the master chip has a corresponding interrupt subroutine on the master chip.

### Claim 10 (depends on 9)

The master chip according to claim 9, wherein the master chip further comprises a second interrupt register;
the MCU is connected to the second interrupt register; and
the MCU is configured to read a current value of a first interrupt register of the slave chip, and write the current value to the second interrupt register of the master chip, to obtain all the current interrupt requests of the slave chip wherein the first interrupt register stores all the current interrupt requests of the slave chip.

### Claim 11 (depends on 9)

The master chip according to claim 9, wherein the MCU is configured to obtain all the current interrupt requests of the slave chip by using a transport subroutine corresponding to the slave chip.

### Claim 12 (depends on 10)

The master chip according to claim 10, wherein the MCU is further configured to clear an interrupt flag that is of the first peripheral and that corresponds to the processed interrupt request, and the current value of the first interrupt register is synchronously adjusted with the clearing of the interrupt flag of the first peripheral.

### Claim 13 (depends on 12)

The master chip according to claim 12, wherein the master chip further comprises a hardware clearing module, and the hardware clearing module is connected to the second interrupt register; and
the hardware clearing module is configured to clear, when detecting that the MCU clears an interrupt flag that is of the first peripheral and that corresponds to the processed interrupt request, the interrupt transport request corresponding to an interrupt flag in the second interrupt register.

### Claim 14 (depends on 13)

The master chip according to claim 13, wherein the MCU is further configured to eliminate the interrupt transport request after clearing interrupt flags that are of the first peripheral and that correspond to all the current interrupt requests of the slave chip.

### Claim 15 (depends on 13)

The master chip according to claim 13, wherein the MCU is further configured to eliminate the interrupt transport request after the hardware clearing module clears the interrupt transport request corresponding to the interrupt flag in the second interrupt register.

### Claim 16 (depends on 9)

The master chip according to claim 9, wherein the master chip further comprises at least one second peripheral for generating an interrupt request; the second peripheral is connected to the interrupt controller;
the interrupt controller is further configured to receive an interrupt request sent by the second peripheral, and perform sorting in order of priority on the interrupt request sent by the second peripheral, the interrupt transport request, and the interrupt request of the slave chip generated by the first peripheral; and
the MCU is specifically configured to process, by using the corresponding interrupt subroutine in descending order of the priority, the interrupt request of the slave chip, the interrupt request generated by the second peripheral of the master chip, and the interrupt transport request, wherein a priority level of the interrupt transport request is lower than that of the interrupt request of the slave chip.

### Claim 17

A multi-chip system, comprising:
at least one slave chip, each comprising a first communication interface; and
a master chip, comprising a second communication interface connected to the first communication interface through an interrupt line, and the master chip comprises an interrupt controller, a MCU, and an interrupt detection module, wherein:
the interrupt controller is respectively connected to the MCU and the interrupt detection module;
the interrupt detection module is configured to send, when detecting that there is an interrupt transport request sent by the slave chip on the interrupt line, the interrupt transport request to the interrupt controller, wherein the interrupt transport request is a level signal;
the interrupt controller is configured to send an interrupt request acquisition notification to the MCU when receiving the interrupt transport request; and
the MCU is configured to obtain all current interrupt requests of the slave chip when receiving the interrupt request acquisition notification, obtain an interrupt subroutine corresponding to each interrupt request of all the current interrupt requests, and process the corresponding interrupt request by using the interrupt subroutine, and the interrupt transport request is generated by a first peripheral of the slave chip, wherein all current interrupt requests of the slave chip are mapped to the master chip in advance, and each interrupt request mapped to the master chip has a corresponding interrupt subroutine on the master chip.

### Claim 18 (depends on 17)

The multi-chip system according to claim 17, wherein the master chip further comprises a second interrupt register;
the MCU is connected to the second interrupt register; and
the MCU is configured to read a current value of a first interrupt register of the slave chip, and write the current value to the second interrupt register of the master chip, to obtain all the current interrupt requests of the slave chip wherein the first interrupt register stores all the current interrupt requests of the slave chip.

### Claim 19 (depends on 18)

The multi-chip system according to claim 18, wherein the MCU is configured to obtain all the current interrupt requests of the slave chip by using a transport subroutine corresponding to the slave chip.

### Claim 20 (depends on 18)

The multi-chip system according to claim 18, wherein the MCU is further configured to clear an interrupt flag that is of the first peripheral and that corresponds to the processed interrupt request, and the current value of the first interrupt register is synchronously adjusted with the clearing of the interrupt flag of the first peripheral.
