TW202147114A - Method and apparatus and computer program product for producing solid state disk devices - Google Patents
Method and apparatus and computer program product for producing solid state disk devices Download PDFInfo
- Publication number
- TW202147114A TW202147114A TW109119252A TW109119252A TW202147114A TW 202147114 A TW202147114 A TW 202147114A TW 109119252 A TW109119252 A TW 109119252A TW 109119252 A TW109119252 A TW 109119252A TW 202147114 A TW202147114 A TW 202147114A
- Authority
- TW
- Taiwan
- Prior art keywords
- port
- solid
- hard disk
- ports
- state hard
- Prior art date
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本發明涉及儲存裝置,尤指一種生產固態硬碟的電腦程式產品及方法以及裝置。The present invention relates to storage devices, in particular to a computer program product, method and device for producing solid state hard disks.
固態硬碟通常需要完成開卡程序後才能出廠銷售,而開卡程序耗費的時間在固態硬碟的生產上是個重要的課題。一部生產主機通常可以通過裝置介面的埠連接5到16個固態硬碟,並且對連接上的固態硬碟進行開卡。然而,傳統上,當其中一個固態硬碟的開卡失敗時,生產主機無法自動知道實際上是哪一個發生了錯誤,需要生產人員以人工的方式將連接的固態硬碟拔下來確認,拉長了生產的時間。因此,本發明提出一種生產固態硬碟的方法、裝置及電腦程式產品,用於解決如上所述的問題。Solid-state drives usually need to complete the card-opening process before they can be sold, and the time spent in the card-opening process is an important issue in the production of solid-state drives. A production host can usually connect 5 to 16 solid-state drives through the ports of the device interface, and open the card for the connected solid-state drives. However, traditionally, when one of the solid-state drives fails to open the card, the production host cannot automatically know which one actually has the error, and the production personnel need to manually unplug the connected solid-state drive to confirm, elongated production time. Therefore, the present invention provides a method, apparatus and computer program product for producing a solid state hard disk, which are used to solve the above problems.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。In view of this, how to alleviate or eliminate the above-mentioned deficiencies in related fields is a problem to be solved.
本說明書涉及一種生產固態硬碟的方法的實施例,由生產主機的處理單元執行。生產主機包含裝置介面,且裝置介面包含多個第一埠。每個第一埠連接一個集線器,且每個集線器包含多個第二埠。上述方法包含:載入埠映射組態表,包含代表每個第二埠的位置資訊;比對硬體描述檔中的位置資訊和埠映射組態表中的位置資訊來判斷每個第二埠是否連接固態硬碟;在顯示器上顯示圖形用戶界面,用於指出每個第二埠是否連接固態硬碟的資訊;以及當第二埠中的一個所連接的固態硬碟開卡失敗時,更新圖形用戶界面,用於指出相應第二埠所連接的固態硬碟發生開卡失敗的資訊。This specification relates to an embodiment of a method for producing a solid state hard disk, which is executed by a processing unit of a production host. The production host includes a device interface, and the device interface includes a plurality of first ports. Each first port is connected to a hub, and each hub includes a plurality of second ports. The above method includes: loading a port mapping configuration table, including position information representing each second port; comparing the position information in the hardware description file with the position information in the port mapping configuration table to determine each second port Whether a solid-state drive is connected; display a GUI on the monitor to indicate whether each second port is connected to a solid-state drive; and update when one of the connected solid-state drives in the second port fails to open the card The GUI is used to indicate the information about the failure of card opening of the solid state drive connected to the corresponding second port.
本說明書另涉及一種電腦程式產品,包含用於生產固態硬碟的程式碼。當生產主機的處理單元執行程式碼時,實施如上所述的生產固態硬碟的方法。This specification also relates to a computer program product comprising program code for producing a solid state hard disk. When the processing unit of the production host executes the code, the method for producing the solid state hard disk as described above is implemented.
本說明書另涉及一種生產固態硬碟的裝置,包含:上述裝置介面和處理單元。處理單元耦接裝置介面,用於載入並執行如上所述的程式碼時,實施如上所述的方法。The present specification further relates to an apparatus for producing a solid state hard disk, comprising: the above-mentioned apparatus interface and a processing unit. The processing unit is coupled to the device interface for loading and executing the above-mentioned code to implement the above-mentioned method.
上述實施例的優點之一,通過如上所述的比對,能夠自動識別生產系統中每個集線器上的每個埠是否連接固態硬碟。One of the advantages of the above embodiment is that, through the above comparison, it can automatically identify whether each port on each hub in the production system is connected to a solid state hard disk.
上述實施例的另一個優點,通過如上所述的埠映射組態表中包含的資訊,當某個固態硬碟開卡失敗時,能夠自動辨認是哪個埠上連接的固態硬碟在開卡過程中發生錯誤。Another advantage of the above embodiment is that through the information contained in the port mapping configuration table as described above, when a certain solid state drive fails to open the card, it can automatically identify which port is connected to the solid state drive during the card opening process. An error occurred in .
本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。Other advantages of the present invention will be explained in more detail in conjunction with the following description and drawings.
以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。The following description is a preferred implementation manner to complete the invention, and its purpose is to describe the basic spirit of the invention, but it is not intended to limit the invention. Reference must be made to the scope of the following claims for the actual inventive content.
必須了解的是,使用於本說明書中的“包含”、“包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。It must be understood that the words "comprising" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operation processes, elements and/or components, but do not exclude the possibility of adding More technical features, values, method steps, job processes, elements, components, or any combination of the above.
於權利要求中使用如“第一”、“第二”、“第三”等詞是用於修飾權利要求中的元件,並非用於表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用於區別具有相同名字的元件。The use of words such as "first", "second", "third", etc. in the claims is used to modify the elements in the claims, and is not used to indicate that there is a priority order, a prepositional relationship between them, or an element Prior to another element, or chronological order in which method steps are performed, is only used to distinguish elements with the same name.
必須了解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。It must be understood that when an element is described as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, and 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 can also be read in a similar fashion, such as "between" versus "directly interposed," or "adjacent" versus "directly adjoining," and the like.
為了讓生產計算機能夠自動區別每個埠上連接的固態硬碟(Solid State Disk,SSD),本發明實施例將整個生產流程分為二個階段:定埠(Port Distinguishing)階段和開卡(Card Activation)階段。參考圖1,在定埠階段110,訓練計算機140分析作業系統(Operating System,OS)中的硬體描述檔(Hardware Description File)的內容,用於獲取每個物理埠的識別資訊,例如序列先進技術附著/快速周邊元件互聯登錄檔(Serial Advanced Technology Attachment,SATA/Peripheral Component Interconnect Express,PCIe Registries)、匯流排編號(Bus Number)、目標識別碼(Target ID)、邏輯單元號(Logical Unit Number,LUN)等,並據以產生埠映射組態表(Port-mapping Configuration Table)160。在開卡階段130,生產計算機180載入埠映射組態表160,並且為多個連接上生產計算機180的固態硬碟執行開卡程序。在開卡程序中,如果生產計算機180發現任何錯誤訊息,可依據埠映射組態表160的資訊辨認出是哪個物理埠上連接的固態硬碟發生錯誤,並顯示在圖形用戶界面(Graphical User Interface,GUI),有利於操作人員和/或生產計算機180執行錯誤排除處理。在這裡需要注意的是訓練計算機140和生產計算機180可以是兩部擁有相同的必要軟體和硬體配置的計算機,或者是同一部計算機。In order to allow the production computer to automatically distinguish the Solid State Disk (SSD) connected to each port, the embodiment of the present invention divides the entire production process into two stages: the port distinguishing stage and the card opening stage. Activation) stage. Referring to FIG. 1 , in the
參考圖2。訓練系統20包含定埠主機(Port-distinguishing Host)210、集線器(Hub)230、訓練固態硬碟250及顯示器270。圖1所述的訓練計算機140可包含定埠主機210、集線器230和顯示器270。訓練固態硬碟250可包含閃存控制器及多個閃存模組。顯示器270可以是薄膜電晶體液晶顯示器(Thin Film Transistor-Liquid Crystal Display, TFT-LCD Display)、有機發光二極體顯示器(Organic Light-Emitting Diode,OLED Display)等,在訓練流程中顯示讓工程師或操作員可以觀看的畫面,包含提示的文字、數字、符號、圖案等,或以上任意組合。Refer to Figure 2. The
定埠主機210可用個人電腦、筆記型電腦(Laptop PC)、工業用電腦(Industrial Computer)、工作站(Workstation)等實施。定埠主機210包含裝置介面212,具有多個埠(ports)214-1至214-4,每個埠可連接一個集線器,例如埠214-1連接集線器230。雖然圖2描述的裝置介面212只配備4個埠,但所屬技術領域人員可在裝置介面212上配備更多或更少的埠,讓定埠主機210能夠連接上更多或更少的集線器,本發明不應因此受限。集線器230包含多個埠232-1至232-4,每個埠可插上一個訓練固態硬碟250,例如訓練固態硬碟250-1至250-4中的任何一個。需注意的是,為了讓說明書簡明,以下段落使用訓練固態硬碟250來描述時,代表其說明的結構、功能、方法步驟或其他技術內容能夠應用在訓練固態硬碟250-1至250-4和其他中的任何一個。雖然圖1描述的集線器230具有4個埠,但所屬技術領域人員可將具有更多或更少埠的集線器連接上定埠主機210,使得定埠主機210能夠連接上更多或更少的訓練固態硬碟,本發明不應因此受限。The port-
參考圖3。由於集線器230連接裝置介面212上的一個埠並且在訓練固態硬碟250插上集線器230時,等同於訓練固態硬碟250物理性連接上定埠主機210,所以圖3中省略了圖2所示的集線器230。定埠主機210包含處理單元312,可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行軟體以及/或韌體指令時,例如,定埠工具(Port-distinguishing Tool)、作業系統(Operating System,OS)、驅動程式(Driver)等,提供指定的功能。處理單元312可通過裝置介面212傳送命令給訓練固態硬碟250,完成所需要的操作。Refer to Figure 3. Since the
訓練固態硬碟250包含閃存控制器330及閃存模組350。閃存模組350提供大量的儲存空間,通常是數百個千兆位元組(Gigabytes),甚至是數個兆兆位元組(Terabytes),用於儲存大量的使用者資料,例如高解析度圖片、影片等。閃存控制器130包含主機介面332,並且主機介面332耦接定埠主機210的裝置介面212。The training
為了區分如圖2所示的裝置介面212的埠214-1至214-4和集線器230的埠232-1至232-4,需要提供硬體描述檔來識別埠214-1至214-4和埠232-1至232-4,使得軟體程式在執行時能夠知道一個輸出輸入裝置通過埠214-1至214-4和埠232-1至232-4中的某一個連接上定埠主機210。例如,視窗登錄檔(Windows Registry)是一種儲存底層設定的階層式資料庫,用來提供給視窗作業系統(Windows OS)和應用程式使用。詳細來說,視窗登錄檔包含定埠主機210的硬體(如SATA/PCIe介面等)和連接上定埠主機210的裝置(如固態硬碟)的資訊、設定、選項和其他值。當一個固態硬碟通過集線器230的一個埠連接上定埠主機210時,視窗登錄檔會加入一個新的子鍵(Subkey),該子鍵包含多個值(Values),用於儲存如硬體識別碼、位置資訊、製造商、服務等的設定值。In order to distinguish the ports 214-1 to 214-4 of the
本發明實施例提出一種定埠方法,由處理單元312載入並執行定埠工具的程式碼時實施。參考圖4。以視窗作業系統為例,詳細說明如下:An embodiment of the present invention provides a port positioning method, which is implemented when the
步驟S410:設定變數i=1。變數i用來記錄定埠的順序編號。Step S410: Set the variable i=1. The variable i is used to record the sequence number of the fixed port.
接著,流程反覆執行一個迴圈,包含步驟S420至S480。在每個回合執行前,操作人員將一個訓練固態硬碟插入指定的埠。舉例來說,集線器230的埠232-1、埠232-2、埠232-3和埠232-4可依序標示為Port#1、Port#2、Port#3和Port#4。操作人員將訓練固態硬碟250-1插入埠232-1後,處理單元312執行步驟S420至S480為埠Port#1定埠。接著,操作人員將訓練固態硬碟250-2插入埠232-2後,處理單元312執行步驟S420至S480為埠Port#2定埠。這個過程會一直重複,直到必要的埠都完成定埠為止。Next, the process repeatedly executes a loop, including steps S420 to S480. Before each round, the operator inserted a training solid-state drive into the designated port. For example, the ports 232-1, 232-2, 232-3, and 232-4 of the
步驟S420:獲取相應於新插入的固態硬碟所增加到視窗登錄檔的子鍵(Subkey)。舉例來說,處理單元312可執行微軟應用程式介面(Application Programming Interface,API)功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\SCSI”的控制代碼。接著,處理單元312可執行微軟API功能“DeviceIOControl”來檢查獲取的控制代碼中是否有新增加的子鍵。如果有新增加的子鍵,代表偵測到一個新增加的小型電腦系統介面(Small Computer System Interface,SCSI)裝置,則獲取此子鍵的類別全域唯一識別碼(ClassGUID)。如果沒有新增加的子鍵,處理單元312可執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\IDE”的控制代碼。接著,處理單元312可執行微軟API功能“DeviceIOControl”來檢查是否獲取的控制代碼中是否有新增加的子鍵。如果有新增加的子鍵,代表偵測到一個新增加的整合裝置電路(Integrated Drive Electronics,IDE)裝置,則獲取此子鍵的類別全域唯一識別碼。Step S420 : Obtain the subkey (Subkey) added to the Windows login file corresponding to the newly inserted solid state hard disk. For example, the
步驟S430:從新增加的子鍵中獲取第i個埠的位置資訊。舉例來說,處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”,用於依據類別全域唯一識別碼(在步驟S420獲取)來獲取指向特定裝置資訊集(Device Information Set)的控制代碼“HDEVINFO”。處理單元312可執行微軟API功能“WINSETUPAPI SetupDiEnumDeviceInterface”,用於列舉控制代碼“HDEVINFO”中包含的裝置介面(Device Interfaces),裝置介面的資料可儲存在RAM 314中的預設緩衝區。處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetDeviceInterfaceDetail”,用於取得裝置介面的詳細資料,其中包含裝置路徑(Device Path)和位置資訊(Location Information)。位置資訊包含三個部分:匯流排編號(Bus Number);目標識別碼(Target ID);和邏輯單元號(Logical Unit Number,LUN)。舉例來說,位置資訊可用來識別圖2中集線器230的埠232-1至232-4中的一個。處理單元312可從裝置路徑中斷出第二個到第三個井字號(“#”,Hashtag)之間的字串,並取出字串中最後一個及符號(“&”,Ampersand)之前的字元作為裝置路徑序號。例如,處理單元312可從SCSI裝置的裝置路徑“\\?\scsi#disk&ven_wdc&prod_wd10spzx-08z10#4&2e835db4&0&000200#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}”取出裝置路徑序號“4&2e835db4&0”。又例如,處理單元312可從IDE裝置的裝置路徑“\\?\ide#disksmi_disk________________________________q0921b__#5&39170d91&0&1.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}”取出裝置路徑序號“5&39170d91&0”。Step S430: Obtain the location information of the i-th port from the newly added subkey. For example, the
步驟S440:根據第i個埠的裝置路徑序號獲取第i個埠的PCI或IDE登錄檔。處理單元312可根據步驟S420偵測到的新增加子鍵是在哪個路徑中的資訊來決定要掃描的是PCI或IDE登錄檔。Step S440: Acquire the PCI or IDE registration file of the i-th port according to the device path serial number of the i-th port. The
如果新增加子鍵是在路徑“Enum\SCSI”中,則處理單元312掃描PCI登錄檔。舉例來說,處理單元312執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\PCI”的控制代碼。處理單元312可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取登錄值(Registry Value)“ParentIdPrifix”,並比較登錄值“ParentIdPrifix”是否相符於步驟S430中獲取的裝置路徑序號。如果相符,則代表此子鍵包含第i個埠的PCI登錄檔,處理單元S312可執行微軟API功能 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取PCI登錄檔。處理單元312可從PCI登錄檔中斷出第二個反斜線(“\”,Backslash)到最後一個及符號(“&”,Ampersand)之間的字串,作為PCI裝置的裝置路徑序號。例如,處理單元312可從PCI裝置的裝置路徑“PCI\VEN_8086&DEV_9D03&SUBSYS_225D17AA&REV_21\3&11583659&0&B8”取出裝置路徑序號“3&11583659&0”。If the newly added subkey is in the path "Enum\SCSI", the
如果新增加子鍵是在路徑“Enum\IDE”中,則處理單元312掃描PCIIDE登錄檔。舉例來說,處理單元312執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\PCIIDE”的控制代碼。處理單元312可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取登錄值“ParentIdPrifix”,並比較登錄值“ParentIdPrifix”是否相符於步驟S430中獲取的裝置路徑序號。如果相符,則代表此子鍵包含第i個埠的IDE登錄檔,處理單元S312可執行微軟API功能 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取IDE登錄檔。處理單元312可從IDE登錄檔中斷出第二個反斜線(“\”,Backslash)到最後一個及符號(“&”,Ampersand)之間的字串,作為IDE裝置的裝置路徑序號。例如,處理單元312可從IDE裝置的裝置路徑“PCIIDE\IDEChannel\4&1dd8ffee&0&1”取出裝置路徑序號“4&1dd8ffee&0”。If the newly added subkey is in the path "Enum\IDE", the
步驟S450:依據PCI或IDE裝置的裝置路徑序號獲取SATA或PCIe登錄檔。舉例來說,處理單元312可執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\PCI”的控制代碼。處理單元312可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取登錄值 “ParentIdPrifix”,並比較登錄值“ParentIdPrifix”是否相符於步驟S440中獲取的裝置路徑序號。如果相符,則代表此子鍵包含第i個埠的SATA登錄檔,處理單元S312可執行微軟API功能 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取SATA登錄檔。Step S450: Acquire a SATA or PCIe registration file according to the device path serial number of the PCI or IDE device. For example, the
如果在視窗登錄檔中路徑“Enum\PCI”的控制代碼找不到相符的登錄檔,處理單元312執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\ACPI”的控制代碼。處理單元312可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元312可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取登錄值 “ParentIdPrifix”,並比較登錄值“ParentIdPrifix”是否相符於步驟S440中獲取的裝置路徑序號。如果相符,則代表此子鍵包含第i個埠的PCIe登錄檔,處理單元S312可執行微軟API功能 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取PCIe登錄檔,“ACPI\PNP0A08\0”。舉例來說,SATA或PCIe登錄檔可用來識別圖2中裝置介面212的埠214-1至214-4中的一個。If the control code of the path "Enum\PCI" in the Windows log file cannot find a matching log file, the
步驟S460:儲存第i個埠的定埠資訊到RAM 314和/或儲存單元316中的埠映射組態表160。定埠資訊包含步驟S430獲取的位置資訊和步驟S450獲取的SATA或PCIe登錄檔。表1顯示埠映射組態表160的部份範例:
表1
步驟S470:判斷是否定埠作業完成。如果是,則流程結束,埠映射組態表160製作完成。否則,流程繼續進行步驟S480的處理。Step S470: It is determined whether the fixed port operation is completed. If so, the process ends, and the port mapping configuration table 160 is completed. Otherwise, the flow proceeds to the process of step S480.
步驟S480:計算i=i+1。Step S480: Calculate i=i+1.
當流程結束後,定埠主機210的RAM 314或儲存單元316中的埠映射組態表160可以輸出到生產計算機180,讓開卡程序參考用。When the process ends, the port mapping configuration table 160 in the
在這裡需要注意的是,由於操作人員以預設的順序逐一插入訓練固態硬碟到集線器的所有埠,因此,埠映射組態表160中的位置資訊的順序相符於集線器的埠的預設物理安排。It should be noted here that, since the operator inserts the training SSDs into all the ports of the hub one by one in the preset sequence, the sequence of the location information in the port mapping configuration table 160 is consistent with the preset physical configuration of the ports of the hub. arrange.
參考圖5。生產系統50包含生產主機(Production Host)510、集線器530、固態硬碟550-1至550-4及顯示器570。針對每一個固態硬碟550,在閃存控制器及閃存模組設置在母板後,還需要完成開卡流程(Card-activation Process)才能夠出廠並提供給客戶。顯示器570可以是薄膜電晶體液晶顯示器、有機發光二極體顯示器等,在開卡流程中顯示讓工程師或操作員可以觀看的畫面,包含提示的文字、數字、符號、圖案等,或以上任意組合。Refer to Figure 5. The
在正常情況下,生產主機510中的裝置介面512,和集線器530擁有相同或者匹配於定埠主機210的裝置介面212,和集線器230的軟硬體設置。為了讓說明書簡明,以下段落使用固態硬碟550來描述時,代表其說明的結構、功能、方法步驟或其他技術內容能夠應用在固態硬碟550-1至550-4和其他中的任何一個。Under normal circumstances, the
參考圖6。由於集線器530連接裝置介面512上的一個埠並固態硬碟550插上集線器530時,等同於固態硬碟550物理性連接上生產主機510,所以圖6中省略了圖1所示的集線器530。生產主機510包含處理單元612,可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行軟體以及/或韌體指令時,例如,量產工具(Mass Production,MP Tool)、作業系統(Operating System,OS)、驅動程式(Driver)等,提供指定的功能。處理單元612可發出指令給裝置介面512,用於傳送供應商命令(Vendor Command)給固態硬碟550,完成開卡流程中所需要的操作。供應商命令不是標準的主機操作命令,例如,通用快閃記憶儲存(Universal Flash Storage,UFS)、快速非揮發性記憶體(Non-Volatile Memory Express,NVMe)、開放通道固態硬碟(Open-channel Solid State Disk,SSD)等定義的管理命令、輸入輸出命令等,而是由固態硬碟550或者閃存控制器630的製造商提供給客戶的自訂命令(Proprietary Commands)。Refer to Figure 6. Since the
生產主機510包含儲存單元616,可以為硬碟(Hard Disk)、固態硬碟,用來儲存埠映射組態表160。生產主機510另包含RAM 614,用於執行開卡流程中需要的暫存資料,例如,變數、旗標、埠映射組態表160等。The
固態硬碟550包含閃存控制器630及閃存模組650。閃存模組650提供大量的儲存空間,通常是數百個千兆位元組(Gigabytes),甚至是數個兆兆位元組(Terabytes),用於儲存大量的使用者資料,例如高解析度圖片、影片等。閃存模組650中包含控制電路以及記憶體陣列,記憶體陣列中的記憶單元可包含單層式單元(Single Level Cells,SLCs)、多層式單元(Multiple Level Cells,MLCs)三層式單元(Triple Level Cells,TLCs)、四層式單元(Quad-Level Cells,QLCs)或上述的任意組合。The
閃存控制器630包含主機介面632、閃存介面634、揮發性隨機存取記憶體(Volatile Random Access Memory,VRAM)636、處理單元637、唯讀記憶體(Read-Only Memory,ROM)638和輸入輸出介面639。主機介面632耦接生產主機510的裝置介面512。閃存介面(Flash Interface)634耦接閃存模組650,可以雙倍資料率(Double Data Rate,DDR)通訊協定彼此溝通,例如,開放NAND快閃介面(Open NAND Flash Interface,ONFI)、雙倍資料率開關(DDR Toggle)或其他介面通訊協定。處理單元637可以如上所述的通用硬體實施。VRAM 636儲存執行開卡流程中需要的暫存資料,例如,變數、旗標、資料表等。The
參考圖7。本發明實施例提出一種開卡方法,由處理單元612載入並執行量產工具的程式碼時實施。此方法包含以下步驟:載入之前由定埠主機210產生的埠映射組態表160,包含集線器530中每個埠的位置資訊;比對硬體描述檔中的位置資訊和埠映射組態表160中的位置資訊來判斷集線器530中的每個埠是否連接固態硬碟;在顯示器570上顯示GUI,用於指出集線器530中每個埠是否連接固態硬碟的資訊;以及當其中一個埠所連接的固態硬碟開卡失敗時,更新GUI,用於指出相應埠所連接的固態硬碟發生開卡失敗的資訊。硬體描述檔由生產主機510運行的作業系統提供。詳細說明如下:Refer to Figure 7. An embodiment of the present invention provides a card opening method, which is implemented when the
步驟S710:從儲存單元616載入埠映射組態表160,並且儲存於RAM 614中以供快速查找。埠映射組態表160可參考表1或表2(將在以下段落描述)的範例。Step S710: Load the port mapping configuration table 160 from the
步驟S720:判斷埠映射組態表160的所有SATA/PCIe登錄檔是否存在生產主機510的作業系統的視窗登錄檔。如果是,流程繼續步驟S730的處理。否則,代表曾經用來產生埠映射組態表160的訓練主機210的軟硬體設置和生產主機510並不相同或不匹配,流程結束。Step S720 : Determine whether all the SATA/PCIe registration files in the port mapping configuration table 160 exist in the Windows registration file of the operating system of the
詳細來說,針對埠映射組態表160中的每一個SATA登錄檔,處理單元612可執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\PCI”的控制代碼。處理單元612可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元612可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來檢查是否存在相同的SATA登錄檔。當埠映射組態表160中有任何一個SATA登錄檔在此控制代碼中的所有子鍵內都找不到時,代表曾經用來產生埠映射組態表160的訓練主機210的軟硬體設置和生產主機510並不相同或不匹配。Specifically, for each SATA log file in the port mapping configuration table 160, the
此外,針對埠映射組態表160中的每一個PCIe登錄檔,處理單元612可執行微軟API功能“CreateFile”來獲取視窗登錄檔中路徑“Enum\ACPI”的控制代碼。處理單元612可執行微軟API功能“DeviceIOControl”來獲取控制代碼中的所有子鍵。接著,針對每一個子鍵,參考如步驟S420所述的技術內容,處理單元612可執行微軟API功能“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來檢查是否存在相同的PCIe登錄檔。當埠映射組態表160中有任何一個PCIe登錄檔在此控制代碼中的所有子鍵內都找不到時,代表曾經用來產生埠映射組態表160的訓練主機210的軟硬體設置和生產主機510並不相同或不匹配。In addition, for each PCIe registration file in the port mapping configuration table 160, the
步驟S730:掃描連接上生產主機的固態硬碟。舉例來說,參考步驟S420和S430的技術內容,處理單元612可執行微軟API功能“CreateFile”、“DeviceIOControl”、“WINSETUPAPI SetupDiGetClassDevs”、“WINSETUPAPI SetupDiEnumDeviceInterface” 和 “WINSETUPAPI SetupDiGetDeviceInterfaceDetail”來獲取所有連接上生產主機510的SCSI裝置和IDE裝置的位置資訊。接著,處理單元612比對所有連接的SCSI裝置和IDE裝置的位置資訊和埠映射組態表160中的所有位置資訊,判斷生產主機510上的哪些埠已經連接上固態硬碟550,並且在顯示器570的圖形用戶界面(Graphical User Interface,GUI)顯示偵測的連接結果。例如,GUI上可顯示每一個埠上是否連接一個固態硬碟,每一個埠的位置資訊,以及每個埠上連接的固態硬碟的開卡狀態。Step S730: Scan the solid state hard disk connected to the production host. For example, referring to the technical content of steps S420 and S430, the
在一些實施例中,處理單元612可在GUI上顯示固態硬碟550連接到的集線器上的埠的位置資訊的內容,例如,匯流排編號,目標識別碼,邏輯單元號,或以上的任意組合。In some embodiments, the
在另一些實施例中,處理單元612可更依據特定埠的匯流排編號和目標識別碼計算埠號(Port Number),並且使用埠號來代表特定埠的的位置資訊,範例的公式如下:
PN=BusN*MAX_PCI_TARGET_NUM+TargetID
其中,PN代表特定埠的埠號,BusN代表特定埠的匯流排編號,TargetID代表特定埠的目標識別碼,MAX_PCI_TARGET為常數,設為大於0的整數,例如,48。表2顯示根據表1的埠映射組態表160的位置資訊的計算結果:
表2
假設固態硬碟550-1至550-4分別連接上集線器530的埠532-1至532-4:參考圖8,圖形用戶界面800中的訊息框810#1至810#4分別顯示埠P#1至埠P#4的埠號(如表2所示)和開卡狀態。圖形用戶界面800的方塊810#5至810#16則以反斜線來代表埠P#5至埠P#16並沒有連接任何固態硬碟。Assuming that the solid state drives 550-1 to 550-4 are connected to the ports 532-1 to 532-4 of the
在這裡需要注意的是,如果只搜索視窗登錄檔,而沒有提供如本發明實施例所述的埠映射組態表160,只能得到所有固態硬碟連接的集線器上埠的位置資訊。換句話說,生產主機不知道集線器包含的埠的總數量,並且從視窗登錄檔搜索到的位置資訊間也沒有可以參考的順序關係。因此,就算得到了所有的位置資訊,也無法讓這些位置資訊能夠跟集線器上的埠的物理安排產生關聯。It should be noted here that, if only the window registration file is searched without providing the port mapping configuration table 160 according to the embodiment of the present invention, only the position information of the ports on the hub connected to all solid-state drives can be obtained. In other words, the production host does not know the total number of ports contained in the hub, and there is no order relation between the location information searched from the Windows registry. Therefore, even if all the location information is available, there is no way to correlate the location information with the physical arrangement of ports on the hub.
步驟S740:設定變數i=1。變數i用來記錄開卡的順序編號。Step S740: Set the variable i=1. The variable i is used to record the sequence number of card opening.
步驟S750:為連接上第i個埠的固態硬碟進行開卡。Step S750: Open a card for the solid state hard disk connected to the i-th port.
舉例來說,在開卡流程中,處理單元637可從唯讀記憶體(Read-Only Memory,ROM) 638載入並執行用於處理從生產主機110發出的供應商命令的程式碼(又可稱為供應商命令處理代碼)。為了反應從生產主機510發出的初始化裝置命令,處理單元637執行供應商命令處理代碼時可通過閃存介面634對閃存模組650進行一連串的測試,用於找出壞塊(Bad Blocks)、壞行(Bad Columns)等,並據以產生壞塊表、壞行表等。供應商命令處理代碼可依據偵測到的壞行數量等參數來計算每個實體頁面能夠用於儲存錯誤檢查校驗碼(Error Check and Correction,ECC Code)的長度。供應商命令處理代碼可依據壞行表及ECC長度等資訊計算每一個實體頁面中每一個區段(Sector)的起始位置,並據以產生區段起始表。供應商命令處理代碼可依據壞塊數目、壞行數目、ECC長度等資訊計算閃存模組250能夠儲存的邏輯區塊位址數目(Logical Address Block,LBA quantity)。供應商命令處理代碼可將以上所述的資料表、變數等資訊儲存在VRAM 636中,並且通過驅動主機介面632回覆初始化完成的訊息給生產主機510,用於通知量產工具。量產工具可將初始化完成的訊息顯示在顯示器570,用於提示操作員或工程師。For example, in the card opening process, the processing unit 637 may load and execute the program code for processing the supplier command issued from the
量產工具從固態硬碟650接收到初始化完成的訊息後,其中可包含閃存模組650能夠儲存的LBA數目等資訊,發出下載資訊(DOWNLOAD INFO)的供應商命令給閃存裝置650,用於指示固態硬碟650將初始化結果儲存於非揮發性儲存空間,例如閃存模組650。為了反應下載資訊命令,處理單元637執行供應商命令處理代碼時可將VRAM 636中儲存的資料表、變數等資訊通過閃存介面634寫入閃存模組650的系統塊(System Block)。所屬技術領域人員理解上述產生的資料表、變數等資訊是系統內程式碼(In-System Programming,ISP Code,又可稱為韌體)將來執行時需要的參考資訊。系統內程式碼包含用於執行從主機發出的主機命令的操作,例如主機讀取、寫入、抹除命令等。主機命令為由標準制定組織所規範命令,例如UFS、NVMe、Open-channel SSD命令等。供應商命令處理代碼可通過驅動主機介面632回覆下載資訊完成的訊息給生產主機510,用於通知量產工具。量產工具可將開卡完成的訊息顯示在顯示器570,用於提示操作員或工程師。例如,改變圖8所示訊息框810#1至810#4中的一個的狀態為“完成”。After the mass production tool receives the initialization completion message from the solid-
然而,固態硬碟550可能在如上所述的開卡流程中的某個操作上失敗,處理單元637可通過驅動主機介面632回覆適當的錯誤碼或錯誤訊息給生產主機510,用於讓量產工具可將錯誤碼或錯誤訊息顯示在顯示器570,用於提示操作員或工程師。接著,量產工具、操作員或工程師可對連接在第i個埠的固態硬碟進行錯誤排除操作。However, the solid-
步驟S760:依據第i個埠上連接的固態硬碟550的回覆訊息判斷是否開卡成功。如果是,則流程繼續進行步驟S780的處理。否則,流程繼續進行步驟S770的處理。Step S760: Determine whether the card is successfully opened according to the reply message of the solid state
步驟S770:在GUI上顯示第i個埠的固態硬碟開卡失敗的訊息。假設固態硬碟550-3在開卡過程中失敗:參考圖9,圖形用戶界面800中的訊息框810#3顯示埠P#3的開卡狀態為“失敗”。Step S770: Display the message that the solid state drive of the i-th port fails to open the card on the GUI. Suppose the solid state drive 550-3 fails during the card opening process: referring to FIG. 9, the
步驟S780:判斷是否完成所有固態硬碟的開卡。如果是,則流程結束。否則,流程繼續進行步驟S790的處理。Step S780: Determine whether the card opening of all solid-state hard disks is completed. If so, the process ends. Otherwise, the flow proceeds to the process of step S790.
步驟S790:計算i=i+1。Step S790: Calculate i=i+1.
通過比對如上所述埠映射組態表160和生產主機510中執行的作業系統所提供的硬體描述檔,能夠識別生產系統50中每個集線器上的每個埠是否連接固態硬碟。並且,當某個固態硬碟開卡失敗時,能夠自動辨認是哪個埠上連接的固態硬碟在開卡過程中發生錯誤。By comparing the port mapping configuration table 160 as described above with the hardware description file provided by the operating system running in the
本發明所述的方法中的全部或部分步驟可以計算機指令實現,例如特定硬體的驅動程式、韌體程式或軟體程式等。此外,也可實現於其他類型程式。所屬技術領域人員可將本發明實施例的方法撰寫成計算機指令,為求簡潔不再加以描述。依據本發明實施例方法實施的計算機指令可儲存於適當的電腦可讀取媒體,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。All or part of the steps in the method of the present invention may be implemented by computer instructions, such as a specific hardware driver, firmware or software program. In addition, it can also be implemented in other types of programs. Those skilled in the art can compose the methods of the embodiments of the present invention into computer instructions, which will not be described for brevity. Computer instructions for implementing methods according to embodiments of the present invention may be stored in a suitable computer-readable medium, such as DVD, CD-ROM, USB disk, hard disk, or may be other suitable vehicles) to access the web server.
雖然圖2、圖3、圖5和圖6中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖4和圖7的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。Although the above-described elements are included in FIGS. 2 , 3 , 5 and 6 , it is not excluded that more other additional elements can be used to achieve better technical effects without departing from the spirit of the invention. In addition, although the flowcharts of FIG. 4 and FIG. 7 are executed in the specified order, those skilled in the art can modify the order of these steps under the premise of achieving the same effect without violating the spirit of the invention. Therefore, The present 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 is not limited thereby.
雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers modifications and similar arrangements obvious to those skilled in the art. Therefore, the scope of the appended claims is to be construed in the broadest manner so as to encompass all obvious modifications and similar arrangements.
110:定埠階段
130:開卡階段
140:訓練計算機
160:埠映射組態表
180:生產計算機
20:訓練系統
210:定埠主機
212:裝置介面
214-1~214-4,232-1~232-4:埠
230:集線器
250,250-1~250-4:訓練固態硬碟
270:顯示器
312:處理單元
314:隨機存取記憶體
316:儲存單元
330:閃存控制器
332:主機介面
350:閃存模組
S410~S480:方法步驟
50:生產系統
510:生產主機
512:裝置介面
514-1~514-4,532-1~532-4:埠
530:集線器
550,550-1~550-4:固態硬碟
570:顯示器
612,637:處理單元
614:隨機存取記憶體
616:儲存單元
632:主機介面
634:閃存介面
636:揮發性隨機存取記憶體
638:唯讀記憶體
650:閃存模組
S710~S790:方法步驟
800:圖形用戶界面
810#1~810#16:訊息框110: Porting stage
130: Card opening stage
140: Train the computer
160: Port mapping configuration table
180: Production Computers
20: Training the system
210: fixed port host
212: Device Interface
214-1~214-4, 232-1~232-4: port
230:
圖1為依據本發明實施例的生產階段示意圖。FIG. 1 is a schematic diagram of a production stage according to an embodiment of the present invention.
圖2為依據本發明實施例的訓練系統的示意圖。FIG. 2 is a schematic diagram of a training system according to an embodiment of the present invention.
圖3為依據本發明實施例的定埠主機和訓練固態硬碟的方塊圖。3 is a block diagram of a ported host and a training solid state drive according to an embodiment of the present invention.
圖4為依據本發明實施例的定埠方法流程圖。FIG. 4 is a flowchart of a method for port determination according to an embodiment of the present invention.
圖5為依據本發明實施例的生產系統的示意圖。5 is a schematic diagram of a production system according to an embodiment of the present invention.
圖6為依據本發明實施例的生產主機和固態硬碟的方塊圖。FIG. 6 is a block diagram of a production host and a solid state hard disk according to an embodiment of the present invention.
圖7為依據本發明實施例的開卡方法流程圖。FIG. 7 is a flowchart of a card opening method according to an embodiment of the present invention.
圖8和圖9為依據本發明實施例的圖形用戶界面的示意圖。8 and 9 are schematic diagrams of graphical user interfaces according to embodiments of the present invention.
S710~S790:方法步驟S710~S790: method steps
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109119252A TWI745997B (en) | 2020-06-09 | 2020-06-09 | Method and apparatus and computer program product for producing solid state disk devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109119252A TWI745997B (en) | 2020-06-09 | 2020-06-09 | Method and apparatus and computer program product for producing solid state disk devices |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI745997B TWI745997B (en) | 2021-11-11 |
TW202147114A true TW202147114A (en) | 2021-12-16 |
Family
ID=79907442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109119252A TWI745997B (en) | 2020-06-09 | 2020-06-09 | Method and apparatus and computer program product for producing solid state disk devices |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI745997B (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6754117B2 (en) * | 2002-08-16 | 2004-06-22 | Micron Technology, Inc. | System and method for self-testing and repair of memory modules |
CN101470587B (en) * | 2004-12-21 | 2011-08-17 | 普安科技股份有限公司 | Redundant storage virtualization subsystem |
US8713209B2 (en) * | 2009-01-13 | 2014-04-29 | Qualcomm Incorporated | System, apparatus, and method for fast startup of USB devices |
US20130253977A1 (en) * | 2012-03-23 | 2013-09-26 | Commvault Systems, Inc. | Automation of data storage activities |
JP6215483B2 (en) * | 2014-09-29 | 2017-10-18 | 株式会社日立製作所 | Storage system management system |
US9639276B2 (en) * | 2015-03-27 | 2017-05-02 | Intel Corporation | Implied directory state updates |
US9904586B2 (en) * | 2015-10-28 | 2018-02-27 | Intel Corporation | Interfacing with block-based storage in a processor |
-
2020
- 2020-06-09 TW TW109119252A patent/TWI745997B/en active
Also Published As
Publication number | Publication date |
---|---|
TWI745997B (en) | 2021-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9043777B2 (en) | Transferring files to a baseboard management controller (‘bmc’) in a computing system | |
TWI432987B (en) | Memory storage device, memory controller thereof, and method for virus scanning | |
US9164840B2 (en) | Managing a solid state drive (‘SSD’) in a redundant array of inexpensive drives (‘RAID’) | |
US20150154032A1 (en) | Server bootstrapping method and computer system | |
US20210004242A1 (en) | Method and system for remote selection of boot device | |
CN103412769A (en) | External card parameter configuration method, equipment and system | |
US8903967B2 (en) | Out-of-band management of third party adapter configuration settings in a computing system | |
US20170286097A1 (en) | Method to prevent operating system digital product key activation failures | |
US9459811B2 (en) | Disk array system and data processing method | |
US10713061B2 (en) | Boot disk detection and management in an information handling system manufacturing environment | |
US20120117367A1 (en) | Electronic apparatus and booting method thereof | |
US11062746B1 (en) | Computer program product and method and apparatus for activating flash devices | |
US20230259484A1 (en) | Universal serial bus control device and control method thereof | |
US11307785B2 (en) | System and method for determining available post-package repair resources | |
JP2000222179A (en) | Computer system and method for operating computer system | |
US8661237B2 (en) | System and method for booting a plurality of servers from a shared boot image stored on a USB boot image sharer | |
US10108537B2 (en) | Mechanisms for reproducing storage system metadata inconsistencies in a test environment | |
US20150082014A1 (en) | Virtual Storage Devices Formed by Selected Partitions of a Physical Storage Device | |
US20130097412A1 (en) | Performing A Boot Sequence In A Multi-Processor System | |
TWI745997B (en) | Method and apparatus and computer program product for producing solid state disk devices | |
CN113778915B (en) | Method for producing solid state disk and computer readable storage medium and device | |
TWI832173B (en) | Method and system for monitoring flash memory device and computer system thereof | |
US10628309B1 (en) | Loading a serial presence detect table according to jumper settings | |
US11256435B2 (en) | Method and apparatus for performing data-accessing management in a storage server | |
TW201443647A (en) | Tiered data storage system with data management and method of operation thereof |