Circuit for realizing switch port switching

By using programmable chips and registers to store the level values ​​and interrupt signals of communication signals in the switch, rapid switching of switch ports is achieved, solving the problem of too long optical port switching time and improving the switching efficiency of switch ports.

CN222089603UActive Publication Date: 2024-11-29KYLAND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323598809.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-11-29
Estimated Expiration
2033-12-27

AI Technical Summary

Technical Problem

The optical port switching time in existing switches is too long, resulting in low switching efficiency, which often reaches several hundred ms due to the CPU check frequency.

Method used

Using a programmable chip, including multiple input pins and output pins, it is connected to the central processor through multiple communication units, and uses registers to store the level value and interrupt signals of the communication signal, summarize the communication signal through the SPI bus to realize the switch port. Quick switch.

Benefits of technology

The switch port switching time is shortened to less than 20ms, which improves the efficiency of switch port switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222089603U_ABST
    Figure CN222089603U_ABST
Patent Text Reader

Abstract

The utility model provides a circuit used for realizing switch port switching, comprising a programmable chip which comprises a plurality of input pins and at least one output pin; the plurality of communication units are connected with the plurality of input pins in a one-to-one correspondence manner, and one communication unit corresponds to one communication port of the switch; and the central processing unit is connected with the output pin and is used for realizing switching of communication ports of the switch. Based on the circuit for realizing network switching provided by the invention, the network switching time of the switch can be shortened to be within 20ms, and the network switching efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial network switching, and in particular to a circuit for implementing switch port switching. Background Art

[0002] In conventional switches, the UP / DOWN status of optical ports is generally detected by CPU polling. Polling here means that the CPU checks the status of each optical module in turn at a certain time interval. Therefore, the time for switching the optical port when a DOWN optical port is detected is often affected by the CPU frequency. The lower the CPU check frequency, the longer the switching time is, which often reaches several hundred ms. Therefore, the optical port switching time in the prior art is too long, resulting in low switching efficiency. Utility Model Content

[0003] In view of the above problems in the prior art, the present application provides a circuit for implementing switch port switching, which can shorten the communication port switching time of the switch to less than 20ms and improve the switch port switching efficiency.

[0004] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a circuit for realizing switch port switching, including: a programmable chip, the programmable chip including multiple input pins and at least one output pin; multiple communication units, connected to the multiple input pins in a one-to-one correspondence, one of the communication units corresponding to one communication port of the switch; a central processing unit, connected to the output pin, for switching the communication port of the switch.

[0005] From the above, the communication signals of each communication unit are summarized through a programmable chip to find out which communication unit's communication signal is lost, and then the switch port is switched for the communication unit whose communication signal is lost. Based on this solution, the switch port switching time can be shortened to less than 20ms, thereby improving the efficiency of switch port switching.

[0006] As an implementation manner of the first aspect, the programmable chip further includes: a first register communicatively connected to the programmable chip, the first register storing a level value of a communication signal sent by the communication unit.

[0007] As described above, by storing the level value of the communication signal through the first register, the central processor can determine the communication unit with signal loss according to the level value.

[0008] As an implementation of the first aspect, the programmable chip further includes: a second register communicatively connected to the programmable chip, the second register storing an interrupt signal, the interrupt signal being used to indicate a change in the level value and to indicate a communication unit in which the level value change occurs.

[0009] As described above, the interrupt signal is stored in the second register, and when the level value changes, an interrupt is triggered to prompt the central processor that there is a signal loss behavior.

[0010] As an implementation manner of the first aspect, the programmable chip is connected to the central processing unit via an SPI bus.

[0011] As an implementation manner of the first aspect, the communication unit is an optical module.

[0012] As an implementation manner of the first aspect, the programmable chip is a FPGA chip.

[0013] As an implementation of the first aspect, the programmable chip further includes an interrupt unit. When a level signal received by the first register changes, the interrupt unit triggers the second register to generate an interrupt signal and reports the interrupt signal to the central processing unit.

[0014] These and other aspects of the application will become more apparent from the following description of the embodiment(s). BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The various technical features of the present application and the relationship between them are further explained below with reference to the accompanying drawings. The accompanying drawings are exemplary, and some technical features are not shown in actual proportion. In addition, some drawings may omit technical features that are commonly used in the technical field to which the present application belongs and are not essential for understanding and implementing the present application, or additional technical features that are not essential for understanding and implementing the present application may be shown. In other words, the combination of the various technical features shown in the accompanying drawings is not used to limit the present application. In addition, throughout the present application, the same figure numbers refer to the same content. The specific description of the drawings is as follows:

[0016] Figure 1 A schematic diagram of the structure of a circuit for implementing switch port switching provided in the first embodiment of the present application;

[0017] Figure 2 A working principle diagram of a circuit provided in the first embodiment of the present application;

[0018] Figure 3 A schematic diagram of the structure of a circuit for implementing switch port switching provided in the second embodiment of the present application;

[0019] Figure 4 This is a working principle diagram of the circuit provided in the second embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0021] It should be understood that the embodiments of the present application provide a circuit for implementing switch port switching. Since the principles of solving the problems of these technical solutions are the same or similar, some repetitions may not be repeated in the introduction of the following specific embodiments, but it should be regarded as that these specific embodiments have been referenced to each other and can be combined with each other.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present application. In case of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0023] Embodiment 1

[0024] A circuit for implementing switch port switching provided in the first embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0025] like Figure 1 The figure shows a schematic diagram of the structure of a circuit 10 for implementing switch port switching provided by the first embodiment of the present application, the circuit includes a programmable chip 110, multiple communication units 120 and a central processing unit (CPU) 130. Specifically, the programmable chip 110 includes multiple input pins and at least one output pin, the multiple input pins are connected to the multiple communication units 120 in a one-to-one correspondence, and the output pin is connected to the central processing unit 130 through an SPI bus.

[0026] In this embodiment, the circuit 10 further includes a first register A. The first register A is in communication connection with the programmable chip 110, and the first register A is used to receive and store the level value of the communication signal sent by each communication unit 120, and the communication signal indicates whether the communication signal sent by the corresponding communication unit exists through the high or low level value.

[0027] In this embodiment, the circuit 10 also includes a second register B. The second register B is connected to the programmable chip 110 for communication. The second register B is used to trigger and save an interrupt signal according to the logic judgment result of the programmable chip 110, and send the interrupt signal to the central processing unit. The logic judgment of the programmable chip 110 includes judging whether the level value of the communication signal of each communication unit in the first register A changes (the change here can be a change from 0 to 1, or a change from 1 to 0). If so, the second register B is triggered to generate an interrupt signal, and if not, the second register B is not triggered to generate an interrupt signal.

[0028] In this embodiment, after receiving the interrupt signal sent by the second register B, the central processor 130 reads the interrupt signal in the second register B through the SPI bus to determine which communication unit's communication signal level value changes to generate the interrupt signal. After determining which communication unit generates the interrupt signal, the central processor 130 reads the level signal value of the communication unit stored in the first register A. If the value is the first preset value, it indicates that the communication signal exists and there is no need to switch the switch port. If the value is the second preset value, it indicates that the communication signal does not exist and the switch port switching is executed.

[0029] Specifically: In the first case, if the level signal value of the communication unit is 0, it means that the communication signal exists and the switch port switching is not performed. If the level signal value of the communication unit is 1, it means that the communication signal does not exist and the switch port switching needs to be performed. In the second case, if the level signal value of the communication unit is 0, it means that the communication signal does not exist and the switch port switching needs to be performed. If the level signal value of the communication unit is 1, it means that the communication signal exists and the switch port switching does not need to be performed.

[0030] In this embodiment, the communication signals of the communication units are summarized by a programmable chip, and the abnormal information is reported to the central processing unit by means of an interrupt. After receiving the reported interrupt, the central processing unit queries the first register and the second register through the SPI bus to determine which communication unit's communication signal is lost, thereby achieving precise switching, so that the switching is controlled within 20ms.

[0031] In some embodiments, the programmable chip may further include an interrupt unit. When the level signal received by the first register changes, the interrupt unit triggers the second register to generate an interrupt signal and reports the interrupt signal to the central processor.

[0032] See next Figure 2 The flowchart shown introduces the Figure 1 The working principle of the circuit 10 shown is as follows:

[0033] S101: Power on the circuit 10 for implementing switch port switching, so that the circuit 10 works normally.

[0034] S102 : Control each communication unit 120 to send a level value of a communication signal to the programmable chip 110 .

[0035] In this step, the level value includes 0 or 1, and the level value is used to indicate whether the communication signal of the corresponding communication unit exists. Exemplarily, the level value of 0 indicates that the communication signal does not exist, that is, it indicates that the communication unit sending the communication signal has a fault; the level value of 1 indicates that the communication signal exists, that is, it indicates that the communication unit sending the communication signal can work normally.

[0036] S103: After receiving the level value of each communication signal, the programmable chip 110 stores the level value of each communication signal in the first register A.

[0037] S104: The judgment logic of the programmable chip 110 judges whether the level value of the communication signal stored in the first register A changes. If it changes, the judgment logic controls the second register B to generate an interrupt signal.

[0038] Specifically, if the level value 0 indicates that there is a fault in the corresponding communication unit, then when it is determined that the level value stored in the first register A changes from 1 to 0, the second register B generates an interrupt signal; if the level value 1 indicates that there is a fault in the corresponding communication unit, then when it is determined that the level value stored in the first register A changes from 0 to 1, the second register B generates an interrupt signal.

[0039] S105: Send the interrupt signal to the central processing unit 130. After receiving the interrupt signal, the central processing unit 130 reads the interrupt signal in the second register B to determine which communication unit sends the interrupt signal.

[0040] S106: The central processing unit 130 reads the communication signal level value of the communication unit (the communication unit that sends the interrupt signal) stored in the first register A.

[0041] S107: Determine whether the communication unit is abnormal according to the level value of the communication signal, and execute the switch port switching program when the abnormality exists, thereby achieving the switching of the switch port.

[0042] Exemplarily: if the level value is 0, it means that the communication signal does not exist, the communication unit is abnormal, and the switch port switching is performed; if the level value is 1, it means that the communication signal exists, and the switch port switching is not performed.

[0043] Embodiment 2

[0044] A circuit for implementing switch port switching provided in the second embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0045] like Figure 3 The diagram shows a schematic diagram of the structure of a circuit 20 for implementing switch port switching provided in the second embodiment of the present application. The programmable chip of the circuit is an FPGA (Field-Programmable Gate Array) chip, and the communication unit of the circuit is an optical module. In other embodiments, the programmable chip can also be a CPLD (Complex Programmable Logic Device) chip, an ASIC (Application-Specific Integrated Circuit) chip, etc.

[0046] In some embodiments, the optical module may be GTLS-1303-2M-DIK or AFBR-5710APZ.

[0047] In this embodiment, the FPGA chip includes a plurality of input pins, which are connected to the plurality of optical modules in a one-to-one correspondence; the FPGA chip also includes output pins, which are connected to the central processing unit.

[0048] In this embodiment, a first register A and a second register B are generated on the FPGA chip by a hardware description language (HDL). The first register A is used to receive and store the level value of the detection (Signal Detection, SD) signal sent by each optical module. The SD signal indicates whether the SD signal sent by the optical module exists through the high or low level value, and further indicates whether the corresponding optical module is abnormal. The second register B is used to trigger an interrupt signal when the level value changes, and send the interrupt signal to the central processing unit.

[0049] The specific functions of the first register A and the second register B can be found in the introduction of the first embodiment above, and will not be described in detail in this embodiment.

[0050] See next Figure 4 The process description shown is based on Figure 2 The working principle of the circuit 20 shown is as follows:

[0051] S201: Power on the circuit 20 for implementing switch port switching, so that the circuit 10 works normally.

[0052] S202: The judgment logic of the FPGA chip judges whether the SD signal received by the first register A changes. If a change occurs, the second register B is triggered to generate an interrupt signal and report the interrupt signal to the central processing unit.

[0053] In this step, specifically: each optical module sends an SD signal to the FPGA chip, and the SD signal is represented by a high or low level. After receiving the SD signal, the FPGA chip stores each SD signal in the first register A. The judgment logic of the FPGA chip judges whether the SD signal received by the first register A changes (i.e., a change from 0 to 1, or a change from 1 to 0). If a change occurs, the FPGA chip triggers the second register B to generate an interrupt signal and reports the interrupt signal to the central processing unit.

[0054] S203: After receiving the interrupt signal, the central processor reads the second register B to determine which optical module generates the interrupt signal.

[0055] S204: After determining which optical module generates the interrupt signal, the central processing unit reads the level value of the SD signal of the optical module in the first register A.

[0056] S205: When the level value of the SD signal of the optical module is a first preset value (for example, 1), it is determined that the SD signal of the optical module exists and there is no need to switch the switch port, and the process returns to step S201. When the level value of the SD signal of the optical module is a second preset value (for example, 0), it is determined that the SD signal of the optical module does not exist (i.e., is lost) and it is necessary to perform switch port switching. After completing the switch port switching, the process returns to step S201 for the next round of judgment.

[0057] It should be understood that which of the first preset value and the second preset value is 0 and which is 1 is determined according to actual conditions, and the above is only an exemplary description.

[0058] In this embodiment, the SD signal of the optical module is aggregated through the FPGA chip, and the abnormal information is reported to the central processing unit through an interrupt. After receiving the reported interrupt, the central processing unit queries the first register and the second register through the SPI bus to determine which communication unit's SD signal is lost, thereby achieving precise switching and controlling the switching within 20ms.

[0059] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0060] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.

[0061] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.

[0062] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.

Claims

1. A circuit for implementing switch port switching, characterized in that: include: A programmable chip, the programmable chip comprising a plurality of input pins and at least one output pin; A plurality of communication units are connected to the plurality of input pins in a one-to-one correspondence, and one of the communication units corresponds to one communication port of the switch; A central processing unit is connected to the output pin and is used to switch the communication port of the switch.

2. The circuit according to claim 1, characterized in that The programmable chip also includes: A first register is communicatively connected to the programmable chip, and the first register stores a level value of a communication signal sent by the communication unit.

3. The circuit according to claim 2, characterized in that The programmable chip also includes: A second register is communicatively connected to the programmable chip, the second register stores an interrupt signal, and the interrupt signal is used to indicate a change in the level value and to indicate a communication unit in which the level value change occurs.

4. The circuit according to claim 1, characterized in that The programmable chip is connected to the central processing unit via a SPI bus.

5. The circuit according to claim 1, characterized in that The communication unit is an optical module.

6. The circuit according to claim 1, characterized in that The programmable chip is an FPGA chip.

7. The circuit according to claim 3, characterized in that The programmable chip further includes an interrupt unit. When the level signal received by the first register changes, the interrupt unit triggers the second register to generate an interrupt signal and reports the interrupt signal to the central processing unit.