TW202009698A - Method and computer program product and apparatus for adjusting operating frequencies - Google Patents
Method and computer program product and apparatus for adjusting operating frequencies Download PDFInfo
- Publication number
- TW202009698A TW202009698A TW107129113A TW107129113A TW202009698A TW 202009698 A TW202009698 A TW 202009698A TW 107129113 A TW107129113 A TW 107129113A TW 107129113 A TW107129113 A TW 107129113A TW 202009698 A TW202009698 A TW 202009698A
- Authority
- TW
- Taiwan
- Prior art keywords
- frequency
- interface
- processing unit
- flash memory
- host
- Prior art date
Links
Images
Landscapes
- Power Sources (AREA)
Abstract
Description
本發明涉及快閃記憶裝置,特別指一種操作頻率調整方法及電腦程式產品及裝置。The invention relates to a flash memory device, in particular to an operating frequency adjustment method and a computer program product and device.
快閃記憶裝置通常分為NOR快閃記憶裝置與NAND快閃記憶裝置。NOR快閃記憶裝置為隨機存取裝置,主機端(Host)可於位址腳位上提供任何存取NOR快閃記憶裝置的位址,並及時地從NOR快閃記憶裝置的資料腳位上獲得儲存於該位址上的資料。相反地,NAND快閃記憶裝置並非隨機存取,而是序列存取。NAND快閃記憶裝置無法像NOR快閃記憶裝置一樣,可以存取任何隨機位址,主機端反而需要寫入序列的位元組(Bytes)的值到NAND快閃記憶裝置中,用以定義請求命令(Command)的類型(如,讀取、寫入、抹除等),以及用在此命令上的位址。位址可指向一個頁面(快閃記憶裝置中寫入作業的最小資料塊)或一個區塊(快閃記憶裝置中抹除作業的最小資料塊)。Flash memory devices are generally divided into NOR flash memory devices and NAND flash memory devices. The NOR flash memory device is a random access device. The host can provide any address for accessing the NOR flash memory device on the address pin, and timely access the data pin of the NOR flash memory device. Get the data stored at that address. In contrast, NAND flash memory devices are not random access, but sequential access. The NAND flash memory device cannot access any random address like the NOR flash memory device. Instead, the host needs to write the value of the sequence of bytes (Bytes) to the NAND flash memory device to define the request The type of command (eg, read, write, erase, etc.) and the address used on this command. The address can point to a page (the smallest block of data written to the flash memory device) or a block (the smallest block of data erased from the flash memory device).
省電通常是快閃記憶裝置的重要議題。傳統上,主機端可於不使用快閃記憶裝置存取資料時,控制快閃記憶裝置工作在不同的休眠模式(Sleep Mode)來節省電力消耗。快閃記憶裝置依據不同的休眠模式選擇性地開啟或關閉全部或部分電路,以達到省電的目的。然而,這樣的控制不應用在主機端及快閃記憶裝置間傳輸資料時的運行模式(Active Mode)。因此,本發明提出一種操作頻率調整方法及電腦程式產品及裝置,可應用於主動模式中,達成更佳的省電效果。Power saving is usually an important issue for flash memory devices. Traditionally, the host can control the flash memory device to work in different sleep modes (Sleep Mode) when saving data without using the flash memory device to save power consumption. The flash memory device selectively turns on or off all or part of the circuit according to different sleep modes to achieve the purpose of saving power. However, such control does not apply to the Active Mode when transferring data between the host and the flash memory device. Therefore, the present invention provides an operating frequency adjustment method and a computer program product and device, which can be applied in an active mode to achieve a better power saving effect.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。In view of this, how to mitigate or eliminate the above-mentioned deficiencies in related fields is really a problem to be solved.
本發明提出一種操作頻率調整方法及電腦程式產品以及裝置,該方法由裝置端的處理單元於載入並執行韌體或軟體的程式碼時實施,包含:搜集介面活動參數;根據介面活動參數從多個頻率中選擇一者;以及驅動時脈產生器以輸出選擇頻率的時脈訊號,使得主機存取介面以及/或閃存存取介面運行於相應操作頻率。The present invention provides an operating frequency adjustment method, a computer program product, and a device. The method is implemented by a processing unit on the device side when loading and executing firmware or software code, including: collecting interface activity parameters; Select one of the frequencies; and drive the clock generator to output the clock signal of the selected frequency, so that the host access interface and/or the flash memory access interface operate at the corresponding operating frequency.
本發明另提出一種操作頻率調整的電腦程式產品,包含以下的程式碼:搜集介面活動參數;根據介面活動參數從多個頻率中選擇一者;以及驅動時脈產生器以輸出選擇頻率的時脈訊號,使得主機存取介面以及/或閃存存取介面運行於相應操作頻率。The present invention also provides a computer program product for operating frequency adjustment, which includes the following program code: collecting interface activity parameters; selecting one from a plurality of frequencies according to the interface activity parameters; and driving a clock generator to output a clock of the selected frequency The signal enables the host access interface and/or flash memory access interface to operate at the corresponding operating frequency.
本發明提出一種操作頻率調整裝置,包含:時脈產生器及處理單元。處理單元搜集介面活動參數;根據介面活動參數從多個頻率中選擇一者;以及驅動時脈產生器以輸出選擇頻率的時脈訊號,使得主機存取介面以及/或閃存存取介面運行於相應操作頻率。The invention provides an operating frequency adjustment device, including: a clock generator and a processing unit. The processing unit collects the interface activity parameters; selects one of a plurality of frequencies according to the interface activity parameters; and drives the clock generator to output the clock signal of the selected frequency, so that the host access interface and/or the flash memory access interface operate in corresponding Operating frequency.
介面活動參數包含主機存取介面以及/或閃存存取介面的資料傳輸資訊。The interface activity parameters include data transmission information of the host access interface and/or flash memory access interface.
上述實施例的優點之一,裝置端可主動在運行模式(Active Mode)啟動節省電力消耗的控制機制,而不需要被動等待主機端的指揮。One of the advantages of the above embodiments is that the device side can actively activate the control mechanism to save power consumption in the active mode (Active Mode) without having to passively wait for the command from the host side.
上述實施例的另一優點,裝置端可因應裝置端與主機端間或裝置端與儲存單元間的資料傳輸狀態,調整時脈產生器所產生要提供給處理單元以及/或存取介面的時脈訊號,進行更精細的電力消耗控制。Another advantage of the above embodiment is that the device side can adjust the time generated by the clock generator to be provided to the processing unit and/or the access interface according to the data transmission status between the device side and the host side or between the device side and the storage unit Pulse signal for finer power consumption control.
本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。Other advantages of the present invention will be explained in more detail with the following description and drawings.
以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。The following description is a preferred implementation of the invention, and its purpose is to describe the basic spirit of the invention, but it is not intended to limit the invention. The actual content of the invention must refer to the scope of the following claims.
必須了解的是,使用於本說明書中的”包含”、”包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。It must be understood that the words "comprising", "including", etc. used in this specification are used to indicate the existence of specific technical features, values, method steps, work processes, components and/or components, but do not exclude the addition of More technical features, values, method steps, job processing, components, components, or any combination of the above.
於權利要求中使用如”第一”、”第二”、”第三”等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。The terms such as "first", "second", and "third" are used in the claims to modify the elements in the claims, not to indicate that there is a priority order, pre-relationship, or is an element Prior to another component, or the time sequence when performing method steps, is only used to distinguish components with the same name.
必須了解的是,當元件描述為”連接”或”耦接"至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為”直接連接”或”直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如”介於”相對於”直接介於”,或者是”鄰接”相對於”直接鄰接”等等。It must be understood that when an element is described as "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, and intermediate elements may appear. Conversely, when an element is described as "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements can also be interpreted in a similar manner, such as "between" relative to "directly between", or "adjacent" relative to "directly adjacent" and so on.
參考圖1。快閃記憶系統架構100包含主機端(host)110、裝置端(device)130及儲存單元150。此系統架構可實施於個人電腦、筆記型電腦(Laptop PC)、平板電腦、手機、數位相機、數位攝影機等電子產品。裝置端130可包含處理單元133。主機端110及裝置端130間可以快閃記憶通訊協定(例如,通用快閃記憶儲存,Universal Flash Storage UFS)彼此通信。快閃記憶控制器133通過資料連結層132及實體層131電性連接(耦接)主機端110。快閃記憶控制器133可通過直接記憶體存取控制器(未顯示於圖1)從資料緩衝區(未顯示於圖1)讀取從儲存單元150取得的使用者資料,並通過驅動資料連結層132及實體層131依序敲出給主機端110。快閃記憶控制器133可通過直接記憶體存取控制器(未顯示於圖1)將主機端110欲寫入的使用者資料儲存至資料緩衝區。處理單元134可使用多種方式實施,例如使用通用硬體,如單一處理器、具平行處理能力的多處理器、圖形處理器、輕簡型通用目的處理器(Lightweight General-Purpose Processor)或其他具運算能力的處理器,並且在執行指令(Instructions)、宏碼(Macrocode)或微碼(Microcode)時,提供之後描述的功能。快閃記憶控制器133可為UFS控制器,透過UFS通訊協定與主機端110進行溝通。雖然本發明實施例以UFS通訊協定舉例,但本發明也可應用到其他的通訊協定,例如通用序列匯流排(Universal Serial Bus, USB)、先進技術附著(advanced technology attachment, ATA)、序列先進技術附著(serial advanced technology attachment, SATA)、快速周邊元件互聯(peripheral component interconnect express, PCI-E)或其他介面的通訊協定。Refer to Figure 1. The flash
裝置端130另包含閃存存取介面139,使得處理單元134可通過閃存存取介面139與儲存單元150溝通,詳細來說,可採用雙倍資料率(Double Data Rate DDR)通訊協定,例如,開放NAND快閃(Open NAND Flash Interface ONFI)、雙倍資料率開關(DDR Toggle)或其他介面。處理單元134透過閃存存取介面139寫入使用者資料到儲存單元150中的指定位址(目的位址),以及從儲存單元150中的指定位址(來源位址)讀取使用者資料。閃存存取介面139使用數個電子訊號來協調處理單元134與儲存單元150間的資料與命令傳遞,包含資料線(data line)、時脈訊號(clock signal)與控制訊號(control signal)。資料線可用以傳遞命令、位址、讀出及寫入的資料;控制訊號線可用以傳遞晶片致能(Chip Enable CE)、位址提取致能(Address Latch Enable ALE)、命令提取致能(Command Latch Enable CLE)、寫入致能(Write Enable WE)等控制訊號。The
儲存單元150可包含多個儲存子單元,每個儲存子單元,各自使用關聯的存取子介面與處理單元134進行溝通。一或多個儲存子單元可封裝在一個晶粒(Die)之中。閃存存取介面139可包含j個存取子介面,每一個存取子介面連接i個儲存子單元。存取子介面及其後連接的儲存子單元又可統稱為輸出入通道,並可以邏輯單元編號(Logic Unit Number LUN)識別。換句話說,i個儲存子單元共享一個存取子介面。例如,裝置端130包含4個輸出入且每一個輸出入連接4個儲存子單元時,裝置端130可存取16個儲存子單元。處理單元134可驅動存取子介面中之一者,從指定的儲存子單元讀取,或寫入資料至指定的儲存子單元。每個儲存子單元擁有獨立的晶片致能(CE)控制訊號。換句話說,當欲對指定的儲存子單元進行資料讀取或寫入時,需要驅動關聯的存取子介面來致能此儲存子單元的晶片致能控制訊號。參考圖2。處理單元134可透過存取子介面139_0使用獨立的晶片致能控制訊號230_0_0至230_0_i從連接的儲存子單元150_0_0至150_0_i中選擇出其中一者,接著,透過共享的資料線210從選擇出的儲存子單元的指定位址讀取資料,或傳送欲寫入指定位址的使用者資料至選擇出的儲存子單元。The
參考圖1。裝置端130另包含時脈產生器(Clock Generator)136_1。時脈產生器136_1是產生時脈訊號CLK1的電路,輸出時脈訊號CLK1給處理單元134,用來同步韌體指令、宏碼或微碼等的提取、解碼、執行及回寫。於一些實施方式中,當主機端110預期會長時間不存取儲存單元150時,可發送命令給裝置端130,讓裝置端130進入省電模式。例如,主機端110可發送進入休眠模式(Sleep Mode)的原語(primitive)DME_HIBERNATE_ENTER給裝置端130。當快閃記憶控制器133接收到原語DME_HIBERNATE_ENTER,可關閉時脈產生器136_1,用以節省電力消耗。或者,主機端110可發送啟動停止單元(Start Stop Unit SSU)命令給裝置端130,強迫裝置端130進入休眠狀態(Sleep State)。當快閃記憶控制器133接收到進入休眠狀態的啟動停止單元命令後,阻斷時脈產生器136_1產生的時脈訊號CLK1,使得時脈訊號CLK1無法提供給處理單元134。原語DME_HIBERNATE_ENTER及啟動停止單元命令的資料格式及發送細節可參考發表於2016年6月的通用快閃記憶儲存標準的版本2.1。當處理單元134沒被時脈訊號CLK1驅動時,無法運行,使得電力消耗可以節約。於此需注意的是,當處理單元134沒被時脈訊號CLK1驅動時,不能執行任何韌體或軟體指令、宏碼或微碼。然而,在運行模式(Active Mode)中,主機端110並沒有任何可讓裝置端130節省電力消耗的控制機制。Refer to Figure 1. The device end 130 further includes a clock generator (Clock Generator) 136_1. The clock generator 136_1 is a circuit that generates a clock signal CLK1, and outputs the clock signal CLK1 to the
為解決此缺陷,本發明實施例提出一種在運行模式中的省電機制,由裝置端130主動控制,可因應裝置端130與主機端110間或裝置端130與儲存單元150間的資料傳輸狀態,調整時脈產生器所產生要提供給處理單元以及/或存取介面的時脈訊號。例如,當兩裝置間只需要較低傳輸率時,可讓時脈產生器產生較低頻率的時脈訊號,用以節省電力消耗。To solve this defect, an embodiment of the present invention proposes a power saving mechanism in the operation mode, which is actively controlled by the
參考圖1。裝置端130另包含時脈產生器136_2。時脈產生器136_2是一種產生時脈訊號CLK2的電路,輸出時脈訊號CLK2給通用快閃記憶儲存互聯層170(UFS InterConnect Layer—UIC,其包含實體層131、資料連結層132及快閃記憶控制器133)及閃存存取介面139,用來同步資料傳收的操作。通用快閃記憶儲存互聯層170可稱為主機存取介面。時脈產生器136_1及136_2分別依據寄存器138_1及138_2的設定調整輸出時脈訊號CLK1及CLK2的頻率。Refer to Figure 1. The
為了提供更好的省電效果,裝置端130可分別為處理單元134及閃存存取介面139預設多個頻率。例如,輸出至處理單元134的時脈訊號CLK1的頻率可為500、250、125MHz等,而輸出至存取介面(包含通用快閃記憶儲存互聯層170及閃存存取介面139)的時脈訊號CLK2的頻率可為300、150、75MHz等。參考圖3。圖3所示的方法可由處理單元134於載入並執行特定韌體或軟體指令、宏碼或微碼時實施。處理單元134首先搜集介面活動參數,包含通用快閃記憶儲存互聯層170以及/或閃存存取介面139的資料傳輸相關資訊(步驟S310)。例如,介面活動參數可指出裝置端130是否進入閒置狀態(idle state)、閃存存取介面139是否用來進行背景操作,以及通用快閃記憶儲存互聯層170的資料傳輸模式等資訊。處理單元134依據介面活動參數分別為處理單元134及存取介面從上述多個頻率中選擇出一者(步驟S330),以及驅動時脈產生器136_1以選擇頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以選擇頻率輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於指定的操作頻率(步驟S350)。於步驟S350的一些實施例中,處理單元134可只調整時脈產生器136_2輸出的時脈訊號CLK2的頻率,並讓脈產生器136_1輸出的時脈訊號CLK1的頻率固定在一個較高的水準。In order to provide better power saving effect, the
參考圖4。圖4所示的方法可由處理單元134於載入並執行特定韌體或軟體指令、宏碼或微碼時實施。處理單元134可週期性地執行一個迴圈(步驟S410至S460),並且於每個回合中,搜集介面活動參數,依據介面活動參數決定時脈產生器136_1及136_2輸出的時脈訊號CLK1及CLK2的頻率,並且驅動時脈產生器136_1及136_2以決定的頻率輸出時脈訊號CLK1及CLK2。Refer to Figure 4. The method shown in FIG. 4 can be implemented by the
裝置端130另包含計時器(timer)135。處理單元134可於初始或每個回合結束時,設定計時器135重新開始計數一段指定時間,例如2、3或5毫秒(milliseconds ms)等。每當計時器135計數到指定時間時,發出中斷給處理單元134,使得處理單元134可啟動新一回合的操作頻率調整(步驟S410)。The
於一些實施例,時脈訊號CLK1及CLK2的頻率可依據搜集的介面活動參數調整為符合三個水平中的一個。範例的頻率範圍如表1所示: 表1
當處理單元134偵測到計時器135發出的中斷時(步驟S410),可先判斷裝置端130是否需要執行背景操作(步驟S420)。寄存器137_2可以1位元鎖存裝置端130是否需要執行背景操作的資訊,例如,”1”代表需要;”0”代表不需要。處理單元134可讀取寄存器137_2的值來判斷裝置端130是否需要執行背景操作。背景操作並不是受到主機端110指示而發起,而是裝置端130主動發起的資料存取,可為垃圾回收程序(garbage collection GC process)、損耗平均程序(wear leveling process)、讀取回收程序(read reclaim process)或讀取更新程序(read reflash process)。When the
例如,經過多次的存取後,一個實體頁面可能包含有效及無效區段(又稱為過期區段),其中,有效區段儲存有效的使用者資料,無效區段儲存無效的(舊的)使用者資料。當偵測到儲存單元150的可用空間不足時,處理單元134可設定寄存器(可稱作背景操作寄存器,background-operation register)137_2,指出裝置端130需要執行背景操作(如垃圾回收程序)。於垃圾回收程序中,處理單元134驅動閃存存取介面139,重新寫入蒐集起來的有效的使用者資料至閒置區塊或主動區塊的空實體頁面,使得這些包含無效的使用者資料的資料區塊可變更成為閒置區塊,於抹除後,即可提供給其他使用者資料儲存。For example, after multiple accesses, a physical page may contain valid and invalid segments (also known as expired segments), where valid segments store valid user data and invalid segments store invalid (old ) User data. When detecting that the available space of the
又例如,由於經過一定次數的抹除(例如,500次、1000次或5000次),儲存單元150中的實體區塊便會因為不良的資料保存(Data Retention)能力而被列為壞塊而不再使用。為了延長實體區塊的服務壽命,處理單元134持續監督每個實體區塊的抹除次數。當一個資料區塊的抹除次數超過抹除閥值時,處理單元134可設定寄存器137_2,指出裝置端130需要執行背景操作(如損耗平均程序)。於損耗平均程序中,處理單元133驅動閃存存取介面139讀取這個資料區塊(來源區塊)中的使用者資料。接著,處理單元133選擇一個抹除次數最少的閒置區塊作為目的區塊,並且驅動閃存存取介面139寫入之前的讀取的使用者資料寫至選擇的目的區塊中的可用實體頁面。For another example, due to a certain number of erasures (for example, 500 times, 1000 times, or 5000 times), the physical block in the
此外,當讀取回收程序或讀取更新程序的啟動條件滿足時,處理單元134同樣可設定寄存器137_2,指出裝置端130需要執行背景操作(如讀取回收程序或讀取更新程序)。In addition, when the start condition of the read recovery program or the read update program is satisfied, the
由於背景操作需要執行一系列的命令,從儲存單元150讀取資料及寫入資料到儲存單元150,因此處理單元134、閃存存取介面139及儲存單元150以越快的操作頻率運行越好。當判斷裝置端130需要執行背景操作時(步驟S420中”是”的路徑),驅動時脈產生器136_1以可選擇的最高頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以可選擇的最高頻率輸出時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於最高的操作頻率(步驟S430)。舉例來說,處理單元134可設定寄存器138_1成為如表1所示符合CLK1第三水平(也就是400~600MHz間)的值,使得時脈產生器136_1依據設定值以相應頻率輸出時脈訊號CLK1給處理單元134;以及設定寄存器138_2成為如表1所示符合CLK2第三水平(也就是250~350MHz間)的值,使得時脈產生器136_2依據設定值以相應頻率輸出時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139。於此需注意的是,執行背景操作期間,同樣可穿插執行主機端110發出的存取命令。Since the background operation needs to execute a series of commands to read data from the
針對不需要執行背景操作的情況,處理單元134可因應裝置端130及主機端110間的資料傳輸模式,讓處理單元134、閃存存取介面139及儲存單元150運行於匹配的操作頻率。當判斷裝置端130不需要執行背景操作時(步驟S420中”否”的路徑),處理單元134取得裝置端130的運行狀態及裝置端130及主機端110間的資料傳輸模式(步驟S440)。In the case where no background operation is required, the
UFS介面可運行於脈波寬度調變檔(PWM, Pulse-Width Modulation gear)或高速檔(HS, High-Speed gear)。脈波寬度調變檔可為0.5Gbps(Gigabits per second)或更低速,而高速檔可為1.4Gbps或更高速。脈波寬度調變檔可稱作低速檔。例如,表2列舉UFS規範所定義不同高速檔(HS-GEARs)的資料速率: 表2
裝置端130可配置寄存器137_1,用以儲存裝置端130及主機端110間的資料傳輸模式。寄存器137_1可鎖存至少5個位元的值,其中2個位元(又可稱為模式寄存器)表示傳輸模式(transmission mode),另外3個位元(又可稱為檔位寄存器)表示檔位(gear)。例如,模式寄存器儲存”0b00”、”0b01”、”0b10”及”0b11”分別代表UFS介面運行於脈波寬度調變檔、自動脈波寬度調變檔(PWM-auto gear)、高速檔及自動高速檔(HS-auto gear)。寄存器儲存”0b000”至”0b111”中之一者分別代表第0至第7檔中之相應一者。主機端110可發送模式改變命令給裝置端130,用以組態裝置端130及主機端110間的資料傳輸模式。當快閃記憶控制器133接收到模式改變命令,根據模式改變命令的指示設定模式寄存器及檔位寄存器。表4描述不同資料傳輸模式的模式寄存器及檔位寄存器的設定範例: 表4
當裝置端130運行於自動脈波寬度調變檔檔位或自動高速檔,並且於預設一段時間沒有與主機端110間進行任何資料傳輸時,裝置端130會自動進入閒置狀態(idle state),用以關閉部分電路,節省電力消耗。裝置端130可更設置一個寄存器(未顯示於圖1),耦接處理單元134,用以鎖存裝置端130是否進入閒置狀態的資訊。When the
處理單元134取得裝置端130的運行狀態及裝置端130及主機端110間的資料傳輸模式後(步驟S440),據此從多個頻率中選擇一者(步驟S450)。參考表1所示的頻率水平的劃分。處理單元134可依據寄存器137_1的內容使用以下規則決定處理單元134、閃存存取介面139及儲存單元150的頻率: (1)當裝置端130進入閒置狀態時,不管資料傳輸模式為何,選擇符合第一水平的頻率; (2)當裝置端130沒有進入閒置狀態且資料傳輸模式為脈波寬度調變或自動脈波寬度調變,不管檔位為何,選擇符合第一水平的頻率; (3)當裝置端130沒有進入閒置狀態且資料傳輸模式為高速或自動高速的第1檔,選擇符合第二水平的頻率;以及 (4)當裝置端130沒有進入閒置狀態且資料傳輸模式為高速或自動高速的第2檔或第3檔,選擇符合第三水平的頻率。After the
當處理單元134依據資料傳輸模式從多個頻率中選擇一者後(步驟S450),驅動時脈產生器136_1以選擇頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以選擇頻率輸出時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於指定的操作頻率(步驟S460)。舉例來說,當資料傳輸模式為高速或自動高速的第1檔,處理單元134可設定寄存器138_1成為如表1所示符合CLK1第二水平(也就是200~300MHz間)的值,使得時脈產生器136_1依據設定值以相應頻率輸出時脈訊號CLK1給處理單元134;以及設定寄存器138_2成為如表1所示符合CLK2第二水平(也就是125~175MHz間)的值,使得時脈產生器136_2依據設定值以相應頻率輸出時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139。於步驟S460的一些實施例中,處理單元134可只調整時脈產生器136_2輸出的時脈訊號CLK2的頻率,而讓脈產生器136_1輸出的時脈訊號CLK1的頻率保持在特定水準。After the
圖3中步驟S310所述的介面活動參數可包含寄存器137_1及137_2中全部或部分的值。The interface activity parameters described in step S310 in FIG. 3 may include all or part of the values in the registers 137_1 and 137_2.
圖1所示的快閃記憶系統架構100的裝置端130可進一步修改,讓處理單元134只控制一個時脈產生器,就可讓處理器134及存取介面(包含通用快閃記憶儲存互聯層170及閃存存取介面139)運行於不同的操作頻率。參考圖5。修改後的裝置端530可設置除頻器535,耦接於時脈產生器136_1、通用快閃記憶儲存互聯層170及閃存存取介面139之間,用以從時脈產生器136_1輸入一個頻率的時脈訊號CLK1,產生1/2、3/5或2/3頻率的時脈訊號CLK2,並輸出時脈訊號CLK2至通用快閃記憶儲存互聯層170及閃存存取介面139。因應修改後的裝置端530,如圖4所示步驟S430可修改為,處理單元134設定寄存器138_1成為如表1所示符合CLK1第三水平(也就是400~600MHz間)的值,驅動時脈產生器136_1依據設定值以相應頻率輸出時脈訊號CLK1給處理單元134及除頻器535,使得除頻器535產生並輸出2/5、1/2或2/3頻率的時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139。此外,如圖4所示步驟S460可修改為,驅動時脈產生器136_1以選擇頻率輸出時脈訊號CLK1給處理單元134及除頻器535,使得除頻器535產生並輸出1/2、3/5或2/3選擇頻率的時脈訊號CLK2給通用快閃記憶儲存互聯層170及閃存存取介面139。The
於此需注意的是,當處理單元134中更包含調整時脈訊號CLK1的電路時,時脈訊號CLK1的頻率並不一定等於處理單元134運行時的操作頻率。當主機存取介面170或閃存存取介面139中更包含調整時脈訊號CLK2的電路時,時脈訊號CLK2的輸出頻率並不一定等於主機存取介面170或閃存存取介面139運行時的操作頻率。但所屬技術領域人員可理解,時脈訊號CLK1的輸出頻率變快會導致處理單元134運行時的操作頻率加快,反之亦然。時脈訊號CLK2的輸出頻率變快會導致主機存取介面170及閃存存取介面139運行時的操作頻率加快,反之亦然。It should be noted that when the
以下提出數個使用案例,說明如何應用如上所述的操作頻率調整裝置及方法。Several use cases are proposed below to explain how to apply the above-mentioned operating frequency adjustment device and method.
於第一個使用案例,假設裝置端130不執行背景操作:一開始,主機端110發送模式改變命令給裝置端130,指示裝置端130運行於自動高速的特定檔位。當快閃記憶控制器133接收到模式改變命令後,設定寄存器137_1,用以鎖存此資料傳輸模式的資訊。此時,裝置端130進入運行狀態(active state)。接著,處理單元134讀取寄存器137_1(步驟S440),依據此資料傳輸模式驅動時脈產生器136_1以相應頻率(例如符合CLK1第二或第三水平的頻率)輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以相應頻率(例如符合CLK2第二或第三水平的頻率)輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於期望的操作頻率(步驟S450至S460)。接著,於預設一段時間沒有與主機端110間進行任何資料傳輸,裝置端130自動進入閒置狀態。處理單元134偵測到進入閒置狀態(步驟S440),驅動時脈產生器136_1以符合CLK1第一水平的頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以符合CLK2第一水平的頻率輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於較慢的操作頻率,從而節省電力消耗(步驟S450至S460)。In the first use case, it is assumed that the
於第二個使用案例,假設裝置端130不執行背景操作:一開始,主機端110發送模式改變命令給裝置端130,指示裝置端130運行於高速或自動高速的特定檔位。當快閃記憶控制器133接收到模式改變命令後,設定寄存器137_1,用以鎖存此資料傳輸模式的資訊。接著,處理單元134讀取寄存器137_1(步驟S440),依據資料傳輸模式驅動時脈產生器136_1以相應頻率(例如符合CLK1第二或第三水平的頻率)輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以相應頻率(例如符合CLK2第二或第三水平的頻率)輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於期望的操作頻率(步驟S450至S460)。接著,主機端110發送模式改變命令給裝置端130,指示裝置端130運行於脈波寬度調變或自動脈波寬度調變的特定檔位(亦即是改變後資料傳輸模式)。當快閃記憶控制器133接收到模式改變命令後,設定寄存器137_1,用以鎖存改變後資料傳輸模式的資訊。接著,處理單元134讀取寄存器137_1(步驟S440),依據改變後資料傳輸模式驅動時脈產生器136_1以符合CLK1第一水平的頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以符合CLK2第一水平的頻率輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於較慢的操作頻率,從而節省電力消耗(步驟S450至S460)。In the second use case, it is assumed that the
於第三個使用案例,假設裝置端130不執行背景操作:一開始,主機端110發送模式改變命令給裝置端130,指示裝置端130運行於高速或自動高速的第2或3檔。當快閃記憶控制器133接收到模式改變命令後,設定寄存器137_1,用以鎖存此資料傳輸模式的資訊。接著,處理單元134讀取寄存器137_1(步驟S440),依據資料傳輸模式驅動時脈產生器136_1以符合CLK1第三水平的頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以符合CLK2第三水平的頻率輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於期望的操作頻率(步驟S450至S460)。接著,主機端110發送模式改變命令給裝置端130,指示裝置端130運行於高速或自動高速的第1檔(亦即是改變後資料傳輸模式)。當快閃記憶控制器133接收到模式改變命令後,設定寄存器137_1,用以鎖存改變後資料傳輸模式的資訊。接著,處理單元134讀取寄存器137_1(步驟S440),依據改變後資料傳輸模式驅動時脈產生器136_1以符合CLK1第二水平的頻率輸出時脈訊號CLK1給處理單元134並且驅動時脈產生器136_2以符合CLK2第二水平的頻率輸出時脈訊號CLK2給存取介面,使得處理單元134、通用快閃記憶儲存互聯層170及閃存存取介面139可運行於較慢的操作頻率,從而節省電力消耗(步驟S450至S460)。In the third use case, it is assumed that the
處理單元134所執行操作頻率調整的方法步驟,可用一或多個功能模塊組成的電腦程式產品來實現。這些功能模塊存儲於非揮發性儲存裝置,並且可被處理單元134於特定時間點載入並執行。參考圖6。處理單元133執行中斷管理模塊(Interrupt Handler Module)610以完成步驟S310的部分操作及步驟S410的操作,執行背景操作偵測模塊620以完成步驟S420的操作,執行裝置端運行狀態及資料傳輸模式偵測模塊630以完成步驟S310的部分操作及步驟S440的操作,執行頻率選擇模塊640以完成步驟S330及步驟S450的操作,以及執行時脈產生器驅動模塊650以完成步驟S350、步驟S430及S460的操作。背景操作偵測模塊620可依據偵測結果呼叫裝置端運行狀態及資料傳輸模式偵測模塊630及時脈產生器驅動模塊650中之一者。背景操作偵測模塊620及頻率選擇模塊640可使用參數來傳送選擇的頻率給時脈產生器驅動模塊650。The method steps of the operation frequency adjustment performed by the
本發明所述的方法中的全部或部分步驟可以電腦程式實現,例如電腦的作業系統、電腦中特定硬體的驅動程式、或軟體應用程式。此外,也可實現於如上所示的其他類型程式。所屬技術領域具有通常知識者可將本發明實施例的方法撰寫成電腦程式,為求簡潔不再加以描述。依據本發明實施例方法實施的電腦程式.可儲存於適當的電腦可讀取資料載具,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。All or part of the steps in the method of the present invention can be implemented by a computer program, such as a computer operating system, a specific hardware driver in the computer, or a software application program. In addition, it can also be implemented in other types of programs as shown above. Those of ordinary skill in the art can write the method of the embodiments of the present invention into a computer program, which will not be described for simplicity. A computer program implemented according to the method of the embodiment of the present invention. It can be stored in a suitable computer-readable data carrier, such as a DVD, CD-ROM, USB disk, or hard disk, or placed on a network (for example, the Internet Network server.
雖然圖1及5中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖3及4的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。Although the above-described elements are included in FIGS. 1 and 5, it is not excluded that more other additional elements are used without violating the spirit of the invention, and a better technical effect has been achieved. In addition, although the flowcharts of FIGS. 3 and 4 are executed in a specified order, without violating the spirit of the invention, those skilled in the art can modify the order between these steps on the premise of achieving the same effect. The invention is not limited to using only the order described above. In addition, those skilled in the art can also integrate several steps into one step, or in addition to these steps, perform more steps sequentially or in parallel, and the present invention is not limited thereby.
雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers obvious modifications and similar settings for those skilled in the art. Therefore, the scope of the claims of the application must be interpreted in the broadest way to include all obvious modifications and similar settings.
100‧‧‧快閃記憶系統100‧‧‧Flash memory system
110‧‧‧主機端110‧‧‧Host
130‧‧‧裝置端130‧‧‧device side
131‧‧‧實體層131‧‧‧ physical layer
132‧‧‧資料連結層132‧‧‧Data link layer
133‧‧‧快閃記憶控制器133‧‧‧Flash memory controller
134‧‧‧處理單元134‧‧‧ processing unit
135‧‧‧計時器135‧‧‧Timer
136_1、136_2‧‧‧時脈產生器136_1, 136_2‧‧‧ clock generator
137_1、137_2、138_1、138_2‧‧‧寄存器137_1, 137_2, 138_1, 138_2
139‧‧‧閃存存取介面139‧‧‧Flash access interface
150‧‧‧儲存單元150‧‧‧storage unit
170‧‧‧通用快閃記憶儲存互聯層170‧‧‧General flash memory storage interconnection layer
CLK1、CLK2‧‧‧時脈訊號CLK1, CLK2 ‧‧‧ clock signal
139_0‧‧‧存取子介面139_0‧‧‧Accessor interface
150_0_0~150_0_i‧‧‧儲存子單元150_0_0~150_0_i‧‧‧storage subunit
210‧‧‧資料線210‧‧‧Data cable
230_0~230_i‧‧‧晶片致能控制訊號230_0~230_i‧‧‧Chip enable control signal
S310~S350‧‧‧方法步驟S310~S350‧‧‧Method steps
S410~S460‧‧‧方法步驟S410~S460‧‧‧Method steps
500‧‧‧快閃記憶系統500‧‧‧Flash memory system
530‧‧‧裝置端530‧‧‧device side
535‧‧‧除頻器535‧‧‧ frequency divider
610~650‧‧‧程式模塊610~650‧‧‧Program module
圖1為依據本發明實施例之快閃記憶體的系統架構示意圖。FIG. 1 is a schematic diagram of a system architecture of a flash memory according to an embodiment of the invention.
圖2為存取子介面與多個儲存子單元的連接示意圖。FIG. 2 is a schematic diagram of connection between an access sub-interface and multiple storage sub-units.
圖3為依據本發明實施例的操作頻率的調整方法流程圖。FIG. 3 is a flowchart of a method for adjusting an operating frequency according to an embodiment of the invention.
圖4為依據本發明實施例的週期性調整時脈產生器輸出的時脈訊號的方法流程圖。4 is a flowchart of a method for periodically adjusting the clock signal output by the clock generator according to an embodiment of the invention.
圖5為依據本發明另一實施例之快閃記憶體的系統架構示意圖。FIG. 5 is a schematic diagram of a system architecture of a flash memory according to another embodiment of the invention.
圖6為依據本發明實施例的調整操作頻率的功能模塊示意圖。6 is a schematic diagram of a functional module for adjusting the operating frequency according to an embodiment of the invention.
S310~S350‧‧‧方法步驟 S310~S350‧‧‧Method steps
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107129113A TWI697839B (en) | 2018-08-21 | 2018-08-21 | Method and computer program product and apparatus for adjusting operating frequencies |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107129113A TWI697839B (en) | 2018-08-21 | 2018-08-21 | Method and computer program product and apparatus for adjusting operating frequencies |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202009698A true TW202009698A (en) | 2020-03-01 |
TWI697839B TWI697839B (en) | 2020-07-01 |
Family
ID=70766322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107129113A TWI697839B (en) | 2018-08-21 | 2018-08-21 | Method and computer program product and apparatus for adjusting operating frequencies |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI697839B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI768543B (en) * | 2020-11-13 | 2022-06-21 | 新唐科技股份有限公司 | Integrated circuit and in-system programming circuit thereof |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110119406A (en) * | 2010-04-27 | 2011-11-02 | 삼성전자주식회사 | Nonvolatile memory device having operation mode change function and operation mode change method |
KR101851614B1 (en) * | 2011-12-12 | 2018-06-12 | 삼성전자주식회사 | Method of clock control of system on chip including functional block, system on chip of the same and semicondutor system including the same |
US9280190B2 (en) * | 2011-12-21 | 2016-03-08 | Intel Corporation | Method and systems for energy efficiency and energy conservation including on-off keying for power control |
KR102003930B1 (en) * | 2012-07-31 | 2019-07-25 | 삼성전자주식회사 | method of controlling data writing in non volatile memory device and memory controller having wearleveling control function |
KR20160032529A (en) * | 2014-09-16 | 2016-03-24 | 삼성전자주식회사 | SYSTEM ON CHIP(SoC), AND DYNAMIC VOLTAGE FREQUENCY SCALING(DVFS) VERIFICATION METHOD THEREOF |
-
2018
- 2018-08-21 TW TW107129113A patent/TWI697839B/en active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI768543B (en) * | 2020-11-13 | 2022-06-21 | 新唐科技股份有限公司 | Integrated circuit and in-system programming circuit thereof |
Also Published As
Publication number | Publication date |
---|---|
TWI697839B (en) | 2020-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113220108B (en) | Computer readable storage medium, operating frequency adjustment method and device | |
US8341374B2 (en) | Solid state drive and related method of scheduling operations | |
JP5661874B2 (en) | Idle period reporting for power management | |
US9110669B2 (en) | Power management of a storage device including multiple processing cores | |
JP5454224B2 (en) | Storage device and storage system | |
KR20180017035A (en) | Test for 50 nanosecond spike filter | |
US10671141B2 (en) | Storage device and method of controlling link state thereof | |
KR20150014002A (en) | Storage system including data transfer speed manager and data method for changing data transfer speed thereof | |
US11010094B2 (en) | Task management method and host for electronic storage device | |
KR20150009295A (en) | Nonvolatile memory device and device sleep state control method thereof | |
CN102566939B (en) | Solid state disk (SSD) and read-modify-write operation data management method thereof | |
CN102646446A (en) | Hardware dynamic cache power management | |
WO2022143295A1 (en) | Method for upgrading firmware, and related device | |
US20190018818A1 (en) | Accelerated i3c stop initiated by a third party | |
US10684981B2 (en) | Fast termination of multilane single data rate transactions | |
TWI770516B (en) | Method and computer program product and apparatus for adjusting operating frequencies | |
TWI697839B (en) | Method and computer program product and apparatus for adjusting operating frequencies | |
JP2015084227A (en) | Storage system, storage device, and method of analyzing non-signal in storage system | |
US10216421B2 (en) | Method of operating storage device using serial interface and method of operating data processing system including the same | |
US11132308B2 (en) | Semiconductor device and semiconductor system | |
US20170371830A1 (en) | Accelerated i3c master stop | |
US11023408B2 (en) | I3C single data rate write flow control | |
CN108345428B (en) | Control intensive control system and method thereof | |
CN112445412A (en) | Data storage method and device | |
TW201621544A (en) | Computer apparatus and power management method thereof |