WO2023045389A1 - Network card adaptation circuit, network card adaptation method, and related apparatus - Google Patents

Network card adaptation circuit, network card adaptation method, and related apparatus Download PDF

Info

Publication number
WO2023045389A1
WO2023045389A1 PCT/CN2022/096162 CN2022096162W WO2023045389A1 WO 2023045389 A1 WO2023045389 A1 WO 2023045389A1 CN 2022096162 W CN2022096162 W CN 2022096162W WO 2023045389 A1 WO2023045389 A1 WO 2023045389A1
Authority
WO
WIPO (PCT)
Prior art keywords
network card
pin
signal
resistor
cpld
Prior art date
Application number
PCT/CN2022/096162
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2023045389A1 publication Critical patent/WO2023045389A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/18Packaging or power distribution
    • 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/38Information transfer, e.g. on bus

Definitions

  • the present application relates to the field of computers, and in particular to a network card adaptation circuit, a network card adaptation method and related devices.
  • the rear window of the current Kunpeng rack server supports two flexible input/output (IO) slots, which can be respectively used to insert an open source computing project (open compute project, OCP) 3.0 network card and a central processing unit (central processing unit, CPU) managed network interface card (network interface card, NIC).
  • IO input/output
  • the OCP 3.0 network card and the NIC network card managed by the CPU have the same shape and structure, but due to the difference in the management of the network card, the interface design is also different. Therefore, the IO slots on the rear window of the server cannot be mixed.
  • the rear window supports two flexible IO slots 1 and 2. Among them, the flexible IO slot 1 only supports the standard OCP network card, and the flexible IO slot 2 only supports the NIC network card managed by the CPU. Mixed insertion.
  • Embodiments of the present application provide a network card adaptation circuit, a network card adaptation method, and related devices, which are used to realize the mixed insertion requirements of standard OCP network cards and CPU-managed NIC network cards in flexible IO slots.
  • the embodiment of the present application provides a network card adaptation circuit, specifically as follows:
  • Network card detection circuit complex programmable logic device (complex programmable logic device, CPLD), switch and CPU;
  • the CPLD includes a first pin, a second pin, a third pin, a fourth pin, and a fifth pin , the sixth pin and the seventh pin;
  • the network card detection circuit is connected with the first management and the second pin of the CPLD;
  • the sixth pin and the seventh pin of the CPLD are connected with the switch;
  • the CPU is connected to the switch;
  • the network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates that the network card inserted into the interface is according to the network card detection signal.
  • the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3.
  • the control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card.
  • the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
  • the network card detection circuit of the network card detection circuit includes a parallel first branch and a second branch, a parallel first network card detection branch and a second network card detection branch, a parallel first network card detection branch and a second network card detection branch.
  • the two branches are connected in series with the parallel first network card detection branch and the second network card detection branch; wherein, the first branch includes a first power supply, a first resistor and a second resistor; the first resistor and the The second resistor is connected in parallel; the first resistor is connected to the first pin, and the second resistor is connected to the first power supply; the second branch includes a second power supply, a third resistor, and a fourth resistor and a MOS tube; the third resistor, the fourth resistor and the MOS tube are connected in parallel; the third resistor is connected to the second pin, and the fourth resistor is connected to the second power supply; The D pole of the MOS transistor is connected to the second pin through the third resistor, and the S pole of the MOS transistor is grounded; the first network card
  • each resistor and power supply in the network card detection circuit can be as follows: the first power supply, the second power supply and the third power supply are all set to 3v3 power supply, the first resistor, the three The resistance and the fifth resistance are all set to 33 ohms, and the second resistance, the fourth resistance, the sixth resistance and the seventh resistance are all set to 1000 ohms. It can be understood that this embodiment only provides a possible design of the resistance and power supply, but does not limit the design of the resistance and power supply, as long as the detection branch of the first network card and the first branch of the first network card are satisfied.
  • the second pin When connected with the second branch, the second pin inputs a high level; when the second network card detection branch is connected with the first branch and the second branch, the first The condition that the two pins input a low level is sufficient.
  • the first pin is the PERST0# signal defined by the OCP 3.0 protocol, and the PERST0# signal and the second pin are multiplexed as the network card detection signal;
  • the switch selects the CPU; the third pin and the fourth pin are used to output an interrupt signal; the second pin is used to output an interrupt signal; Four management pins are used to output the indication signal of the management state indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
  • the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the OCP 3.0 protocol The defined PERST1# signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the first The six pins are used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, and the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
  • the present application provides a network card adaptation method, which is mainly applied to computer equipment configured with the network adaptation circuit of the first aspect, specifically as follows:
  • the network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates the network card type of the network card inserted into the interface according to the network card detection signal, and the network card type is CPU Manage the first network card or the second network card under the OCP protocol; determine the signal corresponding to the network card according to the type of the network card; use the signal to manage the network card.
  • the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3.
  • the control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card.
  • the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
  • the network card type indicating the network card inserted into the interface according to the network card detection signal includes:
  • the network card type of the network card is the first network card; when the network card detection signal indicates that the second pin input of the CPLD is low level, the network card type of the network card is the second network card.
  • determining the signal corresponding to the network card according to the network card type includes:
  • the CPU is selected by the switch; the third pin and the fourth pin are used to output an interrupt signal; the fourth management pin is used Used to output the indication signal of the management status indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
  • the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the PERST1# defined by the OCP 3.0 protocol signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the sixth pin is used To output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
  • the present application provides computer equipment configured with the network card adaptation circuit described in the first aspect above.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores computer instructions, and the computer instructions are used to execute the method described in the second aspect above.
  • the embodiment of the present application provides a computer program product including instructions, which, when run on a computer, causes the computer to execute the method described in the second aspect above.
  • the present application provides a chip system, which includes a processor, configured to support the network adapter circuit to implement the functions involved in the above aspect, such as generating or processing the data involved in the above method and/or information.
  • the system-on-a-chip further includes a memory, and the memory is used for storing necessary program instructions and data of the network adapter circuit, so as to realize functions in any one of the above-mentioned aspects.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • Fig. 1 is a schematic diagram of an embodiment of a network adapter circuit in the embodiment of the present application
  • Fig. 2 is a schematic diagram of the network card detection circuit in the embodiment of the present application.
  • Fig. 3 is another schematic diagram of the network card detection circuit in the embodiment of the present application.
  • FIG. 4 is a signal schematic diagram of a network card adaptation circuit in an embodiment of the present application.
  • FIG. 5 is another signal schematic diagram of the network card adaptation circuit in the embodiment of the present application.
  • FIG. 6 is a schematic diagram of an embodiment of a method for adapting a network card in the embodiment of the present application.
  • the naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logic sequence indicated by the naming or numbering.
  • the execution order of the technical purpose is changed, as long as the same or similar technical effect can be achieved.
  • the division of units presented in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated in another system, or some features can be ignored. , or not, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms, this Applications are not limited.
  • the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs unit to realize the purpose of the application scheme.
  • the rear window of the current Kunpeng rack server supports two flexible input/output (IO) slots, which can be used to insert OCP3.0 network cards and CPU-managed NIC cards respectively.
  • IO input/output
  • the OCP 3.0 network card and the NIC network card managed by the CPU have the same shape and structure, but due to the difference in the management of the network card, the interface design is also different. Therefore, the IO slots on the rear window of the server cannot be mixed.
  • the rear window supports two flexible IO slots 1 and 2. Among them, the flexible IO slot 1 only supports the standard OCP network card, and the flexible IO slot 2 only supports the NIC network card managed by the CPU. Mixed insertion. Therefore, the customer's configuration requirements for external network cards are limited, and the requirements for two standard OCP network cards or two CPU-managed NIC network cards cannot be met.
  • the application provides a network card adaptation circuit, which specifically includes: a network card detection circuit, a CPLD, a switch, and a CPU;
  • the CPLD includes a first pin, a second pin, a third pin, a fourth Pin, the fifth pin, the sixth pin and the seventh pin;
  • the network card detection circuit is connected with the first management and the second pin of the CPLD;
  • the sixth pin and the seventh pin of the CPLD The pin is connected with the switch;
  • the CPU is connected with the switch;
  • the signal indicated by the first pin and the second pin of the CPLD multiplexed by the network card detection circuit is the network card detection signal, and according to the network card detection
  • the signal indicates that the network card inserted into the interface is the first network card managed by the CPU or the second network card under the Open Computing Project OCP3.0 protocol; when the network card detection signal indicates that the network card inserted into the interface is the first network card, in the CPLD
  • the third pin, the fourth pin, and the fifth pin indicate the
  • the network card adaptation circuit 100 includes a network card detection circuit 101 , a CPLD 102 , a switch 103 and a CPU 104 .
  • the CPLD102 includes a first pin 1021, a second pin 1022, a third pin 1023, a fourth pin 1024, a fifth pin 1025, a sixth pin 1026, and a seventh pin 1027; wherein, the Network card detection circuit 101 comprises this first pin 1021 of this CPLD102 and this second pin 1022, and this switch 103 is used for realizing the sixth pin 1026 of this CPLD102 and the pin between the seventh pin 1027 and this CPU104 switch.
  • the network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as the network card detection signal, and indicates according to the network card detection signal that the network card inserted into the interface is the first network card managed by the CPU or an open computing project
  • the second network card under the OCP3.0 protocol; when the network card detection signal indicates that the network card inserted into the interface is the first network card, the third pin, the fourth pin, and the fifth pin in the CPLD indicate the first network card
  • this switch strobes this CPU, makes this CPU manage the signal corresponding to this first network card;
  • this switch strobes the sixth pipe of this CPLD pin and the seventh pin, so that the third pin, the fourth pin, the fifth pin, the sixth pin and the seventh pin in the CPLD indicate the signal corresponding to the second network card.
  • the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3.
  • the control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card.
  • the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
  • the first pin 1021 and the second pin 1022 of the CPLD102 output signals under the OCP3.0 protocol to be multiplexed as the network card detection signal of the network card detection circuit 101, and the CPLD102 can indicate according to the network card detection signal
  • the network card inserted into the interface is the first network card directly managed by the CPU or the second network card under the standard OCP3.0 protocol.
  • a possible implementation of the network card detection circuit 101 can be shown in Figure 2:
  • the network card detection circuit 101 includes a parallel first branch and a second branch, a parallel first network card detection branch and a second network card detection branch, a parallel first branch and a second branch and a parallel first branch.
  • a network card detection branch and a second network card detection branch are connected in series; wherein, the first branch includes a first power supply, a first resistor and a second resistor; the first resistor is connected in parallel with the second resistor; the The first resistor is connected to the first pin 1021, and the second resistor is connected to the first power supply; the second branch includes a second power supply, a third resistor, a fourth resistor and a MOS tube; the The third resistor, the fourth resistor and the MOS transistor are all connected in parallel; the third resistor is connected to the second pin 1022, and the fourth resistor is connected to the second power supply; the MOS transistor The D pole is connected to the second pin through the third resistor, and the S pole of the MOS transistor is grounded; the first network card detection branch includes a fifth
  • a possible implementation of the network card detection signal can be as follows: when the first network card detection branch communicates with the first branch and the second branch (i.e. plug into the interface When the network card is the first network card under the management of the CPU), the second pin inputs a high level; when the second network card detection branch is connected with the first branch and the second branch (That is, the network card inserted into the interface is the second network card under the standard OCP3.0 protocol), and the second pin inputs a low level.
  • the specific implementation of the network card detection circuit 101 can be as shown in Figure 3: the first power supply, the second power supply and the third power supply are all set to 3v3 power supply, the first resistor, The third resistor and the fifth resistor are all set to 33 ohms, and the second resistor, the fourth resistor, the sixth resistor and the seventh resistor are all set to 1000 ohms.
  • the divided voltage of 1000 ohm pull-up and 33 ohm pull-down is not enough to turn on the MOS tube, and the second pin receives a high level, that is It is determined that the network card inserted into the interface is the first network card.
  • the network card inserted into the interface is the second network card
  • the network card of the interface is the second network card.
  • the network card inserted into the interface is the first network card managed by the CPU, at this moment, the pin of the CPU is selected by the switch; the third pin and the fourth pin of the CPLD output an interrupt signal, and the third pin outputs an interrupt signal.
  • the signal on the pin can be defined as INT_NIC_CPLD0, and the signal on the fourth pin can be defined as INT_NIC_CPLD1.
  • the fifth pin outputs an indication signal for managing the status indicator light, wherein the indication signal can be defined as CPLD_NIC_I2C.
  • the sixth pin and the seventh pin are switched to the pin of the CPU, so the pin of the CPU will output the first signal for managing the optical module and the clock data recovery chip and for managing the physical layer (Physical, PHY)
  • the second signal of the chip wherein the first signal may be defined as CPU_NIC_I2C, and the second signal may be defined as CPU_NIC_MDIO.
  • the network card inserted into the interface is the second network card under the OCP3.0 protocol.
  • the switch selects the sixth pin and the seventh pin of the CPLD; the third pin is used to output OCP 3.0
  • the PERST1# signal defined by the protocol the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol
  • the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol
  • the sixth pin The pin is used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol
  • the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
  • the embodiment of the present application also provides a network card adaptation method, which is mainly applied to computer equipment including the network card adaptation circuit described in any one of Figures 1 to 5 above, as shown in Figure 6 for details, the embodiment of the present application
  • the NIC adaptation methods include:
  • a network card detection circuit uses a network card detection circuit to acquire a network card type of a network card inserted into an interface, where the network card type is a first network card managed by a CPU or a second network card under an OCP protocol.
  • the computer equipment After the network card is inserted into the interface, the computer equipment obtains the network card detection signal according to the network card detection circuit, and determines the type of the network card according to the network card detection signal. In a possible implementation manner, when the network card detection signal indicates that the second pin of the CPLD inputs a high level, the network card type of the network card is the first network card;
  • the network card type of the network card is the second network card.
  • the switch in the network card adaptation circuit selects the pin of the CPU; the third pin of the CPLD and the fourth pin output
  • the signal on the third pin may be defined as INT_NIC_CPLD0
  • the signal on the fourth pin may be defined as INT_NIC_CPLD1.
  • the fifth pin outputs an indication signal for managing the status indicator light, wherein the indication signal can be defined as CPU_NIC_I2C.
  • the sixth pin and the seventh pin are switched to the pin of the CPU, so the pin of the CPU will output the first signal for managing the optical module and the clock data recovery chip and for managing the physical layer (Physical, PHY)
  • the second signal of the chip wherein the first signal may be defined as CPU_NIC_I2C, and the second signal may be defined as CPU_NIC_MDIO.
  • the switch in the network card adaptation circuit selects the sixth pin and the seventh pin of the CPLD; the third pin is used to output OCP 3.0
  • the PERST1# signal defined by the protocol the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol
  • the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol
  • the sixth pin The pin is used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol
  • the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
  • the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3.
  • the control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card.
  • the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
  • An embodiment of the present application further provides a computer device, which includes the network card adaptation circuit described in any one of FIGS. 1 to 5 above.
  • the steps of the methods or algorithms described in connection with the disclosure of this application can be implemented in the form of hardware, or can be implemented in the form of a processor executing software instructions.
  • the software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, mobile hard disk, CD-ROM or any other form of storage known in the art medium.
  • An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
  • the storage medium may also be a component of the processor.
  • the processor and storage medium can be located in the ASIC. Alternatively, the ASIC may be located in the terminal.
  • the processor and the storage medium may also exist in the first communication device as discrete components.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Abstract

A network card adaptation circuit, which is used for realizing the requirements of a flexible IO slot position for the mixed insertion of a standard OCP network card and an NIC network card managed by a CPU. The network card adaptation circuit specifically comprises: a network card detection circuit, a CPLD, a switch and a CPU, wherein the network card detection circuit is connected to a first pin and a second pin of the CPLD; a sixth pin and a seventh pin of the CPLD are switched with pins of the CPU by using the switch; the network card detection circuit multiplexes signals indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates, according to the network card detection signal, that a network card inserted into an interface is a first network card managed by the CPU or a second network card under an OCP 3.0 protocol; when it is determined that the network card inserted into the interface is the first network card, a third pin, a fourth pin and a fifth pin in the CPLD indicate a signal corresponding to the first network card, and the switch gates the CPU, such that the CPU manages the signal corresponding to the first network card; and when it is determined that the network card inserted into the interface is the second network card, the switch gates the sixth pin and the seventh pin of the CPLD, such that the pins of the CPLD indicate a signal corresponding to the second network card.

Description

一种网卡适配电路、网卡适配方法以及相关装置A network card adaptation circuit, a network card adaptation method, and related devices
本申请要求于2021年09月26日提交中国国家知识产权局、申请号为202111129484.6、发明名称为“一种网卡适配电路、网卡适配方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on September 26, 2021, with the application number 202111129484.6, and the title of the invention is "A network card adaptation circuit, network card adaptation method and related devices". The entire contents are incorporated by reference in this application.
技术领域technical field
本申请涉及计算机领域,尤其涉及一种网卡适配电路、网卡适配方法以及相关装置。The present application relates to the field of computers, and in particular to a network card adaptation circuit, a network card adaptation method and related devices.
背景技术Background technique
当前Kunpeng机架服务器的后窗支持两个灵活输入输出(input/output,IO)槽位,可以分别用于插入开源计算项目(open compute project,OCP)3.0网卡和中央处理器(central processing unit,CPU)管理的网络接口卡(network interface card,NIC)。The rear window of the current Kunpeng rack server supports two flexible input/output (IO) slots, which can be respectively used to insert an open source computing project (open compute project, OCP) 3.0 network card and a central processing unit (central processing unit, CPU) managed network interface card (network interface card, NIC).
在物理设计上OCP 3.0网卡和CPU管理的NIC网卡形态结构相同,但是由于网卡管理方的不同,其接口设计也不相同,因此对于服务器的后窗上的IO槽位两种网卡无法混插。比如以S920X05服务器为例,后窗支持两个灵活IO槽位1和槽位2,其中灵活IO槽位1仅支持标准OCP网卡,灵活IO槽位2仅支持CPU管理的NIC网卡,两者不能混插。In terms of physical design, the OCP 3.0 network card and the NIC network card managed by the CPU have the same shape and structure, but due to the difference in the management of the network card, the interface design is also different. Therefore, the IO slots on the rear window of the server cannot be mixed. For example, taking the S920X05 server as an example, the rear window supports two flexible IO slots 1 and 2. Among them, the flexible IO slot 1 only supports the standard OCP network card, and the flexible IO slot 2 only supports the NIC network card managed by the CPU. Mixed insertion.
因此限制了客户对外接网卡的配置需求,无法满足要求两个标准OCP网卡或者两个CPU管理的NIC网卡的需求。Therefore, the customer's configuration requirements for external network cards are limited, and the requirements for two standard OCP network cards or two CPU-managed NIC network cards cannot be met.
发明内容Contents of the invention
本申请实施例提供了一种网卡适配电路、网卡适配方法以及相关装置,用于实现灵活IO槽位对标准OCP网卡和CPU管理的NIC网卡混插的需求。Embodiments of the present application provide a network card adaptation circuit, a network card adaptation method, and related devices, which are used to realize the mixed insertion requirements of standard OCP network cards and CPU-managed NIC network cards in flexible IO slots.
第一方面,本申请实施例一种网卡适配电路,具体如下:In the first aspect, the embodiment of the present application provides a network card adaptation circuit, specifically as follows:
网卡检测电路、复杂可编程逻辑器件(complex programmable logic device,CPLD)、开关及CPU;所述CPLD包括第一管脚、第二管脚、第三管脚、第四管脚、第五管脚、第六管脚和第七管脚;所述网卡检测电路与所述CPLD的第一管理和第二管脚相连;所述CPLD的第六管脚和第七管脚与所述开关相连;所述CPU与所述开关相连;所述网卡检测电路复用所述CPLD的第一管脚和第二管脚指示的信号为网卡检测信号,并根据所述网卡检测信号指示插入接口的网卡为CPU管理的第一网卡或者开放计算项目OCP3.0协议下的第二网卡;在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述CPLD中的第三管脚、第四管脚、第五管脚指示所述第一网卡对应的信号,所述开关选通所述CPU,使得所述CPU管理所述第一网卡对应的信号;在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述开关选通所述CPLD的第六管脚和第七管脚,使得所述CPLD中的第三管脚、第四管脚、第五管脚、第六管脚和第七管脚指示所述第二网卡对应的信号。Network card detection circuit, complex programmable logic device (complex programmable logic device, CPLD), switch and CPU; The CPLD includes a first pin, a second pin, a third pin, a fourth pin, and a fifth pin , the sixth pin and the seventh pin; the network card detection circuit is connected with the first management and the second pin of the CPLD; the sixth pin and the seventh pin of the CPLD are connected with the switch; The CPU is connected to the switch; the network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates that the network card inserted into the interface is according to the network card detection signal. The first network card managed by the CPU or the second network card under the Open Computing Project OCP3.0 protocol; when the network card detection signal indicates that the network card inserted into the interface is the first network card, the third pin and the second pin in the CPLD Four pins and the fifth pin indicate the signal corresponding to the first network card, and the switch strobes the CPU so that the CPU manages the signal corresponding to the first network card; the detection signal of the network card indicates the insertion interface When the network card is the first network card, the switch gates the sixth pin and the seventh pin of the CPLD, so that the third pin, the fourth pin, the fifth pin, The sixth pin and the seventh pin indicate signals corresponding to the second network card.
本实施例中,该网卡适配电路利用该网卡检测电路并复用原OCP3.0协议下的信号用于检测插入接口的网卡的网卡类型,同时利用开关将标准OCP网卡的控制电路与该CPU管理的NIC卡的控制电路进行切换,并在原OCP网卡的控制电路上复用相关的信号。这样可以使得该网络适配电路可以复用该标准OCP网卡和该CPU管理的NIC卡,实现灵活IO槽位对标准OCP网卡和CPU管理的NIC网卡混插的需求。In this embodiment, the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3. The control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card. In this way, the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
可选的,该网卡检测电路所述网卡检测路包括并联的第一支路和第二支路,并联的第 一网卡检测支路和第二网卡检测支路,并联的第一支路和第二支路与并联的第一网卡检测支路和第二网卡检测支路串联;其中,所述第一支路包括第一电源、第一电阻和第二电阻;所述第一电阻与所述第二电阻并联;所述第一电阻与所述第一管脚相连,所述第二电阻与所述第一电源相连;所述第二支路包括第二电源、第三电阻、第四电阻和MOS管;所述第三电阻、所述第四电阻和所述MOS管均并联;所述第三电阻与所述第二管脚相连,所述第四电阻与所述第二电源相连;所述MOS管的D极通过所述第三电阻与所述第二管脚相连,所述MOS管的S极接地;所述第一网卡检测支路包括第五电阻,且所述第五电阻的另一端接地;所述第二网卡检测支路包括并联的第六电阻和第七电阻,所述第六电阻连接第三电源;所述第七电阻接地;其中,在所述第一网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入高电平;在所述第二网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入低电平。Optionally, the network card detection circuit of the network card detection circuit includes a parallel first branch and a second branch, a parallel first network card detection branch and a second network card detection branch, a parallel first network card detection branch and a second network card detection branch. The two branches are connected in series with the parallel first network card detection branch and the second network card detection branch; wherein, the first branch includes a first power supply, a first resistor and a second resistor; the first resistor and the The second resistor is connected in parallel; the first resistor is connected to the first pin, and the second resistor is connected to the first power supply; the second branch includes a second power supply, a third resistor, and a fourth resistor and a MOS tube; the third resistor, the fourth resistor and the MOS tube are connected in parallel; the third resistor is connected to the second pin, and the fourth resistor is connected to the second power supply; The D pole of the MOS transistor is connected to the second pin through the third resistor, and the S pole of the MOS transistor is grounded; the first network card detection branch includes a fifth resistor, and the fifth resistor The other end of the network card is grounded; the second network card detection branch includes a sixth resistor and a seventh resistor connected in parallel, and the sixth resistor is connected to the third power supply; the seventh resistor is grounded; wherein, in the first network card detection When the branch is connected with the first branch and the second branch, the second pin inputs a high level; when the second network card detection branch is connected with the first branch and the second branch When the two branches are connected, the second pin inputs a low level.
基于上述方案,该网卡检测电路中各个电阻以及电源的设计可以如下:所述第一电源、所述第二电源以及所述第三电源均设置为3v3电源,所述第一电阻、所述三电阻、所述第五电阻均设置为33欧姆,所述第二电阻、所述第四电阻、所述第六电阻和所述第七电阻均设置为1000欧姆。可以理解的是,本实施例仅提供了一种可能的电阻与电源的设计方案,但是并不限定电阻与电源的设计,只要满足在所述第一网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入高电平;在所述第二网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入低电平的条件即可。Based on the above scheme, the design of each resistor and power supply in the network card detection circuit can be as follows: the first power supply, the second power supply and the third power supply are all set to 3v3 power supply, the first resistor, the three The resistance and the fifth resistance are all set to 33 ohms, and the second resistance, the fourth resistance, the sixth resistance and the seventh resistance are all set to 1000 ohms. It can be understood that this embodiment only provides a possible design of the resistance and power supply, but does not limit the design of the resistance and power supply, as long as the detection branch of the first network card and the first branch of the first network card are satisfied. When connected with the second branch, the second pin inputs a high level; when the second network card detection branch is connected with the first branch and the second branch, the first The condition that the two pins input a low level is sufficient.
可选的,在该CPLD各个管脚与该CPU管脚之间信号复用的情况,具体可以如下:Optionally, in the case of signal multiplexing between each pin of the CPLD and the pin of the CPU, the details may be as follows:
所述第一管脚为OCP 3.0协议定义的PERST0#信号,所述PERST0#信号和所述第二管脚复用为所述网卡检测信号;The first pin is the PERST0# signal defined by the OCP 3.0 protocol, and the PERST0# signal and the second pin are multiplexed as the network card detection signal;
在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述开关选通所述CPU;所述第三管脚和所述第四管脚用于输出中断信号;所述第四管理脚用于输出管理状态指示灯的指示信号;所述CPU的管脚输出用于管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层PHY芯片的第二信号;When the network card detection signal indicates that the network card inserted into the interface is the first network card, the switch selects the CPU; the third pin and the fourth pin are used to output an interrupt signal; the second pin is used to output an interrupt signal; Four management pins are used to output the indication signal of the management state indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
在所述网卡检测信号指示插入接口的网卡为所述第二网卡时,所述开关选通所述CPLD的第六管脚和第七管脚;所述第三管脚用于输出OCP 3.0协议定义的PERST1#信号,所述第四管脚用于输出OCP 3.0协议定义的BIF2#信号,所述第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,所述第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,所述第七管脚用于输出OCP 3.0协议定义的PERST[3:2]#信号。When the network card detection signal indicates that the network card inserted into the interface is the second network card, the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the OCP 3.0 protocol The defined PERST1# signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the first The six pins are used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, and the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
第二方面,本申请提供一种网卡适配方法,主要应用于配置有第一方面的网络适配电路的计算机设备,具体如下:In the second aspect, the present application provides a network card adaptation method, which is mainly applied to computer equipment configured with the network adaptation circuit of the first aspect, specifically as follows:
所述网卡检测电路复用所述CPLD的第一管脚和第二管脚指示的信号为网卡检测信号,并根据所述网卡检测信号指示插入接口的网卡的网卡类型,所述网卡类型为CPU管理的第一网卡或者OCP协议下的第二网卡;根据所述网卡类型确定所述网卡对应的信号;利用所述信号管理所述网卡。The network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates the network card type of the network card inserted into the interface according to the network card detection signal, and the network card type is CPU Manage the first network card or the second network card under the OCP protocol; determine the signal corresponding to the network card according to the type of the network card; use the signal to manage the network card.
本实施例中,该网卡适配电路利用该网卡检测电路并复用原OCP3.0协议下的信号用于 检测插入接口的网卡的网卡类型,同时利用开关将标准OCP网卡的控制电路与该CPU管理的NIC卡的控制电路进行切换,并在原OCP网卡的控制电路上复用相关的信号。这样可以使得该网络适配电路可以复用该标准OCP网卡和该CPU管理的NIC卡,实现灵活IO槽位对标准OCP网卡和CPU管理的NIC网卡混插的需求。In this embodiment, the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3. The control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card. In this way, the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
可选的,所述根据所述网卡检测信号指示插入接口的网卡的网卡类型包括:Optionally, the network card type indicating the network card inserted into the interface according to the network card detection signal includes:
在所述网卡检测信号指示所述CPLD的第二管脚输入高电平时,所述网卡的网卡类型为所述第一网卡;在所述网卡检测信号指示所述CPLD的第二管脚输入低电平时,所述网卡的网卡类型为所述第二网卡。When the network card detection signal indicates that the second pin input of the CPLD is high, the network card type of the network card is the first network card; when the network card detection signal indicates that the second pin input of the CPLD is low level, the network card type of the network card is the second network card.
可选的,根据所述网卡类型确定所述网卡对应的信号包括:Optionally, determining the signal corresponding to the network card according to the network card type includes:
在所述网卡的网卡类型为所述第一网卡时,所述开关选通所述CPU;所述第三管脚和所述第四管脚用于输出中断信号;所述第四管理脚用于输出管理状态指示灯的指示信号;所述CPU的管脚输出用于管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层PHY芯片的第二信号;When the network card type of the network card is the first network card, the CPU is selected by the switch; the third pin and the fourth pin are used to output an interrupt signal; the fourth management pin is used Used to output the indication signal of the management status indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
在所述网卡的网卡类型为所述第二网卡时,所述开关选通所述CPLD的第六管脚和第七管脚;所述第三管脚用于输出OCP 3.0协议定义的PERST1#信号,所述第四管脚用于输出OCP 3.0协议定义的BIF2#信号,所述第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,所述第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,所述第七管脚用于输出OCP 3.0协议定义的PERST[3:2]#信号。When the network card type of the network card is the second network card, the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the PERST1# defined by the OCP 3.0 protocol signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the sixth pin is used To output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
第三方面,本申请提供计算机设备,该计算机设备配置上述第一方面所述的网卡适配电路。In a third aspect, the present application provides computer equipment configured with the network card adaptation circuit described in the first aspect above.
第四方面,本申请实施例提供一种计算机可读存储介质,该计算机存储介质存储有计算机指令,该计算机指令用于执行上述第二方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores computer instructions, and the computer instructions are used to execute the method described in the second aspect above.
第五方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二方面所述的方法。In the fifth aspect, the embodiment of the present application provides a computer program product including instructions, which, when run on a computer, causes the computer to execute the method described in the second aspect above.
第六方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持网卡适配电路实现上述方面中所涉及的功能,例如生成或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,该芯片系统还包括存储器,该存储器,用于保存网卡适配电路必要的程序指令和数据,以实现上述各方面中任意一方面的功能。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In a sixth aspect, the present application provides a chip system, which includes a processor, configured to support the network adapter circuit to implement the functions involved in the above aspect, such as generating or processing the data involved in the above method and/or information. In a possible design, the system-on-a-chip further includes a memory, and the memory is used for storing necessary program instructions and data of the network adapter circuit, so as to realize functions in any one of the above-mentioned aspects. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
附图说明Description of drawings
图1为本申请实施例中网卡适配电路的一个实施例示意图;Fig. 1 is a schematic diagram of an embodiment of a network adapter circuit in the embodiment of the present application;
图2为本申请实施例中网卡检测电路的一个示意图;Fig. 2 is a schematic diagram of the network card detection circuit in the embodiment of the present application;
图3为本申请实施例中网卡检测电路的另一个示意图;Fig. 3 is another schematic diagram of the network card detection circuit in the embodiment of the present application;
图4为本申请实施例中网卡适配电路的一个信号示意图;FIG. 4 is a signal schematic diagram of a network card adaptation circuit in an embodiment of the present application;
图5为本申请实施例中网卡适配电路的另一个信号示意图;FIG. 5 is another signal schematic diagram of the network card adaptation circuit in the embodiment of the present application;
图6为本申请实施例中网卡适配方法的一个实施例示意图。FIG. 6 is a schematic diagram of an embodiment of a method for adapting a network card in the embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only part of the present application, rather than all of them. . Those skilled in the art know that, with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的单元的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个单元可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的单元或子单元可以是也可以不是物理上的分离,可以是也可以不是物理单元,或者可以分布到多个电路单元中,可以根据实际的需要选择其中的部分或全部单元来实现本申请方案的目的。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to the expressly listed Instead, other steps or modules not explicitly listed or inherent to the process, method, product or apparatus may be included. The naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logic sequence indicated by the naming or numbering. The execution order of the technical purpose is changed, as long as the same or similar technical effect can be achieved. The division of units presented in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated in another system, or some features can be ignored. , or not, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms, this Applications are not limited. Moreover, the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs unit to realize the purpose of the application scheme.
当前Kunpeng机架服务器的后窗支持两个灵活输入输出(input/output,IO)槽位,可以分别用于插入OCP3.0网卡和CPU管理的NIC卡。在物理设计上OCP 3.0网卡和CPU管理的NIC网卡形态结构相同,但是由于网卡管理方的不同,其接口设计也不相同,因此对于服务器的后窗上的IO槽位两种网卡无法混插。比如以S920X05服务器为例,后窗支持两个灵活IO槽位1和槽位2,其中灵活IO槽位1仅支持标准OCP网卡,灵活IO槽位2仅支持CPU管理的NIC网卡,两者不能混插。因此限制了客户对外接网卡的配置需求,无法满足要求两个标准OCP网卡或者两个CPU管理的NIC网卡的需求。The rear window of the current Kunpeng rack server supports two flexible input/output (IO) slots, which can be used to insert OCP3.0 network cards and CPU-managed NIC cards respectively. In terms of physical design, the OCP 3.0 network card and the NIC network card managed by the CPU have the same shape and structure, but due to the difference in the management of the network card, the interface design is also different. Therefore, the IO slots on the rear window of the server cannot be mixed. For example, taking the S920X05 server as an example, the rear window supports two flexible IO slots 1 and 2. Among them, the flexible IO slot 1 only supports the standard OCP network card, and the flexible IO slot 2 only supports the NIC network card managed by the CPU. Mixed insertion. Therefore, the customer's configuration requirements for external network cards are limited, and the requirements for two standard OCP network cards or two CPU-managed NIC network cards cannot be met.
为了解决这一问题,本申请提供一种网卡适配电路,具体包括:网卡检测电路、CPLD、开关及CPU;所述CPLD包括第一管脚、第二管脚、第三管脚、第四管脚、第五管脚、第六管脚和第七管脚;所述网卡检测电路与所述CPLD的第一管理和第二管脚相连;所述CPLD的第六管脚和第七管脚与所述开关相连;所述CPU与所述开关相连;所述网卡检测电路复用所述CPLD的第一管脚和第二管脚指示的信号为网卡检测信号,并根据所述网卡检测信号指示插入接口的网卡为CPU管理的第一网卡或者开放计算项目OCP3.0协议下的第二网卡;在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述CPLD中的第三管脚、第四管脚、第五管脚指示所述第一网卡对应的信号,所述开关选通所述CPU,使得所述CPU管理所述第一网卡对应的信号;在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述开关选通所述CPLD的第六管脚和第七管脚,使得所述CPLD中的第三管 脚、第四管脚、第五管脚、第六管脚和第七管脚指示所述第二网卡对应的信号。In order to solve this problem, the application provides a network card adaptation circuit, which specifically includes: a network card detection circuit, a CPLD, a switch, and a CPU; the CPLD includes a first pin, a second pin, a third pin, a fourth Pin, the fifth pin, the sixth pin and the seventh pin; the network card detection circuit is connected with the first management and the second pin of the CPLD; the sixth pin and the seventh pin of the CPLD The pin is connected with the switch; the CPU is connected with the switch; the signal indicated by the first pin and the second pin of the CPLD multiplexed by the network card detection circuit is the network card detection signal, and according to the network card detection The signal indicates that the network card inserted into the interface is the first network card managed by the CPU or the second network card under the Open Computing Project OCP3.0 protocol; when the network card detection signal indicates that the network card inserted into the interface is the first network card, in the CPLD The third pin, the fourth pin, and the fifth pin indicate the signal corresponding to the first network card, and the switch gates the CPU so that the CPU manages the signal corresponding to the first network card; When the network card detection signal indicates that the network card inserted into the interface is the first network card, the switch selects the sixth pin and the seventh pin of the CPLD, so that the third pin and the fourth pin in the CPLD pin, the fifth pin, the sixth pin and the seventh pin indicate signals corresponding to the second network card.
下面结合图1对本申请实施例中的网卡适配电路进行描述,如图1所示,该网卡适配电路100包括网卡检测电路101、CPLD102、开关103以及CPU104。其中,该CPLD102包括第一管脚1021、第二管脚1022、第三管脚1023、第四管脚1024、第五管脚1025、第六管脚1026、第七管脚1027;其中,该网卡检测电路101包括该CPLD102的该第一管脚1021和该第二管脚1022,该开关103用于实现该CPLD102的第六管脚1026和第七管脚1027与该CPU104的管脚之间的切换。其中,该网卡检测电路复用该CPLD的第一管脚和第二管脚指示的信号为网卡检测信号,并根据该网卡检测信号指示插入接口的网卡为CPU管理的第一网卡或者开放计算项目OCP3.0协议下的第二网卡;在该网卡检测信号指示插入接口的网卡为该第一网卡时,该CPLD中的第三管脚、第四管脚、第五管脚指示该第一网卡对应的信号,该开关选通该CPU,使得该CPU管理该第一网卡对应的信号;在该网卡检测信号指示插入接口的网卡为该第一网卡时,该开关选通该CPLD的第六管脚和第七管脚,使得该CPLD中的第三管脚、第四管脚、第五管脚、第六管脚和第七管脚指示该第二网卡对应的信号。本实施例中,该网卡适配电路利用该网卡检测电路并复用原OCP3.0协议下的信号用于检测插入接口的网卡的网卡类型,同时利用开关将标准OCP网卡的控制电路与该CPU管理的NIC卡的控制电路进行切换,并在原OCP网卡的控制电路上复用相关的信号。这样可以使得该网络适配电路可以复用该标准OCP网卡和该CPU管理的NIC卡,实现灵活IO槽位对标准OCP网卡和CPU管理的NIC网卡混插的需求。The network card adaptation circuit in the embodiment of the present application will be described below with reference to FIG. 1 . As shown in FIG. 1 , the network card adaptation circuit 100 includes a network card detection circuit 101 , a CPLD 102 , a switch 103 and a CPU 104 . Wherein, the CPLD102 includes a first pin 1021, a second pin 1022, a third pin 1023, a fourth pin 1024, a fifth pin 1025, a sixth pin 1026, and a seventh pin 1027; wherein, the Network card detection circuit 101 comprises this first pin 1021 of this CPLD102 and this second pin 1022, and this switch 103 is used for realizing the sixth pin 1026 of this CPLD102 and the pin between the seventh pin 1027 and this CPU104 switch. Wherein, the network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as the network card detection signal, and indicates according to the network card detection signal that the network card inserted into the interface is the first network card managed by the CPU or an open computing project The second network card under the OCP3.0 protocol; when the network card detection signal indicates that the network card inserted into the interface is the first network card, the third pin, the fourth pin, and the fifth pin in the CPLD indicate the first network card Corresponding signal, this switch strobes this CPU, makes this CPU manage the signal corresponding to this first network card; When this network card detection signal indicates that the network card inserted into the interface is the first network card, this switch strobes the sixth pipe of this CPLD pin and the seventh pin, so that the third pin, the fourth pin, the fifth pin, the sixth pin and the seventh pin in the CPLD indicate the signal corresponding to the second network card. In this embodiment, the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3. The control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card. In this way, the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
在此架构下,该CPLD102的第一管脚1021、第二管脚1022在OCP3.0协议下输出的信号复用为该网卡检测电路101的网卡检测信号,该CPLD102可以根据该网卡检测信号指示插入接口的网卡为CPU直接管理的第一网卡或者标准OCP3.0协议下的第二网卡。该网卡检测电路101的一种可能实现方式可以如图2所示:Under this framework, the first pin 1021 and the second pin 1022 of the CPLD102 output signals under the OCP3.0 protocol to be multiplexed as the network card detection signal of the network card detection circuit 101, and the CPLD102 can indicate according to the network card detection signal The network card inserted into the interface is the first network card directly managed by the CPU or the second network card under the standard OCP3.0 protocol. A possible implementation of the network card detection circuit 101 can be shown in Figure 2:
所述网卡检测电路101包括并联的第一支路和第二支路,并联的第一网卡检测支路和第二网卡检测支路,并联的第一支路和第二支路与并联的第一网卡检测支路和第二网卡检测支路串联;其中,所述第一支路包括第一电源、第一电阻和第二电阻;所述第一电阻与所述第二电阻并联;所述第一电阻与所述第一管脚1021相连,所述第二电阻与所述第一电源相连;所述第二支路包括第二电源、第三电阻、第四电阻和MOS管;所述第三电阻、所述第四电阻和所述MOS管均并联;所述第三电阻与所述第二管脚1022相连,所述第四电阻与所述第二电源相连;所述MOS管的D极通过所述第三电阻与所述第二管脚相连,所述MOS管的S极接地;所述第一网卡检测支路包括第五电阻,且所述第五电阻的另一端接地;所述第二网卡检测支路包括并联的第六电阻和第七电阻,所述第六电阻连接第三电源;所述第七电阻接地。The network card detection circuit 101 includes a parallel first branch and a second branch, a parallel first network card detection branch and a second network card detection branch, a parallel first branch and a second branch and a parallel first branch. A network card detection branch and a second network card detection branch are connected in series; wherein, the first branch includes a first power supply, a first resistor and a second resistor; the first resistor is connected in parallel with the second resistor; the The first resistor is connected to the first pin 1021, and the second resistor is connected to the first power supply; the second branch includes a second power supply, a third resistor, a fourth resistor and a MOS tube; the The third resistor, the fourth resistor and the MOS transistor are all connected in parallel; the third resistor is connected to the second pin 1022, and the fourth resistor is connected to the second power supply; the MOS transistor The D pole is connected to the second pin through the third resistor, and the S pole of the MOS transistor is grounded; the first network card detection branch includes a fifth resistor, and the other end of the fifth resistor is grounded; The second network card detection branch includes a sixth resistor and a seventh resistor connected in parallel, the sixth resistor is connected to the third power supply; the seventh resistor is grounded.
在此网卡检测电路101中,该网卡检测信号的一种可能实现方式可以如下:在所述第一网卡检测支路与所述第一支路和所述第二支路连通时(即插入接口的网卡为该CPU管理下的第一网卡时),所述第二管脚输入高电平;在所述第二网卡检测支路与所述第一支路和所述第二支路连通时(即插入接口的网卡为该标准OCP3.0协议下的第二网卡),所述第二管脚输入低电平。In this network card detection circuit 101, a possible implementation of the network card detection signal can be as follows: when the first network card detection branch communicates with the first branch and the second branch (i.e. plug into the interface When the network card is the first network card under the management of the CPU), the second pin inputs a high level; when the second network card detection branch is connected with the first branch and the second branch (That is, the network card inserted into the interface is the second network card under the standard OCP3.0 protocol), and the second pin inputs a low level.
在上述实现方式中,该网卡检测电路101的具体实现可以如图3所示:所述第一电源、所述第二电源以及所述第三电源均设置为3v3电源,所述第一电阻、所述三电阻、所述第五电阻均设置为33欧姆,所述第二电阻、所述第四电阻、所述第六电阻和所述第七电阻均设置为1000欧姆。在上述电阻与电源的设计方案下,当插入接口的网卡为该第一网卡时,1000欧姆上拉和33欧姆下拉的分压不足以打开MOS管,第二管脚收到高电平,即判断插入接口的网卡为该第一网卡。当插入接口的网卡为该第二网卡时,无论第二网卡上信号是弱下拉,还是悬空,还是上拉,都可以保证MOS管开启,第二管脚收到低电平,即判断为插入接口的网卡为该第二网卡。In the above implementation, the specific implementation of the network card detection circuit 101 can be as shown in Figure 3: the first power supply, the second power supply and the third power supply are all set to 3v3 power supply, the first resistor, The third resistor and the fifth resistor are all set to 33 ohms, and the second resistor, the fourth resistor, the sixth resistor and the seventh resistor are all set to 1000 ohms. Under the above design scheme of resistance and power supply, when the network card inserted into the interface is the first network card, the divided voltage of 1000 ohm pull-up and 33 ohm pull-down is not enough to turn on the MOS tube, and the second pin receives a high level, that is It is determined that the network card inserted into the interface is the first network card. When the network card inserted into the interface is the second network card, no matter whether the signal on the second network card is weakly pulled down, suspended, or pulled up, it can ensure that the MOS transistor is turned on, and the second pin receives a low level, which is judged as inserted. The network card of the interface is the second network card.
上面虽然仅提供了网卡检测电路101的一种可能实现方式,但只要可以通过不同的网卡检测信号区别该第一网卡与该第二网卡即可,具体此处不做限制。Although the above only provides a possible implementation of the network card detection circuit 101, as long as the first network card and the second network card can be distinguished through different network card detection signals, there is no specific limitation here.
在本实施例中,该CPLD与该CPU复用信号的具体实现可以如图4与图5所示:In this embodiment, the concrete realization of this CPLD and this CPU multiplexing signal can be as shown in Figure 4 and Figure 5:
在图4中,插入接口的网卡为CPU管理的第一网卡,这时,该开关选通该CPU的管脚;该CPLD的第三管脚和该第四管脚输出中断信号,该第三管脚上的信号可以定义为INT_NIC_CPLD0,该第四管脚上的信号可以定义为INT_NIC_CPLD1。该第五管脚输出用于管理状态指示灯的指示信号,其中,该指示信号可以定义为CPLD_NIC_I2C。该第六管脚与该第七管脚切换至该CPU的管脚,因此该CPU的管脚将输出管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层(Physical,PHY)芯片的第二信号,其中,该第一信号可以定义为CPU_NIC_I2C,该第二信号可以定义为CPU_NIC_MDIO。In Fig. 4, the network card inserted into the interface is the first network card managed by the CPU, at this moment, the pin of the CPU is selected by the switch; the third pin and the fourth pin of the CPLD output an interrupt signal, and the third pin outputs an interrupt signal. The signal on the pin can be defined as INT_NIC_CPLD0, and the signal on the fourth pin can be defined as INT_NIC_CPLD1. The fifth pin outputs an indication signal for managing the status indicator light, wherein the indication signal can be defined as CPLD_NIC_I2C. The sixth pin and the seventh pin are switched to the pin of the CPU, so the pin of the CPU will output the first signal for managing the optical module and the clock data recovery chip and for managing the physical layer (Physical, PHY) The second signal of the chip, wherein the first signal may be defined as CPU_NIC_I2C, and the second signal may be defined as CPU_NIC_MDIO.
在图5中,插入接口的网卡为OCP3.0协议下的第二网卡,这时,该开关选通该CPLD的第六管脚和第七管脚;该第三管脚用于输出OCP 3.0协议定义的PERST1#信号,该第四管脚用于输出OCP 3.0协议定义的BIF2#信号,该第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,该第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,该第七管脚用于输出OCP 3.0协议定义的PERST[3:2]#信号。In Figure 5, the network card inserted into the interface is the second network card under the OCP3.0 protocol. At this time, the switch selects the sixth pin and the seventh pin of the CPLD; the third pin is used to output OCP 3.0 The PERST1# signal defined by the protocol, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, the sixth pin The pin is used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, and the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
本申请实施例还提供一种网卡适配方法,其主要应用于包括上述图1至图5中任一项所述的网卡适配电路的计算机设备,具体参阅图6所示,本申请实施例中网卡适配方法包括:The embodiment of the present application also provides a network card adaptation method, which is mainly applied to computer equipment including the network card adaptation circuit described in any one of Figures 1 to 5 above, as shown in Figure 6 for details, the embodiment of the present application The NIC adaptation methods include:
601、利用网卡检测电路获取插入接口的网卡的网卡类型,所述网卡类型为CPU管理的第一网卡或者OCP协议下的第二网卡。601. Use a network card detection circuit to acquire a network card type of a network card inserted into an interface, where the network card type is a first network card managed by a CPU or a second network card under an OCP protocol.
在网卡插入接口之后,该计算机设备根据网卡检测电路获取到网卡检测信号,并根据该网卡检测信号确定该网卡的类型。一种可能实现方式中,在所述网卡检测信号指示所述CPLD的第二管脚输入高电平时,所述网卡的网卡类型为所述第一网卡;After the network card is inserted into the interface, the computer equipment obtains the network card detection signal according to the network card detection circuit, and determines the type of the network card according to the network card detection signal. In a possible implementation manner, when the network card detection signal indicates that the second pin of the CPLD inputs a high level, the network card type of the network card is the first network card;
在所述网卡检测信号指示所述CPLD的第二管脚输入低电平时,所述网卡的网卡类型为所述第二网卡。When the network card detection signal indicates that the second pin of the CPLD inputs a low level, the network card type of the network card is the second network card.
602、根据所述网卡类型确定所述网卡对应的信号。602. Determine a signal corresponding to the network card according to the network card type.
在根据该网卡检测信号确定插入接口的网卡为CPU管理的第一网卡时,该网卡适配电路中的开关选通该CPU的管脚;该CPLD的第三管脚和该第四管脚输出中断信号,该第三管脚上的信号可以定义为INT_NIC_CPLD0,该第四管脚上的信号可以定义为INT_NIC_CPLD1。 该第五管脚输出用于管理状态指示灯的指示信号,其中,该指示信号可以定义为CPU_NIC_I2C。该第六管脚与该第七管脚切换至该CPU的管脚,因此该CPU的管脚将输出管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层(Physical,PHY)芯片的第二信号,其中,该第一信号可以定义为CPU_NIC_I2C,该第二信号可以定义为CPU_NIC_MDIO。When determining that the network card inserted into the interface is the first network card managed by the CPU according to the network card detection signal, the switch in the network card adaptation circuit selects the pin of the CPU; the third pin of the CPLD and the fourth pin output For an interrupt signal, the signal on the third pin may be defined as INT_NIC_CPLD0, and the signal on the fourth pin may be defined as INT_NIC_CPLD1. The fifth pin outputs an indication signal for managing the status indicator light, wherein the indication signal can be defined as CPU_NIC_I2C. The sixth pin and the seventh pin are switched to the pin of the CPU, so the pin of the CPU will output the first signal for managing the optical module and the clock data recovery chip and for managing the physical layer (Physical, PHY) The second signal of the chip, wherein the first signal may be defined as CPU_NIC_I2C, and the second signal may be defined as CPU_NIC_MDIO.
在根据该网卡检测信号确定插入接口的网卡为第二网卡时,该网卡适配电路中的开关选通该CPLD的第六管脚和第七管脚;该第三管脚用于输出OCP 3.0协议定义的PERST1#信号,该第四管脚用于输出OCP 3.0协议定义的BIF2#信号,该第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,该第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,该第七管脚用于输出OCP 3.0协议定义的PERST[3:2]#信号。When determining that the network card inserted into the interface is the second network card according to the network card detection signal, the switch in the network card adaptation circuit selects the sixth pin and the seventh pin of the CPLD; the third pin is used to output OCP 3.0 The PERST1# signal defined by the protocol, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, the sixth pin The pin is used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, and the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
603、利用所述信号管理所述网卡。603. Use the signal to manage the network card.
本实施例中,该网卡适配电路利用该网卡检测电路并复用原OCP3.0协议下的信号用于检测插入接口的网卡的网卡类型,同时利用开关将标准OCP网卡的控制电路与该CPU管理的NIC卡的控制电路进行切换,并在原OCP网卡的控制电路上复用相关的信号。这样可以使得该网络适配电路可以复用该标准OCP网卡和该CPU管理的NIC卡,实现灵活IO槽位对标准OCP网卡和CPU管理的NIC网卡混插的需求。In this embodiment, the network card adaptation circuit utilizes the network card detection circuit and multiplexes signals under the original OCP3. The control circuit of the managed NIC card is switched, and relevant signals are multiplexed on the control circuit of the original OCP network card. In this way, the network adaptation circuit can reuse the standard OCP network card and the NIC card managed by the CPU, and realize the mixed insertion requirements of the standard OCP network card and the NIC network card managed by the CPU in the flexible IO slot.
本申请实施例还提供一种计算机设备,该计算机设备包括上述图1至图5中任一项所述的网卡适配电路。An embodiment of the present application further provides a computer device, which includes the network card adaptation circuit described in any one of FIGS. 1 to 5 above.
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于终端中。当然,处理器和存储介质也可以作为分立组件存在于第一通信装置中。The steps of the methods or algorithms described in connection with the disclosure of this application can be implemented in the form of hardware, or can be implemented in the form of a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, mobile hard disk, CD-ROM or any other form of storage known in the art medium. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be a component of the processor. The processor and storage medium can be located in the ASIC. Alternatively, the ASIC may be located in the terminal. Of course, the processor and the storage medium may also exist in the first communication device as discrete components.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各 个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Claims (8)

  1. 一种网卡适配电路,其特征在于,包括:A network card adaptation circuit is characterized in that it comprises:
    网卡检测电路、复杂可编程逻辑器件CPLD、开关及中央处理器CPU;Network card detection circuit, complex programmable logic device CPLD, switch and central processing unit CPU;
    所述CPLD包括第一管脚、第二管脚、第三管脚、第四管脚、第五管脚、第六管脚和第七管脚;The CPLD includes a first pin, a second pin, a third pin, a fourth pin, a fifth pin, a sixth pin and a seventh pin;
    所述网卡检测电路与所述CPLD的第一管理和第二管脚相连;The network card detection circuit is connected with the first management and the second pin of the CPLD;
    所述CPLD的第六管脚和第七管脚与所述开关相连;The sixth pin and the seventh pin of the CPLD are connected to the switch;
    所述CPU与所述开关相连;The CPU is connected to the switch;
    所述网卡检测电路复用所述CPLD的第一管脚和第二管脚指示的信号为网卡检测信号,并根据所述网卡检测信号指示插入接口的网卡为CPU管理的第一网卡或者开放计算项目OCP3.0协议下的第二网卡;The network card detection circuit multiplexes the signal indicated by the first pin and the second pin of the CPLD as a network card detection signal, and indicates that the network card inserted into the interface is the first network card managed by the CPU or an open computing system according to the network card detection signal. The second network card under the project OCP3.0 protocol;
    在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述CPLD中的第三管脚、第四管脚、第五管脚指示所述第一网卡对应的信号,所述开关选通所述CPU,使得所述CPU管理所述第一网卡对应的信号;When the network card detection signal indicates that the network card inserted into the interface is the first network card, the third pin, the fourth pin, and the fifth pin in the CPLD indicate signals corresponding to the first network card, and the switch gating the CPU, so that the CPU manages the signal corresponding to the first network card;
    在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述开关选通所述CPLD的第六管脚和第七管脚,使得所述CPLD中的第三管脚、第四管脚、第五管脚、第六管脚和第七管脚指示所述第二网卡对应的信号。When the network card detection signal indicates that the network card inserted into the interface is the first network card, the switch gates the sixth pin and the seventh pin of the CPLD, so that the third pin and the seventh pin in the CPLD The fourth pin, the fifth pin, the sixth pin and the seventh pin indicate signals corresponding to the second network card.
  2. 根据权利要求1所述的网卡适配电路,其特征在于,所述网卡检测电路包括并联的第一支路和第二支路,并联的第一网卡检测支路和第二网卡检测支路,并联的第一支路和第二支路与并联的第一网卡检测支路和第二网卡检测支路串联;The network card adaptation circuit according to claim 1, wherein the network card detection circuit comprises a first branch and a second branch connected in parallel, a first network card detection branch and a second network card detection branch connected in parallel, The parallel first branch and the second branch are connected in series with the parallel first network card detection branch and the second network card detection branch;
    其中,所述第一支路包括第一电源、第一电阻和第二电阻;所述第一电阻与所述第二电阻并联;所述第一电阻与所述第一管脚相连,所述第二电阻与所述第一电源相连;Wherein, the first branch includes a first power supply, a first resistor and a second resistor; the first resistor is connected in parallel with the second resistor; the first resistor is connected to the first pin, and the the second resistor is connected to the first power supply;
    所述第二支路包括第二电源、第三电阻、第四电阻和MOS管;所述第三电阻、所述第四电阻和所述MOS管均并联;所述第三电阻与所述第二管脚相连,所述第四电阻与所述第二电源相连;所述MOS管的D极通过所述第三电阻与所述第二管脚相连,所述MOS管的S极接地;The second branch includes a second power supply, a third resistor, a fourth resistor, and a MOS tube; the third resistor, the fourth resistor, and the MOS tube are connected in parallel; the third resistor and the first resistor The two pins are connected, the fourth resistor is connected to the second power supply; the D pole of the MOS transistor is connected to the second pin through the third resistor, and the S pole of the MOS transistor is grounded;
    所述第一网卡检测支路包括第五电阻,且所述第五电阻的另一端接地;The first network card detection branch includes a fifth resistor, and the other end of the fifth resistor is grounded;
    所述第二网卡检测支路包括并联的第六电阻和第七电阻,所述第六电阻连接第三电源;所述第七电阻接地;The second network card detection branch includes a sixth resistor and a seventh resistor connected in parallel, the sixth resistor is connected to a third power supply; the seventh resistor is grounded;
    其中,在所述第一网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入高电平;Wherein, when the first network card detection branch is connected with the first branch and the second branch, the second pin inputs a high level;
    在所述第二网卡检测支路与所述第一支路和所述第二支路连通时,所述第二管脚输入低电平。When the second network card detection branch is connected to the first branch and the second branch, the second pin inputs a low level.
  3. 根据权利要求2所述的网卡适配电路,其特征在于,所述第一电源、所述第二电源以及所述第三电源均设置为3v3电源,所述第一电阻、所述三电阻、所述第五电阻均设置为33欧姆,所述第二电阻、所述第四电阻、所述第六电阻和所述第七电阻均设置为1000欧姆。The network card adaptation circuit according to claim 2, wherein the first power supply, the second power supply and the third power supply are all set to 3v3 power supply, the first resistor, the three resistors, The fifth resistors are all set to 33 ohms, and the second resistors, the fourth resistors, the sixth resistors and the seventh resistors are all set to 1000 ohms.
  4. 根据权利要求1至3中任一项所述的网卡适配电路,其特征在于,所述第一管脚为OCP 3.0协议定义的PERST0#信号,所述PERST0#信号和所述第二管脚复用为所述网卡检测信号;According to the network card adaptation circuit described in any one of claims 1 to 3, it is characterized in that, the first pin is the PERST0# signal defined by the OCP 3.0 protocol, and the PERST0# signal and the second pin Multiplexing as the network card detection signal;
    在所述网卡检测信号指示插入接口的网卡为所述第一网卡时,所述开关选通所述CPU;所述第三管脚和所述第四管脚用于输出中断信号;所述第四管理脚用于输出管理状态指示灯的指示信号;所述CPU的管脚输出用于管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层PHY芯片的第二信号;When the network card detection signal indicates that the network card inserted into the interface is the first network card, the switch selects the CPU; the third pin and the fourth pin are used to output an interrupt signal; the second pin is used to output an interrupt signal; Four management pins are used to output the indication signal of the management state indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
    在所述网卡检测信号指示插入接口的网卡为所述第二网卡时,所述开关选通所述CPLD的第六管脚和第七管脚;所述第三管脚用于输出OCP 3.0协议定义的PERST1#信号,所述第四管脚用于输出OCP 3.0协议定义的BIF2#信号,所述第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,所述第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,所述第七管脚用于输出OCP 3.0协议定义的PERST[3:2]#信号。When the network card detection signal indicates that the network card inserted into the interface is the second network card, the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the OCP 3.0 protocol The defined PERST1# signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the first The six pins are used to output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, and the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
  5. 一种计算机设备,其特征在于,所述计算机设备配置如权利要求1至4中任一项所述的网卡适配电路。A computer device, characterized in that the computer device is configured with the network adapter circuit according to any one of claims 1 to 4.
  6. 一种网卡适配方法,应用于包括如权利要求1至4中任一项所述的网卡适配电路的计算机设备,其特征在于,包括:A network card adaptation method, applied to a computer device comprising the network card adaptation circuit according to any one of claims 1 to 4, characterized in that, comprising:
    利用网卡检测电路获取插入接口的网卡的网卡类型,所述网卡类型为CPU管理的第一网卡或者OCP协议下的第二网卡;Utilize the network card detection circuit to obtain the network card type of the network card inserted into the interface, and the network card type is the first network card managed by the CPU or the second network card under the OCP protocol;
    根据所述网卡类型确定所述网卡对应的信号;determining a signal corresponding to the network card according to the network card type;
    利用所述信号管理所述网卡。The network card is managed using the signal.
  7. 根据权利要求6所述的方法,其特征在于,所述利用网卡检测电路检测插入接口的网卡的网卡类型包括:The method according to claim 6, wherein the network card type of the network card inserted into the interface detected by the network card detection circuit comprises:
    获取所述网卡对应的网卡检测信号;Obtaining a network card detection signal corresponding to the network card;
    在所述网卡检测信号指示所述CPLD的第二管脚输入高电平时,所述网卡的网卡类型为所述第一网卡;When the network card detection signal indicates that the second pin of the CPLD inputs a high level, the network card type of the network card is the first network card;
    在所述网卡检测信号指示所述CPLD的第二管脚输入低电平时,所述网卡的网卡类型为所述第二网卡。When the network card detection signal indicates that the second pin of the CPLD inputs a low level, the network card type of the network card is the second network card.
  8. 根据权利要求6或7所述的方法,其特征在于,根据所述网卡类型确定所述网卡对应的信号包括:The method according to claim 6 or 7, wherein determining the signal corresponding to the network card according to the type of the network card comprises:
    在所述网卡的网卡类型为所述第一网卡时,所述开关选通所述CPU;所述第三管脚和所述第四管脚用于输出中断信号;所述第四管理脚用于输出管理状态指示灯的指示信号;所述CPU的管脚输出用于管理光模块和时钟数据恢复芯片的第一信号和用于管理物理层PHY芯片的第二信号;When the network card type of the network card is the first network card, the switch selects the CPU; the third pin and the fourth pin are used to output an interrupt signal; the fourth management pin is used Used to output the indication signal of the management status indicator light; the pin output of the CPU is used to manage the first signal of the optical module and the clock data recovery chip and the second signal for the management of the physical layer PHY chip;
    在所述网卡的网卡类型为所述第二网卡时,所述开关选通所述CPLD的第六管脚和第七管脚;所述第三管脚用于输出OCP 3.0协议定义的PERST1#信号,所述第四管脚用于输出OCP 3.0协议定义的BIF2#信号,所述第五管脚用于输出OCP 3.0协议定义的BIF[1:0]#信号,所述第六管脚用于输出OCP 3.0协议定义的SLOT_ID[1:0]信号,所述第七管脚用于输 出OCP 3.0协议定义的PERST[3:2]#信号。When the network card type of the network card is the second network card, the sixth pin and the seventh pin of the CPLD are selected by the switch; the third pin is used to output the PERST1# defined by the OCP 3.0 protocol signal, the fourth pin is used to output the BIF2# signal defined by the OCP 3.0 protocol, the fifth pin is used to output the BIF[1:0]# signal defined by the OCP 3.0 protocol, and the sixth pin is used To output the SLOT_ID[1:0] signal defined by the OCP 3.0 protocol, the seventh pin is used to output the PERST[3:2]# signal defined by the OCP 3.0 protocol.
PCT/CN2022/096162 2021-09-26 2022-05-31 Network card adaptation circuit, network card adaptation method, and related apparatus WO2023045389A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111129484.6A CN115878523A (en) 2021-09-26 2021-09-26 Network card adapting circuit, network card adapting method and related device
CN202111129484.6 2021-09-26

Publications (1)

Publication Number Publication Date
WO2023045389A1 true WO2023045389A1 (en) 2023-03-30

Family

ID=85719271

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096162 WO2023045389A1 (en) 2021-09-26 2022-05-31 Network card adaptation circuit, network card adaptation method, and related apparatus

Country Status (2)

Country Link
CN (1) CN115878523A (en)
WO (1) WO2023045389A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233661A (en) * 2023-05-04 2023-06-06 新华三技术有限公司 Network equipment and optical module access control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753284A (en) * 2009-12-25 2010-06-23 中国船舶重工集团公司第七○九研究所 10/100M Ethernet double interface switching method based upon carrier detect and device thereof
CN108347351A (en) * 2018-01-26 2018-07-31 广州视源电子科技股份有限公司 The method, apparatus and system of equipment Dual-Ethernet card compatibility
CN111901164A (en) * 2020-07-17 2020-11-06 浪潮电子信息产业股份有限公司 Adaptive control method, device, equipment and system for OCP NIC network card
CN112068784A (en) * 2020-09-14 2020-12-11 上海商米科技集团股份有限公司 Method for automatically switching multiple network cards of cloud printing equipment and cloud printing equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753284A (en) * 2009-12-25 2010-06-23 中国船舶重工集团公司第七○九研究所 10/100M Ethernet double interface switching method based upon carrier detect and device thereof
CN108347351A (en) * 2018-01-26 2018-07-31 广州视源电子科技股份有限公司 The method, apparatus and system of equipment Dual-Ethernet card compatibility
CN111901164A (en) * 2020-07-17 2020-11-06 浪潮电子信息产业股份有限公司 Adaptive control method, device, equipment and system for OCP NIC network card
CN112068784A (en) * 2020-09-14 2020-12-11 上海商米科技集团股份有限公司 Method for automatically switching multiple network cards of cloud printing equipment and cloud printing equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233661A (en) * 2023-05-04 2023-06-06 新华三技术有限公司 Network equipment and optical module access control method
CN116233661B (en) * 2023-05-04 2023-08-18 新华三技术有限公司 Network equipment and optical module access control method

Also Published As

Publication number Publication date
CN115878523A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
JP6360588B2 (en) Dynamic PCIE switch relocation system and method
KR101699839B1 (en) Detection of cable connections for electronic devices
US6275864B1 (en) Matrix switch for a network management system
US9696777B2 (en) Computer port control
US7069347B1 (en) Device and method for adapting speed of a USB device based on available power
EP1723532B1 (en) Multiple burst protocol device controller
TWI374357B (en) Method and apparatus for masking within a data processing system having applicability for a development interface
EP3504625A1 (en) Automatically configuring a universal serial bus (usb) type-c port of a computing device
TWI710222B (en) High performance repeater
US7694029B2 (en) Detecting miscabling in a storage area network
EP2966810A1 (en) Sending packets with expanded headers
US10216678B2 (en) Serial peripheral interface daisy chain communication with an in-frame response
US7734839B1 (en) Method and integrated circuit for providing enclosure management services utilizing multiple interfaces and protocols
US9965405B2 (en) Initial enumeration of empty endpoint slots using endpoint emulation
US7685329B1 (en) Detecting the presence and activity of a mass storage device
US10101764B2 (en) Automatic clock configuration system
US9369176B2 (en) Detection, classification and mutual recognition of 4 pair power over Ethernet
WO2018120498A1 (en) Adaptor, device identifying method and device identifying apparatus
WO2023045389A1 (en) Network card adaptation circuit, network card adaptation method, and related apparatus
CN107193763A (en) The method and electronic equipment of a kind of information processing
CN111666240A (en) Trans-driver for autonomously detecting cable orientation
CN110647486B (en) PCIe link training method, end equipment and communication system
GB2421326A (en) Scalable reference clock unit for external cards
US6523071B1 (en) Process and apparatus for configuring the direct memory access transfer mode of a motherboard or host computer
US11232060B2 (en) Method, apparatus and system for power supply policy exchange on a bus

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: 22871450

Country of ref document: EP

Kind code of ref document: A1