TWI408553B - A memory management system and a memory management method - Google Patents

A memory management system and a memory management method Download PDF

Info

Publication number
TWI408553B
TWI408553B TW97118249A TW97118249A TWI408553B TW I408553 B TWI408553 B TW I408553B TW 97118249 A TW97118249 A TW 97118249A TW 97118249 A TW97118249 A TW 97118249A TW I408553 B TWI408553 B TW I408553B
Authority
TW
Taiwan
Prior art keywords
memory
block
data
access
switching
Prior art date
Application number
TW97118249A
Other languages
Chinese (zh)
Other versions
TW200949540A (en
Inventor
Chien Long Kao
Yi Chih Hsin
Original Assignee
Sonix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sonix Technology Co Ltd filed Critical Sonix Technology Co Ltd
Priority to TW97118249A priority Critical patent/TWI408553B/en
Publication of TW200949540A publication Critical patent/TW200949540A/en
Application granted granted Critical
Publication of TWI408553B publication Critical patent/TWI408553B/en

Links

Landscapes

  • Memory System (AREA)

Abstract

A memory management system and a memory management method are disclosed. The memory management system includes a main memory, a least one secondary memory and a memory management device. The main memory includes a normal access memory bank and a least one switching access memory bank. The secondary memory includes at least one secondary access memory bank corresponding to the switching access memory bank. The memory management device read/write the normal access memory bank or the secondary access memory bank.

Description

記憶體管理系統與方法Memory management system and method

本發明係有關於一種記憶體存取技術,特別是關於一種記憶體管理系統與管理方法。The present invention relates to a memory access technology, and more particularly to a memory management system and management method.

一般微處理系統對於其所能定址的範圍,係受限於位址匯流排的位址線數目。以現今數位系統而言,處理器定址範圍為二的位址線數次方,例如16條位址線,其可定址的範圍為二的16次方,即65536個位址。然而,在大部分的八位元微處理系統中,因架構及成本考量,都會盡量減少位址線數,故在應用上常會受限於微處理系統的定址能力,而無法增加更多的記憶體於微處理系統中,導致微處理系統功能受限制。The range of address points that a typical microprocessor system can address is limited by the number of address lines in the address bus. In the case of today's digital systems, the processor addresses the number of address lines of two, for example, 16 address lines, which can be addressed in the range of two to the 16th power, that is, 65,536 addresses. However, in most octet microprocessor systems, due to architecture and cost considerations, the number of address lines is minimized. Therefore, the application is often limited by the addressing capability of the microprocessor system, and it is impossible to add more memory. In the micro-processing system, the function of the micro-processing system is limited.

在微處理系統中,記憶體是一種極重要的關鍵資源。而記憶體的大小受限於微處理機的定址範圍,以及整體系統的成本。因此如何在各項因素的適當考量下,提供最大的記憶體資源供系統使用,是一個相當重要的課題。Memory is a critical resource in microprocessor systems. The size of the memory is limited by the addressing range of the microprocessor and the cost of the overall system. Therefore, how to provide the largest memory resources for system use under the appropriate consideration of various factors is a very important issue.

針對上述問題,本發明之目的之一在提供一種記憶體管理系統與方法,而可達成減少實體位址線之接腳、提高記憶體擴充之彈性、以及降低生產成本之功效。In view of the above problems, one of the objects of the present invention is to provide a memory management system and method, which can achieve the effects of reducing the pin of the physical address line, improving the flexibility of memory expansion, and reducing the production cost.

本發明之一實施例提供了一種記憶體管理系統。該記憶體管理系統包含有一主記憶體、至少一次級記憶體、以及一記憶體管理裝置。該主記憶體包含有一正常存取區塊與至少一切換存取區塊。次級記憶體包含有對應切換存取 區塊之至少一次資料區塊。而記憶體管理裝置係根據至少一要求訊號讀寫正常存取區塊或次資料區塊;其中,當要求訊號要求讀寫次資料區塊時,記憶體管理裝置將該次資料區塊之資料搬移至切換存取區塊、或將一欲寫入之資料透過切換存取區塊之映射寫入次資料區塊。An embodiment of the present invention provides a memory management system. The memory management system includes a main memory, at least one level memory, and a memory management device. The main memory includes a normal access block and at least one switch access block. Secondary memory contains corresponding switch access At least one data block of the block. The memory management device reads and writes the normal access block or the secondary data block according to the at least one request signal; wherein, when the request signal requires reading and writing the secondary data block, the memory management device reads the data of the data block Move to the switch access block, or write a data to be written to the secondary data block through the mapping of the switch access block.

本發明之另一實施例提供了一種記憶體管理系統。該記憶體管理系統包含有一記憶體切換控制器、一主記憶體、至少一次級記憶體、以及一直接記憶體存取控制器。 該記憶體切換控制器根據至少一要求訊號,產生一控制訊號。主記憶體包含有一正常存取區塊與至少一切換存取區塊,且根據控制訊號決定如何切換該些存取區塊、及如何讀寫正常存取區塊或切換存取區塊。次級記憶體包含有對應切換存取區塊之至少一次資料區塊。而直接記憶體存取控制器係根據控制訊號將次資料區塊之資料搬移至切換存取區塊、或將一欲寫入之資料透過切換存取區塊之映射寫入次資料區塊。Another embodiment of the present invention provides a memory management system. The memory management system includes a memory switching controller, a main memory, at least one level memory, and a direct memory access controller. The memory switching controller generates a control signal according to at least one request signal. The main memory includes a normal access block and at least one switching access block, and determines how to switch the access blocks according to the control signal, and how to read and write the normal access block or switch the access block. The secondary memory includes at least one data block corresponding to the switched access block. The direct memory access controller moves the data of the secondary data block to the switching access block according to the control signal, or writes the data to be written into the secondary data block through the mapping of the switching access block.

本發明之另一實施例提供了一種記憶體管理系統。該記憶體管理系統包含有一主記憶體、至少一次資料區塊、以及一記憶體管理裝置。該主記憶體包含有一正常存取區塊與至少一切換存取區塊。次資料區塊對應該切換存取區塊。而記憶體管理裝置係用以讀寫正常存取區塊或次資料區塊。其中,當記憶體管理裝置讀寫次資料區塊時,記憶體管理裝置會將次資料區塊之資料搬移至切換存取區塊、或將一欲寫入之資料透過切換存取區塊之映射寫入次資料區塊。Another embodiment of the present invention provides a memory management system. The memory management system includes a main memory, at least one data block, and a memory management device. The main memory includes a normal access block and at least one switch access block. The secondary data block corresponds to the switching access block. The memory management device is used to read and write a normal access block or a secondary data block. Wherein, when the memory management device reads and writes the secondary data block, the memory management device moves the data of the secondary data block to the switching access block, or passes the data to be written through the switching access block. The map is written to the secondary data block.

本發明之另一實施例提供了一種記憶體管理方法。該方法包含下列步驟。首先,提供一正常存取區塊與至少一切換存取區塊。提供至少一次資料區塊,次資料區塊係對應一切換存取區塊。接著,接收一要求訊號,要求訊號包含有至少一位址、至少一欲寫入之資料其中之一或兩者。之後,根據要求訊號決定讀寫正常存取區塊或次資料區塊;當要求訊號提供之位址係位於正常存取區塊之定址範圍時,讀取正常存取區塊對應該位址之資料,或將欲寫入之資料寫入正常存取區塊;當要求訊號提供之位址係位於次資料區塊之定址範圍時,將該次資料區塊對應該位址之資料搬移至切換存取區塊、並於切換存取區塊讀取該資料,或將欲寫入之資料透過切換存取區塊之映射寫入次資料區塊。Another embodiment of the present invention provides a memory management method. The method includes the following steps. First, a normal access block and at least one switch access block are provided. The data block is provided at least once, and the secondary data block corresponds to a switch access block. Then, receiving a request signal, the request signal includes at least one address, at least one of the information to be written, or both. After that, according to the request signal, the normal access block or the secondary data block is read and written; when the address requested by the signal is located in the address range of the normal access block, the normal access block is read to correspond to the address. Data, or write the data to be written into the normal access block; when the address requested by the signal is located in the address range of the secondary data block, the data corresponding to the address of the data block is moved to the switch The block is accessed, and the data is read in the switch access block, or the data to be written is written into the secondary data block through the mapping of the switch access block.

本發明實施例之記憶體管理系統與管理方法,係於主記憶體中規畫出正常存取區塊與至少一切換存取區塊,並配合切換存取區塊之映射,來讀寫次級記憶體之次資料區塊。依此方式,本發明實施例之記憶體管理系統與管理方法便可在有限的記憶體定址範圍條件下,由使用者或設計人員無限制地擴充定址數目與記憶體空間,而達成減少記憶體定址所須之接腳數目、彈性擴充記憶體空間、並降低整體系統成本之功效。The memory management system and the management method of the embodiment of the present invention are configured to map a normal access block and at least one switch access block in the main memory, and cooperate with the mapping of the switch access block to read and write times. The secondary data block of the level memory. In this way, the memory management system and the management method of the embodiment of the present invention can reduce the number of addresses and the memory space without limitation by the user or the designer under a limited memory address range, thereby achieving a reduction in memory. The number of pins required for addressing, the flexibility to expand memory space, and the overall system cost.

第1A圖顯示本發明一實施例之記憶體管理系統之示意圖。該記憶體管理系統100包含一處理器(Processor)101、一主記憶體102、一次級記憶體103、以及一記憶體管理裝置104。Fig. 1A is a view showing a memory management system according to an embodiment of the present invention. The memory management system 100 includes a processor 101, a main memory 102, a primary memory 103, and a memory management device 104.

該處理器101,可為中央處理器(Central processing unit, CPU)、微處理機(Microprocessor unit,MPU)、微控器(Microprocessor control unit,MCU)、其他現有或未來發展出之各種處理裝置。處理器101係用以發出一要求訊號Rq,藉以存取記憶體之資料。The processor 101 can be a central processing unit (Central processing unit, CPU), Microprocessor unit (MPU), Microprocessor control unit (MCU), and other existing or future development of various processing devices. The processor 101 is configured to issue a request signal Rq for accessing data of the memory.

主記憶體102可為靜態隨機存取記憶體(Static Random Access Memory,SRAM)、目前現有或未來發展出之各種記憶體。主記憶體102包含有一正常存取區塊與至少一切換存取區塊。一實施例,如第1B圖所示,主記憶體102之記憶體空間包含有一正常存取區塊Nab與一切換存取區塊Sab。須注意,本實施例中,主記憶體102僅包含一切換存取區塊Sab;而於另一實施例中,主記憶體102亦可包含複數個切換存取區塊Sab。The main memory 102 can be a static random access memory (SRAM), a variety of memory currently available or developed in the future. The main memory 102 includes a normal access block and at least one switch access block. In one embodiment, as shown in FIG. 1B, the memory space of the main memory 102 includes a normal access block Nab and a switch access block Sab. It should be noted that, in this embodiment, the main memory 102 includes only one switching access block Sab; in another embodiment, the main memory 102 may also include a plurality of switching access blocks Sab.

次級記憶體103可為快閃記憶體(Flash memory)、硬碟(Hard disc/disk)、光碟(Optical disc/disk)其中之一或其組合,或其他現有或未來發展出之各種儲存裝置。次級記憶體103包含有至少一對應切換存取區塊之次資料區塊。一實施例,如第1B圖所示,次級記憶體103包含有N(N為正整數,且小於無限大)個次資料區塊Sub1~SubN。次資料區塊Sub1~SubN係對應切換存取區塊Sab,亦即表示切換存取區塊Sab存有次資料區塊Sub1~SubN之位址,在系統進行資料置換時可利用該些位址來進行資料映射,以將任一次資料區塊Sub1~SubN之資料搬移至切換存取區塊。當然,亦可根據該些位址透過切換存取區塊Sab之映射,將資料寫入任一次資料區塊Sub1~SubN。另外,次資料區塊Sub1~SubN之大小等於切換存取區塊Sab之大小,且次資料區塊Sub1~SubN可儲存處理器101所須使用之程式碼(Codes)。The secondary memory 103 can be one of a flash memory, a hard disc (disk), an optical disc (disk), or a combination thereof, or other storage devices that are currently or in the future. . The secondary memory 103 includes at least one secondary data block corresponding to the switched access block. In one embodiment, as shown in FIG. 1B, the secondary memory 103 includes N (N is a positive integer, and is less than infinite) secondary data blocks Sub1 to SubN. The sub-data block Sub1~SubN corresponds to the switching access block Sab, that is, the switching access block Sab stores the address of the sub-data block Sub1~SubN, and the address can be utilized when the system performs data replacement. Data mapping is performed to move the data of any of the data blocks Sub1~SubN to the switching access block. Of course, the data may be written into any of the data blocks Sub1~SubN according to the mapping of the addresses by switching the access block Sab. In addition, the size of the secondary data blocks Sub1~SubN is equal to the size of the switching access block Sab, and the secondary data blocks Sub1~SubN can store the codes (Codes) used by the processor 101.

記憶體管理裝置104係根據至少一要求訊號Rq讀取(存取)或 將資料寫入主記憶體102之正常存取區塊Nab或對應切換存取區塊Sab之任一次資料區塊Sub1~SubN。其中,當要求訊號Rq要求讀取(存取)任一次資料區塊Sub1~SubN時,記憶體管理裝置104根據該要求訊號Rq提供之位址將指定之一次資料區塊Sub1~SubN之資料搬移至切換存取區塊Sab、或根據該要求訊號Rq提供之資料與位址,將微處理器101欲寫入之該資料透過切換存取區塊Sab之映射寫入該位址指定之一次資料區塊Sub1~SubN。須注意,若要求訊號Rq要求讀取之資料已存放於切換存取區塊Sab,則記憶體管理裝置104直接存取將該資料。另外,記憶體管理裝置104所讀取到之資料係根據要求訊號Rq之指令來決定傳送至何處,本實施例中,要求訊號Rq係要求將資料傳送給微處理器101;另一實施例中,要求訊號Rq亦可要求將資料傳送給系統內部或外部(未圖示)之其他裝置。The memory management device 104 reads (accesses) or according to at least one request signal Rq or The data is written into the normal access block Nab of the main memory 102 or the data blocks Sub1~SubN of the corresponding switching access block Sab. When the request signal Rq is required to read (access) any of the data blocks Sub1~SubN, the memory management device 104 moves the data of the designated data block Sub1~SubN according to the address provided by the request signal Rq. Up to the switching access block Sab, or according to the data and address provided by the request signal Rq, the data to be written by the microprocessor 101 is written into the data specified by the address through the mapping of the switching access block Sab. Blocks Sub1~SubN. It should be noted that if the data required to be read by the request signal Rq has been stored in the switching access block Sab, the memory management device 104 directly accesses the data. In addition, the data read by the memory management device 104 determines where to transmit according to the instruction of the request signal Rq. In this embodiment, the request signal Rq is required to transmit data to the microprocessor 101; another embodiment The request signal Rq may also request that the data be transmitted to other devices inside or outside the system (not shown).

一實施例,如第1A圖所示,記憶體管理裝置104包含有一記憶體切換控制器104a與一直接記憶體存取控制器(Direct memory access,DMA)104b。記憶體切換控制器104a係根據要求訊號Rq,產生一控制訊號C。直接記憶體存取控制器104b根據該控制訊號C來決定如何存取次資料區塊Sub1~SubN,以將次資料區塊Sub1~SubN之資料搬移至切換存取區塊Sab、或將微處理器101欲寫入之資料透過切換存取區塊Sab之映射寫入次資料區塊Sub1~SubN。In one embodiment, as shown in FIG. 1A, the memory management device 104 includes a memory switching controller 104a and a direct memory access controller (DMA) 104b. The memory switching controller 104a generates a control signal C based on the request signal Rq. The direct memory access controller 104b determines how to access the secondary data blocks Sub1~SubN according to the control signal C, to move the data of the secondary data blocks Sub1~SubN to the switching access block Sab, or to process the micro processing. The data to be written by the device 101 is written into the secondary data blocks Sub1 to SubN through the mapping of the switching access block Sab.

以下參考第1A、1B圖詳細說明本發明實施例記憶體管理系統之運作方式。The operation of the memory management system of the embodiment of the present invention will be described in detail below with reference to FIGS. 1A and 1B.

首先,當處理器101須存取一資料(程式碼)D時,其會傳送一 要求訊號Rq給記憶體切換控制器104a。此時,記憶體切換控制器104a將根據要求訊號Rq提供之位址資訊,產生一控制訊號C。之後,主記憶體102與直接記憶體存取控制器104b接收該控制訊號C。First, when the processor 101 has to access a data (code) D, it will transmit a The request signal Rq is supplied to the memory switching controller 104a. At this time, the memory switching controller 104a generates a control signal C according to the address information provided by the request signal Rq. Thereafter, the main memory 102 and the direct memory access controller 104b receive the control signal C.

接著,假設要求訊號Rq提供之位址係位於主記憶體102定址範圍中之正常存取區塊Nba,則直接記憶體存取控制器104b不動作;而主記憶體102根據控制訊號C將對應該位址之程式碼D透過記憶體切換控制器104a傳送給處理器101。Next, assuming that the address provided by the request signal Rq is located in the normal access block Nba in the address range of the main memory 102, the direct memory access controller 104b does not operate; and the main memory 102 is paired according to the control signal C. The code D of the address should be transmitted to the processor 101 via the memory switching controller 104a.

再者,假設要求訊號Rq提供之位址係位於主記憶體102定址範圍外之次資料區塊Sub1~SubN,則記憶體切換控制器104a將會判斷主記憶體102之切換存取區塊sab內是否已存有對應該位址之程式碼D,若有,則將存於切換存取區塊sab之程式碼D,透過記憶體切換控制器104a傳送至中央處裡器101;若無,記憶體切換控制器104a將利用控制訊號C驅動直接記憶體存取控制器104b。接著,直接記憶體存取控制器104b將存於對應該位址之次資料區塊Sub1~SubN之程式碼D儲存至切換存取區塊Sab。之後,記憶體切換控制器104a再將存於切換存取區塊Sab之程式碼D傳輸至處理器101。依此方式,本發明實施例之記憶體管理系統100可在原本有限的記憶體定址範圍之外,額外增加記憶體定址範圍,而不須增加記憶體定址所須之實體位址接腳數目。Furthermore, assuming that the address provided by the request signal Rq is located in the secondary data blocks Sub1~SubN outside the address range of the main memory 102, the memory switching controller 104a will determine the switching access block sab of the main memory 102. Is there a code D corresponding to the address, if any, the code D stored in the switching access block sab is transmitted to the central unit 101 through the memory switching controller 104a; if not, The memory switching controller 104a will drive the direct memory access controller 104b with the control signal C. Next, the direct memory access controller 104b stores the code D stored in the secondary data blocks Sub1 to SubN corresponding to the address to the switching access block Sab. Thereafter, the memory switching controller 104a transmits the code D stored in the switching access block Sab to the processor 101. In this manner, the memory management system 100 of the embodiment of the present invention can additionally increase the memory address range beyond the originally limited memory address range, without increasing the number of physical address pins required for memory addressing.

須注意者,以上僅說明本發明實施例記憶體管理系統在讀取資料時之運作方式;然而,熟悉本領域之技術者應能夠根據上述說明,得知本發明實施例記憶體管理系統在寫入資料時是如何運作,因此不再重複贅述寫入資料之運作方式。另外,本發明記憶體管理 裝置104、及其實施例之記憶體切換控制器104a與直接記憶體存取控制器104b係可利用軟體、韌體、或硬體其中之一或其組合之方式來實施。It should be noted that the foregoing only describes the operation mode of the memory management system of the embodiment of the present invention when reading data; however, those skilled in the art should be able to learn from the above description that the memory management system of the embodiment of the present invention is writing. How it works when entering data, so the way in which data is written is not repeated. In addition, the memory management of the present invention The device 104, and the memory switching controller 104a and the direct memory access controller 104b of the embodiments thereof may be implemented by one or a combination of software, firmware, or hardware.

如第2圖所示,另一實施例中,本發明之記憶體管理系統100’亦可利用一匯流排Bus與複數個直接記憶體存取控制器104b、104b’…複數個次級記憶體103、103’進行資料溝通與讀寫動作。藉此可達成記憶體擴充之功效。As shown in FIG. 2, in another embodiment, the memory management system 100' of the present invention can also utilize a busbar Bus and a plurality of direct memory access controllers 104b, 104b'...a plurality of secondary memories. 103, 103' for data communication and reading and writing. Thereby the effect of memory expansion can be achieved.

第3A、3B圖係顯示本發明一實施例之一種記憶體管理方法,其包含下列步驟: 步驟S302:開始。3A and 3B are diagrams showing a memory management method according to an embodiment of the present invention, which includes the following steps: Step S302: Start.

步驟S304:提供一正常存取區塊與至少一切換存取區塊。Step S304: providing a normal access block and at least one switch access block.

步驟S306:提供至少一次資料區塊,該次資料區塊係對應一該切換存取區塊。Step S306: Provide at least one data block, and the data block corresponds to one of the switch access blocks.

步驟S308:接收一要求訊號,該要求訊號包含有至少一位址、至少一欲寫入之資料其中之一或兩者。Step S308: Receive a request signal, the request signal includes at least one address, at least one of the information to be written, or both.

步驟S310:判斷要求訊號提供之位址是否位於正常存取區塊之定址範圍,若是,跳至步驟S312;若否,跳至步驟S314。Step S310: determining whether the address provided by the request signal is located in the address range of the normal access block, and if yes, skipping to step S312; if not, skipping to step S314.

步驟S312:讀取正常存取區塊對應該位址之資料,或將欲寫入之資料寫入正常存取區塊。Step S312: Read the data of the normal access block corresponding to the address, or write the data to be written into the normal access block.

步驟S314:判斷要求訊號提供之位址是否位於次資料區塊之定址範圍,若是,跳至步驟S316;若否,跳至步驟S322。Step S314: It is judged whether the address provided by the request signal is located in the address range of the secondary data block, and if yes, the process goes to step S316; if not, the process goes to step S322.

步驟S316:判斷對應該位址之資料是否已存於切換存取區塊,若是,跳至步驟,S318,若否跳至步驟S320。Step S316: It is judged whether the data corresponding to the address is already stored in the switching access block, and if so, the process goes to step S318, and if no, the process goes to step S320.

步驟S318:讀取切換存取區塊之該資料。Step S318: Read the data of the switching access block.

步驟S320:將次資料區塊對應該位址之資料搬移至切換存取區塊、並於切換存取區塊讀取該資料,或將欲寫入之資料透過切換存取區塊之映射寫入次資料區塊。Step S320: Move the data corresponding to the address of the secondary data block to the switching access block, and read the data in the switching access block, or write the data to be written through the mapping of the switching access block. Enter the data block.

步驟S322:結束。Step S322: End.

本發明實施例之記憶體管理系統與管理方法,係於主記憶體中規畫出正常存取區塊與至少一切換存取區塊,並配合切換存取區塊之映射,來讀寫次級記憶體之次資料區塊。依此方式,本發明實施例之記憶體管理系統與管理方法便可在有限的記憶體定址範圍條件下,由使用者或設計人員無限制地擴充定址數目與記憶體空間。亦即,不需更多的主記憶體空間,而是利用主記憶體既有的空間作為交換區塊,與次級記憶體交換資料。因此,達成減少記憶體定址所須之接腳數目、可彈性地擴充記憶體空間、並降低整體系統成本之功效。The memory management system and the management method of the embodiment of the present invention are configured to map a normal access block and at least one switch access block in the main memory, and cooperate with the mapping of the switch access block to read and write times. The secondary data block of the level memory. In this way, the memory management system and the management method of the embodiment of the present invention can expand the number of addresses and the memory space without limitation by the user or the designer under a limited memory address range. That is, instead of requiring more main memory space, the existing memory of the main memory is used as an exchange block to exchange data with the secondary memory. Therefore, the number of pins required to reduce the memory address, the flexibility to expand the memory space, and the overall system cost are achieved.

100、100’‧‧‧記憶體管理系統100, 100’‧‧‧ Memory Management System

101‧‧‧處理器101‧‧‧ processor

102‧‧‧主記憶體102‧‧‧ main memory

103、103’‧‧‧次級記憶體103, 103’‧‧‧ secondary memory

104‧‧‧記憶體管理裝置104‧‧‧Memory management device

104a‧‧‧記憶體切換控制器104a‧‧‧Memory Switching Controller

104b、104b’‧‧‧直接記憶體存取控制器104b, 104b'‧‧‧ Direct Memory Access Controller

第1A圖顯示本發明一實施例之記憶體管理系統之示意圖。Fig. 1A is a view showing a memory management system according to an embodiment of the present invention.

第1B圖顯示第1A圖之主記憶體與次級記憶體記憶空間配置之示意圖。Fig. 1B is a diagram showing the memory space configuration of the main memory and the secondary memory in Fig. 1A.

第2圖顯示本發明另一實施例之記憶體管理系統之示意圖。Fig. 2 is a view showing a memory management system according to another embodiment of the present invention.

第3A、3B圖顯示本發明一實施例之記憶體管理方法之流程圖。3A and 3B are flowcharts showing a memory management method according to an embodiment of the present invention.

100‧‧‧記憶體管理系統100‧‧‧Memory Management System

101‧‧‧處理器101‧‧‧ processor

102‧‧‧主記憶體102‧‧‧ main memory

103‧‧‧次級記憶體103‧‧‧ secondary memory

104‧‧‧記憶體管理裝置104‧‧‧Memory management device

104a‧‧‧記憶體切換控制器104a‧‧‧Memory Switching Controller

104b‧‧‧直接記憶體存取控制器104b‧‧‧Direct Memory Access Controller

Claims (14)

一種記憶體管理系統,包含有:一記憶體切換控制器,根據至少一要求訊號,產生一控制訊號;一主記憶體,包含有一正常存取區塊與至少一切換存取區塊,且根據該控制訊號決定如何切換該些存取區塊、及如何讀寫該正常存取區塊或該切換存取區塊;至少一次級記憶體,包含有對應該切換存取區塊之至少一次資料區塊;一直接記憶體存取控制器,係根據該控制訊號將次資料區塊之資料搬移至該切換存取區塊、或將一欲寫入之資料透過該切換存取區塊之映射寫入該次資料區塊;以及一處理器,用以發出該要求訊號,且該要求訊號包含有至少一位址資訊與至少一該欲寫入之資料;其中當該要求訊號之該位址位於該次資料區塊時,該記憶體切換控制器透過該直接記憶體存取控制器將存於該次資料區塊對應該位址之資料搬移至該切換存取區塊,且存於該切換存取區塊之該資料輸出。 A memory management system includes: a memory switching controller, generating a control signal according to at least one request signal; a main memory comprising a normal access block and at least one switching access block, and according to The control signal determines how to switch the access blocks, and how to read and write the normal access block or the switch access block; at least one level of memory, including at least one data corresponding to the switch access block a direct memory access controller that moves data of a secondary data block to the switched access block or maps a data to be written through the switched access block according to the control signal Writing to the data block; and a processor for issuing the request signal, wherein the request signal includes at least one address information and at least one of the information to be written; wherein the address of the request signal When the data switching block is located in the data block, the memory switching controller moves the data corresponding to the address stored in the data block to the switching access block through the direct memory access controller, and stores the data in the switching access block. The exchange of data output block access. 如申請專利範圍第1項記載之記憶體管理系統,其中,當該要求訊號之該位址係位於該正常存取區塊時,該記憶體切換控制器根據該位址讀寫該正常存取區塊。 The memory management system of claim 1, wherein when the address of the request signal is located in the normal access block, the memory switching controller reads and writes the normal access according to the address Block. 如申請專利範圍第1項記載之記憶體管理系統,其中,當該要求訊號之該位址位於該次資料區塊時,該記憶體切換控制器透過該直接記憶體存取控制器將該欲寫入之資料存於該切 換存取區塊,再將該切換存取區塊儲存之該資料寫入該次資料區塊。 The memory management system of claim 1, wherein when the address of the request signal is located in the data block, the memory switching controller transmits the desire through the direct memory access controller The data written is stored in the cut The access block is exchanged, and the data stored in the switch access block is written into the data block. 如申請專利範圍第1項記載之記憶體管理系統,其中,當該要求訊號指定存取該正常存取區塊之資料時,該記憶體切換控制器存取該正常存取區塊之資料。 The memory management system of claim 1, wherein the memory switching controller accesses the data of the normal access block when the request signal specifies access to the data of the normal access block. 如申請專利範圍第1項記載之記憶體管理系統,其中該主記憶體係根據位址資訊來決定讀寫該正常存取區塊或該次資料區塊。 The memory management system of claim 1, wherein the main memory system determines to read or write the normal access block or the data block according to the address information. 如申請專利範圍第1項記載之記憶體管理系統,其中該次級記憶體為快閃記憶體、硬碟、光碟其中之一或其組合。 The memory management system of claim 1, wherein the secondary memory is one of a flash memory, a hard disk, a compact disk, or a combination thereof. 如申請專利範圍第1項記載之記憶體管理系統,其中該記憶體管理裝置係利用軟體、韌體、或硬體其中之一或其組合來實施。 The memory management system according to claim 1, wherein the memory management device is implemented by one or a combination of a soft body, a firmware, or a hardware. 一種記憶體管理系統,包含有:一記憶體切換控制器,根據至少一要求訊號,產生一控制訊號;一主記憶體,包含有一正常存取區塊與至少一切換存取區塊,且根據該控制訊號決定如何切換該些存取區塊、及如何讀寫該正常存取區塊或該切換存取區塊;至少一次級記憶體,包含有對應該切換存取區塊之至少一次資料區塊;以及一直接記憶體存取控制器,係根據該控制訊號將次資料區塊之資料搬移至該切換存取區塊、或將一欲寫入之資料透過該切換存取區塊之映射寫入該次資料區塊; 其中,當該要求訊號指定存取該次資料區塊之資料時,該記憶體切換控制器透過該直接記憶體存取控制器將存於該次資料區塊之資料搬移至該切換存取區塊,且該記憶體切換控制器將存於該切換存取區塊之該資料輸出。 A memory management system includes: a memory switching controller, generating a control signal according to at least one request signal; a main memory comprising a normal access block and at least one switching access block, and according to The control signal determines how to switch the access blocks, and how to read and write the normal access block or the switch access block; at least one level of memory, including at least one data corresponding to the switch access block And a direct memory access controller, wherein the data of the secondary data block is moved to the switching access block according to the control signal, or a data to be written is transmitted through the switching access block. The mapping is written to the data block; The memory switching controller moves the data stored in the data block to the switching access area through the direct memory access controller when the request signal specifies access to the data of the data block. And the memory switching controller outputs the data stored in the switching access block. 如申請專利範圍第8項記載之記憶體管理系統,其中,當該要求訊號指定將該欲寫入之資料寫入該次資料區塊,該記憶體切換控制器透過該直接記憶體存取控制器將該資料存於該切換存取區塊,再將該切換存取區塊儲存之該資料寫入該次資料區塊。 The memory management system of claim 8, wherein the memory switching controller performs the direct memory access control when the request signal specifies that the data to be written is written into the data block. The device stores the data in the switching access block, and then writes the data stored in the switching access block to the secondary data block. 如申請專利範圍第8項記載之記憶體管理系統,其中該記憶體切換控制器係將存於該正常存取區塊、或該次資料區塊之資料傳輸至一處理器。 The memory management system of claim 8, wherein the memory switching controller transmits the data stored in the normal access block or the data block to a processor. 如申請專利範圍第8項記載之記憶體管理系統,其中該記憶體管理裝置係利用軟體、韌體、或硬體其中之一或其組合來實施。 The memory management system of claim 8, wherein the memory management device is implemented by one or a combination of a soft body, a firmware, or a hardware. 如申請專利範圍第8項記載之記憶體管理系統,其中該次級記憶體為快閃記憶體、硬碟、光碟其中之一或其組合。 The memory management system of claim 8, wherein the secondary memory is one of a flash memory, a hard disk, a compact disk, or a combination thereof. 如申請專利範圍第8項記載之記憶體管理系統,其中,當該要求訊號指定存取該正常存取區塊之資料時,該記憶體切換控制器存取該正常存取區塊之資料。 The memory management system of claim 8, wherein the memory switching controller accesses the data of the normal access block when the request signal specifies access to the data of the normal access block. 如申請專利範圍第8項記載之記憶體管理系統,其中該主記憶體係根據位址資訊來決定讀寫該正常存取區塊或該次資料區塊。 The memory management system of claim 8, wherein the main memory system determines to read and write the normal access block or the data block according to the address information.
TW97118249A 2008-05-16 2008-05-16 A memory management system and a memory management method TWI408553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97118249A TWI408553B (en) 2008-05-16 2008-05-16 A memory management system and a memory management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97118249A TWI408553B (en) 2008-05-16 2008-05-16 A memory management system and a memory management method

Publications (2)

Publication Number Publication Date
TW200949540A TW200949540A (en) 2009-12-01
TWI408553B true TWI408553B (en) 2013-09-11

Family

ID=44870997

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97118249A TWI408553B (en) 2008-05-16 2008-05-16 A memory management system and a memory management method

Country Status (1)

Country Link
TW (1) TWI408553B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01246649A (en) * 1988-03-29 1989-10-02 Toshiba Corp Memory system
US5396619A (en) * 1993-07-26 1995-03-07 International Business Machines Corporation System and method for testing and remapping base memory for memory diagnostics
CN1577292A (en) * 2003-07-28 2005-02-09 深圳市朗科科技有限公司 Memory control chip and data memory control method
US20060149888A1 (en) * 2004-12-31 2006-07-06 Vimicro Corporation Method and apparatus for extending memory addressing
CN101034375A (en) * 2007-02-12 2007-09-12 忆正存储技术(深圳)有限公司 Computer memory system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01246649A (en) * 1988-03-29 1989-10-02 Toshiba Corp Memory system
US5396619A (en) * 1993-07-26 1995-03-07 International Business Machines Corporation System and method for testing and remapping base memory for memory diagnostics
CN1577292A (en) * 2003-07-28 2005-02-09 深圳市朗科科技有限公司 Memory control chip and data memory control method
US20060149888A1 (en) * 2004-12-31 2006-07-06 Vimicro Corporation Method and apparatus for extending memory addressing
CN101034375A (en) * 2007-02-12 2007-09-12 忆正存储技术(深圳)有限公司 Computer memory system

Also Published As

Publication number Publication date
TW200949540A (en) 2009-12-01

Similar Documents

Publication Publication Date Title
US10891236B2 (en) Data storage device and operating method thereof
US7299323B2 (en) Memory controller having a read-modify-write function
US10943635B2 (en) Memory device shared by two or more processors and system including the same
JP2017220237A (en) Memory module, system including the same, and method for operating the same
CN102033734B (en) Data processing engine
CN101473438A (en) Hybrid memory device with single interface
JP5209461B2 (en) Data transfer between devices in an integrated circuit
KR100312888B1 (en) Circuit of generating chip enable signal and memory device
US10372338B2 (en) Memory controller and data processing circuit with improved system efficiency
KR101594029B1 (en) Method and system for manipulating data
CN106802870B (en) high-efficiency Nor-Flash controller of embedded system chip and control method
US8402199B2 (en) Memory management system and method thereof
US20060059320A1 (en) Memory control device
WO2017151262A1 (en) Method and apparatus for providing a contiguously addressable memory region by remapping an address space
CN112199040A (en) Storage access method and intelligent processing device
CN101290602B (en) Memory management method and system
TWI408553B (en) A memory management system and a memory management method
US20220366949A1 (en) Electronic device, operation method of host, operation method of memory module, and operation method of memory device
CN101488119B (en) Address interpretation method, apparatus and single-board
US11487469B2 (en) Apparatus and method for controlling access to memory module
US7453760B2 (en) Method for accessing dual-port memory
US6813647B2 (en) Microcomputer system reading data from secondary storage medium when receiving upper address from outside and writing data to primary storage medium
US20100217957A1 (en) Structured Virtual Registers for Embedded Controller Devices
EP2163990A1 (en) Memory management system and method thereof
JP2008282415A (en) Memory management system, and its management method