TW201933091A - A system and a method for testing a data storage device - Google Patents

A system and a method for testing a data storage device Download PDF

Info

Publication number
TW201933091A
TW201933091A TW107102033A TW107102033A TW201933091A TW 201933091 A TW201933091 A TW 201933091A TW 107102033 A TW107102033 A TW 107102033A TW 107102033 A TW107102033 A TW 107102033A TW 201933091 A TW201933091 A TW 201933091A
Authority
TW
Taiwan
Prior art keywords
electronic device
data storage
test
storage device
computer
Prior art date
Application number
TW107102033A
Other languages
Chinese (zh)
Other versions
TWI665606B (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 TW107102033A priority Critical patent/TWI665606B/en
Priority to CN201810685492.0A priority patent/CN110058973B/en
Priority to US16/163,831 priority patent/US10691569B2/en
Application granted granted Critical
Publication of TWI665606B publication Critical patent/TWI665606B/en
Publication of TW201933091A publication Critical patent/TW201933091A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection
    • G06F9/264Microinstruction selection based on results of processing
    • G06F9/267Microinstruction selection based on results of processing by instruction selection on output of storage
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/10Test algorithms, e.g. memory scan [MScan] algorithms; Test patterns, e.g. checkerboard patterns 
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C2029/0407Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals on power on

Abstract

A system for testing a data storage device includes the data storage device, an electronic device and a computer. The electronic device includes a host device coupled to the data storage device and communicating with the data storage device via an interface logic. The computer is coupled to the electronic device and configured to issues a plurality of commands to test the data storage device in a test procedure. When the electronic device has been successfully started up, the computer issues a first command to the electronic device, to trigger the electronic device to enter a hibernate mode. After waiting for a first predetermined period of time, the computer issues a second command to the electronic device, so as to wake up the electronic device.

Description

資料儲存裝置之測試系統與資料儲存裝置之測試方法 Test system and test method for data storage device

本發明係關於一種種資料儲存裝置之測試方法,可快速且有效地驗證資料儲存裝置。 The invention relates to a test method for various data storage devices, which can quickly and effectively verify the data storage devices.

隨著資料儲存裝置的科技在近幾年快速地成長,許多資料儲存裝置,如符合SD/MMC規格、CF規格、MS規格與XD規格的記憶卡、固態硬碟、嵌入式多媒體記憶卡(embedded Multi Media Card,縮寫為eMMC)以及通用快閃記憶體儲存(Universal Flash Storage,縮寫為UFS)已經廣泛地被應用在多種用途上。由於資料儲存裝置可被廣泛地應用於各種不同的主機裝置上,如何快速且有效地驗證資料儲存裝置的穩定度以及應用於各平台上的相容性,為資料儲存裝置製造商一個重要的議題。 With the rapid development of data storage device technology in recent years, many data storage devices, such as SD / MMC, CF, MS, and XD-compliant memory cards, solid-state hard drives, and embedded multimedia memory cards (embedded Multi Media Card (abbreviated as eMMC) and Universal Flash Storage (Universal Flash Storage (abbreviated as UFS)) have been widely used in many applications. Since the data storage device can be widely used on various host devices, how to quickly and effectively verify the stability of the data storage device and the compatibility on various platforms is an important issue for data storage device manufacturers. .

為了確保資料儲存裝置的驗證效能,本發明提出一種新的測試方法,可快速且有效地驗證資料儲存裝置應用於各種不同的主機裝置的運作穩定度,及資料儲存裝置與各平台的相容性。 In order to ensure the verification performance of the data storage device, the present invention proposes a new test method that can quickly and effectively verify the operation stability of the data storage device applied to various different host devices, and the compatibility of the data storage device with various platforms. .

本發明揭露一種資料儲存裝置之測試系統,包括一資料儲存裝置、一電子裝置以及一電腦裝置。電子裝置包含 一主機裝置,主機裝置耦接至資料儲存裝置,並且利用一介面邏輯與資料儲存裝置溝通。電腦裝置耦接至電子裝置,用以於一測試程序中發出複數指令測試資料儲存裝置。於電子裝置成功地被啟動後,電腦裝置發出一第一指令給電子裝置,用以驅使電子裝置進入一休眠狀態,並且於等待一第一既定時間後,電腦裝置發出一第二指令給電子裝置,用以喚醒電子裝置。 The invention discloses a test system for a data storage device, which includes a data storage device, an electronic device, and a computer device. Electronic device contains A host device is coupled to the data storage device and communicates with the data storage device by using an interface logic. The computer device is coupled to the electronic device, and is used for sending a plurality of instructions to test the data storage device in a test procedure. After the electronic device is successfully started, the computer device sends a first command to the electronic device to drive the electronic device into a sleep state, and after waiting for a first predetermined time, the computer device sends a second command to the electronic device To wake up the electronic device.

本發明揭露一種資料儲存裝置之測試方法,用以測試一資料儲存裝置,其中資料儲存裝置耦接至一電子裝置,電子裝置耦接至一電腦裝置,電腦裝置於一測試程序中發出複數指令測試資料儲存裝置,資料儲存裝置之測試方法包括:於電子裝置成功地被啟動後,由電腦裝置發出一第一指令給電子裝置,用以驅使電子裝置進入一休眠狀態;以及等待一第一既定時間後,由電腦裝置發出一第二指令給電子裝置,用以喚醒電子裝置。 The invention discloses a test method for a data storage device for testing a data storage device, wherein the data storage device is coupled to an electronic device, the electronic device is coupled to a computer device, and the computer device sends a plurality of instructions for testing in a test procedure. Data storage device and testing method of data storage device include: after the electronic device is successfully started, the computer device sends a first instruction to the electronic device to drive the electronic device into a sleep state; and waiting for a first predetermined time Then, the computer device sends a second instruction to the electronic device to wake the electronic device.

100、210‧‧‧資料儲存裝置 100, 210‧‧‧ data storage device

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

112‧‧‧微處理器 112‧‧‧Microprocessor

112M‧‧‧唯讀記憶體 112M‧‧‧Read Only Memory

112C‧‧‧程式碼 112C‧‧‧Code

114‧‧‧控制邏輯 114‧‧‧Control logic

116‧‧‧緩衝記憶體 116‧‧‧Buffer memory

118‧‧‧介面邏輯 118‧‧‧ Interface Logic

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

130‧‧‧主機裝置 130‧‧‧Host device

132‧‧‧編碼器 132‧‧‧ Encoder

134‧‧‧解碼器 134‧‧‧ decoder

200‧‧‧測試系統 200‧‧‧test system

220‧‧‧電腦裝置 220‧‧‧Computer device

230‧‧‧電子裝置 230‧‧‧electronic device

第1圖係顯示根據本發明之一實施例所述之一種記憶體裝置的示意圖。 FIG. 1 is a schematic diagram illustrating a memory device according to an embodiment of the present invention.

第2圖係顯示根據本發明之一實施例所述之一資料儲存裝置之測試系統示意圖。 FIG. 2 is a schematic diagram showing a test system of a data storage device according to an embodiment of the present invention.

第3A圖與第3B圖係顯示根據本發明之第一實施例所述之資料儲存裝置之測試方法流程圖。 FIG. 3A and FIG. 3B are flowcharts showing a test method of the data storage device according to the first embodiment of the present invention.

第4A圖與第4B圖係顯示根據本發明之第二實施例所述之資料儲存裝置之測試方法流程圖。 4A and 4B are flowcharts showing a test method of a data storage device according to a second embodiment of the present invention.

為讓本發明之目的、特徵和優點能更明顯易懂,下文特舉出本發明之具體實施例,並配合所附圖式,作詳細說明如下。目的在於說明本發明之精神而非用以限定本發明之保護範圍,應理解下列實施例可經由軟體、硬體、韌體、或上述任意組合來實現。 In order to make the objects, features, and advantages of the present invention more comprehensible, specific embodiments of the present invention are specifically listed below, and described in detail with the accompanying drawings. The purpose is to explain 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 thereof.

第1圖係顯示根據本發明之一實施例所述之一種資料儲存裝置100的示意圖。資料儲存裝置100包含有一記憶體裝置120,例如,一快閃記憶體(Flash Memory)模組,以及一記憶體控制器110,且記憶體控制器110用來存取記憶體裝置120。根據本發明一實施例,記憶體控制器110包含一微處理器112、一唯讀記憶體(Read Only Memory,ROM)112M、一控制邏輯114、一緩衝記憶體116、與一介面邏輯118。唯讀記憶體112M係用來儲存一程式碼112C,而微處理器112則用來執行程式碼112C以控制對記憶體裝置120之存取(Aecess)。控制邏輯114包含了一編碼器132以及一解碼器134,其中編碼器132用來對寫入到記憶體裝置120中的資料進行編碼以產生對應的校驗碼(或稱,錯誤更正碼(Error Correction Code),ECC),而解碼器134用來將從記憶體裝置120所讀出的資料進行解碼。 FIG. 1 is a schematic diagram showing a data storage device 100 according to an embodiment of the present invention. The data storage device 100 includes a memory device 120, for example, a flash memory module and a memory controller 110. The memory controller 110 is used to access the memory device 120. According to an embodiment of the present invention, the memory controller 110 includes a microprocessor 112, a read only memory (ROM) 112M, a control logic 114, a buffer memory 116, and an interface logic 118. The read-only memory 112M is used to store a code 112C, and the microprocessor 112 is used to execute the code 112C to control access to the memory device 120 (Aecess). The control logic 114 includes an encoder 132 and a decoder 134, where the encoder 132 is used to encode data written in the memory device 120 to generate a corresponding check code (or error correction code (Error Correction Code (ECC), and the decoder 134 is used to decode data read from the memory device 120.

於典型狀況下,記憶體裝置120包含了多個快閃記憶體晶片,而每一個快閃記憶體晶片包含複數個區塊(Block),而該控制器(例如:透過微處理器112執行程式碼112C之記憶體控制器110)對記憶體裝置120進行抹除資料運作係以區塊為單位來進行。另外,一區塊可記錄特定數量的資料頁(Page),其 中該控制器(例如:透過微處理器112執行程式碼112C之記憶體控制器110)對記憶體裝置120進行寫入資料之運作係以資料頁為單位來進行寫入。 Under typical conditions, the memory device 120 includes a plurality of flash memory chips, and each flash memory chip includes a plurality of blocks, and the controller (for example, executes a program through the microprocessor 112) The memory controller 110 of the code 112C) erases data from the memory device 120 in blocks. In addition, a block can record a specific number of data pages (Page), which The operation of writing data to the memory device 120 by the controller (for example, the memory controller 110 that executes the code 112C through the microprocessor 112) is to write data in units of data pages.

實作上,透過微處理器112執行程式碼112C之記憶體控制器110可利用其本身內部之元件來進行諸多控制運作,例如:利用控制邏輯114來控制記憶體裝置120之存取運作(尤其是對至少一區塊或至少一資料頁之存取運作)、利用緩衝記憶體116進行所需之緩衝處理、以及利用介面邏輯118來與一主機裝置(Host Device)130溝通。緩衝記憶體116係以隨機存取記憶體(Random Access Memory,RAM)來實施。例如,緩衝記憶體116可以是靜態隨機存取記憶體(Static RAM,SRAM),但本發明不限於此。 In practice, the memory controller 110 that executes the code 112C through the microprocessor 112 can use its internal components to perform many control operations, such as: using the control logic 114 to control the access operation of the memory device 120 (especially Is to access at least one block or at least one data page), use buffer memory 116 to perform required buffer processing, and use interface logic 118 to communicate with a host device 130. The buffer memory 116 is implemented by a random access memory (Random Access Memory, RAM). For example, the buffer memory 116 may be a static random access memory (Static RAM, SRAM), but the present invention is not limited thereto.

在一實施例中,資料儲存裝置100可以是可攜式記憶體裝置(例如:符合SD/MMC、CF、MS、XD標準之記憶卡),且主機裝置130為一可與資料儲存裝置連接的電子裝置,例如手機、筆記型電腦、桌上型電腦...等等。而在另一實施例中,資料儲存裝置100可以是固態硬碟或符合通用快閃記憶體儲存(Universal Flash Storage,UFS)或嵌入式多媒體記憶卡(Embedded Multi Media Card,EMMC)規格之嵌入式儲存裝置,以設置在一電子裝置中,例如設置在手機、筆記型電腦、桌上型電腦之中,而此時主機裝置130可以是該電子裝置的一處理器。 In one embodiment, the data storage device 100 may be a portable memory device (for example, a memory card that complies with SD / MMC, CF, MS, XD standards), and the host device 130 is a device that can be connected to the data storage device. Electronic devices, such as mobile phones, laptops, desktops, etc. In another embodiment, the data storage device 100 may be a solid state drive or an embedded device that conforms to Universal Flash Storage (UFS) or Embedded Multi Media Card (EMMC) specifications. The storage device is disposed in an electronic device, for example, a mobile phone, a notebook computer, or a desktop computer. In this case, the host device 130 may be a processor of the electronic device.

主機裝置130可對資料儲存裝置100發出指令,例如,讀取指令或寫入指令,用以存取記憶體裝置120所儲存之 資料,或者進一步控制、管理資料儲存裝置100。 The host device 130 may issue a command, such as a read command or a write command, to the data storage device 100 to access the data stored in the memory device 120. Data, or further control and manage the data storage device 100.

第2圖係顯示根據本發明之一實施例所述之一資料儲存裝置之測試系統示意圖。資料儲存裝置之測試系統200可包括電腦裝置220、電子裝置230以及資料儲存裝置210。電腦裝置220耦接至電子裝置230,用以於一測試程序中發出複數指令測試資料儲存裝置210的運作穩定度。電子裝置230可以是手機、筆記型電腦、桌上型電腦...等等。於此實施例中,資料儲存裝置210可以是符合通用快閃記憶體儲存(UFS)或嵌入式多媒體記憶卡(EMMC)規格之嵌入式儲存裝置,並設置在電子裝置230中。 FIG. 2 is a schematic diagram showing a test system of a data storage device according to an embodiment of the present invention. The test system 200 of the data storage device may include a computer device 220, an electronic device 230, and a data storage device 210. The computer device 220 is coupled to the electronic device 230 and is used to send a plurality of instructions to test the operation stability of the data storage device 210 in a test procedure. The electronic device 230 may be a mobile phone, a notebook computer, a desktop computer, etc. In this embodiment, the data storage device 210 may be an embedded storage device that conforms to the universal flash memory storage (UFS) or embedded multimedia memory card (EMMC) specifications, and is disposed in the electronic device 230.

例如,當資料儲存裝置210為符合通用快閃記憶體儲存(UFS)之規範之嵌入式儲存裝置時,電子裝置230內設置之主機裝置(未示於第2圖)與資料儲存裝置210可透過符合UFS規範之介面邏輯相互連接,並透過此介面邏輯與資料儲存裝置210溝通。又例如,當資料儲存裝置210為符合內嵌式多媒體記憶卡(EMMC)規格之嵌入式儲存裝置時,電子裝置230內設置之主機裝置與資料儲存裝置210可透過符合EMMC規範之介面邏輯相互連接,並透過此介面邏輯與資料儲存裝置210溝通。 For example, when the data storage device 210 is an embedded storage device that complies with the universal flash memory storage (UFS) specification, the host device (not shown in FIG. 2) and the data storage device 210 provided in the electronic device 230 can be accessed through The interface logic conforming to the UFS specification is interconnected, and communicates with the data storage device 210 through the interface logic. As another example, when the data storage device 210 is an embedded storage device complying with the Embedded Multimedia Memory Card (EMMC) specification, the host device and the data storage device 210 provided in the electronic device 230 may be connected to each other through an interface logic that complies with the EMMC specification. And communicate with the data storage device 210 through this interface logic.

第3A圖與第3B圖係顯示根據本發明之第一實施例所述之資料儲存裝置之測試方法流程圖。首先,電腦裝置220可先確認電子裝置230已成功地被啟動(步驟S302)。根據本發明之一實施例,一測試人員可藉由按下電子裝置230之一電源鍵啟動電子裝置230。根據本發明之另一實施例,電腦裝置220可藉由發出一開機指令或重新開機指令給電子裝置230,用以 強制啟動或重新啟動電子裝置230。 FIG. 3A and FIG. 3B are flowcharts showing a test method of the data storage device according to the first embodiment of the present invention. First, the computer device 220 may first confirm that the electronic device 230 has been successfully activated (step S302). According to an embodiment of the present invention, a tester can activate the electronic device 230 by pressing a power button of the electronic device 230. According to another embodiment of the present invention, the computer device 220 may send a power-on command or a power-on command to the electronic device 230 for The electronic device 230 is forcibly started or restarted.

於本發明之實施例,電腦裝置220可發出一或多個確認(Confirm)指令給電子裝置230,並根據電子裝置230回覆的訊息判斷電子裝置230是否已成功地被啟動。舉例而言,當電子裝置230回覆之訊息所夾帶位元值被設定為’1’,代表電子裝置230已成功地被啟動。當電子裝置230回覆之訊息所夾帶位元值被設定為’0’,代表電子裝置230尚未成功地被啟動,或者啟動失敗。 In the embodiment of the present invention, the computer device 220 may send one or more Confirm instructions to the electronic device 230, and determine whether the electronic device 230 has been successfully started according to a message returned by the electronic device 230. For example, when the bit value of the message carried by the electronic device 230 is set to “1”, it means that the electronic device 230 has been successfully activated. When the bit value carried in the message returned by the electronic device 230 is set to '0', it means that the electronic device 230 has not been successfully started, or the startup has failed.

根據本發明之一實施例,當電子裝置230第一次成功地被啟動時,可被視為該電子裝置於測試程序中第一次成功地被啟動。電腦裝置220可根據電子裝置230第一次被啟動的方式及結果,判斷電子裝置230是否通過第一階段的開機測試,或分析造成啟動失敗的根本原因。舉例而言,若電腦裝置220係藉由發出一開機指令強制啟動電子裝置230,而電子裝置230未能成功地被啟動,可能是電子裝置230或資料儲存裝置210內部之訊號傳導層(物理層)或傳輸協定層的物理信號不穩定,導致開機相關的指令信號未能正確地被傳遞而導致。 According to an embodiment of the present invention, when the electronic device 230 is successfully started for the first time, it may be regarded as the first time that the electronic device is successfully started in the test program. The computer device 220 may determine whether the electronic device 230 has passed the first-stage startup test or analyze the root cause of the startup failure according to the manner and result of the electronic device 230 being activated for the first time. For example, if the computer device 220 is forced to start the electronic device 230 by issuing a boot command, and the electronic device 230 is not successfully started, it may be the signal transmission layer (physical layer) inside the electronic device 230 or the data storage device 210 ) Or the physical signal of the transmission protocol layer is unstable, which results in that the startup-related command signal is not correctly transmitted.

於確認電子裝置230已成功地被啟動後,電腦裝置220可發出一休眠指令(第一指令)給電子裝置230,用以驅使電子裝置230進入一休眠狀態(步驟S304)。當電子裝置230自電腦裝置220成功地接收到休眠指令時,可回傳一確認信號(ACK),電腦裝置220可根據是否接收到確認信號判斷電子裝置230是否進入休眠狀態。 After confirming that the electronic device 230 has been successfully started, the computer device 220 may send a sleep command (first command) to the electronic device 230 to drive the electronic device 230 into a sleep state (step S304). When the electronic device 230 successfully receives the sleep instruction from the computer device 220, it can return an acknowledgement signal (ACK), and the computer device 220 can determine whether the electronic device 230 enters the sleep state according to whether the electronic device 230 receives the confirmation signal.

當電子裝置230進入休眠狀態後,電子裝置230之 螢幕會被關閉,且以低功耗的方式運作,其中,資料儲存裝置210於休眠狀態不會執行讀寫操作。 After the electronic device 230 enters the sleep state, the electronic device 230 The screen is turned off and operates in a low power consumption manner. The data storage device 210 does not perform read and write operations in the sleep state.

接著,電腦裝置220等待一既定時間DEVICE_SUSPEND_TIME(第一既定時間)後,發出一喚醒指令(第二指令)給電子裝置,用以喚醒該電子裝置(步驟S306)。 Then, the computer device 220 waits for a predetermined time DEVICE_SUSPEND_TIME (the first predetermined time), and then sends a wake-up command (second command) to the electronic device to wake the electronic device (step S306).

電腦裝置220可發出一確認(Confirm)信號給電子裝置230,用以確認電子裝置是否成功地被喚醒(步驟S308)。 The computer device 220 may send a Confirm signal to the electronic device 230 to confirm whether the electronic device is successfully woken up (step S308).

根據本發明之一實施例,電腦裝置220可藉由步驟S304~步驟S308測試電子裝置230於運作於休眠模式時的溝通是否正常。若電子裝置230無法於休眠狀態中被喚醒,則電腦裝置220判定資料儲存裝置210無法通過第二階段的喚醒測試(步驟S310)。藉此,電腦裝置220可進一步分析造成測試失敗的根本原因。舉例而言,當電子裝置230或資料儲存裝置210內部之信號品質不穩定,或者信號品質不良,都有可能造成電子裝置230無法於休眠狀態中被喚醒。 According to an embodiment of the present invention, the computer device 220 can test whether the communication of the electronic device 230 is normal when the electronic device 230 operates in the sleep mode through steps S304 to S308. If the electronic device 230 cannot be woken up in the sleep state, the computer device 220 determines that the data storage device 210 cannot pass the second-stage wake-up test (step S310). Thereby, the computer device 220 can further analyze the root cause of the test failure. For example, when the signal quality of the electronic device 230 or the data storage device 210 is unstable or the signal quality is not good, the electronic device 230 may not be able to be woken up in the hibernation state.

若電子裝置230成功地因應喚醒指令於休眠狀態中被喚醒,則電腦裝置220可更發出一擷取指令(第三指令)給電子裝置230,用以請求電子裝置230或對應之主機裝置自資料儲存裝置210讀取一操作紀錄(kernel log)檔,並將操作紀錄檔回傳給電腦裝置220(步驟S312)。 If the electronic device 230 is successfully woken up in the hibernation state in response to the wake-up command, the computer device 220 may further issue a fetch command (third command) to the electronic device 230 to request the electronic device 230 or the corresponding host device self-data The storage device 210 reads an operation log file and returns the operation log file to the computer device 220 (step S312).

操作紀錄(kernel log)檔為電子裝置230所維護之一核心紀錄檔,用以紀錄電子裝置230於運作過程中發生過的所有事件。電腦裝置220可藉由執行一些對應的程式分析操作紀錄檔的內容,以判斷造成先前測試失敗的根本原因。舉例而言, 電腦裝置220可藉由搜尋操作紀錄檔所記錄的關鍵字,找出是否有因資料儲存裝置210的異常而導致的測試失敗。 The kernel log file is a core log file maintained by the electronic device 230 and is used to record all events that occur during the operation of the electronic device 230. The computer device 220 may analyze the contents of the operation log file by executing some corresponding programs to determine the root cause of the failure of the previous test. For example, The computer device 220 can find out whether there is a test failure due to the abnormality of the data storage device 210 by searching keywords recorded in the operation log file.

舉例而言,關鍵字"_ufs_do_card_reset"可表示資料儲存裝置210(例如,一UFS裝置)曾經發生設置錯誤並且電子裝置230系統對資料儲存裝置210執行重新設置。關鍵字"hibern8 enter failed"可表示資料儲存裝置210在進入休眠狀態時發生錯誤。關鍵字"hibern8 exit failed"可表示資料儲存裝置210在離開休眠狀態時發生錯誤。關鍵字"ufshcd_abort"可表示資料儲存裝置210被中斷,通常伴隨著休眠狀態進入/離開的錯誤。關鍵字"query_flag_retry"可表示資料儲存裝置210傳送參數訊息時發生錯誤。 For example, the keyword “_ufs_do_card_reset” may indicate that a data storage device 210 (eg, a UFS device) has been set incorrectly and the electronic device 230 system performs a reset on the data storage device 210. The keyword "hibern8 enter failed" may indicate that an error occurred when the data storage device 210 entered the hibernation state. The keyword "hibern8 exit failed" may indicate that an error occurred when the data storage device 210 left the hibernation state. The keyword "ufshcd_abort" may indicate that the data storage device 210 was interrupted, usually accompanied by a hibernation entry / exit error. The keyword “query_flag_retry” may indicate that an error occurred when the data storage device 210 transmitted a parameter message.

接著,電腦裝置220可發出一重新啟動指令(第四指令)給電子裝置230,用以重新啟動電子裝置230(步驟S314)。 Then, the computer device 220 may issue a restart instruction (fourth instruction) to the electronic device 230 to restart the electronic device 230 (step S314).

當電子裝置230自電腦裝置220成功地接收到重新啟動指令時,可回傳一確認信號(ACK),以告知電腦裝置220電子裝置230已執行重新啟動。電腦裝置220可根據是否接收到確認信號判斷重新啟動指令是否可成功地被傳送(步驟S316)。舉例而言,電腦裝置220可設定另一既定時間DEVICE_REBOOTING_TIME(第二既定時間),如果於既定時間DEVICE_REBOOTING_TIME內都沒有自電子裝置230接收到確認信號,則判定重新啟動指令無法於既定時間DEVICE_REBOOTING_TIME內成功地被傳送,資料儲存裝置210無法通過第三階段的重新啟動測試(步驟S318)。 When the electronic device 230 successfully receives the restart instruction from the computer device 220, it may return an acknowledgment signal (ACK) to inform the computer device 220 that the electronic device 230 has performed the restart. The computer device 220 can determine whether the restart instruction can be successfully transmitted according to whether the confirmation signal is received (step S316). For example, the computer device 220 may set another predetermined time DEVICE_REBOOTING_TIME (second predetermined time). If no confirmation signal is received from the electronic device 230 within the predetermined time DEVICE_REBOOTING_TIME, it is determined that the restart command cannot succeed within the predetermined time DEVICE_REBOOTING_TIME The data is transmitted, and the data storage device 210 cannot pass the third-stage restart test (step S318).

若電腦裝置220於既定時間 DEVICE_REBOOTING_TIME內自電子裝置230接收到確認信號,則判定重新啟動指令可成功地被傳送。接著,電腦裝置220進一步判斷電子裝置230於測試程序中執行重新開機之次數是否大於一既定數值(步驟S320)。根據本發明之一實施例,電腦裝置220可持續計算電子裝置230於測試程序中執行重新開機之次數。每當電子裝置230藉由回傳確認信號(ACK)告知電腦裝置220已執行重新啟動時,電腦裝置220可將執行重新開機之次數加1。當電子裝置230於測試程序中執行重新開機之次數大於系統設定之一既定數值TOTAL_DEVICE_REBOOT_LOOP,代表電子裝置230執行重新啟動的次數已超過測試系統設定的臨界值,則電腦裝置220可判定資料儲存裝置210已通過整體的測試(步驟S322)。 If the computer device 220 is at a predetermined time After receiving the confirmation signal from the electronic device 230 within DEVICE_REBOOTING_TIME, it is determined that the restart command can be successfully transmitted. Next, the computer device 220 further determines whether the number of times the electronic device 230 performs a restart in the test program is greater than a predetermined value (step S320). According to an embodiment of the present invention, the computer device 220 may continuously calculate the number of times the electronic device 230 performs a restart in the test program. Whenever the electronic device 230 informs the computer device 220 that a restart has been performed by sending back an acknowledgement signal (ACK), the computer device 220 may increase the number of restarts by one. When the number of restarts performed by the electronic device 230 in the test program is greater than a predetermined value TOTAL_DEVICE_REBOOT_LOOP, which indicates that the number of restarts performed by the electronic device 230 has exceeded the threshold set by the test system, the computer device 220 may determine the data storage device 210 The overall test has been passed (step S322).

另一方面,若電子裝置230於測試程序中執行重新開機之次數不大於既定數值TOTAL_DEVICE_REBOOT_LOOP,代表電子裝置230執行重新啟動的次數尚未超過測試系統設定的臨界值,則測試程序可回到步驟S302,由電腦裝置220再度確認電子裝置230是否已成功地被重新啟動。 On the other hand, if the number of restarts of the electronic device 230 in the test program is not greater than the predetermined value TOTAL_DEVICE_REBOOT_LOOP, which means that the number of restarts of the electronic device 230 has not exceeded the threshold set by the test system, the test program may return to step S302. It is confirmed again by the computer device 220 whether the electronic device 230 has been successfully restarted.

根據本發明之一實施例,於測試程序中,不同時間點被安排了不同的測試(例如,第一階段的開機測試、第二階段的喚醒測試、及第三階段的重新啟動測試等)。藉由上述的安排,當電子裝置230或資料儲存裝置210發生任何操作錯誤時,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,迅速判斷出錯誤類型。舉例而言,如上述,電腦裝置220可根 據電子裝置230第一次被啟動的方式及結果,判斷電子裝置230是否通過第一階段的開機測試,或分析造成啟動失敗的根本原因。 According to an embodiment of the present invention, different tests are arranged at different time points in the test program (for example, the startup test in the first stage, the wake-up test in the second stage, and the restart test in the third stage, etc.). With the above arrangement, when any operation error occurs in the electronic device 230 or the data storage device 210, the computer device 220 can use the steps interrupted by the test program, the execution history of the test program, and the information transmitted between the computer device 220 and the electronic device 230. Communicate messages, etc. to quickly determine the type of error. For example, as described above, the computer device 220 may be According to the manner and result of the electronic device 230 being activated for the first time, determine whether the electronic device 230 has passed the first-stage startup test or analyze the root cause of the startup failure.

舉另一例而言,電腦裝置220亦可根據電子裝置230是否可順利地自休眠狀態中被喚醒的結果,判斷出是否資料儲存裝置210在進入/離開休眠狀態時發生錯誤。 For another example, the computer device 220 may also determine whether an error occurs when the data storage device 210 enters / leaves the hibernation state based on whether the electronic device 230 can be successfully woken up from the hibernation state.

舉又另一例而言,電腦裝置220可根據電子裝置230是否可成功地接收到重新啟動指令,及/或是否可成功地被重新啟動,判斷出是否資料儲存裝置210發生低速至高速切換錯誤(因重新啟動時會先將主機裝置與資料儲存裝置210之間介面邏輯的資料傳輸速率設定於低速檔位,並於主機裝置成功送出LinkStartUP或LineReset等請求重新啟動的指令後,將介面邏輯的資料傳輸速率設定於高速檔位)、電源模式同步錯誤(Device power mode Sync error)等。 For another example, the computer device 220 may determine whether a low-speed to high-speed switching error occurs in the data storage device 210 according to whether the electronic device 230 can successfully receive a restart instruction and / or whether it can be successfully restarted ( Because during the restart, the data transfer rate of the interface logic between the host device and the data storage device 210 is set to a low-speed gear, and after the host device successfully sends a command such as LinkStartUP or LineReset to restart, the interface logic data The transmission rate is set to high-speed gear), Device power mode Sync error, etc.

此外,由於操作紀錄檔會紀錄電子裝置230於運作過程中發生過的所有事件,藉由透過電腦裝置220於電子裝置230成功開機後擷取出操作紀錄檔,並分析操作紀錄檔所紀錄的內容,亦可判斷造成先前測試失敗(若有)的根本原因。 In addition, since the operation log file records all events that occurred during the operation of the electronic device 230, the computer device 220 retrieves the operation log file after the electronic device 230 is successfully turned on, and analyzes the content recorded in the operation log file. You can also determine the root cause of previous test failures, if any.

第4A圖與第4B圖係顯示根據本發明之第二實施例所述之資料儲存裝置之測試方法流程圖。首先,電腦裝置220可先確認電子裝置230是否已成功地被啟動。根據本發明之一實施例,一測試人員可藉由按下電子裝置230之一電源鍵啟動電子裝置230。根據本發明之另一實施例,電腦裝置220可藉由發出一開機指令或重新開機指令給電子裝置230,用以強制啟 動或重新啟動電子裝置230。 4A and 4B are flowcharts showing a test method of a data storage device according to a second embodiment of the present invention. First, the computer device 220 may first confirm whether the electronic device 230 has been successfully activated. According to an embodiment of the present invention, a tester can activate the electronic device 230 by pressing a power button of the electronic device 230. According to another embodiment of the present invention, the computer device 220 may send a boot command or a reboot command to the electronic device 230 to force the boot. Activate or restart the electronic device 230.

根據本發明之一實施例,電腦裝置220可設定一等待時間WAIT_DEVICE_CHECKING_TIME(第三既定時間),並於等待此既定時間WAIT_DEVICE_CHECKING_TIME過後,發出一確認(Confirm)指令(第五指令)給電子裝置230(步驟S402),用以進一步確認電子裝置230是否已成功地被啟動(步驟S404)。 According to an embodiment of the present invention, the computer device 220 may set a waiting time WAIT_DEVICE_CHECKING_TIME (the third predetermined time), and after waiting for the predetermined time WAIT_DEVICE_CHECKING_TIME to elapse, issue a Confirm instruction (the fifth instruction) to the electronic device 230 ( Step S402), to further confirm whether the electronic device 230 has been successfully started (Step S404).

根據本發明之一實施例,電腦裝置220可發出一或多個確認指令給電子裝置230,並根據電子裝置230回覆的訊息判斷電子裝置230是否已成功地被啟動。舉例而言,當電子裝置230回覆之訊息所夾帶位元值被設定為’1’,代表電子裝置230已成功地被啟動。當電子裝置230回覆之訊息所夾帶位元值被設定為’0’,代表電子裝置230尚未成功地被啟動或啟動失敗。 According to an embodiment of the present invention, the computer device 220 may send one or more confirmation instructions to the electronic device 230, and determine whether the electronic device 230 has been successfully started according to a message returned by the electronic device 230. For example, when the bit value of the message carried by the electronic device 230 is set to “1”, it means that the electronic device 230 has been successfully activated. When the bit value carried in the message returned by the electronic device 230 is set to '0', it means that the electronic device 230 has not been successfully started or failed to start.

此外,根據本發明之一實施例,電腦裝置220可於每發出一次確認指令後,累加一確認計數值n。若電腦裝置220未成功地被啟動,則電腦裝置220進一步判斷確認計數值n是否超過確認臨界值CHECKING_COUNT(步驟S406)。若確認計數值尚未超過確認臨界值CHECKING_COUNT,則測試程序回到步驟S402,再度進行確認。若確認計數值已超過確認臨界值CHECKING_COUNT,代表確認的次數已超過測試系統設定的確認臨界值,則判定為測試未通過(步驟S408)。 In addition, according to an embodiment of the present invention, the computer device 220 may accumulate a confirmation count value n after each confirmation instruction is issued. If the computer device 220 is not successfully started, the computer device 220 further determines whether the confirmation count value n exceeds the confirmation threshold value CHECKING_COUNT (step S406). If the confirmation count value has not exceeded the confirmation threshold CHECKING_COUNT, the test program returns to step S402 to perform confirmation again. If the confirmation count value has exceeded the confirmation threshold value CHECKING_COUNT, it means that the number of confirmations has exceeded the confirmation threshold value set by the test system, it is determined that the test has failed (step S408).

根據本發明之一實施例,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,判斷出目前的測試失敗係屬 於電子裝置230未通過第一階段的開機測試而導致的測試失敗。此外,根據本發明之一實施例,電腦裝置220亦可根據電子裝置230被啟動的方式及結果,分析造成啟動失敗的根本原因。舉例而言,若電腦裝置220係藉由發出一開機指令強制啟動電子裝置230,而電子裝置230未能成功地被啟動,可能是電子裝置230或資料儲存裝置210內部之訊號傳導層(物理層)或傳輸協定層的物理信號不穩定,導致開機相關的指令信號未能正確地被傳遞而導致。 According to an embodiment of the present invention, the computer device 220 can determine whether the current test failure is caused by the steps of the test program interruption, the execution history of the test program, and the communication message transmitted between the computer device 220 and the electronic device 230. The test failed due to the electronic device 230 failing the first-stage power-on test. In addition, according to an embodiment of the present invention, the computer device 220 may also analyze the root cause of the startup failure according to the manner and result of the electronic device 230 being activated. For example, if the computer device 220 is forced to start the electronic device 230 by issuing a boot command, and the electronic device 230 is not successfully started, it may be the signal transmission layer (physical layer) inside the electronic device 230 or the data storage device 210 ) Or the physical signal of the transmission protocol layer is unstable, which results in that the startup-related command signal is not correctly transmitted.

另一方面,於確認電子裝置230已成功地被啟動後,電腦裝置220可發出一休眠指令(第一指令)給電子裝置230,用以驅使電子裝置230進入一休眠狀態(步驟S410)。當電子裝置230自電腦裝置220成功地接收到休眠指令時,可回傳一確認信號(ACK),電腦裝置220可根據是否接收到確認信號判斷電子裝置230是否進入休眠狀態。 On the other hand, after confirming that the electronic device 230 has been successfully started, the computer device 220 may issue a sleep command (first command) to the electronic device 230 to drive the electronic device 230 into a sleep state (step S410). When the electronic device 230 successfully receives the sleep instruction from the computer device 220, it can return an acknowledgement signal (ACK), and the computer device 220 can determine whether the electronic device 230 enters the sleep state according to whether the electronic device 230 receives the confirmation signal.

當電子裝置230進入休眠狀態後,電子裝置230之螢幕會被關閉,且以低功耗的方式運作,其中,資料儲存裝置210於休眠狀態不會執行讀寫操作。 After the electronic device 230 enters the sleep state, the screen of the electronic device 230 is turned off and operates in a low power consumption manner. The data storage device 210 does not perform read and write operations in the sleep state.

接著,電腦裝置220等待一既定時間DEVICE_SUSPEND_TIME(第一既定時間)後,發出一喚醒指令(第二指令)給電子裝置,用以喚醒該電子裝置(步驟S412)。 Then, the computer device 220 waits for a predetermined time DEVICE_SUSPEND_TIME (the first predetermined time), and then sends a wake-up command (second command) to the electronic device to wake the electronic device (step S412).

電腦裝置220可發出一確認(Confirm)信號給電子裝置230,用以確認電子裝置是否成功地被喚醒(步驟S414)。 The computer device 220 may send a Confirm signal to the electronic device 230 to confirm whether the electronic device is successfully woken up (step S414).

根據本發明之一實施例,電腦裝置220可藉由步驟S410~步驟S414測試電子裝置230於運作於休眠模式時的溝通 是否正常。若電子裝置230無法於休眠狀態中被喚醒,則電腦裝置220判定資料儲存裝置210未通過測試(步驟S408)。 According to an embodiment of the present invention, the computer device 220 can test the communication between the electronic device 230 and the electronic device 230 in the sleep mode through steps S410 to S414. Is it normal? If the electronic device 230 cannot be woken up in the sleep state, the computer device 220 determines that the data storage device 210 has failed the test (step S408).

值得注意的是,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,判斷於此階段的測試失敗係屬於電子裝置230未通過第二階段的喚醒測試而導致的測試失敗。此外,電腦裝置220可進一步分析造成測試失敗的根本原因。舉例而言,當電子裝置230或資料儲存裝置210內部之信號品質不穩定,或者信號品質不良,都有可能造成電子裝置230無法於休眠狀態中被喚醒。 It is worth noting that the computer device 220 can determine whether the test failure at this stage belongs to the electronic device 230 by the steps of the test program interruption, the execution history of the test program, and the communication messages transmitted between the computer device 220 and the electronic device 230. The test failed due to failing the second stage wake-up test. In addition, the computer device 220 can further analyze the root cause of the test failure. For example, when the signal quality of the electronic device 230 or the data storage device 210 is unstable or the signal quality is not good, the electronic device 230 may not be able to be woken up in the hibernation state.

若電子裝置230成功地因應喚醒指令於休眠狀態中被喚醒,則電腦裝置220可更發出一擷取指令(第三指令)給電子裝置230,用以請求電子裝置230或對應之主機裝置自資料儲存裝置210讀取一操作紀錄(kernel log)檔,並將操作紀錄檔回傳給電腦裝置220(步驟S416)。 If the electronic device 230 is successfully woken up in the hibernation state in response to the wake-up command, the computer device 220 may further issue a fetch command (third command) to the electronic device 230 to request the electronic device 230 or the corresponding host device self-data The storage device 210 reads an operation log file and returns the operation log file to the computer device 220 (step S416).

操作紀錄(kernel log)檔為電子裝置230所維護之一核心紀錄檔,用以紀錄電子裝置230於運作過程中發生過的所有事件。電腦裝置220可藉由執行一些對應的程式分析操作紀錄檔的內容,以判斷造成先前測試失敗的根本原因。舉例而言,電腦裝置220可藉由搜尋操作紀錄檔所記錄的關鍵字,找出是否有因資料儲存裝置210的異常而導致的測試失敗。 The kernel log file is a core log file maintained by the electronic device 230 and is used to record all events that occur during the operation of the electronic device 230. The computer device 220 may analyze the contents of the operation log file by executing some corresponding programs to determine the root cause of the failure of the previous test. For example, the computer device 220 may search for keywords recorded in the operation log file to find out whether there is a test failure due to the abnormality of the data storage device 210.

舉例而言,關鍵字"_ufs_do_card_reset"可表示資料儲存裝置210(例如,一UFS裝置)曾經發生設置錯誤並且電子裝置230系統對資料儲存裝置210執行重新設置。關鍵字 "hibern8 enter failed"可表示資料儲存裝置210在進入休眠狀態時發生錯誤。關鍵字"hibern8 exit failed"可表示資料儲存裝置210在離開休眠狀態時發生錯誤。關鍵字"ufshcd_abort"可表示資料儲存裝置210被中斷,通常伴隨著休眠狀態進入/離開的錯誤。關鍵字"query_flag_retry"可表示資料儲存裝置210傳送參數訊息時發生錯誤。 For example, the keyword “_ufs_do_card_reset” may indicate that a data storage device 210 (eg, a UFS device) has been set incorrectly and the electronic device 230 system performs a reset on the data storage device 210. Keywords "hibern8 enter failed" may indicate that an error occurred when the data storage device 210 entered the hibernation state. The keyword "hibern8 exit failed" may indicate that an error occurred when the data storage device 210 left the hibernation state. The keyword "ufshcd_abort" may indicate that the data storage device 210 was interrupted, usually accompanied by a hibernation entry / exit error. The keyword “query_flag_retry” may indicate that an error occurred when the data storage device 210 transmitted a parameter message.

接著,電腦裝置220可發出一重新啟動指令(第四指令)給電子裝置230,用以重新啟動電子裝置230(步驟S418)。 Then, the computer device 220 may issue a restart instruction (fourth instruction) to the electronic device 230 to restart the electronic device 230 (step S418).

當電子裝置230自電腦裝置220成功地接收到重新啟動指令時,可回傳一確認信號(ACK),以告知電腦裝置220電子裝置230已執行重新啟動。電腦裝置220可根據是否接收到確認信號判斷重新啟動指令是否可成功地被傳送(步驟S420)。舉例而言,電腦裝置220可設定另一既定時間DEVICE_REBOOTING_TIME(第二既定時間),如果於既定時間DEVICE_REBOOTING_TIME內都沒有自電子裝置230接收到確認信號,則判定重新啟動指令無法於既定時間DEVICE_REBOOTING_TIME內成功地被傳送,則電腦裝置220判定資料儲存裝置210未通過測試(步驟S408)。如上述,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,判斷於此階段的測試失敗係屬於資料儲存裝置210無法通過第三階段的重新啟動測試。 When the electronic device 230 successfully receives the restart instruction from the computer device 220, it may return an acknowledgment signal (ACK) to inform the computer device 220 that the electronic device 230 has performed the restart. The computer device 220 can determine whether the restart instruction can be successfully transmitted according to whether the confirmation signal is received (step S420). For example, the computer device 220 may set another predetermined time DEVICE_REBOOTING_TIME (second predetermined time). If no confirmation signal is received from the electronic device 230 within the predetermined time DEVICE_REBOOTING_TIME, it is determined that the restart command cannot succeed within the predetermined time DEVICE_REBOOTING_TIME If the ground is transmitted, the computer device 220 determines that the data storage device 210 has failed the test (step S408). As described above, the computer device 220 can determine whether the test failure at this stage belongs to the data storage device 210 through the steps of the test program interruption, the execution history of the test program, and the communication messages transmitted between the computer device 220 and the electronic device 230. Passed the third stage restart test.

若電腦裝置220於既定時間DEVICE_REBOOTING_TIME內自電子裝置230接收到確認信 號,則判定重新啟動指令可成功地被傳送。接著,電腦裝置220進一步判斷電子裝置230於測試程序中執行重新開機之次數是否大於一既定數值(步驟S422)。根據本發明之一實施例,電腦裝置220可持續計算電子裝置230於測試程序中執行重新開機之次數。每當電子裝置230藉由回傳確認信號(ACK)告知電腦裝置220已執行重新啟動時,電腦裝置220可將執行重新開機之次數加1。當電子裝置230於測試程序中執行重新開機之次數大於系統設定之一既定數值TOTAL_DEVICE_REBOOT_LOOP,代表電子裝置230執行重新啟動的次數已超過測試系統設定的臨界值,則電腦裝置220可判定資料儲存裝置210已通過整體的測試(步驟S424)。 If the computer device 220 receives a confirmation letter from the electronic device 230 within a predetermined time DEVICE_REBOOTING_TIME Number, it is determined that the restart command can be successfully transmitted. Next, the computer device 220 further determines whether the number of times the electronic device 230 performs a restart in the test program is greater than a predetermined value (step S422). According to an embodiment of the present invention, the computer device 220 may continuously calculate the number of times the electronic device 230 performs a restart in the test program. Whenever the electronic device 230 informs the computer device 220 that a restart has been performed by sending back an acknowledgement signal (ACK), the computer device 220 may increase the number of restarts by one. When the number of restarts performed by the electronic device 230 in the test program is greater than a predetermined value TOTAL_DEVICE_REBOOT_LOOP, which indicates that the number of restarts performed by the electronic device 230 has exceeded the threshold set by the test system, the computer device 220 may determine the data storage device 210 The overall test has been passed (step S424).

另一方面,若電子裝置230於測試程序中執行重新開機之次數不大於既定數值TOTAL_DEVICE_REBOOT_LOOP,代表電子裝置230執行重新啟動的次數尚未超過測試系統設定的臨界值,則測試程序可回到步驟S402,由電腦裝置220再度確認電子裝置230是否已成功地被重新啟動。 On the other hand, if the number of restarts of the electronic device 230 in the test program is not greater than the predetermined value TOTAL_DEVICE_REBOOT_LOOP, which means that the number of restarts of the electronic device 230 has not exceeded the threshold set by the test system, the test program may return to step S402. It is confirmed again by the computer device 220 whether the electronic device 230 has been successfully restarted.

如上述,根據本發明之一實施例,於測試程序中,不同時間點被安排了不同的測試(例如,第一階段的開機測試、第二階段的喚醒測試、及第三階段的重新啟動測試等)。藉由上述的安排,當電子裝置230或資料儲存裝置210發生任何操作錯誤時,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,迅速判斷出錯誤類型。舉例而言,如上述,電腦裝置220可根據電子裝置230第一次被啟動的方式及結果,判斷電子裝 置230是否通過第一階段的開機測試,或分析造成啟動失敗的根本原因。 As described above, according to an embodiment of the present invention, different tests are arranged at different time points in the test program (for example, the first-stage startup test, the second-stage wake-up test, and the third-stage restart test). Wait). With the above arrangement, when any operation error occurs in the electronic device 230 or the data storage device 210, the computer device 220 can use the steps interrupted by the test program, the execution history of the test program, and the transmission between the computer device 220 and the electronic device 230 Communicate messages, etc. to quickly determine the type of error. For example, as described above, the computer device 220 may determine the electronic device according to the manner and result of the first activation of the electronic device 230. Whether the setting 230 passes the first-stage startup test or analyzes the root cause of the startup failure.

舉另一例而言,電腦裝置220亦可根據電子裝置230是否可順利地自休眠狀態中被喚醒的結果,判斷出是否資料儲存裝置210在進入/離開休眠狀態時發生錯誤。 For another example, the computer device 220 may also determine whether an error occurs when the data storage device 210 enters / leaves the hibernation state based on whether the electronic device 230 can be successfully woken up from the hibernation state.

舉又另一例而言,電腦裝置220可根據電子裝置230是否可成功地接收到重新啟動指令,及/或是否可成功地被重新啟動,判斷出是否資料儲存裝置210發生低速至高速切換錯誤(因重新啟動時會先將主機裝置與資料儲存裝置210之間介面邏輯的資料傳輸速率設定於低速檔位,並於主機裝置成功送出LinkStartUP或LineReset等請求重新啟動的指令後,將介面邏輯的資料傳輸速率設定於高速檔位)、電源模式同步錯誤(Device power mode Sync error)、重新啟動時序錯(DMR Reset timing error)等。 For another example, the computer device 220 may determine whether a low-speed to high-speed switching error occurs in the data storage device 210 according to whether the electronic device 230 can successfully receive a restart instruction and / or whether it can be successfully restarted ( Because during the restart, the data transfer rate of the interface logic between the host device and the data storage device 210 is set to a low-speed gear, and after the host device successfully sends a command such as LinkStartUP or LineReset to restart, the interface logic data The transmission rate is set to high-speed gear), Device power mode Sync error, DMR Reset timing error, etc.

此外,由於操作紀錄檔會紀錄電子裝置230於運作過程中發生過的所有事件,藉由透過電腦裝置220於電子裝置230成功開機後擷取出操作紀錄檔,並分析操作紀錄檔所紀錄的內容,亦可判斷造成先前測試失敗(若有)的根本原因。 In addition, since the operation log file records all events that occurred during the operation of the electronic device 230, the computer device 220 retrieves the operation log file after the electronic device 230 is successfully turned on, and analyzes the content recorded in the operation log file. You can also determine the root cause of previous test failures, if any.

一般而言,在電子裝置驗證階段時,會透過重新啟動測試(rebooting test)來驗證整體系統內所配置的各元件的穩定性,例如,確認資料儲存裝置可以在斷電/上電之後能夠穩定地重新連結到主機裝置,並完成正常開機。然而,傳統技術中,由於電子裝置的驗證係透過電子裝置內建的應用程式(APK)執行,因而於電子裝置無法順利開機的當下,無法保留 任何的錯誤訊息,導致爾後需要耗費許多時間等待錯誤復現,間接延長除錯時間以及增加確認問題點的難度。 Generally speaking, during the electronic device verification phase, the stability of each component configured in the overall system is verified through a rebooting test, for example, to confirm that the data storage device can be stable after power-off / power-on Ground to reconnect to the host device and complete normal boot. However, in the conventional technology, since the verification of the electronic device is performed through an application program (APK) built into the electronic device, it cannot be retained when the electronic device cannot be started smoothly. Any error message leads to the need to spend a lot of time waiting for the error to reappear, indirectly extending the debugging time, and increasing the difficulty of identifying the problem point.

為解決上述問題,本發明提出了新穎的測試系統及測試方法,其可快速且有效地驗證資料儲存裝置應用於各種不同的電子裝置的運作穩定度,及資料儲存裝置與各系統平台的相容性,並且可有效率的縮短啟動測試時間,解決傳統啟動測試時間過長的問題,並且能提高錯誤偵測率。於測試程序中,因不同時間點被安排了不同的測試(例如,第一階段的開機測試、第二階段的喚醒測試、及第三階段的重新啟動測試等),當電子裝置230或資料儲存裝置210發生任何操作錯誤時,電腦裝置220可藉由測試程序中斷的步驟、測試程序執行的歷程及電腦裝置220與電子裝置230之間傳送的溝通訊息等,迅速判斷出錯誤類型,以協助研發人員能快速檢查以釐清錯誤的根本原因並提出改善方案。此外,本發明所提出之測試方法可全程藉由電腦裝置自動化控制,並且可同時對多個電子裝置執行測試,相較於傳統技術,可大幅提昇測試的效率,解決了傳統技術的問題。此外,於本發明所提出之測試方法,在偵測到測試失敗當下能夠停止測試,並且保留測試程序的執行紀錄,再利用電腦裝置分析各個紀錄檔,有效提高錯誤偵測率。 In order to solve the above problems, the present invention proposes a novel test system and test method, which can quickly and effectively verify the operation stability of the data storage device applied to various electronic devices, and the compatibility of the data storage device with various system platforms It can effectively shorten the startup test time, solve the problem that the traditional startup test time is too long, and can improve the error detection rate. In the test procedure, different tests are arranged at different time points (for example, the first-stage startup test, the second-stage wake-up test, and the third-stage restart test, etc.). When the electronic device 230 or data is stored, When any operation error of the device 210 occurs, the computer device 220 can quickly determine the type of the error by using the steps of the test program interruption, the test program execution history, and the communication messages transmitted between the computer device 220 and the electronic device 230 to assist in research and development. Personnel can quickly check to clarify the root cause of the error and propose improvement measures. In addition, the test method proposed by the present invention can be automatically controlled by a computer device throughout the process, and can perform tests on multiple electronic devices at the same time. Compared with the conventional technology, the test efficiency can be greatly improved, and the problems of the conventional technology are solved. In addition, the test method proposed in the present invention can stop the test when a test failure is detected, and keep a record of the execution of the test program, and then use a computer device to analyze each log file to effectively improve the error detection rate.

申請專利範圍中用以修飾元件之“第一”、“第二”等序數詞之使用本身未暗示任何優先權、優先次序、各元件之間之先後次序、或方法所執行之步驟之次序,而僅用作標識來區分具有相同名稱(具有不同序數詞)之不同元件。 The use of ordinal numbers such as "first" and "second" in the scope of the patent application does not imply any priority, order of priority, order between elements, or the order of steps performed by the method. It is only used as an identifier to distinguish different elements with the same name (with different ordinal numbers).

雖然本發明已以較佳實施例揭露如上,然其並非 用以限定本發明,任何熟悉此項技藝者,在不脫離本發明之精神和範圍內,當可做些許更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed as above with preferred embodiments, it is not It is used to limit the present invention. Anyone familiar with the art can make some modifications and retouching without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be defined by the scope of the attached patent application as follows: quasi.

Claims (10)

一種資料儲存裝置之測試系統,用以測試資料儲存裝置,包括:一資料儲存裝置;一電子裝置,包含一主機裝置,該主機裝置耦接至該資料儲存裝置,並且利用一介面邏輯與該資料儲存裝置溝通;以及一電腦裝置,耦接至該電子裝置,用以於一測試程序中發出複數指令測試該資料儲存裝置;其中於該電子裝置成功地被啟動後,該電腦裝置發出一第一指令給該電子裝置,用以驅使該電子裝置進入一休眠狀態,並且於等待一第一既定時間後,該電腦裝置發出一第二指令給該電子裝置,用以喚醒該電子裝置。 A test system for a data storage device for testing a data storage device includes: a data storage device; an electronic device including a host device, the host device is coupled to the data storage device, and uses an interface logic and the data Communication with a storage device; and a computer device coupled to the electronic device for issuing a plurality of instructions to test the data storage device in a test procedure; wherein after the electronic device is successfully activated, the computer device issues a first An instruction is given to the electronic device to drive the electronic device into a sleep state, and after waiting for a first predetermined time, the computer device sends a second instruction to the electronic device to wake up the electronic device. 如申請專利範圍第1項所述之測試系統,其中於該電子裝置因應該第二指令被喚醒後,該電腦裝置更發出一第三指令給該電子裝置,用以請求該主機裝置自該資料儲存裝置讀取一操作紀錄檔,並將該操作紀錄檔回傳給該電腦裝置。 The test system according to item 1 of the scope of patent application, wherein after the electronic device is awakened in response to the second instruction, the computer device further issues a third instruction to the electronic device to request the host device to retrieve the data from the host device. The storage device reads an operation log file and returns the operation log file to the computer device. 如申請專利範圍第1項所述之測試系統,其中於該電子裝置因應該第二指令被喚醒後,該電腦裝置更發出一第四指令給該電子裝置,用以驅使該電子裝置重新開機。 The test system according to item 1 of the scope of patent application, wherein after the electronic device is awakened in response to the second instruction, the computer device further issues a fourth instruction to the electronic device to drive the electronic device to restart. 如申請專利範圍第3項所述之測試系統,其中該電腦裝置更計算該電子裝置於該測試程序中重新開機之一次數。 The test system according to item 3 of the scope of patent application, wherein the computer device calculates a number of times the electronic device is restarted in the test procedure. 如申請專利範圍第4項所述之測試系統,其中當該電子裝置於該測試程序中重新開機之該次數大於一既定數值時,該 電腦裝置判斷該資料儲存裝置通過測試。 The test system according to item 4 of the scope of patent application, wherein when the number of times the electronic device is restarted in the test procedure is greater than a predetermined value, the The computer device determines that the data storage device passes the test. 一種資料儲存裝置之測試方法,用以測試一資料儲存裝置,其中該資料儲存裝置耦接至一電子裝置,該電子裝置耦接至一電腦裝置,該電腦裝置於一測試程序中發出複數指令測試該資料儲存裝置,該測試方法包括:於該電子裝置成功地被啟動後,由該電腦裝置發出一第一指令給該電子裝置,用以驅使該電子裝置進入一休眠狀態;以及等待一第一既定時間後,由該電腦裝置發出一第二指令給該電子裝置,用以喚醒該電子裝置。 A test method for a data storage device for testing a data storage device, wherein the data storage device is coupled to an electronic device, the electronic device is coupled to a computer device, and the computer device sends a plurality of instructions for testing in a test procedure In the data storage device, the testing method includes: after the electronic device is successfully started, the computer device sends a first instruction to the electronic device to drive the electronic device into a sleep state; and waiting for a first After the predetermined time, the computer device sends a second instruction to the electronic device to wake up the electronic device. 如申請專利範圍第6項所述之測試方法,更包括:於該電子裝置因應該第二指令被喚醒後,由該電腦裝置發出一第三指令給該電子裝置,用以請求該電子裝置自該資料儲存裝置讀取一操作紀錄檔,並將該操作紀錄檔回傳給該電腦裝置。 The test method described in item 6 of the patent application scope further includes: after the electronic device is awakened in response to the second instruction, the computer device sends a third instruction to the electronic device to request the electronic device to The data storage device reads an operation log file and returns the operation log file to the computer device. 如申請專利範圍第6項所述之測試方法,更包括:於該電子裝置因應該第二指令被喚醒後,由該電腦裝置發出一第四指令給該電子裝置,用以驅使該電子裝置重新開機。 The test method described in item 6 of the scope of patent application, further includes: after the electronic device is awakened in response to the second instruction, the computer device sends a fourth instruction to the electronic device to drive the electronic device to restart Power on. 如申請專利範圍第6項所述之測試方法,更包括:計算該電子裝置於該測試程序中重新開機之一次數。 The test method described in item 6 of the patent application scope further includes: calculating a number of times that the electronic device is restarted in the test procedure. 如申請專利範圍第9項所述之測試方法,更包括:當該電子裝置於該測試程序中重新開機之該次數大於一既定數值時,判斷該資料儲存裝置通過測試。 According to the test method described in item 9 of the scope of patent application, the method further includes: when the number of times the electronic device is restarted in the test procedure is greater than a predetermined value, judging that the data storage device passes the test.
TW107102033A 2018-01-19 2018-01-19 A system and a method for testing a data storage device TWI665606B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW107102033A TWI665606B (en) 2018-01-19 2018-01-19 A system and a method for testing a data storage device
CN201810685492.0A CN110058973B (en) 2018-01-19 2018-06-28 Test system and test method for data storage device
US16/163,831 US10691569B2 (en) 2018-01-19 2018-10-18 System and method for testing a data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107102033A TWI665606B (en) 2018-01-19 2018-01-19 A system and a method for testing a data storage device

Publications (2)

Publication Number Publication Date
TWI665606B TWI665606B (en) 2019-07-11
TW201933091A true TW201933091A (en) 2019-08-16

Family

ID=67298151

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107102033A TWI665606B (en) 2018-01-19 2018-01-19 A system and a method for testing a data storage device

Country Status (3)

Country Link
US (1) US10691569B2 (en)
CN (1) CN110058973B (en)
TW (1) TWI665606B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641601A (en) 2020-04-27 2021-11-12 三星电子株式会社 Link starting method of storage device, host and implementation system thereof
CN116453582B (en) * 2023-06-14 2023-09-22 合肥康芯威存储技术有限公司 Signal testing system and method for memory

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1391164A (en) * 2002-06-04 2003-01-15 威盛电子股份有限公司 On-off test method for motherboard of computer
JP4229715B2 (en) * 2003-01-29 2009-02-25 Necエレクトロニクス株式会社 Test circuit and semiconductor device
CN100426248C (en) * 2005-06-03 2008-10-15 鸿富锦精密工业(深圳)有限公司 Test system and method for network additive storage device
JP2007066126A (en) * 2005-09-01 2007-03-15 Hitachi Global Storage Technologies Netherlands Bv Test method for data storage device and method of manufacturing data storage device
US8640007B1 (en) * 2011-09-29 2014-01-28 Western Digital Technologies, Inc. Method and apparatus for transmitting diagnostic data for a storage device
CN103744787A (en) * 2014-01-21 2014-04-23 上海斐讯数据通信技术有限公司 Cellphone automated testing method
US9268635B2 (en) * 2014-05-21 2016-02-23 Sandisk Technologies Inc. Error correction using multiple data sources
TWI569284B (en) * 2015-05-27 2017-02-01 慧榮科技股份有限公司 Memory controller and memory module
US9824760B2 (en) * 2015-07-29 2017-11-21 Sandisk Technologies Llc Systems and methods of generating shaped random bits
US9865360B2 (en) * 2015-10-22 2018-01-09 Sandisk Technologies Llc Burn-in memory testing
CN111971742A (en) * 2016-11-10 2020-11-20 赛轮思软件技术(北京)有限公司 Techniques for language independent wake word detection
US20190163255A1 (en) * 2017-11-30 2019-05-30 Nvidia Corporation Core off sleep mode with low exit latency

Also Published As

Publication number Publication date
TWI665606B (en) 2019-07-11
US20190227894A1 (en) 2019-07-25
US10691569B2 (en) 2020-06-23
CN110058973B (en) 2022-10-14
CN110058973A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
US9417967B2 (en) Computing device and method for automatically recovering bios of computing device
US9037812B2 (en) Method, apparatus and system for memory validation
TWI493460B (en) Electronic device and booting method
TWI443513B (en) Memory storage device, memory controller thereof, and method for programming data thereof
US7900090B2 (en) Systems and methods for memory retention across resets
CN101634960A (en) Method for revising BIOS parameter and regenerating checksum
US20150095632A1 (en) Computer booting system and method for computer system
TWI489466B (en) Memory erasing method, memory controller and memory storage apparatus
TWI534707B (en) Computer system, shutdown and boot method thereof
TWI665606B (en) A system and a method for testing a data storage device
US20220187987A1 (en) Temperature control method and data storage system
TWI515557B (en) Computer system and control method
US20160124816A1 (en) Computing device and method for recovering bios of computing device
US11487638B2 (en) Computer program product and method and apparatus for controlling access to flash memory card
TW202213114A (en) Host device and memory system
CN105630523A (en) Computer BIOS data recovery system and method
US20130321944A1 (en) Server and method for preventing the server from vibration damage
TWI738235B (en) Method for performing resuming management, and memory device and controller thereof and electronic device
US10922023B2 (en) Method for accessing code SRAM and electronic device
CN103677875A (en) Method for starting electronic equipment, method for controlling permission and electronic equipment
CN110297595B (en) Host memory buffer configuration method, storage device and control circuit unit
CN102831032A (en) Repair system and method for master boot record of hard disc
TWI521354B (en) Controlling method for connector, connector and memory storage device
US20240028508A1 (en) Memory controller and method for controlling output of debug messages
CN103777732A (en) Connector control method, connector and storage storing device