Nothing Special   »   [go: up one dir, main page]

TWI816498B - Bus direct interrupt service device - Google Patents

Bus direct interrupt service device Download PDF

Info

Publication number
TWI816498B
TWI816498B TW111129075A TW111129075A TWI816498B TW I816498 B TWI816498 B TW I816498B TW 111129075 A TW111129075 A TW 111129075A TW 111129075 A TW111129075 A TW 111129075A TW I816498 B TWI816498 B TW I816498B
Authority
TW
Taiwan
Prior art keywords
interrupt
bus
instruction
processor
service device
Prior art date
Application number
TW111129075A
Other languages
Chinese (zh)
Other versions
TW202407551A (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 TW111129075A priority Critical patent/TWI816498B/en
Priority to CN202211257505.7A priority patent/CN117555833A/en
Application granted granted Critical
Publication of TWI816498B publication Critical patent/TWI816498B/en
Publication of TW202407551A publication Critical patent/TW202407551A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • G06F13/26Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bus Control (AREA)
  • Traffic Control Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

A bus direct interrupt service device is disclosed. The bus direct interrupt service device is coupled to a bus interface unit of the processor. The bus direct interrupt service device includes an interrupt command register bank and an interrupt request multiplexer. The interrupt command register bank stores a plurality of interrupt commands and bus addresses and operate commands corresponded to the plurality of interrupt commands. When the receiving end receives the interrupt request, the interrupt command register bank selects an interrupt control command corresponded to the interrupt request from the plurality of interrupt commands. The interrupt request multiplexer is coupled to the bus interface unit and the interrupt command register bank. When the interrupt request multiplexer receives the interrupt control command, the corresponding operate command of the interrupt control command is directly sent to the corresponding bus address through an output interface, so as to operate the peripheral device.

Description

匯流排直接中斷服務裝置 bus direct interrupt service device

本發明是關於一種匯流排直接中斷服務裝置,特別是關於一種通過中斷指令寄存庫及中斷請求多工器,能直接且迅速的執行中斷請求操作的匯流排直接中斷服務裝置。 The present invention relates to a bus direct interrupt service device, and in particular to a bus direct interrupt service device that can directly and quickly execute interrupt request operations through an interrupt instruction register and an interrupt request multiplexer.

當電腦系統的周邊硬體裝置需要執行特定事件或操作時,會對處理器發出中斷請求(Interrupt request,IRQ)的訊號,讓處理器知道是那些裝置或軟體需要動作,並送出對應的操作指令來控制周邊裝置執行對應操作。這些中斷請求訊號進入處理器後,經過相關指令的排程及轉換,形成可執行的控制指令,傳送至連接的周邊介面,對周邊裝置進行相關操作。 When peripheral hardware devices of the computer system need to perform specific events or operations, an interrupt request (IRQ) signal will be sent to the processor to let the processor know which devices or software need to act and send corresponding operation instructions. to control peripheral devices to perform corresponding operations. After these interrupt request signals enter the processor, they are scheduled and converted by relevant instructions to form executable control instructions, which are sent to the connected peripheral interface to perform related operations on the peripheral devices.

現有的處理器具有中斷服務處理程式(Interrupt Service Routine,ISR)來處理這些中斷請求,將中斷請求轉換成所需的操作指令。然而,通過中斷服務處理程式的操作需要經過一定周期的轉換時間,對於需要即時啟動或者有操作時效性的中斷請求,這些轉換的延遲時間會造成操作的誤差或是影響操作的結果,難以達到中斷請求所需的操作效果。 Existing processors have an interrupt service handler (Interrupt Service Routine, ISR) to handle these interrupt requests and convert the interrupt requests into required operation instructions. However, the operation through the interrupt service handler requires a certain period of conversion time. For interrupt requests that require immediate startup or operation timeliness, the delay time of these conversions will cause operation errors or affect the results of the operation, making it difficult to achieve interrupts. Request the desired action effect.

綜觀前所述,本發明之發明者思索並設計一種匯流排直接中斷服務裝置,以期針對習知技術之問題加以改善,進而增進產業上之實施利用。 In summary, the inventor of the present invention thought about and designed a bus direct interrupt service device in order to improve the problems of the conventional technology and thereby enhance industrial implementation and utilization.

有鑑於先前技術所述之問題,本發明的目的在於提供一種匯流排直接中斷服務裝置,降低執行操作所需時間,減少時間延遲造成裝置操作誤差或錯誤的問題。 In view of the problems described in the prior art, the object of the present invention is to provide a bus direct interrupt service device that reduces the time required to perform operations and reduces the problem of device operation errors or errors caused by time delays.

基於上述目的,本發明提供一種匯流排直接中斷服務裝置,是耦接於處理器的匯流排介面單元,處理器具有接收中斷請求的接收端,匯流排直接中斷服務裝置包含中斷指令寄存庫以及中斷請求多工器。其中,中斷指令寄存庫耦接於接收端,中斷指令寄存庫儲存複數個中斷指令及對應各複數個中斷指令的匯流排位置與操作指令,當接收端接收中斷請求時,中斷指令寄存庫由複數個中斷指令當中選擇對應中斷請求的中斷控制指令。中斷請求多工器耦接於匯流排介面單元及中斷指令寄存庫,當中斷請求多工器接收中斷控制指令,直接由輸出介面傳送中斷控制指令對應的操作指令至對應的匯流排位置,對周邊裝置執行中斷請求的操作。 Based on the above objectives, the present invention provides a bus direct interrupt service device, which is a bus interface unit coupled to a processor. The processor has a receiving end for receiving interrupt requests. The bus direct interrupt service device includes an interrupt instruction register and an interrupt. Request multiplexer. Among them, the interrupt command register is coupled to the receiving end. The interrupt command register stores a plurality of interrupt instructions and the bus positions and operation instructions corresponding to each plurality of interrupt instructions. When the receiving end receives an interrupt request, the interrupt command register is composed of a plurality of interrupt instructions. Select the interrupt control instruction corresponding to the interrupt request among the interrupt instructions. The interrupt request multiplexer is coupled to the bus interface unit and the interrupt command register. When the interrupt request multiplexer receives the interrupt control command, it directly transmits the operation command corresponding to the interrupt control command from the output interface to the corresponding bus location, and controls the peripheral The device performs the operation requested by the interrupt.

較佳地,中斷請求多工器可透過匯流排介面單元接收來自處理器的處理器控制指令,由輸出介面輸出處理器控制指令。 Preferably, the interrupt request multiplexer can receive processor control instructions from the processor through the bus interface unit, and output the processor control instructions through the output interface.

較佳地,中斷請求多工器可包含指令暫存區,耦接於匯流排介面單元,當中斷請求多工器接收中斷控制指令時,同時接收的處理器控制指令暫存於指令暫存區,形成暫存區控制指令。 Preferably, the interrupt request multiplexer may include an instruction temporary storage area coupled to the bus interface unit. When the interrupt request multiplexer receives an interrupt control instruction, the simultaneously received processor control instruction is temporarily stored in the instruction temporary storage area. , forming a temporary storage area control instruction.

較佳地,中斷請求多工器可包含仲裁器,耦接於中斷指令寄存庫、指令暫存區及匯流排介面單元,仲裁器儲存中斷指令寄存庫、指令暫存區及匯流排介面單元的指令執行規則。 Preferably, the interrupt request multiplexer may include an arbiter coupled to the interrupt command register, the command temporary storage area and the bus interface unit, and the arbiter stores the interrupt command register, the command temporary storage area and the bus interface unit. Instruction execution rules.

較佳地,指令執行規則的優先順序可依序為中斷控制指令、暫存區控制指令及處理器控制指令。 Preferably, the order of priority of the instruction execution rules may be interrupt control instructions, temporary storage area control instructions and processor control instructions.

較佳地,輸出介面可包含高級可擴充介面(Advance extensible interface,AXI)至多個高級高效能匯流排(Advance high performance bus,AHB)的介面。 Preferably, the output interface may include interfaces from an Advanced Extensible Interface (AXI) to multiple Advanced High Performance Buses (AHB).

較佳地,周邊裝置可包含類比數位轉換器,操作指令觸發類比數位轉換器進行回波採樣。 Preferably, the peripheral device may include an analog-to-digital converter, and the operation command triggers the analog-to-digital converter to perform echo sampling.

較佳地,中斷指令寄存庫及中斷請求多工器可耦接於與處理器不同的供電電源。 Preferably, the interrupt instruction register and the interrupt request multiplexer can be coupled to a power supply different from that of the processor.

較佳地,中斷指令寄存庫及中斷請求多工器所處的電源域與處理器所處的電源域不同。 Preferably, the power domain where the interrupt instruction register bank and the interrupt request multiplexer are located is different from the power domain where the processor is located.

較佳地,中斷指令寄存庫及中斷請求多工器的操作可獨立於處理器的操作。 Preferably, the operations of the interrupt instruction register bank and the interrupt request multiplexer can be independent of the operation of the processor.

承上所述,依本發明之匯流排直接中斷服務裝置,其可具有一或多個下述優點: Based on the above, the bus direct interrupt service device according to the present invention may have one or more of the following advantages:

(1)此匯流排直接中斷服務裝置能通過中斷指令寄存庫及中斷請求多工器,直接將中斷請求轉為可執行的控制指令,讓周邊裝置的操作上能更有效率,避免執行操作的時間延遲造成操作結果的誤差,提升操作的準確性及時效性。 (1) This bus direct interrupt service device can directly convert interrupt requests into executable control instructions through the interrupt command register and interrupt request multiplexer, so that the operation of peripheral devices can be more efficient and avoid unnecessary execution of operations. Time delay causes errors in operation results, improving the accuracy and timeliness of operations.

(2)此匯流排直接中斷服務裝置能通過中斷請求多工器設定指令執行規則,讓中斷請求多工器能處理中斷控制指令、暫存區控制指令及處理器 控制指令,使匯流排直接中斷服務裝置能相容於現有的處理器,提升裝置相容性以降低裝置開發成本。 (2) This bus direct interrupt service device can set instruction execution rules through the interrupt request multiplexer, so that the interrupt request multiplexer can process interrupt control instructions, temporary storage area control instructions and processor The control instructions enable the bus direct interrupt service device to be compatible with existing processors, thereby improving device compatibility and reducing device development costs.

(3)此匯流排直接中斷服務裝置可通過不同供電電源的設置,讓匯流排直接中斷服務裝置能在處理器休眠或關閉的情況下,仍能執行相關中斷請求的操作,降低系統耗電量以達到省電的效果。 (3) This bus direct interrupt service device can be configured with different power supplies, so that the bus direct interrupt service device can still perform related interrupt request operations when the processor is in sleep mode or shut down, thereby reducing system power consumption. In order to achieve the effect of power saving.

10,30:匯流排直接中斷服務裝置 10,30: Bus direct interrupt service device

11,31:中斷指令寄存庫 11,31: Interrupt instruction register library

12,32:中斷請求多工器 12,32: Interrupt request multiplexer

13,33:輸出介面 13,33:Output interface

20,40:處理器 20,40: Processor

21:匯流排介面單元 21:Bus interface unit

22,42:周邊裝置 22,42:Peripheral devices

34:裝置電源 34:Device power supply

41:處理器電源 41:Processor power supply

111:中斷指令 111: Interrupt instruction

112:匯流排位置 112: Bus location

113:操作指令 113: Operation instructions

121:指令暫存區 121: Instruction temporary storage area

122:仲裁器 122:Arbiter

123:執行指令規則 123: Execution of instruction rules

124:中斷控制指令 124: Interrupt control instruction

125:暫存區控制指令 125: Temporary storage area control command

126:處理器控制指令 126: Processor control instructions

IR:中斷請求 IR: interrupt request

為使本發明之技術特徵、內容與優點及其所能達成之功效更為顯而易見,茲將本發明配合以下附圖進行說明: In order to make the technical features, content and advantages of the present invention and the effects it can achieve more apparent, the present invention is described with reference to the following drawings:

第1圖係為本發明實施例之匯流排直接中斷服務裝置之示意圖。 Figure 1 is a schematic diagram of a bus direct interrupt service device according to an embodiment of the present invention.

第2圖係為本發明實施例之中斷指令寄存庫之示意圖。 Figure 2 is a schematic diagram of an interrupt command register according to an embodiment of the present invention.

第3圖係為本發明實施例之中斷請求多工器之示意圖。 Figure 3 is a schematic diagram of an interrupt request multiplexer according to an embodiment of the present invention.

第4圖係為本發明實施例之執行指令規則之示意圖。 Figure 4 is a schematic diagram of an execution instruction rule according to an embodiment of the present invention.

第5圖係為本發明另一實施例之匯流排直接中斷服務裝置之示意圖。 Figure 5 is a schematic diagram of a bus direct interruption service device according to another embodiment of the present invention.

為利於瞭解本發明之技術特徵、內容與優點及其所能達成之功效,茲將本發明配合附圖,並以實施例之表達形式詳細說明如下,而其中所使用之圖式,其主旨僅為示意及輔助說明書之用,未必為本發明實施後之真實比例與精準配置,故不應就所附之圖式的比例與配置關係解讀、侷限本發明於實際實施上的權利範圍,合先敘明。 In order to facilitate understanding of the technical features, contents and advantages of the present invention as well as the effects it can achieve, the present invention is described in detail below in conjunction with the accompanying drawings and in the form of embodiments. The drawings used therein are only for their main purpose. They are for illustration and auxiliary description purposes, and may not represent the actual proportions and precise configurations after implementation of the present invention. Therefore, the proportions and configuration relationships of the attached drawings should not be interpreted to limit the scope of rights of the present invention in actual implementation. Description.

請參閱第1圖,第1圖係為本發明實施例之匯流排直接中斷服務裝置之示意圖。如圖所示,匯流排直接中斷服務裝置10是耦接於處理器20,可透過電路連接的方式或將匯流排直接中斷服務裝置10的相關裝置於處理器晶片設計時加入,使其耦接於原本處理器20內的元件。處理器20具有接收中斷請求IR的接收端,在現有的處理方式上,處理器20在接收到中斷請求IR後,需要經進入狀態暫存器,經過取得(Fetch)、解碼(Decode)、執行(Execute)等中斷服務處理程式(Interrupt service routine,ISR),才將對應的指令送到匯流排介面單元21,通過連接介面輸出至連接的裝置,控制裝置來執行對應中斷請求IR的操作。然而,原本的操作方式需要經過較多的時脈週期才能實際觸發裝置操作,對於需要即時執行操作的裝置上會產生延遲而發生誤差或錯誤。 Please refer to Figure 1. Figure 1 is a schematic diagram of a bus direct interruption service device according to an embodiment of the present invention. As shown in the figure, the bus direct interrupt service device 10 is coupled to the processor 20. It can be coupled through circuit connection or by adding relevant devices of the bus direct interrupt service device 10 to the processor chip during design. components within the original processor 20. The processor 20 has a receiving end for receiving the interrupt request IR. In the existing processing method, after receiving the interrupt request IR, the processor 20 needs to enter the status register and go through Fetch, Decode, and Execute. (Execute) and other interrupt service routines (ISR), the corresponding instructions are sent to the bus interface unit 21, output to the connected device through the connection interface, and the control device performs operations corresponding to the interrupt request IR. However, the original operation method requires many clock cycles to actually trigger the device operation, which may cause delays and errors in devices that need to perform operations immediately.

對此,本揭露提供一種匯流排直接中斷服務裝置10來解決上述問題,匯流排直接中斷服務裝置10包含中斷指令寄存庫11以及中斷請求多工器12,中斷指令寄存庫11耦接於處理器20的接收端,中斷請求多工器12耦接於處理器20的匯流排介面單元21。當處理器20接收到中斷請求IR時,中斷指令寄存庫11接收相同的中斷請求IR,中斷指令寄存庫11將接收到的中斷請求IR與內部儲存的複數個中斷指令進行比對,若是比對到相同的中斷指令,則將原本寄存庫中儲存對應此中斷指令的匯流排位置與操作指令輸出。 In this regard, the present disclosure provides a bus direct interrupt service device 10 to solve the above problem. The bus direct interrupt service device 10 includes an interrupt instruction register 11 and an interrupt request multiplexer 12. The interrupt instruction register 11 is coupled to the processor. At the receiving end of 20 , the interrupt request multiplexer 12 is coupled to the bus interface unit 21 of the processor 20 . When the processor 20 receives an interrupt request IR, the interrupt instruction register 11 receives the same interrupt request IR. The interrupt instruction register 11 compares the received interrupt request IR with a plurality of internally stored interrupt instructions. If the comparison is When the same interrupt instruction is received, the bus location and operation instruction corresponding to the interrupt instruction stored in the original register bank are output.

請參閱第2圖,第2圖係為本發明實施例之中斷指令寄存庫之示意圖。如圖所示,中斷指令寄存庫11儲存複數個中斷指令111,每個中斷指令111會存放對應的匯流排位置112作為中斷位址,且存放在此中斷指令111當中直接執行的操作指令113。舉例來說,當中斷請求IR進入中斷指令寄存庫11後,比對中斷請求IR與儲存編號1的中斷指令111相同,則將對應的第一週邊的位址與執 行操作的第一指令輸出,經過多工器後最終直接由輸出介面對連接的第一週邊進行第一指令的操作。相似地,若是比對為編號2的中斷指令111,則將第二週邊及第二指令輸出,其他依此類推。 Please refer to Figure 2. Figure 2 is a schematic diagram of an interrupt command register according to an embodiment of the present invention. As shown in the figure, the interrupt instruction register 11 stores a plurality of interrupt instructions 111. Each interrupt instruction 111 stores the corresponding bus location 112 as the interrupt address, and stores the operation instruction 113 directly executed in the interrupt instruction 111. For example, when the interrupt request IR enters the interrupt instruction register 11 and the interrupt request IR is compared with the interrupt instruction 111 with storage number 1, the corresponding address of the first peripheral is compared with the execution address. The first instruction of the line operation is output, and after passing through the multiplexer, the output interface finally directly performs the first instruction operation on the connected first peripheral. Similarly, if the interrupt instruction 111 with number 2 is compared, the second peripheral and the second instruction are output, and so on for the others.

在本實施例中,輸出的匯流排位置112是對應周邊裝置的位址,操作指令113是裝置直接執行的指令命令,當經過多工器由輸出介面13輸出時,並不需要經過原本處理器20內部的進入儲列,進行取得、解碼、執行等步驟,而是直接輸出中斷控制指令。中斷請求IR可以直接轉換成所需的中斷服務輸出至對應周邊裝置,在操作的時效上符合中斷請求IR的需求,避免經由處理器20的中斷服務處理程式而產生時間的延遲,造成裝置操作上的誤差。因此,對於執行周邊裝置的操作上有即時操作需求的中斷請求IR,都可預先將對應的裝置所在的匯流排位置112及直接執行的操作指令113儲存於中斷指令寄存庫11當中,讓這些中斷請求IR能直接轉換成中斷控制指令來達到即時操作的時效性。 In this embodiment, the output bus location 112 is the address corresponding to the peripheral device, and the operation command 113 is an instruction command directly executed by the device. When output from the output interface 13 through the multiplexer, it does not need to go through the original processor. 20 internally enters the storage array and performs steps such as acquisition, decoding, and execution, but directly outputs the interrupt control instruction. The interrupt request IR can be directly converted into the required interrupt service and output to the corresponding peripheral device. The operation timeliness meets the requirements of the interrupt request IR and avoids the time delay caused by the interrupt service handler of the processor 20 and the device operation. error. Therefore, for the interrupt request IR that has immediate operation requirements for the operation of peripheral devices, the bus location 112 of the corresponding device and the directly executed operation command 113 can be stored in the interrupt command register 11 in advance, allowing these interrupts to Request IR can be directly converted into interrupt control instructions to achieve timeliness of immediate operations.

再回到第1圖,當中斷指令寄存庫11接收到中斷請求IR,由複數個中斷指令當中選擇對應的匯流排位置及操作指令作為中斷控制指令,傳送到中斷請求多工器12。中斷請求多工器12耦接於中斷指令寄存庫11,當中斷請求多工器12接收到中斷指令寄存庫11傳送的中斷控制指令,直接由輸出介面13傳送中斷控制指令對應的操作指令至對應的匯流排位置,對周邊裝置22執行中斷請求的操作。這裡的輸出介面13可為高級可擴充介面(Advance extensible interface,AXI)至多個高級高效能匯流排(Advance high performance bus,AHB)的介面,通過輸出介面13與外部的周邊裝置22連接,例如轉換器、感測器、記憶體等。 Returning to Figure 1, when the interrupt instruction register 11 receives the interrupt request IR, it selects the corresponding bus position and operation instruction from the plurality of interrupt instructions as the interrupt control instruction, and transmits it to the interrupt request multiplexer 12. The interrupt request multiplexer 12 is coupled to the interrupt command register 11. When the interrupt request multiplexer 12 receives the interrupt control command transmitted by the interrupt command register 11, it directly transmits the operation command corresponding to the interrupt control command from the output interface 13 to the corresponding bus position, and performs an interrupt request operation on the peripheral device 22 . The output interface 13 here can be an interface from an Advanced Extensible Interface (AXI) to multiple Advanced High Performance Buses (AHB), and is connected to an external peripheral device 22 through the output interface 13, such as a conversion devices, sensors, memories, etc.

在本揭露中,匯流排直接中斷服務裝置10可運用於超聲波流速計,裝設於水道上,由超聲波產生裝置發出超聲波後,由採樣裝置對回波進行採樣以檢測水道當中的流速。當超聲波產生裝置發出超聲波後,必須在預定的回波時間內觸發類比數位轉換器來進行採樣。類比數位轉換器作為連接處理器20的周邊裝置22,若是通過處理器20當中原本的中斷請求服務程式來處理中斷請求IR,當傳送到周邊裝置22時,可能已超過預定的回波時間,採集的樣本可能並非首個回波,讓裝置在判斷的流速時產生偏差。在本實施例中,進行回波採樣的中斷請求IR可直接通過中斷指令寄存庫11,將中斷請求IR轉換成輸出介面13能直接執行的中斷控制指令,即時觸發數位類比轉換器進行回波採樣,讓採集的回波樣本能正確反應水道流速狀態,達到準確偵測流速的效果。本揭露中以超聲波流速計來舉例說明,但本揭露不侷限於此,在其他需要即時處理中斷請求IR的周邊裝置22,都可適用於本揭露的匯流排直接中斷服務裝置10。 In this disclosure, the bus direct interruption service device 10 can be used as an ultrasonic flow meter, which is installed on the waterway. After the ultrasonic wave is emitted by the ultrasonic generating device, the echo is sampled by the sampling device to detect the flow rate in the waterway. When the ultrasonic wave generating device emits ultrasonic waves, the analog-to-digital converter must be triggered within a predetermined echo time to perform sampling. The analog-to-digital converter is a peripheral device 22 connected to the processor 20. If the interrupt request IR is processed through the original interrupt request service program in the processor 20, when it is transmitted to the peripheral device 22, the predetermined echo time may have exceeded. The sample may not be the first echo, causing the device to deviate when judging the flow rate. In this embodiment, the interrupt request IR for echo sampling can be directly converted into an interrupt control instruction that can be directly executed by the output interface 13 through the interrupt instruction register 11 to instantly trigger the digital-to-analog converter for echo sampling. , so that the collected echo samples can correctly reflect the flow rate status of the waterway, and achieve the effect of accurately detecting the flow rate. In this disclosure, an ultrasonic flow meter is used as an example, but the disclosure is not limited thereto. The bus direct interrupt service device 10 of the disclosure may be applied to other peripheral devices 22 that need to process interrupt request IR in real time.

中斷請求多工器12除了耦接於中斷指令寄存庫11,還同時耦接於處理器20的匯流排介面單元21,當中斷請求IR並無急迫的時效需求時,仍可通過原有的處理器20,將中斷請求IR通過中斷服務處理程式轉換成處理器控制指令,透過匯流排介面單元21傳送到中斷請求多工器12,再通過輸出介面13輸出至對應的周邊裝置22。中斷請求多工器12可通過先進先出(First In First out)的方式,依序輸出收到的中斷控制指令或者處理器控制指令,在另一實施例中,也可在中斷請求多工器12中設置指令處理的規則,以下實施例將進一步說明中斷請求多工器12的設置特徵。 In addition to being coupled to the interrupt instruction register 11, the interrupt request multiplexer 12 is also coupled to the bus interface unit 21 of the processor 20. When the interrupt request IR does not have urgent timing requirements, it can still be processed through the original process. The processor 20 converts the interrupt request IR into a processor control instruction through the interrupt service handler, transmits it to the interrupt request multiplexer 12 through the bus interface unit 21, and then outputs it to the corresponding peripheral device 22 through the output interface 13. The interrupt request multiplexer 12 can sequentially output the received interrupt control instructions or processor control instructions in a first-in-first-out manner. In another embodiment, the interrupt request multiplexer 12 can also output the received interrupt control instructions or processor control instructions in a first-in-first-out manner. The instruction processing rules are set in 12. The following embodiments will further illustrate the setting features of the interrupt request multiplexer 12.

請參閱第3圖,第3圖係為本發明實施例之中斷請求多工器之示意圖。如圖所示,中斷請求多工器12設置指令暫存區121,指令暫存區121耦接於 匯流排介面單元21,當中斷請求多工器12同時接收中斷指令寄存庫11的中斷控制指令及匯流排介面單元21的處理器控制指令時,中斷請求多工器12優先處理中斷控制指令,避免執行的操作內容受到延遲。此時,同時收到的處理器控制指令就會暫存於指令暫存區121,形成暫存區控制指令。暫存區控制指令可等到中斷請求多工器12執行完中斷控制指令後,才執行這些暫存區控制指令。 Please refer to Figure 3. Figure 3 is a schematic diagram of an interrupt request multiplexer according to an embodiment of the present invention. As shown in the figure, the interrupt request multiplexer 12 sets an instruction temporary storage area 121, and the instruction temporary storage area 121 is coupled to The bus interface unit 21, when the interrupt request multiplexer 12 receives the interrupt control instructions from the interrupt instruction register 11 and the processor control instructions from the bus interface unit 21, the interrupt request multiplexer 12 processes the interrupt control instructions first to avoid The content of the operation being performed is delayed. At this time, the processor control instructions received at the same time will be temporarily stored in the instruction temporary storage area 121 to form a temporary storage area control instruction. The temporary storage area control instructions can wait until the interrupt request multiplexer 12 completes executing the interrupt control instructions before executing these temporary storage area control instructions.

為了依據設計的優先順序來執行指令,中斷請求多工器12還設置了仲裁器122,耦接於中斷指令寄存庫11、指令暫存區121及匯流排介面單元21,仲裁器122儲存了判斷指令優先順序的執行指令規則,通過執行指令規則的設定,決定中斷指令寄存庫11、指令暫存區121及匯流排介面單元21所傳送的指令的執行順序。請同時參閱第4圖,第4圖係為本發明實施例之執行指令規則之示意圖。如圖所示,仲裁器122當中儲存了執行指令規則123,而執行指令規則123界定了中斷控制指令124、暫存區控制指令125及處理器控制指令126的規則表。藉由執行指令規則123的規則表來決定將何種指令推送至輸出介面13,操作周邊裝置執行中斷請求IR的操作動作。其中,規則表的1表示推送指令、0表示無接收指令、X表示不推送指令。 In order to execute instructions according to the designed priority order, the interrupt request multiplexer 12 is also provided with an arbiter 122, which is coupled to the interrupt instruction register 11, the instruction temporary storage area 121 and the bus interface unit 21. The arbiter 122 stores the judgment The instruction priority order execution instruction rules determine the execution order of instructions transmitted by the interrupt instruction register 11 , the instruction temporary storage area 121 and the bus interface unit 21 through the setting of the instruction execution rules. Please also refer to Figure 4. Figure 4 is a schematic diagram of an execution instruction rule according to an embodiment of the present invention. As shown in the figure, the arbiter 122 stores execution instruction rules 123, and the execution instruction rules 123 define a rule table of interrupt control instructions 124, temporary storage area control instructions 125, and processor control instructions 126. By executing the rule table of the instruction rule 123, it is decided which instruction to push to the output interface 13, and the peripheral device is operated to perform the operation action of the interrupt request IR. Among them, 1 in the rule table indicates push instructions, 0 indicates no instructions received, and X indicates no instructions pushed.

首先,為了中斷指令寄存庫11的執行時效性,中斷指令寄存庫11所傳送的中斷控制指令124具有最高的優先順序,也就是說當仲裁器122接收到中斷控制指令124時,不論是否有暫存區控制指令125及處理器控制指令126,都不會進行指令推送,僅優先處理中斷控制指令124。此時,若是指令暫存區121當中具有暫存區控制指令125,則維持暫存狀態不進行推送,若是接收到處理器控制指令126,則轉成暫存區控制指令125,排入指令暫存區121當中。 First of all, in order to ensure the execution timeliness of the interrupt instruction register 11, the interrupt control instruction 124 transmitted by the interrupt instruction register 11 has the highest priority. That is to say, when the arbiter 122 receives the interrupt control instruction 124, regardless of whether there is a temporary Neither the storage control instruction 125 nor the processor control instruction 126 will push instructions, and only the interrupt control instruction 124 will be processed first. At this time, if there is a temporary storage area control instruction 125 in the instruction temporary storage area 121, the temporary storage area control instruction 125 is maintained, and the push is not performed. If the processor control instruction 126 is received, it is converted into a temporary storage area control instruction 125, and is queued into the temporary storage area. In storage area 121.

當仲裁器122將所有中斷控制指令124都推送完成後,並未接到新的中斷控制指令124,此時則優先處理指令暫存區121當中的暫存區控制指令125,暫存區控制指令125可依據先進先出的順序推送指令,在執行同時,若接收到處理器控制指令126,同樣將其轉為暫存區控制指令125並排入指令暫存區121當中。 When the arbiter 122 completes pushing all the interrupt control instructions 124 and does not receive a new interrupt control instruction 124, at this time, the temporary area control instruction 125 in the instruction temporary area 121 will be processed first, and the temporary area control instruction 125 will be processed first. 125 can push instructions in a first-in, first-out order. During execution, if a processor control instruction 126 is received, it will also be converted into a temporary storage area control instruction 125 and placed in the instruction temporary storage area 121.

當仲裁器122推送完所有暫存區控制指令125後,在中斷指令寄存庫11及指令暫存區121都沒有傳送新的指令的情況下,若是匯流排介面單元21傳送處理器控制指令126,則無需轉換成暫存區控制指令125,仲裁器122直接將處理器控制指令126推送至輸出介面13。 After the arbiter 122 has pushed all the temporary area control instructions 125, if neither the interrupt instruction register 11 nor the instruction temporary area 121 transmits new instructions, if the bus interface unit 21 transmits the processor control instruction 126, There is no need to convert the buffer control instruction 125 into the temporary storage area control instruction 125 , and the arbiter 122 directly pushes the processor control instruction 126 to the output interface 13 .

請參閱第5圖,第5圖係為本發明另一實施例之匯流排直接中斷服務裝置之示意圖。如圖所示,匯流排直接中斷服務裝置30是耦接於處理器40,匯流排直接中斷服務裝置30包含中斷指令寄存庫31以及中斷請求多工器32,中斷指令寄存庫31耦接於處理器40的接收端,接收中斷請求IR,中斷指令寄存庫31儲存複數個中斷指令及對應各複數個中斷指令的匯流排位置與操作指令,當接收端接收中斷請求IR時,中斷指令寄存庫31由複數個中斷指令當中選擇對應中斷請求IR的中斷控制指令。 Please refer to Figure 5. Figure 5 is a schematic diagram of a bus direct interruption service device according to another embodiment of the present invention. As shown in the figure, the bus direct interrupt service device 30 is coupled to the processor 40. The bus direct interrupt service device 30 includes an interrupt instruction register 31 and an interrupt request multiplexer 32. The interrupt instruction register 31 is coupled to the processor. The receiving end of the device 40 receives the interrupt request IR, and the interrupt instruction register 31 stores a plurality of interrupt instructions and the bus positions and operation instructions corresponding to each plurality of interrupt instructions. When the receiving end receives the interrupt request IR, the interrupt instruction register 31 The interrupt control instruction corresponding to the interrupt request IR is selected from a plurality of interrupt instructions.

中斷請求多工器32耦接於處理器40的匯流排介面單元及中斷指令寄存庫31,當中斷請求多工器32接收中斷控制指令,直接由輸出介面33傳送中斷控制指令對應的操作指令至對應的匯流排位置,對周邊裝置42執行中斷請求的操作。 The interrupt request multiplexer 32 is coupled to the bus interface unit of the processor 40 and the interrupt command register 31. When the interrupt request multiplexer 32 receives the interrupt control command, the operation command corresponding to the interrupt control command is directly sent from the output interface 33 to At the corresponding bus position, the interrupt request operation is performed on the peripheral device 42 .

在本實施例中,雖然匯流排直接中斷服務裝置30是耦接於處理器40,但匯流排直接中斷服務裝置30與處理器40可耦接於不同供電電源,如圖所 示,處理器40可由處理器電源41來供電,匯流排直接中斷服務裝置30可由裝置電源34來供電,即匯流排直接中斷服務裝置30當中的中斷指令寄存庫31及中斷請求多工器32所處的電源域,不同於處理器40所處的電源域。當處理器40處於休眠或關閉狀態,處理器電源41可關閉或僅部分供電來降低裝置的耗電量,此時中斷請求IR將無法由處理器40的中斷服務處理程式來轉換成執行指令,中斷請求多工器32不會接收到處理器控制指令。 In this embodiment, although the bus direct interrupt service device 30 is coupled to the processor 40, the bus direct interrupt service device 30 and the processor 40 may be coupled to different power supplies, as shown in the figure. As shown, the processor 40 can be powered by the processor power supply 41, and the bus direct interrupt service device 30 can be powered by the device power supply 34, that is, the interrupt instruction register 31 and the interrupt request multiplexer 32 in the bus direct interrupt service device 30 are located therein. The power domain in which the processor 40 is located is different from the power domain in which the processor 40 is located. When the processor 40 is in a sleep or shutdown state, the processor power supply 41 can be turned off or only partially powered to reduce the power consumption of the device. At this time, the interrupt request IR will not be converted into an execution instruction by the interrupt service handler of the processor 40. The interrupt request multiplexer 32 will not receive processor control instructions.

然而,由於匯流排直接中斷服務裝置30由獨立的裝置電源34來供電,當接收到中斷請求IR時,中斷指令寄存庫31仍可以將中斷請求IR所對應的中斷控制指令傳送出去,經過中斷請求多工器32由輸出介面33傳到對應的匯流排裝置,進而控制對應周邊裝置42的操作。也就是在裝置休眠或關閉的情況下,仍可通過匯流排直接中斷服務裝置30獨立執行部分預存的中斷請求IR,無須透過處理器40的中斷服務處理程式,降低開啟處理器40所需時間及所耗費的電量,在執行周邊裝置42操作時達到省電的效果。 However, since the bus direct interrupt service device 30 is powered by an independent device power supply 34, when an interrupt request IR is received, the interrupt instruction register 31 can still transmit the interrupt control instruction corresponding to the interrupt request IR. The multiplexer 32 transmits the information to the corresponding bus device through the output interface 33, thereby controlling the operation of the corresponding peripheral device 42. That is to say, when the device is in hibernation or shut down, the interrupt service device 30 can still directly execute part of the pre-stored interrupt request IR through the bus without going through the interrupt service handler of the processor 40, thus reducing the time required to turn on the processor 40 and The power consumed achieves the effect of power saving when executing the operation of the peripheral device 42 .

以上所述僅為舉例性,而非為限制性者。任何未脫離本發明之精神與範疇,而對其進行之等效修改或變更,均應包含於後附之申請專利範圍中。 The above is only illustrative and not restrictive. Any equivalent modifications or changes that do not depart from the spirit and scope of the present invention shall be included in the appended patent scope.

10:匯流排直接中斷服務裝置 10: Bus direct interrupt service device

11:中斷指令寄存庫 11: Interrupt instruction register library

12:中斷請求多工器 12: Interrupt request multiplexer

13:輸出介面 13:Output interface

20:處理器 20: Processor

21:匯流排介面單元 21:Bus interface unit

22:周邊裝置 22:Peripheral devices

IR:中斷請求 IR: interrupt request

Claims (10)

一種匯流排直接中斷服務裝置,係耦接於一處理器的一匯流排介面單元,該處理器具有接收一中斷請求的一接收端,該匯流排直接中斷服務裝置包含:一中斷指令寄存庫,耦接於該處理器之該接收端,該中斷指令寄存庫儲存複數個中斷指令及對應各該複數個中斷指令的一匯流排位置與一操作指令,當該處理器的該接收端接收該中斷請求時,該中斷指令寄存庫通過耦接之該接收端接收相同的該中斷請求,並由該複數個中斷指令當中選擇對應該中斷請求的一中斷控制指令;一中斷請求多工器,耦接於該匯流排介面單元及該中斷指令寄存庫;以及一輸出介面,耦接於該中斷請求多工器及一周邊裝置;其中,該中斷請求多工器接收該中斷控制指令後,透過該輸出介面傳送該中斷控制指令對應的該操作指令至對應的該匯流排位置之該周邊裝置,以執行該中斷請求的操作。 A bus direct interrupt service device is coupled to a bus interface unit of a processor. The processor has a receiving end for receiving an interrupt request. The bus direct interrupt service device includes: an interrupt instruction register, Coupled to the receiving end of the processor, the interrupt instruction register stores a plurality of interrupt instructions and a bus location corresponding to each of the plurality of interrupt instructions and an operation instruction. When the receiving end of the processor receives the interrupt When requesting, the interrupt instruction register receives the same interrupt request through the coupled receiving end, and selects an interrupt control instruction corresponding to the interrupt request from among the plurality of interrupt instructions; an interrupt request multiplexer is coupled to in the bus interface unit and the interrupt command register; and an output interface coupled to the interrupt request multiplexer and a peripheral device; wherein, after the interrupt request multiplexer receives the interrupt control command, it passes the output The interface sends the operation command corresponding to the interrupt control command to the peripheral device corresponding to the bus location to execute the operation requested by the interrupt. 如請求項1所述之匯流排直接中斷服務裝置,其中該中斷請求多工器透過該匯流排介面單元接收來自該處理器的一處理器控制指令,由該輸出介面輸出該處理器控制指令。 The bus direct interrupt service device as claimed in claim 1, wherein the interrupt request multiplexer receives a processor control command from the processor through the bus interface unit, and the output interface outputs the processor control command. 如請求項2所述之匯流排直接中斷服務裝置,其中該中斷請求多工器包含一指令暫存區,耦接於該匯流排介面單元,當該中斷請求多工器接收該中斷控制指令時,同時接收的該處理器控制指令暫存於該指令暫存區,形成一暫存區控制指令。 The bus direct interrupt service device as described in claim 2, wherein the interrupt request multiplexer includes an instruction temporary storage area coupled to the bus interface unit, when the interrupt request multiplexer receives the interrupt control instruction , the processor control command received at the same time is temporarily stored in the command temporary storage area, forming a temporary storage area control command. 如請求項3所述之匯流排直接中斷服務裝置,其中該中斷請求多工器包含一仲裁器,耦接於該中斷指令寄存庫、該指令暫存區及該匯流排介面單元,該仲裁器儲存該中斷指令寄存庫、該指令暫存區及該匯流排介面單元的一指令執行規則。 The bus direct interrupt service device as described in claim 3, wherein the interrupt request multiplexer includes an arbiter coupled to the interrupt command register, the command temporary area and the bus interface unit, and the arbiter Store an instruction execution rule for the interrupt instruction register, the instruction temporary area and the bus interface unit. 如請求項4所述之匯流排直接中斷服務裝置,其中該指令執行規則的優先順序依序為該中斷控制指令、該暫存區控制指令及該處理器控制指令。 The bus direct interrupt service device as described in claim 4, wherein the order of priority of the instruction execution rule is the interrupt control instruction, the temporary storage area control instruction and the processor control instruction. 如請求項1所述之匯流排直接中斷服務裝置,其中該輸出介面包含高級可擴充介面至多個高級高效能匯流排的介面。 The bus direct interrupt service device of claim 1, wherein the output interface includes an advanced extensible interface to an interface of a plurality of advanced high-performance buses. 如請求項1所述之匯流排直接中斷服務裝置,其中該周邊裝置包含一類比數位轉換器,該操作指令觸發該類比數位轉換器進行回波採樣。 The bus direct interrupt service device as described in claim 1, wherein the peripheral device includes an analog-to-digital converter, and the operation command triggers the analog-to-digital converter to perform echo sampling. 如請求項1所述之匯流排直接中斷服務裝置,其中該中斷指令寄存庫及該中斷請求多工器耦接於與該處理器不同的供電電源。 The bus direct interrupt service device of claim 1, wherein the interrupt instruction register and the interrupt request multiplexer are coupled to a power supply different from that of the processor. 如請求項1所述之匯流排直接中斷服務裝置,其中該中斷指令寄存庫及該中斷請求多工器所處的電源域與該處理器所處的電源域不同。 The bus direct interrupt service device as described in claim 1, wherein the interrupt instruction register and the interrupt request multiplexer are located in a power domain different from the power domain where the processor is located. 如請求項1所述之匯流排直接中斷服務裝置,其中該中斷指令寄存庫及該中斷請求多工器的操作獨立於該處理器的操作。 The bus direct interrupt service device as claimed in claim 1, wherein the operations of the interrupt instruction register and the interrupt request multiplexer are independent of the operation of the processor.
TW111129075A 2022-08-03 2022-08-03 Bus direct interrupt service device TWI816498B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW111129075A TWI816498B (en) 2022-08-03 2022-08-03 Bus direct interrupt service device
CN202211257505.7A CN117555833A (en) 2022-08-03 2022-10-14 Bus direct interrupt service device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111129075A TWI816498B (en) 2022-08-03 2022-08-03 Bus direct interrupt service device

Publications (2)

Publication Number Publication Date
TWI816498B true TWI816498B (en) 2023-09-21
TW202407551A TW202407551A (en) 2024-02-16

Family

ID=88966329

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111129075A TWI816498B (en) 2022-08-03 2022-08-03 Bus direct interrupt service device

Country Status (2)

Country Link
CN (1) CN117555833A (en)
TW (1) TWI816498B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000054162A1 (en) * 1999-03-10 2000-09-14 Elan Digital Systems Limited Apparatus and method for handling peripheral device interrupts
CN102736884A (en) * 2011-10-03 2012-10-17 威盛电子股份有限公司 Link connection method and link connection establishing device
TW201905686A (en) * 2017-06-27 2019-02-01 大陸商華為技術有限公司 Processing method, device, virtualization device and readable storage medium for interrupt request
TW201923606A (en) * 2017-10-10 2019-06-16 美商高通公司 I3C in-band interrupts directed to multiple execution environments

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000054162A1 (en) * 1999-03-10 2000-09-14 Elan Digital Systems Limited Apparatus and method for handling peripheral device interrupts
CN102736884A (en) * 2011-10-03 2012-10-17 威盛电子股份有限公司 Link connection method and link connection establishing device
TW201905686A (en) * 2017-06-27 2019-02-01 大陸商華為技術有限公司 Processing method, device, virtualization device and readable storage medium for interrupt request
TW201923606A (en) * 2017-10-10 2019-06-16 美商高通公司 I3C in-band interrupts directed to multiple execution environments

Also Published As

Publication number Publication date
CN117555833A (en) 2024-02-13
TW202407551A (en) 2024-02-16

Similar Documents

Publication Publication Date Title
JP7313381B2 (en) Embedded scheduling of hardware resources for hardware acceleration
US10649935B2 (en) Deferred inter-processor interrupts
US7523228B2 (en) Method for performing a direct memory access block move in a direct memory access device
US6622227B2 (en) Method and apparatus for utilizing write buffers in memory control/interface
US6694380B1 (en) Mapping requests from a processing unit that uses memory-mapped input-output space
US6212592B1 (en) Computer system for processing system management interrupt requests
KR100951092B1 (en) Fine grained multi-thread dispatch block mechanism
US8473717B2 (en) Coprocessor reset controller with queue for storing configuration information of subsequent sessions prior to completion of current session
Pullini et al. μDMA: An autonomous I/O subsystem for IoT end-nodes
WO1996000940A1 (en) Pci to isa interrupt protocol converter and selection mechanism
WO2011046895A2 (en) Interrupt masking for multi-core processors
JPH09190406A (en) Direct memory access controller and transmission system using the same
US6263395B1 (en) System and method for serial interrupt scanning
US5619729A (en) Power management of DMA slaves with DMA traps
JP2017502389A (en) Control device for vehicle
US20220113855A1 (en) Always on low power capacitive matrix autonomous scan
US20070038829A1 (en) Wait aware memory arbiter
TWI816498B (en) Bus direct interrupt service device
US6145048A (en) Method of processing system management interrupt requests
US10705993B2 (en) Programming and controlling compute units in an integrated circuit
US9043507B2 (en) Information processing system
WO2019136983A1 (en) Low-delay instruction scheduler
JP6066807B2 (en) Computer system, computer system interrupt processing program, and computer system interrupt processing method
US20240056092A1 (en) Scheduling analog-to-digital conversions
CN112860622B (en) Processing system and system on chip