WO2015066842A1 - 通信方法、高速外围组件互连pcie芯片及pcie设备 - Google Patents

通信方法、高速外围组件互连pcie芯片及pcie设备 Download PDF

Info

Publication number
WO2015066842A1
WO2015066842A1 PCT/CN2013/086563 CN2013086563W WO2015066842A1 WO 2015066842 A1 WO2015066842 A1 WO 2015066842A1 CN 2013086563 W CN2013086563 W CN 2013086563W WO 2015066842 A1 WO2015066842 A1 WO 2015066842A1
Authority
WO
WIPO (PCT)
Prior art keywords
pcie
chip
pcie device
pcie chip
receiving
Prior art date
Application number
PCT/CN2013/086563
Other languages
English (en)
French (fr)
Inventor
张忠
李胜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201380002272.9A priority Critical patent/CN103797732B/zh
Priority to PCT/CN2013/086563 priority patent/WO2015066842A1/zh
Publication of WO2015066842A1 publication Critical patent/WO2015066842A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices

Definitions

  • the present invention relates to the field of optical communications, and in particular, to a communication method, a high-speed peripheral component interconnection PCIE chip, and a PCIE device. Background technique
  • PCIE Peripheral Component Interconnect Express
  • a Detect state is defined, which is the initial state after a link is reset or powered.
  • the detection state the detection portion in the transmitter in the PCIE chip is required to detect whether there is a receiver at the link receiving end.
  • the detection state if the transmitter detects the receiver, the link enters a polling state, wherein the polling state is the next state of the detected state. Beginning with the polling state, the transmitter begins a link negotiation with the receiver to establish a communication connection. If the transmitter does not detect the receiver in the detection state, the transmitter will repeat the detection every 12ms and cannot enter the polling state.
  • the transmitting PCIE device can detect the receiving PCIE device by sending a common mode voltage. Summary of the invention
  • the embodiment of the invention provides a communication method, a high-speed peripheral component interconnection PCIE chip and a PCIE device, which can implement normal negotiation between the PCIE device at the transmitting end and the PCIE device at the receiving end in the scenario of implementing optical cable transmission according to the PCIE.
  • an embodiment of the present invention provides a communication method, where the method is applied to a fast peripheral component interconnection PCIE system supporting optical cable transmission, where the PCIE system includes a transmitting end PCIE device, an optical transmission device, and a receiving end PCIE device.
  • the method includes: when the sending end PCIE device needs to establish a communication connection with the receiving end PCIE device, the sending end PCIE device determines that the detection status bit of the control register includes the first identifier, and the first identifier is used by Indicates that the sender PCIE is disabled.
  • the device performs load detection; the transmitting end PCIE device performs a link negotiation process with the receiving end PCIE device by using the optical transmission device to establish the communication connection with the receiving end PCIE device.
  • the method further includes: when a data transmission rate negotiated between the sending end PCIE device and the receiving end PCIE device in the link negotiation process reaches a threshold
  • the transmitting end PCIE device determines that the equalization indicator bit of the control register includes a second identifier, where the second identifier is used to indicate that the sending end PCIE device and the receiving end PCIE device are prohibited from negotiating signal parameters;
  • the transmitting PCIE device transmits data to the receiving PCIE device through the communication connection according to the configured signal parameter.
  • the method further includes: the transmitting PCIE device configuring the signal parameter during system initialization.
  • the signal parameter includes at least one of the following parameters: a transmit signal adjustment parameter or a receive signal Adjustment parameters.
  • an embodiment of the present invention provides a fast peripheral component interconnect PCIE chip, where the PCIE chip supports optical cable transmission, and the PCIE chip includes a link state machine and a transceiver, where the link state machine is used
  • the link state machine is used
  • the detection status bit of the control register includes a first identifier
  • the first identifier is used to prohibit the PCIE chip from performing load detection.
  • the transceiver is configured to perform a link negotiation process with the receiving end PCIE chip through an optical transmission device to establish the communication connection with the receiving end PCIE chip.
  • the link state machine is further configured to: when the data transmission rate negotiated by the PCIE chip and the receiving end PCIE chip in the link negotiation process reaches a threshold value And determining that the equalization indicator bit of the control register includes a second identifier, where the second identifier is used to indicate that the PCIE chip is prohibited from negotiating signal parameters with the receiving end PCIE chip.
  • the transceiver is further configured to transmit data to the receiving PCIE chip through the communication connection according to the configured signal parameter.
  • the PCIE chip further includes a manager, where the manager is configured to configure the signal parameter during system initialization.
  • the signal parameter includes at least one of the following parameters: a transmitter signal adjustment parameter or a receiving end Signal adjustment parameters.
  • an embodiment of the present invention provides a fast peripheral component interconnection PCIE device, including the PCIE chip according to the second aspect or the various possible implementation manners of the second aspect.
  • the transmitting end PCIE device when the transmitting end PCIE device needs to establish a communication connection with the receiving end PCIE device, the transmitting end PCIE device may not perform load detection according to the first identifier preset in the control register, and the link is The initial state is directed to the polling state so that the link negotiation with the receiving PCIE device can be made directly.
  • the method can avoid the problem that the PCIE device at the transmitting end cannot detect that the receiving PCIE device is in place and cannot negotiate with the receiving PCIE device due to the existence of the optical transmission device.
  • the method provided by the embodiment of the present invention enables the PCIE device at the transmitting end to establish a communication connection with the PCIE device at the receiving end.
  • FIG. 1 is a schematic diagram of a PCIE device communication connection according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an application scenario of a PCIE device according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a PCIE chip according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a communication method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of still another communication method according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention first interconnects the bus according to the fast peripheral component.
  • PCIE Peripheral Component Interconnect Express
  • the link state machine in the first PCIE chip 14 sequentially enters the control link: Detection state - Polling state - Configuration state - L0 a state, such that the first PCIE device 10 and the second receiving PCIE device 20 establish a communication connection normally, and during the L0 state, the first PCIE device 10 and the second PCIE device 20 can perform a processing layer packet (Transaction Layer Pocket, TLP), Data Link Layer Pocket (DLLP) and Physical Layer Pocket (PLP) transmission and reception.
  • processing layer packet Transaction Layer Pocket, TLP
  • DLLP Data Link Layer Pocket
  • PLP Physical Layer Pocket
  • physical layer data packets are also called ordered sets. It can be understood that the first PCIE device 10 can also function as a receiving PCIE device, and the second PCIE device 20 can also function as a transmitting PCIE device.
  • the first PCIE chip 14 In the process of establishing a communication connection between the first PCIE device 10 and the second PCIE device 20, the first PCIE chip 14 first needs to enter a detection state to detect whether the second PCIE chip 24 exists at the link receiving end.
  • the process in which the transmitter detects whether the receiver is present at the link receiving end in the detection state may also be referred to as performing load detection.
  • the following is a brief introduction to the process of load detection.
  • the two differential lines of the transmitter 2082 of the first PCIE chip 14 are respectively connected to the two differential lines of the receiver 2084 of the second PCIE chip 24 via the coupling capacitor C TX .
  • the transmitter 2082 in the first PCIE chip 14 drives a common mode voltage different from the initial voltage from its two terminals D+ and D-.
  • the initial voltage is referred to as a first voltage
  • a common mode voltage that is different from the initial voltage driven by the transmitter in the detection state is referred to as a second voltage.
  • the initial voltage may be V DD (3.6V), ground (Ground) or any common mode voltage between V DD and ground (Ground).
  • the second voltage is a common mode voltage different from the initial voltage.
  • the coupling capacitor C TX In the process from the first voltage to the second voltage, if the transmitter 2082 is connected to the receiver 2084, the coupling capacitor C TX , the parasitic capacitance on the differential line of the transmitter 2082, and the termination resistor ZRX at the receiving end can form an RC. Charging circuit. Due to the large coupling capacitance C TX , the RC charging circuit has a longer charging time. If the transmitter 2082 is not connected to the receiver 2084, the coupling capacitor C TX does not function and the charging time is short. Therefore, the first PCIE chip 14 can determine whether to connect with the second PCIE chip 24 according to the length of the charging time.
  • the first PCIE chip 14 can It is determined whether the second PCIE chip 24 is in position according to the length of the charging time. According to the PCIE specification, when the first PCIE chip 14 detects that the second PCIE chip 24 is in place, it enters a polling state and starts link negotiation. Through the link negotiation process, the communication link between the first PCIE chip 14 and the second PCIE chip 24 can be properly connected (Link up).
  • a first optical module 12 is connected between the first PCIE device 10 and the second PCIE device 20. And a second optical module 22.
  • the first PCIE device 10 is connected to the first optical module 12 by a cable.
  • the second optical module 22 is connected to the second PCIE device 20 by a cable.
  • the first optical module 12 and the second optical module 22 are connected by an optical fiber 30.
  • the first optical module 12 and the second optical module 22 are used for converting electrical signals and optical signals.
  • the first PCIE device 10 is the transmitting PCIE device
  • the second PCIE device 20 is the receiving PCIE device.
  • the first optical module 12 converts the electrical signal sent by the first PCIE chip 14 into an optical signal and transmits it through the optical fiber 30 to the second optical module 22 connected to the second communication node 20.
  • the electrical signal is transmitted to the second PCIE chip 24 in the second PCIE device 20, so that the first PCIE device 10 and the second PCIE device 20 can be implemented.
  • Communication It can be understood that, since the first optical module 12 and the second optical module 22 are connected by the optical fiber 30, even if the distance between the first PCIE device 10 and the second PCIE device 20 is long, the mutual completion can be completed through the optical fiber 30. Communication between.
  • the first PCIE device 10 and the first optical module 12 can be independently configured.
  • the first PCIE device 10 can be a single board, and the first optical module 12 can be connected to the edge of the first PCIE device 10 through a corresponding connector.
  • the first PCIE device 10 and the first optical module 12 can also be integrated in In the same communication device, for example, if the first PCIE device 10 is a single board, the first optical module 12 can also be located in the first PCIE device 10 through a corresponding connector.
  • the second PCIE device 20 and the second optical module 22 can be independently configured, and the second PCIE device 20 and the second optical module 22 can also be integrated in the same communication device. There is no limit here.
  • first PCIE device 10 and the second PCIE device 20 may be located in different devices or may be located in the same device.
  • first PCIE device 10 and the second PCIE device 20 may be located in different hosts or may be located in the same host. There is no limit here.
  • the first optical module 12, the optical fiber 30, and the second optical module 22 may be collectively referred to as an optical transmission device, for implementing between the first PCIE device 10 and the second PCIE device 20.
  • Signal transmission In the process of transmitting signals by an optical transmission device, the optical transmission device can be used to effect conversion between an electrical signal and an optical signal. How the optical transmission device realizes signal transmission is similar to the prior art. Therefore, in the embodiment of the present invention, how the optical transmission device realizes the conversion and transmission of the optical signal and the electrical signal will not be described in detail.
  • the first PCIE device 10 and the second PCIE device 20 referred to in the embodiments of the present invention do not include optical transmission devices such as optical modules.
  • the first PCIE device 10 and the second PCIE device 20 are connected by optical transmission devices such as a first optical module 12, an optical fiber 30, and a second optical module 22.
  • optical transmission devices such as a first optical module 12, an optical fiber 30, and a second optical module 22.
  • the first PCIE chip 10 cannot implement in-position detection of the second PCIE chip 24 according to the PCIE standard.
  • the link cannot be in the polling state from the detection state, and the first PCIE device 10 cannot perform the link negotiation on the second PCIE device 20, so that the link cannot be normally connected.
  • FIG. 3 is a schematic structural diagram of a PCIE chip according to an embodiment of the present invention.
  • the PCIE chip provided in the embodiment of the present invention may be applied to a scenario in which optical cable transmission is implemented according to PCIE.
  • the PCIE chip 20 shown in FIG. 3 may be the first PCIE chip 14 and the second PCIE chip 24 shown in FIG. 2.
  • the PCIE chip 20 can include: a communication interface 202, a link state machine 204, a manager 206, and a transceiver 208.
  • the transceiver 208 includes a transmitter 2082 and a receiver 2084.
  • the manager 206 includes a configuration module 2061 and a monitoring circuit 2062.
  • the PCIE chip 20 can be connected to the optical module through the port connector 212.
  • the PCIE chip 20 is the first PCIE chip 14 shown in FIG. 2, the first PCIE chip 14 may The first optical module 12 is connected through the port connector 212. among them:
  • the communication interface 202 may specifically be an interface between the physical layer and the upper layer of the PCIE chip 20.
  • the upper layer refers to the upper layer of the physical layer of the PCIE chip, and may include a data link layer or a transaction layer.
  • the modules of the physical layer can communicate with the modules of the upper layer through the communication interface 202.
  • the PCIE chip transmits data
  • the upper layer may transmit the data to be transmitted to the transmitter 210 of the physical layer through the communication interface 202, and the data is transmitted by the transmitter 210.
  • the receiver 212 can transmit the received data to the upper layer for processing via the communication interface 202.
  • the link state machine 204 which may also be referred to as a Link Training and Status State Machine (LTSSM), is a sub-portion of the physical layer of the PCIE chip 20, and is mainly used for link initialization. And the orientation process, which controls the link state of the link and the power management state of the link, so that the link can transmit data packets normally.
  • the link state machine 204 can receive the link information of the upper layer through the communication interface 202, and control the state of the link according to the link information transmitted by the upper layer. Link state machine 204 can also determine the status of the link by monitoring the transmission of transmitter 2082.
  • Link state machine 204 can detect that transmitter 2082 is not transmitting data, it can be determined that the link needs to enter an Electrical Idle (EI) state. Link state machine 204 can also determine the link status based on the control registers in configuration module 2061.
  • EI Electrical Idle
  • the manager 206 is used to implement management functions for the PCIE chip.
  • the manager 206 can include a configuration module 2061 and a monitoring circuit 2062.
  • the configuration module 2061 may specifically include various registers such as a control register, a status register, and the like.
  • the control register is used to control the link status and link implementation functions.
  • link state machine 204 can orient the link state according to a control register in configuration module 2061, and control the link to enter a detection state, a polling state, or an L0 state, etc., according to a control register.
  • the status register can include a link status register, which can be used to display the link status.
  • the status register may also include a status register for indicating the bus status of the PCIE chip 20 itself, for example, a status register for indicating the status of the cable in place.
  • the cable may include a cable or a fiber optic cable.
  • the link state machine 204 can implement control of the function or determination of the link condition based on the value of the corresponding bit of each register in the configuration module 2061.
  • link state machine 204 can obtain status information for the link or learn about the presence of the cable by reading the value of the corresponding bit in the register. It can be understood that there can be multiple control registers or status registers.
  • the monitoring circuit 2062 is used to monitor the in-position state of the cable and configure the corresponding registers in the configuration module 2061. In practical applications, the monitoring circuit 2062 can set the link state by setting corresponding bits in the respective registers in the configuration module 2061.
  • the monitoring circuit 2062 can also determine whether the port connector 212 is connected to the cable by acquiring the cable in-position signal of the port connector 212. Generally, when the port connector 212 is not connected to the cable, the cable in-position signal is at a high level, and when the port connector 212 is connected to the cable, the in-position signal changes from a high level to a low level. The monitoring circuit 2062 can determine whether the port connector 212 is connected to the cable by monitoring the change in the bit signal of the cable. When the monitoring circuit 2062 determines that the cable in-position signal is valid, the monitoring circuit 2062 can further read the non-volatile storage information inside the cable through the out-of-band management channel to obtain the cable type as a cable or an optical cable.
  • the cable in-position signal is valid.
  • the port connector 212 is connected with a cable.
  • the non-volatile storage information inside the cable includes information such as cable type and cable length.
  • the PCIE chip 20 can further obtain the cable type information of the port connector 212 according to the outband management channel when the cable in-position signal is valid, to obtain the port connector.
  • the 212 is connected to the fiber optic cable.
  • the optical cable here refers to the optical cable connected to the optical module.
  • the PCIE chip 20 can obtain the optical connector connected to the port connector 212 according to the outband management channel.
  • the out-of-band management channel may include an Inter-Integrated Circuit (I2C) channel.
  • I2C Inter-Integrated Circuit
  • the transceiver 208 is configured to perform a negotiation process with the peer PCIE device and implement data transmission with the peer PCIE device.
  • the negotiation process is implemented by the transmitter 2082 sending a negotiation signal to the peer PCIE device, and receiving the response signal of the peer PCIE device by the receiver 2084.
  • the data transmission includes transmitting, by the transmitter 2082, the data transmitted by the upper layer through the communication interface 202 to the peer PCIE device, and further comprising receiving, by the receiver 2084, the data sent by the peer PCIE device.
  • the transceiver 208 can perform a link negotiation process with the receiving PCIE device or send data to the peer PCIE device under the control of the link state machine 204.
  • Transceiver 208 may specifically include a transmitter 2082 and a receiver 2084.
  • Transmitter 2082 is used to transmit information.
  • the transmitter 2082 of the PCIE chip 20 may specifically be a transmission driving circuit.
  • the information transmitted by the transmitter 2082 is transmitted as an electrical signal.
  • the transmitter 2082 can convert the data to be transmitted transmitted by the upper layer through the communication interface 202 into an electrical pulse waveform for transmission.
  • the transmitter 2082 is typically coupled to the optical module via a port connector 212.
  • Transmitter 2082 can pass data through port connector 212 in the form of an electrical signal
  • the electrical signal sent by the transmitter 2082 can be sent to the optical module through the optical module and then sent to the optical module at the receiving end.
  • the data to be transmitted may be encoded, serially converted, or de-emphasized, and then the processed data is sent out through the transmitter 2082.
  • the parallel-to-serial conversion refers to converting parallel data transmitted by the upper layer into serial data.
  • De-emphasis means that the transmitting PCIE chip transmits a signal by increasing the amplitude of the high-frequency component in the signal in advance to compensate for the attenuation of the high-frequency component of the transmission line.
  • the specific value of the amplitude of the high-frequency component in the signal can be determined according to the signal adjustment parameter (reset).
  • PCIE chip and the receiving end PCIE chip usually use de-emphasis and equalization techniques.
  • a de-emphasis of -3.5dB was used in PCIE 1.0, and _3.5dB and -6dB de-emphasis were used in PCIE2.0.
  • PCIE 3.0 due to the higher signal rate, a more complex 2nd-order de-emphasis technique is used, except for the high-frequency component of the signal, which is sent to the high-frequency component (De-emphasis).
  • the bit signal is also transmitted in increasing amplitude. This increased amplitude is usually called the Preshoot signal.
  • PCIE 3.0 a number of different combinations of Preshoot and De_emphasis are specified.
  • the combination of Preshoot and De-emphasis is referred to as a signal adjustment parameter (reset).
  • the Preset encoding of the sender can be as shown in Table 1:
  • the receiver 2084 is configured to receive information sent by the transmitting end PCIE chip through the optical transmission device when the PCIE chip 20 is used as the receiving end PCIE chip. It will be appreciated that the receiver 2084 can also typically be a receiving circuit. It will be appreciated that in a PCIE system supporting optical signal transmission, the receiver 2084 is typically coupled to the receiving optical module via a port connector 212. The receiving end optical module can convert the received optical signal into an electrical signal, and after corresponding processing, transmit to the receiver 2084. For example, in the PCIE system of FIG. 2, when the first PCIE chip 14 transmits data to the second PCIE chip 24, the receiver 2084 of the second PCIE chip 24 can receive the transmitter 2082 of the first PCIE chip 14 through the light. The data transmitted by the transmitting device.
  • the optical transmission device includes a first optical module 12, an optical fiber 30, and a second optical module 22.
  • the data received by the receiver 2084 may be subjected to serial-to-parallel conversion, decoding, or equalization processing, and the processed data is transmitted to the upper layer through the communication interface 202 for corresponding processing.
  • serial-to-parallel conversion refers to converting received serial data into parallel data.
  • Equalization means that an equalization circuit is added inside the PCIE chip at the receiving end, and the high-frequency component in the received signal is raised by the equalization circuit to further compensate the loss of the line. The value of the signal being raised can be determined according to the signal adjustment parameter (Preset) of the receiving end.
  • the Receiver Preset code can be as shown in Table 2 below:
  • FIG. 4 is a flowchart of a method for a communication method according to an embodiment of the present invention.
  • the method described in FIG. 4 can be applied to the communication system shown in FIG. 2, which can be performed by the PCIE chip 20 shown in FIG.
  • the embodiment of the present invention will describe the communication method from the perspective of the PCIE chip at the transmitting end.
  • the first PCIE chip 14 when the first PCIE chip 14 is a transmitting PCIE chip, the second PCIE chip 24 is a receiving PCIE chip.
  • the first PCIE chip 14 can serve as either a transmitting PCIE chip or a receiving PCIE chip.
  • the second PCIE chip 24 can be used as a transmitting PCIE chip.
  • the embodiment of the present invention is described by taking the first PCIE chip 14 as shown in FIG. 2 as the transmitting PCIE chip and the second PCIE chip 24 as the receiving PCIE chip.
  • the method shown in Fig. 4 will be described below with reference to Figs. 2 and 3. As shown in FIG. 4, the method includes:
  • step 405 when the transmitting end PC IE device needs to establish a communication connection with the receiving end PC IE device, the sending end PC IE device determines that the status detecting bit in the control register includes the first identifier, the first identifier It is used to indicate that the sending end PC IE device is prohibited from performing load detection.
  • the first PC IE chip 14 after the first PC IE chip 14 is powered on, restored, or exits the basic reset or Hot reset, the first PC IE chip 14 needs to establish a communication connection with the second PC IE chip 24.
  • the first state of the link entry should be the De tec state.
  • the first PC IE chip 14 will perform load detection to detect the presence of a device connected to the remote end of the link to establish a communication connection with the second PC IE chip 24 at the far end of the link.
  • the second PC IE chip 24 at the far end of the link is the receiving PC IE device.
  • step 405 when the first PC IE chip 14 needs to be connected to the second PC
  • the IE chip 24 establishes a communication connection, if the link state in the first PC IE chip 14
  • the machine 204 determines that the status detection bit in the control register includes the first identifier, and the link state machine 204 in the first PCIE chip 14 and the chip 14 can read the value of the control register in the configuration module 2061, and determine the detection in the control register.
  • the status bit includes the first identifier, where the first identifier is used to indicate that the sending end PCIE device is prohibited from performing load detection. In another expression, the first identifier is used to identify that the detection status bit is invalid.
  • the control register may contain a plurality of bit (bi t ) bits, different bit fields may be used to indicate different link states, and different flags may be used to indicate whether the status bits are valid.
  • the link status may include: a Detect state, a polling state, a configuration state, a recovery (Recovery), or a link state specified by the PCIE standard.
  • a valid status bit indicates that the link status needs to be entered, and an invalid status bit indicates that entry into the link status is prohibited.
  • the 8th bit in the controller register can be used to indicate the detection status of the link. When the value of the bit is 1, it indicates that the detection status bit is valid. When the value of the bit is 0, it indicates the detection status bit. invalid.
  • the status bits in the control register are pre-configurable.
  • the monitoring circuit 2062 can configure the control registers in the configuration module 2061 according to the configuration file.
  • the monitoring circuit 2062 can also configure the control registers based on the pin level of the configuration chip. In a specific configuration, the monitoring circuit 2062 can set the value of the corresponding status bit in the control register according to the configuration file or the pin level of the configuration chip.
  • the detection status bit in the control register can be set to be invalid in advance, so that the first PCIE chip 14 does not perform load detection.
  • the detection status bit in the control register can be set to 0.
  • step 410 the transmitting end PCIE device performs a negotiation process with the receiving end PCIE device through the optical transmission device to establish the communication connection with the receiving PCIE device. Since in step 405, link state machine 204 determines that the control register contains the first identity, therefore, the link is The state machine can direct the link state to the polling state according to the first identity, wherein the polling state is the next state of the detected state. Starting from the polling state, the first PCIE chip 14 will perform link negotiation with the second PCIE chip 24 through the optical transmission device such as the first optical module 12, the optical fiber 30, and the second optical module 22.
  • the transmitter 2082 in the first PCIE chip 14 can transmit the TS1 ordered set and the TS2 ordered set to the second PCIE chip 24 through the optical transmission device and respond to the received by the receiver 2084.
  • the TS1 ordered set and the TS2 ordered set sent by the second PCIE chip 24.
  • the first PCIE chip 14 and the second PCIE chip 24 notify the peer to support the higher rate by exchanging the TS1 ordered set and the TS2 ordered set and rate field, and the data rate on all channels. Change to the highest rate supported at both ends of the link.
  • the TS1 ordered set and the TS2 ordered set belong to the physical layer data packet (Phys ica l Layer Pocket, PLP).
  • the link state machine 204 directs the link to the configuration state to perform the negotiation process in the configuration state.
  • the first PCIE chip 14 can negotiate the link and channel with the second PCIE chip 24. For example, the link number, channel number, channel bandwidth, etc. can be negotiated. Through the above negotiation process, a communication connection between the first PCIE chip 14 and the second PCIE chip 24 can be established.
  • the first PCIE chip 14 when the first PCIE chip 14 needs to establish a communication connection with the second PCIE chip 24, the first PCIE chip 14 can be based on the control register.
  • the first identifier set in advance does not perform load detection, and the initial state of the link is directed to a polling state so that link negotiation with the second PCIE chip 24 can be directly performed.
  • the method shown in FIG. 4 can avoid the problem that the first PCIE chip 14 cannot detect that the second PCIE chip is in place and cannot negotiate with the second PCIE chip 14 due to the existence of the optical transmission device.
  • the method of the embodiment shown in FIG. 4 enables the first PCIE chip 14 and the second PCIE chip 24 to establish a communication connection smoothly.
  • FIG. 5 is a flowchart of still another method for communication according to an embodiment of the present invention.
  • the method can be applied to a PCIE system that implements fiber optic cable transmission according to PCIE, and the method can be performed by a PCIE device including a PCIE chip.
  • a PCIE device including a PCIE chip For example, it may be performed by the first PCIE device 10 or the second PCIE device 20 shown in FIG. 2, or may be performed by the first PCIE chip 14 or the second PCIE chip 24 shown in FIG. 2, or may be performed by FIG. 3.
  • the illustrated PCIE chip 20 is implemented.
  • FIG. 5 still takes the first PCIE chip 14 shown in FIG. 2 as an example. The method shown in Fig. 5 will be described in detail below with reference to Figs. 2 and 3.
  • the method can include: In step 500, the first PCIE chip 14 is powered up.
  • FIG. 5 is an example of establishing a communication connection with the second PCIE chip 24 after the first PCIE chip 14 is powered on. It can be understood that the first PCIE chip 14 needs to establish a communication connection with the second PCIE chip after the power-on initialization, and can re-establish a communication connection with the second PCIE chip after receiving the reset command or exiting the recovery state. .
  • the reset includes a basic reset (cold reset or warm reset) and a hot reset.
  • a Hot Reset is a reset of an in-band transfer triggered by software.
  • the recovery state is also referred to as the Re-Training state. According to the PCIE, when the link exits the recovery state, it can enter the detection state, so that the transmitting PCIE chip and the receiving PCIE chip re-establish a communication connection.
  • the control register and the status register in the first PCIE chip 14 can also be initially configured.
  • the monitoring circuit 2062 in the first PCIE chip 14 may first determine the type of the cable connected to the port connector 212, and then load different configuration files according to the corresponding cable type to implement the control register and the status register. Configuration. In a specific configuration, the monitoring circuit 2062 can set the value of the corresponding status bit in the control register according to the configuration file or the pin level of the configuration chip.
  • the monitoring circuit 2062 in the first PCIE chip 14 can configure the control register in the module 2061 according to a preset configuration file or a pin level of the configuration chip. Configure it.
  • the monitoring circuit 2062 can set the detection status bit in the control register of the first PCIE chip 14 to the first identification and the equalization indication bit in the control register to the second identification.
  • step 505 the first PCIE chip 14 determines whether the detection status bit of the control register contains the first identifier. If the first identifier is not included in the control register of the first PCIE chip, the method proceeds to step 510. Otherwise, the method enters Step 520.
  • the link state machine 204 in the first PCIE chip 14 can determine whether the detection status bit in the control register in the configuration module 2061 includes the first identifier. The first identifier is used to indicate that the entry detection state is prohibited. It can be understood that the detection status bit in the control register is not limited to one bit and may be a bit.
  • the first identifier may be represented by 0, may also be represented by 1, or may be represented by other identifiers such as 01 or 00. There is no limit here.
  • the link state machine 204 in the first PCIE chip 14 detects that the detection status bit in the control register contains the first identifier in step 505
  • the link state machine 204 may The initial state is directly directed to the polling state, and link negotiation with the second PCIE chip 24 begins.
  • the polling status is the next state of the detection state.
  • the first PCIE chip 14 performs load detection.
  • the link state machine 204 in the first PCIE chip 14 may connect the link according to the PCIE standard. Directed to the detection state, load detection is performed to detect whether the second PCIE chip 24 is connected to the far end of the link. In the process of performing load detection by the first PCIE chip 14, the first PCIE chip 14 can determine whether the second PCIE chip 24 is in position according to the length of the charging time using the method described in FIG. The first PCIE chip 14 may also use other methods to detect whether the second PCIE chip 24 is in place, which is not limited herein.
  • step 515 the first PCIE chip 14 determines whether the second PCIE chip 24 is detected. If the second PCIE chip 24 is detected, the method proceeds to step 520, otherwise returns to step 510 to continue performing load detection. In a practical application, when the first PCIE chip 14 detects the second PCIE chip 24, the link state machine 204 in the first PCIE chip 14 directs the link state to the polling state, and the method may proceed to step 520.
  • the first PCIE chip 14 negotiates with the second PCIE chip 24 via the optical transmission device.
  • the transmitting PCIE chip starts to negotiate with the receiving PCIE chip.
  • the negotiation process in the embodiment of the present invention includes the negotiation process of the link in the polling state and the configuration state, and the process is similar to the negotiation process specified in the PCIE standard. For details, refer to the description of step 410 shown in FIG. No longer.
  • the first PCIE chip 14 determines whether a communication connection is established with the second PCIE chip 24. If no communication connection is established with the second PCIE chip 24, the process returns to step 505. Otherwise, the method proceeds to step 530.
  • the link state machine 204 in the first PCIE chip 14 Direct the link to the L0 working state. In the L0 operating state, the transmitter 2082 of the first PCIE chip 14 can transmit data to the second PCIE chip 24 through the optical transmission device in accordance with the communication connection.
  • the data transmitted by the first PCIE chip 14 to the second PCIE chip 24 may be data transmitted by the upper layer to the physical layer through the communication interface 202.
  • the data transmitted by the upper layer to the physical layer through the communication interface 202 includes a Transaction Layer Pocket (TLP) and a Data Link Layer (DLLP).
  • TLP Transaction Layer Pocket
  • DLLP Data Link Layer
  • an abnormal situation such as the second PCIE chip 24 not being located may also cause the link negotiation to fail, so that the first PCIE chip 14 and the second PCIE chip cannot establish a communication connection.
  • the process may return to step 505 to determine whether it is necessary to detect the second PCIE chip 24 . Whether the second PCIE chip 24 is in place or in place to initiate the negotiation process with the second PCIE chip 24 is again in place.
  • step 525 if the link negotiation fails, other processing manners such as directly exiting the method flow or returning to the execution step 520 may be used, which is not limited in the embodiment of the present invention.
  • the first PCIE chip 14 determines whether the negotiated data transmission rate has reached a threshold. If the negotiated data transmission rate does not reach a threshold, the method proceeds to step 535. If the negotiated data transmission rate reaches a threshold, the method proceeds to step 540. According to the description of step 410 in FIG. 4, during the polling state, the first PCIE chip 14 and the second PCIE chip 24 can notify the peer to the higher bit by exchanging the TS1 ordered set and the TS2 ordered set and rate field. The rate is supported and the data rate on all channels is changed to the highest rate supported at both ends of the link.
  • the first PCIE chip 14 can determine whether the negotiated data transmission rate reaches a threshold, wherein the threshold value can include a data transmission rate supported by PCIE 3.0, such as 8. OGbps. It can be understood that the data transmission rate negotiated by the first PCIE chip 14 and the second PCIE chip 24 is the highest data transmission rate supported by the first PCIE chip 14 and the second PCIE chip 24.
  • the first PCIE chip 14 transmits data to the second PCIE chip 24 at the negotiated data transfer rate. For example, if the negotiated data transmission rate is 5. OGbps, the transmitter 2082 of the first PCIE chip 14 can transmit the TLP or DLLP to the second PCIE chip 24 at a data transmission rate of 5. OGbps.
  • the data sent by the first PCIE chip 14 may include TLP and DLLP.
  • step 540 the first PCIE chip 14 determines whether the equalization indicator bit in the control register contains the second flag. If the equalization indicator bit in the control register contains the second flag, the process proceeds to step 545, otherwise the method proceeds to step 550.
  • various identification bits such as a detection status bit, a polling status bit, a configuration status bit, or an equalization indicator bit may be indicated by different bits.
  • the equalization indicator is used to control whether the link performs an Equaliarization procedure. In the equalization procedure, the first PCIE chip 14 needs to negotiate signal parameters with the second PCIE chip 24 for improving the quality of the communication signals of the first PCIE chip 14 and the second PCIE chip 24.
  • the signal parameters in the embodiment of the present invention include a signal adjustment parameter (Preset) of the transmitting end and a preset of the receiving end.
  • Preset a signal adjustment parameter of the transmitting end and a preset of the receiving end.
  • the PCIE device at the transmitting end and the PCIE device at the receiving end usually provide a variety of Presets, and the PCIE device at the transmitting end and the PCIE device at the receiving end can find the optimal Preset in the equalization program. value.
  • the second identifier is used to indicate that the sending end PCIE device and the receiving end PCIE device are prohibited from negotiating signal parameters.
  • the second identifier is used to prohibit the sending end PCIE PCIE terminal device and the receiving device performs equalizing process (Equa l izat ion procedure) 0
  • the embodiment of the present invention indicating bit equalization embodiment is not limited to one bit, may be a bit period.
  • the second identifier may be represented by 0, or may be represented by 1 or may be represented by other identifiers such as 01 or 11, and is not limited herein. A description of the equalization procedure and signal parameters can be found in the related description of FIG.
  • the first PCIE chip 14 transmits data to the second PCIE chip 24 through the communication connection in accordance with the configured signal parameters.
  • the first PCIE chip 14 and the second PCIE chip 24 are connected by an optical transmission device such as an optical module. Due to the limiting characteristics of the optical module, different amplitude signals above or below the decision threshold may be output according to the same amplitude signal, which may result in the loss of Preset information in the signal sent by the PCIE chip at the transmitting end, and the PCIE chip at the receiving end. The Preset information of the signal is not seen, and the Preset value negotiated between the PCIE chip and the receiving PCIE chip may not be optimal in the equalization procedure.
  • the signal parameters may be configured for the first PCIE chip 14 according to the configuration file during the initial initialization of the first PCIE chip 14, wherein the configured signal parameters include Preset.
  • the configured signal parameters may specifically include a sender Preset and a receiver Preset.
  • the first PCIE chip 14 can transmit data to the second PCIE chip 14 according to the configured transmitter Preset.
  • the received signal can be equalized according to the configured receiving end Preset. In this way, the quality of the communication signal between the first PCIE chip 14 and the second PCIE chip 24 is improved.
  • the first PCIE chip 14 negotiates signal parameters with the second PCIE chip. Specifically, when the first PCIE chip 14 determines in step 540 that the second identifier is not included in the control register, the link may be controlled to enter an equalization procedure to negotiate a signal parameter with the second PCIE chip.
  • the first PCIE chip 14 transmits data to the second PCIE chip 24 through the communication connection in accordance with the negotiated signal parameters.
  • the first PCIE chip 14 can transmit data to the second PCIE chip according to the signal parameters negotiated in step 550.
  • the data transmitted by the first PCIE chip 14 may include TLP and DLLP.
  • the first PCIE chip 14 can directly transmit data to the second PCIE chip 24 according to the configured signal adjustment parameters, thereby improving the quality of the signal transmission.
  • the program includes computer operating instructions that can be stored in a computer readable storage medium.
  • the storage medium mentioned above may be a random access memory (RAM), a magnetic disk, a hard disk, an optical disk, a solid state disk (SSD), or a non-volatile memory.
  • RAM random access memory
  • SSD solid state disk
  • a non-transitory machine readable medium that can store program code is not limited herein.

Abstract

本发明实施例提供了一种通信方法、高速外围组件互连PCIE芯片及PCIE设备。改方法应用于支持光缆传输的快速外设组件互联PCIE系统中。所述PCIE系统包括发送端PCIE设备、光传输器件以及接收端PCIE设备。该方法包括:当所述发送端PCIE设备需要与所述接收端PCIE设备建立通信连接时,所述发送端PCIE设备确定控制寄存器的检测状态位包含第一标识,所述第一标识用于表示禁止所述发送端PCIE设备执行负载检测;所述发送端PCIE设备通过所述光传输器件执行与所述接收端PCIE设备的链路协商流程,以与所述接收端PCIE设备建立所述通信连接。在支持光缆传输的应用场景中,本发明实施例提供的方法能够使发送端PCIE设备与接收端PCIE设备顺利建立通信连接。

Description

通信方法、 高速外围组件互连 PCIE芯片及 PCIE设备 技术领域
本发明涉及光通信领域, 特别涉及一种通信方法、 高速外围组件互连 PCIE 芯片及 PCIE设备。 背景技术
高速夕卜围组件互连 (Peripheral Component Interconnect Express , PCIE)标准 是由英特尔公司提出的新一代总线技术。 PCIE技术广泛应用于个人电脑、 服务 器和数据中心等 PCIE设备中。 由于电性传输距离短, 并且损耗较大, 极大的限 制了 PCIE设备的应用。 由于光缆传输具有损耗小且传输距离远的优点, 因此, PCIE标准正在被逐步应用于光缆传输的应用场景中。
在 PICE标准中, 定义了一种检测状态(Detect state ), 该状态是指链路复位 或加电后的初始状态。 在检测状态中, 要求 PCIE芯片中的发送器中的检测部分 检测链路接收端是否存在一个接收器。 在检测状态中, 若发送器检测到接收器, 则该链路进入轮询状态, 其中, 轮询状态是检测状态的下一个状态。 自轮询状 态开始, 发送器开始与接收器进行链路协商, 以建立通信连接。 若在检测状态 中, 发送器未检测到接收器, 发送器将每 12ms重复检测一次, 无法进入轮询状 态。 在根据 PCIE实现电缆传输的系统中, 发送端 PCIE设备可以通过发送共模 电压实现对接收端 PCIE设备的检测。 发明内容
本发明实施例提供了一种通信方法、 高速外围组件互连 PCIE芯片及 PCIE 设备, 能够在根据 PCIE实现光缆传输的场景下, 实现发送端 PCIE设备与接收 端 PCIE设备的正常协商。
第一方面, 本发明实施例提供了一种通信方法, 该方法应用于支持光缆传 输的快速外设组件互联 PCIE系统中, 所述 PCIE系统包括发送端 PCIE设备、 光传输器件以及接收端 PCIE设备, 所述方法包括: 当所述发送端 PCIE设备需 要与所述接收端 PCIE设备建立通信连接时, 所述发送端 PCIE设备确定控制寄 存器的检测状态位包含第一标识, 所述第一标识用于表示禁止所述发送端 PCIE 设备执行负载检测; 所述发送端 PCIE设备通过所述光传输器件执行与所述接收 端 PCIE设备的链路协商流程, 以与所述接收端 PCIE设备建立所述通信连接。
在第一方面的第一种可能的实施方式中, 所述方法还包括: 当所述发送端 PCIE设备与所述接收端 PCIE设备在所述链路协商流程中协商的数据传输速率 达到阔值时,所述发送端 PCIE设备确定所述控制寄存器的均衡指示位包括第二 标识, 所述第二标识用于表示禁止所述发送端 PCIE设备与所述接收端 PCIE设 备协商信号参数; 所述发送端 PCIE设备根据配置的所述信号参数通过所述通信 连接向所述接收端 PCIE设备传输数据。
结合第一方面的第一种可能的实施方式, 在第二种可能的实施方式中, 所 述方法还包括:在系统初始化过程中,所述发送端 PCIE设备配置所述信号参数。
结合第一方面的第一种或者第二种可能的实施方式, 在第三种可能的实施 方式中, 所述信号参数包括下述参数中的至少一项: 发送端信号调整参数或接 收端信号调整参数。
第二方面, 本发明实施例提供了一种快速外设组件互联 PCIE芯片, 所述 PCIE芯片支持光缆传输, 该 PCIE芯片包括链路状态机和收发器, 其中, 所述 链路状态机用于当需要与接收端 PCIE芯片建立通信连接时,确定控制寄存器的 检测状态位包含第一标识,所述第一标识用于表示禁止所述 PCIE芯片执行负载 检测。所述收发器用于通过光传输器件执行与所述接收端 PCIE芯片的链路协商 流程, 以与所述接收端 PCIE芯片建立所述通信连接。
在第二方面的第一种实施方式中,所述链路状态机还用于当所述 PCIE芯片 与所述接收端 PCIE 芯片在所述链路协商流程中协商的数据传输速率达到阔值 时, 确定所述控制寄存器的均衡指示位包括第二标识, 其中, 所述第二标识用 于表示禁止所述 PCIE芯片与所述接收端 PCIE芯片协商信号参数。 所述收发器 还用于根据配置的信号参数通过所述通信连接向所述接收端 PCIE 芯片传输数 据。
结合第二方面的第一种实施方式, 在第二方面的第二种实施方式中, 所述 PCIE芯片还包括管理器, 所述管理器用于在系统初始化过程中, 配置所述信号 参数。
结合第二方面的第一种或第二种实施方式, 在第二方面的第三种实施方式 中, 所述信号参数包括下述参数中的至少一项: 发送端信号调整参数或接收端 信号调整参数。
第三方面, 本发明实施例提供了一种快速外设组件互联 PCIE设备, 包括上 述第二方面或第二方面的各种可能的实施方式所述的 PCIE芯片。
在本发明实施例提供的通信方法中,当发送端 PCIE设备需要与接收端 PCIE 设备建立通信连接时,发送端 PCIE设备可以根据控制寄存器中预先设置的第一 标识不执行负载检测, 将链路的初始状态定向为轮询状态, 以便能够直接与接 收端 PCIE设备进行链路协商。该方法能够避免因光传输器件的存在导致发送端 PCIE设备无法检测到接收端 PCIE设备在位而无法与接收端 PCIE设备进行链路 协商的问题。 在支持光缆传输的应用场景中, 本发明实施例提供的方法能够使 发送端 PCIE设备与接收端 PCIE设备顺利建立通信连接。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作简单地介绍。
图 1为本发明实施例提供的一种 PCIE设备通信连接示意图;
图 2为本发明实施例提供的一种 PCIE设备的应用场景示意图;
图 3为本发明实施例提供的一种 PCIE芯片的结构示意图;
图 4为本发明实施例提供的一种通信方法流程图;
图 5为本发明实施例提供的又一种通信方法流程图。 具体实施方式
为了使本技术领域的人员更好地理解本发明方案, 下面将结合本发明实施 例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所 描述的实施例仅仅是本发明一部分的实施例, 而不是全部的实施例。
为了便于理解本方案, 本发明实施例首先对根据快速外设组件互联总线
( Peripheral Component Interconnect Express, PCIE ) 实现电缆传输的 PCIE系统 中, 发送端 PCIE设备及接收端 PCIE设备如何建立通信连接的过程做一个简单 的介绍。 如图 1所示, 在该通信系统中, 包括第一 PCIE设备 10以及第二 PCIE 设备 20。 其中, 第一 PCIE设备 10中包含有第一 PCIE芯片 14, 第二 PCIE设 备 20中包含有第二 PCIE芯片 24。第一 PCIE设备 10与第二 PCIE设备 20之间 通过电缆连接。
下面以作为发送端 PCIE设备的第一 PCIE设备 10与作为接收端 PCIE设备 的第二 PCIE设备 20建立通信连接的过程为例进行描述。根据 PCIE标准的规定, 当开机或复位后, 第一 PCIE芯片 14中的链路状态机将控制链路依次进入: 检 测状态——轮询( Polling )状态——配置( Configuration )状态—— L0状态, 以 使第一 PCIE设备 10与第二接收端 PCIE设备 20正常建立通信连接, 并在 L0 状态期间, 第一 PCIE设备 10 与第二 PCIE设备 20 可以进行处理层数据包 ( Transaction Layer Pocket, TLP )、 数据链路层数据包 ( Data Link Layer Pocket, DLLP )和物理层数据包( Physical Layer Pocket, PLP )的发送和接收。 其中, 物 理层数据包也称为有序集。 当然可以理解的是, 第一 PCIE设备 10也可以作为 接收端 PCIE设备, 第二 PCIE设备 20也可以作为发送端 PCIE设备。
在上述第一 PCIE设备 10与第二 PCIE设备 20建立通信连接的过程中, 第 — PCIE芯片 14首先需要进入检测状态以检测链路接收端是否存在第二 PCIE芯 片 24。 在本发明实施例中, 也可以将检测状态中发送器检测链路接收端是否存 在接收器的过程简称为执行负载检测。 为了描述清楚, 下面将对负载检测的过 程做一个简单的介绍。 在图 1所示的通信系统中, 第一 PCIE芯片 14的发送器 2082的两根差分线分别通过耦合电容 CTX与第二 PCIE芯片 24的接收器 2084 的两根差分线相连。 并且, 接收器 2084的两根差分线分别与两个端接电阻 ZRX 的一端相连, 两个端接电阻 ZRX的另一端均接地。 当链路进入检测状态时, 第一 PCIE芯片 14中的发送器 2082从自身的两个端子 D+和 D-驱动一个与初始电压 不同的共模电压。 为了描述方便, 在本发明实施例中, 将初始电压称为第一电 压, 将发送器在检测状态驱动的与初始电压不同的一个共模电压称为第二电压。 其中, 初始电压可以是 VDD(3.6V)、 地(Ground )或者是 VDD 与地(Ground ) 之间的任意一个共模电压。 第二电压为与初始电压不同的一个共模电压。 在由 第一电压变为第二电压的过程中, 若发送器 2082与接收器 2084相连, 则耦合 电容 CTX、 发送器 2082差分线上的寄生电容以及接收端的端接电阻 ZRX可以形 成一个 RC充电电路。 由于具有较大的耦合电容 CTX, 该 RC充电电路的充电时 间较长。 若发送器 2082与接收器 2084没有相连, 则耦合电容 CTX并没有起作 用, 充电时间就较短。 从而, 第一 PCIE芯片 14可以 居充电时间的长短判断 是否与第二 PCIE芯片 24连接。 或者, 换一种表达方式, 第一 PCIE芯片 14可 以根据充电时间的长短判断第二 PCIE芯片 24是否在位。根据 PCIE的规定, 当 第一 PCIE芯片 14检测到第二 PCIE芯片 24在位后, 会进入轮询状态, 开始链 路协商。 经过链路协商流程, 第一 PCIE芯片 14与第二 PCIE芯片 24之间的通 信链路可以正常连接 ( Link up )。
需要说明的是, 为了清楚地描述 PCIE芯片的负载检测过程, 图 1中只对第 一 PCIE芯片 14中的发送器 2082以及第二 PCIE芯片 24中的接收器 2084进行 了图示。 可以理解的是, 在第一 PCIE芯片 14中也可以包括接收器 2084, 在第 二 PCIE芯片 24中也可以包括发送器 2082。 下面将对本发明实施例提供的通信方法的一种应用场景做一个简单介绍。 本发明实施例提供的通信方法可以应用于根据 PCIE 实现光缆传输的通信系统 中。 如图 2所示, 在本发明实施例提供的一种根据 PCIE实现光缆传输的通信系 统中,在第一 PCIE设备 10与第二 PCIE设备 20之间连接有第一光模块 (Optical Module)12以及第二光模块 22。 第一 PCIE设备 10与第一光模块 12之间通过电 缆连接。第二光模块 22与第二 PCIE设备 20之间通过电缆连接。第一光模块 12 和第二光模块 22之间通过光纤 30连接。 其中, 第一光模块 12和第二光模块 22 用于进行电信号与光信号的转换。
仍然以第一 PCIE设备 10为发送端 PCIE设备、 第二 PCIE设备 20为接收 端 PCIE设备为例。 当第一 PCIE设备 10与第二 PCIE设备 20建立通信连接后, 例如, 在链路处于 L0工作状态时, 若第一 PCIE设备 10向第二 PCIE设备 20 发送数据, 与第一 PCIE设备 10连接的第一光模块 12会将第一 PCIE芯片 14 发送的电信号转换为光信号, 并通过光纤 30传输至与第二通信节点 20连接的 第二光模块 22。 第二光模块 22将接收的光信号转换为电信号后, 将电信号传输 给第二 PCIE设备 20中的第二 PCIE芯片 24 , 从而能够实现第一 PCIE设备 10 以及第二 PCIE设备 20之间的通信。 可以理解的是, 由于第一光模块 12以及第 二光模块 22之间通过光纤 30连接, 因此, 即使第一 PCIE设备 10与第二 PCIE 设备 20的距离较远, 也能够通过光纤 30完成相互之间的通信。
需要说明的是, 第一 PCIE设备 10和第一光模块 12可以独立设置。 例如, 第一 PCIE设备 10可以是一个单板,第一光模块 12可以通过对应的连接器连接 在第一 PCIE设备 10的边缘。第一 PCIE设备 10和第一光模块 12也可以集成在 同一个通信设备中, 例如, 若第一 PCIE设备 10是一个单板, 第一光模块 12也 可以通过对应的连接器位于第一 PCIE设备 10中。 类似的, 第二 PCIE设备 20 和第二光模块 22可以独立设置, 第二 PCIE设备 20和第二光模块 22也可以集 成在同一个通信设备中。 在此不做限定。 并且, 第一 PCIE设备 10和第二 PCIE 设备 20可以分别位于不同设备中, 也可以位于同一设备中。 例如, 第一 PCIE 设备 10和第二 PCIE设备 20可以位于不同的主机中,也可以位于同一个主机中。 在此也不做限定。
为了描述方便, 在本发明实施例中, 可以将第一光模块 12、 光纤 30以及第 二光模块 22统称为光传输器件, 用于实现第一 PCIE设备 10及第二 PCIE设备 20之间的信号传输。 在光传输器件传输信号的过程中, 光传输器件可以用于实 现电信号和光信号之间的转换。 光传输器件如何实现信号传输与现有技术类似, 因此, 本发明实施例中, 对光传输器件如何实现光信号和电信号的转换和传输 不做详细描述。 需要说明的是, 本发明实施例中所指的第一 PCIE设备 10和第 二 PCIE设备 20均不包括光模块等光传输器件。
然而, 在图 2所示的通信系统中, 第一 PCIE设备 10与第二 PCIE设备 20 之间通过第一光模块 (Optical Module)12、 光纤 30以及第二光模块 22等光传输 器件进行连接。 在链路进入检测状态时, 由于光模块不能将用于检测第二 PCIE 芯片 24的共模电压信号转换为有效的光信号并传输至第二 PCIE芯片 24,因此, 当链路处于检测状态时,第一 PCIE芯片 10无法根据 PCIE标准实现对第二 PCIE 芯片 24的在位检测。 使得链路无法从检测状态进入轮询 (Polling )状态, 第一 PCIE设备 10不能第二 PCIE设备 20进行链路协商, 导致链路无法正常连接。 图 3为本发明实施例提供的一种 PCIE芯片的结构示意图,本发明实施例提 供的 PCIE芯片可以应用于根据 PCIE实现光缆传输的场景中。 如图 3所示, 图 3所示的 PCIE芯片 20可以为图 2中所示的第一 PCIE芯片 14和第二 PCIE芯片 24。 如图 3所示, PCIE芯片 20可以包括: 通信接口 202、 链路状态机 204、 管 理器 206以及收发器 208。其中,收发器 208包括发送器 2082以及接收器 2084。 管理器 206包括配置模块 2061以及监控电路 2062。 在根据 PCIE实现光缆传输 的应用场景中, PCIE芯片 20可以通过端口连接器 212与光模块进行连接。例如, 当 PCIE芯片 20为图 2中所示的第一 PCIE芯片 14时, 第一 PCIE芯片 14可以 通过端口连接器 212与第一光模块 12进行连接。 其中:
通信接口 202具体可以为 PCIE芯片 20的物理层与上层的接口。 其中, 上 层指的是 PCIE芯片的物理层的上层, 可以包括数据链路层 (Data Link Layer)或 处理层 (Transaction Layer)等。 物理层的模块可以通过通信接口 202与上层的模 块进行通信。 当 PCIE芯片发送数据时, 上层可以通过通信接口 202将待发送的 数据传输给物理层的发送器 210, 由发送器 210将数据发送出去。 当 PCIE芯片 接收数据时, 接收器 212可以将接收的数据通过通信接口 202传输给上层进行 处理。
链路状态机 204, 又可以称为链路训练和状况状态机(Link Training And Status State Machine, LTSSM ), 链路状态机 204是 PCIE芯片 20物理层的子部 分, 主要用于实现链路初始化和定向过程, 控制链路的链接状态和链路的电源 管理状态, 使链路可以正常的传送数据包。 实际应用中, 链路状态机 204 可以 通过通信接口 202接收上层的链路信息, 根据上层传输的链路信息控制链路的 状态。 链路状态机 204还可以通过监测发送器 2082的发送情况来确定链路的状 态。 例如, 若链路状态机 204监测到发送器 2082没有发送数据时, 则可以确定 链路需要进入电气空闲 (Electrical Idle, EI )状态。 链路状态机 204还可以根据 配置模块 2061中的控制寄存器来确定链路状态。
管理器 206用于实现对 PCIE芯片的管理功能。管理器 206可以包括配置模 块 2061以及监控电路 2062。
配置模块 2061具体可以包括控制寄存器、状态寄存器等各种寄存器。其中, 控制寄存器用于控制链路状态和链路实现功能。 例如, 链路状态机 204可以根 据配置模块 2061中的控制寄存器来定向链路状态, 根据控制寄存器控制链路进 入检测状态、 轮询状态或 L0状态等。 状态寄存器可以包括链路状态寄存器, 链 路状态寄存器可以用于显示链路状态。状态寄存器还可以包括用于表示 PCIE芯 片 20自身总线状态的状态寄存器,例如,用于表示线缆在位状况的状态寄存器。 其中线缆可以包括电缆或光缆。 可以理解的是, 链路状态机 204可以根据配置 模块 2061 中的各寄存器的相应比特位的值来实现功能的控制或链路状况的确 定。 例如, 链路状态机 204 可以通过读取寄存器中相应的比特位的值, 以获取 链路的状态信息或了解线缆在位情况。 可以理解的是, 控制寄存器或状态寄存 器均可以有多个。 监控电路 2062用于监控线缆的在位状态, 并对配置模块 2061 中的寄存器 进行相应的配置。 实际应用中, 监控电路 2062可以通过对配置模块 2061 中的 各个寄存器中的相应比特位进行设置,以实现对链路状态的设置。监控电路 2062 还可以通过获取端口连接器 212的线缆在位信号, 以判断端口连接器 212是否 连接有线缆。 通常, 当端口连接器 212 没有连接线缆时, 线缆在位信号为一高 电平, 当端口连接器 212连接有线缆时, 该在位信号由高电平变为低电平。 监 控电路 2062可以通过监测线缆在位信号的变化来判断端口连接器 212是否连接 有线缆。 当监控电路 2062判断线缆在位信号有效时, 监控电路 2062可以进一 步的通过带外管理通道去读取线缆内部的非易失性存储信息, 以获得该线缆的 类型为电缆或光缆。 其中, 线缆在位信号有效是指端口连接器 212连接有线缆, 线缆内部的非易失性存储信息包括线缆类型、 线缆长度等信息。 例如, 在根据 PCIE实现光缆传输的应用场景中, PCIE芯片 20在获得线缆在位信号有效时, 可以根据带外管理通道进一步获取端口连接器 212连接的线缆类型信息, 以获 得端口连接器 212连接的是光缆。 需要说明的是, 这里的光缆是指与光模块连 接的光缆。 换一种表达方式, 在根据 PCIE 实现光缆传输的应用场景中, PCIE 芯片 20可以根据带外管理通道获得端口连接器 212连接有光模块。 其中, 带外 管理通道可以包括内部集成线路 ( Inter- Integrated Circuit, I2C )通道。
收发器 208用于执行与对端 PCIE设备的协商流程, 并实现与对端 PCIE设 备的数据传输。 其中, 所述协商流程是通过发送器 2082向对端 PCIE设备发送 协商信号, 并通过接收器 2084接收所述对端 PCIE设备的响应信号来实现的。 所述数据传输包括通过发送器 2082向对端 PCIE设备发送上层通过通信接口 202 传输的数据, 还包括通过接收器 2084接收对端 PCIE设备发送的数据。 需要说 明的是,收发器 208可以在链路状态机 204的控制下与接收端 PCIE设备执行链 路协商流程或者向对端 PCIE设备发送数据。 收发器 208具体可以包括发送器 2082以及接收器 2084。
发送器 2082用于发送信息。 PCIE芯片 20的发送器 2082具体可以为发送驱 动电路。 发送器 2082发送的信息是以电信号的方式发送的。 根据这种方式, 发 送器 2082可以将上层通过通信接口 202传输的待发送数据转换为电脉冲波形发 送出去。 在支持光信号传输的 PCIE系统中, 发送器 2082通常通过端口连接器 212与光模块相连。发送器 2082可以将数据以电信号的形式通过端口连接器 212 发送给光模块, 发送器 2082发送的电信号可以通过光模块转换为光信号后发送 到接收端光模块。 实际应用中, 可以将待发送的数据进行编码、 并串转换或去 加重等处理后, 再将处理后的数据通过发送器 2082发送出去。 其中, 并串转换 是指将上层传输的并行数据转换为串行数据。 去加重是指发送端 PCIE芯片通过 预先提高信号中高频成分幅度的方式发送信号, 以补偿传输线路对高频成分的 衰减。 其中, 信号中高频成分幅度提高的具体数值可以根据信号调整参数 ( reset )来确定。
本领域技术人员可以知道, 由于在根据 PCIE标准传输数据的过程中, 链路 中廉价的 PCB板材以及接插件对信号中的高频成分有很大的衰减。 并且, 当信 号传输速率越高时, 信号中的高频成分越多, 衰减越厉害, 无法保证信号质量。 为了提高链路传输的可靠性, 提高信号传输的质量, 在发送端 PCIE芯片和接收 端 PCIE芯片通常会釆用去加重 (De-emphasis )和均衡(Equalization)技术。
在 PCIE1.0中釆用了 -3.5dB的去加重, 在 PCIE2.0中釆用了 _3.5dB和- 6dB 的去加重。 在 PCIE3.0中, 由于信号速率更高, 釆用了更加复杂的 2阶去加重 技术, 除了对信号中的高频成分增大幅度发送(De-emphasis )之外, 对高频成 分前 1个 bit的信号也增大幅度发送, 这个增大的幅度通常叫做前置尖头信号 (Preshoot)。 在 PCIE3.0中, 规定了多种不同的 Preshoot和 De_emphasis的 组合。 在本发明实施例中, 将 Preshoot和 De- emphasis的组合称为信号调整参 数 ( reset )。 发送端的 Preset编码可以如表一所示:
Figure imgf000010_0001
1001b 0 3. 5
1010b 参见前面的描述 参见前面的描述
1011b 至 1111b 保留
表一: 发送端 Preset编码
接收器 2084用于当 PCIE芯片 20作为接收端 PCIE芯片时,接收发送端 PCIE 芯片通过光传输器件发送的信息。 可以理解的是, 接收器 2084通常也可以为接 收电路。 可以理解的是, 在支持光信号传输的 PCIE系统中, 接收器 2084通常 通过端口连接器 212 与接收端光模块连接。 接收端光模块可以将接收的光信号 转换为电信号, 并进行相应的处理后, 传输给接收器 2084。 例如, 在图 2所述 的 PCIE系统中, 当第一 PCIE芯片 14向第二 PCIE芯片 24发送数据时, 第二 PCIE芯片 24的接收器 2084可以接收第一 PCIE芯片 14的发送器 2082通过光 传输器件发送的数据。 其中, 光传输器件包括第一光模块 12、 光纤 30以及第二 光模块 22。 实际应用中, 可以对接收器 2084接收的数据进行串并转换、 解码或 均衡(Equalization )等处理, 再将处理后的数据通过通信接口 202传输给上层 进行相应处理。 其中, 串并转换是指将接收的串行数据转换为并行数据。 均衡 是指在接收端 PCIE芯片内部增加一个均衡电路,通过该均衡电路抬高接收到的 信号中的高频分量, 实现对线路的损耗进行进一步的补偿。 其中, 信号被抬高 的数值可以根据接收端信号调整参数 ( Preset )来确定。 接收端 Preset编码可 以如下表二所示:
Figure imgf000011_0001
表二: 接^:端 Preset编码 需要说明的是, 根据现有的 PCIE的规定, 发送端信号调整参数(Preset ) 以及接收端 Preset 等信号参数的具体数值可以在均衡程序 (Equalization procedure ) 中由发送端 PCIE芯片和接收端 PCIE芯片自动协商, 以便能够从多 个 Preset中找出最优的 Preset。本发明实施例中描述的 PCIE1.0是指第 1代 PCIE 标准, PCIE2.0是指第 2代 PCIE标准, PCIE3.0是指第 3代 PCIE标准。 下面将对在根据 PCIE实现光缆传输的场景中, 如何釆用图 3所示的 PCIE 芯片 20建立通信连接的方法进行详细描述。 图 4为本发明实施例提供的一种通 信方法的方法流程图。 图 4所描述的方法可以应用于图 2所示的通信系统中, 该方法可以由图 3所示的 PCIE芯片 20来执行。 本发明实施例将从发送端 PCIE 芯片的角度对该通信方法进行描述。 可以理解的是, 如图 2所示, 当第一 PCIE 芯片 14为发送端 PCIE芯片时, 第二 PCIE芯片 24即为接收端 PCIE芯片。 需 要说明的是, 第一 PCIE芯片 14既可以作为发送端 PCIE芯片,也可以作为接收 端 PCIE芯片。 当第一 PCIE芯片 14可以作为接收端 PCIE芯片时, 可以将第二 PCIE芯片 24作为发送端 PCIE芯片。本发明实施例以如图 2中所示的第一 PCIE 芯片 14为发送端 PCIE芯片、 第二 PCIE芯片 24作为接收端 PCIE芯片来举例 描述。 下面将结合图 2和图 3对图 4所示的方法进行描述。 如图 4所示, 该方 法包括:
在步骤 405中, 当所述发送端 PC IE设备需要与所述接收端 PC IE设备建立 通信连接时, 发送端 PC IE设备确定控制寄存器中的状态检测位包含第一标识, 所述第一标识用于表示禁止所述发送端 PC IE设备执行负载检测。 如图 2所示, 当第一 PC IE芯片 14上电、 恢复或退出基本复位或 Ho t复位后, 第一 PC IE芯片 14需要与第二 PC IE芯片 24建立通信连接。根据 PC IE标准的相关规定, 当第一 PC IE芯片 14上电、 恢复或退出基本复位或 Ho t复位后,链路进入的第一个状态 应为检测 (De tec t )状态。 在检测状态中, 第一 PC IE芯片 14将执行负载检测, 用以检测链路远端连接的设备是否存在, 以便与链路远端的第二 PC IE 芯片 24 建立通信连接。 在图 1所示的应用场景下, 链路远端的第二 PC IE芯片 24即为 接收端 PC IE设备。 在本发明实施例中, 如图 2所示, 由于第一 PC IE芯片 14与 第二 PC IE芯片 24通过光传输器件连接, 在步骤 405中, 当第一 PC IE芯片 14 需要与第二 PC IE芯片 24建立通信连接时, 若第一 PC IE芯片 14中的链路状态 机 204确定控制寄存器中的状态检测位包含第一标识, 则第一 PCIE芯片 14并 芯片 14中的链路状态机 204可以读取配置模块 2061 中的控制寄存器的值, 判 断控制寄存器中的检测状态位是否包含第一标识, 其中, 第一标识用于表示禁 止所述发送端 PCIE设备执行负载检测。 换一种表达方式, 第一标识用于标识检 测状态位无效。
在本发明实施例中, 控制寄存器可以包含多个比特(bi t )位, 可以用不同 的比特字段来表示不同的链路状态, 并可以用不同的标识来表示该状态位是否 有效。 其中, 链路状态可以包括: 检测(Detect )状态、 轮询(Pol l ing )状态、 配置(Conf igura t ion )状态、 恢复(Recovery )或 L0等 PCIE标准规定的链路 状态。 状态位有效表示需要进入该链路状态, 状态位无效表示禁止进入该链路 状态。 例如, 可以用控制器寄存器中的第 8 个比特位来表示链路的检测状态, 当该比特位的值为 1 时表示检测状态位有效, 当该比特位的值为 0时表示检测 状态位无效。
在本发明实施例中, 控制寄存器中的状态位是可以预先配置的。 实际应用 中, 在一种情形下, 在第一 PCIE芯片 14的系统初始化过程中, 监控电路 2062 可以根据配置文件对配置模块 2061中的控制寄存器进行配置。在另一种情形下, 在第一 PCIE芯片 14的系统初始化过程中, 监控电路 2062还可以根据配置芯片 的管脚电平对控制寄存器进行配置。 具体配置时, 监控电路 2062可以根据配置 文件或配置芯片的管脚电平设置控制寄存器中的相应状态位的值。
由于图 4所示的方法应用于根据 PCIE实现光缆传输的场景中, 考虑到在链 路进入检测状态时,光模块 12不能将用于检测第二 PCIE芯片 24是否在位的共 模电压信号转换为有效的光信号并传输至第二 PCIE芯片 24, 因此,在本发明实 施例中, 可以预先将控制寄存器中的检测状态位设置为无效, 使得第一 PCIE芯 片 14不进行负载检测。 例如, 可以将控制寄存器中的检测状态位设置为 0。 当 然, 也可以用 0表示检测状态位有效, 用 1表示检测状态位无效, 在此不做限 定。
在步骤 410中, 所述发送端 PCIE设备通过所述光传输器件执行与所述接收 端 PCIE设备的协商流程, 以与所述接收端 PCIE设备建立所述通信连接。 由于 在步骤 405 中, 链路状态机 204确定控制寄存器包含第一标识, 因此, 链路状 态机可以根据第一标识将链路状态定向到轮询状态, 其中, 轮询状态是检测状 态的下一个状态。 自轮询状态开始, 第一 PCIE芯片 14将通过第一光模块 12、 光纤 30以及第二光模块 22等光传输器件与第二 PCIE芯片 24进行链路协商。 具体的, 在轮询状态期间, 第一 PCIE芯片 14中的发送器 2082可以通过光传输 器件向第二 PCIE芯片 24发送 TS1有序集和 TS2有序集并响应接收器 2084接收 到的由第二 PCIE芯片 24发送的 TS1有序集和 TS2有序集。 根据这种方式, 第 一 PCIE芯片 14 与第二 PCIE芯片 24通过交换 TS1有序集和 TS2有序集与速率 字段来通知对端对更高速率的支持情况, 并将所有通道上的数据速率更改为链 路两端所支持的最高速率。 其中, TS1有序集和 TS2有序集均属于物理层数据包 ( Phys ica l Layer Pocket , PLP )。 在完成轮询状态的协商过程后, 链路状态机 204将链路定向到配置状态, 以执行配置状态中的协商流程。 在配置状态中, 第 一 PCIE芯片 14可以与第二 PCIE芯片 24进行链路和通道的协商。 例如可以对 链路号、通道号、通道带宽等进行协商。通过上述协商流程,可以建立第一 PCIE 芯片 14与第二 PCIE芯片 24之间的通信连接。
在图 4所示的方法的实施例中,在根据 PCIE实现光缆传输的 PCIE系统中 , 当第一 PCIE芯片 14需要与第二 PCIE芯片 24建立通信连接时, 第一 PCIE芯 片 14可以根据控制寄存器中预先设置的第一标识不执行负载检测, 将链路的初 始状态定向为轮询状态,以便能够直接与第二 PCIE芯片 24进行链路协商。 图 4 所示的方法能够避免因光传输器件的存在导致第一 PCIE芯片 14无法检测到第 二 PCIE芯片在位而无法与第二 PCIE芯片 14进行链路协商的问题。 通过图 4 所述实施例的方法能够使第一 PCIE芯片 14与第二 PCIE芯片 24顺利建立通信 连接。 图 5 为本发明实施例提供的又一种通信方法的方法流程图。 该方法可以应 用于才艮据 PCIE实现光缆传输的 PCIE系统中, 该方法可以由包含 PCIE芯片的 PCIE设备执行。 例如, 可以由图 2所示的第一 PCIE设备 10或第二 PCIE设备 20来执行, 或者可以由图 2所示的第一 PCIE芯片 14或第二 PCIE芯片 24来执 行,也可以由图 3示的 PCIE芯片 20来执行。图 5仍然以图 2中所示的第一 PCIE 芯片 14为例。 下面将结合图 2和图 3对图 5所示的方法进行详细描述。 如图 5 所示, 该方法可以包括: 在步骤 500中, 第一 PCIE芯片 14上电初始化。 图 5是以第一 PCIE芯片 14上电初始化后需要与第二 PCIE芯片 24建立通信连接为例。 可以理解的是, 第一 PCIE芯片 14除了在上电初始化后需要与第二 PCIE芯片建立通信连接之 夕卜,还可以在接收到复位命令或退出恢复状态后与第二 PCIE芯片重新建立通信 连接。 其中, 复位包括基本复位(冷复位或热复位)和 Hot复位。 Hot复位是指 由软件所触发的带内传送的复位。恢复状态也称为重新定向( Re-Training )状态。 根据 PCIE 的规定, 当链路退出恢复状态后, 可以进入检测状态, 以便发送端 PCIE芯片与接收端 PCIE芯片重新建立通信连接。
实际应用中,在第一 PCIE芯片 14上电初始化的过程中,还可以对第一 PCIE 芯片 14中的控制寄存器和状态寄存器进行初始化配置。 在初始化配置过程中, 第一 PCIE芯片 14中的监控电路 2062可以先判断端口连接器 212连接的线缆类 型, 再根据相应的线缆类型加载不同的配置文件, 以实现对控制寄存器和状态 寄存器的配置。 具体配置时, 监控电路 2062可以根据配置文件或配置芯片的管 脚电平设置控制寄存器中的相应状态位的值。 例如, 当第一 PCIE芯片 14中的 监控电路 2062获得端口连接器 212连接有光模块后, 监控电路 2062可以根据 预设的配置文件或配置芯片的管脚电平对配置模块 2061中的控制寄存器进行配 置。 监控电路 2062可以将第一 PCIE芯片 14的控制寄存器中的检测状态位设置 为第一标识, 将控制寄存器中的均衡指示位设置为第二标识。
在步骤 505中, 第一 PCIE芯片 14判断控制寄存器的检测状态位是否包含 第一标识, 如果第一 PCIE芯片的控制寄存器中没有包含第一标识, 则该方法进 入步骤 510, 否则, 该方法进入步骤 520。 实际应用中, 当第一 PCIE芯片 14上 电初始化后,第一 PCIE芯片 14中的链路状态机 204可以判断配置模块 2061中 的控制寄存器中的检测状态位是否包含第一标识。 其中, 第一标识用于表示禁 止进入检测状态。 可以理解的是, 控制寄存器中的检测状态位不限于一个比特 位, 可以为一段比特位。 第一标识可以用 0来表示, 也可以用 1来表示, 还可 以用 01或 00等其他标识来表示。 在此不做限定。 在本发明实施例中, 如果在 步骤 505中, 第一 PCIE芯片 14中的链路状态机 204检测到控制寄存器中的检 测状态位包含第一标识, 则链路状态机 204可以将链路的初始状态直接定向为 轮询状态, 开始与第二 PCIE芯片 24进行链路协商。 其中, 轮询状态为检测状 态的下一个^ 态。 在步骤 510中, 第一 PCIE芯片 14执行负载检测。 实际应用中, 若在步骤 505中第一 PCIE芯片 14判断控制寄存器的检测状态位中没有包含第一标识,则 第一 PCIE芯片 14中链路状态机 204可以根据 PCIE标准的规定,将链路定向到 检测状态,执行负载检测, 以检测链路的远端是否连接有第二 PCIE芯片 24。 在 第一 PCIE芯片 14执行负载检测的过程中, 第一 PCIE芯片 14可以釆用图 1中 描述的方法,根据充电时间的长短来判断第二 PCIE芯片 24是否在位。第一 PCIE 芯片 14也可以釆用其他方法来检测第二 PCIE芯片 24是否在位,在此不做限定。
在步骤 515中, 第一 PCIE芯片 14判断是否检测到第二 PCIE芯片 24, 如 果检测到第二 PCIE芯片 24, 则该方法进入步骤 520, 否则返回执行步骤 510, 继续执行负载检测。 实际应用中, 当第一 PCIE芯片 14检测到第二 PCIE芯片 24 , 则第一 PCIE芯片 14中的链路状态机 204会将链路状态定向到轮询状态, 该方法可以进入步骤 520。
在步骤 520中 , 第一 PCIE芯片 14通过光传输器件与第二 PCIE芯片 24进 行链路协商。 根据 PCIE标准的规定, 当链路进入轮询状态后, 发送端 PCIE芯 片开始与接收端 PCIE芯片进行链路协商。本发明实施例中所述的协商流程包括 链路在轮询状态以及配置状态的协商过程,该过程与 PCIE标准规定的协商过程 类似, 具体可以参见图 4所示的步骤 410的描述, 在此不再赘述。
在步骤 525中, 第一 PCIE芯片 14判断是否与第二 PCIE芯片 24建立通信 连接,如果没有与第二 PCIE芯片 24建立通信连接,则返回执行步骤 505,否则, 该方法进入步骤 530。 实际应用中, 当第一 PCIE芯片 14与第二 PCIE芯片 24 协商成功, 以使第一 PCIE芯片 14与第二 PCIE芯片 24正常建立通信连接时, 第一 PCIE芯片 14中的链路状态机 204将链路定向到 L0工作状态。 在 L0工作 状态,第一 PCIE芯片 14的发送器 2082可以根据所述通信连接通过光传输器件 向第二 PCIE芯片 24传输数据。 第一 PCIE芯片 14向第二 PCIE芯片 24传输的 数据可以是上层通过通信接口 202传输到物理层的数据。 其中, 上层通过通信 接口 202传输到物理层的数据包括处理层数据包 (Transaction Layer Pocket, TLP) 和数据链路层数据包 (Data Link Layer, DLLP)。
在链路协商期间, 也可能发生第二 PCIE芯片 24不在位等异常情况导致链 路协商失败,从而第一 PCIE芯片 14与第二 PCIE芯片无法建立通信连接。 当协 商失败时可以重新返回执行步骤 505,再次确定是否需要检测第二 PCIE芯片 24 是否在位或再次确定第二 PCIE芯片 24在位, 以便再次发起与第二 PCIE芯片 24的协商流程。 当然, 在步骤 525中, 如果链路协商失败, 也可以釆用直接退 出该方法流程或者返回执行步骤 520等其他处理方式, 本发明实施例不做限定。
在步骤 530中,第一 PCIE芯片 14判断协商的数据传输速率是否达到阔值。 如果协商的数据传输速率没有达到阔值则该方法进入步骤 535,如果协商的数据 传输速率达到阔值, 则该方法进入步骤 540。 根据图 4中步骤 410的描述可知, 在轮询状态期间, 第一 PCIE芯片 14与第二 PCIE芯片 24可以通过交换 TS1有 序集和 TS2有序集与速率字段来通知对端对更高比特速率的支持情况, 并将所 有通道上的数据传输速率更改为链路两端所支持的最高速率。 因此, 在本步骤 中, 第一 PCIE芯片 14可以判断协商的数据传输速率是否达到阔值, 其中, 这 里的阔值可以包括 PCIE3. 0支持的数据传输速率,例如 8. OGbps。可以理解的是, 第一 PCIE芯片 14与第二 PCIE芯片 24协商的数据传输速率即为第一 PCIE芯片 14与第二 PCIE芯片 24支持的最高数据传输速率。
在步骤 535中, 第一 PCIE芯片 14按照协商的数据传输速率向第二 PCIE芯 片 24发送数据。 例如, 若协商的数据传输速率为 5. OGbps , 则第一 PCIE芯片 14的发送器 2082可以按照 5. OGbps的数据传输速率向第二 PCIE芯片 24发送 TLP或 DLLP。 其中, 第一 PCIE芯片 14发送的数据可以包括 TLP和 DLLP。
在步骤 540中, 第一 PCIE芯片 14判断控制寄存器中的均衡指示位是否包 含第二标识, 如果控制寄存器中的均衡指示位包含第二标识则进入步骤 545 , 否 则该方法进入步骤 550。 如图 2所述, 在第一 PCIE芯片 14的控制寄存器中, 可 以通过不同的比特位来表示检测状态位、 轮询状态位、 配置状态位或均衡指示 位等多种标识位。 其中, 均衡指示位用于控制链路是否执行均衡程序 ( Equa l izat ion procedure )。在均衡程序中,第一 PCIE芯片 14需要与第二 PCIE 芯片 24协商信号参数, 所述信号参数用于提高第一 PCIE芯片 14与第二 PCIE 芯片 24的通信信号的质量。 本发明实施例中的信号参数包括发送端信号调整参 数(Preset )和以及接收端 preset。 为了保证链路的信号质量, 根据 PCIE标准 的规定, 发送端 PCIE设备和接收端 PCIE设备通常提供了多种 Preset , 发送端 PCIE设备和接收端 PCIE设备可以在均衡程序中找出最优的 Preset值。
在本发明实施例中, 第二标识用于表示禁止所述发送端 PCIE设备与所述接 收端 PCIE设备协商信号参数。 换一种表达方式, 第二标识用于禁止所述发送端 PCIE设备与所述接收端 PCIE设备执行均衡程序 (Equa l izat ion procedure )0 需要说明的是, 本发明实施例中的均衡指示位不限于一个比特位, 可以为一段 比特位。 第二标识可以用 0来表示, 也可以用 1来表示, 还可以用 01或 11等 其他标识来表示, 在此不做限定。 关于均衡程序以及信号参数的描述可以参见 图 2的相关描述。
在步骤 545中, 第一 PCIE芯片 14根据配置的信号参数通过所述通信连接 向第二 PCIE芯片 24发送数据。 在本发明实施例中, 由于第一 PCIE芯片 14与 第二 PCIE芯片 24之间通过光模块等光传输器件连接。 由于光模块的限幅特性, 可能会将高于或低于判决门限的不同幅度信号按照同样幅度的信号输出, 因此 可能导致发送端 PCIE芯片发送的信号中的 Preset信息丟失, 接收端 PCIE芯片 "看不到" 信号的 Preset信息, 导致在均衡程序中, 发送端 PCIE芯片与接收 端 PCIE芯片协商的 Preset值可能并非最优。 为了提高信号质量, 在本发明实 施例中, 可以在第一 PCIE芯片 14上电初始化的过程中, 根据配置文件为第一 PCIE芯片 14配置信号参数, 其中, 配置的信号参数包括 Preset。 需要说明的 是,配置的信号参数具体可以包括发送端 Preset以及接收端 Preset。第一 PCIE 芯片 14可以根据配置的发送端 Preset向第二 PCIE芯片 14发送数据。 当第一 PCIE 芯片 14接收第二 PCIE 芯片 24 发送的数据时, 可以根据配置的接收端 Preset对接收的信号进行均衡处理。 通过这种方式, 提高第一 PCIE芯片 14与 第二 PCIE芯片 24之间的通信信号的质量。
在步骤 550中,第一 PCIE芯片 14与第二 PCIE芯片协商信号参数。具体的, 当在步骤 540中, 第一 PCIE芯片 14判断控制寄存器中没有包含第二标识时, 可以控制链路进入均衡程序, 与第二 PCIE芯片协商信号参数。
在步骤 555中, 第一 PCIE芯片 14根据协商的信号参数通过所述通信连接 向第二 PCIE芯片 24发送数据。 实际应用中, 第一 PCIE芯片 14可以根据在步 骤 550中协商的信号参数向第二 PCIE芯片发送数据。 第一 PCIE芯片 14发送的 数据可以包括 TLP和 DLLP。
图 5所示的根据 PCIE实现光缆传输的通信方法,在图 4所示的实施例的基 础上, 当第一 PCIE芯片 14与第二 PCIE芯片 24建立通信连接后, 当所述发送 端 PCIE设备与所述接收端 PCIE设备协商的数据传输速率达到阔值时, 若第一 PCIE芯片 14进一步确定控制寄存器的均衡指示位中包含第二标识,则第一 PC I E 芯片 14无需进入均衡程序与第二 PCIE芯片 24协商信号调整参数, 第一 PCIE 芯片 14可以直接根据配置的信号调整参数向第二 PCIE芯片 24发送数据,提高 了信号传输的质量。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过 硬件来完成, 也可以通过程序来指令相关的硬件完成。 所述的程序包括计算机 操作指令, 可以存储于一种计算机可读存储介质中。 上述提到的存储介质可以 为随机存储器 (; Random- Access Memory, RAM), 磁碟、 硬盘、 光盘、 固态硬盘 ( Solid State Disk, SSD )或者非易失性存储器( non-volatile memory )等各种可 以存储程序代码的非短暂性的 (non-transitory )机器可读介质, 在此不做限定。
需要说明的是, 本申请所提供的实施例仅仅是示意性的。 所属领域的技术 人员可以清楚地了解到, 为了描述的方便和简洁, 在上述实施例中, 对各个实 施例的描述都各有侧重。 某个实施例中没有详述的部分, 可以参见其他实施例 的相关描述。 在本发明实施例、 权利要求以及附图中揭示的特征可以独立存在 也可以组合存在。 在本发明实施例中以硬件形式描述的特征可以通过软件来执 行, 反之亦然。 在此不做限定。

Claims

权 利 要 求
PCIE系统中,所述 PCIE系统包括发送端 PCIE设备、光传输器件以及接收端 PCIE 设备, 其特征在于, 所述方法包括:
当所述发送端 PCIE设备需要与所述接收端 PCIE设备建立通信连接时, 所 述发送端 PCIE设备确定控制寄存器的检测状态位包含第一标识, 所述第一标识 用于表示禁止所述发送端 PC IE设备执行负载检测;
所述发送端 PCIE设备通过所述光传输器件执行与所述接收端 PCIE设备的 链路协商流程, 以与所述接收端 PC IE设备建立所述通信连接。
2、 根据权利要求 1所述的通信方法, 其特征在于, 还包括:
当所述发送端 PCIE设备与所述接收端 PCIE设备在所述链路协商流程中协 商的数据传输速率达到阔值时, 所述发送端 PCIE设备确定所述控制寄存器的均 衡指示位包括第二标识, 所述第二标识用于表示禁止所述发送端 PC IE设备与所 述接收端 PCIE设备协商信号参数;
所述发送端 PCIE设备根据配置的所述信号参数通过所述通信连接向所述 接收端 PCIE设备传输数据。
3、 根据权利要求 2所述的通信方法, 其特征在于, 所述方法还包括: 在系统初始化过程中, 所述发送端 PCIE设备配置所述信号参数。
4、 根据权利要求 2或 3所述的通信方法, 其特征在于, 所述信号参数包 括下述参数中的至少一项: 发送端信号调整参数或接收端信号调整参数。
5、 一种快速外设组件互联 PCIE芯片, 所述 PCIE芯片支持光缆传输, 其 特征在于, 包括:
链路状态机, 用于当需要与接收端 PCIE 芯片建立通信连接时, 确定控制 寄存器的检测状态位包含第一标识, 所述第一标识用于表示禁止所述 PCIE芯片 执行负载检测; 收发器, 用于通过光传输器件执行与所述接收端 PCIE 芯片的链路协商流 程, 以与所述接收端 PCIE芯片建立所述通信连接。
6、 根据权利要求 5所述的 PCIE芯片, 其特征在于:
所述链路状态机, 还用于当所述 PCIE芯片与所述接收端 PCIE芯片在所述 链路协商流程中协商的数据传输速率达到阔值时, 确定所述控制寄存器的均衡 指示位包括第二标识, 其中, 所述第二标识用于表示禁止所述 PCIE芯片与所述 接收端 PCIE芯片协商信号参数;
所述收发器, 还用于根据配置的信号参数通过所述通信连接向所述接收端 PCIE芯片传输数据。
7、 根据权利要求 6所述的 PCIE芯片, 其特征在于, 还包括:
管理器, 用于在系统初始化过程中, 配置所述信号参数。
8、 根据权利要求 6或 7所述的 PCIE芯片, 其特征在于, 所述信号参数包 括下述参数中的至少一项: 发送端信号调整参数或接收端信号调整参数。
9、 一种快速外设组件互联 PCIE设备, 其特征在于, 包括如权利要求 5-8 任意一项所述的 PCIE芯片。
PCT/CN2013/086563 2013-11-05 2013-11-05 通信方法、高速外围组件互连pcie芯片及pcie设备 WO2015066842A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201380002272.9A CN103797732B (zh) 2013-11-05 2013-11-05 通信方法、高速外围组件互连pcie芯片及pcie设备
PCT/CN2013/086563 WO2015066842A1 (zh) 2013-11-05 2013-11-05 通信方法、高速外围组件互连pcie芯片及pcie设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/086563 WO2015066842A1 (zh) 2013-11-05 2013-11-05 通信方法、高速外围组件互连pcie芯片及pcie设备

Publications (1)

Publication Number Publication Date
WO2015066842A1 true WO2015066842A1 (zh) 2015-05-14

Family

ID=50671624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086563 WO2015066842A1 (zh) 2013-11-05 2013-11-05 通信方法、高速外围组件互连pcie芯片及pcie设备

Country Status (2)

Country Link
CN (1) CN103797732B (zh)
WO (1) WO2015066842A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11836059B1 (en) 2020-12-14 2023-12-05 Sanblaze Technology, Inc. System and method for testing non-volatile memory express storage devices

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330300B (zh) * 2015-06-30 2018-11-27 菲尼萨公司 空闲状态检测电路、空闲状态检测方法以及有源光纤缆线
CN106817258A (zh) * 2017-01-13 2017-06-09 郑州云海信息技术有限公司 一种选取及验证pcie链路均衡参数的方法及装置
CN107147399B (zh) * 2017-05-10 2020-11-27 北京兆芯电子科技有限公司 驱动器
US20190121763A1 (en) * 2017-10-23 2019-04-25 Mediatek Inc. Method for communicating with another electronic device and associated electronic device
CN108040301B (zh) * 2017-11-30 2021-02-19 上海联影医疗科技股份有限公司 光通信系统、方法及存储介质
CN107957885B (zh) * 2017-12-01 2021-02-26 麒麟软件有限公司 一种基于飞腾平台的pcie链路设备待机与恢复方法
CN109495463B (zh) * 2018-11-02 2021-06-29 郑州云海信息技术有限公司 一种链路宽度协商方法、装置及计算机可读存储介质
CN111371582B (zh) * 2018-12-26 2021-04-16 大唐移动通信设备有限公司 一种pcie链路故障的处理方法及装置
CN112463461B (zh) * 2020-12-17 2023-12-22 北京浪潮数据技术有限公司 一种链路联通方法、装置、设备及计算机可读存储介质
CN114356811B (zh) * 2022-03-17 2022-06-07 苏州浪潮智能科技有限公司 一种通信链路更新方法、装置及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101055304A (zh) * 2007-06-04 2007-10-17 杭州华三通信技术有限公司 一种电路连接状态检测系统及方法
US20080104298A1 (en) * 2006-11-01 2008-05-01 Wei-Hung Liu Expandable Express Card Capable of Isolating Noise and Method for Combining Functionalities of the Express Card with a Non-Host Device
CN101714022A (zh) * 2008-09-29 2010-05-26 英特尔公司 动态静噪检测功率控制
CN101882956A (zh) * 2010-07-08 2010-11-10 威盛电子股份有限公司 数据传输系统和方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7769048B2 (en) * 2008-06-25 2010-08-03 Intel Corporation Link and lane level packetization scheme of encoding in serial links

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104298A1 (en) * 2006-11-01 2008-05-01 Wei-Hung Liu Expandable Express Card Capable of Isolating Noise and Method for Combining Functionalities of the Express Card with a Non-Host Device
CN101055304A (zh) * 2007-06-04 2007-10-17 杭州华三通信技术有限公司 一种电路连接状态检测系统及方法
CN101714022A (zh) * 2008-09-29 2010-05-26 英特尔公司 动态静噪检测功率控制
CN101882956A (zh) * 2010-07-08 2010-11-10 威盛电子股份有限公司 数据传输系统和方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11836059B1 (en) 2020-12-14 2023-12-05 Sanblaze Technology, Inc. System and method for testing non-volatile memory express storage devices

Also Published As

Publication number Publication date
CN103797732B (zh) 2016-01-20
CN103797732A (zh) 2014-05-14

Similar Documents

Publication Publication Date Title
WO2015066842A1 (zh) 通信方法、高速外围组件互连pcie芯片及pcie设备
KR101159517B1 (ko) 유니버설 시리얼 버스 네트워크에 액세스하기 위한 시스템및 방법
JP5837025B2 (ja) 100gbase−kp4に対するpmaサイズのトレーニング
KR102569761B1 (ko) 반도체 장치, 반도체 시스템 및 반도체 장치의 동작 방법
JP6054541B2 (ja) 全二重差動対を有するusbインタフェース上のイーサネット(登録商標)
US9940277B2 (en) Multi-channel peripheral interconnect supporting simultaneous video and bus protocols
CA2880979A1 (en) Usb 3.0 link layer timer adjustment to extend distance
JP2018523957A (ja) ネットワーク機器
US20130254440A1 (en) Devices and methods for transmitting usb termination signals over extension media
CN101977082A (zh) 光收发模块、光传输装置及光传输方法
WO2018059498A1 (zh) 一种端口速率确定方法以及计算机设备
US9455867B2 (en) Automatic configuration of a repeater
US20220141709A1 (en) Multi-protocol Communication Network
WO2014101158A1 (zh) 接收端检测方法、检测电路、光模块及系统
JP2010517458A (ja) 標準的な相互接続リンクによる設定情報の通信
US10958454B1 (en) System and method for cable link establishment
US9215113B1 (en) Link training in a communication port
JP2011215855A (ja) Usbデバイス制御回路、及びusbデバイスの制御方法
US20150309956A1 (en) Data terminal, data transmission system, and hot swapping control method
JP2006020224A (ja) 通信制御装置、電子機器および通信制御方法
WO2018035681A1 (zh) 建立端口连接的方法及端口芯片
CN113111021A (zh) 一种uart主从线路通信控制电路及方法
US9880968B2 (en) Bi-directional communication between electronic components
CN114265806B (zh) 一种实现usb数据信号共享的方法、装置、设备和存储介质
TWI358210B (en) Optical transmitting and receiving modules and sys

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13897113

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13897113

Country of ref document: EP

Kind code of ref document: A1