[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

TWI720565B - Memory controller and data storage device - Google Patents

Memory controller and data storage device Download PDF

Info

Publication number
TWI720565B
TWI720565B TW108126973A TW108126973A TWI720565B TW I720565 B TWI720565 B TW I720565B TW 108126973 A TW108126973 A TW 108126973A TW 108126973 A TW108126973 A TW 108126973A TW I720565 B TWI720565 B TW I720565B
Authority
TW
Taiwan
Prior art keywords
memory
internal
bus
processing unit
central processing
Prior art date
Application number
TW108126973A
Other languages
Chinese (zh)
Other versions
TW201941071A (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 TW108126973A priority Critical patent/TWI720565B/en
Publication of TW201941071A publication Critical patent/TW201941071A/en
Application granted granted Critical
Publication of TWI720565B publication Critical patent/TWI720565B/en

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

A memory controller coupled to an external memory device for controlling the operations thereof. The memory controller comprises a central processing unit, an interface logic circuit and an arbiter circuit. The central processing unit comprises an internal memory device. The interface logic circuit is coupled to the external memory device and a standard bus. The arbiter circuit is directly coupled to the central processing unit via a static random access memory bus. When the central processing unit has to read predetermined data stored in the external memory device, the central processing unit issues a first request to the interface logic circuit. In response to the first request, the interface logic circuit reads the predetermined data from the external memory device and transmits the predetermined data to the arbiter circuit via the standard bus. The arbiter circuit transfers the predetermined data directly to the central processing unit via the static random access memory bus to write the predetermined data in the internal memory device.

Description

記憶體控制器與資料儲存裝置Memory controller and data storage device

本發明係關於一種資料處理電路,特別是關於一種可有效改善系統效能之資料處理電路。The present invention relates to a data processing circuit, in particular to a data processing circuit that can effectively improve system performance.

隨著資料儲存裝置的科技在近幾年快速地成長,許多資料儲存裝置,如符合SD/MMC規格、CF規格、MS規格與XD規格的記憶卡、固態硬碟、內嵌式記憶體(embedded Multi Media Card,縮寫為eMMC)以及通用快閃記憶體(Universal Flash Storage,縮寫為UFS)已經廣泛地被應用在多種用途上。因此,在這些資料儲存裝置上,有效的存取控制也變成一個重要的議題。As the technology of data storage devices has grown rapidly in recent years, many data storage devices, such as memory cards that comply with SD/MMC specifications, CF specifications, MS specifications, and XD specifications, solid state drives, and embedded memory (embedded Multi Media Card, abbreviated as eMMC) and Universal Flash Storage (abbreviated as UFS) have been widely used in a variety of applications. Therefore, effective access control has also become an important issue on these data storage devices.

為了增進記憶體裝置的存取效能,本發明提出一種新的記憶體控制器架構,不僅可節省電路面積,也可節省資料存取所需的時間,有效改善系統效能。In order to improve the access performance of the memory device, the present invention proposes a new memory controller architecture, which not only saves circuit area, but also saves the time required for data access and effectively improves system performance.

本發明提出一種記憶體控制器,耦接至一外部記憶體裝置,用以控制外部記憶體裝置之運作,包括一中央處理單元、一介面邏輯電路以及一仲裁電路。中央處理單元包含一內部記憶體裝置。介面邏輯電路耦接至外部記憶體裝置與一標準匯流排。仲裁電路耦接至標準匯流排與中央處理單元。仲裁電路透過一靜態隨機存取記憶體匯流排直接耦接至中央處理單元。當中央處理單元需要讀取儲存於外部記憶體裝置之一既定資料時,中央處理單元向介面邏輯電路發出一第一請求,介面邏輯電路因應第一請求自外部記憶體裝置讀取既定資料,並且透過標準匯流排將既定資料傳送至仲裁電路,仲裁電路透過靜態隨機存取記憶體匯流排直接將既定資料傳送至中央處理單元,以寫入內部記憶體裝置。The present invention provides a memory controller coupled to an external memory device for controlling the operation of the external memory device, and includes a central processing unit, an interface logic circuit, and an arbitration circuit. The central processing unit includes an internal memory device. The interface logic circuit is coupled to the external memory device and a standard bus. The arbitration circuit is coupled to the standard bus and the central processing unit. The arbitration circuit is directly coupled to the central processing unit through a static random access memory bus. When the central processing unit needs to read a predetermined data stored in an external memory device, the central processing unit sends a first request to the interface logic circuit, and the interface logic circuit reads the predetermined data from the external memory device in response to the first request, and The predetermined data is sent to the arbitration circuit through the standard bus, and the arbitration circuit directly sends the predetermined data to the central processing unit through the static random access memory bus for writing into the internal memory device.

本發明另提出一種資料儲存裝置,包括一非揮發性記憶體以及一記憶體控制器。記憶體控制器耦接至揮發性記憶體,用以控制非揮發性記憶體之運作。非揮發性記憶體包括一中央處理單元、一介面邏輯電路以及一仲裁電路。中央處理單元包含一內部記憶體裝置。介面邏輯電路耦接至揮發性記憶體與一標準匯流排。仲裁電路耦接至標準匯流排與中央處理單元。仲裁電路透過一靜態隨機存取記憶體匯流排直接耦接至中央處理單元。當中央處理單元需要讀取儲存於非揮發性記憶體之一既定資料時,中央處理單元向介面邏輯電路發出一第一請求,介面邏輯電路因應第一請求自非揮發性記憶體裝置讀取既定資料,並且透過標準匯流排將既定資料傳送至仲裁電路,仲裁電路透過靜態隨機存取記憶體匯流排直接將既定資料傳送至中央處理單元,以寫入內部記憶體裝置。The present invention also provides a data storage device including a non-volatile memory and a memory controller. The memory controller is coupled to the volatile memory for controlling the operation of the non-volatile memory. The non-volatile memory includes a central processing unit, an interface logic circuit and an arbitration circuit. The central processing unit includes an internal memory device. The interface logic circuit is coupled to the volatile memory and a standard bus. The arbitration circuit is coupled to the standard bus and the central processing unit. The arbitration circuit is directly coupled to the central processing unit through a static random access memory bus. When the central processing unit needs to read a predetermined data stored in the non-volatile memory, the central processing unit sends a first request to the interface logic circuit, and the interface logic circuit reads the predetermined data from the non-volatile memory device in response to the first request Data is sent to the arbitration circuit through the standard bus, and the arbitration circuit directly sends the predetermined data to the central processing unit through the static random access memory bus for writing into the internal memory device.

為讓本發明之目的、特徵和優點能更明顯易懂,下文特舉出本發明之具體實施例,並配合所附圖式,作詳細說明如下。目的在於說明本發明之精神而非用以限定本發明之保護範圍,應理解下列實施例可經由軟體、硬體、韌體、或上述任意組合來實現。In order to make the purpose, features and advantages of the present invention more comprehensible, specific embodiments of the present invention are listed below, with the accompanying drawings, and detailed descriptions are as follows. The purpose is to illustrate the spirit of the present invention and not to limit the protection scope of the present invention. It should be understood that the following embodiments can be implemented by software, hardware, firmware, or any combination of the foregoing.

第1圖係顯示根據本發明一實施例所述之資料儲存裝置之一範例方塊圖。資料儲存裝置100可包括一記憶體控制器110與一記憶體裝置120。記憶體裝置120可以為非揮發性記憶體,例如反及閘快閃記憶體(NAND Flash)。記憶體控制器110耦接記憶體裝置120,用以控制記憶體裝置120之運作,以及存取記憶體裝置120所儲存之資料。FIG. 1 is a block diagram showing an example of a data storage device according to an embodiment of the invention. The data storage device 100 may include a memory controller 110 and a memory device 120. The memory device 120 may be a non-volatile memory, such as NAND Flash. The memory controller 110 is coupled to the memory device 120 for controlling the operation of the memory device 120 and accessing data stored in the memory device 120.

資料儲存裝置100可更耦接至一主機(圖未示),用以傳送資料與指令至主機,或自主機接收資料與指令。主機可以為手機、平板電腦、筆記型電腦、導航機或車載系統等。The data storage device 100 can be further coupled to a host (not shown) for transmitting data and commands to the host, or receiving data and commands from the host. The host can be a mobile phone, a tablet computer, a notebook computer, a navigation machine, or a vehicle-mounted system, etc.

值得注意的是,為簡化說明,第1圖僅顯示與本發明相關之元件。然而,本發明之實施並不僅限於第1圖所示之架構。It is worth noting that, to simplify the description, Figure 1 only shows components related to the present invention. However, the implementation of the present invention is not limited to the architecture shown in Figure 1.

第2圖係顯示一種記憶體控制器之架構。記憶體控制器210可為一控制器晶片,耦接至外部的記憶體裝置220。記憶體裝置220可包括一或多個非揮發性記憶體。Figure 2 shows the architecture of a memory controller. The memory controller 210 can be a controller chip coupled to an external memory device 220. The memory device 220 may include one or more non-volatile memories.

記憶體控制器210可包括一中央處理單元(Central Processing Unit,縮寫為CPU)230、一直接記憶體存取(DMA)裝置240、一介面邏輯電路250、一標準匯流排260、複數個仲裁電路270-1、270-2、270-3…270-N、以及複數個從屬記憶體280-1、280-2、280-3…280-N,其中N為一正整數,並且從屬記憶體可以是揮發性記憶體,例如,靜態隨機存取記憶體(Static Random Access Memory,縮寫為SRAM)。The memory controller 210 may include a central processing unit (CPU) 230, a direct memory access (DMA) device 240, an interface logic circuit 250, a standard bus 260, and a plurality of arbitration circuits 270-1, 270-2, 270-3...270-N, and a plurality of slave memories 280-1, 280-2, 280-3...280-N, where N is a positive integer, and the slave memories can It is a volatile memory, for example, Static Random Access Memory (SRAM).

直接記憶體存取裝置240、介面邏輯電路250、或其他(圖中未示)會存取從屬記憶體之裝置可被視為主裝置(master),而從屬記憶體280-1、280-2、280-3…280-N可被視為副裝置/從屬裝置(slave)。標準匯流排260用以於主裝置及副裝置間提供一傳輸介面。仲裁電路270-1、270-2、270-3…270-N分別耦接至從屬記憶體280-1、280-2、280-3…280-N,用以為各個從屬記憶體進行仲裁。更具體的說,仲裁電路透過標準匯流排260接收來自一或多個主裝置的請求或指令,仲裁多個請求或指令之優先權,用以於多個主裝置同時請求存取同一個從屬記憶體時,決定優先處理哪個主裝置的請求。The direct memory access device 240, the interface logic circuit 250, or other devices (not shown in the figure) that access the slave memory can be regarded as master devices, and the slave memories 280-1, 280-2 , 280-3...280-N can be regarded as a slave/slave. The standard bus 260 is used to provide a transmission interface between the main device and the auxiliary device. The arbitration circuits 270-1, 270-2, 270-3...270-N are respectively coupled to the slave memories 280-1, 280-2, 280-3...280-N for arbitrating each slave memory. More specifically, the arbitration circuit receives requests or commands from one or more master devices through the standard bus 260, and arbitrates the priority of multiple requests or commands, so that multiple master devices request access to the same slave memory at the same time. At the time of the system, it determines which master device's request is to be processed first.

中央處理單元230可包含複數個內部記憶體裝置,例如,指令緊密耦接記憶體(Instruction Closed Coupled Memory,縮寫為ICCM)231以及資料緊密耦接記憶體(Data Closed Coupled Memory,縮寫為DCCM)232。其中,ICCM與DCCM可以是靜態隨機存取記憶體,ICCM 231可用於儲存程式碼,DCCM 232可用於儲存資料。The central processing unit 230 may include a plurality of internal memory devices, for example, an instruction close coupled memory (ICCM) 231 and a data close coupled memory (DCCM) 232 . Among them, ICCM and DCCM can be static random access memory, ICCM 231 can be used to store program codes, and DCCM 232 can be used to store data.

於第2圖所示之架構中,直接記憶體存取裝置240係用以協助中央處理單元230存取記憶體裝置220所儲存之資料。舉例而言,當中央處理單元230需要使用儲存於記憶體裝置220之資料或程式碼時,可透過耦接至介面邏輯電路250之一指令介面(command interface)(圖未示)發出一讀取請求或讀取請求指令。介面邏輯電路250因應此請求或指令自記憶體裝置220讀取中央處理單元230所需之資料,並且如圖中標示為1的傳輸路徑所示,將資料透過標準匯流排260寫入從屬記憶體280-1。In the architecture shown in FIG. 2, the direct memory access device 240 is used to assist the central processing unit 230 to access the data stored in the memory device 220. For example, when the central processing unit 230 needs to use the data or code stored in the memory device 220, it can issue a read through a command interface (not shown) coupled to the interface logic circuit 250 Request or read request instructions. In response to this request or command, the interface logic circuit 250 reads the data required by the central processing unit 230 from the memory device 220, and writes the data to the slave memory through the standard bus 260 as shown in the transmission path marked 1 in the figure 280-1.

介面邏輯電路250可包括一錯誤更正碼(Error Correction Code,縮寫為ECC)引擎251。當錯誤更正碼引擎251偵測到讀取出來之資料有錯誤時,可透過如圖中標示為2的傳輸路徑所示,將錯誤的資料讀回介面邏輯電路250進行錯誤更正,並且再將更正完畢之正確資料寫回從屬記憶體280-1。The interface logic circuit 250 may include an Error Correction Code (ECC) engine 251. When the error correction code engine 251 detects an error in the read data, it can read the error data back to the interface logic circuit 250 for error correction through the transmission path marked 2 in the figure, and then correct it. The completed correct data is written back to the slave memory 280-1.

當中央處理單元230所需之資料傳輸完畢後,介面邏輯電路250可發出一中斷信號通知中央處理單元230(或者,中央處理單元230亦可持續主動詢問資料狀態)。中央處理單元230再透過耦接至直接記憶體存取裝置240之一指令介面(command interface)(圖未示)發出一請求或指令。直接記憶體存取裝置240因應此請求或指令,將資料如圖中標示為3的傳輸路徑所示由從屬記憶體280-1搬運至中央處理單元230之內部記憶體裝置,例如,ICCM 231或DCCM 232。When the data required by the central processing unit 230 has been transmitted, the interface logic circuit 250 can send an interrupt signal to notify the central processing unit 230 (or the central processing unit 230 can continue to actively inquire about the data status). The central processing unit 230 then issues a request or command through a command interface (not shown) coupled to the direct memory access device 240. In response to this request or command, the direct memory access device 240 transfers the data from the slave memory 280-1 to the internal memory device of the central processing unit 230 as shown in the transmission path marked 3 in the figure, for example, ICCM 231 or DCCM 232.

於第2圖所示之架構中,由於中央處理單元230所需之資料傳輸均須透過直接記憶體存取裝置240來進行,因而欠缺效率。為了改善上述缺陷,以增進記憶體裝置的存取效能,以下提出一種新的記憶體控制器架構及資料存取方法。In the architecture shown in FIG. 2, since the data transmission required by the central processing unit 230 must be performed through the direct memory access device 240, it is inefficient. In order to improve the above defects and improve the access performance of the memory device, a new memory controller architecture and data access method are proposed as follows.

第3圖係顯示根據本發明之一實施例所述之記憶體控制器方塊圖。記憶體控制器310可為如第1圖所示之資料儲存裝置之一控制器晶片,耦接至外部的記憶體裝置320。記憶體裝置320可包括一或多個非揮發性記憶體。FIG. 3 is a block diagram of the memory controller according to an embodiment of the invention. The memory controller 310 can be a controller chip of the data storage device as shown in FIG. 1 and is coupled to an external memory device 320. The memory device 320 may include one or more non-volatile memories.

記憶體控制器310可包括一中央處理單元330、一介面邏輯電路350、一標準匯流排360、複數個仲裁電路370-1、370-2、370-3…370-N、以及複數個從屬記憶體380-2、380-3…380-N,其中N為一正整數,並且從屬記憶體可以是揮發性記憶體,例如,靜態隨機存取記憶體(SRAM)。The memory controller 310 may include a central processing unit 330, an interface logic circuit 350, a standard bus 360, a plurality of arbitration circuits 370-1, 370-2, 370-3...370-N, and a plurality of slave memories 380-2, 380-3...380-N, where N is a positive integer, and the slave memory may be a volatile memory, for example, a static random access memory (SRAM).

介面邏輯電路350、或其他(圖中未示)會存取從屬記憶體之裝置可被視為主裝置(master),而從屬記憶體380-2、380-3…380-N可被視為副裝置/從屬裝置(slave)。標準匯流排360用以於主裝置及副裝置間提供一傳輸介面。仲裁電路370-2、370-3…370-N分別耦接至從屬記憶體380-2、380-3…380-N,用以為各個從屬記憶體進行仲裁。更具體的說,仲裁電路透過標準匯流排360接收來自一或多個主裝置的請求或指令,仲裁多個請求或指令之優先權,用以於多個主裝置同時請求存取同一個從屬記憶體時,決定優先處理哪個主裝置的請求。The interface logic circuit 350, or other devices (not shown in the figure) that access the slave memory can be regarded as the master, and the slave memories 380-2, 380-3...380-N can be regarded as Secondary device/slave device (slave). The standard bus 360 is used to provide a transmission interface between the main device and the auxiliary device. The arbitration circuits 370-2, 370-3...370-N are respectively coupled to the slave memories 380-2, 380-3...380-N for arbitrating each slave memory. More specifically, the arbitration circuit receives requests or commands from one or more master devices through the standard bus 360, and arbitrates the priority of multiple requests or commands, so that multiple master devices request access to the same slave memory at the same time. At the time of the system, it determines which master device's request is to be processed first.

中央處理單元330可包含複數個內部記憶體裝置,例如,用於儲存程式碼之ICCM 331-1與331-2、用於儲存資料之DCCM (為簡化圖示,於第3圖未示,另顯示於第4圖) ,以及唯讀記憶體339。其中ICCM與DCCM可以是靜態隨機存取記憶體。The central processing unit 330 may include a plurality of internal memory devices, such as ICCM 331-1 and 331-2 for storing program codes, and DCCM for storing data (simplified illustration, not shown in Figure 3, and (Shown in Figure 4), and read-only memory 339. Among them, ICCM and DCCM can be static random access memory.

於第3圖所示之架構中,中央處理單元330並不包括直接記憶體存取裝置。根據本發明之一實施例,仲裁電路370-1透過靜態隨機存取記憶體匯流排390、391直接耦接至中央處理單元330。靜態隨機存取記憶體匯流排390與391用以於仲裁電路370-1及中央處理單元330提供一傳輸介面。In the architecture shown in Figure 3, the central processing unit 330 does not include a direct memory access device. According to an embodiment of the present invention, the arbitration circuit 370-1 is directly coupled to the central processing unit 330 through static random access memory buses 390 and 391. The static random access memory buses 390 and 391 are used to provide a transmission interface between the arbitration circuit 370-1 and the central processing unit 330.

當中央處理單元330需要使用或讀取儲存於記憶體裝置320之資料,例如,程式碼時,可透過耦接至介面邏輯電路350之一指令介面(圖未示)發出一讀取請求或讀取請求指令。介面邏輯電路350因應此請求或指令自記憶體裝置320讀取中央處理單元330所需之程式碼,並且如圖中標示為1的傳輸路徑所示,將資料透過標準匯流排360傳送至仲裁電路370-1。仲裁電路370-1透過靜態隨機存取記憶體匯流排390直接將程式碼傳送至中央處理單元330,以寫入內部記憶體裝置ICCM 331-1或331-2。When the central processing unit 330 needs to use or read data stored in the memory device 320, for example, program codes, it can issue a read request or read through a command interface (not shown) coupled to the interface logic circuit 350 Fetch request instructions. The interface logic circuit 350 reads the code required by the central processing unit 330 from the memory device 320 in response to this request or command, and transmits the data to the arbitration circuit through the standard bus 360 as shown in the transmission path marked 1 in the figure 370-1. The arbitration circuit 370-1 directly transmits the program code to the central processing unit 330 through the static random access memory bus 390 for writing into the internal memory device ICCM 331-1 or 331-2.

當介面邏輯電路350需要讀取儲存於內部記憶體裝置ICCM 331-1或331-2之資料時,介面邏輯電路350向仲裁電路370-1發出一讀取請求或讀取請求指令,仲裁電路370-1因應此請求或指令直接透過靜態隨機存取記憶體匯流排391接收讀取之資料,再透過標準匯流排360將讀取之資料傳送至介面邏輯電路350。When the interface logic circuit 350 needs to read the data stored in the internal memory device ICCM 331-1 or 331-2, the interface logic circuit 350 sends a read request or read request command to the arbitration circuit 370-1, and the arbitration circuit 370 -1 In response to this request or command, the read data is directly received through the static random access memory bus 391, and then the read data is sent to the interface logic circuit 350 through the standard bus 360.

舉例而言,介面邏輯電路350可包括一錯誤更正碼引擎351。當錯誤更正碼引擎351偵測到讀取出來之程式碼或資料有錯誤時,可由仲裁電路370-1直接透過靜態隨機存取記憶體匯流排391接收自內部記憶體裝置ICCM 331-1或331-2讀取之錯誤的程式碼或資料,再依循如圖中標示為2的傳輸路徑所示,透過標準匯流排360將資料傳送至介面邏輯電路350進行錯誤更正。更正完畢之正確的程式碼或資料將依循如圖中標示為1的傳輸路徑,透過標準匯流排360被傳送至仲裁電路370-1。仲裁電路370-1再透過靜態隨機存取記憶體匯流排390直接將程式碼傳送至中央處理單元330,以寫入內部記憶體裝置ICCM 331-1或331-2。For example, the interface logic circuit 350 may include an error correction code engine 351. When the error correction code engine 351 detects an error in the read code or data, the arbitration circuit 370-1 can directly receive it from the internal memory device ICCM 331-1 or 331 through the static random access memory bus 391 -2 The read error code or data, and then follow the transmission path marked 2 in the figure, and send the data to the interface logic circuit 350 through the standard bus 360 for error correction. The corrected correct code or data will be transmitted to the arbitration circuit 370-1 through the standard bus 360 following the transmission path marked as 1 in the figure. The arbitration circuit 370-1 then directly transmits the program code to the central processing unit 330 through the static random access memory bus 390 for writing into the internal memory device ICCM 331-1 or 331-2.

根據本發明之一實施例,中央處理單元330可包含複數多工器,例如圖中所示之多工器335、336、337、338。多工器335與336可用於選擇寫入資料的來源路徑。多工器337與338可用於選擇讀取資料的來源路徑。According to an embodiment of the present invention, the central processing unit 330 may include a plurality of multiplexers, such as the multiplexers 335, 336, 337, 338 shown in the figure. The multiplexers 335 and 336 can be used to select the source path of the written data. The multiplexers 337 and 338 can be used to select the source path for reading data.

多工器335與336可分別包括複數輸入端,其中一輸入端連接至中央處理單元330之一內部匯流排,另一輸入端透過靜態隨機存取記憶體匯流排390直接連接至仲裁電路370-1之一輸出接口。多工器335之輸出端耦接至ICCM 331-1,多工器336之輸出端耦接至ICCM 331-2。多工器335與336分別根據一選擇信號多工傳輸來自CPU內部匯流排或靜態隨機存取記憶體匯流排390之資料。The multiplexers 335 and 336 may respectively include a plurality of input terminals. One input terminal is connected to an internal bus of the central processing unit 330, and the other input terminal is directly connected to the arbitration circuit 370 through the static random access memory bus 390. 1 One of the output interfaces. The output terminal of the multiplexer 335 is coupled to the ICCM 331-1, and the output terminal of the multiplexer 336 is coupled to the ICCM 331-2. The multiplexers 335 and 336 respectively multiplex and transmit data from the CPU internal bus or the static random access memory bus 390 according to a selection signal.

多工器337與338可分別包括複數輸入端,其中一輸入端連接至ICCM 331-1,另一輸入端連接至ICCM 331-2。多工器337之輸出端透過靜態隨機存取記憶體匯流排391直接連接至仲裁電路370-1之一輸入接口,多工器338之輸出端耦接至中央處理單元330之一內部匯流排。多工器337與338分別根據一選擇信號多工傳輸來自ICCM 331-1或ICCM 331-2之資料。The multiplexers 337 and 338 may respectively include multiple input terminals, one of which is connected to the ICCM 331-1, and the other input is connected to the ICCM 331-2. The output terminal of the multiplexer 337 is directly connected to an input interface of the arbitration circuit 370-1 through the static random access memory bus 391, and the output terminal of the multiplexer 338 is coupled to an internal bus of the central processing unit 330. The multiplexers 337 and 338 respectively multiplex and transmit data from ICCM 331-1 or ICCM 331-2 according to a selection signal.

根據本發明之一實施例,中央處理單元330可更包含邏輯電路333-1、333-2、333-3與333-4。邏輯電路333-1與333-2分別根據用以指示是否由外部裝置(即,中央處理單元330以外之裝置)執行寫入操作之一指標與欲寫入的記憶體位置產生一選擇信號。舉例而言,當由外部裝置執行寫入操作之指標被設起,而存取的記憶體位置落在ICCM 331-1的記憶體位址範圍內時,邏輯電路333-1輸出的選擇信號數值可為1,用以將寫入資料的來源路徑選擇為外部裝置,例如,圖中所示之靜態隨機存取記憶體匯流排390及仲裁電路370-1,使得外部裝置具有寫入ICCM 331-1的權限。另一方面,邏輯電路333-2輸出的選擇信號數值可為0,用以將寫入資料的來源路徑選擇為CPU內部匯流排,使得內部裝置具有寫入ICCM 331-2的權限。根據本發明之一實施例,由外部裝置執行寫入操作之指標及存取的記憶體位置之資訊可被儲存於中央處理單元330或外部裝置之暫存器內。According to an embodiment of the present invention, the central processing unit 330 may further include logic circuits 333-1, 333-2, 333-3, and 333-4. The logic circuits 333-1 and 333-2 respectively generate a selection signal according to an index for indicating whether an external device (ie, a device other than the central processing unit 330) performs a write operation and the memory location to be written. For example, when the write operation index performed by the external device is set, and the memory location to be accessed falls within the memory address range of ICCM 331-1, the value of the selection signal output by the logic circuit 333-1 can be 1 is used to select the source path for writing data to the external device, for example, the static random access memory bus 390 and the arbitration circuit 370-1 shown in the figure, so that the external device has the write ICCM 331-1 permission. On the other hand, the value of the selection signal output by the logic circuit 333-2 can be 0, which is used to select the source path of writing data as the CPU internal bus, so that the internal device has the authority to write to the ICCM 331-2. According to an embodiment of the present invention, the pointer of the write operation performed by the external device and the information of the memory location accessed can be stored in the central processing unit 330 or the register of the external device.

邏輯電路333-3與333-4分別根據用以指示是否由外部裝置執行讀取操作之一指標與欲讀取的記憶體位置產生一選擇信號。舉例而言,當欲讀取CPU內部記憶體之裝置為外部裝置,且存取的記憶體位置落在ICCM 331-1的記憶體位址範圍內時,邏輯電路333-3輸出的選擇信號數值可為0,用以將讀取資料的來源路徑選擇為ICCM 331-1,使得外部裝置可讀取ICCM 331-1的資料。舉另一例而言,當欲讀取CPU內部記憶體之裝置為CPU內部裝置,且存取的記憶體位置落在ICCM 331-2的記憶體位址範圍內時,邏輯電路333-4輸出的選擇信號數值可為1,用以將讀取資料的來源路徑選擇為ICCM 331-2,使得CPU內部裝置可讀取ICCM 331-2的資料。根據本發明之一實施例,由外部裝置執行讀取操作之指標及欲讀取的記憶體位置之資訊可被儲存於中央處理單元330或外部裝置之暫存器內。The logic circuits 333-3 and 333-4 respectively generate a selection signal according to an index for indicating whether the external device performs a read operation and the memory location to be read. For example, when the device to read the internal memory of the CPU is an external device, and the memory location to be accessed falls within the memory address range of ICCM 331-1, the value of the selection signal output by the logic circuit 333-3 can be If it is 0, it is used to select the source path of reading data as ICCM 331-1, so that the external device can read the data of ICCM 331-1. For another example, when the device to read the internal memory of the CPU is an internal device of the CPU, and the memory location to be accessed falls within the memory address range of ICCM 331-2, the output selection of the logic circuit 333-4 The signal value can be 1, which is used to select the source path for reading data as ICCM 331-2, so that the internal device of the CPU can read the data of ICCM 331-2. According to an embodiment of the present invention, the index of the read operation performed by the external device and the information of the memory location to be read can be stored in the central processing unit 330 or the register of the external device.

值得注意的是,雖於以上實施例中,多工器的選擇信號為一位元之信號,但本發明並不限於此。孰悉此技藝者均可輕易理解,多工器335、336、337、338可被擴充為包含兩個以上輸入端,因此對應之選擇信號可以為多位元之信號。It is worth noting that although in the above embodiments, the multiplexer selection signal is a one-bit signal, the present invention is not limited to this. Those who know this skill can easily understand that the multiplexers 335, 336, 337, 338 can be expanded to include more than two input terminals, so the corresponding selection signal can be a multi-bit signal.

根據本發明之一實施例,中央處理單元330之內部記憶體裝置,例如,圖中所示之ICCM 331-1與331-2之一資料字元寬度被設定為與標準匯流排360之一資料字元寬度相同。此外,靜態隨機存取記憶體匯流排390與391之一資料字元寬度亦可被設定為與標準匯流排360之一資料字元寬度相同。如此一來,資料無需經字元寬度轉換即可直接被寫入中央處理單元330之內部記憶體裝置。舉例而言,假設標準匯流排360之一資料字元寬度為X位元,則中央處理單元330之內部記憶體裝置以及靜態隨機存取記憶體匯流排390與391之一資料字元寬度於配置時即可被設定為X位元,而中央處理單元330之內部記憶體裝置之資料深度可被設定為(M/X)個儲存單元,其中M即為中央處理單元330之內部記憶體裝置之記憶體容量,而資料字元寬度X代表內部記憶體裝置的每一次存取將存取X位元的資料。此外,耦接至標準匯流排360與靜態隨機存取記憶體匯流排之仲裁電路370-1可為資料執行於標準匯流排介面協定以及靜態隨機存取記憶體匯流排介面協定之間的轉換。According to an embodiment of the present invention, the internal memory device of the central processing unit 330, for example, the width of one of the data characters of the ICCM 331-1 and 331-2 shown in the figure is set to be the same as that of the standard bus 360. The character width is the same. In addition, the width of one of the data characters of the static random access memory buses 390 and 391 can also be set to be the same as the width of one of the data characters of the standard bus 360. In this way, the data can be directly written into the internal memory device of the central processing unit 330 without the need for character width conversion. For example, assuming that a data character width of the standard bus 360 is X bits, the internal memory device of the central processing unit 330 and the static random access memory buses 390 and 391 have a data character width in the configuration Time can be set to X bits, and the data depth of the internal memory device of the central processing unit 330 can be set to (M/X) storage units, where M is the number of internal memory devices of the central processing unit 330 The memory capacity, and the data character width X represents that each access of the internal memory device will access X bits of data. In addition, the arbitration circuit 370-1 coupled to the standard bus 360 and the static random access memory bus can perform data conversion between the standard bus interface protocol and the static random access memory bus interface protocol.

此外,根據本發明之一實施例,除了設定中央處理單元330之內部記憶體裝置與靜態隨機存取記憶體匯流排之資料字元寬度外,其他控制靜態隨機存取記憶體匯流排390與391之電路之資料字元寬度以及記憶體位址的編碼/解碼方式也須根據標準匯流排360之一資料字元寬度做對應之設定。In addition, according to an embodiment of the present invention, in addition to setting the data character width of the internal memory device of the central processing unit 330 and the static random access memory bus, other control static random access memory buses 390 and 391 The data character width of the circuit and the encoding/decoding method of the memory address must also be correspondingly set according to a data character width of the standard bus 360.

值得注意的是,為簡化說明,第3圖僅顯示與本發明相關之元件。然而,本發明之實施並不僅限於第3圖所示之架構。舉例而言,記憶體控制器可更包括未示於圖中的其他主裝置。It is worth noting that, to simplify the description, Figure 3 only shows components related to the present invention. However, the implementation of the present invention is not limited to the architecture shown in Figure 3. For example, the memory controller may further include other host devices not shown in the figure.

第4圖係顯示根據本發明之另一實施例所述之記憶體控制器方塊圖。第4圖顯示之架構與第3圖類似,差別僅在於第4圖顯示出中央處理單元330所包含用於儲存資料之DCCM 332-1與332-2。因此,相同的元件之說明可參考第3圖之說明,於此不再贅述。此外,值得注意的是,第3圖與第4圖所示之元件可被整合為包含於同一記憶體控制器內。FIG. 4 shows a block diagram of a memory controller according to another embodiment of the invention. The structure shown in Fig. 4 is similar to that shown in Fig. 3, except that Fig. 4 shows the DCCMs 332-1 and 332-2 included in the central processing unit 330 for storing data. Therefore, for the description of the same components, refer to the description of FIG. 3, which is not repeated here. In addition, it is worth noting that the components shown in Figures 3 and 4 can be integrated into the same memory controller.

於第4圖所示之架構中,中央處理單元330並不包括直接記憶體存取裝置。根據本發明之一實施例,仲裁電路370-0透過靜態隨機存取記憶體匯流排392、393直接耦接至中央處理單元330。靜態隨機存取記憶體匯流排392與393用以於仲裁電路370-0及中央處理單元330提供一傳輸介面。In the architecture shown in Figure 4, the central processing unit 330 does not include a direct memory access device. According to an embodiment of the present invention, the arbitration circuit 370-0 is directly coupled to the central processing unit 330 through static random access memory buses 392 and 393. The static random access memory buses 392 and 393 are used to provide a transmission interface between the arbitration circuit 370-0 and the central processing unit 330.

當中央處理單元330需要使用或讀取儲存於記憶體裝置320之資料時,可透過耦接至介面邏輯電路350之一指令介面(圖未示)發出一讀取請求或讀取請求指令。介面邏輯電路350因應此請求或指令自記憶體裝置320讀取中央處理單元330所需之資料,並且如圖中標示為1的傳輸路徑所示,將資料透過標準匯流排360傳送至仲裁電路370-0。仲裁電路370-0透過靜態隨機存取記憶體匯流排392直接將程式碼傳送至中央處理單元330,以寫入內部記憶體裝置DCCM 332-1或332-2。When the central processing unit 330 needs to use or read the data stored in the memory device 320, it can issue a read request or read request command through a command interface (not shown) coupled to the interface logic circuit 350. The interface logic circuit 350 reads the data required by the central processing unit 330 from the memory device 320 in response to this request or command, and transmits the data to the arbitration circuit 370 through the standard bus 360 as shown in the transmission path marked 1 in the figure. -0. The arbitration circuit 370-0 directly transmits the program code to the central processing unit 330 through the static random access memory bus 392 for writing into the internal memory device DCCM 332-1 or 332-2.

當介面邏輯電路350需要讀取儲存於內部記憶體裝置DCCM 332-1或332-2之資料時,介面邏輯電路350向仲裁電路370-0發出一讀取請求或讀取請求指令,仲裁電路370-0因應此請求或指令直接透過靜態隨機存取記憶體匯流排393接收讀取之資料,再透過標準匯流排360將讀取之資料傳送至介面邏輯電路350。When the interface logic circuit 350 needs to read the data stored in the internal memory device DCCM 332-1 or 332-2, the interface logic circuit 350 sends a read request or read request command to the arbitration circuit 370-0, and the arbitration circuit 370 -0 In response to this request or command, the read data is directly received through the static random access memory bus 393, and then the read data is sent to the interface logic circuit 350 through the standard bus 360.

舉例而言,當介面邏輯電路350之錯誤更正碼引擎351偵測到讀取出來之資料有錯誤時,可由仲裁電路370-0直接透過靜態隨機存取記憶體匯流排393接收自內部記憶體裝置DCCM 332-1或332-2讀取之錯誤的資料,再依循如圖中標示為2的傳輸路徑所示,透過標準匯流排360將資料傳送至介面邏輯電路350進行錯誤更正。更正完畢之正確的程式碼或資料將依循如圖中標示為1的傳輸路徑,透過標準匯流排360被傳送至仲裁電路370-0。仲裁電路370-0再透過靜態隨機存取記憶體匯流排392直接將程式碼傳送至中央處理單元330,以寫入內部記憶體裝置DCCM 332-1或332-2。For example, when the error correction code engine 351 of the interface logic circuit 350 detects an error in the read data, the arbitration circuit 370-0 can directly receive it from the internal memory device through the static random access memory bus 393 The erroneous data read by DCCM 332-1 or 332-2 is then sent to the interface logic circuit 350 through the standard bus 360 as shown by the transmission path marked 2 in the figure for error correction. The corrected correct code or data will be transmitted to the arbitration circuit 370-0 through the standard bus 360 following the transmission path marked as 1 in the figure. The arbitration circuit 370-0 then directly transmits the program code to the central processing unit 330 through the static random access memory bus 392 for writing into the internal memory device DCCM 332-1 or 332-2.

根據本發明之一實施例,中央處理單元330可包含複數多工器,例如圖中所示之多工器345、346、347與348。多工器345與346可用於選擇寫入資料的來源路徑。多工器347與348可用於選擇讀取資料的來源路徑。According to an embodiment of the present invention, the central processing unit 330 may include a plurality of multiplexers, such as the multiplexers 345, 346, 347, and 348 shown in the figure. The multiplexers 345 and 346 can be used to select the source path of the written data. The multiplexers 347 and 348 can be used to select the source path of the read data.

多工器345與346可分別包括複數輸入端,其中一輸入端連接至中央處理單元330之一內部匯流排,另一輸入端透過靜態隨機存取記憶體匯流排392直接連接至仲裁電路370-0之一輸出接口。多工器345之輸出端耦接至DCCM 332-1,多工器346之輸出端耦接至DCCM 332-2。多工器345與346分別根據一選擇信號多工傳輸來自CPU內部匯流排或靜態隨機存取記憶體匯流排392之資料。The multiplexers 345 and 346 may respectively include multiple input terminals, one of which is connected to an internal bus of the central processing unit 330, and the other input is directly connected to the arbitration circuit 370 through the static random access memory bus 392. One of 0 output interface. The output terminal of the multiplexer 345 is coupled to the DCCM 332-1, and the output terminal of the multiplexer 346 is coupled to the DCCM 332-2. The multiplexers 345 and 346 respectively multiplex and transmit data from the CPU internal bus or the static random access memory bus 392 according to a selection signal.

多工器347與348可分別包括複數輸入端,其中一輸入端連接至DCCM 332-1,另一輸入端連接至DCCM 332-2。多工器347之輸出端透過靜態隨機存取記憶體匯流排393直接連接至仲裁電路370-0之一輸入接口,多工器348之輸出端耦接至中央處理單元330之一內部匯流排。多工器347與348分別根據一選擇信號多工傳輸來自DCCM 332-1或DCCM 332-2之資料。The multiplexers 347 and 348 may respectively include multiple input terminals, one of the input terminals is connected to the DCCM 332-1, and the other input terminal is connected to the DCCM 332-2. The output terminal of the multiplexer 347 is directly connected to an input interface of the arbitration circuit 370-0 through the static random access memory bus 393, and the output terminal of the multiplexer 348 is coupled to an internal bus of the central processing unit 330. The multiplexers 347 and 348 respectively multiplex and transmit data from the DCCM 332-1 or DCCM 332-2 according to a selection signal.

根據本發明之一實施例,中央處理單元330可更包含邏輯電路343-1、343-2、343-3與343-4。邏輯電路343-1與343-2分別根據用以指示是否由外部裝置(即,中央處理單元330以外之裝置)執行寫入操作之一指標與欲寫入的記憶體位置產生一選擇信號。舉例而言,當由外部裝置執行寫入操作之指標被設起,而存取的記憶體位置落在DCCM 332-1的記憶體位址範圍內時,邏輯電路343-1輸出的選擇信號數值可為1,用以將寫入資料的來源路徑選擇為外部裝置,例如,圖中所示之靜態隨機存取記憶體匯流排392及仲裁電路370-0,使得外部裝置具有寫入DCCM 332-1的權限。另一方面,邏輯電路343-2輸出的選擇信號數值可為0,用以將寫入資料的來源路徑選擇為CPU內部匯流排,使得內部裝置具有寫入DCCM 332-2的權限。根據本發明之一實施例,由外部裝置執行寫入操作之指標及存取的記憶體位置之資訊可被儲存於中央處理單元330或外部裝置之暫存器內。According to an embodiment of the present invention, the central processing unit 330 may further include logic circuits 343-1, 343-2, 343-3, and 343-4. The logic circuits 343-1 and 343-2 respectively generate a selection signal according to an index indicating whether an external device (ie, a device other than the central processing unit 330) performs a write operation and the memory location to be written. For example, when the write operation index performed by the external device is set, and the memory location to be accessed falls within the memory address range of DCCM 332-1, the value of the selection signal output by the logic circuit 343-1 can be 1 is used to select the source path for writing data as an external device, for example, the static random access memory bus 392 and the arbitration circuit 370-0 shown in the figure, so that the external device has DCCM 332-1 for writing permission. On the other hand, the value of the selection signal output by the logic circuit 343-2 may be 0, which is used to select the source path of writing data as the CPU internal bus, so that the internal device has the authority to write the DCCM 332-2. According to an embodiment of the present invention, the pointer of the write operation performed by the external device and the information of the memory location accessed can be stored in the central processing unit 330 or the register of the external device.

邏輯電路343-3與343-4分別根據用以指示是否由外部裝置執行讀取操作之一指標與欲讀取的記憶體位置產生一選擇信號。舉例而言,當欲讀取CPU內部記憶體之裝置為外部裝置,且存取的記憶體位置落在DCCM 332-1的記憶體位址範圍內時,邏輯電路343-3輸出的選擇信號數值可為0,用以將讀取資料的來源路徑選擇為DCCM 332-1,使得外部裝置可讀取DCCM 332-1的資料。舉另一例而言,當欲讀取CPU內部記憶體之裝置為CPU內部裝置,且存取的記憶體位置落在DCCM 332-2的記憶體位址範圍內時,邏輯電路343-4輸出的選擇信號數值可為1,用以將讀取資料的來源路徑選擇為DCCM 332-2,使得CPU內部裝置可讀取DCCM 332-2的資料。根據本發明之一實施例,由外部裝置執行讀取操作之指標及欲讀取的記憶體位置之資訊可被儲存於中央處理單元330或外部裝置之暫存器內。The logic circuits 343-3 and 343-4 respectively generate a selection signal according to an index for indicating whether the external device performs a read operation and the memory location to be read. For example, when the device to read the internal memory of the CPU is an external device, and the memory location to be accessed falls within the memory address range of DCCM 332-1, the value of the selection signal output by the logic circuit 343-3 can be If it is 0, it is used to select the source path of reading data as DCCM 332-1, so that the external device can read the data of DCCM 332-1. For another example, when the device to read the internal memory of the CPU is an internal device of the CPU, and the memory location to be accessed falls within the memory address range of DCCM 332-2, the output selection of the logic circuit 343-4 The signal value can be 1, which is used to select the source path of reading data as DCCM 332-2, so that the internal device of the CPU can read the data of DCCM 332-2. According to an embodiment of the present invention, the index of the read operation performed by the external device and the information of the memory location to be read can be stored in the central processing unit 330 or the register of the external device.

值得注意的是,雖於以上實施例中,多工器的選擇信號為一位元之信號,但本發明並不限於此。孰悉此技藝者均可輕易理解,多工器345、346、347、348可被擴充為包含兩個以上輸入端,因此對應之選擇信號可以為多位元之信號。It is worth noting that although in the above embodiments, the multiplexer selection signal is a one-bit signal, the present invention is not limited to this. Those who know this skill can easily understand that the multiplexers 345, 346, 347, and 348 can be expanded to include more than two input terminals, so the corresponding selection signal can be a multi-bit signal.

根據本發明之一實施例,中央處理單元330之內部記憶體裝置,例如,圖中所示之DCCM 332-1與332-2之一資料字元寬度被設定為與標準匯流排360之一資料字元寬度相同。此外,靜態隨機存取記憶體匯流排392與393之一資料字元寬度亦可被設定為與標準匯流排360之一資料字元寬度相同。如此一來,資料無需經字元寬度轉換即可直接被寫入中央處理單元330之內部記憶體裝置。舉例而言,假設標準匯流排360之一資料字元寬度為X位元,則中央處理單元330之內部記憶體裝置以及靜態隨機存取記憶體匯流排392與393之一資料字元寬度於配置時即可被設定為X位元,而中央處理單元330之內部記憶體裝置之資料深度可被設定為(M/X)個儲存單元,其中M即為中央處理單元330之內部記憶體裝置之記憶體容量,而資料字元寬度X代表內部記憶體裝置的每一次存取將存取X位元的資料。此外,耦接至標準匯流排360與靜態隨機存取記憶體匯流排之仲裁電路370-0可為資料執行於標準匯流排介面協定以及靜態隨機存取記憶體匯流排介面協定之間的轉換。According to an embodiment of the present invention, the internal memory device of the central processing unit 330, for example, the data character width of one of the DCCM 332-1 and 332-2 shown in the figure is set to be the same as that of the standard bus 360. The character width is the same. In addition, the width of one of the data characters of the static random access memory buses 392 and 393 can also be set to be the same as the width of one of the data characters of the standard bus 360. In this way, the data can be directly written into the internal memory device of the central processing unit 330 without the need for character width conversion. For example, assuming that a data character width of the standard bus 360 is X bits, the internal memory device of the central processing unit 330 and the static random access memory buses 392 and 393 have a data character width in the configuration Time can be set to X bits, and the data depth of the internal memory device of the central processing unit 330 can be set to (M/X) storage units, where M is the number of internal memory devices of the central processing unit 330 The memory capacity, and the data character width X represents that each access of the internal memory device will access X bits of data. In addition, the arbitration circuit 370-0 coupled to the standard bus 360 and the static random access memory bus can perform data conversion between the standard bus interface protocol and the static random access memory bus interface protocol.

此外,根據本發明之一實施例,除了設定中央處理單元330之內部記憶體裝置與靜態隨機存取記憶體匯流排之資料字元寬度外,其他控制靜態隨機存取記憶體匯流排392與393之電路之資料字元寬度以及記憶體位址的編碼/解碼方式也須根據標準匯流排360之一資料字元寬度做對應之設定。In addition, according to an embodiment of the present invention, in addition to setting the data character width of the internal memory device of the central processing unit 330 and the static random access memory bus, the other control static random access memory buses 392 and 393 The data character width of the circuit and the encoding/decoding method of the memory address must also be correspondingly set according to a data character width of the standard bus 360.

值得注意的是,為簡化說明,第4圖僅顯示與本發明相關之元件。然而,本發明之實施並不僅限於第4圖所示之架構。舉例而言,記憶體控制器可更包括未示於圖中的其他主裝置。It is worth noting that, to simplify the description, Figure 4 only shows components related to the present invention. However, the implementation of the present invention is not limited to the architecture shown in Figure 4. For example, the memory controller may further include other host devices not shown in the figure.

如上述,相較於第2圖所示之架構,於第3圖與第4圖的架構中,省去了直接記憶體存取裝置與至少一個從屬記憶體的使用。如此一來,不僅可節省電路面積,也可因減少一次資料搬移到從屬記憶體之動作,節省資料存取所需的時間,有效改善系統效能。除此之外,由於第3圖與第4圖的架構相較於第2圖所示之架構為較簡單的架構,因此電路之複雜度也可被降低,有效降低硬體成本。As mentioned above, compared to the architecture shown in Figure 2, in the architectures of Figures 3 and 4, the use of a direct memory access device and at least one slave memory is omitted. In this way, not only the circuit area can be saved, but also the time required for data access can be saved by reducing the movement of data to the slave memory, and the system performance can be effectively improved. In addition, since the architectures in Figures 3 and 4 are simpler than the architecture shown in Figure 2, the complexity of the circuit can also be reduced, effectively reducing hardware costs.

本發明說明書中「耦接」一詞係泛指各種直接或間接之電性連接方式。本發明雖以較佳實施例揭露如上,然其並非用以限定本發明的範圍,任何熟習此項技藝者,在不脫離本發明之精神和範圍內,當可做些許的更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。The term "coupling" in the specification of the present invention generally refers to various direct or indirect electrical connection methods. Although the present invention is disclosed as above in the preferred embodiment, it is not intended to limit the scope of the present invention. Anyone who is familiar with the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The scope of protection of the present invention shall be subject to those defined by the attached patent scope.

100‧‧‧資料儲存裝置; 110、210、310‧‧‧記憶體控制器; 120、220、320‧‧‧記憶體裝置; 230、330‧‧‧中央處理單元; 240‧‧‧直接記憶體存取裝置; 250、350‧‧‧介面邏輯電路; 260、360‧‧‧標準匯流排; 270-1、270-2、270-3、270-N、370-0、370-1、370-2、370-3、370-N‧‧‧仲裁電路; 280-1、280-2、280-3、280-N、380-2、380-3、380-N‧‧‧從屬記憶體; 231、331-1、331-2、ICCM‧‧‧指令緊密耦接記憶體 ; 232、332-1、332-2、DCCM‧‧‧資料緊密耦接記憶體; 251、351‧‧‧錯誤更正碼引擎; 333-1、333-2、333-3、333-4、343-1、343-2、343-3、343-4‧‧‧邏輯電路; 335、336、337、338、345、346、347、348‧‧‧多工器; 390、391、392、393‧‧‧靜態隨機存取記憶體匯流排。100‧‧‧Data storage device; 110, 210, 310‧‧‧Memory Controller; 120, 220, 320‧‧‧Memory device; 230, 330‧‧‧ central processing unit; 240‧‧‧Direct memory access device; 250, 350‧‧‧ interface logic circuit; 260, 360‧‧‧ standard bus; 270-1, 270-2, 270-3, 270-N, 370-0, 370-1, 370-2, 370-3, 370-N‧‧‧Arbitration circuit; 280-1, 280-2, 280-3, 280-N, 380-2, 380-3, 380-N‧‧‧Subordinate memory; 231, 331-1, 331-2, ICCM‧‧‧ instructions are tightly coupled to memory; 232, 332-1, 332-2, DCCM‧‧‧Data is tightly coupled to memory; 251, 351‧‧‧ Error correction code engine; 333-1, 333-2, 333-3, 333-4, 343-1, 343-2, 343-3, 343-4‧‧‧Logic circuit; 335, 336, 337, 338, 345, 346, 347, 348‧‧‧ multiplexer; 390, 391, 392, 393‧‧‧Static random access memory bus.

第1圖係顯示根據本發明一實施例所述之資料儲存裝置之一範例方塊圖。 第2圖係顯示一種記憶體控制器之架構。 第3圖係顯示根據本發明之一實施例所述之記憶體控制器方塊圖。 第4圖係顯示根據本發明之另一實施例所述之記憶體控制器方塊圖。FIG. 1 is a block diagram showing an example of a data storage device according to an embodiment of the invention. Figure 2 shows the architecture of a memory controller. FIG. 3 is a block diagram of the memory controller according to an embodiment of the invention. FIG. 4 shows a block diagram of a memory controller according to another embodiment of the invention.

100‧‧‧資料儲存裝置 100‧‧‧Data storage device

110‧‧‧記憶體控制器 110‧‧‧Memory Controller

120‧‧‧記憶體裝置 120‧‧‧Memory Device

Claims (12)

一種記憶體控制器,耦接至一外部裝置,包括:一中央處理單元,耦接至一標準匯流排,其中該中央處理單元包含一第一內部記憶體裝置及一第二內部記憶體裝置;以及一仲裁電路,耦接至該標準匯流排與該中央處理單元,其中該仲裁電路係依據該外部裝置所執行之一存取操作的記憶體位址以透過一靜態隨機存取記憶體匯流排以存取該第一內部記憶體裝置或該第二內部記憶體裝置。 A memory controller, coupled to an external device, includes: a central processing unit coupled to a standard bus, wherein the central processing unit includes a first internal memory device and a second internal memory device; And an arbitration circuit coupled to the standard bus and the central processing unit, wherein the arbitration circuit is based on a memory address of an access operation performed by the external device to pass through a static random access memory bus Access the first internal memory device or the second internal memory device. 如申請專利範圍第1項所述之記憶體控制器,其中該中央處理單元更包括一第一邏輯電路及一第二邏輯電路,其中該第一邏輯電路及該第二邏輯電路係依據該外部裝置執行該存取操作之一指標及該存取操作之記憶體位址以分別產生一第一選擇信號及一第二選擇信號。 For the memory controller described in claim 1, wherein the central processing unit further includes a first logic circuit and a second logic circuit, wherein the first logic circuit and the second logic circuit are based on the external The device executes an index of the access operation and the memory address of the access operation to respectively generate a first selection signal and a second selection signal. 如申請專利範圍第2項所述之記憶體控制器,其中:當由該外部裝置執行該存取操作之該指標被設起且該存取操作存取的該記憶體位址位於該第一內部記憶體裝置之記憶體位址範圍內時,該第一邏輯電路係將該第一選擇信號設定為一高邏輯狀態以選擇該外部裝置為該第一內部記憶體裝置之來源路徑,並且該第二邏輯電路係將該第二選擇信號設定為一低邏輯狀態以設定該第二內部記憶體裝置之來源路徑為該中央處理單元之一內部匯流排。 The memory controller described in claim 2, wherein: when the indicator for executing the access operation by the external device is set and the memory address accessed by the access operation is located in the first internal When the memory address range of the memory device is within the memory address range, the first logic circuit sets the first selection signal to a high logic state to select the external device as the source path of the first internal memory device, and the second logic circuit The logic circuit sets the second selection signal to a low logic state to set the source path of the second internal memory device as an internal bus of the central processing unit. 如申請專利範圍第3項所述之記憶體控制器,其中: 當由該外部裝置執行該存取操作之該指標未被設起且該存取操作存取的該記憶體位址位於該第一內部記憶體裝置之記憶體位址範圍內時,該第一邏輯電路係將該第一選擇信號設定為一低邏輯狀態以使該外部裝置可讀取該第一內部記憶體裝置,並且該第二邏輯電路係將該第二選擇信號設定為一高邏輯狀態以使該中央處理單元之內部裝置可讀取該第二內部記憶體裝置。 The memory controller described in item 3 of the scope of patent application, in which: When the indicator for executing the access operation by the external device is not set and the memory address accessed by the access operation is within the memory address range of the first internal memory device, the first logic circuit The first selection signal is set to a low logic state so that the external device can read the first internal memory device, and the second logic circuit is to set the second selection signal to a high logic state to make The internal device of the central processing unit can read the second internal memory device. 如申請專利範圍第4項所述之記憶體控制器,其中該中央處理單元更包括:一第一多工器,耦接至該第一內部記憶體裝置、該內部匯流排與該靜態隨機存取記憶體匯流排,用以根據該第一選擇信號多工傳輸來自該內部匯流排或該靜態隨機存取記憶體匯流排之資料;以及一第二多工器,耦接至該第二內部記憶體裝置、該內部匯流排與該靜態隨機存取記憶體匯流排,用以根據該第二選擇信號多工傳輸來自該內部匯流排或該靜態隨機存取記憶體匯流排之資料。 The memory controller described in claim 4, wherein the central processing unit further includes: a first multiplexer coupled to the first internal memory device, the internal bus and the static random memory Fetching a memory bus for multiplexing data from the internal bus or the static random access memory bus according to the first selection signal; and a second multiplexer coupled to the second internal The memory device, the internal bus and the static random access memory bus are used for multiplexing data from the internal bus or the static random access memory bus according to the second selection signal. 如申請專利範圍第5項所述之記憶體控制器,其中該仲裁電路透過該靜態隨機存取記憶體匯流排直接連接至該第一多工器之一輸入端以及該第二多工器之另一輸入端。 For the memory controller described in claim 5, wherein the arbitration circuit is directly connected to an input terminal of the first multiplexer and the second multiplexer through the static random access memory bus The other input. 一種資料儲存裝置,包括:一記憶體控制器,耦接至一外部裝置,其中該記憶體控制器包括:一中央處理單元,包含一第一記憶體裝置及一第二記憶體裝置;以及 一仲裁電路,耦接至該標準匯流排與該中央處理單元,其中該仲裁電路係依據該外部裝置所執行之一存取操作的記憶體位址以透過一靜態隨機存取記憶體匯流排以存取該第一內部記憶體裝置或該第二內部記憶體裝置。 A data storage device includes: a memory controller coupled to an external device, wherein the memory controller includes: a central processing unit including a first memory device and a second memory device; and An arbitration circuit is coupled to the standard bus and the central processing unit, wherein the arbitration circuit is stored through a static random access memory bus according to the memory address of an access operation performed by the external device Take the first internal memory device or the second internal memory device. 如申請專利範圍第7項所述之資料儲存裝置,其中該中央處理單元更包括一第一邏輯電路及一第二邏輯電路,其中該第一邏輯電路及該第二邏輯電路係依據該外部裝置執行該存取操作之一指標及該存取操作之記憶體位址以分別產生一第一選擇信號及一第二選擇信號。 For the data storage device described in claim 7, wherein the central processing unit further includes a first logic circuit and a second logic circuit, wherein the first logic circuit and the second logic circuit are based on the external device Perform an index of the access operation and the memory address of the access operation to generate a first selection signal and a second selection signal, respectively. 如申請專利範圍第8項所述之資料儲存裝置,其中:當由該外部裝置執行該存取操作之該指標被設起且該存取操作存取的該記憶體位址位於該第一內部記憶體裝置之記憶體位址範圍內時,該第一邏輯電路係將該第一選擇信號設定為一高邏輯狀態以選擇該外部裝置為該第一內部記憶體裝置之來源路徑,並且該第二邏輯電路係將該第二選擇信號設定為一低邏輯狀態以設定該第二內部記憶體裝置之來源路徑為該中央處理單元之一內部匯流排。 The data storage device described in item 8 of the scope of patent application, wherein: when the indicator for executing the access operation by the external device is set and the memory address accessed by the access operation is located in the first internal memory When the memory address range of the physical device is within the range of the memory address, the first logic circuit sets the first selection signal to a high logic state to select the external device as the source path of the first internal memory device, and the second logic The circuit sets the second selection signal to a low logic state to set the source path of the second internal memory device as an internal bus of the central processing unit. 如申請專利範圍第9項所述之資料儲存裝置,其中:當由該外部裝置執行該存取操作之該指標未被設起且該存取操作存取的該記憶體位址位於該第一內部記憶體裝置之記憶體位址範圍內時,該第一邏輯電路係將該第一選擇信號設定為一低邏輯狀態 以使該外部裝置可讀取該第一內部記憶體裝置,並且該第二邏輯電路係將該第二選擇信號設定為一高邏輯狀態以使該中央處理單元之內部裝置可讀取該第二內部記憶體裝置。 The data storage device described in item 9 of the scope of patent application, wherein: when the indicator for executing the access operation by the external device is not set and the memory address accessed by the access operation is located in the first internal When the memory address range of the memory device is within the memory address range, the first logic circuit sets the first selection signal to a low logic state So that the external device can read the first internal memory device, and the second logic circuit sets the second selection signal to a high logic state so that the internal device of the central processing unit can read the second Internal memory device. 如申請專利範圍第10項所述之資料儲存裝置,其中該中央處理單元更包括:一第一多工器,耦接至該第一內部記憶體裝置、該內部匯流排與該靜態隨機存取記憶體匯流排,用以根據該第一選擇信號多工傳輸來自該內部匯流排或該靜態隨機存取記憶體匯流排之資料;以及一第二多工器,耦接至該第二內部記憶體裝置、該內部匯流排與該靜態隨機存取記憶體匯流排,用以根據該第二選擇信號多工傳輸來自該內部匯流排或該靜態隨機存取記憶體匯流排之資料。 According to the data storage device described in claim 10, the central processing unit further includes: a first multiplexer coupled to the first internal memory device, the internal bus, and the static random access A memory bus for multiplexing data from the internal bus or the static random access memory bus according to the first selection signal; and a second multiplexer coupled to the second internal memory The body device, the internal bus and the static random access memory bus are used for multiplexing data from the internal bus or the static random access memory bus according to the second selection signal. 如申請專利範圍第11項所述之資料儲存裝置,其中該仲裁電路透過該靜態隨機存取記憶體匯流排直接連接至該第一多工器之一輸入端以及該第二多工器之另一輸入端。 Such as the data storage device described in claim 11, wherein the arbitration circuit is directly connected to an input terminal of the first multiplexer and the other of the second multiplexer through the static random access memory bus One input.
TW108126973A 2017-04-13 2017-04-13 Memory controller and data storage device TWI720565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108126973A TWI720565B (en) 2017-04-13 2017-04-13 Memory controller and data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108126973A TWI720565B (en) 2017-04-13 2017-04-13 Memory controller and data storage device

Publications (2)

Publication Number Publication Date
TW201941071A TW201941071A (en) 2019-10-16
TWI720565B true TWI720565B (en) 2021-03-01

Family

ID=69023171

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108126973A TWI720565B (en) 2017-04-13 2017-04-13 Memory controller and data storage device

Country Status (1)

Country Link
TW (1) TWI720565B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5584010A (en) * 1988-11-25 1996-12-10 Mitsubishi Denki Kabushiki Kaisha Direct memory access control device and method in a multiprocessor system accessing local and shared memory
TW200622613A (en) * 2004-10-27 2006-07-01 Intel Corp Mechanism to pull data into a processor cache
TW200935437A (en) * 2007-12-18 2009-08-16 Micron Technology Inc Address translation between a memory controller and an external memory device
US20140115271A1 (en) * 2012-10-24 2014-04-24 Texas Instruments Incorporated Coherence controller slot architecture allowing zero latency write commit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5584010A (en) * 1988-11-25 1996-12-10 Mitsubishi Denki Kabushiki Kaisha Direct memory access control device and method in a multiprocessor system accessing local and shared memory
TW200622613A (en) * 2004-10-27 2006-07-01 Intel Corp Mechanism to pull data into a processor cache
TW200935437A (en) * 2007-12-18 2009-08-16 Micron Technology Inc Address translation between a memory controller and an external memory device
US20140115271A1 (en) * 2012-10-24 2014-04-24 Texas Instruments Incorporated Coherence controller slot architecture allowing zero latency write commit

Also Published As

Publication number Publication date
TW201941071A (en) 2019-10-16

Similar Documents

Publication Publication Date Title
TWI611296B (en) Memory controller and data storage device
US10002085B2 (en) Peripheral component interconnect (PCI) device and system including the PCI
US20170322897A1 (en) Systems and methods for processing a submission queue
JP5032027B2 (en) Semiconductor disk control device
US20180113615A1 (en) Storage device generating adaptive interrupt and operating method thereof
US8327040B2 (en) Host controller
US11169736B2 (en) Data storage device equipped to reduce page faults in host device
US9411537B2 (en) Embedded multimedia card (EMMC), EMMC system including the EMMC, and method of operating the EMMC
US9052835B1 (en) Abort function for storage devices by using a poison bit flag wherein a command for indicating which command should be aborted
US20060245274A1 (en) Apparatus and method for controlling NAND flash memory
US20100185811A1 (en) Data processing system and method
US10409512B2 (en) Method of operating storage controller and method of operating data storage device having the storage controller
US20140040680A1 (en) Memory control device and control method
TWI820603B (en) Method for performing access control with aid of multi-phase memory-mapped queue, system-on-chip integrated circuit, memory device, and controller of memory device
CN108304334B (en) Application processor and integrated circuit including interrupt controller
US8266361B1 (en) Access methods and circuits for devices having multiple buffers
US20150242141A1 (en) Memory device and data storing method
US10108469B2 (en) Microcomputer and microcomputer system
CN113778328A (en) Directing control data between semiconductor packages
US20150046759A1 (en) Semiconductor integrated circuit device
US8489978B2 (en) Error detection
TWI676104B (en) Memory controller and data storage device
TWI720565B (en) Memory controller and data storage device
US20230133559A1 (en) Method and apparatus for performing data access control of memory device with aid of predetermined command
CN116361233A (en) Micro controller