The invention discloses an
SGPIO (Serial
General Purpose Input / Output) unified coding method,
system and device, and the method is characterized in that the method comprises the steps: powering on a
server host, and completing the initialization of a CPLD (
Complex Programmable Logic Device) and an SATA / SAS controller; a register and a counter are established, and an
SGPIO input
Data buffer register, an output
Data buffer register and a
Clock counter of the
SGPIO are established in the CPLD; data frame
bit length calculation: the CPLD waits for receiving the SGPIO
signal, and calculates the
bit length of the input data frame after receiving the input SGPIO
signal; whether the
bit length of a data frame is equal to 12 bits or not is judged, if the length of the data frame is 12 bits,
Clock, Load and Data signals of input SGPIO are directly transmitted to an output IO pin in a transparent mode, and the SGPIO signals of an output interface are completely equal to the SGPIO signals input by the CPLD; and if the data frame length is greater than 12 bits, the
signal is processed, so that the SGPIO data of the output port is unified into 12-bit data. By unifying the SGPIO data of the output port into 12 bits, the problem that the bit lengths of SGPIO signals of different devices or interfaces are inconsistent is effectively solved, and the compatibility and
standardization degree of the
system are remarkably improved.