Disclosure of Invention
The invention aims to provide a light-off protection circuit of optical transmission equipment and a light-off protection method thereof, and aims to solve the problems that the light-off of the light-off protection circuit of the existing QSFP28 interface optical transmission equipment is not timely, and even when a CPU is abnormal, the light cannot be turned off.
The present invention is achieved as described above, in an optical transmission device, a light-off protection circuit connected to the optical transmission device, the light-off protection circuit including:
the device comprises a first control module, a second control module, a first protection module and a second protection module;
the first control module is connected with the first protection module and the second control module, the first protection module is connected with the optical transmission equipment and the second control module, and the second control module is connected with the second protection module and the optical transmission equipment;
a light-off protection pin is arranged in the second control module, and the level state of the light-off protection pin corresponds to the working state of the first control module and the working state of the optical transmission equipment; the second control module detects the level state of the light-off protection pin; when the level state of the light-off protection pin is a first level, the second control module controls the first protection module to disconnect the path between the first control module and the optical transmission device, controls the second protection module to close the path between the second control module and the optical transmission device, and sends a light-off instruction to the optical transmission device through the second protection module, so that the optical transmission device performs a light-off operation according to the light-off instruction.
Another object of the present invention is to provide a light-off protection method of a light-off protection circuit based on the above optical transmission device, the light-off protection method includes the following steps:
the second control module detects the level state of the light-off protection pin;
when the level state of the light-off protection pin is a first level, the second control module controls the first protection module to disconnect a path between the first control module and the optical transmission equipment, controls the second protection module to close the path between the second control module and the optical transmission equipment, and sends a light-off instruction to the optical transmission equipment through the second protection module;
and the optical transmission equipment receives the light-off instruction and carries out light-off operation according to the light-off instruction.
In the invention, by adopting the light-off protection circuit of the optical transmission equipment comprising the first control module, the second control module, the first protection module and the second protection module, when the first control module and/or the optical transmission equipment is abnormal, the second control module controls the first protection module to disconnect the passage between the first control module and the optical transmission equipment, controls the second protection module to close the passage between the second control module and the optical transmission equipment, and sends a light-off instruction to the optical transmission equipment through the second protection module, so that the optical transmission equipment performs light-off operation according to the light-off instruction, thereby realizing effective light-off protection of the optical transmission equipment, and the light-off protection is timely and rapid, and solving the problems that the light-off protection circuit of the optical transmission equipment of the existing QSFP28 interface cannot be timely turned off even when a CPU is abnormal.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 3 shows a structure of a light-off protection circuit of an optical transmission device according to an embodiment of the present invention, and for convenience of description, only the portions related to the present invention are shown, and detailed descriptions are as follows:
as a preferred embodiment of the present invention, the light-off protection circuit 10 is connected to the optical transmission device 20, and the light-off protection circuit 10 includes a first control module 100, a second control module 200, a first protection module 300, and a second protection module 400.
The first control module 100 is connected to the first protection module 300 and the second control module 200, the first protection module 300 is connected to the optical transmission device 20 and the second control module 200, and the second control module 200 is connected to the second protection module 400 and the optical transmission device 20.
Specifically, a light-off protection pin is arranged in the second control module 200, and a level state of the light-off protection pin corresponds to a working state of the first control module 100 and a working state of the optical transmission device 20; the second control module 200 detects the level state of the off-light protection pin; when the level state of the light-off protection pin is the first level, the second control module 200 controls the first protection module 300 to open the path between the first control module 100 and the optical transmission device 20, and controls the second protection module 400 to close the path between the second control module 200 and the optical transmission device 20, and sends a light-off instruction to the optical transmission device 20 through the second protection module 400, so that the optical transmission device 20 performs a light-off operation according to the light-off instruction.
It should be noted that, in the embodiment of the present invention, the light-off protection pin is predefined, and is mainly used to represent the working states of the first control module 100 and the optical transmission device 20, when the level state of the light-off protection pin is a high level, it indicates that the first control module 100 and/or the optical transmission device 20 are abnormal, and when the level state of the light-off protection pin is a low level, it indicates that the first control module 100 and/or the optical transmission device 20 are not abnormal; of course, it can be understood by those skilled in the art that the level state of the light protection off pin is a low level, which indicates that the first control module 100 and/or the optical transmission device 20 is abnormal, and the level state of the light protection off pin is a high level, which indicates that the first control module 100 and/or the optical transmission device 20 is not abnormal, that is, the high and low levels of the light protection off pin and the normal or abnormal states of the first control module 100 and the optical transmission device 20 can be set as required, and are not limited herein.
In addition, in the embodiment of the present invention, the optical transmission device 20 may be an optical transmission device of a CFP interface, or an optical transmission device of a QSFP28 interface.
Specifically, the first control module 100 is connected to the second control module 200 through a bus 7, the second control module 200 is connected to the second protection module 400 and the optical transmission device 20 through a bus 4 and a bus 8, respectively, and the second protection module 400 is connected to the optical transmission device 20 through a bus 5. Wherein the bus 4 and the bus 8 are I2C buses, and the neutral line 7 is an MDIO bus, it should be noted that, in the embodiment of the present invention, the buses 4, 7 and 8 are not limited to the above-mentioned bus manner, and they can be replaced as required, and are not limited herein.
In addition, the first control module 100 and the first protection module 300, the first protection module 300 and the optical transmission device 20, and the first protection module 300 and the second control module 200 may be connected by a bus or a connection line.
The second control module 200 detects the working states of the first control module 100 and the optical transmission device 20 all the time in the working process of the first control module 100 and the optical transmission device 20, that is, the second control module 200 continuously detects the level state of the light-off protection pin in the working process of the first control module 100 and the optical transmission device 20, when the level state of the light-off protection pin is high level, at this time, the second control module 200 recognizes that the first control module 100 and/or the optical transmission device 20 is abnormal, the second control module 200 sends a first open control signal to make the first protection module 300 open the path between the first control module 100 and the optical transmission device 20 according to the first open control signal, and the second control module 200 sends a first close control signal to the second protection module 400 to make the second protection module 400 close the path between the second control module 200 and the optical transmission device 20 according to the first close control signal, and sends a light-off instruction to the optical transmission device 20 through the second protection module 400, so that the optical transmission device 20 performs a light-off operation according to the light-off instruction.
Further, as a preferred embodiment of the present invention, when the level state of the off-optical protection pin is the second level, the second control module controls the first protection module to close the path between the first control module and the optical transmission device, and controls the second protection module to open the path between the second control module and the optical transmission device, so that the first control module accesses the optical transmission device through the first protection module.
Specifically, in the embodiment of the present invention, the second level is a low level, which indicates that the first control module 100 and the optical transmission device 20 are operating normally, at this time, the second control module 200 sends a second close control signal to the first protection module 300, so that the first protection module 300 closes the path between the first control module 100 and the optical transmission device 20 according to the second close control signal, and the second control module 200 sends a second open control signal to the second protection module 400, so that the second protection module 400 opens the path between the second control module 200 and the optical transmission device 20 according to the second open control signal, so that the first control module 100 accesses the optical transmission device 20 through the first protection module 300 to perform read/write control on the optical transmission device 20.
Further, as a preferred embodiment of the present invention, when the level state of the light protection off pin is the second level, the second control module 200 directly accesses the optical transmission device.
Specifically, in the embodiment of the present invention, the second level is a low level, which indicates that the first control module 100 and the optical transmission device 20 operate normally, and at this time, the second control module 200 may directly access the optical transmission device 20 to perform read/write control on the optical transmission device 20.
In the present invention, the second control module 200 correspondingly controls the on-path according to the normal condition or the abnormal condition of the first control module 100 and/or the optical transmission device 20, and can rapidly switch the path under the abnormal condition of the first control module 100 and/or the optical transmission device 20, so as to perform the adaptive light-off protection on the optical transmission device 20, which can realize the dual protection and has high reliability.
Further, as a preferred embodiment of the present invention, the first protection module 300 may be implemented by a switching circuit, which includes but is not limited to a transistor switching circuit.
When the switch circuit is a transistor switch circuit, the switch circuit can be implemented by an NMOS transistor or a PMOS transistor.
When the switching circuit is implemented by one NMOS transistor, the gate of the NMOS transistor is connected to the second control module 200, the drain of the NMOS transistor is connected to the first control module 100, and the source of the NMOS transistor is connected to the light transmission device 20, or the source of the NMOS transistor is connected to the first control module 100, and the drain of the NMOS transistor is connected to the light transmission device 20.
When the switch circuit is implemented by one PMOS transistor, the gate of the PMOS transistor is connected to the second control module 200, the drain of the NMOS transistor is connected to the first control module 100, and the source of the PMOS transistor is connected to the optical transmission device 20, or the source of the PMOS transistor is connected to the first control module 100 and the drain of the PMOS transistor is connected to the optical transmission device 20.
It should be noted that, in other embodiments, the first protection module 300 may also be implemented by using a relay switch circuit, and a specific circuit thereof may be the same as an existing relay switch circuit, and is not described herein again.
Further, as a preferred embodiment of the present invention, the second protection module 400 may be implemented by a chip or a processor with a switch function, which may refer to the prior art specifically and is not described herein again.
Further, as a preferred embodiment of the present invention, the first control module 100 is a CPU, and the second control module 200 is a CPLD. It should be noted that, in the embodiment of the present invention, the priority of the CPLD is higher than that of the CPU, and the CPLD can continuously detect the operating state of the CPU; in addition, the first control module 100 and the second control module 200 may also be implemented by other processors, and are not limited herein.
The operation of the light-off protection circuit 10 of the light transmission device 20 is described below with reference to fig. 3, and is described in detail as follows:
first, in the embodiment of the present invention, the first control module 100 takes a CPU as an example, the second control module 200 takes a CPLD as an example, and the optical transmission device 20 takes an optical transmission device of a QSFP28 interface as an example.
Specifically, the first reclosing protection implementation process: when the CPLD detects that the light-off protection pin inside the CPLD is at a low level, that is, when the CPU works normally, the CPLD sends a first closing control signal to the first protection module 300 to close the access path of the first protection module 300, and simultaneously sends a first opening control signal to the second protection module 400 through the CPLD to open the access path of the second protection module 400, so that the CPU directly accesses the optical transmission device 20 of the QSFP28 interface through the first protection module 300.
When the CPLD detects that the light-off protection pin inside the CPLD is at a high level, that is, when the CPU and/or the optical transmission device 20 at the QSFP28 interface are abnormal, the CPLD sends a second open control signal to the first protection module 300 to open the access path of the first protection module 300, and sends a second close control signal to the second protection module 400 through the CPLD to close the access path of the second protection module 400, so that the optical transmission device 20 at the QSFP28 interface is written by the I2C bus 4 simulated inside the CPLD, and a light-off instruction is sent out, and the optical transmission device 20 at the QSFP28 interface performs a light-off operation according to the light-off instruction, thereby implementing light-off protection of the optical transmission device.
Second turn-off light protection circuit process: when the CPLD detects that the light-off protection pin inside the CPLD is at a low level, that is, when the CPU is operating normally, the CPU accesses the CPLD through the MDIO22 bus 7, and accesses the relevant content of the optical transmission device 20 of the QSFP28 interface through the I2C channel simulated inside the CPLD, that is, the bus 8 (functionally equivalent to the bus 4).
Fig. 4 shows an implementation flow of a light-off protection method implemented by the light-off protection circuit based on the optical transmission device shown in fig. 3 according to an embodiment of the present invention, and for convenience of description, only the relevant parts of the present invention are shown, and the following details are described below:
step S101: and the second control module detects the level state of the light-off protection pin.
Step S102: when the level state of the light-off protection pin is a first level, the second control module controls the first protection module to disconnect the path between the first control module and the optical transmission device, controls the second protection module to close the path between the second control module and the optical transmission device, and sends a light-off instruction to the optical transmission device through the second protection module.
Step S103: and the optical transmission equipment receives the light-off instruction and carries out light-off operation according to the light-off instruction.
Further, as a preferred embodiment of the present invention, the light-off protection method further includes the steps of:
when the level state of the light-off protection pin is a second level, the second control module controls the first protection module to close a path between the first control module and the optical transmission equipment, and controls the second protection module to open the path between the second control module and the optical transmission equipment;
the first control module accesses the optical transmission device through the first protection module.
Further, as a preferred embodiment of the present invention, the light-off protection method further includes the steps of:
and when the level state of the light-off protection pin is a second level, the second control module directly accesses the optical transmission equipment.
It should be noted that, in the embodiment of the present invention, since the light-off protection method is implemented based on the light-off protection circuit 10 of the optical transmission device shown in fig. 3, a specific working principle of the light-off protection method may refer to a specific working principle of the light-off protection circuit 10 of the optical transmission device shown in fig. 3, which is not described herein again.
In the embodiment of the invention, by adopting the light-off protection circuit of the optical transmission equipment comprising the first control module, the second control module, the first protection module and the second protection module, so that the second control module controls the first protection module to disconnect the path between the first control module and the optical transmission device when the first control module and/or the optical transmission device is abnormal, and controls the second protection module to close the path between the second control module and the optical transmission device, and sends out a light-off instruction to the optical transmission device through the second protection module, so that the optical transmission equipment can carry out light-off operation according to the light-off instruction, thereby realizing effective light-off protection of the optical transmission equipment, and the light-off protection is timely and rapid, and the problem that the light-off protection circuit of the existing QSFP28 interface optical transmission equipment cannot be turned off in time or even when a CPU is abnormal is solved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.