TWI259955B - DMA transfer controlling method and apparatus - Google Patents

DMA transfer controlling method and apparatus Download PDF

Info

Publication number
TWI259955B
TWI259955B TW091103874A TW91103874A TWI259955B TW I259955 B TWI259955 B TW I259955B TW 091103874 A TW091103874 A TW 091103874A TW 91103874 A TW91103874 A TW 91103874A TW I259955 B TWI259955 B TW I259955B
Authority
TW
Taiwan
Prior art keywords
dma
data
cpu
transfer
transferred
Prior art date
Application number
TW091103874A
Other languages
Chinese (zh)
Inventor
Makoto Ueda
Original Assignee
Ibm
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 Ibm filed Critical Ibm
Application granted granted Critical
Publication of TWI259955B publication Critical patent/TWI259955B/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/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Bus Control (AREA)
  • Memory System (AREA)

Abstract

An object of the present invention is to allow a CPU to refer to data under DMA transfer to thereby reduce latency time of the CPU during the DMA transfer. An apparatus 10 for controlling a DMA transfer comprises means 12 for detecting whether or not a CPU requests access to data being DMA-transferred, and allows the CPU to refer co the data by suspending the DMA-transfer under execution.

Description

1253255. Α7 五、發明説明| 年月从日修(更)正本 經濟部智慧財產局員工消費合作社印製 發明領域: 本發明係關於控制一直接記憶體存取A)轉移的 設備及方法’及更特定地係關於控制記憶體至記憶體DMA 轉移的設備及方法。 發明背景: 第9(a)至9(d)圖顯示實施於一主記憶體的記憶體區之 間的記憶體至記憶體DMA轉移。在第9(a)至9(d)圖所示的 一資料處理系統中,一中央處理單元(CPU)70,一快取(cache) 單元72,一主記憶體90及一 DMA控制器82被連接至一系統 匯流排8 0。 該快取單元72被連接於該CPU70與該系統匯流排80 之間且包含一附籤(tag)74及一快取76。快取76為一記憶體 用來暫時貯存存放在主記憶體90的一部分資料,及該附籤 74為一記憶體用來貯存存放在該快取76内的資料的位 址。當該快取76貯存一目標資料時該CPU70會存取該快取 76,而在該快取76沒有貯存該目標資料時CPU會存取該主 記憶體90。 主記憶體90為一半導體記憶體,如一動態隨機存取記 憶體(RAM)。該DM A控制器82在沒有CPU70的干涉之下實 施於該主記憶體90的記憶體區之間一記憶體至記憶體資 料轉移。記憶區之間的資料轉移意謂一資料從該主記憶體 9 0的一來源記憶體位置被移轉至一目的記憶體位置,如第 9(a)至9(b)圖所示。一使用DMA控制器82的資料轉移(在下 第4頁 本紙張尺度適用中國國家標準r::MS)A規袼(2l·二·;ν: (請先間讀背面之注意事项再填寫本頁) # 訂. B7 五、發明説明( 文中被稱為DMA資料轉移)及在cpij70中的處理可被平行 地處理。 例如’當多個指令或指令群使用相同的資料時,原始 資料並沒有被直接使用,而是原始資料的一備份被使用於 許多地方。在DMA轉移中,資料是以一資料塊為基礎被轉 移的。一資料塊的一個例子被示於第1 0(a)圖中。一資料塊 DB包含在來源記憶體位置中之daTAI,DATA2,DATA3, DATA4 ’ DATA5,DATA6,DATA7及 DATA8,該等來源記 憶體位置具有在主記憶體9 0中的位址A D Γ,A D 2,,A D 3 1, AD4’,AD5’,AD6’,AD7,及 AD8*。資料 DATA1,DATA2, DATA3,DATA4,DATA5,DATA6,DATA7 及 DATA8 被 拷貝至目的記憶體位置其具有在主記憶體9〇中的位址 ADI,AD2,AD3,AD4,AD5,AD6 , AD7及 AD8 〇 經 濟 部 智 慧 財 產 局 員 X 消 費 合 作 社 印 製 如第9(a)圖中所示的,該DMA控制器82包含一暫存器 84(在下文中稱為轉移計數器84)用來貯存DMA未被轉移 的資料及一暫存器86(在下文中稱為轉移位址86)用來貯存 在DMA轉移下的資料的位址。在第i〇(a)圖所示的資料塊的 例子中,轉移計數器84貯存資料”8”的數字作為一啟始 值。該DMA控制器82在每一次DMA轉移被完成時即將轉移 計數器84的數值減1。 轉移位址8 6貯存一來源記憶體位置的位址及一目的 記憶體位置的位址。在第1 0(a)圖所示的資料塊的例子中, 一來源位置的位址A D Γ及一目的位置的位址a D 1都被貯 存作為一啟始值。該DMA控制器82在每一次DMA轉移完成 第5頁1253255. Α7 V. Inventions | Years from the Japanese repair (more), the Ministry of Economic Affairs, Intellectual Property Office, employee consumption cooperatives, printed inventions: The present invention relates to a device and method for controlling a direct memory access A) transfer and More specifically, it relates to apparatus and methods for controlling memory to memory DMA transfer. BACKGROUND OF THE INVENTION Figures 9(a) through 9(d) show memory-to-memory DMA transfer between memory regions implemented in a main memory. In a data processing system shown in Figures 9(a) through 9(d), a central processing unit (CPU) 70, a cache unit 72, a main memory 90 and a DMA controller 82 are provided. Connected to a system bus 80. The cache unit 72 is connected between the CPU 70 and the system bus 80 and includes a tag 74 and a cache 76. The cache 76 is a memory for temporarily storing a portion of the data stored in the main memory 90, and the tab 74 is a memory for storing the address of the data stored in the cache 76. The CPU 70 accesses the cache 76 when the cache 76 stores a target data, and the CPU accesses the main memory 90 when the cache 76 does not store the target data. The main memory 90 is a semiconductor memory such as a dynamic random access memory (RAM). The DM A controller 82 implements a memory-to-memory data transfer between the memory regions of the main memory 90 without the intervention of the CPU 70. Data transfer between memory areas means that a data is transferred from a source memory location of the primary memory 90 to a destination memory location, as shown in Figures 9(a) through 9(b). A data transfer using the DMA controller 82 (Applied to the Chinese national standard r::MS on page 4 of the next page) A specification (2l·2·; ν: (Please read the back of the note first and then fill in this page) #定. B7 V. The invention description (referred to as DMA data transfer in the text) and the processing in cpij70 can be processed in parallel. For example, when multiple instructions or groups of instructions use the same material, the original data is not Direct use, but a backup of the original data is used in many places. In the DMA transfer, the data is transferred on a data block basis. An example of a data block is shown in Figure 10(a). A data block DB contains daTAI, DATA2, DATA3, DATA4 'DATA5, DATA6, DATA7 and DATA8 in the source memory location, and the source memory locations have the address AD Γ, AD in the main memory 90 2,, AD 3 1, AD4', AD5', AD6', AD7, and AD8*. The data DATA1, DATA2, DATA3, DATA4, DATA5, DATA6, DATA7 and DATA8 are copied to the destination memory location and have the main memory. Addresses in the body 9 ADI, AD2, AD3, AD4 AD5, AD6, AD7, and AD8 智慧 Ministry of Economic Affairs Intellectual Property Officer X Consumer Cooperative Print As shown in Fig. 9(a), the DMA controller 82 includes a register 84 (hereinafter referred to as a transfer counter 84). The data used to store the DMA not transferred and a register 86 (hereinafter referred to as the transfer address 86) are used to store the address of the data under the DMA transfer. The data shown in the figure (a) In the example of the block, the transfer counter 84 stores the number of data "8" as a start value. The DMA controller 82 decrements the value of the transfer counter 84 by one every time the DMA transfer is completed. Transfer address 8 6 Store one The address of the source memory location and the address of a destination memory location. In the example of the data block shown in Figure 10(a), the address of the source location AD and the address of a destination location a D 1 is stored as a start value. The DMA controller 82 completes page 5 on each DMA transfer.

Mm T. ;W wn .ΊΓΤΤί, ·, ‘ ·· .... 一,气〜«“一 m. ' 本紙張尺度適用中國國家標心:…;)/dv: (210X297公釐) 1259955 A7 B7 五、發明説明() 時即更新來源及目的位置的位址。 第1 0(b)圖為一資料塊DB的DMA資料轉移的示意圖。 每一次資料被轉移時,轉移計數器84及轉移位址86即被更 新且DATA1至DATA8被一個接一個地轉移。當DATA8的 DMA轉移被完成時,轉移計數器的數值變為”〇,,(未示出) 及資料塊DB的DMA轉移即被完成。在第1 〇(b)圖中,,AD 1, AD 1π代表來源位置的位址為ad Γ及一目的位置的位址為 AD1。 在DMA轉移下,CPU要等到DMA轉移完成之後方能存 取資料。第1 1圖顯示CPU70存取貯存在一目的記憶體位置 中之資料的程序。如第9(b)圖所示的,當該資料塊db的 DMA轉移開始之後(S160)CPU70要求存取貯存在目的記憶 體位置(S 162)中的資料時,DMA轉移被持續(S163)。當該 資料塊DB的DMA轉移完成時,DMA控制器82送出一中斷 訊號INT以告知CPU70DMA轉移完成(S166),如第9(c)圖所 示。因此,在資料塊DB的DMA轉移完成之後可存取在目 的位置處之被轉移的資料(S168),如第9(d)圖所示。 例如,如第12圖所示,當CPU70在DATA 1的DMA轉移 完成(S180)之後要求存取DATA7(S162)時,CPU70在 DATA2 至 DATA8 的 DMA 轉移(S182,S184,S186,S188,Mm T. ;W wn .ΊΓΤΤί, ·, ' ·· .... one, gas ~ «" one m. ' This paper scale applies to the Chinese national standard: ...;) / dv: (210X297 mm) 1259955 A7 B7 5. Inventor's Note () The address of the source and destination is updated. Figure 10(b) is a schematic diagram of the DMA data transfer of a data block DB. Each time the data is transferred, the transfer counter 84 and the transfer bit are transferred. The address 86 is updated and DATA1 to DATA8 are transferred one by one. When the DMA transfer of DATA8 is completed, the value of the transfer counter becomes "〇,, (not shown) and the DMA transfer of the data block DB is completed. . In the first diagram (b), AD 1, AD 1π represents the address of the source location as ad Γ and the address of a destination location is AD1. Under DMA transfer, the CPU waits until the DMA transfer is complete before it can access the data. Fig. 1 1 shows a procedure in which the CPU 70 accesses data stored in a destination memory location. As shown in FIG. 9(b), after the DMA transfer of the data block db is started (S160), the CPU 70 requests access to the data stored in the destination memory location (S162), the DMA transfer is continued (S163). . When the DMA transfer of the data block DB is completed, the DMA controller 82 sends an interrupt signal INT to inform the CPU 70 that the DMA transfer is completed (S166), as shown in Fig. 9(c). Therefore, the transferred material at the destination position can be accessed after the DMA transfer of the material block DB is completed (S168), as shown in Fig. 9(d). For example, as shown in Fig. 12, when the CPU 70 requests access to DATA7 (S162) after the DMA transfer of DATA 1 is completed (S180), the CPU 70 transfers DMA from DATA2 to DATA8 (S182, S184, S186, S188,

S 1 90 ’ S 1 92及S 1 92)完成之後才存取在目的位址的 DATA7(S168)。因為 CPU70不能在 DATA2至 DATA8 的 DMA 轉移期間存取D A T A 7,所以會產生潛候時間。 本發明的一個目的即使要讓CPU能夠在DMA轉移下 第6頁 本紙張尺度適用中國國家標準(CNS)A4規格(210x297公釐) (請先閲讀背面之注意事項再填寫本頁) 裝· 、町. 經濟部智慧財產局員工消費合作社印製 1259955 A7 B7 、發明説明( ’猎以縮短CPU在DM A轉移期間的潛候時間。 (請先閱讀背面之注意事項再填寫本頁} 種依據本發明之控制記憶體至記憶體DMA轉移的 方法包含以下的步驟: 偵測一 cpu要求存取被包括在一被DMA轉移的資料 鬼内之資料,及在DMA轉移執行中,優先允許該CPU存取 該被要求的資料。 一依據本發明之用來控制一 DMA轉移的設備包含:偵 測一 CPU要求存取被包括在一被DMa轉移的資料塊内之 資料的機構;及在DMA轉移執行中,優先允許該cpu存取 該被要求的資料的機構。 在本發明中,CPU可在DMA轉移完成之前存取所要求 的資料,不論所要求的資料是否已被DMA轉移。因此,在 DMA轉移中所消耗掉的時間對cpu而言可被縮短。 圖式簡單說明: 經濟部智慧財產局員工消費合作社印製 第1 (a)至1 (d)圖顯示介於一主記憶體的記憶體位置之間的 一依據本發明的DMA轉移控制的實施例。第丨(昀圖 顯示一系統架構的例子,第1(b)圖顯示一用來控制 該DMA轉移的訊號流,第〗(c)圖顯示來自於一 cpu 之存取要求訊號流,及第1(d)圖顯示由—DMA控制 器對於首先被CPU所要求的DMA轉移資料而發出 之訊號流。 1259955 A7 B7 五、發明説明() C請先閲讀背面之注意事項再填寫本頁) 第2(a)圖顯示在第1(d)圖所示的DMA轉移完成之後該被要 求的資料被該DMA控制器從該主記憶體送至該 CPU,及第2(b)圖顯示被該CPU要求存取且從一快 取或該主記憶體被送至該CPU之該資料的流向。 第3圖顯示被第1 (a)圖所示的D Μ A控制器所控制之資料塊 DB的一 DMA轉移的程序的例子。 第4圖顯示藉由第1 (a)圖所示的DMA控制器來dmA轉移一 資料塊DB的程序的一個例子。 第5 (a)至5 (d)圖顯示介於一主記憶體的記憶體位置之間的 一依據本發明的DMA轉移控制的另一實施例。第 5(a)圖顯示一系統架構的例子,第5(b)圖顯示在該 DMA轉移期間來自一 CPU的一存取要求訊號流,第 5(c)圖顯示當一 DMA命中被偵測到時被該CPU要求 的資料的一位址訊號從一 DMA命中偵測器轉移至 該DMA控制器,及第5(d)圖顯示由一 DMA控制器所 發出之一訊號流用來要求CPU再次嘗試存取該被 要求的資料。 經濟部智慧財產局員工消費合作社印製 第6(a)圖由該DMA控制器所發出的一訊號流,用以再此存 取該被要求的資料如第5(d)圖所示般地被要求時, 用來指示該主記憶體藉由暫時停止該CPU的存取 來將該被要求的資料DMA轉移至一快取或主記憶 體,第6(b)圖顯示在完成該被要求的資料的DMA轉 移之後,被該DMA控制器送至該CPU之經過DMA轉 移的該被要求的資料的流向,及第6(c)圖顯示當一 第8頁 本紙張尺度適用中國國家標準(CNS)A4規格(210x 297公釐) 1259955 A7 B7 五、發明説明( DM A命中沒有被偵測到時從該快取或主記憶體至 該CPU之該被要求的資料流。 第7圖顯示用來控制由示於第5(a)圖中的DMA控制器所實 施的DMA轉移的程序的一個例子。 第8(a)至第8(c)圖顯示介於一主記憶體的記憶體位置之間 的一依據本發明的DMA轉移控制的另一實施例。第 8(a)圖顯示一系統架構的例子,第8(b)圖顯示被 DMA控制器送至一緩衝器之該被DMA轉移的資料 流,第8(c)圖顯示一資料流其中該DMA命中偵測器 將貯存在第8(b)所示的該緩衝器内的資料轉移至該 CPU。 第9(a)至9(d)圖顯示一傳統的DMA轉移控制的實施例。第 9(a)圖顯示一系統架構的例子,第9(b)圖顯示用來 控制一 DMA轉移的訊號流,及第9(c)圖顯示從— DMA控制器至一 CPU的訊號流用來宣佈該DMA轉 移已經完成,及第9(d)圖顯示介於一 CPU與一快取 或主記憶體之間的存取。 第10(a)圖顯示一將被DMA轉移的資料塊的例子,及第i〇(b) 圖顯示在該DMA控制器内的一轉移計數器的數值 及一轉移位址的位置資訊及每一資料的狀態資 料。 第11圖顯示用示於第9(a)圖所示的DM A控制器來控制一 DMA轉移的程序的例子。 第12圖顯示用第9(a)圖中的DMA控制器來實施一資料塊的 第9頁 本紙張尺度適用中國國家標準(CNS)A4規格(210X297公釐) (請先閲讀背面之注意事項再填寫本頁} 裝. -訂· 經濟部智慧財產局員工消費合作社印製 1259955 _Li IIIIMWT1 I III ----—鼠 五、發明說明( A7 B7 t\mm i,a»—iM's·*·»taars «qgai·丨Μΐ«ι_·ιη 蝻 ........ ·ι · DMA轉移的程序的例子 對照說明: 70 中央處理單元(CPU) 72 快取單元 90 主記憶體 82 DMA控制器 80 糸統匯流排 74 附籤 76 快取 84 轉移計數器 86 轉移位址(暫存器) 10 設備(DMA控制器) 12 DMA命中偵測器 22 DMA命中偵測器 20 DMA控制器 經濟部智慧財產局員工消費合作 發明詳細說明: 接下來’ 一依據本發明之用來控制記憶體至記憶體 DMA轉移的方法及設備的實施例將參照附圖來加以詳細 祝明。在以下的實施例中,一記憶體至記憶體的DMA轉移 被實施於一主記憶體的記憶區之間。在示於附圖中的一資 料處理系統中,假設一 CPU70,一快取單元72,系統匯流 排80及主記憶體90與示於第9(a)圖中的傳統結構相似。此 外’亦假設一將被轉移的資料塊DB亦與示於第i 〇(a)圖中 的傳統資料塊相似。 一用來依據本發明地控制示於第1(a)至第圖中的 記憶體至記憶體DMA轉移的設備l〇(DMA控制器)包含一 DMA命中偵測器用以偵測一 CPU對於在一目的記憶體位 置上的資料的存取要求,該資料可能會被包括在一 DMA轉 . 第10頁 J Λ > - ~ 〇 «η wraiwi _____ 上.·加 tftttir··二·~ . 一rmniri: —ninn 尽紙張尺度適用中國國家標準(CNS)A,·, :210〉: 297公釐) (請先閱讀背面之注意事1再填寫本頁)The DATA7 at the destination address is accessed after S 1 90 ’ S 1 92 and S 1 92) are completed (S168). Since the CPU 70 cannot access D A T A 7 during the DMA transfer of DATA2 to DATA8, a latency is generated. One object of the present invention is to enable the CPU to apply the Chinese National Standard (CNS) A4 specification (210x297 mm) on page 6 of the DMA transfer. (Please read the note on the back and fill in this page.) Machi. Ministry of Economic Affairs Intellectual Property Bureau employee consumption cooperative printed 1259555 A7 B7, invention description ('hunting to shorten the CPU's dive time during DM A transfer. (Please read the back note first and then fill out this page) The method for controlling the memory-to-memory DMA transfer of the invention comprises the following steps: detecting a cpu requesting access to data included in a data ghost transferred by the DMA, and preferentially allowing the CPU to save during DMA transfer execution Taking the requested data. A device for controlling a DMA transfer according to the present invention includes: detecting a CPU requesting access to a material included in a data block transferred by the DMa; and performing the transfer in the DMA In the present invention, the CPU is allowed to access the requested data. In the present invention, the CPU can access the requested data before the DMA transfer is completed, regardless of whether the requested data has been DMA or not. Therefore, the time spent in the DMA transfer can be shortened for the cpu. Simple description: The Ministry of Economic Affairs Intellectual Property Office employee consumption cooperative printed the first (a) to 1 (d) figure shows An embodiment of the DMA transfer control according to the present invention between the memory locations of a main memory. The first diagram shows an example of a system architecture, and the first (b) diagram shows a control for the DMA transfer. The signal stream, the first (c) diagram shows the access request signal stream from a cpu, and the first (d) diagram shows the signal stream sent by the DMA controller for the DMA transfer data first requested by the CPU. 1259955 A7 B7 V. INSTRUCTIONS () C Please read the precautions on the back and fill out this page.) Figure 2(a) shows that the requested information is completed after the DMA transfer shown in Figure 1(d) is completed. The DMA controller sends the main memory to the CPU, and the second (b) diagram shows the flow of the data requested by the CPU and sent from the cache or the main memory to the CPU. The figure shows a procedure for a DMA transfer of the data block DB controlled by the D Μ A controller shown in Fig. 1(a) An example of Fig. 4 shows an example of a program for transferring a data block DB by dmA by the DMA controller shown in Fig. 1(a). Figs. 5(a) to 5(d) show a master between Another embodiment of the DMA transfer control in accordance with the present invention between the memory locations of the memory. Figure 5(a) shows an example of a system architecture, and Figure 5(b) shows one from during a DMA transfer. An access request for the CPU requires a stream of signals, and Figure 5(c) shows that an address signal of the data requested by the CPU is transferred from a DMA hit detector to the DMA controller when a DMA hit is detected. And Figure 5(d) shows that a signal stream sent by a DMA controller is used to request the CPU to attempt to access the requested data again. Ministry of Economic Affairs, Intellectual Property Office, Staff Consumer Cooperative, Prints a signal stream sent by the DMA controller in Figure 6(a) for accessing the requested data as shown in Figure 5(d) When requested, it is used to instruct the main memory to transfer the requested data to a cache or main memory by temporarily stopping the access of the CPU, and Figure 6(b) shows the completion of the request. After the DMA transfer of the data, the flow of the requested data transferred by the DMA controller to the CPU via DMA transfer, and Figure 6(c) shows that when the eighth page of the paper size is applied to the Chinese national standard ( CNS) A4 specification (210x 297 mm) 1259955 A7 B7 V. Description of invention (The requested data stream from the cache or main memory to the CPU when the DM A hit is not detected. Figure 7 shows An example of a program for controlling DMA transfer performed by the DMA controller shown in Fig. 5(a). Figures 8(a) through 8(c) show memory in a main memory Another embodiment of DMA transfer control in accordance with the present invention between locations. Figure 8(a) shows an example of a system architecture, 8th ( b) the figure shows the DMA-transferred data stream sent to the buffer by the DMA controller, and Figure 8(c) shows a data stream in which the DMA hit detector will be stored in the 8(b) The data in the buffer is transferred to the CPU. Figures 9(a) through 9(d) show an embodiment of a conventional DMA transfer control. Figure 9(a) shows an example of a system architecture, page 9 (b) The figure shows the signal flow used to control a DMA transfer, and the 9th (c) diagram shows the signal flow from the DMA controller to a CPU to announce that the DMA transfer has been completed, and the 9th (d) figure shows An access between a CPU and a cache or main memory. Figure 10(a) shows an example of a data block to be transferred by DMA, and an ith (b) diagram is displayed in the DMA controller. The value of a transfer counter and the position information of a transfer address and the status data of each data. Fig. 11 shows an example of a program for controlling a DMA transfer using the DM A controller shown in Fig. 9(a). Figure 12 shows the 9th page of the implementation of a data block using the DMA controller in Figure 9(a). This paper size applies to the Chinese National Standard (CNS) A4 specification (210X297 mm) ( Please read the notes on the back and fill out this page. Loading. -Settings · Ministry of Economic Affairs Intellectual Property Bureau Staff Consumer Cooperatives Printed 1259555 _Li IIIIMWT1 I III ----- Mouse 5, Invention Description (A7 B7 t\mm i, a»—iM's·*·»taars «qgai·丨Μΐ«ι_·ιη 蝻........ ·ι · Example of DMA transfer program comparison: 70 Central Processing Unit (CPU) 72 Cache unit 90 Main Memory 82 DMA Controller 80 汇 汇 74 74 Tab 76 Cache 84 Transfer Counter 86 Transfer Address (Scratchpad) 10 Device (DMA Controller) 12 DMA Hit Detector 22 DMA Hit Detector 20 DMA Controller Ministry of Economic Affairs Intellectual Property Office Staff Consumption Cooperation Invention Detailed Description: Next, an embodiment of a method and apparatus for controlling memory-to-memory DMA transfer according to the present invention will be described in detail with reference to the accompanying drawings. . In the following embodiments, a memory-to-memory DMA transfer is implemented between the memory areas of a main memory. In a data processing system shown in the drawings, it is assumed that a CPU 70, a cache unit 72, a system bus 80 and a main memory 90 are similar to the conventional structure shown in Fig. 9(a). In addition, it is assumed that a data block DB to be transferred is also similar to the conventional data block shown in the figure i(a). A device (DMA controller) for controlling memory-to-memory DMA transfer shown in Figures 1(a) to 1 according to the present invention includes a DMA hit detector for detecting a CPU pair A request for access to data at a destination memory location, which may be included in a DMA transfer. Page 10 J Λ > - ~ 〇«η wraiwi _____. plus tftttir······ Rmniri: —ninn Applicable to China National Standard (CNS) A,·, :210〉: 297 mm) (Please read the note on the back 1 and fill out this page)

B7 五'發明説明() (請先閲讀背面之注意事項再填窝本頁) 移中的資料塊内的資料所更新。該DMA控制器i 〇的作用是 讓該CPU存取將被寫入該目的位置之該被要求的資料優先 於執行中的DMA轉移。包含該DMA命中偵測器丨2的DMA 控制器1 0被連接於該C P U 7 0與該系統匯流排§ 〇之間。 該DMA命中偵測器12偵測該CPU是否要求存取尚未 被DMA轉移的資料,亦即,將被寫至一被cpu存取之目的 位置但尚未被DMA轉移的資料。當一 〇ΜΑ命中被偵測到 時’該DMA控制器10暫停該DMA轉移,然後將該被要求的 資料送至CPU70。 經濟部智慧財產局員工消費合作社印製 與傳統的DMA控制器相同地,DMA控制器1〇包含一轉 移計數器84及一轉移位址暫存器86。該DMA命中偵測器12 可從該轉移計數器84及一轉移位址暫存器86處知道尚未 被DMA轉移的資料的目的地。將被該CPU70所存取的資料 的位址被送至該快取單元72及該DMA控制器1〇。該DMA 命中偵測器1 2比較被該CPU70所要求的資料(以下稱為被 要求的資料)的位址及尚未被DMA轉移的資料的目的地位 址用以偵測兩者是否相符。當被要求的資料的位址與該目 的地位址相符時,則該位址在下文中被稱為"DMA命中π。 當一 CPU存取要求發生時,以ADi及Ci來分別代表在轉移 位址暫存器86内的目的地位址及在轉移計數器84内的計 數及ADcpu代表被CPU所要求的資料的位址,一 DMA命中 會在(ADi)<(ADcpu)<(ADi + Cj)時發生。應注意的是,在轉 移位址暫存器86内的資料塊位址是依照順序的。 當一 DMA命中被偵測到時,其意謂著該被要求的資料 第11頁 本紙張尺度適用中國國家標準(CNS)A4規袼(210X297公釐) 1259955 五、發明説明() 的DMA轉移尚未完成。該DMA控制器1〇暫停執行中的一資 料塊的DMA轉移並實施該被要求的資料的dma轉移。在該 被要求的資料的DMA轉移完成之後,DMA控制器10將該被 要求的資料從該來源位置送至該CPU70。然後,該被暫停 的DM A轉移藉由諮詢該轉移計數器84及轉移位址暫存器 8 6而被重新開始。 當一 DMA命中沒有被偵測到時,該被要求的資料的 DMA轉移則已被完成。在此情形中,CPU70可存取該被要 求的資料,即使是一資料塊的DMA轉移尚未完成亦然。 CPU70經由快取單元72存取該快取76或主記憶體9〇以獲得 該被要求的資料。其結果為,無論DMA命中是否被偵測 到,CPU皆可在DMA下存取該被要求的資料且無需等待 DMA轉移的完成。 接下來,使用此DMA控制器10的一 DMA轉移控制將被 說明。 第3圖顯示用來控制一 DMA轉移的程序的一個例子。 假設該DM A控制器1 0開始示於第1 (b)圖所示的一資料塊 的DMA轉移(S160)之後,CPU70要求存取資料(S162)。然 後該被要求的資料DATAn的位址ADn從CPU70被送至該 DMA控制器1〇及快取單元72,如第l(c)圖所示。在該DMA 控制器10中,該DMA命中偵測器12檢查DMA命中是否被偵 測到(S11〇)。B7 Five 'Invention Description () (Please read the note on the back and fill in the page) The information in the moved block is updated. The role of the DMA controller i is to have the CPU access the requested data to be written to the destination location prior to the DMA transfer in progress. A DMA controller 10 including the DMA hit detector 丨2 is connected between the C P U 70 and the system bus § 。. The DMA hit detector 12 detects whether the CPU requires access to data that has not been DMA-transferred, i.e., will be written to a destination that was accessed by the cpu but not yet transferred by the DMA. When a hit is detected, the DMA controller 10 suspends the DMA transfer and then sends the requested data to the CPU 70. Printed by the Intellectual Property Office of the Ministry of Economic Affairs, the Consumer Consortium. Similarly to the conventional DMA controller, the DMA controller 1 includes a shift counter 84 and a transfer address register 86. The DMA hit detector 12 can know the destination of the data that has not been DMA transferred from the transfer counter 84 and a branch address register 86. The address of the material accessed by the CPU 70 is sent to the cache unit 72 and the DMA controller 1A. The DMA hit detector 12 compares the address of the data requested by the CPU 70 (hereinafter referred to as the requested data) with the destination address of the data that has not been transferred by the DMA to detect whether the two match. When the address of the requested material matches the destination address of the destination, the address is hereinafter referred to as "DMA hit π. When a CPU access request occurs, the destination address in the transfer address register 86 and the count in the transfer counter 84 and the address of the data requested by the CPU are represented by ADi and Ci, respectively. A DMA hit will occur at (ADi) <(ADcpu)<(ADi + Cj). It should be noted that the data block addresses within the transfer address register 86 are in order. When a DMA hit is detected, it means that the requested data is on page 11 of this paper scale applicable to China National Standard (CNS) A4 (210X297 mm) 1259955 V. DMA transfer of invention description () Not completed. The DMA controller 1 pauses the DMA transfer of a block of material in execution and performs a dma transfer of the requested material. After the DMA transfer of the requested material is completed, the DMA controller 10 sends the requested material from the source location to the CPU 70. The suspended DM A transfer is then resumed by consulting the transfer counter 84 and the transfer address register 86. When a DMA hit is not detected, the DMA transfer of the requested data has been completed. In this case, the CPU 70 can access the requested data even if the DMA transfer of a data block has not been completed. The CPU 70 accesses the cache 76 or the main memory 9 via the cache unit 72 to obtain the requested material. As a result, regardless of whether a DMA hit is detected, the CPU can access the requested data under the DMA without waiting for the completion of the DMA transfer. Next, a DMA transfer control using this DMA controller 10 will be explained. Figure 3 shows an example of a program for controlling a DMA transfer. Assuming that the DM A controller 10 starts to display the DMA transfer of a data block as shown in the first (b) (S160), the CPU 70 requests access to the data (S162). The address ADn of the requested data DATAn is then sent from the CPU 70 to the DMA controller 1 and the cache unit 72 as shown in Fig. 1(c). In the DMA controller 10, the DMA hit detector 12 checks if a DMA hit is detected (S11).

當一 DMA命中被偵測到時,該DMA控制器10暫停執行 中之該資料塊的DMA轉移,並實施該被要求的資料的DMA 第12頁 本紙張尺度適用中國國家標準(CNS)A4規袼(210X297公楚) (請先閲讀背面之注意事項再填寫本頁) ^J· 線 經濟部智慧財產局員工消費合作社印製 1259955 A7 B7 五、發明説明() (請先閱讀背面之注意事項再塡寫本頁) 轉移(S 1 1 4),如第1 (d)圖所示。當一 DMA命中被偵測到時, DMA控制器1 〇優先使用該系統匯流排。在被要求的資料的 〇^1八轉移完成之後,控制器10將被要求的資料(〇八丁八11)從 主記憶體90的來源位置送至CPlj7〇(S 1 1 6),如第2(a)圖所 示’然後重新開始被暫停的DMA轉移(S 124)。 當一 DMA命中沒有被偵測到時,該dmA控制器10暫停 執行中之資料的DMA轉移(S1 13)。如第2(b)圖所示的, CPU70被允許經由快取單元72存取快取記憶體76或主記憶 體90(S1 18)。在CPU70存取完該被要求的資料之後,控制 器10重新開始該被暫停的資料塊的DMA轉移(S 124)。 當包含在該資料塊内的所有資料都被轉移時 (8164),該〇乂八控制器1〇送出一訊號告知〇?1;700%八轉移 已完成(S166)。 例如,如第4圖所示的,假設一 DMA轉移被開始(S 160) 及DATA1的一DMA轉移被完成(S180),CPU70要求存取 DATA7(S162)。該DMA控制器1〇暫停執行中的資料塊的 DMA轉移(SU2)並優先實施dATA7的一 〇ΜΑ轉移 (S1 20)。在該例子中,轉移計數器84的數值為”7,,且轉移位 經濟部智慧財產局員工消費合作社印製 址暫存器86貯存該DMA轉移在暫停時之位置資訊”ad2, AD2,’。 在DATA7的DMA轉移完成之後,DMA控制器1〇將 DATA7送至CPU70(S122),然後重新開始被暫停的資料塊 DB 的 DMA轉移(S124)。當 〇ΑΤΑ2 至 DATA8 的一連串 DMA 轉移被完成時(S182,S184,S186,S188,S190,S192 及 第13頁 本紙張尺度適用中國國家標準(CNS)A4規格(210X297公釐) A7When a DMA hit is detected, the DMA controller 10 suspends the DMA transfer of the data block in execution and implements the DMA of the requested data. The 12th page of the paper scale applies the Chinese National Standard (CNS) A4 specification.袼(210X297公楚) (Please read the notes on the back and fill out this page) ^J· Ministry of Economic Affairs, Intellectual Property Office, Staff and Consumer Cooperatives Printed 1259555 A7 B7 V. Inventions () (Please read the notes on the back first) Write this page again) Transfer (S 1 1 4) as shown in Figure 1 (d). When a DMA hit is detected, the DMA controller 1 preferentially uses the system bus. After the transfer of the requested data is completed, the controller 10 sends the requested data (〇八丁八11) from the source location of the main memory 90 to CPlj7〇 (S 1 16), as in the first 2(a) shows the figure 'and then restarts the suspended DMA transfer (S 124). When a DMA hit is not detected, the dmA controller 10 suspends the DMA transfer of the data in execution (S1 13). As shown in Fig. 2(b), the CPU 70 is allowed to access the cache memory 76 or the main memory 90 via the cache unit 72 (S1 18). After the CPU 70 has accessed the requested material, the controller 10 restarts the DMA transfer of the suspended data block (S 124). When all the data contained in the data block has been transferred (8164), the 控制器8 controller 1 sends a signal to inform 11; 700% eight transfer has been completed (S166). For example, as shown in Fig. 4, assuming that a DMA transfer is started (S 160) and a DMA transfer of DATA1 is completed (S180), the CPU 70 requests access to DATA 7 (S162). The DMA controller 1 suspends the DMA transfer (SU2) of the data block in execution and preferentially implements a transfer of dATA7 (S1 20). In this example, the value of the transfer counter 84 is "7", and the transfer position of the Ministry of Economic Affairs Intellectual Property Office employee consumption cooperative print address register 86 stores the position information of the DMA transfer at the time of suspension "ad2, AD2,". After the DMA transfer of DATA7 is completed, the DMA controller 1 sends DATA7 to the CPU 70 (S122), and then restarts the DMA transfer of the suspended data block DB (S124). When a series of DMA transfers from 〇ΑΤΑ2 to DATA8 are completed (S182, S184, S186, S188, S190, S192 and 13) This paper size applies to the Chinese National Standard (CNS) A4 specification (210X297 mm) A7

經濟部智慧財產局員工消費合作社印製 1259955 五、發明説明() S194) , DMA控制器1〇送出一訊號告知cpU7〇該資料塊 的DMA轉移已完成(S166)。 當DATA2至DATA8被DMA轉移時,CPU70可使用 DATA7實施一操作。在第4圖所示的一例子中,datA7的 DMA轉移再次於步驟S192中被實施,這並不會有問題因為 CPU70只諮詢DATA7。第i圖所示的系統可以一包含一 CPU,快取單元及DMA控制器的單一處理器來實施。 雖然本發明的一實施例以被描述,但本發明仍可以其 E實施例來實施。例如,如第5(昀圖所示的,該DMA命中 债測器22可被連接於CPU70與系統匯流排8〇之間,且dMA 控制器2 0可經由系統匯流排8 〇而被連接於c p u 7 〇與主記憶 體90之間。該DMA命中偵測器22藉由諮詢在DMA控制器20 中 < 轉移計數器84及轉移位址暫存器86來偵測一 dMa命 中 〇 當一 DMA命中被偵測到時,DMA控制器20讓CPU70 再次嘗試存取在目的位置處之該被要求的資料。該DMA控 制器20暫停一執行中之資料塊的dMa轉移並將該被要求 的資料加以DMA轉移直到該CPU70再次存取該被要求的 資料為止。在CPU70存取該經過DM A轉移之被要求的資料 之後’ DMA控制器20重新開始該被暫停的資料塊的DMA 轉移。 第7圖顯示用來控制一 dmA轉移的程序的一個例子。 如第5(b)圖所示的,當CPU70該DMA控制器20開始一資料 塊的DMA轉移(S 160)之後要求存取在目的位置處的資料 第14頁 本紙張尺度適用中國國家標準(CNS)A4規格(210X297公釐) (請先閲讀背面之注意事項再填寫本頁) 裝. -訂· 1259州五、發明説明() A7 B7 時’該被要求的資料〇八丁八11的位址八〇11從€?1170被送至該 DMA命中偵測器22及快取單元72。藉由諮詢在DMA控制器 20中之轉移計數器84及轉移位址暫存器86來偵測一 DMA 命中。 當DMA命中被偵測到時,偵測器22將該被要求的資料 的位址ADn經由系統匯流排80送至DMA控制器20(S 1 30), 如第5 (c)圖所示。在此例子中,該被要求的資料為尚未被 DMA轉移的資料。DMA控制器20在接收到來自於偵測器22 的位址ADn之後,其要求CPU70暫時停止存取該被要求的 資料(S13 2),如第5(d)圖所示。CPU70暫時停止存取該被 要求的資料,並在一預定的時間過後,CPU70再度存取該 被要求的資料。當CPU70暫時停止存取該資料時,〇ΜA控 制器2 0暫停正在執行中的一資料塊的d Μ A轉移(S 1 1 2),如 第6(a)圖所示並實施該被要求的資料DAT An的DMA轉移 (S134)。 當CPU70再度存取在目的位址處的資料時,該資料已 被經過DMA轉移的資料所更新。如第6(b)圖所示的,在 CPU70存取DATAn之後(S136),〇ΜΑ控制器20重新開始該 請 先 閲 讀 背 面 之 注 意 事 .項 再Ministry of Economic Affairs Intellectual Property Bureau employee consumption cooperative printing 1259955 V. Invention description () S194), the DMA controller sends a signal to inform cpU7 that the DMA transfer of the data block has been completed (S166). When DATA2 to DATA8 are transferred by DMA, CPU 70 can perform an operation using DATA7. In an example shown in Fig. 4, the DMA transfer of datA7 is again implemented in step S192, which is not a problem because the CPU 70 only consults DATA7. The system shown in Fig. i can be implemented by a single processor including a CPU, a cache unit and a DMA controller. Although an embodiment of the present invention has been described, the present invention can be implemented by its E embodiment. For example, as shown in FIG. 5 (the figure, the DMA hits the debt detector 22 can be connected between the CPU 70 and the system bus 8 ,, and the dMA controller 20 can be connected to the system bus 8 〇 Between the CPU 7 and the main memory 90, the DMA hit detector 22 detects a dMa hit as a DMA by consulting the < transfer counter 84 and the transfer address register 86 in the DMA controller 20. When the hit is detected, the DMA controller 20 causes the CPU 70 to attempt to access the requested data at the destination again. The DMA controller 20 suspends the dMa transfer of an executing data block and the requested data. The DMA transfer is performed until the CPU 70 accesses the requested data again. After the CPU 70 accesses the requested data transferred via the DM A, the DMA controller 20 restarts the DMA transfer of the suspended data block. The figure shows an example of a program for controlling a dmA transfer. As shown in FIG. 5(b), when the CPU 70 starts the DMA transfer (S 160) of a data block, the CPU 70 requests access at the destination. Information on page 14 of this paper scale applies to China Standard (CNS) A4 specification (210X297 mm) (Please read the note on the back and fill out this page) Loading. - Booking · 1259 State V. Invention Description () A7 B7 'The requested information is 八八八The address of the address 11 of the eleven is sent from the € 1170 to the DMA hit detector 22 and the cache unit 72. The inquiry is made by consulting the transfer counter 84 and the transfer address register 86 in the DMA controller 20. The DMA hit is detected. When the DMA hit is detected, the detector 22 sends the requested address of the data ADn to the DMA controller 20 via the system bus 80 (S 1 30), as in the fifth (c In the example, the requested data is data that has not been transferred by DMA. After receiving the address ADn from the detector 22, the DMA controller 20 requests the CPU 70 to temporarily stop accessing the data. The requested data (S13 2) is as shown in Fig. 5(d). The CPU 70 temporarily stops accessing the requested data, and after a predetermined time, the CPU 70 re-accesses the requested data. When the access to the data is temporarily stopped, the controller A 20 suspends the d Μ A transfer of a data block being executed (S 1 1 2), such as Figure 6(a) shows and implements the DMA transfer of the requested data DAT An (S134). When the CPU 70 re-accesses the data at the destination address, the data has been updated by the DMA-transferred data. As shown in Fig. 6(b), after the CPU 70 accesses the DATAn (S136), the UI controller 20 restarts the reading of the back side.

Order

經 濟 部 智 慧 財 產 局 員 工 消 合 作 社 印 制 被暫停的資料塊的DMA轉移(S 124)。當包括在該資料塊内 的所有資料都被DMA轉移時(S 164),DMA控制器20送出一 訊號告知CPU70DMA轉移已完成(S166)。 在第7圖中,當DM A命中沒有被偵測到時,CPU70經 由快取單元7 2存取快取7 6或主記憶體9 0,如第6 (c)圖所 示。在此情形中,DMA控制器20暫停正在執行中的資料塊The DMA transfer of the suspended data block is printed by the employee of the Ministry of Economic Affairs, Finance and Welfare Bureau (S 124). When all the data included in the data block is transferred by DMA (S164), the DMA controller 20 sends a signal to inform the CPU 70 that the DMA transfer has been completed (S166). In Fig. 7, when the DM A hit is not detected, the CPU 70 accesses the cache 76 or the main memory 90 via the cache unit 72, as shown in Fig. 6(c). In this case, the DMA controller 20 suspends the data block being executed.

1259955 五、發明説明() (請先間讀背面之注意事項再填寫本頁) 的DMA轉移(S1 13)。然後當CPU70完成該被要求的資料的 存取時(S1 18),該被暫停的資料塊的DMA轉移即被重新開 始(S124)。 如在第4圖所示p程序中,即使在CPU70在一 DMA轉 移被開始(S 160)且DATA 1的DM A轉移已完成之後要求存 取DATA7(S 162),DATA7的DMA轉移亦可被首先實施。雖 然DATA2至DATA8正在被DMA轉移中,但CPU可使用 DATA7來實施一操作。示於第5(a)圖中的系統可以一包含 一 CPU,快取單元及DMA控制器的單一處理器來實施。 如第8(a)圖所示的,一緩衝器34可被連接至該DMA命 中偵測器32。在該CPU70存取該被要求的資料之後,被偵 測為一 DMA命中的資料或資料塊被暫時貯存在該緩衝器 34内。當該CPU70再度存取貯存在該緩衝器34内的資料 時,DM A命中偵測器32將貯存在緩衝器34内的資料送至 CPU70。如此,緩衝器34可減少重復要求的次數。 線 經濟部智慧財產局員工消費合作社印製 雖然本發明的實施例已被說明,但應被瞭解的是本發 明並不侷限於上述的實施例。例如,雖然在主記憶體内的 記憶體區之間的記憶體至記憶體的DMA轉移在本說明書 中加以描述,但本發明亦可被應用在連接至一系統匯流排 之任何高速記憶體之間的記憶體至記憶體的轉移上。而 且,在參照第1圖至第4圖所描述之被要求的資料從一來源 位置被送至CPU的系統中,第3圖中的步驟S 1 1 4可被省 略。熟悉此技藝者在不偏離本發明的範圍下可對上述的實 施例作出許多的變化,修改,及其它的用途與應用。 第16頁 本紙張尺度適用中國國家標準(CNS)A4規袼(2丨0X297公釐) 1259955_1259955 V. DMA transfer (S1 13) of the invention description () (please read the back of the note first and then fill out this page). Then, when the CPU 70 completes the access of the requested material (S1 18), the DMA transfer of the suspended data block is restarted (S124). As in the p program shown in Fig. 4, even if the CPU 70 requests access to DATA7 (S162) after a DMA transfer is started (S160) and the DM A transfer of DATA1 has been completed, the DMA transfer of DATA7 can be First implemented. Although DATA2 to DATA8 are being transferred by DMA, the CPU can use DATA7 to perform an operation. The system shown in Figure 5(a) can be implemented as a single processor including a CPU, a cache unit and a DMA controller. As shown in Figure 8(a), a buffer 34 can be coupled to the DMA hit detector 32. After the CPU 70 accesses the requested material, the data or data block detected as a DMA hit is temporarily stored in the buffer 34. When the CPU 70 re-accesses the data stored in the buffer 34, the DM A hit detector 32 sends the data stored in the buffer 34 to the CPU 70. As such, the buffer 34 can reduce the number of repetitions required. LINE INTELLIGENT INTELLECTUAL PROPERTY AGENCY WORKING COOPERATION CO., LTD. Although an embodiment of the present invention has been described, it should be understood that the present invention is not limited to the embodiments described above. For example, although memory-to-memory DMA transfer between memory regions in the main memory is described in this specification, the present invention can also be applied to any high-speed memory connected to a system bus. The transfer of memory to memory. Moreover, the requested data described with reference to Figs. 1 to 4 is sent from a source location to the system of the CPU, and step S 1 1 4 in Fig. 3 can be omitted. Many variations, modifications, and other uses and applications of the above-described embodiments can be made by those skilled in the art without departing from the scope of the invention. Page 16 This paper scale applies to China National Standard (CNS) A4 regulations (2丨0X297 mm) 1259955_

vTvT

•dI 六、申請專利範圍 4 (請先《讀背面之注意寧項再填寫本頁) 1·一種控制一 DMA(直接存取記憶體)控制器實施一資料處 理系統中的記憶體至記憶體DMA轉移的方法,該資料處 理系統包括一主記憶體其經由一系統匯流排連接至一 CPU(中央處理單元)’該方法至少包含以下的步驟: 偵測步驟,其係用以偵測對於存取包括在一正被 DMA轉移的資料塊内之資料的一 cpu要求;及 允許步驟,其係用以在該DMA轉移的執行中,優先 允許該CPU存取該被要求的資料。 2·如申請專利範圍第1項所述之方法,其中 該彳貞測步驟包含偵測該被要求的資料是否已經被 DMA轉移;及 該允許步驟包含: 一第一步驟,其允許該CPU存取該被要求的資 料’如果該被要求的資料已被DMA轉移的話;及 一第二步驟,其暫停該DMA轉移用以優先允許該 CPU存取該被要求的資料,如果該被要求的資料尚未 被DMA轉移的話。 經濟部智慧財產局員工消費合作社印製 3·如申請專利範圍第2項所述之方法,其中該DMA控制器 包含: 一第一暫存器,用來貯存尚未被DM A轉移的資料的 數目;及 一第二暫存器,用來貯存DMA貯存中之資料的位 第17頁 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)• dI VI. Patent Application No. 4 (Please read the back of the note and fill in this page) 1. A control DMA (direct access memory) controller implements a memory-to-memory in a data processing system A method for DMA transfer, the data processing system includes a main memory connected to a CPU (Central Processing Unit) via a system bus. The method includes at least the following steps: a detecting step for detecting a memory Taking a cpu request including data in a data block being transferred by DMA; and an enabling step for preferentially allowing the CPU to access the requested data during execution of the DMA transfer. 2. The method of claim 1, wherein the detecting step comprises detecting whether the requested data has been transferred by DMA; and the allowing step comprises: a first step of allowing the CPU to save Taking the requested data 'if the requested data has been transferred by DMA; and a second step of suspending the DMA transfer to preferentially allow the CPU to access the requested data if the requested data Has not been transferred by DMA. Printed by the Intellectual Property Office of the Ministry of Economic Affairs, Employees' Consumer Cooperatives. 3. The method of claim 2, wherein the DMA controller comprises: a first register for storing the number of data that has not been transferred by the DM A And a second register for storing the data in the DMA storage. Page 17 This paper size applies to the Chinese National Standard (CNS) A4 specification (210 X 297 mm).

Claims (1)

1259955 A8 B8 C8 D8 六、申請專利範圍 址;及該偵測步驟包含: (請先«讀背面之注意事項再填寓本頁) 比較該被要求的資料的位址與從該第一及第二暫 存器獲得之尚未被DMA轉移的資料的位址用以決定 是否相符。 4. 如申請專利範圍第2或3項所述之方法,其中該DMA控制 器被連接於該CPU與該系統匯流排之間,且該第二步驟 包含: 讓該DMA控制器將該被要求的資料送至該CPU ;及 重新開始被暫停的DMA轉移。 5. 如申請專利範圍第2或3項所述之方法,其中該DMA控制 器經由該系統匯流排而被連接於該CPU與主記憶體之 間,且該第二步驟包含: 要求該CPU再次存取該尚未被DMA轉移的資料; 暫停執行中之DMA轉移用以DMA轉移該被要求的資 料直到該CPU再度存取該資料為止;及 在該CPU存取該尚未被DMA轉移的資料之後,重新 開始該被暫停的DMA轉移。 經濟部智慧財產局員工消費合作社印製 6 · —種控制在一資料處理系統中的記憶體至記憶體DM A 轉移的設備,該資料處理系統包括一主記憶體其經由一 系統匯流排連接至一 CPU,該設備至少包含: 偵測機構,其係用以偵測對於存取包括在一正被 第18頁 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 1259955 A8 B8 C8 D8 經濟部智慧財產局員工消費合作社印製 六、申請專利範圍 D Μ A轉移的資料塊内之資料的一 C P U要求;及 允許機構件,其係用以在該DMA轉移的執行中,優 先允許該CPU存取該被要求的資料。 7 ·如申請專利範圍第6項所述之設備,其中該偵測機構包括 用以偵測該被要求的資料是尚未被DMA轉移的資料的 機構及該允許機構包括: . ··優先地DMA轉移該被要求的資料的機構;及 允許該CPU存取該已被DMA轉移的資料的機構。 8·如申請專利範圍第7項所述之設備,其更包含: 一第一暫存器,用來貯存尚未被DM A轉移的資料的 數目;及 一第二暫存器,用來貯存DM A貯存中之資料的位 址’其中該偵測機構包括比較該被要求的資料的位址與 從該第一及第二暫存器獲得之尚未被DM A轉移的資料 的位址用以決定是否相符的機構。 9·如申請專利範圍第6_8項中任何一項所述之設備,其中該 債測機構及允許機構係被連接於該cpu與該系統匯流 排之間。 10·如申請專利範圍第6_8項中任何一項所述之設備,其中 該積測機構係被連接於該cpu與該系統匯流排之間及 第19頁 (請先«讀背面之注意事項再填寓本頁) # 丨訂- ,線- 本紙張尺度適用中國國家標準(CNS)A4規格(21〇 X 297公爱) 六 間 1259955 Μ C 8 D8 申請專利範圍 該允許機構係經由該系統匯流排而被連接於該CPU與 該主a己憶體之間。 J .如申請專利範圍第1 〇項所述之設備,其中該偵測機構包 含/缓衝記憶體,用來暫時辟存被偵測為尚未被DMA轉 移的資料之資料。 如申請專利範圍第6-8項中任何一項所述之設備’其中 一快取記憶體被連接於該CPU與該系統酿流排< ...........:¥裝· (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 第20頁 本紙張尺度適用中國國家標準(CNS)A4規格(210x297公釐)1259955 A8 B8 C8 D8 VI. The scope of the patent application; and the detection steps include: (Please read the note on the back and fill in the page) Compare the address of the requested information with the first and the first The address of the data obtained by the second register that has not been transferred by the DMA is used to determine whether the match is met. 4. The method of claim 2, wherein the DMA controller is coupled between the CPU and the system bus, and the second step comprises: having the DMA controller request the The data is sent to the CPU; and the DMA transfer is resumed. 5. The method of claim 2, wherein the DMA controller is connected between the CPU and the main memory via the system bus, and the second step comprises: requiring the CPU to be again Accessing the data that has not been transferred by the DMA; suspending the DMA transfer during execution to DMA transfer the requested data until the CPU accesses the data again; and after the CPU accesses the data that has not been transferred by the DMA, Restart the suspended DMA transfer. Ministry of Economic Affairs, Intellectual Property Office, Staff Consumer Cooperative, printed on a device that controls the transfer of memory to memory DM A in a data processing system, the data processing system including a main memory connected to the system via a system bus A CPU, the device comprising at least: a detection mechanism for detecting access to a paper size that is being applied to the 18th page of the Chinese National Standard (CNS) A4 specification (210 X 297 mm) 1259955 A8 B8 C8 D8 Ministry of Economic Affairs Intellectual Property Office Employees Consumption Cooperatives Printing VI. Applying for a patent range D Μ A A CPU requirement for the data in the data block transferred; and allowing the machine component to be used in the execution of the DMA transfer, The CPU is preferentially allowed to access the requested data. 7. The device of claim 6, wherein the detecting means includes means for detecting that the requested material is data that has not been transferred by DMA, and the permitting mechanism comprises: • Priority DMA The institution that transfers the requested data; and the institution that allows the CPU to access the data that has been transferred by the DMA. 8. The device of claim 7, further comprising: a first register for storing the number of data that has not been transferred by the DM A; and a second register for storing the DM The address of the data in the storage A, wherein the detecting means includes comparing the address of the requested data with the address of the data obtained from the first and second temporary registers that has not been transferred by the DM A to determine Whether it is consistent with the institution. 9. The apparatus of any of claims 6-8, wherein the debt testing mechanism and the permitting mechanism are connected between the cpu and the system bus. 10. The device of any one of claims 6-8, wherein the integration mechanism is connected between the cpu and the system bus and on page 19 (please first read the back note) Fill in this page) # 丨定- ,线 - This paper scale applies to China National Standard (CNS) A4 specification (21〇X 297 public) Six 1259955 Μ C 8 D8 Patent application scope The allowed mechanism is connected via the system It is connected between the CPU and the main a memory. J. The device of claim 1, wherein the detection mechanism includes/buffer memory for temporarily storing data that is detected as data that has not been transferred by the DMA. The device of any one of claims 6-8, wherein one of the cache memories is connected to the CPU and the system is brewing < .....: ¥ Loading · (Please read the notes on the back and fill out this page) Ministry of Economic Affairs Intellectual Property Bureau Staff Consumer Cooperative Printed on page 20 This paper scale applies to China National Standard (CNS) A4 specification (210x297 mm)
TW091103874A 2001-03-09 2002-03-01 DMA transfer controlling method and apparatus TWI259955B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001067342A JP4204759B2 (en) 2001-03-09 2001-03-09 DMA transfer control method and control apparatus

Publications (1)

Publication Number Publication Date
TWI259955B true TWI259955B (en) 2006-08-11

Family

ID=18925709

Family Applications (1)

Application Number Title Priority Date Filing Date
TW091103874A TWI259955B (en) 2001-03-09 2002-03-01 DMA transfer controlling method and apparatus

Country Status (5)

Country Link
JP (1) JP4204759B2 (en)
KR (1) KR100602330B1 (en)
CN (1) CN1300715C (en)
TW (1) TWI259955B (en)
WO (1) WO2002073431A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9141572B2 (en) 2006-12-15 2015-09-22 Microchip Technology Incorporated Direct memory access controller

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006059303A (en) * 2004-08-24 2006-03-02 Oki Electric Ind Co Ltd Computer system
JP4990262B2 (en) * 2008-12-26 2012-08-01 三菱電機株式会社 Buffer device
JP6289689B1 (en) * 2017-01-27 2018-03-07 三菱電機株式会社 Memory control device and computer system
CN112506437A (en) * 2020-12-10 2021-03-16 上海阵量智能科技有限公司 Chip, data moving method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2607073B2 (en) * 1986-09-30 1997-05-07 松下電器産業株式会社 Arithmetic processing unit
JP3602293B2 (en) * 1997-04-22 2004-12-15 株式会社ソニー・コンピュータエンタテインメント Data transfer method and device
JPH11184799A (en) * 1997-12-19 1999-07-09 Toshiba Corp Method for transferring memory data and device therefor
JP3206568B2 (en) * 1998-10-28 2001-09-10 日本電気株式会社 DMA control method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9141572B2 (en) 2006-12-15 2015-09-22 Microchip Technology Incorporated Direct memory access controller
US9921985B2 (en) 2006-12-15 2018-03-20 Microchip Technology Incorporated Direct memory access controller

Also Published As

Publication number Publication date
JP2004145376A (en) 2004-05-20
WO2002073431A1 (en) 2002-09-19
CN1300715C (en) 2007-02-14
CN1494684A (en) 2004-05-05
JP4204759B2 (en) 2009-01-07
KR100602330B1 (en) 2006-07-14
KR20040012727A (en) 2004-02-11

Similar Documents

Publication Publication Date Title
US7127567B2 (en) Performing memory RAS operations over a point-to-point interconnect
EP1396792A1 (en) Memory copy command specifying source and destination of data executed in the memory controller
TWI241589B (en) Real time processing method of a flash memory
JPH01109466A (en) System for controlling parallel operation of coprocessor
EP1288785A2 (en) Method and interface for improved efficiency in performing bus-to-bus read data transfers
JP2695017B2 (en) Data transfer method
JPH06222992A (en) Cache system and method for control of cache controller
TWI259955B (en) DMA transfer controlling method and apparatus
JP3759193B2 (en) Atomic operation bus system
JP3600536B2 (en) Method and system for limiting corruption of write data and PCI bus system
GB2237421A (en) Interface register handshake for controlling devices
JPH08147115A (en) Document processor
US20070168646A1 (en) Data exchange between cooperating processors
KR100348808B1 (en) Device for transmitting data between memories
JP3940701B2 (en) Disk array device and cache matching control method applied to the same
US20240354248A1 (en) Data transfer using coherent doorbell updates
JP3162459B2 (en) Data processing device
JPH10198644A (en) Synchronous control method and multi-processor system
JPWO2002073431A1 (en) DMA transfer control method and control device
KR100636817B1 (en) The graphic execution device for reducing the transaction with the system bus
JP3299147B2 (en) Cache control circuit
JP2022122677A (en) Information processor and method for controlling information processor
JP2506975B2 (en) Buffer invalidation processing method of information processing device
JPS59212960A (en) Prefetch control system
JP2005250988A (en) Pseudo i/o device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees