TWI793774B - Method and apparatus and computer program product for debugging solid state disk devices - Google Patents

Method and apparatus and computer program product for debugging solid state disk devices Download PDF

Info

Publication number
TWI793774B
TWI793774B TW110135711A TW110135711A TWI793774B TW I793774 B TWI793774 B TW I793774B TW 110135711 A TW110135711 A TW 110135711A TW 110135711 A TW110135711 A TW 110135711A TW I793774 B TWI793774 B TW I793774B
Authority
TW
Taiwan
Prior art keywords
hard disk
solid
state hard
disk device
debugging
Prior art date
Application number
TW110135711A
Other languages
Chinese (zh)
Other versions
TW202301324A (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 慧榮科技股份有限公司
Publication of TW202301324A publication Critical patent/TW202301324A/en
Application granted granted Critical
Publication of TWI793774B publication Critical patent/TWI793774B/en

Links

Images

Classifications

    • 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
    • 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/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • 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
    • 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
    • G11C29/44Indication or identification of errors, e.g. for repair
    • 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
    • G11C2029/4402Internal storage of test result, quality data, chip identification, repair information
    • 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
    • G11C29/1201Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details comprising I/O circuitry

Abstract

The invention relates to a method for debugging solid state disk (SSD) devices, which is performed by a processing unit of a raspberry Pi. The method includes: emulating a first Joint Test Action Group (JTAG) command to an SSD device through a General-Purpose Input/Output (GPIO) interface to stop running by a processing unit of a flash controller of the SSD device; emulating a second JTAG command to the SSD device through the GPIO interface to force the SSD device to exit a sleep mode; and emulating a third JTAG command to the SSD device through the GPIO interface to read a designated length of data from a designated address of a static random access memory (SRAM) of the SSD device. By executing the debugging method with the GPIO interface in the raspberry Pi as described above, it would be more flexible than the in-circuit emulator (ICE) to solve problems encountered during debugging.

Description

固態硬碟裝置的除錯方法及裝置以及電腦程式產品 Debugging method and device of solid-state hard disk device and computer program product

本發明涉及儲存裝置,尤指一種固態硬碟裝置的除錯方法及裝置以及電腦程式產品。 The invention relates to a storage device, in particular to a debugging method and device for a solid-state hard disk device and a computer program product.

目前使用市售的內電路仿真器(in-circuit emulator,ICE)來搜集固態硬碟(solid state disk,SSD)裝置運行時的韌體狀態,會遭遇到以下的問題:內電路仿真器無法被控制來滿足所有的應用環境,舉例來說,當內電路仿真器停止時會執行一些固定的操作,例如,停止固態硬碟產品中的中央處理器等,導致主機端無法接著存取固態硬碟產品中的資料。目前的內電路仿真器在需要改變位址才能讀取硬體寄存器時,例如,當工程師在韌體卡住時還希望存取硬體寄存器去知道NAND閃存的狀態時,回應的速度很慢。此外,內電路仿真器非常昂貴,並且除錯成本需要進一步降低。因此,本發明提出一種固態硬碟裝置的除錯方法、裝置及電腦程式產品,用於解決如上所述的問題。 At present, using a commercially available in-circuit emulator (ICE) to collect the firmware status of a solid state disk (SSD) during operation will encounter the following problem: the in-circuit emulator cannot be accessed Control to meet all application environments, for example, when the in-circuit emulator stops, it will perform some fixed operations, such as stopping the central processing unit in the solid-state hard disk product, so that the host cannot continue to access the solid-state hard disk information in the product. The current in-circuit emulator needs to change the address to read the hardware register, for example, when the engineer wants to access the hardware register to know the state of the NAND flash memory when the firmware is stuck, the response speed is very slow. In addition, in-circuit emulators are very expensive, and debugging costs need to be further reduced. Therefore, the present invention proposes a debugging method, device and computer program product of a solid-state hard disk device to solve the above-mentioned problems.

有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。 In view of this, how to alleviate or eliminate the deficiencies in the above-mentioned related fields is a problem to be solved.

本說明書涉及一種固態硬碟的除錯方法的實施例,由樹莓派的處理單元執行。該方法包含:通過通用輸入輸出介面模擬第一聯合測試工作群組命令給固態硬碟裝置,用於停止固態硬碟裝置中的快閃控 制器的處理單元的運行;通過通用輸入輸出介面模擬第二聯合測試工作群組命令給固態硬碟裝置,用於讓固態硬碟裝置離開休眠模式;以及通過通用輸入輸出介面模擬第三聯合測試工作群組命令給固態硬碟裝置,用於從固態硬碟裝置中的靜態隨機存取記憶體的指定位址讀取指定長度的資料。 This specification relates to an embodiment of a debugging method for a solid-state hard disk, which is executed by the processing unit of the Raspberry Pi. The method includes: simulating the first joint test working group command to the solid-state hard disk device through the general input and output interface, and is used to stop the flash controller in the solid-state hard disk device the operation of the processing unit of the controller; simulate the second joint test working group command to the solid state hard disk device through the general input and output interface, and use it to let the solid state hard disk device leave the sleep mode; and simulate the third joint test through the general input and output interface The workgroup command is given to the solid-state hard disk device, and is used for reading data of a specified length from a specified address of the static random access memory in the solid-state hard disk device.

本說明書另涉及一種電腦程式產品的實施例,包含固態硬碟裝置的除錯程式碼。當樹莓派的處理單元執行所述除錯程式碼時,實施如上所述的固態硬碟的除錯方法。 The specification further relates to an embodiment of a computer program product, which includes a debugging program code of a solid-state hard disk device. When the processing unit of the Raspberry Pi executes the debugging program code, the above-mentioned debugging method for the solid state hard disk is implemented.

本說明書另涉及一種為固態硬碟裝置的除錯裝置的實施例,包含:通用輸入輸出介面;以及處理單元。處理單元耦接通用輸入輸出介面,用於載入並執行如上所述的除錯程式碼時,實施如上所述的固態硬碟的除錯方法。 The specification further relates to an embodiment of a debugging device for a solid-state hard disk device, including: a general-purpose input and output interface; and a processing unit. The processing unit is coupled with the general input and output interface, and is used for implementing the above-mentioned debugging method for the solid-state hard disk when loading and executing the above-mentioned debugging code.

上述實施例的優點之一,通過如上所述搭配樹莓派中的通用輸入輸出介面的除錯方法,可較內電路仿真器具有彈性,以解決除錯時遭遇到的問題。 One of the advantages of the above-mentioned embodiment is that by using the debugging method with the GPIO in the Raspberry Pi as described above, it can be more flexible than the internal circuit emulator to solve the problems encountered during debugging.

本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。 Other advantages of the present invention will be explained in more detail with the following description and drawings.

10:除錯系統 10: Debugging system

110:除錯裝置 110: Debugging device

112:樹莓派 112: Raspberry Pi

114:JTAG附加板 114: JTAG additional board

120:固態硬碟裝置 120: Solid state hard disk device

121:快閃控制器 121: Flash controller

122:輔助寄存器 122: auxiliary register

123:JTAG介面 123: JTAG interface

124:UART介面 124: UART interface

125:處理單元 125: processing unit

126:記憶體 126: memory

127:裝置介面 127: Device interface

128:閃存模組 128:Flash memory module

129:主機介面 129: host interface

130:個人電腦 130: personal computer

132:裝置介面 132: Device interface

140:JTAG連接裝置 140: JTAG connection device

150:UART錄製裝置 150: UART recording device

160:電源 160: power supply

210:處理單元 210: processing unit

222:AHB/ASB 222:AHB/ASB

224:APB 224:APB

230:記憶體控制器 230: memory controller

232:SRAM 232: SRAM

234:DRAM 234:DRAM

236:閃存 236: flash memory

260:GPIO介面 260: GPIO interface

270:USB介面 270:USB interface

280:Wi-Fi模組 280: Wi-Fi module

290:藍牙模組 290:Bluetooth module

S510~S595:方法步驟 S510~S595: method steps

710:20接腳連接器 710: 20 pin connector

730:10接腳連接器 730:10 pin connector

S910~S970:方法步驟 S910~S970: method steps

圖1為依據本發明實施例的除錯系統的方塊圖。 FIG. 1 is a block diagram of a debugging system according to an embodiment of the invention.

圖2為依據本發明實施例的樹莓派的系統架構圖。 FIG. 2 is a system architecture diagram of a Raspberry Pi according to an embodiment of the present invention.

圖3為依據本發明實施例的Argonaut精簡指令集電腦核心(Argonaut Reduced Instruction Set Computer Core,ARC)輔助寄存器集的示意圖。 FIG. 3 is a schematic diagram of an auxiliary register set of an Argonaut Reduced Instruction Set Computer Core (ARC) according to an embodiment of the present invention.

圖4為依據本發明實施例的Argonaut精簡指令集電腦機器(Argonaut RISC Machine,ARM)輔助控制寄存器和二級輔助控制寄存器的位元分配示意圖。 FIG. 4 is a schematic diagram of bit allocation of an Argonaut RISC Machine (ARM) auxiliary control register and a secondary auxiliary control register according to an embodiment of the present invention.

圖5為依據本發明實施例的由除錯應用程式實施的固態硬碟裝置除錯的方法流程圖。 FIG. 5 is a flowchart of a method for debugging a solid-state hard disk device implemented by a debugging application program according to an embodiment of the present invention.

圖6為依據本發明實施例的樹莓派的通用輸入輸出(General-Purpose Input/Output,GPIO)介面的接腳示意圖。 FIG. 6 is a schematic diagram of pins of a General-Purpose Input/Output (GPIO) interface of a Raspberry Pi according to an embodiment of the present invention.

圖7為依據本發明實施例的聯合測試工作群組(Joint Test Action Group,JTAG)連接裝置中的JTAG 20接腳轉10接腳的示意圖。 FIG. 7 is a schematic diagram of converting JTAG 20 pins to 10 pins in a Joint Test Action Group (JTAG) connection device according to an embodiment of the present invention.

圖8為依據本發明實施例的樹莓派的GPIO介面的接腳圖。 FIG. 8 is a pin diagram of the GPIO interface of the Raspberry Pi according to an embodiment of the present invention.

圖9為依據本發明實施例的由執行時程式庫中的函數所實施的固態硬碟裝置除錯的方法流程圖。 FIG. 9 is a flow chart of a method for debugging a solid-state hard disk device implemented by a function in a runtime library according to an embodiment of the present invention.

以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。 The following description is a preferred implementation mode of the invention, and its purpose is to describe the basic spirit of the invention, but not to limit the invention. For the actual content of the invention, reference must be made to the scope of the claims that follow.

必須了解的是,使用於本說明書中的“包含”、“包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that words such as "comprising" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operations, components and/or components, but do not exclude the possibility of adding More technical characteristics, numerical values, method steps, operation processes, components, components, or any combination of the above.

於權利要求中使用如“第一”、“第二”、“第三”等詞是用於修飾權利要求中的元件,並非用於表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用於區別具有相同名字的元件。 Words such as "first", "second", and "third" used in the claims are used to modify the elements in the claims, and are not used to indicate that there is a priority order, a pre-relationship, or an element An element preceding another element, or a chronological order in performing method steps, is only used to distinguish elements with the same name.

必須了解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。 It must be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, intervening elements may be present. In contrast, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements may be interpreted in a similar fashion, eg, "between" versus "directly between," or "adjacent" versus "directly adjacent," and so forth.

參考圖1所示的除錯系統方塊圖。除錯系統10包含除錯裝置110、固態硬碟裝置120、個人電腦130、聯合測試工作群組(Joint Test Action Group,JTAG)連接裝置140、通用非同步收發器(Universal Asynchronous Receiver/Transmitter,UART)錄製裝置150和電源160。個人電腦130上設置固態硬碟裝置120。除錯裝置110從電源160獲取電力,並且供電給個人電腦130、JTAG連接裝置140和UART錄製裝置150。個人電腦130供電給固態硬碟裝置120。 Refer to the block diagram of the debugging system shown in Figure 1. The debugging system 10 includes a debugging device 110, a solid-state hard disk device 120, a personal computer 130, a joint test working group (Joint Test Action Group, JTAG) connecting device 140 , Universal Asynchronous Receiver/Transmitter (UART) recording device 150 and power supply 160 . The solid-state hard disk device 120 is installed on the personal computer 130 . The debug device 110 obtains power from the power supply 160 and supplies power to the personal computer 130 , the JTAG connection device 140 and the UART recording device 150 . The personal computer 130 supplies power to the solid state disk device 120 .

固態硬碟裝置120為待除錯的裝置,至少包含閃存控制器121和閃存模組128。閃存模組128提供大量的儲存空間,通常是數百個千兆位元組(Gigabytes),甚至是數個兆兆位元組(Terabytes),用於儲存大量的使用者資料,例如高解析度圖片、影片等。閃存控制器121包含主機介面129,用於連接上個人電腦130以獲取電力。主機介面129可以通用序列匯流排(Universal Serial Bus,USB)、先進技術附著(advanced technology attachment,ATA)、序列先進技術附著(serial advanced technology attachment,SATA)、快速周邊元件互聯(peripheral component interconnect express,PCI-E)、通用快閃記憶儲存(Universal Flash Storage UFS)、嵌入式多媒體卡(Embedded Multi-Media Card,eMMC)等通訊協定和個人電腦130中的裝置介面132溝通。閃存控制器121還包含處理單元125,通過匯流排架構和主機介面129、輔助寄存器(auxiliary register,AUX)122、JTAG介面123、UART介面124、記憶體126、裝置介面127彼此連接以傳送和接收命令、控制訊號、訊息、資料等。處理單元125可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行韌體(firmware)指令過程中存取輔助寄存器122和記憶體126,用於讀取和儲存執行過程中使用到的變數、資料表、資料、訊息等。例如,處理單元125可以是Argonaut精簡指令集電腦核心(Argonaut Reduced Instruction Set Computer,RISC Core,簡稱為ARC)、Argonaut精簡指令集電腦機器(Argonaut RISC Machine, 簡稱為ARM)等。輔助寄存器122和記憶體126中儲存的內容是除錯時的重要參考依據。在一些實施例中,記憶體126可為靜態隨機存取記憶體(Static Random Access Memory,SRAM)。在另一些實施例中,記憶體126可包含靜態隨機存取記憶體和動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)。裝置介面127可使用雙倍資料率(Double Data Rate DDR)通訊協定彼此溝通,例如,開放NAND快閃(Open NAND Flash Interface ONFI)、雙倍資料率開關(DDR Toggle)或其他通訊協定和閃存模組128溝通,用於讀取、寫入或者抹除資料。固態硬碟裝置120通過JTAG介面連接上JTAG連接裝置140,並且通過UART介面124連接上UART錄製裝置150。 The solid state disk device 120 is a device to be debugged, and at least includes a flash memory controller 121 and a flash memory module 128 . The flash memory module 128 provides a large amount of storage space, usually hundreds of gigabytes (Gigabytes), or even several terabytes (Terabytes), for storing a large amount of user data, such as high-resolution Pictures, videos, etc. The flash memory controller 121 includes a host interface 129 for connecting to a personal computer 130 to obtain power. The host interface 129 can be universal serial bus (Universal Serial Bus, USB), advanced technology attachment (advanced technology attachment, ATA), serial advanced technology attachment (serial advanced technology attachment, SATA), fast peripheral component interconnect express, PCI-E), universal flash storage (Universal Flash Storage UFS), embedded multimedia card (Embedded Multi-Media Card, eMMC) and other communication protocols communicate with the device interface 132 in the personal computer 130 . The flash memory controller 121 also includes a processing unit 125, which is connected to each other through a bus structure and a host interface 129, an auxiliary register (auxiliary register, AUX) 122, a JTAG interface 123, a UART interface 124, a memory 126, and a device interface 127 to transmit and receive Commands, control signals, messages, data, etc. The processing unit 125 can be implemented in a variety of ways, such as using general-purpose hardware (for example, a single processor, a multi-processor with parallel processing capabilities, a graphics processing unit, or other processors with computing capabilities), and executing firmware (firmware ) during the instruction process to access the auxiliary register 122 and the memory 126 for reading and storing variables, data tables, data, messages, etc. used in the execution process. For example, the processing unit 125 may be an Argonaut Reduced Instruction Set Computer (Argonaut Reduced Instruction Set Computer, RISC Core, referred to as ARC), an Argonaut Reduced Instruction Set Computer Machine (Argonaut RISC Machine, Abbreviated as ARM) and so on. The contents stored in the auxiliary register 122 and the memory 126 are important references for debugging. In some embodiments, the memory 126 can be a static random access memory (Static Random Access Memory, SRAM). In other embodiments, the memory 126 may include static random access memory and dynamic random access memory (Dynamic Random Access Memory, DRAM). The device interface 127 can use the double data rate (Double Data Rate DDR) communication protocol to communicate with each other, for example, open NAND flash (Open NAND Flash Interface ONFI), double data rate switch (DDR Toggle) or other communication protocols and flash memory modules Group 128 communicates for reading, writing or erasing data. The solid state hard disk device 120 is connected to the JTAG connection device 140 through the JTAG interface, and is connected to the UART recording device 150 through the UART interface 124 .

輔助寄存器122可服從ARC、ARM或其他的規範。例如,圖3顯示從2008年四月發表的ARCompact TM Instruction Set Architecture:Programmer’s Reference的第45至46頁摘錄出的輔助寄存器集的摘要。圖4中的A部分顯示從2010至2011年發表的Cortex TM -R5 and Cortex-R5F revision:r1p1,Technical Reference Manual的第4-41頁摘錄出的位元分配。圖4中的B部分顯示從2010至2011年發表的Cortex TM -R5 and Cortex-R5F revision:r1p1,Technical Reference Manual的第4-45頁摘錄出的二級輔助控制寄存器的位元分配。 Auxiliary registers 122 may conform to ARC, ARM or other specifications. For example, Figure 3 shows a summary of the auxiliary register set taken from pages 45-46 of ARCompact Instruction Set Architecture: Programmer's Reference, published April 2008. Part A of Figure 4 shows the bit allocation taken from pages 4-41 of Cortex TM -R5 and Cortex-R5F revision: r1p1, Technical Reference Manual published in 2010-2011. Part B of Figure 4 shows the bit assignment of the secondary auxiliary control registers extracted from pages 4-45 of Cortex TM -R5 and Cortex-R5F revision: r1p1, Technical Reference Manual published in 2010-2011.

本發明實施例使用除錯裝置110、JTAG連接裝置140和UART錄製裝置150來取代市售的內電路仿真器(in-circuit emulator,ICE),用於避免使用ICE來除錯固態硬碟裝置120中的硬體和軟體所產生的技術問題。此外,除錯裝置110、JTAG連接裝置140和UART錄製裝置150的成本也低於使用ICE除錯的成本。 The embodiment of the present invention uses the debugging device 110, the JTAG connection device 140 and the UART recording device 150 to replace the commercially available in-circuit emulator (ICE), which is used to avoid using ICE to debug the solid-state hard disk device 120 Technical issues arising from the hardware and software in the In addition, the cost of the debugging device 110 , the JTAG connection device 140 and the UART recording device 150 is also lower than that of using ICE for debugging.

除錯裝置110為整個除錯系統10的核心,包含樹莓派(raspberry Pi)112和JTAG附加板(add-on board)114。樹莓派112是基於Linux作業系統的單晶片電腦。除錯應用程式執行於樹莓派112,並且待除 錯的韌體執行於固態硬碟裝置120。樹莓派112於執行除錯應用程式時通過通用輸入輸出(General-Purpose Input/Output,GPIO)介面將電源160饋入個人電腦130以啟動個人電腦130,使得固態硬碟裝置120也跟著啟動,接著,依據驅動電源發光二極體(Light-Emitting Diode,LED)的訊號判斷個人電腦130是否啟動成功。因為JTAG介面可使用一般的IO訊號驅動,樹莓派112於執行除錯應用程式時通過內建的GPIO介面模擬JTAG的行為,用於從固態硬碟裝置120獲取所需的資訊,存取速度可高於4Mbps。JTAG的通訊協定可參考2001年6月14准許的IEEE Standard Test Access Port and Boundary-Scan Architecture。樹莓派112於執行除錯應用程式時通過內建的GPIO介面和JTAG連接裝置140強迫固態硬碟裝置120進入唯讀記憶體(Read-Only Memory,ROM)模式。當固態硬碟裝置120進入ROM模式時,處理單元125從ROM(未顯示在圖1當中)載入和執行程式碼,用於執行系統開機的操作,例如各種的硬體測試等。樹莓派112於執行除錯應用程式時通過內建的USB介面和UART錄製裝置150從固態硬碟裝置120搜集UART資料、訊號和訊息等。工程師可操作樹莓派112來對固態硬碟裝置120的硬體和/或固態硬碟裝置120中執行的韌體進行除錯。舉例來說,樹莓派112可裝配Wi-Fi或藍牙模組,工程師通過與樹莓派112中的Wi-Fi或藍牙模組建立遠端連線,控制整個除錯裝置110。 The debug device 110 is the core of the entire debug system 10 , including a raspberry Pi 112 and a JTAG add-on board 114 . The Raspberry Pi 112 is a single-chip computer based on the Linux operating system. The debugging application program is executed on the Raspberry Pi 112 , and the firmware to be debugged is executed on the solid state hard disk device 120 . The Raspberry Pi 112 feeds the power supply 160 into the personal computer 130 through the General-Purpose Input/Output (GPIO) interface to start the personal computer 130 when executing the debugging application program, so that the solid-state hard disk device 120 is also started, Next, it is judged whether the personal computer 130 starts up successfully according to the signal of the driving power LED (Light-Emitting Diode, LED). Because the JTAG interface can be driven by general IO signals, the Raspberry Pi 112 simulates the behavior of JTAG through the built-in GPIO interface when executing the debugging application program, and is used to obtain the required information from the solid-state hard disk device 120, and the access speed Can be higher than 4Mbps. The JTAG communication protocol can refer to the IEEE Standard Test Access Port and Boundary-Scan Architecture approved on June 14, 2001. The Raspberry Pi 112 forces the solid-state hard disk device 120 to enter the read-only memory (Read-Only Memory, ROM) mode through the built-in GPIO interface and the JTAG connection device 140 when executing the debugging application program. When the solid-state hard disk device 120 enters the ROM mode, the processing unit 125 loads and executes program codes from the ROM (not shown in FIG. 1 ) for performing system startup operations, such as various hardware tests. The Raspberry Pi 112 collects UART data, signals and messages from the solid-state hard disk device 120 through the built-in USB interface and the UART recording device 150 when executing the debugging application program. The engineer can operate the Raspberry Pi 112 to debug the hardware of the SSD device 120 and/or the firmware executed in the SSD device 120 . For example, the Raspberry Pi 112 can be equipped with a Wi-Fi or Bluetooth module, and the engineer can control the entire debugging device 110 by establishing a remote connection with the Wi-Fi or Bluetooth module in the Raspberry Pi 112 .

參考圖2的樹莓派112的系統架構。處理單元210可為ARM架構的處理器,並且在執行除錯應用程式的指令時,完成如下所述的功能。工具開發人員可使用Python來撰寫除錯應用程式。樹莓派112包含可以組合使用的不同類型的匯流排:先進高效匯流排/先進系統匯流排(Advanced High-performance Bus/Advanced System Bus,AHB/ASB)222;以及先進周邊匯流排(Advanced Peripheral Bus,APB)224。AHB/ASB 222和APB 224之間以橋接器(bridge)220連接。 AHB/ASB 222用於滿足處理單元210通過記憶體控制器230和SRAM 232、DRAM 234或者閃存(flash memory)236之間高速頻寬要求。APB 224適用於低功耗的周邊設備,例如GPIO介面260、USB介面270、Wi-Fi模組280、藍牙模組290等。處理單元210可通過GPIO介面260模擬JTAG的行為,並且通過USB介面270接收UART資料、訊號和訊息等。處理單元210可經由Wi-Fi模組280或藍牙模組290從遠端接收除錯請求,並且載入並執行除錯應用程式來回應除錯請求。 Refer to the system architecture of the Raspberry Pi 112 in FIG. 2 . The processing unit 210 can be an ARM architecture processor, and when executing the instructions of the debugging application program, it can complete the functions described below. Tool developers can use Python to write debug applications. The Raspberry Pi 112 contains different types of buses that can be used in combination: Advanced High-performance Bus/Advanced System Bus (AHB/ASB) 222; and Advanced Peripheral Bus (Advanced Peripheral Bus) , APB) 224. The AHB/ASB 222 and the APB 224 are connected by a bridge 220 . The AHB/ASB 222 is used to meet the high-speed bandwidth requirements between the processing unit 210 and the SRAM 232 , DRAM 234 or flash memory 236 through the memory controller 230 . The APB 224 is suitable for peripheral devices with low power consumption, such as GPIO interface 260 , USB interface 270 , Wi-Fi module 280 , Bluetooth module 290 and so on. The processing unit 210 can simulate JTAG behavior through the GPIO interface 260 , and receive UART data, signals and messages through the USB interface 270 . The processing unit 210 can receive a debugging request from a remote end via the Wi-Fi module 280 or the Bluetooth module 290 , and load and execute a debugging application program to respond to the debugging request.

本發明實施例提出一種固態硬碟裝置的除錯方法,由處理單元210載入並執行除錯應用程式的程式碼時實施。參考圖5,詳細說明如下: An embodiment of the present invention proposes a debugging method for a solid-state hard disk device, which is implemented when the processing unit 210 loads and executes the program code of the debugging application. Referring to Figure 5, the details are as follows:

步驟S510:通過GPIO介面260模擬JTAG命令以讀取固態硬碟裝置120中的快閃控制器121的處理單元125的識別碼(identifier,ID),例如ARC ID、ARM ID等。舉例來說,可從固態硬碟裝置120中的輔助寄存器122的指定位址讀取處理單元125的識別碼。在一些實施例中,ARC ID記錄在圖3中的第四個雙位元組的第0至7個位元”ARCVER[7:0]”。 Step S510: Simulate the JTAG command through the GPIO interface 260 to read the identification code (identifier, ID) of the processing unit 125 of the flash controller 121 in the solid state disk device 120, such as ARC ID, ARM ID, etc. For example, the identification code of the processing unit 125 can be read from the specified address of the auxiliary register 122 in the solid state hard disk device 120 . In some embodiments, the ARC ID is recorded in bits 0 to 7 of the fourth double byte "ARCVER[7:0]" in FIG. 3 .

步驟S520:判斷識別碼是否正確。當識別碼正確時,流程繼續進行步驟S530的處理。否則,流程繼續進行步驟S525的處理。這個步驟可用以確認除錯裝置110是否正確地連接上固態硬碟裝置120。如果處理單元210無法從固態硬碟裝置120讀取到關於快閃控制器121的處理單元125的識別碼,則代表除錯裝置110沒有正確地連接上固態硬碟裝置120。 Step S520: Determine whether the identification code is correct. When the identification code is correct, the process proceeds to step S530. Otherwise, the process proceeds to step S525. This step can be used to confirm whether the debugging device 110 is correctly connected to the solid-state hard disk device 120 . If the processing unit 210 cannot read the identification code of the processing unit 125 of the flash controller 121 from the solid state hard disk device 120 , it means that the debugging device 110 is not connected to the solid state hard disk device 120 correctly.

步驟S525:除錯應用程式回覆錯誤訊息給啟動除錯應用程式的上層。上層可據以驅動顯示器以顯示錯誤訊息,或者將錯誤訊息儲存在閃存236,用於讓工程師知道在除錯的過程中發生了錯誤。 Step S525: The debugging application program returns an error message to the upper layer that activates the debugging application program. The upper layer can drive the display to display the error message, or store the error message in the flash memory 236 to let the engineer know that an error occurred during the debugging process.

步驟S530:通過GPIO介面260模擬JTAG命令以停止固態硬碟裝置120中的快閃控制器121的處理單元125的運行。舉例來說,可修改 固態硬碟裝置120中的輔助寄存器122的指定位址的值以停止處理單元125。在一些實施例中,可將圖3中的第五個雙位元組的第1個位元”FH”設為”1”以停止處理單元125。 Step S530 : Stop the operation of the processing unit 125 of the flash controller 121 in the solid state disk device 120 by simulating the JTAG command through the GPIO interface 260 . For example, modify the The value of the specified address of the auxiliary register 122 in the solid state disk device 120 is used to stop the processing unit 125 . In some embodiments, the first bit “FH” of the fifth double byte in FIG. 3 can be set to “1” to stop the processing unit 125 .

步驟S540:通過GPIO介面260模擬JTAG命令以讓固態硬碟裝置120離開休眠模式(sleep mode)。舉例來說,可修改固態硬碟裝置120中的輔助寄存器122的指定位址的值以讓固態硬碟裝置120離開休眠模式。在一些實施例中,可將圖3中的第五個雙位元組的第23個位元”ZZ”設為”0”以讓固態硬碟裝置120離開休眠模式。 Step S540 : Simulate the JTAG command through the GPIO interface 260 to make the solid state disk device 120 leave the sleep mode. For example, the value of the specified address of the auxiliary register 122 in the solid-state hard disk device 120 can be modified to make the solid-state hard disk device 120 leave the sleep mode. In some embodiments, the 23rd bit “ZZ” of the fifth double byte in FIG. 3 can be set to “0” to allow the solid state disk device 120 to leave the sleep mode.

步驟S550:通過GPIO介面260模擬JTAG命令以讀取固態硬碟裝置120的系統內編程碼(in-system programming,ISP code)。舉例來說,系統內編程碼可儲存於閃存模組128中的指定位址,除錯應用程式可發出JTAG命令以從閃存模組128的指定位址讀取指定長度的資料(也就是系統內編程碼)。系統內編程碼包含用於執行從主機發出的主機命令,例如主機讀取、寫入、抹除命令等,或者執行背景操作,例如垃圾回收(garbage collection,GC)、損耗磨平(wear leveling,WL)、讀取再生(read reclaim)、讀取刷新(read refresh)等程序。主機命令為由標準制定組織所規範命令,例如通用快閃記憶儲存(Universal Flash Storage,UFS)、快速非揮發性記憶體(Non-Volatile Memory Express,NVMe)、開放通道固態硬碟(Open-channel Solid State Disk,SSD)等。 Step S550 : read the in-system programming (ISP code) of the solid state disk device 120 by simulating the JTAG command through the GPIO interface 260 . For example, the in-system programming code can be stored at a specified address in the flash memory module 128, and the debugging application program can issue a JTAG command to read data of a specified length from the specified address of the flash memory module 128 (that is, the in-system programming code). The in-system programming code is used to execute host commands issued from the host, such as host read, write, erase commands, etc., or perform background operations, such as garbage collection (garbage collection, GC), wear leveling (wear leveling, WL), read regeneration (read reclaim), read refresh (read refresh) and other programs. Host commands are commands regulated by standard-setting organizations, such as Universal Flash Storage (UFS), Fast Non-Volatile Memory Express (NVMe), Open-channel SSD (Open-channel Solid State Disk, SSD), etc.

步驟S560:計算系統內編程碼的校驗和(checksum)。除錯應用程式可使用特定的演算法來計算校驗和,例如MD5、SHA1、SHA256、SHA512等。 Step S560: Calculate the checksum of the programming code in the system. Debugging applications can use specific algorithms to calculate checksums, such as MD5, SHA1, SHA256, SHA512, etc.

步驟S570:判斷校驗和是否正確。當校驗和正確時,流程繼續進行步驟S580的處理。否則,流程繼續進行步驟S525的處理。在一些實施例中,由於固態硬碟裝置120的閃存控制器121的製造廠商可能因應不同類型的NAND快閃記憶體,提供不同版本的系統內編程碼。 樹莓派112中的閃存236可預先儲存相應於多個系統內編程碼版本的校驗和。除錯應用程式可將步驟S560中產生的校驗和比對閃存236中儲存的校驗和。如果步驟S560中產生的校驗和相符於閃存236中儲存的多個校驗和中之一者時,判定校驗和正確(也就是固態硬碟裝置120的閃存控制器121中執行的系統內編程碼可以辨認為特定系統內編程碼版本)。反之,判定校驗和不正確(也就是固態硬碟裝置120的閃存控制器121中執行的系統內編程碼不正確或者不能辨認)。這個步驟除了可以用來判斷校驗和是否正確外,還可以知道閃存控制器121中執行的系統內編程碼的版本。在這裡需要注意的是,不同的系統內編程碼的版本擁有不同的記憶體配置邏輯,用於儲存執行時的變數、資料表、即將寫入閃存模組128的資料、從閃存模組128讀出的資料等。也就是說,除錯應用程式需要先知道記憶體配置邏輯,接著才能夠依據記憶體配置邏輯從固態硬碟裝置120中的記憶體126(包含SRAM、DRAM)的正確位址轉儲(dump)所需的資料。 Step S570: Determine whether the checksum is correct. When the checksum is correct, the process continues to step S580. Otherwise, the process proceeds to step S525. In some embodiments, because the manufacturer of the flash memory controller 121 of the solid-state hard disk device 120 may provide different versions of the in-system programming code for different types of NAND flash memory. The flash memory 236 in the Raspberry Pi 112 may pre-store checksums corresponding to multiple versions of the in-system programming code. The debugging application can compare the checksum generated in step S560 with the checksum stored in the flash memory 236 . If the checksum generated in step S560 is consistent with one of the multiple checksums stored in the flash memory 236, it is determined that the checksum is correct (that is, the internal system executed in the flash memory controller 121 of the solid state hard disk device 120 programming code can be identified as a specific system programming code version). On the contrary, it is determined that the checksum is incorrect (that is, the in-system programming code executed in the flash memory controller 121 of the solid-state hard disk device 120 is incorrect or unrecognizable). In addition to determining whether the checksum is correct, this step can also be used to know the version of the in-system programming code executed in the flash memory controller 121 . It should be noted here that different versions of the programming code in the system have different memory configuration logics, which are used to store variables during execution, data tables, data to be written into the flash memory module 128, and read from the flash memory module 128. information etc. That is to say, the debugging application program needs to know the memory configuration logic first, and then it can dump the correct address of the memory 126 (including SRAM and DRAM) in the solid-state hard disk device 120 according to the memory configuration logic. required information.

步驟S580:通過GPIO介面260模擬JTAG命令以讀取固態硬碟裝置120的SRAM中的資料。舉例來說,開機期間或者是正常操作期間產生的韌體資料可儲存於SRAM中的指定位址,除錯應用程式可發出多個JTAG命令給固態硬碟裝置120,每個JTAG命令請求從SRAM的指定位址讀取指定長度的資料(也就是韌體資料)。在一些實施例中,樹莓派112中的閃存236可儲存一份文件,包含多筆紀錄。每筆紀錄包含開始位址和長度的資訊。除錯應用程式可依據文件中的每一筆紀錄發出JTAG命令給固態硬碟裝置120以從SRAM的指定位址讀取指定長度的資料。 Step S580 : Simulate the JTAG command through the GPIO interface 260 to read the data in the SRAM of the solid-state hard disk device 120 . For example, the firmware data generated during booting or normal operation can be stored in a specified address in SRAM, and the debugging application can issue multiple JTAG commands to the solid-state hard disk device 120, and each JTAG command requests data from the SRAM. Read the data of the specified length (that is, the firmware data) at the specified address. In some embodiments, the flash memory 236 in the Raspberry Pi 112 can store a file including multiple records. Each record contains start address and length information. The debugging application program can send JTAG commands to the solid-state hard disk device 120 according to each record in the file to read data of a specified length from a specified address of the SRAM.

步驟S590:在記憶體126中有配備DRAM的實施例中,通過GPIO介面260模擬JTAG命令以讀取固態硬碟裝置120的DRAM中的資料。舉例來說,開機期間或者是正常操作期間產生的韌體資料可儲存於 DRAM中的指定位址,除錯應用程式可發出多個JTAG命令給固態硬碟裝置120,每個JTAG命令請求從DRAM的指定位址讀取指定長度的資料(也就是韌體資料)。在一些實施例中,樹莓派112中的閃存236可儲存一份文件,包含多筆紀錄。每筆紀錄包含開始位址和長度的資訊。除錯應用程式可依據文件中的每一筆紀錄發出JTAG命令給固態硬碟裝置120以從DRAM的指定位址讀取指定長度的資料。 Step S590 : In the embodiment in which the memory 126 is equipped with DRAM, simulate the JTAG command through the GPIO interface 260 to read the data in the DRAM of the solid-state hard disk device 120 . For example, firmware data generated during power-up or during normal operation can be stored in At a specified address in the DRAM, the debugging application can send multiple JTAG commands to the solid state hard disk device 120, and each JTAG command requests to read data of a specified length (that is, firmware data) from the specified address of the DRAM. In some embodiments, the flash memory 236 in the Raspberry Pi 112 can store a file including multiple records. Each record contains start address and length information. The debugging application program can send JTAG commands to the solid-state hard disk device 120 according to each record in the file to read data of a specified length from a specified address of the DRAM.

步驟S595:通過GPIO介面260模擬JTAG命令以回復固態硬碟裝置120中的快閃控制器121的處理單元125。舉例來說,可修改固態硬碟裝置120中的輔助寄存器122的指定位址的值以回復處理單元125。在一些實施例中,可將圖3中的第五個雙位元組的第1個位元”FH”設為”0”以回復處理單元125。 Step S595 : Simulate the JTAG command through the GPIO interface 260 to reply to the processing unit 125 of the flash controller 121 in the solid state disk device 120 . For example, the value of the specified address of the auxiliary register 122 in the solid-state hard disk device 120 can be modified to restore the processing unit 125 . In some embodiments, the first bit “FH” of the fifth double byte in FIG. 3 can be set to “0” to reply to the processing unit 125 .

以下顯示除錯應用程式的虛擬碼:

Figure 110135711-A0305-02-0012-2
Figure 110135711-A0305-02-0013-1
The following shows the dummy code for the debugger application:
Figure 110135711-A0305-02-0012-2
Figure 110135711-A0305-02-0013-1

通過如上所述由除錯應用程式所實施的固態硬碟裝置的除錯方法,可較內電路仿真器具有彈性,以解決除錯時遭遇到的問題。例如,在固態硬碟裝置的韌體運行卡住時可以快速存取硬體寄存器以獲取NAND閃存的狀態等。 Through the debugging method of the solid state hard disk device implemented by the debugging application program as described above, it can be more flexible than the internal circuit emulator, so as to solve the problems encountered during debugging. For example, when the firmware of the solid-state hard disk device is stuck, the hardware register can be quickly accessed to obtain the status of the NAND flash memory.

參考圖1和圖2。UART錄製裝置150包含USB介面、UART介面、控制器和記憶體。UART錄製裝置150的USB介面連接樹莓派112的USB介面,以及UART錄製裝置150的UART介面連接固態硬碟裝置120的UART介面124。UART錄製裝置150經由其UART介面從固態硬碟裝置120接收日誌資訊(log information),包含資料、訊息和/或訊號等,並且將日誌資訊經由其USB介面傳送給樹莓派112。 UART錄製裝置150還可包含非揮發性儲存單元,用於儲存從固態硬碟裝置120接收的日誌資訊。USB介面中的使用到的每個埠可經由電壓/電平轉換器(level shifter)連接到UART介面上的指定埠,電壓/電平轉換器用於將從USB介面的輸入信號從一個電壓域調整到UART介面的電壓域,或者將從UART介面的輸入信號從一個電壓域調整到USB介面的電壓域。 Refer to Figure 1 and Figure 2. The UART recording device 150 includes a USB interface, a UART interface, a controller and a memory. The USB interface of the UART recording device 150 is connected to the USB interface of the Raspberry Pi 112 , and the UART interface of the UART recording device 150 is connected to the UART interface 124 of the solid state hard disk device 120 . The UART recording device 150 receives log information from the solid-state hard disk device 120 through its UART interface, including data, messages and/or signals, and transmits the log information to the Raspberry Pi 112 through its USB interface. The UART recording device 150 may further include a non-volatile storage unit for storing log information received from the solid state disk device 120 . Each port used in the USB interface can be connected to a designated port on the UART interface through a voltage/level shifter. The voltage/level shifter is used to adjust the input signal from the USB interface from a voltage domain to the voltage domain of the UART interface, or adjust the input signal from the UART interface from a voltage domain to the voltage domain of the USB interface.

參考圖6,樹莓派112可經由GPIO介面260的40個接腳連接上JTAG附加板114。JTAG附加板114負責在樹莓派112和JTAG連接裝置140之間傳遞訊號,以及在樹莓派112和個人電腦130之間傳遞訊號。JTAG附加板114包含GPIO介面和type-C介面,GPIO介面連接樹莓派112和個人電腦130,而type-C介面連接JTAG連接裝置140。GPIO介面中的使用到的每個埠可經由電壓/電平轉換器連接到type-C介面上的指定埠,電壓/電平轉換器用於將從GPIO介面的輸入信號從一個電壓域調整到type-C介面的電壓域,或者將從type-C介面的輸入信號從一個電壓域調整到GPIO介面的電壓域。 Referring to FIG. 6 , the Raspberry Pi 112 can be connected to the JTAG add-on board 114 through 40 pins of the GPIO interface 260 . The JTAG add-on board 114 is responsible for transmitting signals between the Raspberry Pi 112 and the JTAG connection device 140 and between the Raspberry Pi 112 and the PC 130 . The JTAG add-on board 114 includes a GPIO interface and a type-C interface, the GPIO interface is connected to the Raspberry Pi 112 and the personal computer 130 , and the type-C interface is connected to the JTAG connection device 140 . Each port used in the GPIO interface can be connected to the specified port on the type-C interface through a voltage/level converter. The voltage/level converter is used to adjust the input signal from the GPIO interface from a voltage domain to a type The voltage domain of the -C interface, or adjust the input signal from the type-C interface from a voltage domain to the voltage domain of the GPIO interface.

JTAG連接裝置140可視為一個JTAG轉接器(JTAG adaptor),可以是20接腳轉10接腳、20接腳轉8接腳等,負責將樹莓派112經由JTAG附加板114模擬的JTAG命令、資料傳送給固態硬碟裝置120,以及將固態硬碟裝置120輸出的資料經由JTAG附加板114傳送給樹莓派112。JTAG連接裝置140包含type-C介面、JTAG介面、控制器和記憶體。JTAG連接裝置140的type-C介面可連接JTAG附加板114的type-C介面,以及JTAG連接裝置140的JTAG介面連接固態硬碟裝置120的JTAG介面123。在這裡需要注意的是,由於固態硬碟裝置120需要在試驗艙(test chamber)在高溫的環境下進行測試,將JTAG連接裝置140獨立出來,而不是讓JTAG連接裝置140整合到JTAG附加板114上,能夠讓固態硬碟裝置120和JTAG連接裝置140一起放置到試驗艙中進行除錯的操作。參考圖7的20接腳轉10接腳 的範例,包含用於連接JTAG附加板114的20接腳連接器(20-pin connector)710,以及用於連接JTAG介面123的10接腳連接器(10-pin connector)730。舉例來說,連接器710的第9個腳位從JTAG附加板114饋入測試時鐘(test clock,TCLK)訊號,連接器730的第4個腳位則輸出時鐘訊號給JTAG介面123。連接器710的第7個腳位從JTAG附加板114輸入測試模式選擇輸入(test mode select input,TMS)訊號,連接器730的第2個腳位則輸出測試模式選擇輸入訊號給JTAG介面123。連接器710的第5個腳位從JTAG附加板114輸入測試資料輸入(test data input,TDI)訊號,連接器730的第8個腳位則輸出測試資料輸入訊號給JTAG介面123。連接器730的第13個腳位從JTAG介面123輸入測試資料輸出(test data output,TDO)訊號,連接器710的第6個腳位則輸出測試資料輸出訊號給JTAG附加板114。連接器710的第10個腳位從JTAG附加板114輸入測試重置輸入(test reset input,TRST)訊號,連接器730的第3個腳位則輸出測試重置輸入訊號給JTAG介面123。連接器710的以上所述每個腳位可經由電壓/電平轉換器連接到連接器730的的指定腳位,電壓/電平轉換器用於將type-C介面的輸入信號從一個電壓域調整到JTAG介面的電壓域,或者將JTAG介面的輸入信號從一個電壓域調整到type-C介面的電壓域。 The JTAG connection device 140 can be regarded as a JTAG adapter (JTAG adapter), which can be 20 pins to 10 pins, 20 pins to 8 pins, etc., and is responsible for transferring the JTAG commands simulated by the Raspberry Pi 112 via the JTAG additional board 114 , sending the data to the solid-state hard disk device 120 , and sending the output data of the solid-state hard disk device 120 to the Raspberry Pi 112 via the JTAG additional board 114 . The JTAG connection device 140 includes a type-C interface, a JTAG interface, a controller and a memory. The type-C interface of the JTAG connection device 140 can be connected to the type-C interface of the JTAG add-on board 114 , and the JTAG interface of the JTAG connection device 140 can be connected to the JTAG interface 123 of the solid state hard disk device 120 . It should be noted here that since the solid-state hard disk device 120 needs to be tested in a high-temperature environment in a test chamber, the JTAG connection device 140 is separated instead of integrating the JTAG connection device 140 into the JTAG additional board 114 On the other hand, the solid-state hard disk device 120 and the JTAG connection device 140 can be placed together in the test chamber for debugging. Refer to the 20-pin to 10-pin conversion in Figure 7 Examples include a 20-pin connector 710 for connecting to the JTAG add-on board 114 and a 10-pin connector 730 for connecting to the JTAG interface 123 . For example, the ninth pin of the connector 710 feeds a test clock (TCLK) signal from the JTAG add-on board 114 , and the fourth pin of the connector 730 outputs the clock signal to the JTAG interface 123 . The seventh pin of the connector 710 inputs the test mode select input (TMS) signal from the JTAG add-on board 114 , and the second pin of the connector 730 outputs the test mode select input signal to the JTAG interface 123 . The fifth pin of the connector 710 inputs the test data input (TDI) signal from the JTAG add-on board 114 , and the eighth pin of the connector 730 outputs the test data input signal to the JTAG interface 123 . The thirteenth pin of the connector 730 inputs a test data output (TDO) signal from the JTAG interface 123 , and the sixth pin of the connector 710 outputs the test data output signal to the JTAG add-on board 114 . The tenth pin of the connector 710 inputs the test reset input (TRST) signal from the JTAG add-on board 114 , and the third pin of the connector 730 outputs the test reset input signal to the JTAG interface 123 . Each of the above-mentioned pins of the connector 710 can be connected to a designated pin of the connector 730 via a voltage/level converter, and the voltage/level converter is used to adjust the input signal of the type-C interface from a voltage domain to the voltage domain of the JTAG interface, or adjust the input signal of the JTAG interface from a voltage domain to the voltage domain of the type-C interface.

JTAG附加板114上可設置連接電源的三個繼電器(power relay)。參考圖8的GPIO介面260的範例接腳圖(pin-out diagram),腳位GPIO12、GPIO18和GPIO23用於分別控制JTAG附加板114上設置的三個繼電器(power relay)以驅動繼電器來饋入電源160至個人電腦130。腳位GPIO17連接到個人電腦130中的驅動LED的訊號線,用於偵測個人電腦130是否正確啟動。腳位GPIO16連接到固態硬碟裝置120的特定腳位,用於驅動固態硬碟裝置120進入ROM模式。腳位GPIO22連接到固態硬碟裝置120的SATA介面的特定腳位,用於驅 動固態硬碟裝置120進入或離開休眠模式(sleep mode)。在這裡需要注意的是,通過SATA介面進入的休眠模式會切斷固態硬碟裝置120中大部分元件(包含處理單元125)的供電以節省電力。換句話說,當通過SATA介面進入休眠模式時,固態硬碟裝置120中的處理單元125並不會執行任何操作。如上所述的除錯應用程式於發出JTAG命令時所離開的休眠模式,不同於通過SATA介面進入的休眠模式。腳位GPIO11、GPIO5、GPIO6、GPIO13、GPIO19和GPIO26通過用JTAG附加板114和JTAG連接裝置140連接固態硬碟裝置120中的JTAG介面123,用於讓樹莓派112中的處理單元210在執行除錯應用程式時模擬JTAG行為,通過這些腳位發送JTAG命令給固態硬碟裝置120,以及從固態硬碟裝置120獲取系統內編程碼、韌體資料等。例如,腳位GPIO5可用來傳送JTAG TDI訊號給固態硬碟裝置120,腳位GPIO6可用來從固態硬碟裝置120接收JTAG TDO訊號。關於JTAG行為的模擬細節,可參考2001年6月14准許的IEEE Standard Test Access Port and Boundary-Scan ArchitectureThree power relays connected to the power supply can be provided on the JTAG add-on board 114 . Referring to the example pin-out diagram of the GPIO interface 260 of FIG. Power supply 160 to personal computer 130 . The pin GPIO17 is connected to the signal line for driving the LED in the personal computer 130 to detect whether the personal computer 130 is started correctly. The pin GPIO 16 is connected to a specific pin of the solid-state hard disk device 120 for driving the solid-state hard disk device 120 into the ROM mode. The pin GPIO22 is connected to a specific pin of the SATA interface of the solid-state hard disk device 120 for driving the solid-state hard disk device 120 to enter or leave the sleep mode. It should be noted here that the hibernation mode entered through the SATA interface will cut off the power supply of most components (including the processing unit 125 ) in the solid-state hard disk device 120 to save power. In other words, when entering the hibernation mode through the SATA interface, the processing unit 125 in the solid-state hard disk device 120 will not perform any operations. The sleep mode that the debug application leaves when issuing JTAG commands as described above is different from the sleep mode entered through the SATA interface. The pin positions GPIO11, GPIO5, GPIO6, GPIO13, GPIO19 and GPIO26 are used to allow the processing unit 210 in the Raspberry Pi 112 to execute Simulate JTAG behavior when debugging application programs, send JTAG commands to the solid-state hard disk device 120 through these pins, and obtain in-system programming codes, firmware data, etc. from the solid-state hard disk device 120 . For example, the pin GPIO5 can be used to transmit the JTAG TDI signal to the solid-state hard disk device 120 , and the pin GPIO6 can be used to receive the JTAG TDO signal from the solid-state hard disk device 120 . See IEEE Standard Test Access Port and Boundary-Scan Architecture, June 14, 2001, for emulation details of JTAG behavior.

參考圖2。樹莓派112是一種低成本的個人電腦,因此沒有實作低延遲周邊埠(low latency peripheral port,LLPP)的技術,其使用專屬的路徑來存取GPIO介面。當上層的除錯應用程式欲通過GPIO介面260發出JTAG命令來存取固態硬碟裝置120中的輔助寄存器122或記憶體126中的內容時,下層的GPIO驅動程式可依序通過AHB/ASB 222和APB 224發出硬體指令和參數給GPIO介面260,用於寫入(或稱為設定)GPIO介面260中相應於特定接腳的寄存器以完成JTAG命令的模擬。然而,由於硬體的限制,一些硬體指令可能會延遲到達APB 224。當兩個用於寫入GPIO介面260中的相同寄存器的硬體指令在非常短的時間區間先後到達APB控制器時,APB控制器可能會誤判成錯誤的硬體指令而捨棄其中的一個不執行,造成部分的系統內編程碼、韌體資料等無法從固態硬碟裝置120讀取回來。 Refer to Figure 2. The Raspberry Pi 112 is a low-cost personal computer, so there is no implementation of low-latency peripheral port (LLPP) technology, which uses a dedicated path to access the GPIO interface. When the upper-level debugging application program wants to send a JTAG command through the GPIO interface 260 to access the contents of the auxiliary register 122 or memory 126 in the solid-state hard disk device 120, the lower-level GPIO driver program can sequentially pass through the AHB/ASB 222 And the APB 224 sends hardware instructions and parameters to the GPIO interface 260 for writing (or called setting) the register corresponding to the specific pin in the GPIO interface 260 to complete the simulation of the JTAG command. However, some hardware instructions may be delayed in reaching the APB 224 due to hardware limitations. When two hardware instructions for writing the same register in the GPIO interface 260 arrive at the APB controller in a very short time interval, the APB controller may misjudge it as a wrong hardware instruction and discard one of them without executing it. , so that some of the programming codes and firmware data in the system cannot be read back from the solid state hard disk device 120 .

為了解決如上所述的問題,本發明實施例修改運行期函式庫(runtime library)中的函數,此函數用於驅動GPIO介面260以完成操作,讓除錯應用程式可以呼叫此函數以完成如上所述的功能,例如發出JTAG命令來讀取固態硬碟裝置120中的快閃控制器121的處理單元125的識別碼、停止固態硬碟裝置120中的快閃控制器121的處理單元125、讓固態硬碟裝置120離開休眠模式、讀取固態硬碟裝置120的閃存模組128中儲存的系統內編程碼、讀取固態硬碟裝置120的SRAM、DRAM中的資料等。運行期函式庫是一種被編譯器(compiler)用來實現程式語言的內建函數集合,以提供該程式語言執行時支援的一種特殊的電腦程式函式庫。參考圖9,詳細說明如下: In order to solve the above problems, the embodiment of the present invention modifies the function in the runtime library (runtime library), this function is used to drive the GPIO interface 260 to complete the operation, so that the debugging application can call this function to complete the above Described function, for example sends JTAG command to read the identification code of the processing unit 125 of the flash controller 121 in the solid-state hard disk device 120, stops the processing unit 125 of the flash controller 121 in the solid-state hard disk device 120, Make the solid-state hard disk device 120 leave the sleep mode, read the in-system programming code stored in the flash memory module 128 of the solid-state hard disk device 120 , read the data in the SRAM and DRAM of the solid-state hard disk device 120 . The runtime library is a set of built-in functions used by the compiler to implement a programming language to provide a special computer program library supported by the programming language when it is executed. Referring to Figure 9, the details are as follows:

步驟S910:從除錯應用程式接收驅動GPIO介面的請求,包含完成特定JTAG命令所需的參數。例如,相應於圖5的步驟S510,參考圖3,請求中的參數包含讀取輔助寄存器122中的第四個雙位元組的第0至7個位元的資訊。相應於圖5的步驟S530,參考圖3,請求中的參數包含將輔助寄存器122中的第五個雙位元組的第1個位元設為”1”的資訊。相應於圖5的步驟S540,參考圖3,請求中的參數包含將輔助寄存器122中的第五個雙位元組的第23個位元設定為”0”的資訊。相應於圖5的步驟S550,請求中的參數包含從閃存模組128的指定位址讀取指定長度的資料的資訊。相應於圖5的步驟S580,請求中的參數包含從SRAM的指定位址讀取指定長度的資料的資訊。相應於圖5的步驟S590,請求中的參數包含從DRAM的指定位址讀取指定長度的資料的資訊。 Step S910: Receive a request to drive the GPIO interface from the debugging application program, including parameters required to complete a specific JTAG command. For example, corresponding to step S510 of FIG. 5 , referring to FIG. 3 , the parameters in the request include information on reading bits 0 to 7 of the fourth double byte in the auxiliary register 122 . Corresponding to step S530 of FIG. 5 , referring to FIG. 3 , the parameter in the request includes information to set the first bit of the fifth double byte in the auxiliary register 122 to “1”. Corresponding to step S540 of FIG. 5 , referring to FIG. 3 , the parameter in the request includes information to set the 23rd bit of the fifth double byte in the auxiliary register 122 to "0". Corresponding to step S550 in FIG. 5 , the parameters in the request include information about reading data of a specified length from a specified address of the flash memory module 128 . Corresponding to step S580 in FIG. 5 , the parameters in the request include information about reading data of a specified length from a specified address of the SRAM. Corresponding to step S590 in FIG. 5 , the parameters in the request include information about reading data of a specified length from a specified address of the DRAM.

步驟S930:依據請求中攜帶的參數發出硬體指令給GPIO介面260以設定相應於TDI的GPIO接腳的寄存器,用於模擬特定JTAG的命令。 Step S930 : Send a hardware command to the GPIO interface 260 according to the parameters carried in the request to set the register corresponding to the GPIO pin of TDI for simulating a specific JTAG command.

步驟S950:發出硬體指令給GPIO介面260以讀取相應於TDI的GPIO接腳的寄存器的值。由於這個步驟的操作,在依據兩個請求所產生 的設定相應於TDI的GPIO接腳的寄存器的硬體指令之間,插入一個讀取相應於TDI的GPIO接腳的寄存器值的硬體指令,可避免APB控制器將兩個在非常短的時間區間先後到達的設定相應於TDI的GPIO接腳的寄存器的硬體指令誤判成錯誤的硬體指令。在這裡需要注意的是,這個步驟也可執行於步驟S910和S930之間,本發明並不因此局限。 Step S950 : Send a hardware command to the GPIO interface 260 to read the value of the register corresponding to the GPIO pin of TDI. Due to the operation of this step, in accordance with the two requests generated Between the hardware instructions for setting the register corresponding to the GPIO pin of TDI, insert a hardware instruction for reading the register value corresponding to the GPIO pin of TDI, which can prevent the APB controller from converting the two registers in a very short time. The hardware commands that set the registers corresponding to the GPIO pins of the TDI that arrive successively in the intervals are misjudged as wrong hardware commands. It should be noted here that this step can also be performed between steps S910 and S930, and the present invention is not limited thereto.

步驟S970:回覆驅動完成的訊息給除錯應用程式。 Step S970: Reply a message of completion of driving to the debugging application program.

樹莓派112的處理單元210可週期性地執行程式庫中的另一個函數,用於週期性地驅動GPIO介面260,用於讀取相應於TDO的GPIO接腳的寄存器的值。讀取的值為之前通過相應於TDI的GPIO接腳所發出的模擬JTAG命令的執行結果,由固態硬碟裝置120產生並回覆,可包含例如輔助寄存器122的設定成功或失敗的訊息、從閃存模組128讀取的系統內編程碼、從SRAM或DRAM讀取的韌體資料等等。 The processing unit 210 of the Raspberry Pi 112 can periodically execute another function in the library for periodically driving the GPIO interface 260 for reading the value of the register corresponding to the GPIO pin of TDO. The read value is the execution result of the simulated JTAG command sent by the GPIO pin corresponding to TDI before, which is generated and returned by the solid-state hard disk device 120, and may include, for example, information about the success or failure of the setting of the auxiliary register 122, from the flash memory In-system programming code read by the module 128, firmware data read from SRAM or DRAM, etc.

本發明所述的方法中的全部或部分步驟可以計算機指令實現,例如特定硬體的驅動程式、韌體程式或軟體程式等。此外,也可實現於其他類型程式。所屬技術領域人員可將本發明實施例的方法撰寫成計算機指令,為求簡潔不再加以描述。依據本發明實施例方法實施的計算機指令可儲存於適當的電腦可讀取媒體,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。 All or part of the steps in the method of the present invention can be implemented by computer instructions, such as specific hardware drivers, firmware programs or software programs. In addition, it can also be implemented in other types of programs. Those skilled in the art can write the methods of the embodiments of the present invention into computer instructions, and the description is omitted for the sake of brevity. The computer instructions implemented according to the method of the embodiment of the present invention can be stored in a suitable computer-readable medium, such as DVD, CD-ROM, USB disk, hard disk, and can also be placed through a network (for example, the Internet, or other suitable means of access to the web server.

雖然圖1和圖2中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖5和圖9的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不 因此而侷限。 Although the elements described above are included in FIG. 1 and FIG. 2 , it is not excluded to use more other additional elements to achieve better technical effects without violating the spirit of the invention. In addition, although the flow charts in FIG. 5 and FIG. 9 are executed in a specified order, those skilled in the art can modify the order of these steps while achieving the same effect without violating the spirit of the invention. Therefore, The invention is not limited to using only the sequence 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 does not So limited.

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 Although the present invention is described using the above examples, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, the invention covers modifications and similar arrangements obvious to those skilled in the art. Therefore, the claims of the application must be interpreted in the broadest manner to include all obvious modifications and similar arrangements.

S510~S595:方法步驟 S510~S595: method steps

Claims (14)

一種固態硬碟裝置的除錯方法,由樹莓派的處理單元於載入和執行除錯應用程式時實施,所述方法包含:通過通用輸入輸出介面模擬第一聯合測試工作群組命令給所述固態硬碟裝置,用於停止所述固態硬碟裝置中的快閃控制器的處理單元的運行;通過所述通用輸入輸出介面模擬第二聯合測試工作群組命令給所述固態硬碟裝置,用於讓所述固態硬碟裝置離開休眠模式;以及通過所述通用輸入輸出介面模擬第三聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的靜態隨機存取記憶體的指定位址讀取指定長度的資料。 A debugging method for a solid-state hard disk device, implemented by a processing unit of a raspberry pie when loading and executing a debugging application program, the method includes: simulating a first joint test working group command through a general-purpose input and output interface to the described A solid-state hard disk device, used to stop the operation of the processing unit of the flash controller in the solid-state hard disk device; simulate a second joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, Used to let the solid state hard disk device leave the dormancy mode; and simulate a third joint test working group command to the solid state hard disk device through the general input and output interface, for the static state hard disk device from the solid state hard disk device Data of a specified length is read from a specified address of the random access memory. 如請求項1所述的固態硬碟裝置的除錯方法,其中,所述第一聯合測試工作群組命令用於將所述固態硬碟裝置中的輔助寄存器的第五個雙位元組的第1個位元設為”1”,以及所述第二聯合測試工作群組命令用於將所述固態硬碟裝置中的所述輔助寄存器的第五個雙位元組的第23個位元設為”0”。 The debugging method of the solid-state hard disk device according to claim 1, wherein the first joint test work group command is used to use the fifth double byte of the auxiliary register in the solid-state hard disk device The 1st bit is set to "1", and the second JTWG command is used to set the 23rd bit of the fifth double byte of the auxiliary register in the SSD device element is set to "0". 如請求項1所述的固態硬碟裝置的除錯方法,包含:通過所述通用輸入輸出介面模擬第四聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的動態隨機存取記憶體的指定位址讀取指定長度的資料。 The debugging method of a solid-state hard disk device as described in claim 1, comprising: simulating a fourth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, for retrieving from the solid-state hard disk Data of a specified length is read from a specified address of the DRAM in the device. 如請求項1所述的固態硬碟裝置的除錯方法,包含:通過所述通用輸入輸出介面模擬第五聯合測試工作群組命令給所述固態硬碟裝置,用於讀取所述固態硬碟裝置中的所述快閃控制 器的所述處理單元的識別碼;判斷所述識別碼是否正確;以及當所述識別碼正確時,完成所述第一聯合測試工作群組命令、所述第二聯合測試工作群組命令和所述第三聯合測試工作群組命令的模擬操作。 The debugging method of a solid-state hard disk device according to claim 1, comprising: simulating a fifth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, for reading the solid-state hard disk The flash control in the disc device the identification code of the processing unit of the device; determine whether the identification code is correct; and when the identification code is correct, complete the first joint test work group command, the second joint test work group command and The simulation operation of the third joint test workgroup command. 如請求項4所述的固態硬碟裝置的除錯方法,其中,所述第五聯合測試工作群組命令用於讀取從所述固態硬碟裝置中的輔助寄存器的第四個雙位元組的第0至7位元的值。 The debugging method of the solid-state hard disk device according to claim 4, wherein the fifth joint test work group command is used to read the fourth double bit of the auxiliary register in the solid-state hard disk device The value of bits 0 to 7 of the group. 如請求項1所述的固態硬碟裝置的除錯方法,包含:通過所述通用輸入輸出介面模擬第六聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的閃存模組讀取系統內編程碼;計算所述系統內編程碼的第一校驗和;以及當所述第一校驗和正確時,完成所述第三聯合測試工作群組命令的模擬操作。 The debugging method of a solid-state hard disk device as described in claim 1, comprising: simulating a sixth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, for retrieving from the solid-state hard disk The flash memory module in the device reads the in-system programming code; calculates a first checksum of the in-system programming code; and completes the third joint test workgroup command when the first checksum is correct simulation operation. 如請求項6所述的固態硬碟裝置的除錯方法,包含:提供多個系統內編程碼版本的第二校驗和;當所述第一校驗和相符於多個所述第二校驗和中的一個時,獲取相應的系統內編程碼版本的記憶體配置邏輯;以及依據所述記憶體配置邏輯完成所述第三聯合測試工作群組命令的模擬操作。 The debugging method of a solid-state hard disk device as described in claim 6, comprising: providing a second checksum of a plurality of in-system programming code versions; when the first checksum matches a plurality of the second checksums When one of the verification sums is selected, the memory configuration logic of the corresponding in-system programming code version is obtained; and the simulation operation of the command of the third joint test working group is completed according to the memory configuration logic. 一種電腦程式產品,包含固態硬碟裝置的除錯程式碼,其中,當樹莓派的處理單元執行所述除錯程式碼時,實施如請求項1至7中任 一項所述的固態硬碟裝置的除錯方法。 A computer program product, comprising a debugging program code for a solid-state hard disk device, wherein, when the processing unit of the Raspberry Pi executes the debugging program code, any of the requirements 1 to 7 is implemented A debugging method for a solid-state hard disk device. 一種為固態硬碟裝置除錯的裝置,設置在樹莓派中,包含:通用輸入輸出介面;以及處理單元,耦接所述通用輸入輸出介面,當載入並執行除錯應用程式時,通過所述通用輸入輸出介面模擬第一聯合測試工作群組命令給所述固態硬碟裝置,用於停止所述固態硬碟裝置中的快閃控制器的處理單元的運行;通過所述通用輸入輸出介面模擬第二聯合測試工作群組命令給所述固態硬碟裝置,用於讓所述固態硬碟裝置離開休眠模式;以及通過所述通用輸入輸出介面模擬第三聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的靜態隨機存取記憶體的指定位址讀取指定長度的資料。 A device for debugging a solid-state hard disk device, which is set in a raspberry pie and includes: a general-purpose input-output interface; and a processing unit, coupled to the general-purpose input-output interface, when loading and executing a debugging application program, through The general-purpose input and output interface simulates the first joint test working group command to the solid-state hard disk device for stopping the operation of the processing unit of the flash controller in the solid-state hard disk device; through the general-purpose input and output The interface simulates the command of the second joint test working group to the solid-state hard disk device, which is used to let the solid-state hard disk device leave the sleep mode; The solid-state hard disk device is used for reading data of a specified length from a specified address of a static random access memory in the solid-state hard disk device. 如請求項9所述的為固態硬碟裝置除錯的裝置,其中,所述樹莓派為基於Linux作業系統的單晶片電腦。 The device for debugging a solid-state hard disk device as described in claim 9, wherein the Raspberry Pi is a single-chip computer based on a Linux operating system. 如請求項9所述的為固態硬碟裝置除錯的裝置,其中,所述處理單元通過所述通用輸入輸出介面模擬第四聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的動態隨機存取記憶體的指定位址讀取指定長度的資料。 The device for debugging a solid-state hard disk device as described in claim 9, wherein, the processing unit simulates a fourth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, for from The specified address of the dynamic random access memory in the solid-state hard disk device reads data of a specified length. 如請求項9所述的為固態硬碟裝置除錯的裝置,其中,所述處理單元通過所述通用輸入輸出介面模擬第五聯合測試工作群組命令給所述固態硬碟裝置,用於讀取所述固態硬碟裝置中的所述快閃控制器的所述處理單元的識別碼;判斷所述識別碼是否正確;以及當所述識別碼正確時,完成所述第一聯合測試工作群組命令、所述第二 聯合測試工作群組命令和所述第三聯合測試工作群組命令的模擬操作。 The device for debugging a solid-state hard disk device as described in claim 9, wherein the processing unit simulates the fifth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface for reading Get the identification code of the processing unit of the flash controller in the solid-state hard disk device; judge whether the identification code is correct; and when the identification code is correct, complete the first joint test work group group command, the second A joint test workgroup command and a simulated operation of the third joint test workgroup command. 如請求項9所述的為固態硬碟裝置除錯的裝置,其中,所述處理單元通過所述通用輸入輸出介面模擬第六聯合測試工作群組命令給所述固態硬碟裝置,用於從所述固態硬碟裝置中的閃存模組讀取系統內編程碼;計算所述系統內編程碼的第一校驗和;以及當所述第一校驗和正確時,完成所述第三聯合測試工作群組命令的模擬操作。 The device for debugging a solid-state hard disk device as described in claim 9, wherein the processing unit simulates a sixth joint test working group command to the solid-state hard disk device through the general-purpose input and output interface, for from The flash memory module in the solid-state hard disk device reads the in-system programming code; calculates a first checksum of the in-system programming code; and completes the third combination when the first checksum is correct Test mock operation of workgroup commands. 如請求項13所述的為固態硬碟裝置除錯的裝置,包含:閃存,耦接所述處理單元,用於儲存多個系統內編程碼版本的第二校驗和;其中,所述處理單元當偵測到所述第一校驗和相符於多個所述第二校驗和中的一個時,獲取相應的系統內編程碼版本的記憶體配置邏輯;以及依據所述記憶體配置邏輯完成所述第三聯合測試工作群組命令的模擬操作。 The device for debugging a solid-state hard disk device as described in claim 13, comprising: a flash memory, coupled to the processing unit, for storing a second checksum of a plurality of in-system programming code versions; wherein, the processing When the unit detects that the first checksum matches one of the plurality of second checksums, acquiring the memory configuration logic of the corresponding in-system programming code version; and according to the memory configuration logic completing the simulation operation of the command of the third joint test working group.
TW110135711A 2021-06-28 2021-09-27 Method and apparatus and computer program product for debugging solid state disk devices TWI793774B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202163215732P 2021-06-28 2021-06-28
US63/215,732 2021-06-28

Publications (2)

Publication Number Publication Date
TW202301324A TW202301324A (en) 2023-01-01
TWI793774B true TWI793774B (en) 2023-02-21

Family

ID=84841755

Family Applications (3)

Application Number Title Priority Date Filing Date
TW110135711A TWI793774B (en) 2021-06-28 2021-09-27 Method and apparatus and computer program product for debugging solid state disk devices
TW110135749A TWI794997B (en) 2021-06-28 2021-09-27 Method and apparatus and computer program product for debugging solid state disk devices
TW110135718A TWI794996B (en) 2021-06-28 2021-09-27 Apparatus and system for debugging solid state disk devices

Family Applications After (2)

Application Number Title Priority Date Filing Date
TW110135749A TWI794997B (en) 2021-06-28 2021-09-27 Method and apparatus and computer program product for debugging solid state disk devices
TW110135718A TWI794996B (en) 2021-06-28 2021-09-27 Apparatus and system for debugging solid state disk devices

Country Status (2)

Country Link
CN (3) CN115602240A (en)
TW (3) TWI793774B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201710919A (en) * 2015-06-30 2017-03-16 英特爾公司 Orientation indicating connector
US9672091B2 (en) * 2015-11-10 2017-06-06 Samsung Electronics Co., Ltd. Storage device and debugging method thereof
TW201908974A (en) * 2016-06-10 2019-03-01 美商利魁得股份有限公司 Multiple intermediary architecture in data storage system
US20190129774A1 (en) * 2017-10-26 2019-05-02 SK Hynix Inc. Firmware event tracking for nand-based storage devices, and methods and instruction sets for performing the same
US20190236044A1 (en) * 2016-01-29 2019-08-01 Liqid Inc. Enhanced SSD Storage Device Form Factors
US20200013476A1 (en) * 2018-07-06 2020-01-09 SK Hynix Inc. Remote ssd debug via host/serial interface and method of executing the same
US20200073841A1 (en) * 2014-04-25 2020-03-05 Liqid Inc. Stacked Storage Drives In Storage Apparatuses
US20200300911A1 (en) * 2017-11-29 2020-09-24 Intel Corporation System, Apparatus And Method For In-Field Self Testing In A Diagnostic Sleep State

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201282473Y (en) * 2007-12-28 2009-07-29 上海电力学院 ZigBee wireless network coordinating device based on ARM
US9830297B2 (en) * 2015-02-26 2017-11-28 Spire Global, Inc. Processor system for control of modular autonomous system
US20160275036A1 (en) * 2015-03-19 2016-09-22 Western Digital Technologies, Inc. Single board computer interface
US10527673B2 (en) * 2016-08-01 2020-01-07 Microsoft Technology Licensing, Llc Hardware debug host

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200073841A1 (en) * 2014-04-25 2020-03-05 Liqid Inc. Stacked Storage Drives In Storage Apparatuses
TW201710919A (en) * 2015-06-30 2017-03-16 英特爾公司 Orientation indicating connector
US9672091B2 (en) * 2015-11-10 2017-06-06 Samsung Electronics Co., Ltd. Storage device and debugging method thereof
US20190236044A1 (en) * 2016-01-29 2019-08-01 Liqid Inc. Enhanced SSD Storage Device Form Factors
TW201908974A (en) * 2016-06-10 2019-03-01 美商利魁得股份有限公司 Multiple intermediary architecture in data storage system
US20190129774A1 (en) * 2017-10-26 2019-05-02 SK Hynix Inc. Firmware event tracking for nand-based storage devices, and methods and instruction sets for performing the same
CN109710451A (en) * 2017-10-26 2019-05-03 爱思开海力士有限公司 The firmware event tracking of storage device based on NAND and its execution method and instruction set
US20200300911A1 (en) * 2017-11-29 2020-09-24 Intel Corporation System, Apparatus And Method For In-Field Self Testing In A Diagnostic Sleep State
US20200013476A1 (en) * 2018-07-06 2020-01-09 SK Hynix Inc. Remote ssd debug via host/serial interface and method of executing the same

Also Published As

Publication number Publication date
CN115602240A (en) 2023-01-13
TWI794997B (en) 2023-03-01
CN115602241A (en) 2023-01-13
CN115602239A (en) 2023-01-13
TWI794996B (en) 2023-03-01
TW202301362A (en) 2023-01-01
TW202301328A (en) 2023-01-01
TW202301324A (en) 2023-01-01

Similar Documents

Publication Publication Date Title
US9158661B2 (en) Enhanced debugging for embedded devices
US9720797B2 (en) Flash memory controller, data processing system with flash memory controller and method of operating a flash memory controller
US10089212B2 (en) Memory system, information processing system, and host device outputting debugging information through a host interface
US7409330B2 (en) Method and system for software debugging using a simulator
KR101561854B1 (en) Non-mounted storage test device based on fpga
TWI470420B (en) Dubugging method and computer system using the smae
US11841398B2 (en) Method and apparatus and non-transitory computer-readable storage medium for debugging solid-state disk (SSD) device
TWI588837B (en) System on chip with debug controller and operating method thereof
WO2018018978A1 (en) Universal serial bus controller verification method, system and device
CN102360329A (en) Bus monitoring and debugging control device and methods for monitoring and debugging bus
US8495626B1 (en) Automated operating system installation
US10817405B2 (en) Storage device and debugging system thereof
US11933847B2 (en) Apparatus and system for debugging solid-state disk (SSD) device
US20220413766A1 (en) Method and apparatus and non-transitory computer-readable storage medium for debugging solid-state disk (ssd) device
JP2004030124A (en) Development support cooperation device for semiconductor device and method for supporting development
CN202267954U (en) Bus monitoring and debugging control device
TWI793774B (en) Method and apparatus and computer program product for debugging solid state disk devices
CN112634977B (en) Chip with debug memory interface and debug method thereof
US10922023B2 (en) Method for accessing code SRAM and electronic device
CN114265786A (en) Automatic testing method and device, computer equipment and readable storage medium
CN112765021A (en) Debugging and checking method, device, equipment and storage medium of boot program
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
AbdElSalam NVMe solid state drive verification solution using HW emulation and virtual device technologies
JPH1165898A (en) Maintenance system for electronic computer
US20230376403A1 (en) Debug device, debug system, and debug method for testing storage device