CN115223606A - Hard disk lighting method, system, storage medium and equipment - Google Patents
Hard disk lighting method, system, storage medium and equipment Download PDFInfo
- Publication number
- CN115223606A CN115223606A CN202210912743.0A CN202210912743A CN115223606A CN 115223606 A CN115223606 A CN 115223606A CN 202210912743 A CN202210912743 A CN 202210912743A CN 115223606 A CN115223606 A CN 115223606A
- Authority
- CN
- China
- Prior art keywords
- gpio
- hard disk
- port
- gpio port
- lighting
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C7/00—Arrangements for writing information into, or reading information out from, a digital store
- G11C7/10—Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
- G11C7/1048—Data bus control circuits, e.g. precharging, presetting, equalising
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B33/00—Constructional parts, details or accessories not provided for in the other groups of this subclass
- G11B33/10—Indicating arrangements; Warning arrangements
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C7/00—Arrangements for writing information into, or reading information out from, a digital store
- G11C7/10—Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
- G11C7/1072—Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers for memories with random access ports synchronised on clock signal pulse trains, e.g. synchronous memories, self timed memories
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C7/00—Arrangements for writing information into, or reading information out from, a digital store
- G11C7/20—Memory cell initialisation circuits, e.g. when powering up or down, memory clear, latent image memory
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method, a system, a storage medium and equipment for lighting a hard disk, wherein the method comprises the following steps: determining a plurality of GPIO ports to be used based on an SGPIO bus protocol, wherein the GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, an SLoad signal and an SDataOut signal in the SGPIO bus; receiving initialization instructions of a user for a plurality of GPIO ports, and initializing the plurality of GPIO ports based on the initialization instructions; receiving a hard disk lighting instruction sent by a user, and enabling a first GPIO port and a second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol; and traversing the lamps of all the hard disks, enabling the third GPIO port to output pulse signals of corresponding level states according to the lamp state information in the hard disk lighting indication, and lighting the corresponding hard disk based on the pulse signals output by the third GPIO port. The invention enables the GPIO port to output the pulse signal which accords with the SGPIO protocol in a software simulation mode, thereby reducing the cost of a system-level chip.
Description
Technical Field
The invention relates to the technical field of hard disks, in particular to a hard disk lighting method, a hard disk lighting system, a storage medium and a device.
Background
The SGPIO Bus, namely a Serial GPIO (Serial GPIO) Bus, is customized by SFF (Small Form Factor) committee, and is used for a Bus for communication between a Host Bus Adapter HBA (Host Bus Adapter)/Redundant Array of Independent Disks (RAID) control card and an SAS/SATA hard disk backplane in the global server industry, wherein the HBA/RAID control card acquires the state of a hard disk socket on the backplane through the SGPIO Bus and issues a hard disk LED (light emitting diode) state indicating signal.
In the prior art, as disclosed in patent document "a signal management apparatus, method and server for server", a single CPLD (Complex Programmable Logic Device) is used to analyze and generate an SGPIO signal; in the patent document "a hard disk expansion device", a disk array card is also analyzed by a dedicated SGPIO controller on an SOC (system on a chip) to generate an SGPIO signal. Either using a CPLD or a dedicated SGPIO controller would add additional cost and space.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a hard disk lighting method, system, storage medium and device, so as to solve the problem in the prior art that the SGPIO signal can only be generated and analyzed by the SGPIO dedicated controller or CPLD of the system on chip, which increases the hardware cost and the circuit board area.
Based on the above purpose, the present invention provides a hard disk lighting method, which comprises the following steps:
determining a plurality of GPIO ports to be used based on an SGPIO bus protocol, wherein the GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, an SLoad signal and an SDataOut signal in the SGPIO bus;
receiving initialization instructions of a user for a plurality of GPIO ports, and initializing the plurality of GPIO ports based on the initialization instructions;
receiving a hard disk lighting instruction sent by a user, and enabling a first GPIO port and a second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol;
traversing the lamps of all the hard disks, enabling the third GPIO port to output pulse signals of corresponding level states according to the lamp state information in the hard disk lighting indication, and lighting the corresponding hard disks based on the pulse signals output by the third GPIO port.
In some embodiments, initializing the plurality of GPIO ports based on the initialization indication includes:
reading port numbers of a plurality of GPIO ports, configuring initial states for the plurality of GPIO ports, wherein the initial states at least comprise initial level states, and initializing GPIO clocks to be used.
In some embodiments, the sequentially outputting the pulse signals of the corresponding level states by the first GPIO port and the second GPIO port based on the hard disk lighting indication and the GPIO protocol includes:
enabling the first GPIO port to output pulse signals of corresponding level states based on the hard disk lighting indication and the GPIO protocol, and enabling the first GPIO port to keep a specified amount of clock cycles;
and enabling the second GPIO port to output the pulse signal of the corresponding level state and keeping the pulse signal for a specified amount of clock cycles.
In some embodiments, the making the third GPIO port output the pulse signal of the corresponding level state according to the lamp state information in the hard disk lighting indication includes:
and enabling the third GPIO port to output a pulse signal with a corresponding level state according to the lamp state information in the hard disk lighting indication, and keeping the pulse signal with a specified amount of clock cycles.
In some embodiments, the level state is a high level state or a low level state, and the lamp state information is first state information corresponding to the high level state or second state information corresponding to the low level state.
In some embodiments, the hard disk lighting indication comprises a status indication of the respective lights of all hard disks, the status comprising an on state or an off state.
In some embodiments, the lights of each hard disk include at least an activity indicator light, a fault indicator light, and a location indicator light.
In another aspect of the present invention, a hard disk drive lighting system is further provided, including:
the device comprises a port signal module and a control module, wherein the port signal module is configured to determine a plurality of GPIO ports to be used based on an SGPIO bus protocol, and the GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, an SLoad signal and an SDataOut signal in the SGPIO bus;
the initialization module is configured to receive initialization instructions of a user on the GPIO ports and initialize the GPIO ports based on the initialization instructions;
the output module is configured to receive a hard disk lighting instruction sent by a user and enable the first GPIO port and the second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol; and
and the lighting module is configured with lamps for traversing all the hard disks, enables the third GPIO port to output pulse signals in corresponding level states according to the lamp state information in the hard disk lighting indication, and realizes lighting of the corresponding hard disk based on the pulse signals output by the third GPIO port.
In yet another aspect of the present invention, a computer-readable storage medium is also provided, storing computer program instructions, which when executed by a processor, implement the above-described method.
In yet another aspect of the present invention, a computer device is further provided, which includes a memory and a processor, the memory storing a computer program, which when executed by the processor performs the above method.
The invention has at least the following beneficial technical effects:
according to the invention, by using a plurality of GPIO ports and utilizing software programming under an embedded system, the GPIO ports output pulse signals which conform to an SGPIO protocol and have the same functions as SClock, SLoad and SdaOut signals, so that the same effect as that of the SGPIO signals output by configuring an SGPIO special controller register in the prior art is realized; by the software simulation mode, a system-level chip is not required to integrate an SGPIO special controller, the GPIO register is controlled by software programming of the bottom layer to realize the waveform and time sequence of the SGPIO, an easy-to-use API (application program interface) is provided for an upper-layer caller, the cost of the controller is reduced for the design of the system-level chip, and the number of ports is also reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a hard disk lighting method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an exemplary SGPIO signal relationship defined by SFF-8485 provided in accordance with an embodiment of the present invention;
fig. 3 is a schematic diagram of a software implementation framework of a GPIO-emulated SGPIO according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an Action _ Start related flow provided in FIG. 3;
FIG. 5 is a flowchart of Action _ Set correlation provided in FIG. 3;
fig. 6 is a schematic diagram of a hard disk lighting system according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a computer-readable storage medium for implementing a hard disk lighting method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a computer device for executing a hard disk lighting method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
In view of the above, a first aspect of the embodiments of the present invention provides an embodiment of a hard disk drive lighting method. Fig. 1 is a schematic diagram illustrating an embodiment of a hard disk lighting method according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, determining a plurality of GPIO ports to be used based on an SGPIO bus protocol, wherein the GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, an SLoad signal and an SDataOut signal in the SGPIO bus;
step S20, receiving initialization instructions of a user for a plurality of GPIO ports, and initializing the GPIO ports based on the initialization instructions;
step S30, receiving a hard disk lighting instruction sent by a user, and enabling a first GPIO port and a second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol;
and S40, traversing the lamps of all the hard disks, enabling the third GPIO port to output pulse signals in corresponding level states according to the lamp state information in the hard disk lighting indication, and lighting the corresponding hard disk based on the pulse signals output by the third GPIO port.
The embodiment of the invention uses a plurality of GPIO ports, and uses software programming to enable the GPIO ports to output pulse signals which conform to SGPIO protocol and realize the same functions as SClock, SLoad and SdaOut signals under an embedded system, thereby realizing the same effect as that of SGPIO signals output by configuring a special controller register of SGPIO in the prior art; by the software simulation mode, a system-level chip is not required to integrate an SGPIO special controller, the GPIO register is controlled by software programming of the bottom layer to realize the waveform and time sequence of the SGPIO, an easy-to-use API (application program interface) is provided for an upper-layer caller, the cost of the controller is reduced for the design of the system-level chip, and the number of ports is also reduced.
General-purpose input/output (GPIO), abbreviated as General-purpose input/output, functions similar to 8051P 0-P3, is provided with pins that can be freely used by a user through program control, and the pins can be used as General-purpose input (GPI), general-purpose output (GPO), or General-purpose input and output (GPIO) depending on practical considerations. For input, the high and low of the pin potential can be determined by reading a certain register; for output, a certain register can be written to enable the pin to output a high potential or a low potential; for other special functions, there are additional registers to control them.
SGPIO (Serial General-purpose input/output, serial GPIO Bus) is a Bus protocol specified by the SFF commission for communication between RAID (Redundant Arrays of Redundant Disks)/HBA (Host Bus Adapter) cards and hard disk backplanes.
FIG. 2 is a diagram illustrating exemplary SGPIO signal relationships defined by SFF-8485 (SFF is a Committee) according to an embodiment of the present invention. As shown in fig. 2, the signals of the SGPIO bus (Serial General-purpose input/output, serial GPIO bus, bus protocol for communication between RAID/HBA card and hard disk backplane specified by SFF commission) defined by SFF-8485 are as shown in table 1 below:
TABLE 1 SGPIO Signal definition
In some embodiments, the lights of each hard disk include at least an activity indicator light, a fault indicator light, and a location indicator light.
According to the protocol, the bitstream strings on SDataOut and SDataIn indicate the state of one Drive (hard disk) every 3 bits, and respectively indicate the states of activity/location/error indicator lights (active indicator light/location indicator light/fault indicator light). The bit stream string is restarted to transmit after the SLoad model is set to 1. The bitstream string contains at least the key information of 4 drives. The bitstream string does not need to be the same length every time, and can end at any position of 3 rd bit of Drive3, and a new round of bitstream transmission is restarted.
In some embodiments, initializing the plurality of GPIO ports based on the initialization indication includes: reading port numbers of the GPIO ports, configuring initial states for the GPIO ports, wherein the initial states at least comprise initial level states, and initializing GPIO clocks to be used.
In some embodiments, the sequentially outputting the pulse signals of the corresponding level states by the first GPIO port and the second GPIO port based on the hard disk lighting indication and the GPIO protocol includes: enabling a first GPIO port to output a pulse signal of a corresponding level state based on the hard disk lighting indication and the GPIO protocol, and keeping the pulse signal at a specified clock period; and enabling the second GPIO port to output the pulse signal of the corresponding level state and keeping the pulse signal for a specified amount of clock cycles.
In some embodiments, the making the third GPIO port output the pulse signal of the corresponding level state according to the lamp state information in the hard disk lighting indication includes: and enabling the third GPIO port to output a pulse signal with a corresponding level state according to the lamp state information in the hard disk lighting indication, and keeping the pulse signal with a specified amount of clock cycles.
In some embodiments, the level state is a high level state or a low level state, and the lamp state information is first state information corresponding to the high level state or second state information corresponding to the low level state.
In some embodiments, the hard disk lighting indication comprises a status indication of the respective lights of all hard disks, the status comprising an on state or an off state.
The following is a specific embodiment of the hard disk lighting method of the present invention:
fig. 3 is a schematic diagram of a software implementation framework of a GPIO analog SGPIO according to an embodiment of the present invention. As shown in fig. 3, in this embodiment, a SGPIO _ HAL (SGPIO hardware abstraction layer) is encapsulated on the basis of a GPIO _ DEV (GPIO device) driver layer of an embedded operating system, an API (Application Program Interface) function for implementing a hard disk lighting function is provided for an upper user, and an SGPIO basic signal waveform is implemented by calling the GPIO driver layer function inside the SGPIO basic signal waveform.
1. The API interface provided to the user call includes:
led _ Ctrl _ Init: initializing an Led _ Ctrl port;
Led_Ctrl_Action(uint8 drive_num,struct driveStatus*pdrive_status):
specifically, an interface for controlling the state of an LED lamp is implemented, drive _ num is the total number of drives (hard disks) that an SGPIO needs to control, pdrive _ status indicates the active/error/location LED state that each drive needs to display, and the interface is specifically defined as follows:
2. the SGPIO _ HAL layer interface comprises:
sgpio _ Port _ Init: initializing and configuring GPIO ports required to be used;
SClock _ High/Low: configuring a level high-low state for an SClock port;
SLoad _ High/Low: configuring a level high-low state for the SLoad port;
SDataOut _ High/Low: configuring a level high-low state for the SDataOut port;
action _ Set (structure driven status pdrive _ status): the LED status of a single drive is set, and the specific status is indicated by pdrive _ status (i.e., hard disk lighting indication).
Action _ Start: the configuration of the SClock and SLoad signals is done before Action _ Set.
3. The called GPIO _ DEV layer functions comprise:
RCC _ GPIO _ CLK _ INIT: initializing a used GPIO clock;
GPIO _ INIT: initializing parameters such as a port number, an input/output direction, a pull-up and pull-down type, a speed and the like of the used GPIO port;
GPIO _ OUT: and setting the high and low levels output by the appointed GPIO port, and realizing the setting by writing a register.
In the initialization process, the LED _ CTRL _ INIT mainly configures a GPIO port to be used, which is read from a configuration file or a global variable, in a default state (open drain output/pull-up/high speed/default level is low) through a GPIO _ OUT interface, and initializes a clock of the GPIO port to make the GPIO port in a ready state.
Fig. 4 is a flowchart related to the Action _ Start process provided in fig. 3. As shown in fig. 4, when the Led _ Ctrl _ Action is executed, the Action _ Start is called first, and the clock signal is pulled up according to the protocol, and the SLoad signal is pulled up at the same time, which indicates that the configuration is started. The HALF CYCLE length is HALF a clock CYCLE length, and may be configured to be 5us to 17ms according to a protocol.
Fig. 5 is a schematic diagram of an Action _ Set related process provided in fig. 3. As shown in fig. 5, after the Action _ Start process is completed, action _ Set (i.e., active _ Set) is respectively invoked for the drive _ num (the number of hard disks) drives to configure.
In this embodiment, on an embedded operating system, a GPIO bottom layer driver interface provided by a package operating system is used to implement software simulation of an SGPIO signal that meets waveform and timing requirements specified by the SFF-8485 protocol.
In a second aspect of the embodiments of the present invention, a hard disk lighting system is further provided. Fig. 6 is a schematic diagram illustrating an embodiment of a hard disk lighting system according to the present invention. As shown in fig. 6, a hard disk drive lighting system includes: the port signal module 10 is configured to determine, based on the SGPIO bus protocol, a plurality of GPIO ports to be used, where the plurality of GPIO ports include a first GPIO port, a second GPIO port, and a third GPIO port that correspond to an SClock signal, a SLoad signal, and an SDataOut signal in the SGPIO bus, respectively; the initialization module 20 is configured to receive an initialization instruction of a user for multiple GPIO ports, and initialize the multiple GPIO ports based on the initialization instruction; the output module 30 is configured to receive a hard disk lighting instruction sent by a user, and enable the first GPIO port and the second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol; and a lighting module 40, configured to traverse the lamps of all the hard disks, and enable the third GPIO port to output a pulse signal in a corresponding level state according to the lamp state information in the hard disk lighting indication, and implement lighting of the corresponding hard disk based on the pulse signal output by the third GPIO port.
According to the hard disk lighting system provided by the embodiment of the invention, by using a plurality of GPIO ports and utilizing software programming under an embedded system, the GPIO ports output pulse signals which conform to an SGPIO protocol and have the same functions as SClock, SLoad and SdaOut signals, so that the same effect as that of SGPIO signals output by configuring an SGPIO special controller register in the prior art is realized; by the software simulation mode, a system-level chip is not required to integrate an SGPIO special controller, the GPIO register is controlled by software programming of the bottom layer to realize the waveform and time sequence of the SGPIO, an easy-to-use API (application program interface) is provided for an upper-layer caller, the cost of the controller is reduced for the design of the system-level chip, and the number of ports is also reduced.
In a third aspect of the embodiment of the present invention, a computer-readable storage medium is further provided, and fig. 7 illustrates a schematic diagram of a computer-readable storage medium for implementing a hard disk lighting method according to an embodiment of the present invention. As shown in fig. 7, the computer-readable storage medium 3 stores computer program instructions 31. The computer program instructions 31 when executed by a processor implement the steps of:
determining a plurality of GPIO ports to be used based on an SGPIO bus protocol, wherein the plurality of GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, a SLoad signal and an SDataOut signal in the SGPIO bus;
receiving initialization instructions of a user for a plurality of GPIO ports, and initializing the plurality of GPIO ports based on the initialization instructions;
receiving a hard disk lighting instruction sent by a user, and enabling a first GPIO port and a second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and a GPIO protocol;
and traversing the lamps of all the hard disks, enabling the third GPIO port to output pulse signals of corresponding level states according to the lamp state information in the hard disk lighting indication, and lighting the corresponding hard disk based on the pulse signals output by the third GPIO port.
In some embodiments, initializing the plurality of GPIO ports based on the initialization indication includes: reading port numbers of the GPIO ports, configuring initial states for the GPIO ports, wherein the initial states at least comprise initial level states, and initializing GPIO clocks to be used.
In some embodiments, the sequentially outputting the pulse signals of the corresponding level states by the first GPIO port and the second GPIO port based on the hard disk lighting indication and the GPIO protocol includes: enabling the first GPIO port to output pulse signals of corresponding level states based on the hard disk lighting indication and the GPIO protocol, and enabling the first GPIO port to keep a specified amount of clock cycles; and enabling the second GPIO port to output the pulse signal of the corresponding level state and keeping the pulse signal for a specified amount of clock cycles.
In some embodiments, the causing the third GPIO port to output the pulse signal of the corresponding level state according to the lamp state information in the hard disk lighting indication includes: and enabling the third GPIO port to output a pulse signal with a corresponding level state according to the lamp state information in the hard disk lighting indication, and keeping the pulse signal with a specified amount of clock cycles.
In some embodiments, the level state is a high level state or a low level state, and the lamp state information is first state information corresponding to the high level state or second state information corresponding to the low level state.
In some embodiments, the hard disk lighting indication comprises a status indication of the respective lights of all hard disks, the status comprising an on state or an off state.
In some embodiments, the lights of each hard disk include at least an activity indicator light, a fault indicator light, and a location indicator light.
It is to be understood that all the embodiments, features and advantages set forth above with respect to the hard disk lighting method according to the present invention are equally applicable to the hard disk lighting system and the storage medium according to the present invention, without conflicting therewith.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device, including a memory 402 and a processor 401 as shown in fig. 8, where the memory 402 stores therein a computer program, and the computer program implements the method of any one of the above embodiments when executed by the processor 401.
Fig. 8 is a schematic diagram of a hardware structure of an embodiment of a computer device for executing a hard disk lighting method according to the present invention. Taking the computer device shown in fig. 8 as an example, the computer device includes a processor 401 and a memory 402, and may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the hard disk lighting system. The output device 404 may include a display device such as a display screen.
The memory 402, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the hard disk lighting method in the embodiment of the present application. The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of the hard disk lighting method, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing by running the nonvolatile software programs, instructions, and modules stored in the memory 402, that is, implements the hard disk lighting method of the above-described method embodiment.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The foregoing are exemplary embodiments of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the above embodiments of the present invention are merely for description, and do not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also combinations between technical features in the above embodiments or in different embodiments are possible, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A hard disk lighting method is characterized by comprising the following steps:
determining a plurality of GPIO ports to be used based on an SGPIO bus protocol, wherein the GPIO ports comprise a first GPIO port, a second GPIO port and a third GPIO port which respectively correspond to an SClock signal, a SLoad signal and an SDataOut signal in the SGPIO bus;
receiving initialization instructions of the plurality of GPIO ports by a user, and initializing the plurality of GPIO ports based on the initialization instructions;
receiving a hard disk lighting instruction sent by a user, and enabling the first GPIO port and the second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting instruction and the GPIO protocol;
traversing the lamps of all the hard disks, enabling the third GPIO port to output pulse signals of corresponding level states according to the lamp state information in the hard disk lighting indication, and lighting the corresponding hard disk based on the pulse signals output by the third GPIO port.
2. The method of claim 1, wherein initializing the plurality of GPIO ports based on the initialization indication comprises:
reading the port numbers of the GPIO ports, configuring initial states for the GPIO ports, wherein the initial states at least comprise initial level states, and initializing GPIO clocks to be used.
3. The method of claim 1, wherein causing the first GPIO port and the second GPIO port to sequentially output pulse signals of respective level states based on the hard disk drive power-on indication and the GPIO protocol comprises:
enabling the first GPIO port to output pulse signals of corresponding level states based on the hard disk lighting indication and the GPIO protocol, and enabling the first GPIO port to keep a specified amount of clock cycles;
and enabling the second GPIO port to output a pulse signal of a corresponding level state and keeping the pulse signal for a specified amount of clock cycles.
4. The method of claim 1, wherein the lamp status information in the hard disk drive power-on indication causing the third GPIO port to output a pulse signal of a corresponding level status comprises:
and enabling the third GPIO port to output a pulse signal of a corresponding level state according to the lamp state information in the hard disk lighting indication, and keeping the pulse signal at a specified clock period.
5. The method of claim 1, wherein the level state is a high level state or a low level state, and the lamp state information is first state information corresponding to the high level state or second state information corresponding to the low level state.
6. The method of claim 1, wherein the hard disk lighting indication comprises a status indication of a corresponding light of all hard disks, and the status comprises an on status or an off status.
7. The method of claim 1, wherein the lights of each hard disk include at least an active light, a fault light, and a location light.
8. A hard disk drive lighting system, comprising:
a port signal module configured to determine a plurality of GPIO ports to be used based on an SGPIO bus protocol, the plurality of GPIO ports including a first GPIO port, a second GPIO port, and a third GPIO port that correspond to an SClock signal, a SLoad signal, and an SDataOut signal in the SGPIO bus, respectively;
an initialization module configured to receive an initialization indication of a user for the plurality of GPIO ports and initialize the plurality of GPIO ports based on the initialization indication;
the output module is configured to receive a hard disk lighting indication sent by a user, and enable the first GPIO port and the second GPIO port to sequentially output pulse signals in corresponding level states based on the hard disk lighting indication and the GPIO protocol; and
and the lighting module is configured with lamps for traversing all the hard disks, enables the third GPIO port to output pulse signals in corresponding level states according to the lamp state information in the hard disk lighting indication, and realizes lighting of the corresponding hard disk based on the pulse signals output by the third GPIO port.
9. A computer-readable storage medium, characterized in that computer program instructions are stored which, when executed by a processor, implement the method according to any one of claims 1-7.
10. A computer arrangement comprising a memory and a processor, characterized in that a computer program is stored in the memory, which computer program, when being executed by the processor, is adapted to carry out the method of any one of the claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210912743.0A CN115223606A (en) | 2022-07-31 | 2022-07-31 | Hard disk lighting method, system, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210912743.0A CN115223606A (en) | 2022-07-31 | 2022-07-31 | Hard disk lighting method, system, storage medium and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115223606A true CN115223606A (en) | 2022-10-21 |
Family
ID=83615366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210912743.0A Pending CN115223606A (en) | 2022-07-31 | 2022-07-31 | Hard disk lighting method, system, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115223606A (en) |
-
2022
- 2022-07-31 CN CN202210912743.0A patent/CN115223606A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110634530B (en) | Chip testing system and method | |
JP6145023B2 (en) | Determination of clock mode of memory system | |
CN103092810B (en) | Processor, the method to processor programming and electronic equipment | |
CN1932789B (en) | Enhanced CCID circuits and systems utilizing USB and pci functions | |
US9405717B2 (en) | Memory device debugging on host platforms | |
US11113222B2 (en) | NAND switch | |
US11656770B2 (en) | Systems, methods, and apparatus for supporting multiple connectors on storage devices | |
CN113986796A (en) | PCIe link width dynamic configuration method, device, equipment and readable medium | |
CN107145465B (en) | Transmission control method, device and system for Serial Peripheral Interface (SPI) | |
US11126382B2 (en) | SD card-based high-speed data storage method | |
US8009475B2 (en) | Device selection circuit and method | |
CN105279051A (en) | Method and device for realizing multiplexing pin | |
CN115223606A (en) | Hard disk lighting method, system, storage medium and equipment | |
CN105630120B (en) | A kind of method and device of loading processing device hardware configuration word | |
TWI734150B (en) | Memory interface circuit, memory storage device and signal generation method | |
JP5138040B2 (en) | Integrated circuit | |
CN102446132B (en) | Method and device for performing board-level management by simulating local bus | |
CN107665281B (en) | FPGA-based processor simulation method | |
CN105068965A (en) | Inter-integrated circuit (I2C) bus based NAND Flash storage method and system | |
Li et al. | A SPI FLASH-based FPGA dynamic reconfiguration method | |
CN111858226B (en) | Electronic device carrying non-volatile memory solid state disk | |
CN112309445B (en) | Memory interface circuit, memory storage device and signal generation method | |
CN101916588A (en) | In-system-programming (ISP) module and method thereof for in-system-programming of FPAA | |
CN116893852A (en) | Configuration method, device and application of chip register value | |
CN117494623A (en) | Voice picking and playing method, device and equipment of heterogeneous SOC and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |