[go: up one dir, main page]

CN115550286A - PCIe switch management device and method and PCIe switch - Google Patents

PCIe switch management device and method and PCIe switch Download PDF

Info

Publication number
CN115550286A
CN115550286A CN202211131387.5A CN202211131387A CN115550286A CN 115550286 A CN115550286 A CN 115550286A CN 202211131387 A CN202211131387 A CN 202211131387A CN 115550286 A CN115550286 A CN 115550286A
Authority
CN
China
Prior art keywords
link
state
control module
pcie
control
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
Application number
CN202211131387.5A
Other languages
Chinese (zh)
Inventor
吕骏华
祝红彬
朱喜
高昌垒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
STMicroelectronics Shenzhen R&D Co Ltd
Original Assignee
STMicroelectronics Shenzhen R&D Co Ltd
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 STMicroelectronics Shenzhen R&D Co Ltd filed Critical STMicroelectronics Shenzhen R&D Co Ltd
Priority to CN202211131387.5A priority Critical patent/CN115550286A/en
Publication of CN115550286A publication Critical patent/CN115550286A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Sources (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请属于PCIe通信技术领域,尤其涉及一种PCIe交换机管理装置、方法及PCIe交换机。通过本申请中提供的PCIe交换机管理装置,能够实现PCIe交换机链路和电源管理的协同控制,从而实现PCIe交换机低功耗的转换。该装置包括第一控制模块、第二控制模块和全局电源管理模块,第一控制模块,用于监控第一链路的第一链路状态;全局电源管理模块,用于根据第一链路状态生成第一控制信号;第二控制模块,用于根据第一控制信号控制更新第二链路的第二链路状态,更新后的第二链路状态与第一链路状态相同。

Figure 202211131387

The present application belongs to the technical field of PCIe communication, and in particular relates to a PCIe switch management device and method and a PCIe switch. Through the PCIe switch management device provided in this application, the coordinated control of the PCIe switch link and power management can be realized, thereby realizing the low power consumption conversion of the PCIe switch. The device includes a first control module, a second control module and a global power management module, the first control module is used to monitor the first link state of the first link; the global power management module is used to A first control signal is generated; a second control module is configured to update a second link state of the second link according to the first control signal, and the updated second link state is the same as the first link state.

Figure 202211131387

Description

一种PCIe交换机管理装置、方法及PCIe交换机A PCIe switch management device, method and PCIe switch

技术领域technical field

本申请属于PCIe通信技术领域,尤其涉及一种PCIe交换机管理装置、方法及PCIe交换机。The present application belongs to the technical field of PCIe communication, and in particular relates to a PCIe switch management device and method and a PCIe switch.

背景技术Background technique

高速串行计算机扩展总线标准(Peripheral Component Interconnect Express,PCIe)广泛应用于数据的采集和存储等领域。PCIe总线所连接的PCIe交换机的电源状态包括设备电源状态(device power states,简称D-states)和链路电源状态(link powerstates,简称L-states)。The high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) is widely used in fields such as data acquisition and storage. The power states of the PCIe switches connected to the PCIe bus include device power states (device power states, D-states for short) and link power states (link power states, L-states for short).

PCIe协议规定了两种电源管理机制,分别为PCI电源管理(Power Management,PCI-PM)机制和活动状态电源管理(Active State Power Management,ASPM)。PCIe协议规定设备电源状态包括D0状态、D1状态、D2状态、D3hot状态、D3cold等状态。PCIe协议规定了链路电源状态包括L0状态、L0s状态、L1状态,L2/3ready状态,L2状态,L3状态等状态。ASPM机制只在D0电源状态下工作,其可能的链路状态为L0,L0s和L1。PCI-PM机制在任意电源状态下工作。然而,PCIe协议中并没有具体说明PCIe交换机在进入到某种状态时,设备内部的低功耗具体应该如何实现,因此,亟待提供一种PCIe交换机管理方法。The PCIe protocol specifies two power management mechanisms, namely, a PCI power management (PCI-PM) mechanism and an active state power management (Active State Power Management, ASPM). The PCIe protocol stipulates that the device power state includes D0 state, D1 state, D2 state, D3hot state, D3cold state, and the like. The PCIe protocol stipulates that the link power state includes L0 state, L0s state, L1 state, L2/3ready state, L2 state, L3 state and other states. The ASPM mechanism only works in the D0 power state, and its possible link states are L0, L0s and L1. The PCI-PM mechanism works in any power state. However, the PCIe protocol does not specifically specify how to achieve low power consumption inside the device when the PCIe switch enters a certain state. Therefore, it is urgent to provide a PCIe switch management method.

发明内容Contents of the invention

有鉴于此,本申请实施例提供了一种PCIe交换机管理装置、方法及PCIe交换机,该方法能够在满足协议要求的前提下,实现设备PCIe交换机的低功耗设置。In view of this, the embodiment of the present application provides a PCIe switch management device, method and PCIe switch, and the method can realize low power consumption setting of the device PCIe switch on the premise of meeting protocol requirements.

本申请实施例的第一方面提供了一种PCIe交换机管理装置,包括:第一控制模块、第二控制模块和全局电源管理模块,第一控制模块通过第一接口与第一PCIe设备连接,第二控制模块通过第二接口与第二PCIe设备连接,第一控制模块与第一PCIe设备之间的链路为第一链路,第二控制模块与第二PCIe设备之间的链路为第二链路;第一控制模块,用于监控第一链路的第一链路状态;全局电源管理模块,用于根据第一链路状态生成第一控制信号;第二控制模块,用于根据第一控制信号控制更新第二链路的第二链路状态,更新后的第二链路状态与第一链路状态相同。The first aspect of the embodiment of the present application provides a PCIe switch management device, including: a first control module, a second control module and a global power management module, the first control module is connected to the first PCIe device through a first interface, and the second The two control modules are connected to the second PCIe device through the second interface, the link between the first control module and the first PCIe device is the first link, and the link between the second control module and the second PCIe device is the second link. Two links; the first control module is used to monitor the first link state of the first link; the global power management module is used to generate the first control signal according to the first link state; the second control module is used to generate the first control signal according to the first link state; The first control signal controls to update the second link state of the second link, and the updated second link state is the same as the first link state.

结合第一方面,在第一方面的第一种可能实现方式中,第一控制模块为上游端口控制模块,第二控制模块为下游端口控制模块时,第一链路状态是L0s,控制信号为usp_in_l0s;第二控制模块,具体用于在满足第一预设条件时,根据usp_in_l0s将第二链路状态更新为L0s;其中,第一预设条件包括:上游端口没有TLP或DLLP等待发送,且usp_in_l0s信号为高电平。In combination with the first aspect, in the first possible implementation of the first aspect, when the first control module is an upstream port control module and the second control module is a downstream port control module, the first link state is L0s, and the control signal is usp_in_l0s; the second control module is specifically used to update the second link state to L0s according to usp_in_l0s when the first preset condition is met; wherein, the first preset condition includes: the upstream port has no TLP or DLLP waiting to send, and usp_in_l0s signal is high level.

结合第一方面,在第一方面的第二种可能实现方式中,第一控制模块为下游端口控制模块,第二控制模块为上游端口控制模块时,第一链路状态是L0s,控制信号为all_dsp_in_rl0s;第二控制模块,具体用于在满足第二预设条件时,根据all_dsp_in_rl0s将第二链路状态更新为L0s;其中,第二预设条件包括:下游端口没有TLP或DLLP等待发送,且all_dsp_in_rl0s信号为高电平。In combination with the first aspect, in the second possible implementation of the first aspect, when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L0s, and the control signal is all_dsp_in_rl0s; the second control module is specifically used to update the second link state to L0s according to all_dsp_in_rl0s when the second preset condition is met; wherein, the second preset condition includes: the downstream port has no TLP or DLLP waiting to send, and all_dsp_in_rl0s signal is high.

结合第一方面,在第一方面的第三种可能实现方式中,第一控制模块为下游端口控制模块,第二控制模块为上游端口控制模块时,第一链路状态是L1或功耗低于L1的状态,控制信号为all_dsp_in_l1;第二控制模块,具体用于在满足第三预设条件时,根据控制信号all_dsp_in_l1将第二链路更新为L1;其中,第三预设条件包括:第二链路的接收方向和发送方向均处于L0s的时间达到预设时间长度之后,第一链路状态处于L1 ASMP或功耗低于L1 ASMP的状态,等待正在发送的TLP报文发送完毕,并产生阻断信号阻止发送新的TLP报文,以使第二链路上的重传缓存为空。In combination with the first aspect, in the third possible implementation of the first aspect, when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L1 or low power consumption In the state of L1, the control signal is all_dsp_in_l1; the second control module is specifically used to update the second link to L1 according to the control signal all_dsp_in_l1 when the third preset condition is met; wherein, the third preset condition includes: the first After the receiving direction and sending direction of the two links are both in L0s for a preset time length, the first link state is in the state of L1 ASMP or the power consumption is lower than L1 ASMP, waiting for the TLP message being sent to be sent, and Generate a blocking signal to prevent sending a new TLP packet, so that the retransmission buffer on the second link is empty.

结合第一方面,在第一方面的第四种可能实现方式中,第一控制模块为下游端口控制模块,第二控制模块为上游端口控制模块时,第一链路状态是L1或功耗低于L1的状态,控制信号为PM_ENTER_L1 DLLP;第二控制模块,具体用于在满足第四预设条件时,根据PM_ENTER_L1 DLLP将第二链路更新为L1;其中,第二预设条件包括:第二链路的接收方向和发送方向均处于L0s的时间达到预设时间长度之后,第一链路状态处于L1 ASMP或功耗低于L1ASMP的状态,等待正在发送的TLP报文发送完毕,并产生阻断信号阻止发送新的TLP报文,以使发送链路上的重传缓存为空。In combination with the first aspect, in the fourth possible implementation of the first aspect, when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L1 or low power consumption In the state of L1, the control signal is PM_ENTER_L1 DLLP; the second control module is specifically used to update the second link to L1 according to PM_ENTER_L1 DLLP when the fourth preset condition is met; wherein, the second preset condition includes: the first After the receiving direction and sending direction of the second link are both in L0s for a preset period of time, the first link is in the state of L1 ASMP or the power consumption is lower than L1ASMP, waiting for the TLP message being sent to be sent, and generating The blocking signal prevents the sending of new TLP packets, so that the retransmission buffer on the sending link is empty.

结合第一方面,在第一方面的第五种可能实现方式中,第一控制模块,还用于获取第一PCIe设备发送的链路控制指令;全局电源管理模块,还用于根据链路控制指令生成第二控制信号;第二控制模块,还用于根据第二控制信号更新第二链路状态,更新后的第二链路状态与链路控制指令对应。With reference to the first aspect, in the fifth possible implementation manner of the first aspect, the first control module is also used to obtain the link control instruction sent by the first PCIe device; the global power management module is also used to control the The instruction generates a second control signal; the second control module is further configured to update the second link state according to the second control signal, and the updated second link state corresponds to the link control instruction.

结合第一方面,在第一方面的第六种可能实现方式中,第一PCIe设备为根组件设备,第二PCIe设备为PCIe终端设备;链路控制指令用于指示将第二链路状态更新为L2或L3状态;第一PCIe设备是PCIe终端设备,第二PCIe设备是根组件设备,链路控制指令用于指示将第二链路状态更新为L1状态。With reference to the first aspect, in the sixth possible implementation of the first aspect, the first PCIe device is a root component device, and the second PCIe device is a PCIe terminal device; the link control instruction is used to instruct to update the second link status It is in L2 or L3 state; the first PCIe device is a PCIe terminal device, the second PCIe device is a root component device, and the link control instruction is used to instruct to update the second link state to L1 state.

结合第一方面,在第一方面的第七种可能实现方式中,当第一控制模块为下游端口控制模块,第二控制模块为上游端口控制模块时,第二控制模块,用于在第一链路状态为L0s时,将第二接口由P0状态置位P0s状态,并控制all_dsp_in_rl0信号为高电平;当第一控制模块为上游端口控制模块,第二控制模块为下游端口控制模块时,第二控制模块,还用于在第一链路状态为L0s时,将第二接口由P0状态置位P0s状态,并控制usp_in_rl0信号为高电平;在将第一链路或第二链路更新为L1时,第二控制模块,还用于将第一接口或第二接口由P0状态置位P1状态,关闭第一接口或第二接口输出的逻辑时钟,控制拉高aux_clk_sel信号。With reference to the first aspect, in the seventh possible implementation manner of the first aspect, when the first control module is a downstream port control module and the second control module is an upstream port control module, the second control module is used to When the link state is L0s, set the second interface to the P0s state from the P0 state, and control the all_dsp_in_rl0 signal to be high level; when the first control module is the upstream port control module, and the second control module is the downstream port control module, The second control module is also used to set the second interface from the P0 state to the P0s state when the first link state is L0s, and control the usp_in_rl0 signal to be high; when the first link or the second link When updating to L1, the second control module is also used to set the first interface or the second interface from the P0 state to the P1 state, turn off the logic clock output by the first interface or the second interface, and control the aux_clk_sel signal to be pulled high.

本申请实施例的第二方面提供了一种PCIe交换机管理方法,其特征在于,PCIe交换机包括第一接口和第二接口,第一接口和第一PCIe设备通过第一链路连接,第二接口和第二PCIe设备通过第二链路连接,该方法包括:监控第一链路的第一链路状态;根据第一链路状态生成第一控制信号;根据第一控制信号控制更新第二链路的第二链路状态,更新后的第二链路状态与第一链路状态相同。The second aspect of the embodiment of the present application provides a PCIe switch management method, characterized in that the PCIe switch includes a first interface and a second interface, the first interface and the first PCIe device are connected through a first link, and the second interface Connecting with a second PCIe device through a second link, the method includes: monitoring a first link state of the first link; generating a first control signal according to the first link state; controlling and updating the second link according to the first control signal The second link state of the road, and the updated second link state is the same as the first link state.

本申请实施例的第三方面提供了一种PCIe交换机,其特征在于,包括如第一方面的PCIe交换机管理装置。A third aspect of the embodiments of the present application provides a PCIe switch, which is characterized in that it includes the PCIe switch management device according to the first aspect.

本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the embodiments of the present application have the following beneficial effects:

本实施例中提供的一种PCIe交换机管理装置、方法以及PCIe交换机,通过本实施例中提供的PCIe交换机管理装置,能够实现PCIe交换机链路和电源管理的协同控制,从而实现PCIe交换机低功耗的转换。A PCIe switch management device, method, and PCIe switch provided in this embodiment, through the PCIe switch management device provided in this embodiment, can realize the coordinated control of the PCIe switch link and power management, thereby realizing low power consumption of the PCIe switch conversion.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings that need to be used in the descriptions of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only for the present application For some embodiments, those of ordinary skill in the art can also obtain other drawings based on these drawings without paying creative efforts.

图1是本申请实施例提供的一种PCIe交换机的应用场景示意图;Fig. 1 is a schematic diagram of an application scenario of a PCIe switch provided by an embodiment of the present application;

图2是本申请实施例提供的一种PCIe交换机及其与PCIe交换机管理装置与的设置关系的结构示意图;Fig. 2 is a kind of PCIe switch provided by the embodiment of the present application and the structural representation of its setting relation with PCIe switch management device;

图3是本申请实施例提供的一种PCIe交换机低功耗实现框图;Fig. 3 is a kind of low power consumption implementation block diagram of PCIe switch provided by the embodiment of the present application;

图4是本申请一个实施例提供的全局电源管理模块实现全局电源消息处理的示意图;FIG. 4 is a schematic diagram of global power supply message processing implemented by a global power management module provided by an embodiment of the present application;

图5是本申请一个实施例提供的PCI-PM机制进入L1链路状态的流程示意图;Fig. 5 is a schematic flow chart of the PCI-PM mechanism provided by an embodiment of the present application entering the L1 link state;

图6是本申请一个实施例提供的ASMP机制进入L1链路状态的流程示意图;Fig. 6 is a schematic flow diagram of the ASMP mechanism provided by an embodiment of the present application entering the L1 link state;

图7是本申请一个实施例提供的通过时钟控制单元与其对应连接的物理层接口联动的方式使得上游端口进入和退出L0s链路状态的流程示意图;FIG. 7 is a schematic flow diagram of the upstream port entering and exiting the L0s link state through the linkage of the clock control unit and its correspondingly connected physical layer interface provided by an embodiment of the present application;

图8是本申请一个实施例提供的通过时钟控制单元与其对应连接的物理层接口联动的方式使得下游端口进入和退出L0s链路状态的流程示意图;FIG. 8 is a schematic flow diagram of the downstream port entering and exiting the L0s link state through the linkage of the clock control unit and its correspondingly connected physical layer interface provided by an embodiment of the present application;

图9是本申请一个实施例提供的通过时钟控制单元与其对应连接的物理层接口联动的方式进入和退出L1链路状态的流程示意图;FIG. 9 is a schematic flow diagram of entering and exiting the L1 link state through linkage between the clock control unit and the corresponding physical layer interface provided by an embodiment of the present application;

图10为本申请实施例提供的一种PCIe交换机管理方法的流程图。FIG. 10 is a flowchart of a method for managing a PCIe switch provided in an embodiment of the present application.

具体实施方式detailed description

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

以下结合具体的实施例对本申请提供的技术方案进行详细的解释说明。The technical solutions provided by the present application will be explained in detail below in conjunction with specific embodiments.

下面对本申请实施例中涉及的一些名词或者术语进行解释说明。Some nouns or terms involved in the embodiments of the present application are explained below.

(一)设备电源状态(1) Device power status

D0状态:正常工作的电源状态。D0 state: power state for normal operation.

D1状态:轻度休眠状态。D1 state: light dormancy state.

D2状态:深度休眠状态。D2 state: deep sleep state.

D3hot状态:全关闭状态,但设备的电源尚未切断。D3hot state: fully closed state, but the power supply of the device has not been cut off.

D3cold状态:全关闭状态,但设备的电源尚已切断。D3cold state: fully closed state, but the power supply of the device has not been cut off.

(二)链路电源状态(2) Link power status

L0状态:正常工作的链路状态。L0 state: The link state of normal operation.

L0s状态:待机状态。L0s state: standby state.

L1状态:低功耗待机状态。L1 state: low power standby state.

L2/3ready状态:电源关闭阶段状态。L2/3ready state: the state of the power off stage.

L2状态:低功耗休眠状态。L2 state: low power sleep state.

L3状态:关闭电源状态。L3 state: power off state.

其中,在不同的设备电源状态下,PCI-PM机制和ASPM机制下,各自分别所能够进入的链路状态如下表1所示:Among them, under different device power states, under the PCI-PM mechanism and the ASPM mechanism, the respective link states that can be entered are shown in Table 1 below:

表1Table 1

设备电源状态Device Power Status PCI-PMPCI-PM ASPMASPM D0D0 L0L0 L0,L0s,L1L0, L0s, L1 D1D1 L1L1 -- D2D2 L1L1 -- D3D3 L1,L2/3ready,L2,L3L1, L2/3ready, L2, L3 --

(三)PHY接口:物理接口(3) PHY interface: physical interface

(四)信号类型(4) Signal type

PME_Turn_Off:一种协议规定报文名称,是一种电源管理事件,该事件将所有PCIe设备链路状态改为L2/L3。PME_Turn_Off: A protocol-specified message name, which is a power management event that changes the link status of all PCIe devices to L2/L3.

RC:根复合体(root complex)设备。RC: root complex (root complex) device.

PME_TO_Ack:一种协议规定报文名称,该报文是对PME_turn_off的确认。PME_TO_Ack: A protocol-specified message name, which is a confirmation of PME_turn_off.

turn_off_rcv_ack:内部信号,指示当前下游端口收到PME_TO_Ack消息。turn_off_rcv_ack: Internal signal indicating that the current downstream port has received a PME_TO_Ack message.

all_dsp_rcv_ack:内部信号,指示所有下游端口都收到PME_TO_Ack消息。all_dsp_rcv_ack: Internal signal indicating that all downstream ports have received PME_TO_Ack messages.

(五)链路状态(5) Link status

link_in_rl0s:链路正处于L0s的链路状态。link_in_rl0s: The link is in the link state of L0s.

link_in_l1:链路正处于L1或更深链路状态。link_in_l1: The link is in L1 or deeper link state.

link_in_l23:链路正处于L2/L3的链路状态。link_in_l23: The link is in the link state of L2/L3.

l1_exit:链路退出L1的链路状态。l1_exit: The link exits the link state of L1.

l23_exit:链路退出L2/L3的链路状态。l23_exit: The link exits the link state of L2/L3.

tx链路是发送链路(transport),rx链路是接收链路(receive)。The tx link is the sending link (transport), and the rx link is the receiving link (receive).

(六)链路状态信号(6) Link status signal

all_dsp_in_rl0s:内部信号,指示所有下游端口的第二接收链路都处于L0s的链路状态。all_dsp_in_rl0s: an internal signal indicating that the second receive links of all downstream ports are in the link state of L0s.

usp_in_l0s:内部信号,表示上游端口第一接收链路处于L0s的链路状态。usp_in_l0s: internal signal, indicating that the first receiving link of the upstream port is in the link state of L0s.

PM_Enter_L1 DLLP:一种协议规定报文名称,是一种电源管理事件,该事件表示下游组件请求进入L1的链路状态。PM_Enter_L1 DLLP: A protocol-specified message name, which is a power management event, which indicates that a downstream component requests to enter the link state of L1.

PM_Active_state_request_L1 DLLP:一种协议规定报文名称,该报文表示下游组件请求通过ASPM进入L1的链路状态。PM_Active_state_request_L1 DLLP: A protocol-specified message name, which indicates that the downstream component requests to enter the link state of L1 through ASPM.

all_dsp_in_l1信号:内部信号,指示所有下游端口都处于L1或更深的链路状态。all_dsp_in_l1 signal: Internal signal indicating that all downstream ports are in L1 or deeper link state.

PM_Enter_L23 DLLP:一种协议规定报文名称,是一种电源管理事件,该事件表示下游组件请求进入L2/3的链路状态。PM_Enter_L23 DLLP: A protocol-specified message name, which is a power management event, which indicates that the downstream component requests to enter the link state of L2/3.

ready_entr_l23信号:内部信号,指示所有下游端口都处于L2/L3的链路状态。ready_entr_l23 signal: an internal signal indicating that all downstream ports are in the link state of L2/L3.

one_dsp_exit_l1:内部信号,指示有一个或多个下游端口退出L1的链路状态。one_dsp_exit_l1: Internal signal indicating that one or more downstream ports exit the link state of L1.

req_exit_l1:内部信号,用于通知下游端口开始退出L1的链路状态。req_exit_l1: an internal signal, used to notify the downstream port to start exiting the link state of L1.

one_dsp_exit_l23:内部信号,用于告知上游端口有一个或多个下游端口退出L23的链路状态。one_dsp_exit_l23: internal signal, used to inform the upstream port that one or more downstream ports exit the link state of L23.

all_dsp_in_rl0s:内部信号,指示所有下游端口接收链路都处于L0s的链路状态。all_dsp_in_rl0s: internal signal, indicating that all downstream ports receive links are in the link state of L0s.

usp_in_l0s信号:内部信号,表示上游链路处于L0s的链路状态。usp_in_l0s signal: an internal signal, indicating that the upstream link is in the link state of L0s.

PMCSR:一种电源管理寄存器,表示PCIe协议寄存器。PMCSR: A power management register that represents the PCIe protocol register.

PM_ENTER_L1 DLLP报文:一种协议规定报文名称,用于表示通过PM-PCI机制进入L1链路状态的请求信号。PM_ENTER_L1 DLLP message: A protocol-specified message name used to represent a request signal to enter the L1 link state through the PM-PCI mechanism.

PM_Request_ack DLLP报文:一种协议规定报文名称,用于表示收到PM_ENTER_L1DLLP报文。PM_Request_ack DLLP message: A protocol-specified message name used to indicate receipt of a PM_ENTER_L1DLLP message.

PM_active_state_request_L1报文:一种协议规定报文名称,用于表示通过ASMP机制进入L1链路状态的请求信号。PM_active_state_request_L1 message: A protocol-specified message name used to indicate a request signal to enter the L1 link state through the ASMP mechanism.

PM_active_state_request_L1报文:一种协议规定报文名称,用于表示收到PM_active_state_request_L1报文。PM_active_state_request_L1 message: A protocol-specified message name used to indicate receipt of the PM_active_state_request_L1 message.

TLP:传输层报文。TLP: Transport Layer Packet.

DLLP:数据链路层报文。DLLP: Data Link Layer Packet.

图1为本申请一个实施例提供的PCIe交换机的应用场景示意图,参见图1所示,通常情况下,根组件(Root Complex,RC)和若干PCIe终端设备(通过PCIe交换机(也可称为Switch)连接。PCIe交换机用于实现根组件设备与各个PCIe终端设备,或者各个PCIe终端设备之间的数据传输。Fig. 1 is a schematic diagram of an application scenario of a PCIe switch provided by an embodiment of the present application, as shown in Fig. ) connection. The PCIe switch is used to implement data transmission between the root component device and each PCIe terminal device, or between each PCIe terminal device.

本实施例中提供的PCIe交换机包括PCIe交换机管理装置,如图2所示,阴影部分为本实施例提供的PCIe交换机管理装置的模块单元。本实施例中提供的PCIe交换机,包括:第一物理层接口(简称第一接口)、上游端口的端口控制器、下游端口的端口控制器、设置在上下游端口控制器之间的包交换模块以及第二物理层接口(简称第二接口)和PCIe交换机管理装置。其中,根据PCIe协议规定,在PCIe交换机中,上游端口的端口控制器数量为1,下游端口的端口控制器数量为n(n为1~32中的任意数值)。根组件设备与PCIe交换机通过第一物理层接口连接,PCIe终端设备与PCIe交换机通过第二物理层接口连接。The PCIe switch provided in this embodiment includes a PCIe switch management device, as shown in FIG. 2 , the shaded part is the module unit of the PCIe switch management device provided in this embodiment. The PCIe switch provided in this embodiment includes: a first physical layer interface (referred to as the first interface), a port controller of the upstream port, a port controller of the downstream port, and a packet switching module arranged between the upstream and downstream port controllers And a second physical layer interface (abbreviated as the second interface) and a PCIe switch management device. Wherein, according to the PCIe protocol, in the PCIe switch, the number of port controllers for the upstream port is 1, and the number of port controllers for the downstream ports is n (n is any value from 1 to 32). The root component device is connected to the PCIe switch through the first physical layer interface, and the PCIe terminal device is connected to the PCIe switch through the second physical layer interface.

结合本实施例中提供的PCIe交换机的结构,对本实施例中提供的PCIe交换机管理装置进行解释说明。参见图2所示,本实施例中提供的PCIe交换机管理装置,包括:上游端口控制模块、下游端口控制模块以及全局电源管理模块。上游端口控制模块设置在PCIe交换机的上游端口的端口控制器中,上游端口控制模块在执行对应的操作时是借助上游端口的端口控制器的协议逻辑完成的。同样的,下游端口控制模块设置在PCIe交换机的下游端口的端口控制器中,下游端口控制模块在执行对应的操作时是借助下游端口的端口控制器的协议逻辑完成的。全局电源管理模块内嵌在PCIe交换机中,与PCIe交换机中的包交换处理模块并列存在,并分别与上游端口控制模块和下游端口控制模块连接。需要说明的是,根据PCIe交换机结构中上下游端口属性的端口控制器数量的设置条件,本实施例中提供的PCIe交换机管理装置中,上游端口控制模块数量为1,下游端口控制模块的数量为n,其中,n为1~32中的任意数值。In combination with the structure of the PCIe switch provided in this embodiment, the PCIe switch management device provided in this embodiment is explained. Referring to FIG. 2 , the PCIe switch management device provided in this embodiment includes: an upstream port control module, a downstream port control module, and a global power management module. The upstream port control module is set in the port controller of the upstream port of the PCIe switch, and the upstream port control module performs corresponding operations by means of the protocol logic of the port controller of the upstream port. Similarly, the downstream port control module is set in the port controller of the downstream port of the PCIe switch, and the downstream port control module performs corresponding operations by means of the protocol logic of the port controller of the downstream port. The global power management module is embedded in the PCIe switch, exists side by side with the packet switching processing module in the PCIe switch, and is connected to the upstream port control module and the downstream port control module respectively. It should be noted that, according to the setting conditions of the number of port controllers of the upstream and downstream port attributes in the PCIe switch structure, in the PCIe switch management device provided in this embodiment, the number of upstream port control modules is 1, and the number of downstream port control modules is n, wherein, n is any value from 1 to 32.

本实施例提供的PCIe交换机中,全局电源管理模块与包交换处理模块并列存在,因此,全局电源管理模块在完成协同工作时与包交换模块的交换逻辑是独立工作的,因此不会占用带宽或者影响数据包的正常通信。In the PCIe switch provided by this embodiment, the global power management module and the packet switching processing module exist side by side. Therefore, the global power management module works independently from the switching logic of the packet switching module when the cooperative work is completed, so it does not occupy bandwidth or Affect the normal communication of data packets.

图3为本申请一个实施例提供的PCIe交换机低功耗实现框图。其中,图3中实线框部分为本申请一个实施例提供的PCIe交换机管理装置结构框图。参见图3所示,PCIe交换机管理装置中的上游端口控制模块可以基于差分链路通过第一物理层接口连接根组件设备,该差分链路包括发送通路和接收通路。下游端口控制模块可以基于差分链路通过第二物理层接口连接PCIe终端设备,该差分链路包括发送通路和接收通路。Fig. 3 is a block diagram of realizing low power consumption of a PCIe switch provided by an embodiment of the present application. Wherein, the solid-line frame part in FIG. 3 is a structural block diagram of a PCIe switch management device provided by an embodiment of the present application. Referring to FIG. 3 , the upstream port control module in the PCIe switch management device can be connected to the root component device through the first physical layer interface based on a differential link, and the differential link includes a sending path and a receiving path. The downstream port control module may be connected to the PCIe terminal device through a second physical layer interface based on a differential link, where the differential link includes a sending path and a receiving path.

以下以PCIe交换机管理装置中,上游端口控制模块的数量为1,下游端口控制模块数量为1为例对本实施例中提供的PCIe交换机管理装置以及PCIe交换机管理方法进行详细的解释说明。The PCIe switch management device and the PCIe switch management method provided in this embodiment are explained in detail below by taking the PCIe switch management device with one upstream port control module and one downstream port control module as an example.

上游端口控制模块,包括上游端口属性的消息处理单元、链路控制单元和时钟控制单元。The upstream port control module includes a message processing unit of the upstream port attribute, a link control unit and a clock control unit.

在上游端口中,消息处理单元用于,发送和接收PCIe协议规定的电源管理相关报文,还用于接收全局电源管理模块和链路控制单元的指令,向发送链路发送指定电源消息,并将接收到的电源消息反馈给链路控制单元和全局电源管理模块。In the upstream port, the message processing unit is used to send and receive power management related messages stipulated in the PCIe protocol, and is also used to receive instructions from the global power management module and the link control unit, send a specified power message to the sending link, and Feedback the received power message to the link control unit and the global power management module.

链路控制单元,用于根据消息处理单元和全局电源管理模块的信息,控制PCIe设备的链路状态和电源状态,并控制消息处理单元发送电源管理消息以及控制关闭和打开时钟。The link control unit is used to control the link state and power state of the PCIe device according to the information of the message processing unit and the global power management module, and control the message processing unit to send power management messages and control the closing and opening of the clock.

时钟控制单元,用于接收链路控制单元的指令,根据PIPE接口协议关闭和打开时钟,并控制物理层接口(PHY)的电源状态。The clock control unit is configured to receive instructions from the link control unit, turn off and turn on the clock according to the PIPE interface protocol, and control the power state of the physical layer interface (PHY).

下游端口控制模块,包括下游端口属性的消息处理单元、链路控制单元和时钟控制单元。The downstream port control module includes a message processing unit of downstream port attributes, a link control unit and a clock control unit.

在下游端口中,消息处理单元用于,发送和接收PCIe协议规定的电源管理相关报文,还用于接收全局电源管理模块和链路控制单元的指令,向发送链路发送指定电源消息,并将接收到的电源消息反馈给链路控制单元和全局电源管理模块。In the downstream port, the message processing unit is used to send and receive power management related messages stipulated in the PCIe protocol, and is also used to receive instructions from the global power management module and the link control unit, send a specified power message to the sending link, and Feedback the received power message to the link control unit and the global power management module.

链路控制单元,用于根据消息处理单元和全局电源管理模块的信息,控制PCIe设备的链路状态和电源状态,并控制消息处理单元发送电源管理消息以及控制关闭和打开时钟。The link control unit is used to control the link state and power state of the PCIe device according to the information of the message processing unit and the global power management module, and control the message processing unit to send power management messages and control the closing and opening of the clock.

时钟控制单元,用于接收链路控制单元的指令,根据PIPE接口协议关闭和打开时钟,并控制物理层接口(PHY)的电源状态。The clock control unit is configured to receive instructions from the link control unit, turn off and turn on the clock according to the PIPE interface protocol, and control the power state of the physical layer interface (PHY).

全局电源管理模块用于:(一)全局电源消息的处理;(二)链路状态的协同管理。The global power management module is used for: (1) processing of global power messages; (2) cooperative management of link states.

以下通过上述两方面分别对全局电源管理模块所执行的功能做详细的解释说明。The functions performed by the global power management module will be explained in detail below through the above two aspects respectively.

(一)全局电源消息的处理(1) Processing of global power supply messages

全局电源管理模块接收消息处理单元发送的链路状态信息,该链路状态信息为链路控制指令,用于指示将所有PCIe设备的链路状态修改状态为对应的低功耗状态,然后根据该链路状态信息控制消息处理单元生成控制信号,该控制信号用于使所有PCIe设备的链路状态修改为链路状态信息所对应的功耗状态。The global power management module receives the link state information sent by the message processing unit. The link state information is a link control instruction for instructing to modify the link state of all PCIe devices to a corresponding low power consumption state, and then according to the The link state information control message processing unit generates a control signal, which is used to modify the link state of all PCIe devices to the power consumption state corresponding to the link state information.

具体的,包括以下步骤:参见图4中所示,上游端口的消息处理单元,接收根组件设备通过发送通路发送的第一PME_Turn_Off消息后,该消息用于指示将下游端口连接的所有PCIe终端设备的链路状态修改为L2或L3状态,将turn_off(表示上游端口控制模块收到第一PME_Turn_Off消息)请求提交到全局电源管理模块;全局电源管理模块再控制全部活跃的下游端口的消息处理模块生成并发送第二PME_Turn_Off消息到与其相连的PCIe设备(例如,图5中的PCIe设备1和PCIe设备2等)。下游端口的消息处理模块发出第二PME_turn_off消息后等待PME_TO_Ack消息(在全部活跃的下游端口的PCIe设备接收到对应的第二PME_Turn_Off消息后,会向各自的消息处理模块发送PME_TO_Ack消息,表示已接收到第二PME_Turn_Off消息)确认,若收到PME_TO_Ack消息,下游端口消息处理模块置位turn_off_rcv_ack(表示当前下游端口收到PME_TO_Ack消息)信号通知全局电源管理模块。全局电源管理模块等待全部活跃的下游端口消息处理模块置位turn_off_rcv_ack信号(即表示下游端口所连接的所有PCIe设备的链路状态均修改为L2或L3状态),则置位all_dsp_rcv_ack(表示所有下游端口都收到PME_TO_Ack消息)信号至上游端口消息处理模块,该模块生成PME_TO_Ack消息并发送至根组件设备。Specifically, the following steps are included: Referring to Fig. 4, the message processing unit of the upstream port, after receiving the first PME_Turn_Off message sent by the root component device through the sending path, the message is used to indicate all PCIe terminal devices connected to the downstream port The link state of the link is changed to L2 or L3 state, and the turn_off (indicating that the upstream port control module receives the first PME_Turn_Off message) request is submitted to the global power management module; the global power management module then controls the message processing module of all active downstream ports to generate And send the second PME_Turn_Off message to the PCIe device connected thereto (for example, PCIe device 1 and PCIe device 2 in FIG. 5 , etc.). After the message processing module of the downstream port sends the second PME_turn_off message, it waits for the PME_TO_Ack message (after receiving the corresponding second PME_Turn_Off message, the PCIe devices on all active downstream ports will send the PME_TO_Ack message to the respective message processing modules, indicating that they have received the PME_TO_Ack message. The second PME_Turn_Off message) confirms that if the PME_TO_Ack message is received, the downstream port message processing module sets turn_off_rcv_ack (indicating that the current downstream port receives the PME_TO_Ack message) signal to notify the global power management module. The global power management module waits for all active downstream port message processing modules to set the turn_off_rcv_ack signal (that is, to indicate that the link status of all PCIe devices connected to the downstream port is changed to L2 or L3), then set all_dsp_rcv_ack (to indicate that all downstream ports received PME_TO_Ack message) signal to the upstream port message processing module, the module generates a PME_TO_Ack message and sends it to the root component device.

(二)链路状态的协同管理(2) Collaborative management of link state

全局电源管理模块通过链路控制单元接收各个端口的链路状态信息,该链路状态信息用于指示上下游各个端口的链路状态,然后根据该链路状态信息,生成对应的控制信号,再根据该控制信号对上下游端口所对应的链路状态进行协同管理。The global power management module receives the link status information of each port through the link control unit. The link status information is used to indicate the link status of each upstream and downstream port, and then generates a corresponding control signal according to the link status information, and then According to the control signal, the link states corresponding to the upstream and downstream ports are coordinated and managed.

链路控制单元,用于监测对应接收链路以及发送链路的链路状态,比如,链路控制单元监控PCIe终端设备与PCIe交换机之间接收链路以及发送链路的链路状态。链路控制单元,还用于将所监控到的对应接收链路以及发送链路的链路状态发送给全局电源管理模块。The link control unit is configured to monitor the link status of the corresponding receiving link and the sending link. For example, the link control unit monitors the link status of the receiving link and the sending link between the PCIe terminal device and the PCIe switch. The link control unit is further configured to send the monitored link statuses of the corresponding receiving link and the sending link to the global power management module.

其中,链路控制单元是通过内部信号link_in_rl0s(表示链路正处于L0s),link_in_l1(表示链路正处于L1或更深链路状态),link_in_l23(表示链路正处于L2/L3),l1_exit(表示链路退出L1),l23_exit(表示链路退出L2/L3)将对应端口的链路状态进行反馈的。以下以具体的示例进行解释说明。Among them, the link control unit uses internal signals link_in_rl0s (indicating that the link is in L0s), link_in_l1 (indicating that the link is in L1 or deeper link state), link_in_l23 (indicating that the link is in L2/L3), l1_exit (indicating that the link is in L2/L3), l1_exit (indicating The link exits L1), and l23_exit (indicating that the link exits L2/L3) feeds back the link status of the corresponding port. The following uses specific examples for explanation.

1、link_in_rL0s1. link_in_rL0s

参见图3中所示,若下游端口的接收链路状态处于L0s,则下游端口的链路控制单元置位link_in_rl0s以向全局电源管理模块报告。当全局电源管理模块检测到所有下游端口接收链路方向进入L0s链路状态时,置位all_dsp_in_rl0s(表示所有下游端口的接收链路都处于L0s状态)信号至上游端口的链路控制单元,上游端口的链路控制单元控制发送链路方向开始执行L0s的进入流程。Referring to FIG. 3 , if the receiving link status of the downstream port is L0s, the link control unit of the downstream port sets link_in_r10s to report to the global power management module. When the global power management module detects that the receiving link direction of all downstream ports enters the L0s link state, it sets all_dsp_in_rl0s (representing that the receiving links of all downstream ports are in the L0s state) signal to the link control unit of the upstream port, and the upstream port The link control unit controls the sending link direction and starts to execute the entry process of L0s.

当上游端口的接收链路方向进入L0s后,上游端口的链路控制单元置位link_in_rl0s(表示接收链路处于L0s状态)以向全局电源管理模块报告,全局电源管理模块接收到link_in_rl0s信号后,置位usp_in_l0s(表示接收链路处于L0s状态)信号通知到所有下游端口的链路控制单元。下游端口的链路控制单元控制下游端口的所有发送链路方向开始执行L0s的进入流程。After the receiving link direction of the upstream port enters L0s, the link control unit of the upstream port sets link_in_rl0s (representing that the receiving link is in the L0s state) to report to the global power management module. After the global power management module receives the link_in_rl0s signal, it sets Bit usp_in_l0s (indicating that the receive link is in L0s state) signals to the Link Control Units of all downstream ports. The link control unit of the downstream port controls all sending link directions of the downstream port and starts to execute the entry process of L0s.

2、link_in_L12. link_in_L1

需要说明的是,根据PCIe协议规定,进入L1链路状态的请求只可以由PCIe交换机的下游组件发起的,在本实施例中,上下游组件是以差分线进行划分的,例如,参见图3所示,若图中的下游组件为PCIe交换机的上游端口,则图中的上游组件为与PCIe交换机上游端口相连接的PCIe设备,如根组件RC。若图中的上游组件为PCIe交换机的下游端口,则图中的下游组件为与PCIe交换机下游端口相连接的PCIe设备,如端点设备。也就是说,进入L1链路状态的请求只可以由上游端口或者与下游端口连接的PCIe设备发起。It should be noted that, according to the PCIe protocol, the request to enter the L1 link state can only be initiated by the downstream components of the PCIe switch. In this embodiment, the upstream and downstream components are divided by differential lines. For example, see FIG. 3 As shown, if the downstream component in the figure is the upstream port of the PCIe switch, the upstream component in the figure is the PCIe device connected to the upstream port of the PCIe switch, such as the root component RC. If the upstream component in the figure is a downstream port of the PCIe switch, the downstream component in the figure is a PCIe device connected to the downstream port of the PCIe switch, such as an endpoint device. That is to say, the request to enter the L1 link state can only be initiated by an upstream port or a PCIe device connected to a downstream port.

PCIe协议规定通过上层软件控制的方式进入L1链路状态时,使用PM_Enter_L1DLLP(表示下游组件请求通过上层软件控制的方式进入链路L1状态)信号的链路状态信息,具体过程参见上述实施例中全局电源管理模块实现全局电源消息处理的过程。The PCIe protocol stipulates that when entering the L1 link state through the control of the upper layer software, the link state information of the signal PM_Enter_L1DLLP (indicating that the downstream component requests to enter the link L1 state through the control of the upper layer software) signal is used. For the specific process, refer to the global The power management module implements the process of global power message processing.

硬件方式自动进入L1状态使用PM_Active_state_request_L1 DLLP(表示下游组件请求通过ASPM进入L1的链路状态)信号。作为可以发起进入ASPM L1(通过ASPM方式进入链路L1状态)链路状态的PCIe交换机上游端口所在链路,进入ASPM L1的条件之一是所有下游端口链路均处于L1(或更深)的链路状态,或者链路处于关闭状态。因此,若下游端口链路状态处于L1或更低,则下游端口的链路控制单元置位link_in_l1(表示下游端口链路处于L1或更深的链路状态)以向全局电源管理模块报告。当全局电源管理模块检测到所有下游端口的链路状态均为L1链路状态时,置位all_dsp_in_l1信号(表示所有下游端口的链路状态都处于L1或更深的链路状态)给到上游端口的链路控制单元,上游端口的链路控制单元控制上游端口链路开始执行L1的进入流程。The hardware method automatically enters the L1 state using the PM_Active_state_request_L1 DLLP (indicating that the downstream component requests to enter the L1 link state through ASPM) signal. One of the conditions for entering ASPM L1 is that all downstream port links are in L1 (or deeper) chains. link status, or the link is down. Therefore, if the link state of the downstream port is L1 or lower, the link control unit of the downstream port sets link_in_l1 (indicating that the link state of the downstream port is L1 or deeper) to report to the global power management module. When the global power management module detects that the link status of all downstream ports is L1 link status, it sets the all_dsp_in_l1 signal (indicating that the link status of all downstream ports is in L1 or deeper link status) to the upstream port A link control unit, the link control unit of the upstream port controls the link of the upstream port to start executing the L1 entry process.

3、link_in_L233. link_in_L23

PCIe协议规定上游端口链路进入L23 Ready的链路状态条件之一是所有下游端口链路进入L23 Ready的链路状态。上游端口发送PM_Enter_L23 DLLP(表示下游组件请求进入L23的链路状态),随后上游端口链路进入L23 Ready的链路状态。因此若下游端口链路状态处于L23ready,则下游端口的链路控制单元置位link_in_l23(表示所有下游端口链路都处于L2/L3的链路状态)以向全局电源管理模块报告。当全局电源管理模块检测到所有下游端口链路为L23Ready的链路状态时,置位ready_entr_l23信号(表示所有下游端口链路都处于L23的链路状态)给到上游端口的链路控制单元,上游端口的链路控制单元控制上游端口链路方向开始执行L23的进入流程。The PCIe protocol stipulates that one of the link state conditions for the upstream port link to enter the L23 Ready link state is that all the downstream port links enter the L23 Ready link state. The upstream port sends PM_Enter_L23 DLLP (indicating that the downstream component requests to enter the link state of L23), and then the link of the upstream port enters the link state of L23 Ready. Therefore, if the link state of the downstream port is L23ready, the link control unit of the downstream port sets link_in_123 (indicating that all downstream port links are in the link state of L2/L3) to report to the global power management module. When the global power management module detects that all downstream port links are in the link state of L23Ready, it sets the ready_entr_l23 signal (indicating that all downstream port links are in the link state of L23) to the link control unit of the upstream port, and the upstream The link control unit of the port controls the link direction of the upstream port and starts to execute the L23 entry process.

4、L1_exit4. L1_exit

若下游端口链路从L1的链路状态退出,则下游端口的链路控制单元置位L1_exit(表示下游端口链路从L1的链路状态退出),全局电源管理模块感知到所有下游端口中有任意一个或多个下游端口链路退出L1的链路状态时,置位one_dsp_exit_l1(表示有一个或多个下游端口链路退出L1的链路状态)通知到上游端口的链路控制单元,上游端口的链路控制模单元控制上游端口链路开始进入L1的退出流程。If the downstream port link exits from the link state of L1, the link control unit of the downstream port sets L1_exit (indicating that the downstream port link exits from the link state of L1), and the global power management module perceives that all downstream ports have When any one or more downstream port links exit the link state of L1, set one_dsp_exit_l1 (indicating that one or more downstream port links exit the link state of L1) to notify the link control unit of the upstream port, and the upstream port The link control module unit controls the upstream port link to start entering the exit process of L1.

若上游端口链路从L1的链路状态退出,则上游端口的链路控制单元置位L1_exit(表示端口链路状态退出L1),全局电源管理模块感知到上游端口链路退出L1的链路状态,则会置位req_exit_l1(用于通知下游端口链路开始退出L1的链路状态)信号通知到下游端口的链路控制单元,下游端口的链路控制单元控制下游端口的链路开始进入L1的退出流程。If the upstream port link exits from the link state of L1, the link control unit of the upstream port sets L1_exit (indicating that the port link state exits L1), and the global power management module perceives that the upstream port link exits the link state of L1 , will set req_exit_l1 (used to notify the downstream port that the link starts to exit the link state of L1) to notify the link control unit of the downstream port, and the link control unit of the downstream port controls the link of the downstream port to start to enter the L1 Exit process.

5、L23的退出5. Withdrawal of L23

若下游端口链路状态从L23退出,则下游端口的链路控制单元置位L23_exit,全局电源管理模块感知到所有下游端口中有任意一个或多个下游端口退出L23链路状态时,置位one_dsp_exit_l23(用于告知上游端口有一个或多个下游端口退出l23链路状态)通知到上游端口的链路控制单元,上游端口的链路控制单元控制上游端口的链路开始进入L23的退出流程。If the link state of the downstream port exits from L23, the link control unit of the downstream port sets L23_exit, and when the global power management module senses that any one or more downstream ports of all downstream ports exit the L23 link state, it sets one_dsp_exit_l23 (Used to inform the upstream port that one or more downstream ports exit the L23 link state) notify the link control unit of the upstream port, and the link control unit of the upstream port controls the link of the upstream port to start entering the L23 exit process.

链路控制单元,用于通过全局电源管理模块,与其他端口的链路控制单元同步链路状态,并控制各自对应的端口进入各自的链路状态。以下介绍链路控制单元在具体控制对应的上下游端口进入不同的链路状态时,其所执行的具体操作。The link control unit is configured to synchronize link states with link control units of other ports through the global power management module, and control respective corresponding ports to enter respective link states. The following describes specific operations performed by the link control unit when specifically controlling the corresponding upstream and downstream ports to enter different link states.

1、L0s进入1. L0s enters

对于上游端口的链路控制单元,若本端口没有TLP(传输层报文)或DLLP(数据链路层报文)等待发送,且all_dsp_in_rl0s(表示所有下游端口的接收链路都处于L0s的链路状态)信号为高,则满足上游端口的发送链路进入L0s状态的条件;对于下游端口的链路控制单元,若本端口没有TLP或DLLP等待发送,且usp_in_l0s信号(表示上游端口的发送链路处于L0s的链路状态)为高,则TLP或DLLP等待发送。当链路控制单元检测到对应上下游端口的链路满足进入L0s的条件的时间达到第一预设时间长度之后,控制对应的链路进入L0s的链路状态。链路控制单元控制对应物理层接口的发送器发送电器闲序列,将发送器置位Hi-Z状态以降低发送器功耗,从而降低PCIe交换机的功耗。For the link control unit of the upstream port, if there is no TLP (transport layer message) or DLLP (data link layer message) waiting to be sent on this port, and all_dsp_in_rl0s (representing that the receiving links of all downstream ports are in the link of L0s State) signal is high, then satisfy the condition that the sending link of upstream port enters the L0s state; For the link control unit of downstream port, if this port does not have TLP or DLLP to wait to send, and usp_in_l0s signal (representing the sending link of upstream port Link state in L0s) is high, then TLP or DLLP is waiting to send. When the link control unit detects that the link corresponding to the upstream and downstream ports satisfies the condition of entering L0s for a first preset time length, it controls the corresponding link to enter the link state of L0s. The link control unit controls the transmitter corresponding to the physical layer interface to send an electrical idle sequence, and sets the transmitter to the Hi-Z state to reduce the power consumption of the transmitter, thereby reducing the power consumption of the PCIe switch.

2、L0s退出2. L0s exit

当链路控制单元检测到对应端口不再满足进入L0s条件时,控制物理层接口的发送器退出Hi-Z状态,并发送N个FTS有序集通知对端设备退出L0s。When the link control unit detects that the corresponding port no longer meets the conditions for entering L0s, the transmitter controlling the physical layer interface exits the Hi-Z state, and sends N FTS ordered sets to notify the peer device to exit L0s.

3、L1进入3. L1 enters

L1链路状态的进入方式有两种,一种是PM-PCI机制,另一种是ASPM机制。There are two ways to enter the L1 link state, one is the PM-PCI mechanism, and the other is the ASPM mechanism.

PCI-PM机制进入L1链路状态的方式如图5中所示,若图5中的下游组件为PCIe交换机的上游端口,则图5中的上游组件为与交换机上游端口相连接的PCIe设备,如根复合体。若图5中的上游组件为PCIe交换机的下游端口,则图5中的下游组件为与交换机下游端口相连接的PCIe设备,如端点设备。The way the PCI-PM mechanism enters the L1 link state is shown in Figure 5. If the downstream component in Figure 5 is the upstream port of the PCIe switch, the upstream component in Figure 5 is the PCIe device connected to the upstream port of the switch. as the root complex. If the upstream component in FIG. 5 is a downstream port of the PCIe switch, then the downstream component in FIG. 5 is a PCIe device connected to the downstream port of the switch, such as an endpoint device.

下游组件的链路控制单元检测到PMCSR(一种电源管理寄存器,表示PCIe协议寄存器)被配置为进入L1的链路状态后,等待正在发送的TLP报文发送完毕,并产生阻断信号阻值发送新的TLP报文,然后等待发送链路上的重传缓存(retrybuf)为空。满足预设条件后,下游组件的链路控制单元控制消息处理单元开始向对端的PCIe设备周期性的循环发送PM_ENTER_L1 DLLP报文。上游组件的消息处理单元接收到PM_ENTER_L1后通知链路控制单元,随后也开始进入L1的准备,即等待正在发送的TLP报文发送完毕,并产生阻断信号阻值发送新的TLP报文,然后等待发送通路上的重传缓存(retrybuf)为空。满足预设条件后上游组件的链路控制单元控制消息处理单元开始向对端的PCIe设备周期性的循环发送PM_Request_ack DLLP报文(一种协议规定报文名称,用于表示收到PM_ENTER_L1 DLLP),同时上游组件的链路控制单元控制物理层接口的发送器发送电器闲序列,将发送器置位Hi-Z状态。下游组件收到PM_Request_ack DLLP后链路控制单元控制物理层接口的发送器发送电器闲序列,将发送器置位Hi-Z状态以降低发送器功耗。After the link control unit of the downstream component detects that PMCSR (a power management register, representing the PCIe protocol register) is configured to enter the link state of L1, it waits for the TLP message being sent to be sent and generates a blocking signal resistance value Send a new TLP message, and then wait for the retransmission buffer (retrybuf) on the sending link to be empty. After the preset condition is met, the link control unit of the downstream component controls the message processing unit to start periodically sending PM_ENTER_L1 DLLP messages to the peer PCIe device. The message processing unit of the upstream component notifies the link control unit after receiving PM_ENTER_L1, and then starts to prepare for L1, that is, waits for the TLP message being sent to be sent, and generates a blocking signal resistance value to send a new TLP message, and then Waiting for the retransmission buffer (retrybuf) on the send path to be empty. After the preset condition is met, the link control unit of the upstream component controls the message processing unit to periodically send PM_Request_ack DLLP messages (a protocol-specified message name used to indicate receipt of PM_ENTER_L1 DLLP) to the peer PCIe device, and at the same time The link control unit of the upstream component controls the transmitter of the physical layer interface to send the electrical idle sequence, and sets the transmitter to the Hi-Z state. After the downstream component receives the PM_Request_ack DLLP, the link control unit controls the transmitter of the physical layer interface to send an electrical idle sequence, and sets the transmitter to the Hi-Z state to reduce the power consumption of the transmitter.

需要说明的是,ASMP L1的进入与PM-PCI L1的进入区别主要在以下两点,第一:上游端口进入ASPM L1要求所有下游端口处于L1 ASPM或更低状态,即上游端口的链路控制单元需要检测all_dsp_in_l1信号是否为高;第二:发送的进入L1请求报文为PM_active_state_request_L1。It should be noted that the difference between the entry of ASMP L1 and the entry of PM-PCI L1 is mainly in the following two points. First, the entry of an upstream port into ASPM L1 requires that all downstream ports be in L1 ASPM or lower state, that is, the link control of the upstream port The unit needs to detect whether the all_dsp_in_l1 signal is high; second: the incoming L1 request message sent is PM_active_state_request_L1.

ASMP机制进入L1链路状态的方式如图6中所示,同样的,若6中的下游组件为PCIe交换机的上游端口,则图6中的上游组件为与交换机上游端口相连接的根组件设备。若图6中的上游组件为PCIe交换机的下游端口,则图6中的下游组件为与交换机下游端口相连接的PCIe终端设备。The way the ASMP mechanism enters the L1 link state is shown in Figure 6. Similarly, if the downstream component in 6 is the upstream port of the PCIe switch, then the upstream component in Figure 6 is the root component device connected to the upstream port of the switch . If the upstream component in FIG. 6 is a downstream port of the PCIe switch, then the downstream component in FIG. 6 is a PCIe terminal device connected to the downstream port of the switch.

下游组件的链路控制单元检测到发送链路方向和接收链路方向均处于L0s的时间达到第二预设时间长度之后,所有下游端口的链路状态处于L1 ASMP或更低状态,等待正在发送的TLP报文发送完毕,并产生阻断信号阻值发送新的TLP报文,然后等待发送链路上的重传缓存(retrybuf)为空。满足预设条件后,下游组件的链路控制单元控制消息处理单元开始向对端的PCIe设备周期性的循环发送PM_active_state_request_L1报文。上游组件的消息处理单元接收到PM_active_state_request_L1后,等待正在发送的TLP报文发送完毕,并产生阻断信号阻值发送新的TLP报文,然后等待发送链路上的重传缓存(retrybuf)为空。满足条件后上游组件的链路控制单元控制消息处理单元开始向对端的PCIe设备周期性的循环发送PM_Request_ack DLLP报文(一种协议规定报文名称,用于表示收到PM_active_state_request_L1),同时上游组件的链路控制单元控制物理层接口的发送器发送电器闲序列,将发送器置位Hi-Z状态。下游组件收到PM_Request_ack DLLP后链路控制单元控制物理层接口的发送器发送电器闲序列,将发送器置位Hi-Z状态以降低发送器功耗。After the link control unit of the downstream component detects that both the sending link direction and the receiving link direction are in L0s for a second preset length of time, the link status of all downstream ports is in the L1 ASMP or lower state, waiting for sending The TLP message sent is completed, and a blocking signal resistance value is generated to send a new TLP message, and then waits for the retransmission buffer (retrybuf) on the sending link to be empty. After the preset condition is satisfied, the link control unit of the downstream component controls the message processing unit to start periodically sending PM_active_state_request_L1 messages to the peer PCIe device. After receiving PM_active_state_request_L1, the message processing unit of the upstream component waits for the TLP message being sent to be sent, and generates a blocking signal to send a new TLP message, and then waits for the retransmission buffer (retrybuf) on the sending link to be empty . After the conditions are satisfied, the link control unit of the upstream component controls the message processing unit to start sending PM_Request_ack DLLP messages (a protocol-specified message name to indicate receipt of PM_active_state_request_L1) periodically to the peer PCIe device, and the upstream component’s The link control unit controls the transmitter of the physical layer interface to send the electrical idle sequence, and sets the transmitter to the Hi-Z state. After the downstream component receives the PM_Request_ack DLLP, the link control unit controls the transmitter of the physical layer interface to send an electrical idle sequence, and sets the transmitter to the Hi-Z state to reduce the power consumption of the transmitter.

4、L1退出4. L1 exit

当链路控制单元检测到端口不再满足L1条件时(PM-PCI控制或者ASPM自动检测)控制物理层接口发送器退出Hi-Z状态,并发送N个FTS训练有序集退出到L0。When the link control unit detects that the port no longer satisfies the L1 condition (PM-PCI control or ASPM automatic detection), control the physical layer interface transmitter to exit the Hi-Z state, and send N FTS training ordered sets to exit to L0.

时钟控制单元,用于通过与其对应连接的物理层接口(phy)联动的方法实现上下游端口ASPM各个状态的退出与进入。The clock control unit is used to implement the exit and entry of each state of the upstream and downstream port ASPM through linkage with the correspondingly connected physical layer interface (phy).

1、上游端口进入和退出L0s1. Upstream ports enter and exit L0s

参见图7所示,当所有下游端口的接收链路处于L0s的链路状态时(all_dsp_in_rl0=1),上游端口的时钟控制单元控制时钟信号(pclk)的频率保持不变,然后向第一物理层接口发送Powerdown信号,用于使第一物理层接口由P0状态置位P0s状态,并等待第一物理层接口(phy)在确定处于P0s状态后的控制信号(phystatus)。其中,Powerdown和phystatus为标准pipe接口信号。当第一物理层接口确认处于P0s状态时,控制发送链路方向上的差分线处于Hi-Z状态,且第一物理层接口的发送器处于低功耗状态。Referring to Fig. 7, when the receiving links of all downstream ports are in the link state of L0s (all_dsp_in_rl0=1), the clock control unit of the upstream port keeps the frequency of the clock signal (pclk) constant, and then sends the first physical The layer interface sends a Powerdown signal, which is used to make the first physical layer interface set from the P0 state to the P0s state, and wait for the control signal (phystatus) of the first physical layer interface (phy) after it is determined to be in the P0s state. Among them, Powerdown and phystatus are standard pipe interface signals. When the first physical layer interface confirms that it is in the P0s state, control the differential line in the transmission link direction to be in the Hi-Z state, and the transmitter of the first physical layer interface is in a low power consumption state.

参见图7所示,当所有下游端口的接收链路接收到退出L0s链路状态的信号时(all_dsp_in_rl0=0),上游端口的时钟控制单元控制时钟信号(pclk)的频率保持不变,然后向第一物理层接口发送Powerdown信号,用于使第一物理层接口由P0s状态置位P0状态,并等待第一物理层接口(phy)在确定处于P0状态后的控制信号(phystatus)。当第一物理层接口确认处于P0状态时,控制第一发送链路方向上的差分线退出Hi-Z状态,且第一物理层接口的发送器退出低功耗状态。Referring to shown in Figure 7, when the receive link of all downstream ports receives the signal (all_dsp_in_rl0=0) that exits the link state of L0s, the frequency of the clock control unit control clock signal (pclk) of the upstream port remains constant, then to The first physical layer interface sends a Powerdown signal, which is used to set the first physical layer interface from the P0s state to the P0 state, and waits for the control signal (phystatus) of the first physical layer interface (phy) after it is determined to be in the P0 state. When the first physical layer interface confirms that it is in the P0 state, control the differential line in the direction of the first transmission link to exit the Hi-Z state, and the transmitter of the first physical layer interface exits the low power consumption state.

2、下游端口进入退出L0s2. The downstream port enters and exits L0s

参见图8所示,当上游端口的接收链路处于L0s的链路状态时(usp_in_rl0=1),下游端口的时钟控制单元控制时钟信号(pclk)的频率保持不变,然后向第二物理层接口发送Powerdown信号,用于使第二物理层接口由P0状态置位P0s状态,并等待第二物理层接口(phy)在确定处于P0s状态后的控制信号(phystatus)。其中,Powerdown和phystatus为标准pipe接口信号。当第二物理层接口确认处于P0状态时,控制发送链路方向上的差分线处于Hi-Z状态,且第二物理层接口的发送器处于低功耗状态。Referring to Fig. 8, when the receiving link of the upstream port is in the link state of L0s (usp_in_rl0=1), the clock control unit of the downstream port controls the frequency of the clock signal (pclk) to remain unchanged, and then transmits to the second physical layer The interface sends a Powerdown signal, which is used to set the second physical layer interface from the P0 state to the P0s state, and waits for the control signal (phystatus) of the second physical layer interface (phy) after it is determined to be in the P0s state. Among them, Powerdown and phystatus are standard pipe interface signals. When the second physical layer interface confirms that it is in the P0 state, the differential line controlling the transmission link direction is in the Hi-Z state, and the transmitter of the second physical layer interface is in a low power consumption state.

参见图8所示,当所有下游端口的接收链路接收到退出L0s链路状态的信号时(usp_in_rl0=0),下游端口的时钟控制单元控制时钟信号(pclk)的频率保持不变,然后向第二物理层接口发送Powerdown信号,用于使第二物理层接口由P0s状态置位P0状态,并等待第二物理层接口(phy)在确定处于P0状态后的控制信号(phystatus)。当第二物理层接口确认处于P0状态时,控制发送链路方向上的差分线退出Hi-Z状态,且第二物理层接口的发送器退出低功耗状态。Referring to shown in Figure 8, when the receive link of all downstream ports receives the signal (usp_in_rl0=0) that exits L0s link state, the frequency of clock control unit control clock signal (pclk) of downstream port remains unchanged, then to The second physical layer interface sends a Powerdown signal, which is used to make the second physical layer interface set the P0 state from the P0s state, and wait for the control signal (phystatus) of the second physical layer interface (phy) after it is determined to be in the P0 state. When the second physical layer interface confirms that it is in the P0 state, control the differential lines in the transmission link direction to exit the Hi-Z state, and the transmitter of the second physical layer interface exits the low power consumption state.

3、进入和退出L13. Enter and exit L1

在一些实施例中,PCIe交换机上下游端口进入和退出L1状态时,链路控制单元是通过以下方式实现降低PCIe交换机功耗的。In some embodiments, when the upstream and downstream ports of the PCIe switch enter and exit the L1 state, the link control unit reduces the power consumption of the PCIe switch in the following manner.

参见图9所示,当上下游端口满足进入L1条件时,时钟控制单元向对应的物理层接口发送Powerdown信号,用于使物理层接口由P0状态置位P1状态,并等待物理层接口(phy)在确定处于P1状态后的控制信号(phystatus)。其中,Powerdown和phystatus为标准pipe接口信号。当物理层接口确认处于P1状态时,关闭物理层接口输出的逻辑时钟(core_clk),于此同时时钟控制单元拉高aux_clk_sel(内部信号,表示正常时钟和辅助时钟的切换)信号,将时钟控制单元内部必须工作电路的驱动时钟(mux_aux_clk)由高频时钟切换为低频的辅助时钟,以达到降低功耗的目的。此外,在P1电源状态下,时钟控制单元控制物理层接口的发送链路方向上的差分线处于Hi-Z状态,且物理层接口的发送器处于低功耗状态。As shown in Figure 9, when the upstream and downstream ports meet the conditions for entering L1, the clock control unit sends a Powerdown signal to the corresponding physical layer interface, which is used to set the physical layer interface from the P0 state to the P1 state, and waits for the physical layer interface (phy ) the control signal (phystatus) after it is determined to be in the P1 state. Among them, Powerdown and phystatus are standard pipe interface signals. When the physical layer interface is confirmed to be in the P1 state, the logical clock (core_clk) output by the physical layer interface is turned off, and at the same time, the clock control unit pulls up the aux_clk_sel (internal signal, indicating the switching of the normal clock and the auxiliary clock) signal, and the clock control unit The driving clock (mux_aux_clk) of the internal necessary working circuit is switched from a high-frequency clock to a low-frequency auxiliary clock to achieve the purpose of reducing power consumption. In addition, in the P1 power state, the clock control unit controls the differential line in the direction of the transmission link of the physical layer interface to be in the Hi-Z state, and the transmitter of the physical layer interface is in a low power consumption state.

参见图9所示,当上下游端口接收到退出L1链路状态的信号时,时钟控制单元向对应的物理层接口发送Powerdown信号,用于使物理层接口由P1状态置位P0状态,并等待物理层接口(phy)在确定处于P0状态后的控制信号(phystatus)。当物理层接口确认处于P0状态时,打开物理层接口输出的逻辑时钟(core_clk),于此同时时钟控制单元降低aux_clk_sel(内部信号,表示正常时钟和辅助时钟的切换)信号,将时钟控制单元内部必须工作电路的驱动时钟(mux_aux_clk)由低频的辅助时钟切换为高频时钟,以达到正常工作的状态。此外,在P0电源状态下,时钟控制单元控制物理层接口的发送链路方向上的差分线退出Hi-Z状态,且物理层接口的发送器退出低功耗状态。As shown in Figure 9, when the upstream and downstream ports receive a signal to exit the L1 link state, the clock control unit sends a Powerdown signal to the corresponding physical layer interface, which is used to set the physical layer interface from the P1 state to the P0 state, and wait for The control signal (phystatus) of the physical layer interface (phy) after it is determined to be in the P0 state. When the physical layer interface is confirmed to be in the P0 state, the logical clock (core_clk) output by the physical layer interface is turned on. At the same time, the clock control unit reduces the aux_clk_sel (internal signal, indicating the switching of the normal clock and the auxiliary clock) signal, and the internal clock control unit The driving clock (mux_aux_clk) of the necessary working circuit is switched from the low-frequency auxiliary clock to the high-frequency clock to achieve normal operation. In addition, in the P0 power state, the clock control unit controls the differential line in the direction of the transmission link of the physical layer interface to exit the Hi-Z state, and the transmitter of the physical layer interface exits the low power consumption state.

图10为本申请实施例提供的一种PCIe交换机管理方法的流程图,该方法应用于PCIe交换机,该PCIe交换机包括第一接口和第二接口,第一接口和第一PCIe设备通过第一链路连接,第二接口和第二PCIe设备通过第二链路连接,方法包括:Fig. 10 is a flowchart of a PCIe switch management method provided by an embodiment of the present application, the method is applied to a PCIe switch, the PCIe switch includes a first interface and a second interface, and the first interface and the first PCIe device pass through the first link road connection, the second interface and the second PCIe device are connected through the second link, and the method includes:

S1001、监控第一链路的第一链路状态。S1001. Monitor the first link state of the first link.

S1002、根据第一链路状态生成第一控制信号。S1002. Generate a first control signal according to the first link state.

S1003、根据第一控制信号控制更新第二链路的第二链路状态,更新后的第二链路状态与第一链路状态相同。S1003. Control and update the second link state of the second link according to the first control signal, where the updated second link state is the same as the first link state.

本实施例中还提供了一种PCIe交换机,该PCIe交换机内置有本实施例中所述的PCIe交换机管理装置。This embodiment also provides a PCIe switch, the PCIe switch is built with the PCIe switch management device described in this embodiment.

本实施例中提供的一种PCIe交换机管理装置、方法以及PCIe交换机,通过本实施例中提供的PCIe交换机管理装置、方法,能够实现PCIe交换机链路和电源管理的协同控制,从而实现PCIe交换机低功耗的转换,并从功能框图,时序控制等方面对该实现方法进行了详细阐述。A PCIe switch management device and method and a PCIe switch provided in this embodiment, through the PCIe switch management device and method provided in this embodiment, can realize the coordinated control of the PCIe switch link and power management, thereby realizing low-cost PCIe switch The conversion of power consumption, and the implementation method is described in detail from the functional block diagram, timing control and other aspects.

应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other Presence or addition of features, wholes, steps, operations, elements, components and/or collections thereof.

在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrase "in one embodiment", "in some embodiments", etc. in various places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not All Examples", unless expressly stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still implement the foregoing embodiments Modifications to the technical solutions described in the examples, or equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application, and should be included in the Within the protection scope of this application.

Claims (10)

1. A PCIe switch management apparatus, comprising: the system comprises a first control module, a second control module and a global power management module, wherein the first control module is connected with first PCIe equipment through a first interface, the second control module is connected with second PCIe equipment through a second interface, a link between the first control module and the first PCIe equipment is a first link, and a link between the second control module and the second PCIe equipment is a second link;
the first control module is used for monitoring the first link state of the first link;
the global power management module is used for generating a first control signal according to the first link state;
the second control module is configured to control to update a second link state of the second link according to the first control signal, where the updated second link state is the same as the first link state.
2. The PCIe switch management apparatus of claim 1, wherein when the first control module is an upstream port control module and the second control module is a downstream port control module, the first link status is L0s, and the control signal is usp _ in _ L0s;
the second control module is specifically configured to update the second link state to L0s according to the usp _ in _ L0s when a first preset condition is met;
wherein the first preset condition comprises: the upstream port has no TLP or DLLP waiting to be sent, and the usp _ in _ l0s signal is high.
3. The PCIe switch management apparatus of claim 1, wherein when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L0s, and the control signal is all _ dsp _ in _ rl0s;
the second control module is specifically configured to update the second link state to L0s according to the all _ dsp _ in _ rl0s when a second preset condition is met;
wherein the second preset condition comprises: the downstream port has no TLP or DLLP waiting to be sent, and the all _ dsp _ in _ rl0s signal is high.
4. The PCIe switch management apparatus of claim 1, wherein when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L1 or a state with power consumption lower than L1, and the control signal is all _ dsp _ in _ L1;
the second control module is specifically configured to update the second link to L1 according to the control signal all _ dsp _ in _ L1 when a third preset condition is met;
wherein the third preset condition comprises: after the time that both the receiving direction and the sending direction of the second link are in L0s reaches the preset time length, the state of the first link is in an L1 ASMP state or a state with power consumption lower than that of the L1 ASMP, and the method waits for the sending of the TLP being sent to be completed, and generates a blocking signal to stop sending a new TLP, so that the retransmission buffer on the second link is empty.
5. The PCIe switch management apparatus of claim 1, wherein when the first control module is a downstream port control module and the second control module is an upstream port control module, the first link state is L1 or a state with power consumption lower than L1, and the control signal is PM _ ENTER _ L1DLLP;
the second control module is specifically configured to update the second link to L1 according to the PM _ ENTER _ L1DLLP when a fourth preset condition is met;
wherein the second preset condition comprises: after the time that the receiving direction and the sending direction of the second link are both in L0s reaches the preset time length, the state of the first link is in an L1 ASMP state or a state with power consumption lower than that of the L1 ASMP, and waits for the sending of the TLP being sent to be completed, and generates a blocking signal to prevent sending of a new TLP, so that the retransmission buffer on the sending link is empty.
6. The PCIe switch management apparatus of claim 1, wherein the PCIe switch management apparatus is configured to perform the following operations
The first control module is further configured to acquire a link control instruction sent by the first PCIe device;
the global power supply management module is also used for generating a second control signal according to the link control instruction;
the second control module is further configured to update the second link status according to the second control signal, where the updated second link status corresponds to the link control instruction.
7. The PCIe switch management device of claim 6,
the first PCIe device is root component equipment, and the second PCIe device is PCIe terminal equipment; the link control instruction is used for indicating to update the second link state to an L2 or L3 state;
the first PCIe device is a PCIe terminal device, the second PCIe device is a root component device, and the link control instruction is used for indicating that the second link state is updated to be the L1 state.
8. The PCIe switch management device of claim 1,
when the first control module is a downstream port control module and the second control module is an upstream port control module, the second control module is configured to set the second interface from the P0 state to the P0s state and control all _ dsp _ in _ rl0 signals to be at a high level when the first link state is L0s;
when the first control module is an upstream port control module and the second control module is a downstream port control module, the second control module is further configured to set the second interface from a P0 state to a P0s state and control a usp _ in _ rl0 signal to a high level when the first link state is L0s;
when the first link or the second link is updated to L1, the second control module is further configured to set the first interface or the second interface from a P0 state to a P1 state, turn off a logic clock output by the first interface or the second interface, and control to pull up the aux _ clk _ sel signal.
9. A PCIe switch management method, wherein the PCIe switch includes a first interface and a second interface, the first interface and a first PCIe device are connected by a first link, and the second interface and a second PCIe device are connected by a second link, the method comprising:
monitoring a first link status of the first link;
generating a first control signal according to the first link state;
and controlling to update the second link state of the second link according to the first control signal, wherein the updated second link state is the same as the first link state.
10. A PCIe switch comprising the PCIe switch management apparatus of any one of claims 1 to 8.
CN202211131387.5A 2022-09-16 2022-09-16 PCIe switch management device and method and PCIe switch Pending CN115550286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211131387.5A CN115550286A (en) 2022-09-16 2022-09-16 PCIe switch management device and method and PCIe switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211131387.5A CN115550286A (en) 2022-09-16 2022-09-16 PCIe switch management device and method and PCIe switch

Publications (1)

Publication Number Publication Date
CN115550286A true CN115550286A (en) 2022-12-30

Family

ID=84727457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211131387.5A Pending CN115550286A (en) 2022-09-16 2022-09-16 PCIe switch management device and method and PCIe switch

Country Status (1)

Country Link
CN (1) CN115550286A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128576A1 (en) * 2002-12-31 2004-07-01 Michael Gutman Active state link power management
CN102662458A (en) * 2012-04-18 2012-09-12 华为技术有限公司 Dynamic energy-saving method and device for PCIE equipment and communication system of PCIE equipment
CN111124975A (en) * 2019-12-27 2020-05-08 江苏芯盛智能科技有限公司 PCIe device dynamic power consumption saving method and low-power consumption PCIe device
CN113220107A (en) * 2021-05-10 2021-08-06 联芸科技(杭州)有限公司 Power consumption management method for PCIe link, terminal device and storage medium
CN113742277A (en) * 2020-05-28 2021-12-03 英特尔公司 Adaptive lower power state entry and exit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128576A1 (en) * 2002-12-31 2004-07-01 Michael Gutman Active state link power management
CN102662458A (en) * 2012-04-18 2012-09-12 华为技术有限公司 Dynamic energy-saving method and device for PCIE equipment and communication system of PCIE equipment
CN111124975A (en) * 2019-12-27 2020-05-08 江苏芯盛智能科技有限公司 PCIe device dynamic power consumption saving method and low-power consumption PCIe device
CN113742277A (en) * 2020-05-28 2021-12-03 英特尔公司 Adaptive lower power state entry and exit
CN113220107A (en) * 2021-05-10 2021-08-06 联芸科技(杭州)有限公司 Power consumption management method for PCIe link, terminal device and storage medium

Similar Documents

Publication Publication Date Title
EP2224311B1 (en) System and method for energy savings through emulation of wake on lan in energy efficient ethernet
CN102204390B (en) Transition PHY solution for LPI compatibility with legacy devices
CN102171972B (en) Power Management in Networking Devices
US7607029B2 (en) PCI express link state management system and method thereof
US8996900B2 (en) System and method for managing power consumption in data propagation environments
US20110173352A1 (en) Power Reduction on Idle Communication Lanes
US9823733B2 (en) Methods and apparatus for reducing power consumption within embedded systems
US8654774B2 (en) Method and system for asymmetric transition handshake in an energy efficient ethernet network
US20040117674A1 (en) Ethernet link-up protocol
CN103746889B (en) Half competitive mode RS-485 bus multi-master communication system and its working method
CN103532734A (en) Systems and methods for energy efficient Ethernet with asymmetric traffic profiling
EP2936273A1 (en) Reduction of idle power in a communication port
CN102150393A (en) Generating, at least in part, and/or receiving, at least in part, at least one request
JP4071117B2 (en) Transmission / reception circuit, transmission / reception method, and transmission / reception apparatus
CN113424164A (en) Power consumption reduction in USB 2.0 Transmit drivers and eUSB2 repeaters
KR101355326B1 (en) Transitioning of a port in a communications system form an active state to a standby state
CN114690882A (en) Low Power Embedded USB2 (eUSB2) Repeater
JP2010244457A (en) Method and system for control of usb communication, and usb hub apparatus
CN101299165B (en) Method and system for implementing generalized system stutter
CN105807886A (en) Chip arousing system, chip arousing method and mobile terminal
CN115550286A (en) PCIe switch management device and method and PCIe switch
WO2012126396A1 (en) Energy saving method for service board, master control board, service board, and access apparatus
EP2207309B1 (en) Method and system for a protocol with stateful negotiation for energy efficient network parameters in layer 2
US20120311362A1 (en) Communication device and communication method
CN102609388B (en) Slave node circuit, communication method and communication device

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