CN115696100A - Method, device, equipment and storage medium for monitoring optical module of switch - Google Patents

Method, device, equipment and storage medium for monitoring optical module of switch Download PDF

Info

Publication number
CN115696100A
CN115696100A CN202211335958.7A CN202211335958A CN115696100A CN 115696100 A CN115696100 A CN 115696100A CN 202211335958 A CN202211335958 A CN 202211335958A CN 115696100 A CN115696100 A CN 115696100A
Authority
CN
China
Prior art keywords
switch
programmable logic
logic chip
line card
optical module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211335958.7A
Other languages
Chinese (zh)
Inventor
刘涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sundray Technologies Co ltd
Original Assignee
Shenzhen Sundray Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Sundray Technologies Co ltd filed Critical Shenzhen Sundray Technologies Co ltd
Priority to CN202211335958.7A priority Critical patent/CN115696100A/en
Publication of CN115696100A publication Critical patent/CN115696100A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Optical Communication System (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for monitoring an optical module of a switch, and relates to the technical field of switches. The method comprises the following steps: sending an access instruction to a programmable logic chip of a switch line card through the programmable logic chip of the switch main control card; accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card; and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card. The data communication and the operation parameter monitoring of a large number of optical modules are realized by utilizing the programmable logic chips interconnected in the switch main control card and the line card, the centralized management and monitoring of the optical modules in the switch are realized, the positioning of faults on the optical modules or optical fiber transmission links is facilitated, and the early warning of the abnormal work of the optical modules is realized.

Description

Switch optical module monitoring method, device, equipment and storage medium
Technical Field
The present invention relates to the field of switch technologies, and in particular, to a method, an apparatus, a device, and a storage medium for monitoring an optical module of a switch.
Background
With the application scenario that the demand for higher bandwidth and the trend of "optical fiber advances and retracts" are strengthened, all-fiber communication is bound to become the mainstream of frame switch development, that is, the all-optical-port line card of the frame switch may completely replace an electrical port card, so that the number of optical modules with different rates in the frame switch is further increased. In the using process of the optical module, more factors can occur to affect the communication function of the module, so that the data packet receiving and transmitting is lost or the communication is interrupted, and therefore, the technical parameters of the optical module need to be monitored in real time to early warn and position faults.
In the prior art, in the aspect of Monitoring parameters of an optical module, part of optical module manufacturers provide a dedicated optical module fixture, and generally need to insert the optical module into a DDM (Digital Diagnostic Monitoring) test fixture offline, and upload read parameters to an upper computer through a serial port or a USB port for software display, but the optical module can only be detected offline, and cannot be detected online in real time, and the optical module Monitoring frame switch with a huge number of entire frames online is not feasible. In order to solve the problem of intelligent offline detection, in the prior art, in a multi-slot frame switch, each line card is triggered by interruption, and when an optical module works abnormally, an interruption signal is output and fed back to a line card CPU for processing.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device and a medium for monitoring an optical module of a switch, which can implement centralized management and real-time monitoring of the optical module in the switch. The specific scheme is as follows:
in a first aspect, the present application discloses a method for monitoring an optical module of a switch, including:
sending an access instruction to a programmable logic chip of a line card of the switch through the programmable logic chip of the master control card of the switch;
accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card;
and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card.
Optionally, the sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card includes:
adding a first serial bus multiplexer to a programmable logic chip of the switch master control card;
and the programmable logic chip controls the switch master control card, establishes bus connection with the programmable logic chip of each switch line card by polling in a time division multiplexing mode through the first serial bus multiplexer, and sequentially sends access instructions to the programmable logic chip of each switch line card through the bus connection.
Optionally, the sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card includes:
adding a first serial bus multiplexer to a programmable logic chip of the switch master control card;
and the programmable logic chip controls the switch main control card, establishes bus connection with the programmable logic chip of each switch line card by polling in a time division multiplexing mode through the first serial bus multiplexer, and sequentially sends access instructions to the programmable logic chip of each switch line card through the bus connection.
Optionally, the accessing, by the programmable logic chip of the switch line card according to the access instruction, the optical module corresponding to the switch line card to obtain monitoring data corresponding to the optical module includes:
adding a second serial bus multiplexer to a programmable logic chip of the switch line card;
and controlling a programmable logic chip of the switch line card by using the access instruction, and polling each optical module corresponding to the line card by using the second serial bus multiplexer in a time division multiplexing mode to establish bus connection so as to acquire monitoring data corresponding to the optical module.
Optionally, the controlling, by the access instruction, the programmable logic chip of the switch line card, and polling, by the second serial bus multiplexer, by using a time division multiplexing manner, to establish bus connection with each optical module so as to obtain monitoring data corresponding to the optical module includes:
controlling a programmable logic chip of the switch line card by utilizing a bus control module configured in the switch line card according to the access instruction, and sequentially establishing bus connection with each optical module by adopting a time division multiplexing mode through the second serial bus multiplexer;
and switching the data transmission direction of the second serial bus multiplexer by using the bus control module to acquire the monitoring data corresponding to the optical module and forwarding the monitoring data to the programmable logic chip of the switch main control card.
Optionally, the sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card includes:
adding a corresponding number of bus main interfaces on a programmable logic chip of the switch main control card according to the number of the switch line cards, and adding a bus slave interface on the programmable logic chip of each switch line card;
establishing a first bus connection between a programmable logic chip of the switch main control card and a programmable logic chip of each switch line card based on a bus main interface corresponding to the switch main control card and a bus slave interface corresponding to each switch line card;
the programmable logic chip of the main control card of the control switch is connected through the first bus and sends an access instruction to the programmable logic chip of each switch line card;
the accessing the optical module corresponding to the switch line card through the programmable logic chip of the switch line card according to the access instruction comprises:
adding a corresponding number of bus master interfaces on a programmable logic chip of the switch line card according to the number of the optical modules, and adding a bus slave interface on each optical module;
establishing a programmable logic chip of the switch line card to be connected with a second bus of each optical module based on a bus master interface corresponding to the switch line card and a bus slave interface of each optical module;
and controlling a programmable logic chip of the switch line card to access the optical module corresponding to the switch line card through the second bus connection by using the access instruction.
Optionally, the accessing, by the programmable logic chip of the switch line card according to the access instruction, the optical module corresponding to the switch line card includes:
acquiring type information of the optical module through a programmable logic chip of the switch line card, and determining a corresponding data reading format according to the type information;
and the programmable logic chip of the switch line card accesses the optical module according to the data reading format.
Optionally, the sending the monitoring data to the upper computer software through the programmable logic chip of the switch main control card includes:
acquiring monitoring data sent by a programmable logic chip of the switch line card through a first port of a true dual-port RAM contained in the programmable logic chip of the switch main control card;
and sending the monitoring data to upper computer software through a second port of the true dual-port RAM contained in a programmable logic chip of the switch main control card.
In a second aspect, the application discloses a switch optical module monitoring device, which includes a switch main control card and a switch line card, where the switch main control card and the switch line card respectively include respective programmable logic chips;
the programmable logic chip of the switch main control card is used for sending an access instruction to the programmable logic chip of the switch line card;
the programmable logic chip of the switch line card accesses the optical module corresponding to the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwards the monitoring data to the programmable logic chip of the switch main control card;
and the programmable logic chip of the switch master control card is also used for sending the monitoring data to upper computer software. .
In a third aspect, the present application discloses an electronic device, comprising:
a first memory for storing a first computer program;
the first processor is used for executing the first computer program to realize the switch optical module monitoring method applied to the programmable logic chip of the switch main control card;
a second memory for storing a second computer program;
and the second processor is used for executing the second computer program to realize the switch optical module monitoring method applied to the programmable logic chip of the switch line card.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the aforementioned switch optical module monitoring method.
In the application, an access instruction is sent to a programmable logic chip of a line card of the switch through the programmable logic chip of a master control card of the switch; accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card; and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card. Therefore, by taking the programmable logic chip of the switch master control card as a center, an access structure from the master control card programmable logic chip to the line card programmable logic chip and then to the optical module is formed, namely a central multi-fulcrum star topology is constructed through a bus, and then the master control card programmable logic chip reports monitoring data to upper computer software, so that a network operation and maintenance operator can clearly and intuitively check the working states of all on-line optical modules in real time through the upper computer software.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for monitoring an optical module of a switch according to the present application;
fig. 2 is a specific FPGA-based optical module online monitoring system for a frame switch provided in the present application;
FIG. 3 is a schematic diagram of a specific logical structure of a bus in the switch according to the present application;
fig. 4 is a specific intra-switch bus topology provided in the present application;
FIG. 5 is a schematic diagram of a specific true dual port RAM logic IP provided by the present application;
fig. 6 is a flowchart of a specific method for monitoring an optical module of a switch according to the present application;
FIG. 7 is a schematic diagram of another specific switch-internal bus logic structure provided in the present application;
fig. 8 is a schematic structural diagram of an optical module monitoring device of a switch provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art of the current frame type switch, each line card adopts an interrupt triggering mode, and when an optical module works abnormally, an interrupt signal is output and fed back to a line card CPU for processing.
The embodiment of the application discloses a method for monitoring an optical module of a switch, which can comprise the following steps as shown in figure 1:
step S11: and sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card.
In this embodiment, first, a Programmable logic (Field Programmable Gate Array) chip of a switch main control card is controlled, and an access instruction is sent to the Programmable logic chip of a switch line card; specifically, a serial bus can be established in advance between the programmable logic of the switch main control card and the programmable logic chip of the switch line card, and an access instruction is sent through the serial bus; when a plurality of switch line cards exist, the programmable logic of the switch main control card sends access instructions to the programmable logic chip of each switch line card, and specifically, the access instructions can be sent sequentially through a serial bus. The Programmable Logic chip of the switch main control card may be an FPGA (Field Programmable Gate Array), a CPLD (Complex Programmable Logic Device), an MCU (micro control Unit), a DSP (Digital Signal Processing), or the like.
Taking an FPGA chip as an example, for example, in fig. 2, an optical module online monitoring system of a frame switch based on an FPGA is shown, the frame switch mainly includes three major parts, namely a backplane, a line card, and a main control card, generally, the frame switch includes a plurality of line cards and two main control cards, one of the main control cards is used as a standby, the line card and the main control card implement interaction of signals such as data and control through a connector and a wiring of the backplane, and the optical module generally exists on a front panel port of the line card, in this embodiment, the FPGA chip of the main control card of the switch and the FPGA chip of each line card in the switch are all interconnected through a Bus, and the serial Bus may be an I2C Bus (I2C Bus), that is, information transmission is implemented between the main control card and the line card through the I2C Bus. Specifically, the access may be performed according to a preset periodic polling, so as to periodically monitor the state of the optical module.
In this embodiment, the sending the access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card may include: adding a corresponding number of bus master interfaces on a programmable logic chip of the switch master control card according to the number of the switch line cards, and adding a bus slave interface on the programmable logic chip of each switch line card; establishing a first bus connection between a programmable logic chip of the switch main control card and a programmable logic chip of each switch line card based on a bus main interface corresponding to the switch main control card and a bus slave interface corresponding to each switch line card; and the programmable logic chip of the control switch main control card is connected through the first bus and sends an access instruction to the programmable logic chip of each switch line card. For example, as shown in fig. 3, taking an I2C bus and an FPGA chip as an example, if there are k line cards, k I2C masters (I2C masters) are designed on the FPGA chip of the Master control card, and an I2C Slave (I2C Slave) is designed on each line card to form an I2C bus connection with the I2C Master of the Master control FPGA for communication.
Step S12: and accessing the optical module corresponding to the switch line card through the programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card.
In this embodiment, after receiving an access instruction sent by the main control card, the programmable logic chip of the switch line card accesses the optical module through the serial bus between the local optical module according to the access instruction to obtain monitoring data corresponding to the optical module, and feeds back the monitoring data to the programmable logic chip of the main control card of the switch. Specifically, a serial bus may be established in advance between the programmable logic of the switch line card and the optical module corresponding to the switch line card, and the optical module may be accessed through the serial bus. The programmable logic chips of the switch line card may be an FPGA, a CPLD, an MCU, or a DSP, and the programmable logic chips of the switch main control card and the switch line card may be the same type of chip, such as both an FPGA, or different types of chips, such as one FPGA and the other CPLD. For example, as shown in fig. 2, taking an FPGA chip as an example, each optical module is interconnected with the FPGA chip on the line card through an I2C bus to implement status information transmission. Specifically, monitoring data corresponding to the optical module is obtained by monitoring through a digital diagnosis monitoring technology, wherein the monitoring data comprises parameters such as the temperature, the voltage, the transmitting and receiving optical power of the optical module, the bias current of the laser and the like. Aiming at the switch with a plurality of slot positions and a plurality of line cards, the centralized management of the optical modules of the line cards of each slot position switch can be realized.
In this embodiment, the accessing, by the programmable logic chip of the switch line card according to the access instruction, the optical module corresponding to the switch line card may include: adding a corresponding number of bus master interfaces on a programmable logic chip of the switch line card according to the number of the optical modules, and adding a bus slave interface on each optical module; establishing a programmable logic chip of the switch line card to be connected with a second bus of each optical module based on a bus master interface corresponding to the switch line card and a bus slave interface of each optical module; and controlling a programmable logic chip of the switch line card to access an optical module corresponding to the switch line card through the second bus connection by using the access instruction. For example, as shown in fig. 3, taking an I2C bus as an example, if there are k line cards and each line card has n optical modules, n I2C master interfaces and 1I 2C slave interface need to be designed on a single line card.
It can be seen that, in order to enable the master control to access the optical module on each line card, a programmable logic is designed on all the master controls and the line cards, a pair of I2C buses is added between the master control and the programmable logic device of each line card through the backplane, the programmable logic chip of each line card is interconnected with the programmable logic chip of the master control across boards, and a star-type I2C interconnection topology with the master control programmable logic as the center is formed in the switch, as shown in fig. 4, the standby master control cards are the same. The main control card can be simultaneously and parallelly communicated with the FPGA chips of all the line cards to access all the optical modules in parallel, the number of the line card slots is n, communication can be completed only by 2n signal lines, a small number of connector line pairs are occupied, and the wiring difficulty and the number of layers of the back plate are reduced.
In this embodiment, the accessing, by the programmable logic chip of the switch line card according to the access instruction, the optical module corresponding to the switch line card may include: acquiring type information of the optical module through a programmable logic chip of the switch line card, and determining a corresponding data reading format according to the type information; and the programmable logic chip of the switch line card accesses the optical module according to the data reading format.
It can be understood that the frame switch covers a plurality of SFP (Small Form Pluggable) type packaged optical modules with different rates, including 1G (SFP), 10G (SFP +), 25G (SFP 28), 40G (QSFP +) and 100G (QSFP 28), and the like, and according to the number of pairs of high-speed differential lines used, the optical modules can be further divided into 1-Lane and 4-Lane,25G (including 25G) the optical modules with the following rates are 1-Lane,40G (including 40G) and the optical modules with the above rates are 4-Lane, the 1-Lane mode follows SFF-8472 standard, the 4-Lane mode optical module follows SFF-8636 standard, and the 100G-QSFP28 optical module parameter format defined by SFF-8636 is as follows:
Figure BDA0003915354890000091
the number, address and definition of DDM registers for different standards are all different, but all provide a two-wire standard I2C bus interface. Therefore, in order to be compatible with multiple types of optical modules, in this embodiment, two sets of optical module read-write instructions are provided, and after the type of an optical module is determined by the programmable logic of the line card, the optical module is accessed according to a corresponding data read format.
Step S13: and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card.
In this embodiment, after the programmable logic of the main control card acquires the monitoring data of the optical module, the monitoring data is sent to the upper computer software through the main control CPU, so that network operation and maintenance personnel can clearly and intuitively check the working states of all the online optical modules in real time through the upper computer software, locate faults on the optical modules or the optical fiber transmission links, and realize early warning of the optical module working abnormality.
In this embodiment, sending the monitoring data to the upper computer software through the programmable logic chip of the switch main control card may include: acquiring monitoring data sent by a programmable logic chip of the switch line card through a first port of a true dual-port RAM contained in the programmable logic chip of the switch main control card; and sending the monitoring data to upper computer software through a second port of the true dual-port RAM contained in a programmable logic chip of the switch main control card.
In order to monitor the efficient storage and viewing of data, a true dual-port RAM is designed in the programmable logic of the main control card in this embodiment, the bit width is 16bit, and the RAM logic IP is shown in fig. 5. The true dual-port RAM is provided with two groups of completely independent and asynchronous data lines, address lines and read-write control lines, so that two independent systems are allowed to synchronously and asynchronously read and write the memory at random, and the read-write throughput rate of the RAM can be improved by the mode of sharing the memory. In this embodiment, one group of ports of the RAM is connected to an I2C main interface of the main control programmable logic and is responsible for storing monitoring data of the optical module in real time, and the other group of ports is connected to the main control CPU and is used for the CPU upper computer software to call monitoring parameters. Currently, each optical module occupies 14 storage depths, and the specific total RAM depth is determined according to the maximum number of the pluggable optical modules of the frame switch, and the scalable storage depth can be reserved in design.
As can be seen from the above, in this embodiment, an access instruction is sent to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card; accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card; and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card. Therefore, by using the programmable logic chip of the switch main control card as a center, an access structure from the main control card programmable logic chip to the line card programmable logic chip and then to the optical module is formed, namely a central multi-fulcrum star topology is constructed through a bus, and then the main control card programmable logic chip reports monitoring data to upper computer software, so that network operation and maintenance personnel can clearly and intuitively check the working states of all on-line optical modules in real time through the upper computer software.
The embodiment of the present application discloses a specific method for monitoring an optical module of a switch, which is shown in fig. 6 and may include the following steps:
step S21: and adding a first serial bus multiplexer to a programmable logic chip of the switch master control card.
In this embodiment, the first serial bus multiplexer may be an I2C bus multiplexer. It can be understood that, according to the disclosure of the above embodiments, by establishing 1 host multiplexing module in the master control programmable logic and interconnecting the host multiplexing module with the programmable logic of each line card, and establishing 1 slave multiplexing module in the on-line card programmable logic and interconnecting the slave multiplexing module with the optical module on each line card, the problem of high resource overhead caused by the need to design a plurality of hosts and slaves on the master control and line card programmable logic chips is solved, so that the master control programmable logic host can be connected to access the optical module slave, and the control logic is simplified. In the frame switch, a plurality of optical modules exist in a single line card at the same time, each optical module is an I2C slave, and the I2C addresses of the optical modules of the same type are the same, so that the I2C buses of the optical modules cannot be connected in series, the programmable logic on the line card is directly used to read the information of each optical module in parallel, I2C logic hosts with the same number as the optical modules need to be designed in the programmable logic of the line card, as shown in fig. 3, an I2C slave is also designed for the line card to communicate with the I2C host for controlling the programmable logic, and the code is equivalent to two layers of I2C master-slave logic in series connection; if the switch has k line cards and n optical modules per line card, n I2C masters and 1I 2C Slave need to be designed on a single line card, and k I2C masters need to be designed on the Master controller, then the whole frame has k (n + 1) I2C masters and 2k I2C Slave. Therefore, more I2C bus expansion chips are needed, the cost is increased, and programmable logic resources of the line card are occupied.
In addition, in the prior art, for a box switch, a CPU is used in combination with a bus expansion chip (such as PCA9548 of TI) to access an optical module on a board, the CPU needs to periodically and periodically access optical module refresh state information of a front panel, a parameter real-time refresh mechanism occupies process resources of the CPU, software development is not facilitated, and parameters acquired by CPUs of line cards cannot be uniformly uploaded to a main control; meanwhile, more bus expansion chips are needed, so that the consumption of logic resources is high, the PCB area is occupied, and the wiring difficulty is increased. In order to solve the above-mentioned disadvantages of large consumption of logic resources and complex control, the present embodiment proposes a bus multiplexing scheme, in which bus multiplexing is adopted in both the main control programmable logic and the line card programmable logic, a time division multiplexing I2C bus method based on programmable logic accesses each optical module I2C slave interface, and reading and updating of the operating parameters of the optical module on the front panel of the line card are implemented by using a time division multiplexing I2C transparent transmission method.
Step S22: and the programmable logic chip controls the switch main control card, establishes bus connection with the programmable logic chip of each switch line card by polling in a time division multiplexing mode through the first serial bus multiplexer, and sequentially sends access instructions to the programmable logic chip of each switch line card through the bus connection.
For example, as shown in fig. 7, an I2C Master and an I2C bus multiplexer module are designed on the main control programmable logic, and the multiplexer is used to sequentially open the connection between the I2C Master and each line card in a polling manner, and after the status information of the optical module in one line card is updated, the optical module is switched to be connected to the next line card.
Step S23: adding a second serial bus multiplexer to a programmable logic chip of the switch line card.
Step S24: and controlling the programmable logic chip of the switch line card by using the access instruction, polling each optical module corresponding to the line card by adopting a time division multiplexing mode through the second serial bus multiplexer to establish bus connection so as to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card.
In this embodiment, an I2C bus multiplexer module is also used on the line card, and is used to connect the Master I2C Master to each optical module slave in sequence, so that a transparent communication path is temporarily established between the Master I2C Master and the optical module I2C slave, and the Master can directly read DDM data of the EEPROM in the optical module through transparent transmission and then store the DDM data in the local RAM.
In this embodiment, the controlling, by the access instruction, the programmable logic chip of the switch line card, and polling, by the second serial bus multiplexer, to establish bus connection with each optical module in a time division multiplexing manner to acquire the monitoring data corresponding to the optical module may include: controlling a programmable logic chip of the switch line card by utilizing a bus control module configured in the switch line card according to the access instruction, and sequentially establishing bus connection with each optical module by adopting a time division multiplexing mode through the second serial bus multiplexer; and switching the data transmission direction of the second serial bus multiplexer by using the bus control module to acquire the monitoring data corresponding to the optical module, and forwarding the monitoring data to a programmable logic chip of the switch main control card.
It can be understood that, the SDA (SerialData) signal line of the I2C bus needs to satisfy bidirectional transmission, and a completely bidirectional and register-free path cannot be realized in the programmable logic device, so that, by designing a bus control module, i.e., an I2C control module, in the on-line card programmable logic, the bus control module is configured to output an I2C _ Ch _ Sel signal to switch the channel of the I2C bus multiplexer of the line card after detecting an access instruction on the bus, and switch to the next optical module, thereby avoiding adding an additional control line; and when detecting that the master control I2 CMmaster needs the optical module I2C Slave to respond or return read data, outputting an I2C _ SDA _ Dir pulse signal to enable the bidirectional I/O SDA of the multiplexer to switch the data direction so as to acquire the monitoring data of the optical module.
Step S25: and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card.
For the specific process of step S25, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated herein.
As can be seen from the above, in this embodiment, a logical structure of two layers of I2C in series does not need to be designed by the method of time division multiplexing the I2C bus, only one I2C Master needs to be designed for Master control, and the I2C Master-slave interface module does not need to be designed at all by the line card, so that consumption of logical resources is greatly reduced, complexity of code writing is simplified, real-time acquisition of operating parameters of optical modules with a large number of whole frames of the frame switch is realized at low cost, and the whole frame of optical modules can be managed and monitored in a centralized manner. In addition, the operation parameter monitoring of the optical modules does not require strong real-time performance, and the use requirements under the common conditions are met although the optical modules cannot be accessed in parallel completely by adopting time division multiplexing.
Correspondingly, the embodiment of the application also discloses a switch optical module monitoring device, which comprises a switch main control card and a switch line card, wherein the switch main control card and the switch line card respectively comprise respective programmable logic chips, as shown in fig. 8;
the programmable logic chip of the switch main control card is used for sending an access instruction to the programmable logic chip of the switch line card;
the programmable logic chip of the switch line card accesses the optical module corresponding to the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwards the monitoring data to the programmable logic chip of the switch main control card;
and the programmable logic chip of the switch main control card is also used for sending the monitoring data to upper computer software.
As can be seen from the above, in this embodiment, the access instruction is sent to the programmable logic chip of the switch line card through the programmable logic chip of the switch main control card; accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card; and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card. Therefore, by taking the programmable logic chip of the switch master control card as a center, an access structure from the master control card programmable logic chip to the line card programmable logic chip and then to the optical module is formed, namely a central multi-fulcrum star topology is constructed through a bus, and then the master control card programmable logic chip reports monitoring data to upper computer software, so that a network operation and maintenance operator can clearly and intuitively check the working states of all on-line optical modules in real time through the upper computer software.
In some specific embodiments, the programmable logic chip of the switch master card may specifically include:
the multiplexer adding unit is used for adding a first serial bus multiplexer to a programmable logic chip of the switch main control card;
and the instruction sending unit is used for controlling a programmable logic chip of the switch main control card, establishing bus connection with the programmable logic chip of each switch line card by polling in a time division multiplexing mode through the first serial bus multiplexer, and sending access instructions to the programmable logic chip of each switch line card in sequence through the bus connection.
In some embodiments, the programmable logic chip of the switch line card may specifically include:
the multiplexer adding unit is used for adding a second serial bus multiplexer to a programmable logic chip of the switch line card;
and the data acquisition unit is used for controlling a programmable logic chip of the switch line card by using the access instruction, polling each optical module corresponding to the line card by using the second serial bus multiplexer in a time division multiplexing mode to establish bus connection so as to acquire monitoring data corresponding to the optical module.
In some specific embodiments, the data obtaining unit may specifically include:
the connection establishing unit is used for controlling the programmable logic chip of the switch line card by utilizing the bus control module configured in the switch line card according to the access instruction, and sequentially establishing bus connection with each optical module by adopting a time division multiplexing mode through the second serial bus multiplexer;
and the monitoring data acquisition unit is used for switching the data transmission direction of the second serial bus multiplexer by using the bus control module so as to acquire the monitoring data corresponding to the optical module and forward the monitoring data to the programmable logic chip of the switch main control card.
In some specific embodiments, the switch optical module monitoring apparatus may specifically include:
a first interface adding unit, configured to add bus master interfaces of a corresponding number on a programmable logic chip of the switch master control card according to the number of the switch line cards, and add a bus slave interface on the programmable logic chip of each switch line card;
the first connection establishing unit is used for establishing first bus connection between the programmable logic chip of the switch main control card and the programmable logic chip of each switch line card based on the bus main interface corresponding to the switch main control card and the bus slave interface corresponding to each switch line card;
the command sending unit is used for controlling the programmable logic chip of the switch main control card to be connected through the first bus and sending an access command to the programmable logic chip of each switch line card;
in some specific embodiments, the switch optical module monitoring apparatus may specifically include:
a second interface adding unit, configured to add bus master interfaces of a corresponding number on a programmable logic chip of the switch line card according to the number of the optical modules, and add a bus slave interface on each optical module;
a second connection establishing unit, configured to establish a second bus connection between the programmable logic chip of the switch line card and each optical module based on a bus master interface corresponding to the switch line card and a bus slave interface of each optical module;
and the access unit is used for controlling the programmable logic chip of the switch line card to access the optical module corresponding to the switch line card through the second bus connection by using the access instruction.
In some specific embodiments, the programmable logic chip of the switch line card may specifically include:
the data reading format determining unit is used for acquiring the type information of the optical module and determining a corresponding data reading format according to the type information;
and the access unit is used for accessing the optical module according to the data reading format.
In some specific embodiments, the programmable logic chip of the switch master card may specifically include:
the detection data acquisition unit is used for acquiring monitoring data sent by the programmable logic chip of the switch line card through a first port of a true dual-port RAM contained in the programmable logic chip of the switch main control card;
and the detection data sending unit is used for sending the monitoring data to upper computer software through a second port of the true dual-port RAM contained in a programmable logic chip of the switch main control card.
Further, the embodiment of the application also discloses an electronic device, which comprises a first memory, a first processor, a second memory and a second processor. Wherein the first memory is used for storing a first computer program; the first processor is used for executing the first computer program to realize the switch optical module monitoring method applied to the programmable logic chip of the switch main control card; a second memory for storing a second computer program; and the second processor is used for executing the second computer program to realize the switch optical module monitoring method applied to the programmable logic chip of the switch line card. In addition, the memory is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk, etc., and the resources stored on the memory include data, etc., including computer programs and monitoring data, and the storage manner may be a transient storage or a permanent storage.
Further, an embodiment of the present application further discloses a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and when the computer-executable instructions are loaded and executed by a processor, the steps of the switch optical module monitoring method disclosed in any of the foregoing embodiments are implemented.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the medium for monitoring the optical module of the switch provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for monitoring optical modules of a switch is characterized by comprising the following steps:
sending an access instruction to a programmable logic chip of a line card of the switch through the programmable logic chip of the master control card of the switch;
accessing an optical module corresponding to the switch line card through a programmable logic chip of the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwarding the monitoring data to the programmable logic chip of the switch main control card;
and sending the monitoring data to upper computer software through a programmable logic chip of the switch main control card.
2. The switch optical module monitoring method according to claim 1, wherein the sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch master card includes:
adding a first serial bus multiplexer to a programmable logic chip of the switch master control card;
and the programmable logic chip controls the switch master control card, establishes bus connection with the programmable logic chip of each switch line card by polling in a time division multiplexing mode through the first serial bus multiplexer, and sequentially sends access instructions to the programmable logic chip of each switch line card through the bus connection.
3. The method according to claim 1, wherein the accessing, by the programmable logic chip of the switch line card, the optical module corresponding to the switch line card according to the access instruction to obtain monitoring data corresponding to the optical module includes:
adding a second serial bus multiplexer to a programmable logic chip of the switch line card;
and controlling a programmable logic chip of the switch line card by using the access instruction, and polling each optical module corresponding to the line card by using the second serial bus multiplexer in a time division multiplexing mode to establish bus connection so as to acquire monitoring data corresponding to the optical module.
4. The switch optical module monitoring method according to claim 3, wherein the using the access instruction to control the programmable logic chip of the switch line card to poll and establish a bus connection with each optical module through the second serial bus multiplexer in a time division multiplexing manner to obtain the monitoring data corresponding to the optical module includes:
controlling a programmable logic chip of the switch line card by utilizing a bus control module configured in the switch line card according to the access instruction, and sequentially establishing bus connection with each optical module by adopting a time division multiplexing mode through the second serial bus multiplexer;
and switching the data transmission direction of the second serial bus multiplexer by using the bus control module to acquire the monitoring data corresponding to the optical module and forwarding the monitoring data to the programmable logic chip of the switch main control card.
5. The switch optical module monitoring method according to claim 1, wherein the sending an access instruction to the programmable logic chip of the switch line card through the programmable logic chip of the switch master card includes:
adding a corresponding number of bus master interfaces on a programmable logic chip of the switch master control card according to the number of the switch line cards, and adding a bus slave interface on the programmable logic chip of each switch line card;
establishing a first bus connection between a programmable logic chip of the switch main control card and a programmable logic chip of each switch line card based on a bus main interface corresponding to the switch main control card and a bus slave interface corresponding to each switch line card;
the programmable logic chip of the main control card of the control switch is connected through the first bus and sends an access instruction to the programmable logic chip of each switch line card;
the accessing the optical module corresponding to the switch line card through the programmable logic chip of the switch line card according to the access instruction comprises:
adding a corresponding number of bus master interfaces on a programmable logic chip of the switch line card according to the number of the optical modules, and adding a bus slave interface on each optical module;
establishing a programmable logic chip of the switch line card to be connected with a second bus of each optical module based on a bus master interface corresponding to the switch line card and a bus slave interface of each optical module;
and controlling a programmable logic chip of the switch line card to access the optical module corresponding to the switch line card through the second bus connection by using the access instruction.
6. The method for monitoring the optical modules of the switch according to claim 1, wherein the accessing, by the programmable logic chip of the switch line card, the optical module corresponding to the switch line card according to the access instruction includes:
acquiring type information of the optical module through a programmable logic chip of the switch line card, and determining a corresponding data reading format according to the type information;
and the programmable logic chip of the switch line card accesses the optical module according to the data reading format.
7. The switch optical module monitoring method according to any one of claims 1 to 6, wherein the sending of the monitoring data to the upper computer software through a programmable logic chip of the switch master control card includes:
acquiring monitoring data sent by a programmable logic chip of the switch line card through a first port of a true dual-port RAM contained in the programmable logic chip of the switch main control card;
and sending the monitoring data to upper computer software through a second port of the true dual-port RAM contained in a programmable logic chip of the switch main control card.
8. The monitoring device for the optical module of the switch is characterized by comprising a main control card of the switch and a line card of the switch, wherein the main control card of the switch and the line card of the switch respectively comprise respective programmable logic chips;
the programmable logic chip of the switch main control card is used for sending an access instruction to the programmable logic chip of the switch line card;
the programmable logic chip of the switch line card accesses the optical module corresponding to the switch line card according to the access instruction to acquire monitoring data corresponding to the optical module, and forwards the monitoring data to the programmable logic chip of the switch main control card;
and the programmable logic chip of the switch main control card is also used for sending the monitoring data to upper computer software.
9. An electronic device, comprising:
a first memory for storing a first computer program;
a first processor, configured to execute the first computer program to implement the switch optical module monitoring method applied to the programmable logic chip of the switch master card according to any one of claims 1 to 7;
a second memory for storing a second computer program;
a second processor for executing said second computer program to implement the switch optical module monitoring method applied to the programmable logic chip of the switch line card according to any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the switch light module monitoring method as claimed in any of claims 1 to 7.
CN202211335958.7A 2022-10-28 2022-10-28 Method, device, equipment and storage medium for monitoring optical module of switch Pending CN115696100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211335958.7A CN115696100A (en) 2022-10-28 2022-10-28 Method, device, equipment and storage medium for monitoring optical module of switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211335958.7A CN115696100A (en) 2022-10-28 2022-10-28 Method, device, equipment and storage medium for monitoring optical module of switch

Publications (1)

Publication Number Publication Date
CN115696100A true CN115696100A (en) 2023-02-03

Family

ID=85045735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211335958.7A Pending CN115696100A (en) 2022-10-28 2022-10-28 Method, device, equipment and storage medium for monitoring optical module of switch

Country Status (1)

Country Link
CN (1) CN115696100A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116132383A (en) * 2023-04-13 2023-05-16 苏州浪潮智能科技有限公司 Information transmission device, system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116132383A (en) * 2023-04-13 2023-05-16 苏州浪潮智能科技有限公司 Information transmission device, system and method

Similar Documents

Publication Publication Date Title
Jansen et al. Real-time Ethernet: the EtherCAT solution
EP3029884A1 (en) Commissioning method, master control board, and service board
CN110865958B (en) LRM-based integrated switching management module design method
CN103902485A (en) Multi-channel synchronized monitoring method for controlling parallel optical modules
CN210693970U (en) Multi-bus testing device
CN102724093A (en) Advanced telecommunications computing architecture (ATCA) machine frame and intelligent platform management bus (IPMB) connection method thereof
CN115696100A (en) Method, device, equipment and storage medium for monitoring optical module of switch
CN109586956B (en) FCoE switch capable of flexibly configuring ports and method
CN110531686B (en) Device and method for realizing multiple hosts based on single-master multi-slave protocol
CN103941625A (en) Can bus data transmission monitoring system
CN114356725A (en) Case management system
CN112653516B (en) Method, system, equipment and medium for accessing DIMM in server
Kwon et al. Gen-z memory pool system architecture
CN107980223B (en) Ethernet interconnection circuit and device
CN112347033A (en) Multi-unit server implementation method based on VPX architecture
CN115129552B (en) Method, device, equipment and storage medium for monitoring transmission state of I2C bus
CN114615106B (en) Ring data processing system, method and network equipment
CN116089176A (en) Hot standby dual-redundancy computer control system for AUV
CN208000578U (en) A kind of blade type data processing equipment
CN115705267A (en) Monitoring acquisition equipment, and main/standby switching method and system based on monitoring acquisition equipment
CN113407480A (en) Centralized management's frame switch
CN213634464U (en) Main-standby dual-computer switching control system based on PowerPC
CN217985103U (en) Double-bus anti-following linkage interlocking control device
CN100478932C (en) Electronic apparatus
CN210469318U (en) FC emulation control portable equipment based on USB interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination