Port lighting method and system, mainboard, storage medium and electronic equipment
By determining the lighting signal position and type of each daughter card slot on a switch or router that supports hot-swap daughter cards, and outputs the entire lighting signal code stream through the switching chip, the lighting abnormality caused by the change in the number of ports in the hardware lighting method is solved, and stable and efficient port lighting is achieved.
Patent Information
- Application Number
- CN202510070527.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
On switches or routers that support hot-swap children cards, the hardware lighting method is related to changes in the number and order of lighting signals output by the switching chip, which causes CPLD to be unable to adapt to dynamic changes, resulting in abnormal lighting of ports.
The CPU of the motherboard determines the number and position of the lighting signals of each daughter card slot in the entire lighting signal code stream according to the number of SerDes interfaces provided to each daughter card slot and the preset lighting sequence, and outputs the entire lighting signal code stream to the programmable logic device through the switching chip to output the lighting signal code stream to achieve dynamic adjustment.
It solves the problem of lighting abnormalities caused by changes in the number of ports, maintains the stability of the number, order and position of the lighting signals output by the switching chip, and avoids the problems of high CPU resource consumption and low real-time performance.
Smart Images

Figure CN119988284A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of network equipment communication, and in particular to a device port lighting technology supporting hot-swappable daughter cards. Background Art
[0002] The port LED (Light Emitting Diode) of Ethernet switches and routers is used to indicate the working status of the port. Through the status of the port LED, you can intuitively understand the current working status of the port, which is convenient for network management and maintenance. In order to meet the high-standard requirements of modern network environments and improve the availability, flexibility and maintenance efficiency of network equipment, switch or router products that support flexible hot-swappable daughter cards have emerged. In switches or router products that support flexible hot-swappable daughter cards, the flexible change of the device port shape and number brings certain challenges to the port LED lighting technology.
[0003] For devices with flexible port configuration and number, conventional methods for implementing port lighting include software lighting and hardware lighting. The software lighting method uses software to obtain the status changes of the port in real time and update the port LED status. Specifically, software lighting obtains the Link status and Active status of the port through software task timing polling. When the Link or Active status changes are detected, the port light is controlled by writing the register of the programmable logic device to turn on, off, flash, etc. The biggest disadvantage of software lighting is that it consumes CPU resources and has low real-time performance, which results in a large performance bottleneck.
[0004] The hardware lighting method is usually completed by the cooperation of the switching chip and the programmable logic device. The switching chip outputs the lighting signal code stream to the programmable logic device (such as CPLD or FPGA). After receiving the lighting signal code stream, the programmable logic device parses and sends the lighting signal code stream to the port LED light for lighting. Compared with the software lighting method, the hardware lighting method will take up less CPU resources and has higher real-time performance. However, on switches or routers that support hot-swappable subcards, since the number of ports of the device as a whole will change with the plugging and replacement of different types of subcards, when the port lighting is realized by the hardware lighting method, the number and order of the lighting signals output by the switching chip are strongly related to the number of ports. The change in the number of device ports will inevitably bring about changes in the number and order of the lighting signals output by the switching chip. The programmable logic device can only parse the lighting signal in a fixed way and cannot adapt to the dynamic changes in the number and order of the lighting signal. There will be a problem that the plugging and unplugging of the subcard will affect the lighting status of the existing port.
[0005] Therefore, a hardware lighting solution that can adapt to flexible changes in ports is needed. Summary of the invention
[0006] The purpose of the present invention is to solve the problem of abnormal port lighting caused by the number and sequence of lighting signals output by the switching chip changing dynamically when lighting is realized by a hardware lighting method on a switch or router device supporting hot-swappable daughter cards, while the CPLD can only parse the lighting signals in a fixed manner. A port lighting method, system, mainboard, storage medium and electronic device are provided.
[0007] The objective of the present invention is achieved through the following technical solutions:
[0008] In a first aspect, a port lighting method is provided, comprising:
[0009] The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot;
[0010] The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip;
[0011] The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot;
[0012] The programmable logic device of the corresponding subcard in each subcard slot receives the lighting signal, analyzes the lighting signal and sends it to each port LED lamp for lighting;
[0013] According to the preset lighting sequence of each sub-card slot, the position of the lighting signal of each sub-card slot in the entire lighting signal code stream is determined.
[0014] Preferably, the step of determining the number and position of the lighting signals of each subcard slot in the entire lighting signal code stream includes:
[0015] The number of lighting signals configured for each sub-card slot is the same as the number of SerDes interfaces provided to each sub-card slot;
[0016] According to the preset lighting sequence of each sub-card slot, the position of the lighting signal of each sub-card slot in the entire lighting signal code stream is determined.
[0017] Preferably, the CPU of the mainboard determines the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, including:
[0018] When the number of ports of the subcard is equal to the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the configured subcard slots are all valid lighting signals;
[0019] When the number of ports of the subcard is less than the number of SerDes interfaces provided to the subcard slot, the lighting signal corresponding to the subcard slot is configured according to the usage of the SerDes interface, wherein the same number of valid lighting signals as the used SerDes interfaces and the same number of invalid signals as the unused SerDes interfaces are configured;
[0020] When the number of ports on the daughter card is greater than the number of SerDes interfaces provided to the daughter card slot, the lighting signals corresponding to the daughter card slot are configured to be invalid signals.
[0021] In a second aspect, a port lighting method is provided, which is applied to a mainboard, and includes:
[0022] The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot;
[0023] The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip;
[0024] The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot.
[0025] In a third aspect, a port lighting system is provided, including a mainboard and a daughter card, wherein the mainboard is provided with a CPU, a switching chip, a programmable logic device of the mainboard, and at least one daughter card slot, wherein the CPU of the mainboard is respectively connected to the switching chip and the programmable logic device of the mainboard, and the switching chip is connected to the programmable logic device of the mainboard; the daughter card includes a programmable logic device of the daughter card, the daughter card slot is used to connect the daughter card, and the programmable logic device of the mainboard is connected to the programmable logic device of the daughter card;
[0026] The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the sub-card in each sub-card slot;
[0027] The switching chip is used to output the entire lighting signal code stream to the programmable logic device of the mainboard;
[0028] The programmable logic device of the mainboard is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot;
[0029] The programmable logic device of the daughter card is used to receive the lighting signal, and analyze the lighting signal and send it to each port LED lamp for lighting.
[0030] Preferably, the step of determining the number and position of the lighting signals of each subcard slot in the entire lighting signal code stream includes:
[0031] The number of lighting signals configured for each sub-card slot is the same as the number of SerDes interfaces provided to each sub-card slot;
[0032] According to the preset lighting sequence of each sub-card slot, the position of the lighting signal of each sub-card slot in the entire lighting signal code stream is determined.
[0033] Preferably, the CPU of the mainboard is further used to configure the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, including:
[0034] When the number of ports of the subcard is equal to the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the configured subcard slots are all valid lighting signals;
[0035] When the number of ports of the subcard is less than the number of SerDes interfaces provided to the subcard slot, the lighting signal corresponding to the subcard slot is configured according to the usage of the SerDes interface, wherein the same number of valid lighting signals as the used SerDes interfaces and the same number of invalid signals as the unused SerDes interfaces are configured;
[0036] When the number of ports on the daughter card is greater than the number of SerDes interfaces provided to the daughter card slot, the lighting signals corresponding to the daughter card slot are configured to be invalid signals.
[0037] In a fourth aspect, a mainboard is provided, comprising a CPU, a switching chip, a programmable logic device of the mainboard, and at least one daughter card slot, wherein the CPU is connected to the switching chip and the programmable logic device of the mainboard respectively, and the switching chip is connected to the programmable logic device of the mainboard; the daughter card slot is used to connect a daughter card;
[0038] The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the sub-card in each sub-card slot;
[0039] The switching chip is used to output the entire lighting signal code stream to the programmable logic device of the mainboard;
[0040] The programmable logic device of the main board is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot.
[0041] According to a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, any one of the port lighting methods is implemented.
[0042] In a sixth aspect, an electronic device is provided, comprising the mainboard as described in the fourth aspect.
[0043] It should be further explained that the technical features corresponding to the above aspects can be combined or replaced with each other to form a new technical solution without conflict.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention determines the number and position of the lighting signals of each sub-card slot in the entire lighting signal code stream according to the number of SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot. Since the number of SerDes interfaces provided to each sub-card slot is fixed, the number of lighting signals output by the switching chip is bound to the number of SerDes interfaces provided to each sub-card slot, so that the entire lighting signal code stream and the number of lighting signals of each sub-card slot remain unchanged. At the same time, the relative positions between the sub-card slots are fixed, so that the lighting signals output by the switching chip are consistent with each other. The number, sequence and position of the light signals always remain unchanged. When the number of ports of some sub-cards in some sub-card slots changes (sub-card insertion or removal or sub-card replacement, etc.), the programmable logic device of the mainboard always intercepts the lighting signals of each sub-card slot from the entire lighting signal code stream according to the determined fixed number and position and sends them to the sub-card for lighting. On devices that support hot-swappable sub-cards and flexible port changes, the lighting abnormality caused by the change in the number of sub-card ports is avoided. At the same time, compared with the pure software lighting solution, it has the advantages of low CPU resource occupation and high real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a port lighting method shown in an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of a port lighting system shown in an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the composition of a lighting signal code stream according to an embodiment of the present invention;
[0049] Figure 4 The lighting signal update process shown in the embodiment of the present invention;
[0050] Figure 5 A schematic diagram of analyzing a lighting signal when the number of ports of a daughter card is equal to the number of SerDes provided to a daughter card slot according to an embodiment of the present invention;
[0051] Figure 6 The schematic diagram of the analysis of the lighting signal when the number of ports of the daughter card shown in the embodiment of the present invention is less than the number of SerDes provided to the daughter card slot and multiple SerDes output one port;
[0052] Figure 7 The schematic diagram of the analysis of the lighting signal when the number of ports of the daughter card shown in the embodiment of the present invention is less than the number of SerDes provided to the daughter card slot and there are unused ports of the SerDes;
[0053] Figure 8 This is a schematic diagram of analyzing a lighting signal when the number of ports of a daughter card according to an embodiment of the present invention is greater than the number of SerDes provided to the daughter card slot. DETAILED DESCRIPTION
[0054] The technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various configurations. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] It should be noted that the defects existing in the solutions in the above-mentioned prior art are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of the present application for the above-mentioned problems below should all be the contributions made by the inventor to the present application in the process of invention and creation, and should not be understood as technical contents known to technical personnel in this field.
[0056] Based on the above related statements, since this embodiment involves technologies related to port lighting, in order to make the purpose, technical solutions and advantages of the embodiments of this application clearer, the following explains the relevant professional terms that may be involved in the present invention:
[0057] 1. Programmable logic device is a digital integrated circuit that allows users to define its internal logic functions through programming. It can be CPLD (Complex Programmable Logic Device) or FPGA (Field Programmable Gate Array).
[0058] 2. Link status refers to the physical connection status of the network interface, which indicates whether the port has established a physical connection with another device. In Ethernet, the link status can be observed through the LED indicator or system log. There are two main link states: connected (Link Up) and disconnected (Link Down).
[0059] 3. Active state refers to the logical active state of the port, which indicates whether the port is participating in data transmission. Active state is usually related to the protocol state of the port. For example, in the TCP / IP protocol stack, the Active state of the port may be ESTABLISHED (connection established) or SYN_SENT (request for connection).
[0060] 4. SerDes is the abbreviation of Serializer / Deserializer, which is a technology used for high-speed data communication. It can convert multiple low-speed parallel signals into one or more high-speed serial signals for transmission, and then restore the high-speed serial signals to low-speed parallel signals at the receiving end. SerDes technology is widely used in the interfaces of computers, communication equipment and consumer electronics to increase data transmission rates and reduce the number of pins required.
[0061] 5. PHY (Physical Layer) is an important component in the network communication system. It is responsible for processing the signal conversion between the data link layer and the physical media. PHY devices are usually used to implement the physical layer functions defined in standards such as Ethernet, Universal Serial Bus (USB), PCIe (Peripheral Component Interconnect Express), etc., to ensure that data can be reliably transmitted on different types of transmission media (such as copper wire, optical fiber, etc.).
[0062] In view of the technical problems pointed out in the background technology, the embodiments provided by the present invention are as follows:
[0063] Example 1
[0064] In an exemplary embodiment, a switch or router device supporting flexible hot-swappable daughter cards is used as an example to provide a port lighting method. Figure 1 , methods include:
[0065] The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot;
[0066] The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip;
[0067] The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot;
[0068] The programmable logic device of the corresponding sub-card in each sub-card slot receives the lighting signal, and parses the lighting signal and sends it to each port LED lamp for lighting.
[0069] Exemplarily, both the main board and the sub-card utilize CPLD as a programmable logic device. The lighting signal output by the switching chip is parsed by the CPLD of the main board and sent to the lighting method of the port light. It is necessary to ensure that the number of lighting signals output by the switching chip remains fixed. At the same time, when supporting multiple sub-card slots, the number and position of the lighting signals corresponding to the ports of each sub-card slot in the entire lighting signal code stream output by the switching chip need to remain fixed. In this way, the CPLD of the main board can intercept the lighting signal at a fixed position and send it to each sub-card slot. Each sub-card slot then sends the signals of different bits to the LED lights of each port of the sub-card in sequence.
[0070] For devices that need to support hot-swappable daughter cards, although the port form and number of daughter card slots will change with the insertion or replacement of daughter cards, the ports of these daughter cards are all provided by the switching chip SerDes interface. On a device, the number of SerDes interfaces provided by the switching chip to each daughter card slot is fixed. Therefore, the number of lighting signals output by the switching chip is bound to the number of SerDes interfaces provided to each daughter card slot. The total number of lighting signals is equal to the sum of the number of SerDes interfaces provided to all slots, that is, the number of SerDes interfaces provided by the switching chip to a certain daughter card slot, and finally in the lighting signal output by the switching chip, the daughter card slot will occupy the same number of bits of the lighting signal, and the position of the lighting signal corresponding to the daughter card slot in the entire lighting signal code stream is fixed. The software configures the switching chip to output the lighting signal in the aforementioned manner. The software and hardware determine the position of the lighting signal of each daughter card slot in the entire lighting signal code stream. Then the mainboard CPLD intercepts the number of lighting signals in a fixed manner based on the number of SerDes interfaces provided to each daughter card slot and sends them to the corresponding daughter card slot. The daughter card's CPLD then sends signals with different bits to the LED lights on each port on the daughter card to light up.
[0071] Optionally, the number of lighting signals configured for each subcard slot is the same as the number of SerDes interfaces provided to each subcard slot. In other examples, the number of lighting signals configured for each subcard slot may be different from the number of SerDes interfaces provided to each subcard slot according to actual conditions, for example, the lighting signal and the number of SerDes interfaces may be in a multiple relationship or other achievable relationship.
[0072] Furthermore, the number of lighting signals output by the switching chip is configured according to the specific port, that is, the number of bits of lighting signals output by each port and the position of the lighting signal output by the port in the entire lighting signal code stream can be configured. In order to ensure that the number and order of lighting signals remain unchanged when the number of ports changes due to the insertion or replacement of sub-cards, it is necessary to determine the type and number of lighting signals for each sub-card slot based on the number of ports on the neutron card and the number of SerDes interfaces provided to each sub-card slot. In a specific sub-card slot, there are the following three relationships between the number of sub-card ports and the number of SerDes interfaces provided to the sub-card slot by the switching chip:
[0073] (1) When the number of ports of the subcard is equal to the number of SerDes interfaces provided to the subcard slot, in this case, the lighting signals corresponding to the subcard slot are configured to be valid lighting signals. Specifically, each port is configured to output a lighting signal of one bit. Finally, the number of valid lighting signals of the subcard slot is consistent with the number of SerDes interfaces of the subcard slot.
[0074] (2) When the number of ports of the subcard is less than the number of SerDes interfaces provided to the subcard slot, the lighting signal of the subcard slot is configured according to the usage of the SerDes interface, wherein the same number of valid lighting signals as the number of used SerDes interfaces and the same number of invalid signals as the number of unused SerDes interfaces are configured; specifically, this situation is generally the case where multiple SerDes interfaces provide one port or some SerDes interfaces are unused. If multiple SerDes interfaces provide a port, each port outputs a lighting signal according to the number of SerDes interfaces actually occupied, and finally the number of valid lighting signals of the sub-card slot is consistent with the number of SerDes interfaces of the sub-card slot, and the configured lighting signals are all valid lighting signals; if some SerDes interfaces are not used, in addition to outputting the number of valid lighting signals according to the number of occupied SerDes interfaces of each port, it is also necessary to configure the output of an invalid (placeholder) signal, and the number of invalid signals is consistent with the number of unused SerDes interfaces of the sub-card slot, and finally the total number of lighting of the sub-card slot is consistent with the number of SerDes interfaces of the sub-card slot. The invalid signal here is output by a reserved port on the switching chip, and the state of this type of signal will not change, but is only used to make up the number, to ensure that the number of lighting signals of a sub-card slot remains fixed, thereby ensuring that the positions of the lighting signals of the front and rear slots remain fixed.
[0075] (3) When the number of ports on a subcard is greater than the number of SerDes interfaces provided to the subcard slot, this is usually because an external PHY chip is used on the subcard to expand the number of ports. The ports of these subcards can be directly lit using PHY. However, in order to ensure that the number of lighting signals output by the switching chip and the position of the lighting signals of each subcard slot in the entire lighting signal code stream remain unchanged, the subcard slot using PHY lighting still requires the switching chip to output a lighting signal. The number of lighting signals is consistent with the number of SerDes interfaces in the slot, and this lighting signal is output by a reserved port of the switching chip. The state of the signal will not change. It is only used to make up the number to ensure that the number of lighting signals in a certain slot remains fixed, thereby ensuring that the positions of the lighting signals in the front and rear slots remain fixed. Therefore, the lighting signals configured for the subcard slots are all invalid signals.
[0076] While ensuring that the number and order of lighting signals output by the switching chip are fixed, the CPLD of the mainboard only needs to cut the entire lighting signal code stream output by the switching chip in a fixed manner and distribute it to each daughter card slot. The CPLD on the daughter card then sends signals of different bits to each port to realize lighting.
[0077] Example 2
[0078] Based on the inventive concept of embodiment 1, a port lighting method is provided, which is applied to a mainboard, and includes:
[0079] The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot;
[0080] The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the neutron card, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip;
[0081] The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot.
[0082] Example 3
[0083] Based on the same inventive concept as that of Embodiment 1, a port lighting system for a switch or router supporting hot-swappable daughter cards is provided, such as Figure 2 As shown, the system includes a mainboard and a daughter card, the mainboard is provided with a CPU, a switching chip, a CPLD of the mainboard and at least one daughter card slot, the CPU of the mainboard is respectively connected to the switching chip and the CPLD of the mainboard, the switching chip is connected to the CPLD of the mainboard; the daughter card includes the CPLD of the daughter card, the daughter card slot is used to connect the daughter card, and the CPLD of the mainboard is connected to the CPLD of the daughter card;
[0084] The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the neutron card;
[0085] The switching chip is used to output the entire lighting signal code stream to the CPLD of the mainboard;
[0086] The CPLD of the mainboard is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot;
[0087] The CPLD of the daughter card is used to receive the lighting signal, and parse the lighting signal and send it to each port LED lamp for lighting.
[0088] Specifically, the motherboard CPU sends configuration to the switching chip, updates the entire lighting signal code stream information output by the switching chip, and after the entire lighting signal code stream output by the switching chip is provided to the motherboard's CPLD, the motherboard's CPLD splits the entire lighting signal code stream into several parts and sends them to each sub-card slot. After receiving the corresponding lighting signal code stream, the sub-card CPLD parses the signals of different bits and sends them to each port LED lamp to turn on the lights.
[0089] Example 4
[0090] Based on the inventive concept of Example 1, this example introduces in detail the configuration update process of the lighting signal. Figure 3 The lighting signal code stream (labeled by LED_DATA) output by the switching chip is shown. According to the pre-setting, each lighting signal code stream (such as LED_DATA1, LED_DATA2, LED_DATA3, LED_DATA4, etc.) corresponds to a sub-card slot, and this lighting signal code stream is used to light up all ports on the sub-card slot. Each signal code stream section represents one of the following three situations: (1) All bits in the section are valid lighting signals (such as LED_DATA1); (2) Some bits in the section are valid lighting signals, and some bits are invalid (placeholder) signals (such as LED_DATA2); (3) All bits in the section are invalid (placeholder) signals (such as LED_DATA3). The specific situation of the signal in each section depends on the number of ports of the inserted sub-card.
[0091] The configuration update of the light-on signal output by the switching chip mainly occurs in two stages: the device initialization stage and the daughter card insertion stage. The configuration update process is as follows: Figure 4 :
[0092] During the initialization phase, the total number of lighting signals that the switching chip needs to output is determined based on the specific device model. At this time, because no subcard has been inserted, all lighting signals are invalid signals. For example, on a switch device that supports 4 subcard slots, the switching chip provides 24 SerDes interfaces to each subcard slot, so the total number of lighting signals output by the switching chip is 24*4=96bit. The CPLD on the motherboard only needs to split the 96-bit lighting signals in a fixed order and send them to each subcard slot, such as sending 0-23bit to subcard slot 1, 24-47bit to subcard slot 2, 48-71bit to subcard slot 3, and 72-95bit to subcard slot 4. In theory, the mapping relationship between the 4-segment lighting signal and the subcard slot can be arbitrary, as long as the software and hardware are consistent.
[0093] When a subcard is inserted, the lighting signal of the corresponding segment is updated according to the subcard type and slot. If the subcard is inserted into subcard slot 1, the lighting signal of bit0-23 is updated. Whether bit0-23 is a valid signal or an invalid signal or a combination of the two is determined based on the relationship between the number of ports on the subcard and the number of SerDes interfaces provided by the switching chip to the subcard slot:
[0094] (1) The number of daughter card ports is equal to the number of daughter card slot SerDes interfaces. In this case, each port is configured to output a lighting signal, and the number of lighting signals output is consistent with the number of SerDes interfaces, and all signals are valid signals.
[0095] (2) The number of ports on the subcard is less than the number of SerDes interfaces in the subcard slot. This situation usually occurs when multiple SerDes interfaces are connected to one port or when some SerDes interfaces are unused. If multiple SerDes interfaces are connected to one port, each port outputs a lighting signal according to the number of SerDes interfaces actually occupied. The final total number of lighting signals is consistent with the number of SerDes interfaces in the slot. At this time, all signals are valid lighting signals. If some SerDes interfaces are unused, in addition to outputting the number of lighting signals according to the number of SerDes interfaces occupied by each port, it is also necessary to configure the output of a section of invalid placeholder signals. The number of invalid placeholder signals is consistent with the number of unused SerDes interfaces in the subcard slot. This section of invalid placeholder signals is output by a reserved port on the switching chip. The state of the signal will not change. It is only used to make up the number to ensure that the number of lighting signals in a subcard slot remains fixed, thereby ensuring that the positions of the lighting signals in the front and rear slots remain fixed.
[0096] (3) The number of ports on the subcard is greater than the number of SerDes interfaces in the subcard slot. In this case, an external PHY chip is generally required on the subcard to expand the number of ports. These expanded ports can be directly lit up using the PHY chip. However, in order to ensure that the number of lighting signals output by the switching chip and the position of the lighting signals of each slot in the entire lighting signal bit stream remain unchanged, the slots lit up using the PHY chip still need the switching chip to output a corresponding lighting signal. The number of lighting signals is consistent with the number of SerDes interfaces in the slot. This invalid placeholder signal can be output by a reserved port on the switching chip. The state of the signal remains unchanged. It is only used to make up the number to ensure that the number of lighting signals in a certain slot remains unchanged, thereby ensuring that the positions of the lighting signals in the front and rear slots remain unchanged.
[0097] The above is the number, position, and status configuration method of the lighting signal code stream of each sub-card slot in the entire lighting signal code stream output by the switching chip. After the lighting signal output by the switching chip is determined, the CPLD of the mainboard only needs to intercept and distribute the lighting signal code stream output by the switching chip to each sub-card slot in a fixed manner according to the order determined by the software and hardware, and then the CPLD of the sub-card parses the lighting signal and sends it to the port LED. The parsing logic of the lighting signal by the CPLD of the sub-card is divided into Figure 5-Figure 8 four situations.
[0098] like Figure 5 The number of ports on the daughter card is consistent with the number of SerDes interfaces in the daughter card slot. At this time, all lighting signals are valid lighting signals. Each bit in the lighting signal code stream corresponds to the state of a port. The CPLD of the daughter card only needs to send each bit of the signal to the corresponding port light. For example, if bit0 represents the state of port 0, bit0 is sent to the LED light of port 0. If bit1 represents the state of port 1, bit1 is sent to the LED light of port 1, and so on.
[0099] like Figure 6 , the number of ports on the daughter card is less than the number of SerDes interfaces in the daughter card slot. In this case, multiple SerDes interfaces have one port. The figure shows a situation where two SerDes interfaces have one port. At this time, all lighting signals are valid lighting signals. Every two bits in the lighting signal code stream correspond to the state of a port. The CPLD of the daughter card only needs to send the signal of each bit to the corresponding port light. For example, if bit0 and bit1 represent the state of port 0, then bit0 and bit1 are sent to the LED light of port 0. If bit2 and bit3 represent the state of port 1, then bit2 and bit3 are sent to the LED light of port 1, and so on.
[0100] like Figure 7 , the number of ports of the subcard is less than the number of SerDes interfaces of the subcard slot where it is located. In this case, some SerDes interfaces of the subcard slot are not used. At this time, there is an invalid signal in the lighting signal code stream sent to the subcard slot. The CPLD of the subcard only needs to send the signal of each bit in the valid signal to the corresponding port light. For example, if bit0 represents the status of port 0, bit0 is sent to the LED light of port 0. If bit1 represents the status of port 1, bit1 is sent to the LED light of port 1, and so on. For invalid signals, just discard them directly or do not process them.
[0101] like Figure 8, the number of ports on the daughter card is greater than the number of SerDes interfaces in the daughter card slot. In this case, the number of ports is expanded using a PHY chip on the daughter card. At this time, the lighting signals sent to the daughter card slot are invalid signals, which can be directly discarded or not processed. For the ports from these PHY chips, the PHY chips can be used directly to light them.
[0102] Because it is hardware lighting, after the CPLD of the mainboard parses the lighting signal code stream output by the switching chip and sends it to the LED light of the port, when the hardware connection status of the port changes, the lighting signal level status of the corresponding bit will change accordingly. For example, when the port is LinkUp, the level status is low, and the port LED light is on. When the port is Link Down, the level status is high, and the port LED light is off. When there is traffic forwarding on the port, the level keeps switching between high and low states, and the port LED light flashes.
[0103] Example 5
[0104] Based on the same inventive concept as that of Embodiment 1, a mainboard is provided, comprising a CPU, a switching chip, a programmable logic device of the mainboard, and at least one daughter card slot, wherein the CPU is respectively connected to the switching chip and the programmable logic device of the mainboard, and the switching chip is connected to the programmable logic device of the mainboard; the daughter card slot is used to connect a daughter card;
[0105] The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the neutron card;
[0106] The switching chip is used to output the entire lighting signal code stream to the programmable logic device of the mainboard;
[0107] The programmable logic device of the main board is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot.
[0108] Example 6
[0109] Based on the same inventive concept as Example 1, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the port lighting method is implemented. Based on such an understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the 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 a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0110] Example 7
[0111] Based on the same inventive concept as that of Embodiment 1, an electronic device is provided, comprising the mainboard as described in Embodiment 5. The electronic device can be understood as a switch or router device comprising the mainboard.
[0112] Based on this understanding, an electronic device may include at least one main board. For example, in some examples, the electronic device can receive and process signals from external devices using only one main board. In other examples, the electronic device receives signals from external devices using one main board and sends signals using another main board. In this case, two main boards may be provided, which is not limited here.
[0113] The above specific implementation methods are detailed descriptions of the present invention. It cannot be determined that the specific implementation methods of the present invention are limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions and substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A port lighting method, characterized in that: include: The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot; The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the neutron card, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip; The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot; The programmable logic device of the corresponding sub-card in each sub-card slot receives the lighting signal, and parses the lighting signal and sends it to each port LED lamp for lighting.
2. The port lighting method according to claim 1, characterized in that: The step of determining the number and position of the lighting signals of each subcard slot in the entire lighting signal code stream includes: The number of lighting signals configured for each sub-card slot is the same as the number of SerDes interfaces provided to each sub-card slot; According to the preset lighting sequence of each sub-card slot, the position of the lighting signal of each sub-card slot in the entire lighting signal code stream is determined.
3. The port lighting method according to claim 2, characterized in that: The CPU of the mainboard determines the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, including: When the number of ports of the subcard is equal to the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the subcard slot are configured to be valid lighting signals; When the number of ports of the subcard is less than the number of SerDes interfaces provided to the subcard slot, the lighting signal corresponding to the subcard slot is configured according to the usage of the SerDes interface, wherein the same number of valid lighting signals as the used SerDes interfaces and the same number of invalid signals as the unused SerDes interfaces are configured; When the number of ports on the subcard is greater than the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the subcard slot are configured to be invalid signals.
4. A port lighting method, applied to a mainboard, characterized in that: include: The CPU of the mainboard determines the number and position of the lighting signal of each subcard slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each subcard slot and the preset lighting sequence of each subcard slot; The CPU of the mainboard configures the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, and outputs the entire lighting signal code stream to the programmable logic device of the mainboard through the switching chip; The programmable logic device of the mainboard intercepts the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distributes it to each sub-card slot.
5. A port lighting system, comprising a main board and a daughter card, characterized in that: The mainboard is provided with a CPU, a switching chip, a programmable logic device of the mainboard, and at least one daughter card slot. The CPU of the mainboard is connected to the switching chip and the programmable logic device of the mainboard respectively, and the switching chip is connected to the programmable logic device of the mainboard; the daughter card includes the programmable logic device of the daughter card, the daughter card slot is used to connect the daughter card, and the programmable logic device of the mainboard is connected to the programmable logic device of the daughter card; The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the sub-card in each sub-card slot; The switching chip is used to output the entire lighting signal code stream to the programmable logic device of the mainboard; The programmable logic device of the mainboard is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot; The programmable logic device of the daughter card is used to receive the lighting signal, and analyze the lighting signal and send it to each port LED lamp for lighting.
6. The port lighting system according to claim 5, characterized in that: The step of determining the number and position of the lighting signals of each subcard slot in the entire lighting signal code stream includes: The number of lighting signals configured for each sub-card slot is the same as the number of SerDes interfaces provided to each sub-card slot; According to the preset lighting sequence of each sub-card slot, the position of the lighting signal of each sub-card slot in the entire lighting signal code stream is determined.
7. The port lighting system according to claim 5, characterized in that: The CPU of the mainboard is also used to configure the lighting signal type of each subcard slot according to the number of ports of the subcard in each subcard slot, including: When the number of ports of the subcard is equal to the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the subcard slot are configured to be valid lighting signals; When the number of ports of the subcard is less than the number of SerDes interfaces provided to the subcard slot, the lighting signal corresponding to the subcard slot is configured according to the usage of the SerDes interface, wherein the same number of valid lighting signals as the used SerDes interfaces and the same number of invalid signals as the unused SerDes interfaces are configured; When the number of ports on the subcard is greater than the number of SerDes interfaces provided to the subcard slot, the lighting signals corresponding to the subcard slot are configured to be invalid signals.
8. A motherboard, characterized in that: It includes a CPU, a switching chip, a programmable logic device of a mainboard, and at least one subcard slot, wherein the CPU is connected to the switching chip and the programmable logic device of the mainboard respectively, and the switching chip is connected to the programmable logic device of the mainboard; the subcard slot is used to connect a subcard; The CPU of the mainboard is used to determine the number and position of the lighting signal of each sub-card slot in the entire lighting signal code stream according to the number of serializer / deserializer SerDes interfaces provided to each sub-card slot and the preset lighting sequence of each sub-card slot; the CPU of the mainboard is also used to configure the lighting signal type of each sub-card slot according to the number of ports of the sub-card in each sub-card slot; The switching chip is used to output the entire lighting signal code stream to the programmable logic device of the mainboard; The programmable logic device of the main board is used to intercept the lighting signal of each sub-card slot from the entire lighting signal code stream according to the determined number and position, and distribute it to each sub-card slot.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the port lighting method described in any one of claims 1-3 or 4 is implemented.
10. An electronic device, characterized in that: Comprising the main board as claimed in claim 8.
Citation Information
Cited By
Hot plug method and device of equipment, equipment and storage medium
CN121455876A