[go: up one dir, main page]

CN102495816A - A fast interrupt hierarchical processing device and method - Google Patents

A fast interrupt hierarchical processing device and method Download PDF

Info

Publication number
CN102495816A
CN102495816A CN2011103628428A CN201110362842A CN102495816A CN 102495816 A CN102495816 A CN 102495816A CN 2011103628428 A CN2011103628428 A CN 2011103628428A CN 201110362842 A CN201110362842 A CN 201110362842A CN 102495816 A CN102495816 A CN 102495816A
Authority
CN
China
Prior art keywords
interrupt
event
cpu
events
source
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN2011103628428A
Other languages
Chinese (zh)
Other versions
CN102495816B (en
Inventor
傅昕
林翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan NEC Fiber Optic Communications Industry Co Ltd
Original Assignee
Wuhan NEC Fiber Optic Communications Industry Co Ltd
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 Wuhan NEC Fiber Optic Communications Industry Co Ltd filed Critical Wuhan NEC Fiber Optic Communications Industry Co Ltd
Priority to CN201110362842.8A priority Critical patent/CN102495816B/en
Publication of CN102495816A publication Critical patent/CN102495816A/en
Application granted granted Critical
Publication of CN102495816B publication Critical patent/CN102495816B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

The invention provides a rapid interrupt grading processing device and a method, comprising: the interrupt event storage device is used for storing interrupt events generated by the interrupt sources; the interrupt generating device is used for converting the interrupt event of the same interrupt source into an interrupt mark of 1 bit; interrupt flag storage means for storing all interrupt flags generated; the interrupt convergence device is used for carrying out hierarchical compression and storage on the interrupt mark and delivering the interrupt mark to the CPU for processing; the interruption convergence device is formed by N stages of cascade connection, each stage of interruption convergence device has the same structure,
Figure DDA0000108961710000011
n is the CPU read-write data bit width, and S is the total number of interrupt sources in the circuit system. By adopting the device and the method, after the CPU receives the interrupt request, only the interrupt mark needs to be searched reversely so as to search the corresponding interrupt event, so that the interrupt source can be positioned quickly, the processing time is shortened, and the CPU occupancy rate is saved.

Description

一种快速中断分级处理装置及方法A fast interrupt hierarchical processing device and method

技术领域 technical field

本发明涉及数据通信技术领域,特别涉及中断处理装置及方法。The invention relates to the technical field of data communication, in particular to an interrupt processing device and method.

背景技术 Background technique

中断是指CPU对系统发生的某个事件所做出的反应,处理器会暂时停止当前正在执行的某项任务,并将该任务暂时保存。转向执行相应的针对该事件的处理程序。处理完之后再返回到之前保存的任务继续处理。Interruption refers to the CPU's response to a certain event that occurs in the system. The processor will temporarily stop a task that is currently being executed and temporarily save the task. Go to execute the corresponding handler for this event. After processing, return to the previously saved task to continue processing.

中断处理一般包含中断请求和中断处理过程,CPU接收中断请求对其进行响应,可能引起中断请求的事件称之为中断源。CPU得到中断请求之后需要查找到相应的中断源才能进行相应对应处理,而系统需要尽快的将中断事件形成中断源通知给CPU进行处理。Interrupt processing generally includes an interrupt request and an interrupt processing process. The CPU receives an interrupt request and responds to it. Events that may cause an interrupt request are called interrupt sources. After the CPU gets the interrupt request, it needs to find the corresponding interrupt source to perform corresponding processing, and the system needs to notify the CPU of the interrupt event as soon as possible to process the interrupt source.

通常,如图1中所示,系统产生若干个中断源,CPU在接收到中断请求后,扫描多个中断源,查看该请求来自于哪一个中断源,然后进行处理。Usually, as shown in Figure 1, the system generates several interrupt sources. After receiving an interrupt request, the CPU scans multiple interrupt sources to check which interrupt source the request comes from, and then processes it.

现在,技术水平的发展带来的是系统设计复杂性越来越高,中断的数目以及原因也越来越多,例如在PTN设备中的OAM处理功能当中,OAM需要支持的条目数为32768条甚至于到达65536条,每一个条目都需要独立的产生各种事件需要上报给CPU进行处理。Now, with the development of technology level, the complexity of system design is getting higher and higher, and the number and reasons of interruption are also increasing. For example, in the OAM processing function of PTN equipment, the number of entries that OAM needs to support is 32768 Even reaching 65536 entries, each entry needs to generate various events independently and need to be reported to the CPU for processing.

这些OAM处理当中的中断,大部分都会涉及到数据业务的连通性,所以,必须要求这些中断都必须被处理,不能丢失,并且,OAM连通性的中断会涉及到业务的保护倒换的操作,对CPU响应的速度都有时间上的要求。Most of the interruptions in these OAM processes will involve the connectivity of data services. Therefore, these interruptions must be processed and cannot be lost. Moreover, the interruption of OAM connectivity will involve the operation of protection switching of services. The speed of CPU response has time requirements.

按照图1中所示的方法,在CPU接收到中断请求后,需要在65536个中断源中寻找到实际产生中断的单元,使得软件的开销变大,CPU占用率增加,并且需要耗费过多的时间。According to the method shown in Figure 1, after the CPU receives the interrupt request, it needs to find the unit that actually generates the interrupt among the 65536 interrupt sources, so that the overhead of the software increases, the CPU usage increases, and it takes too much time.

发明内容 Contents of the invention

本发明要解决的技术问题是:提供一种快速中断分级处理装置及方法,使得CPU能够快速的定位中断源,加快处理时间,节省了CPU占用率。The technical problem to be solved by the present invention is to provide a fast interrupt hierarchical processing device and method, so that the CPU can quickly locate the interrupt source, speed up the processing time, and save the CPU usage rate.

本发明为解决上述技术问题所采取的技术方案为:一种快速中断分级处理装置,其特征在于:它包括:The technical solution adopted by the present invention to solve the above-mentioned technical problems is: a fast interrupt hierarchical processing device, characterized in that it includes:

中断事件存储装置,用于存储中断源产生的中断事件;The interrupt event storage device is used to store the interrupt event generated by the interrupt source;

中断产生装置,用于将同一中断源的中断事件转换为1bit的中断标志;An interrupt generating device is used to convert the interrupt event of the same interrupt source into a 1-bit interrupt flag;

中断标志存储装置,用于存储产生的所有中断标志;以及interrupt flag storage means for storing all interrupt flags generated; and

中断汇聚装置,用于将中断标志进行分级压缩和存储,并交由CPU处理;The interrupt aggregation device is used to compress and store the interrupt flags hierarchically, and hand them over to the CPU for processing;

中断汇聚装置由N级级联而成,每一级中断汇聚装置的结构相同,

Figure BDA0000108961690000021
n为CPU读写数据位宽,S为电路系统中中断源的总数;The interrupt aggregation device is formed by cascading N levels, and the structure of each level of interrupt aggregation device is the same.
Figure BDA0000108961690000021
n is the CPU read and write data bit width, S is the total number of interrupt sources in the circuit system;

其中中断源为来自电路系统中有产生中断事件需求的所有单元的集合,并按照一定特征进行编码;中断事件由中断源产生,由多个比特位组成,其中特定的比特置1代表已经定义的应上报中断事件。The interrupt source is a collection of all units in the circuit system that have the need to generate interrupt events, and is encoded according to certain characteristics; the interrupt event is generated by the interrupt source and consists of multiple bits, where a specific bit is set to 1 to represent a defined Interrupt events should be reported.

按上述方案,它还包括中断事件屏蔽位装置,包含应上报终端事件以外的所有中断事件,用于与中断事件存储装置中的所有中断事件比较,仅将应上报中断事件传递给中断产生装置。According to the above solution, it also includes an interrupt event mask bit device, including all interrupt events other than the terminal event that should be reported, for comparing with all interrupt events in the interrupt event storage device, and only passing the interrupt event that should be reported to the interrupt generating device.

按上述方案,所述的中断产生装置包括:用于对中断事件存储装置进行不间断扫描的中断产生扫描器;和用于控制每扫描n个中断源产生一次n bit的中断标志的移位寄存器。According to the above scheme, the interrupt generating device includes: an interrupt generating scanner for uninterrupted scanning of the interrupt event storage device; and a shift register for controlling n bit interrupt flags generated once per scanning n interrupt sources .

按上述方案,所述的中断标志存储装置的位宽为n,地址深度大于等于S/n。According to the above solution, the bit width of the interrupt flag storage device is n, and the address depth is greater than or equal to S/n.

按上述方案,所述的每一级中断汇聚装置包括:用于对上一级产生的中断标志进行不间断扫描的汇聚扫描器;用于对本级扫描出的中断标志并进行n∶1压缩的中断压缩装置;和用于存储本级经过压缩的中断标志,提供给CPU作为分级查询中断源的依据的中断压缩存储器。According to the above scheme, the interrupt aggregation device of each level includes: a convergence scanner for uninterrupted scanning of the interrupt signs generated by the upper level; an interrupt compression device; and an interrupt compression memory for storing the compressed interrupt flag of the current level and providing it to the CPU as a basis for hierarchically querying interrupt sources.

一种快速中断分级处理方法,其特征在于:它包括以下步骤:A fast interrupt classification processing method is characterized in that: it comprises the following steps:

1)存储所有中断源产生的中断事件;1) Store interrupt events generated by all interrupt sources;

2)将同一中断源的中断事件转换为1bit的中断标志;2) Convert the interrupt event of the same interrupt source into a 1-bit interrupt flag;

3)存储产生的所有中断标志;3) Store all interrupt flags generated;

4)将中断标志进行分级压缩和存储,并交由CPU处理;每一级压缩存储的过程相同,级数n为CPU读写数据位宽,S为电路系统中中断源的总数;4) The interrupt flags are compressed and stored in stages, and handed over to the CPU for processing; the process of compressing and storing at each stage is the same, and the number of stages n is the CPU read and write data bit width, S is the total number of interrupt sources in the circuit system;

其中中断源为来自电路系统中有产生中断事件需求的所有单元的集合,并按照一定特征进行编码;中断事件由中断源产生,由多个比特位组成,其中特定的比特置1代表已经定义的应上报中断事件。The interrupt source is a collection of all units in the circuit system that have the need to generate interrupt events, and is encoded according to certain characteristics; the interrupt event is generated by the interrupt source and consists of multiple bits, where a specific bit is set to 1 to represent a defined Interrupt events should be reported.

它还存储应上报终端事件以外的所有中断事件,用于与存储的所有中断事件比较,将应上报中断事件以外的中断事件屏蔽。It also stores all interrupt events other than the terminal events that should be reported, and is used for comparison with all the stored interrupt events, and masks the interrupt events other than the interrupt events that should be reported.

所述步骤2)对中断事件存储装置进行不间断扫描,每扫描n个中断源产生一次n bit的中断标志。Said step 2) uninterruptedly scans the interrupt event storage device, and generates an n bit interrupt flag every scan of n interrupt sources.

所述的每一级压缩存储的过程包括:对上一级产生的中断标志进行不间断扫描;对本级扫描出的中断标志并进行n∶1压缩;存储本级经过压缩的中断标志,提供给CPU作为分级查询中断源的依据。The process of each stage of compression storage includes: uninterrupted scanning of the interrupt flags generated by the previous stage; n: 1 compression of the interrupt flags scanned by this stage; storage of the compressed interrupt flags of this stage, and providing to The CPU is used as the basis for hierarchically querying interrupt sources.

本发明的有益效果为:The beneficial effects of the present invention are:

1、通过采用本装置和方法,在CPU接收到中断请求后仅需反向查找中断标志进而查找对应的中断事件即可,能够快速的定位中断源,加快处理时间,节省了CPU占用率。1. By adopting the device and method, after the CPU receives the interrupt request, it only needs to reversely search for the interrupt flag and then search for the corresponding interrupt event, which can quickly locate the interrupt source, speed up the processing time, and save the CPU usage.

2、通过增加中断事件屏蔽位装置,能够仅将应上报中断事件产生中断标志,进一步节约了CPU的占用率。2. By adding an interrupt event masking bit device, only interrupt events that should be reported can be generated as interrupt flags, further saving CPU usage.

附图说明 Description of drawings

图1为传统中断处理方式。Figure 1 shows the traditional interrupt processing method.

图2为本发明实施例的总体结构图。Fig. 2 is an overall structural diagram of an embodiment of the present invention.

图3为中断事件存储装置的存储方式。Fig. 3 is a storage method of the interrupt event storage device.

图4为中断产生装置结构图。Figure 4 is a structural diagram of the interrupt generator.

图5为加入中断事件屏蔽位的结构图。Figure 5 is a structural diagram of adding interrupt event mask bits.

图6为中断标志存储示意图。FIG. 6 is a schematic diagram of interrupt flag storage.

图7为中断汇聚装置结构图。FIG. 7 is a structural diagram of an interrupt aggregation device.

图8为CPU查询中断事件流程。Figure 8 shows the CPU query interrupt event flow.

具体实施方式 Detailed ways

下面根据附图和具体实施例对本发明进行进一步阐述。The present invention will be further elaborated below according to the drawings and specific embodiments.

图2为本发明实施例的总体结构图,它包括:中断事件存储装置,用于存储中断源产生的中断事件;中断产生装置,用于将同一中断源的中断事件转换为1bit的中断标志;中断标志存储装置,用于存储产生的所有中断标志;以及中断汇聚装置,用于将中断标志进行分级压缩和存储,并交由CPU处理。Fig. 2 is the overall structural diagram of the embodiment of the present invention, and it comprises: interrupt event storage device, is used for storing the interrupt event that interrupt source produces; Interrupt generating device, is used for the interrupt event conversion of same interrupt source to the interrupt sign of 1bit; The interrupt flag storage device is used for storing all generated interrupt flags; and the interrupt aggregation device is used for compressing and storing the interrupt flags hierarchically and handing them over to the CPU for processing.

中断汇聚装置由N级级联而成,每一级中断汇聚装置的结构相同,考虑到CPU读写数据的位宽,所有的中断通过一定级数的中断汇聚装置,最终会汇聚成一个匹配CPU读写数据位宽的最终压缩数据,并将该数据按位与得到最终的中断信息,因此n为CPU读写数据位宽,S为电路系统中中断源的总数。以本实施例中CPU数据位宽16bit为例,总中断源为S,中断汇聚的级数N可以通过以下公式得到:

Figure BDA0000108961690000041
The interrupt aggregation device is composed of N levels of cascading, and the structure of each level of interrupt aggregation device is the same. Considering the bit width of CPU read and write data, all interrupts will eventually converge into a matching CPU through a certain number of interrupt aggregation devices. Read and write the final compressed data with data bit width, and get the final interrupt information by bitwise ANDing the data, so n is the CPU read and write data bit width, and S is the total number of interrupt sources in the circuit system. Taking the CPU data bit width of 16 bits in this embodiment as an example, the total interrupt source is S, and the number of interrupt aggregation stages N can be obtained by the following formula:
Figure BDA0000108961690000041

本实施例中n为16,总中断源为64K,中断汇聚装置为3级级联。In this embodiment, n is 16, the total interrupt sources are 64K, and the interrupt convergence device is cascaded in three levels.

其中中断源为来自电路系统中有产生中断事件需求的所有单元的集合,并按照一定特征进行编码;中断事件由中断源产生,由多个比特位组成,其中特定的比特置1代表已经定义的应上报中断事件。The interrupt source is a collection of all units in the circuit system that have the need to generate interrupt events, and is encoded according to certain characteristics; the interrupt event is generated by the interrupt source and consists of multiple bits, where a specific bit is set to 1 to represent a defined Interrupt events should be reported.

图3为中断事件存储装置的存储方式,行数为中断源的总数,每一行存储同一个中断源产生的所有中断事件。FIG. 3 shows the storage method of the interrupt event storage device. The number of rows is the total number of interrupt sources, and each row stores all interrupt events generated by the same interrupt source.

图4为中断产生装置结构图,包括用于对中断事件存储装置进行不间断扫描的中断产生扫描器,和用于控制每扫描16个中断源产生一次16bit的中断标志的移位寄存器。如图5所示,还可以添加中断事件屏蔽位装置,包含应上报终端事件以外的所有中断事件,用于与中断事件存储装置中的所有中断事件比较,仅将应上报中断事件传递给中断产生装置,用以控制各种中断事件是否需要上报给CPU进行处理。Fig. 4 is a structural diagram of the interrupt generating device, including an interrupt generating scanner for uninterrupted scanning of the interrupt event storage device, and a shift register for controlling each scan of 16 interrupt sources to generate a 16-bit interrupt flag. As shown in Figure 5, an interrupt event mask bit device can also be added, including all interrupt events other than the terminal event that should be reported, for comparison with all interrupt events in the interrupt event storage device, and only the interrupt event that should be reported is passed to the interrupt generator The device is used to control whether various interrupt events need to be reported to the CPU for processing.

中断标志存储装置用于存储各个中断源的中断标志,该RAM的位宽为16bit,地址深度为S/16,存储顺序如图6所示,RAM中任意地址的任意1bit,由RAM(addr,d[n])表示,代表中断源addr×16+n中产生了中断事件。The interrupt flag storage device is used to store the interrupt flags of each interrupt source. The bit width of this RAM is 16bit, and the address depth is S/16. The storage sequence is as shown in Figure 6. Any 1bit of any address in the RAM is determined by RAM (addr, d[n]) indicates that an interrupt event has occurred in the interrupt source addr×16+n.

中断汇聚装置作用是提取所有中断标志并按照16∶1的压缩比进行压缩存储,如图7所示,整个系统中含有多个汇聚装置,下面,以第一级中断汇聚装置为例进行介绍,包含中断扫描装置、中断压缩装置、中断压缩存储装置。The function of the interrupt converging device is to extract all interrupt flags and compress and store them according to the compression ratio of 16:1. As shown in Figure 7, there are multiple converging devices in the whole system. The following will introduce the first-level interrupt converging device as an example. It includes an interrupt scanning device, an interrupt compressing device, and an interrupt compressing storage device.

中断扫描装置是由计数器驱动,对中断标志进行不间断扫描,考虑到CPU获取中断的操作,本系统采用2个时钟周期扫描一个地址的设计。地址空间为S/16,其中S为电路系统中中断源的总数,第一级中断汇聚模块的扫描周期为(S/16)×2fclk其中fclk为时钟频率。第N级中断汇聚模块的扫描周期为(S/16N)×2fclk,以本次设计3级中断汇聚模块来计算,各级中断扫描的总时间为 Σ N = 0 3 ( S / 16 N ) × 2 f clk . The interrupt scanning device is driven by a counter to continuously scan the interrupt flag. Considering the operation of the CPU to obtain the interrupt, this system adopts the design of scanning an address in 2 clock cycles. The address space is S/16, where S is the total number of interrupt sources in the circuit system, and the scanning period of the first-level interrupt convergence module is (S/16)×2f clk , where f clk is the clock frequency. The scan cycle of the Nth-level interrupt aggregation module is (S/16 N )×2f clk , calculated based on the design of the third-level interrupt aggregation module in this design, the total time of interrupt scanning at all levels is Σ N = 0 3 ( S / 16 N ) × 2 f clk .

中断压缩装置由一个移位寄存器构成,不间断接收扫描出的中断标志,由于上一级的中断标志存储中,一个地址为16bit,将其通过逻辑与操作压缩为1个1bit的中断信息,并且送入移位寄存器当中,每扫描16个地址,即形成一个16bit的压缩数据。The interrupt compression device is composed of a shift register, which continuously receives the scanned interrupt flags. Since an address is 16 bits in the interrupt flag storage of the upper level, it is compressed into a 1-bit interrupt information through logical AND operation, and It is sent to the shift register, and every time 16 addresses are scanned, a 16-bit compressed data is formed.

中断压缩存储装置存储经过压缩的中断标志,提供给CPU作为分级查询中断源的依据,每一级中断压缩存储的数据位宽都为16bit,地址深度为S/16N+1,对于该存储装置中任意比特RAM(addr,d[n])值为1,代表所对应的中断源中区间[(addr×16+n)×16N,(addr×16+n+1)×16N]区间之中间含有中断标志,其中,N为当前中断汇聚装置的级数,以本实施例为例,第一级,第二级,第三级中断压缩存储的地址深度分别为256、16、1。The interrupt compression storage device stores the compressed interrupt flags and provides them to the CPU as a basis for hierarchically querying interrupt sources. The data bit width of each level of interrupt compression storage is 16bit, and the address depth is S/16 N+1 . For this storage device The value of any bit in RAM (addr, d[n]) is 1, representing the interval [(addr×16+n)×16 N , (addr×16+n+1)×16 N ] of the corresponding interrupt source There is an interrupt flag in the middle, where N is the number of stages of the current interrupt aggregation device. Taking this embodiment as an example, the address depths of the first stage, second stage, and third stage interrupt compression storage are 256, 16, and 1 respectively.

以这种方式级联的中断汇聚系统,CPU在查询时,从最靠近CPU一侧的中断压缩存储开始查起,每一级中断压缩存储都可以作为CPU查找上一级中断压缩存储的依据。最终可以通过N+1级查询即可得到最终的中断源。从而获得中断事件。本实施例中,CPU可以通过4次查询即可定位中断源。In the interrupt aggregation system cascaded in this way, when the CPU queries, it starts from the interrupt compression storage closest to the CPU side, and each level of interrupt compression storage can be used as the basis for the CPU to search for the upper level of interrupt compression storage. Finally, the final interrupt source can be obtained through N+1 level query. to get the interrupt event. In this embodiment, the CPU can locate the interrupt source through four queries.

下面,将对CPU的操作模式进行说明,如图8以帮助理解该设计对提高CPU处理速度带来的优势。以三级中断汇聚为例。Next, the operating mode of the CPU will be described, as shown in Figure 8, to help understand the advantages of this design for improving the processing speed of the CPU. Take the three-level interrupt aggregation as an example.

CPU在获得中断请求之后,首先查看中断压缩存储3,第a比特位为1,即可获得中断压缩存储2的地址为a;After the CPU obtains the interrupt request, it first checks the interrupt compressed storage 3, and the a-th bit is 1, and then the address of the interrupt compressed storage 2 is a;

进一步,查看中断压缩存储2中的地址b,发现地址a中第x比特位为1,则根据公式得到中断压缩存储1的地址b=a×16+x;Further, look at the address b in the interrupt compressed storage 2, and find that the xth bit in the address a is 1, then get the address b=a×16+x of the interrupt compressed storage 1 according to the formula;

进一步,查看中断压缩存储1中的地址b,发现地址b中第y比特位为1,即可得到中断标志存储的地址c=b×16+y;Further, check the address b in the interrupt compression storage 1, and find that the yth bit in the address b is 1, and then the address c=b×16+y of the interrupt flag storage can be obtained;

进一步,查看中断标志存储中的地址c,发现地址c中第z比特位为1,即可得到中断源的编号为s=c×16+z。Further, check the address c in the storage of the interrupt flag, and find that the zth bit in the address c is 1, and then the number of the interrupt source can be obtained as s=c×16+z.

通过上述分析可知,不论65536个中断源中的某一个产生了中断事件,CPU都可以通过4步查找确切的定位出实际的中断源,从而提高了CPU的处理效率。Through the above analysis, it can be seen that no matter which one of the 65536 interrupt sources generates an interrupt event, the CPU can find the exact location of the actual interrupt source through 4 steps, thereby improving the processing efficiency of the CPU.

Claims (9)

1.一种快速中断分级处理装置,其特征在于:它包括: 1. A fast interrupt hierarchical processing device, characterized in that: it comprises: 中断事件存储装置,用于存储中断源产生的中断事件; The interrupt event storage device is used to store the interrupt event generated by the interrupt source; 中断产生装置,用于将同一中断源的中断事件转换为1bit的中断标志; An interrupt generating device is used to convert the interrupt event of the same interrupt source into a 1-bit interrupt flag; 中断标志存储装置,用于存储产生的所有中断标志;以及 interrupt flag storage means for storing all interrupt flags generated; and 中断汇聚装置,用于将中断标志进行分级压缩和存储,并交由CPU处理; The interrupt aggregation device is used to compress and store the interrupt flags hierarchically, and hand them over to the CPU for processing; 中断汇聚装置由N级级联而成,每一级中断汇聚装置的结构相同,                                               
Figure 2011103628428100001DEST_PATH_IMAGE002
,n为CPU读写数据位宽,S为电路系统中中断源的总数;
The interrupt aggregation device is formed by cascading N levels, and the structure of each level of interrupt aggregation device is the same.
Figure 2011103628428100001DEST_PATH_IMAGE002
, n is the CPU read and write data bit width, S is the total number of interrupt sources in the circuit system;
其中中断源为来自电路系统中有产生中断事件需求的所有单元的集合,并按照一定特征进行编码;中断事件由中断源产生,由多个比特位组成,其中特定的比特置1代表已经定义的应上报中断事件。 The interrupt source is a collection of all units in the circuit system that have the need to generate interrupt events, and is encoded according to certain characteristics; the interrupt event is generated by the interrupt source and consists of multiple bits, where a specific bit is set to 1 to represent a defined Interrupt events should be reported.
2.根据权利要求1所述的快速中断分级处理装置,其特征在于:它还包括中断事件屏蔽位装置,包含应上报终端事件以外的所有中断事件,用于与中断事件存储装置中的所有中断事件比较,仅将应上报中断事件传递给中断产生装置。 2. The fast interrupt hierarchical processing device according to claim 1, characterized in that: it also includes an interrupt event mask bit device, including all interrupt events that should be reported outside the terminal event, for use with all interrupt events in the interrupt event storage device Event comparison, only the interrupt event that should be reported is delivered to the interrupt generating device. 3.根据权利要求1或2所述的快速中断分级处理装置,其特征在于:所述的中断产生装置包括:用于对中断事件存储装置进行不间断扫描的中断产生扫描器;和用于控制每扫描n个中断源产生一次n bit的中断标志的移位寄存器。 3. The fast interrupt hierarchical processing device according to claim 1 or 2, characterized in that: said interrupt generating device comprises: an interrupt generation scanner for uninterrupted scanning of the interrupt event storage device; and for controlling A shift register that generates an n-bit interrupt flag every scan of n interrupt sources. 4.根据权利要求3所述的快速中断分级处理装置,其特征在于:所述的中断标志存储装置的位宽为n,地址深度大于等于
Figure 2011103628428100001DEST_PATH_IMAGE004
4. The fast interrupt hierarchical processing device according to claim 3, characterized in that: the bit width of the interrupt flag storage device is n, and the address depth is greater than or equal to
Figure 2011103628428100001DEST_PATH_IMAGE004
.
5.根据权利要求3所述的快速中断分级处理装置,其特征在于:所述的每一级中断汇聚装置包括:用于对上一级产生的中断标志进行不间断扫描的汇聚扫描器;用于对本级扫描出的中断标志并进行n:1压缩的中断压缩装置;和用于存储本级经过压缩的中断标志,提供给CPU作为分级查询中断源的依据的中断压缩存储器。 5. The fast interrupt hierarchical processing device according to claim 3, characterized in that: said each level of interrupt convergence device comprises: a convergence scanner for uninterrupted scanning of the interrupt flags produced by the upper level; An interrupt compression device for compressing the interrupt flags scanned by the current stage by n:1; and an interrupt compression memory for storing the compressed interrupt flags of the current stage and providing them to the CPU as a basis for hierarchically querying interrupt sources. 6.一种快速中断分级处理方法,其特征在于:它包括以下步骤: 6. A fast interrupt hierarchical processing method, characterized in that: it comprises the following steps: 1)存储所有中断源产生的中断事件; 1) Store interrupt events generated by all interrupt sources; 2)将同一中断源的中断事件转换为1bit的中断标志; 2) Convert the interrupt event of the same interrupt source into a 1-bit interrupt flag; 3)存储产生的所有中断标志; 3) Store all interrupt flags generated; 4)将中断标志进行分级压缩和存储,并交由CPU处理;每一级压缩存储的过程相同,级数
Figure 453350DEST_PATH_IMAGE002
,n为CPU读写数据位宽,S为电路系统中中断源的总数;
4) The interrupt flags are compressed and stored in stages, and handed over to the CPU for processing; the process of compressing and storing each level is the same, and the number of stages
Figure 453350DEST_PATH_IMAGE002
, n is the CPU read and write data bit width, S is the total number of interrupt sources in the circuit system;
其中中断源为来自电路系统中有产生中断事件需求的所有单元的集合,并按照一定特征进行编码;中断事件由中断源产生,由多个比特位组成,其中特定的比特置1代表已经定义的应上报中断事件。 The interrupt source is a collection of all units in the circuit system that have the need to generate interrupt events, and is encoded according to certain characteristics; the interrupt event is generated by the interrupt source and consists of multiple bits, where a specific bit is set to 1 to represent a defined Interrupt events should be reported.
7.根据权利要求6所述的快速中断分级处理方法,其特征在于:它还存储应上报终端事件以外的所有中断事件,用于与存储的所有中断事件比较,将应上报中断事件以外的中断事件屏蔽。 7. The fast interrupt hierarchical processing method according to claim 6, characterized in that: it also stores all interrupt events other than the terminal event that should be reported, and is used to compare all interrupt events stored, and compare the interrupt events other than the interrupt event that should be reported Event masking. 8.根据权利要求6或7所述的快速中断分级处理方法,其特征在于:所述步骤2)对中断事件存储装置进行不间断扫描,每扫描n个中断源产生一次n bit的中断标志。 8. The fast interrupt hierarchical processing method according to claim 6 or 7, characterized in that: said step 2) performs uninterrupted scanning on the interrupt event storage device, and generates an n-bit interrupt flag every time n interrupt sources are scanned. 9.根据权利要求8所述的快速中断分级处理方法,其特征在于:所述的每一级压缩存储的过程包括:对上一级产生的中断标志进行不间断扫描;对本级扫描出的中断标志并进行n:1压缩;存储本级经过压缩的中断标志,提供给CPU作为分级查询中断源的依据。 9. The fast interrupt hierarchical processing method according to claim 8, characterized in that: the process of compressing and storing each stage includes: uninterrupted scanning of the interrupt flags generated by the previous stage; flag and perform n:1 compression; store the compressed interrupt flag of the current level, and provide it to the CPU as a basis for hierarchically querying the interrupt source.
CN201110362842.8A 2011-11-16 2011-11-16 A fast interrupt hierarchical processing device and method Expired - Fee Related CN102495816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110362842.8A CN102495816B (en) 2011-11-16 2011-11-16 A fast interrupt hierarchical processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110362842.8A CN102495816B (en) 2011-11-16 2011-11-16 A fast interrupt hierarchical processing device and method

Publications (2)

Publication Number Publication Date
CN102495816A true CN102495816A (en) 2012-06-13
CN102495816B CN102495816B (en) 2014-12-24

Family

ID=46187641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110362842.8A Expired - Fee Related CN102495816B (en) 2011-11-16 2011-11-16 A fast interrupt hierarchical processing device and method

Country Status (1)

Country Link
CN (1) CN102495816B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120284443A1 (en) * 2010-03-18 2012-11-08 Panasonic Corporation Virtual multi-processor system
CN104111870A (en) * 2014-07-08 2014-10-22 福建星网锐捷网络有限公司 Interrupt processing device and method
CN110083447A (en) * 2019-04-26 2019-08-02 宁波三星医疗电气股份有限公司 A kind of interruption processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3905025A (en) * 1971-10-27 1975-09-09 Ibm Data acquisition and control system including dynamic interrupt capability
CN1786933A (en) * 2005-12-02 2006-06-14 北京中星微电子有限公司 Apparatus and method of multi-grade interrupt applicant
CN101634939A (en) * 2008-07-24 2010-01-27 中兴通讯股份有限公司 Fast addressing device and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3905025A (en) * 1971-10-27 1975-09-09 Ibm Data acquisition and control system including dynamic interrupt capability
CN1786933A (en) * 2005-12-02 2006-06-14 北京中星微电子有限公司 Apparatus and method of multi-grade interrupt applicant
CN101634939A (en) * 2008-07-24 2010-01-27 中兴通讯股份有限公司 Fast addressing device and method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120284443A1 (en) * 2010-03-18 2012-11-08 Panasonic Corporation Virtual multi-processor system
US8725921B2 (en) * 2010-03-18 2014-05-13 Panasonic Corporation Virtual multi-processor system
CN104111870A (en) * 2014-07-08 2014-10-22 福建星网锐捷网络有限公司 Interrupt processing device and method
CN104111870B (en) * 2014-07-08 2017-05-24 福建星网锐捷网络有限公司 Interrupt processing device and method
CN110083447A (en) * 2019-04-26 2019-08-02 宁波三星医疗电气股份有限公司 A kind of interruption processing method and system

Also Published As

Publication number Publication date
CN102495816B (en) 2014-12-24

Similar Documents

Publication Publication Date Title
US10445323B2 (en) Association rule mining with the micron automata processor
Gotlieb et al. Algorithms for finding a fundamental set of cycles for an undirected linear graph
CN107451175A (en) A kind of data processing method and equipment based on block chain
CN102916687A (en) Ternary clock generator based on CMOS (complementary metal oxide semiconductor) technology
US20230161811A1 (en) Image search system, method, and apparatus
CN103218029A (en) Ultra-low power consumption processor pipeline structure
US10490242B2 (en) Apparatus and method of clock shaping for memory
TWI709049B (en) Random walk, cluster-based random walk method, device and equipment
Hong et al. Bus-invert coding for low-power I/O-a decomposition approach
CN102495816A (en) A fast interrupt hierarchical processing device and method
CN108806742A (en) Random access memory and having circuitry, methods and systems related thereto
US7352212B2 (en) Opposite-phase scheme for peak current reduction
US10164773B2 (en) Energy-efficient dual-rail keeperless domino datapath circuits
Zamani et al. ILP formulations for variation/defect-tolerant logic mapping on crossbar nano-architectures
CN1937493A (en) RSA ciphering method for realizing quick big prime generation
Stillmaker et al. Fine-grained energy-efficient sorting on a many-core processor array
CN105005464A (en) Burrows Wheeler Transform hardware processing apparatus
Sarangi et al. Canonical huffman decoder on fine-grain many-core processor arrays
JPH09321145A (en) Layout of semiconductor integrated circuit
CN118364519A (en) Algorithm engine, security chip, electronic device and encryption method
Wang et al. Power optimization for FPRM logic using approximate computing technique
CN101714073A (en) Random number generation method, random number selection method and related electronic device
CN112580278A (en) Optimization method and optimization device for logic circuit and storage medium
He et al. An fp-tree based approach for mining all strongly correlated item pairs
US20070222645A1 (en) Method and system for generating electronic keys

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141224

Termination date: 20201116

CF01 Termination of patent right due to non-payment of annual fee