CN115168141A - Optical interface management system, method, device, programmable logic device and storage medium - Google Patents

Optical interface management system, method, device, programmable logic device and storage medium Download PDF

Info

Publication number
CN115168141A
CN115168141A CN202210752785.2A CN202210752785A CN115168141A CN 115168141 A CN115168141 A CN 115168141A CN 202210752785 A CN202210752785 A CN 202210752785A CN 115168141 A CN115168141 A CN 115168141A
Authority
CN
China
Prior art keywords
optical port
optical
signal
programmable logic
register
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
CN202210752785.2A
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.)
Kyland Technology Co Ltd
Original Assignee
Kyland Technology 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 Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN202210752785.2A priority Critical patent/CN115168141A/en
Publication of CN115168141A publication Critical patent/CN115168141A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/32Handling requests for interconnection or transfer for access to input/output bus using combination of interrupt and burst mode transfer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/327Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for interrupts

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Optical Communication System (AREA)

Abstract

The invention discloses an optical port management system, a method, a device, a programmable logic device and a storage medium. The system comprises: the system comprises network equipment, a programmable logic device and a plurality of optical ports; the programmable logic device is used for monitoring the signal state of each optical port according to the value register mapping relation of the register and reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state, wherein a single byte in the register of the programmable logic device corresponds to one signal, and a single bit in the single byte corresponds to one optical port; each value of a single bit in a single byte corresponds to a signal state. In the technical scheme, the programmable logic device distinguishes different optical ports and signals by using the mapping relation of the register, determines the signal state of each signal of each optical port according to the value of the register, supports the arbitrary expansion of the number and the types of the optical ports, and realizes the comprehensive and efficient monitoring and management of a large number of optical ports and various signals.

Description

Optical interface management system, method, device, programmable logic device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network communication, in particular to an optical port management system, a method, a device, a programmable logic device and a storage medium.
Background
With the rapid development of internet technology, the bandwidth requirement is higher and higher, more and more transmission networks mainly based on twisted-pair copper cable connection mode are replaced by optical fiber media with low cost, easy deployment, high bandwidth, strong expandability and longer transmission distance, and the number of optical interfaces in network communication equipment such as switches and routers is continuously increased and accounts for more and more.
However, in embedded systems, especially network devices such as switches, which are designed using Application Specific Integrated Circuit (ASIC) chips, the hardware resources are very limited, for example, the network device monitors a signal of a single optical port through each input/output (IO) interface. A single optical port may have 5 kinds of signals at most to be monitored, but at most 32 IO interfaces that can be provided by the current network device exist, and if each optical port has 5 kinds of signals to be monitored, the network device can only manage about 6 optical ports at most, which is difficult to meet the actual requirement. In some scenarios, the number of optical ports that can be connected to the network device can also be increased by reducing the signal types monitored by a single optical port (e.g., only one or two signals are monitored for each optical port, and the other signals are not monitored), but the number of optical ports increased in this manner is very limited.
In summary, the conventional optical interface management system utilizes the IO interface to monitor each signal of a single optical interface, and the scalability of the number of optical interfaces is poor, so that it is impossible to realize comprehensive and efficient monitoring and management of a large number of optical interfaces and multiple signals.
Disclosure of Invention
The invention provides an optical port management system, a method, a device, a programmable logic device and a storage medium, which are used for realizing comprehensive and efficient monitoring and management of a large number of optical ports and various signals.
In a first aspect, an embodiment of the present invention provides an optical port management system, including:
a network Device, a Programmable Logic Device (PLD), and a plurality of optical ports;
the programmable logic device is used for monitoring the signal state of each optical port according to the value of a register and the register mapping relation, and reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to a signal and a single bit in the single byte corresponds to an optical port; each value of a single bit in the single byte corresponds to a signal state.
In a second aspect, an embodiment of the present invention provides an optical interface management method, which is applied to a programmable logic device in an optical interface management system, where the optical interface management system further includes a network device and a plurality of optical interfaces;
the method comprises the following steps:
monitoring the signal state of each optical port according to the value of the register and the register mapping relation;
reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to a signal and a single bit in the single byte corresponds to an optical port; each value of a single bit in the single byte corresponds to a signal state.
In a third aspect, an embodiment of the present invention provides an optical port management apparatus, including:
the monitoring module is used for monitoring the signal state of each optical port according to the value of the register and the register mapping relation;
a reporting module, configured to report an interrupt signal to the network device when a signal state of any one of the optical interfaces is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to one signal and a single bit in the single byte corresponds to one optical port; each value of a single bit in the single byte corresponds to a signal state.
In a fourth aspect, an embodiment of the present invention provides a programmable logic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the optical port management method according to the second aspect
In a fifth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for optical port management according to the second aspect is implemented.
The embodiment of the invention provides an optical port management system, a method, a device, a programmable logic device and a storage medium. The system comprises: the system comprises network equipment, a programmable logic device and a plurality of optical ports; the programmable logic device is used for monitoring the signal state of each optical port according to the value of a register and the mapping relation of the register, and reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state; wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to a signal and a single bit in the single byte corresponds to an optical port; each value of a single bit in the single byte corresponds to a signal state. According to the technical scheme, different optical ports and signals are distinguished by the programmable logic device through the register mapping relation, the signal state of each signal of each optical port is determined according to the value of the register, the number of the optical ports and the type of the signals are expanded randomly, and comprehensive and efficient monitoring and management of a large number of optical ports and various signals can be realized.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic structural diagram of an optical port management system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for managing a light-break according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an optical port management system according to an embodiment of the present invention;
fig. 4 is a flowchart of an optical port management method according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an optical port management apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a programmable logic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Before discussing exemplary embodiments in greater detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
It should be noted that the terms "first", "second", and the like in the embodiments of the present invention are only used for distinguishing different apparatuses, modules, units, or other objects, and are not used for limiting the order or interdependence relationship of the functions performed by these apparatuses, modules, units, or other objects.
Example one
Fig. 1 is a schematic structural diagram of an optical port management system according to an embodiment of the present invention. The present embodiment is applicable to a case where a plurality of optical ports are managed. As shown in fig. 1, the system includes: a network device 100, a programmable logic device 200, and a plurality of optical ports 300; the programmable logic device 200 is configured to monitor a signal state of each optical port 300 according to a value of the register and a register mapping relationship, and report an interrupt signal to the network device 100 when a signal state of any one optical port 300 is a preset state; wherein, the register mapping relation comprises: a single byte in the register of programmable logic device 200 corresponds to one signal and a single bit in the single byte corresponds to one optical port; each value of a single bit in a single byte corresponds to a signal state.
Specifically, the network device 100 may be a switch, a router, or a network device designed using an ASIC chip. Programmable Logic Device 200 may be a Complex Programmable Logic Device (CPLD).
The register of the programmable logic device 200 can be used to store the signal status of each signal of each optical port 300 to indicate whether each signal of each optical port 300 is in a normal state or an abnormal state, thereby monitoring each optical port 300. A single byte of the register corresponds to one signal, and a single bit in the single byte corresponds to one optical port, that is, a single byte (including 8 bits) can be used to store the state of at most one signal of 8 optical ports, on this basis, multiple bytes can be used to implement monitoring of multiple signals of multiple optical ports. Each value of a single bit in a single byte corresponds to a signal state, for example, a value of a bit in a byte is 0, the bit corresponds to an optical port 1, and the byte corresponds to an optical module presence signal, which indicates that the optical module presence signal of the optical port 1 is in a state; if the bit value in the byte is 0, it indicates that the optical module of the optical port 1 is in another state in the bit signal. Furthermore, when the number of optical ports to be monitored is large and the types of signals are large, the number of the optical ports and the types of the signals can be flexibly expanded by expanding bytes and bits used for storing the states of the signals in the register.
The preset state may refer to a recovery from a normal state or an abnormal state (an abnormal state may also be understood as a fault state, and may be one or more signals of the optical port are abnormal, for example, the optical module is not in place or the optical signal is lost, etc.). In some embodiments, the preset state may refer to a state after the signal of the optical port is switched, for example, the optical port is switched from a normal state to an abnormal state, or is switched from the abnormal state to the normal state.
According to the value of the register and the register mapping relationship, when detecting that the signal of any optical port 300 is in an abnormal state or recovers to a normal state, the programmable logic device 200 may report a corresponding interrupt signal to the network device 100 to notify the network device 100 of which optical port is interrupted and whether the signal of the optical port is normal, so that the network device 100 can use the optical port with normal signal to communicate with other devices in the network in real time.
Optionally, the signal of each optical port includes the following five types: an optical module presence signal (PRE); a LOSs of Optical Signal (LOS); an emitted optical signal failure signal (TX _ FAIL); transmitting an optical signal enable signal (TX _ DIS); and a RATE control signal (RATE).
Table 1 is a register mapping table provided in this embodiment. As shown in table 1, the register addresses of the programmable logic device 200 include 8 bits, and 256 addresses can be addressable at maximum, and each address can store one byte (i.e. 8 bits) of data; each optical port has 5 signals to be monitored, so each signal can occupy 1 byte for expression, and the states of the five signals of the optical port can be recorded by using 5 bytes. In addition, the monitoring requirements for 1-8 optical ports can be met in each byte.
TABLE 1 register mapping Table
Figure BDA0003718878990000071
Setting the address range of the registers to Reg _ addr [4 ] according to the register mapping relationship shown in table 1, so that 8 optical ports can be managed; the whole addressing space has 256 addresses, if 5 signals are monitored, the maximum manageable number of optical ports can reach as many as 400, thereby meeting the actual requirement.
In the optical interface management method provided by the embodiment of the present invention, by using a programmable logic device and reasonably designing a register mapping relationship, data exchange of multiple optical interfaces and monitoring of multiple signals are realized, expansion of the number of optical interfaces of a network device is supported, and management efficiency of multiple optical interfaces is improved.
Optionally, the preset state includes an abnormal state and a normal recovery state; correspondingly, the interrupt signal comprises a first interrupt signal and a second interrupt signal; the programmable logic device 200 is specifically configured to: under the condition that any bit in any byte is a first value, determining that the signal state of the corresponding type signal of the optical port corresponding to the bit in the byte is an abnormal state, and reporting a first interrupt signal to the network device 100; when any bit in any byte is changed to the second value, the signal state of the corresponding type of signal of the optical port corresponding to the bit in the byte is determined to be the recovered normal state, and a second interrupt signal is reported to the network device 100.
Exemplarily, a value of a certain bit in one byte is 1, the bit corresponds to an optical port 1, and the byte corresponds to an optical module presence signal, which indicates that the optical module presence signal (switched from a normal state) of the optical port 1 is in an abnormal state, at this time, the programmable logic device 200 may report a first interrupt signal to the network device 100, where the first interrupt signal may include an optical port identifier of the corresponding optical port and a signal type of the optical port, for example, an interrupt signal of a set time duration (e.g., 5 ms) to indicate which optical port is abnormal, and may also indicate which signal of the optical port is abnormal; if the bit value in the byte is changed to 0, it indicates that the optical module at optical port 1 recovers to a normal state in the bit signal (switched from an abnormal state), and at this time, the programmable logic device 200 may also report a second interrupt signal to the network device 100 to indicate which optical port recovers to the normal state, and may also indicate specifically which signal of the optical port recovers to the normal state.
It should be noted that, in the prior art, the system resources occupied when the optical interface is interrupted are too large. Specifically, when a fault occurs in the optical fiber line, the fault needs to be reported to the network device in time, so that the backup line can be switched in time, and communication interruption is avoided. However, the LOS signal of the optical port is a critical signal that needs to be reported to the network device, but the signal is only abnormal in a fixed level manner, and after such interruption occurs in one optical port, the interruption resource cannot be released, so that if there is interruption in another optical port, another interruption cannot be reported, and multiple optical ports cannot share the external interruption, that is, the network device cannot process multiple interruption events at the same time within a certain time period. In addition, the level is not reset to the initial state if a fault still exists after detection by software. Under the condition, a large amount of system resources are consumed to process the interrupt report, and if the interrupt report is not processed properly, the phenomena of system hang-up, system failure and system false-up are caused. However, the optical interface management system of this embodiment may implement data exchange and monitoring of multiple signals for multiple optical interfaces by using the programmable logic device, and when any optical interface is interrupted or recovered, the programmable logic device may report a corresponding interrupt signal to the network device, and the multiple optical interfaces may share an external interrupt, thereby improving the efficiency and reliability of optical interface management.
Optionally, the network device 100 is further configured to query the value of the register when receiving the interrupt signal, and use any optical port 300 whose bit in the corresponding byte is the second value for communication. On this basis, the network device 100 may manage the interrupt optical interface according to the value of the register and the register mapping relationship, and select an optical interface 300 with a normal signal for communication; if the signal state of the optical port for communication is abnormal, the optical port 300 with normal signal can be switched to in time, thereby ensuring the communication quality.
Fig. 2 is a flowchart for managing an optical interrupt according to a second embodiment of the present invention. Taking a network device as a switching chip and a programmable logic device as a CPLD as an example, as shown in fig. 2, the CPLD continuously monitors signals of n optical ports; when any one or more optical ports are interrupted, the CPLD writes an interruption event into a register, namely, updates the values of corresponding bytes and corresponding bits in the register, and reports an interruption signal to a switching chip, wherein the register is used for storing the interrupted optical ports and signal states, if the optical port signal is interrupted caused by an abnormal state, the values of the corresponding bytes and the corresponding bits are first values, and if the optical port signal is interrupted caused by recovering the normal state, the values of the corresponding bytes and the corresponding bits are second values; after the switching chip receives the interrupt signal, the switching chip can access the register through the SPI bus, inquire the optical port in which the interrupt occurs, then switch the optical port, and use any optical port (namely any optical port in which the signal is in a normal state) with the bit in the corresponding byte as the second value for communication so as to ensure the normal operation of optical fiber communication. Therefore, whether the interrupt signal of the optical interface is removed or not, the normal work and the line switching of the system cannot be influenced, the reporting among the interrupts of the optical interfaces is not influenced, and after the interrupted optical interface returns to normal, the system can not process the line in a closed loop manner, so that the expandability and the reliability of the system are ensured.
Optionally, the number of programmable logic devices 200 is at least two; the system further comprises: the relay device 400 is configured to analyze a command of the network device 100 to determine the programmable logic device 200 corresponding to the command, and forward the command to the corresponding programmable logic device 200, so that the corresponding programmable logic device 200 performs an operation on a corresponding optical port according to the command; and is further configured to combine the interrupt signals of the programmable logic devices 200 into one interrupt signal and report the interrupt signal to the network device 100.
There may be a plurality of programmable logic devices 200, and each programmable logic device 200 may be configured to monitor signals of at least one optical port 300. On this basis, the number of optical ports can be further expanded by expanding the number of the programmable logic devices 200, and large-scale optical port communication is realized. The relay device 400 may also be implemented by a CPLD.
The relay device 400 is connected to the network device 100 and each programmable logic device 200, and when receiving a command from the network device 100, the relay device 400 may determine to which programmable logic device or devices 200 the command needs to be sent by analyzing the command, thereby implementing the distribution of the command. Specifically, the command of the network device 100 may be for one or more programmable logic devices 200, and may be a read command or a write command. Commands for different programmable logic devices 200 may be distinguished by different identification or numbering, etc. For example, a command of the network device 100 may be sent through a data packet or a message, an identification field may be carried in a header of the data packet or a header of the message, where the identification field is used to indicate a unique identifier or a number of the programmable logic device 200, and after receiving the command, the relay device 400 may identify which programmable logic device 200 the receiving end of the command is according to the identification field, and forward the command to the corresponding programmable logic device 200, so that the editable logic device 200 performs corresponding operations on the relevant optical interface according to the command, for example: read or write operations to the optical port data.
In addition, there may be a plurality of programmable logic devices 200 reporting the interrupt signal, and the relay device 400 may combine the interrupt signals reported by the plurality of programmable logic devices 200 into one interrupt signal (according to the set frequency) and uniformly send the one interrupt signal to the network device 100, so as to reduce network resources occupied by frequently reporting the interrupt signal and also reduce the operating pressure of the network device 100. The merging may refer to that, in one interrupt signal, the optical port identifier of the optical port in the abnormal state or the normal state recovery of the plurality of programmable logic devices 200 and the signal type of each optical port are carried, for example, the optical module in the optical port a of the programmable logic device 1 recovers the normal state in place, and the optical signal loss signal of the optical port B of the programmable logic device 2 is the normal state recovery, so that the interrupt signal generated by the programmable logic device 1 and the interrupt signal generated by the programmable logic device 2 may be merged into one interrupt signal and reported to the network device 100. For another example, the interrupt signal may be reported once per second to notify the network device 100 which optical port the interrupt occurs in the second and whether the signal of the optical port is normal, so that the network device 100 uses the optical port with the normal signal to communicate with other devices in the network in real time.
Fig. 3 is a schematic structural diagram of an optical port management system according to an embodiment of the present invention. As shown in fig. 3, the network device 100 may be a switch chip (ASIC chip), and the programmable logic device 200 and the relay device 400 are both CPLDs. Expansion of IO and interrupt resources is performed by means of a Serial bus, such as a Serial Peripheral Interface (SPI) bus, an Inter-Integrated Circuit (I2C) bus, even a 1wire bus, and the like, which is externally hung with a CPLD programmable logic device. x denotes the number of serial data buses, m denotes the number of SMI buses, n denotes the number of optical ports, and p denotes the number of programmable logic devices (CPLD chips) used in the system.
In fig. 3, a DDR RAM (Double Data Rate Access Memory), a non-volatile Flash Memory (NOR Flash), a NAND Flash Memory (NAND Flash), a USB interface, and the like constitute a hardware subsystem 500 for running software. In addition, the system also comprises an Ethernet Physical layer (PHY) chip; a Direct current-Direct current (DC-DC) power supply and a clock generator may also be included.
It should be noted that, the network device may generally provide an SPI bus, which may be used to read software programs stored in the external Flash on one hand, and provide an additional bus chip on the other hand, so that the network device may be used to extend other external devices based on the SPI interface. In this embodiment, in order to enable the network device to perform data interaction with the programmable logic device through the SPI interface, an access protocol with a set format is defined to describe a timing sequence of the SPI bus interface, and on this basis, a communication mechanism is established between the switching chip and the CPLD through the SPI bus.
Optionally, the programmable logic device 200 is further configured to receive a command of the network device 100, analyze the command to obtain an operation instruction, an optical port corresponding to the operation instruction, and optical port data of the optical port, and process the optical port data of the corresponding optical port according to the operation instruction.
In this embodiment, the network device 100 and the programmable logic device 200 communicate with each other by using an access protocol with a set format, and with this unified access protocol format, the programmable logic device 200 may analyze a command of the network device 100, and determine an operation instruction indicated by the command, where the operation instruction mainly includes two types: a read instruction and a write instruction; the optical port corresponding to the operation instruction may also be determined, for example, a register address is indicated in the command, each optical port corresponds to a unique register address, and the programmable logic device 200 may determine which optical port the operation instruction is executed on according to the register address indicated in the command; the port data for that port in the command may also be determined. On this basis, the network device 100 may perform optical interface data exchange with each optical interface 300, including writing optical interface data from the network device 100 to the corresponding optical interface 300, or reading optical interface data from the corresponding optical interface 300 and feeding back the optical interface data to the network device 100.
Optionally, the command of the network device 100 includes an address field, a register address field, and an optical interface data field, where the address field is used to determine the type of the operation instruction, the register address field is used to determine the optical interface corresponding to the operation instruction and the register address thereof, and the optical interface data field is used to determine the optical interface data carried in the command.
The address field determines whether the type of the operation instruction is a read instruction or a write instruction; the register address field is used for indicating an optical port corresponding to the operation instruction and a register address thereof, namely a register address for reading or writing data of the optical port, the register addresses corresponding to different optical ports are different, and the optical port corresponding to the operation instruction can be uniquely determined according to the register address; the optical interface address field is used to carry optical interface data, where the first optical interface data may be optical interface data that is sent by the network device 100 and is to be written into the corresponding optical interface 300, and the second optical interface data may be optical interface data that is stored in the corresponding optical interface 300 and needs to be read out and fed back to the network device 100.
In one case, the operation instruction is a write instruction. In this case, the programmable logic device 200 is configured to extract the first optical port data sent by the network device from the optical port data field according to the write instruction, and store the first optical port data in the register address of the optical port corresponding to the register address field. On the basis of the data exchange, the data exchange in the direction from the network device 100 to the optical interface 300 can be realized.
Alternatively, the operation instruction is a read instruction. In this case, the programmable logic device 200 is configured to read the second optical port data from the register address of the optical port corresponding to the register address field according to the read instruction, and send the second optical port data carried in the optical port data field to the network device. On the basis of the data exchange, the data exchange of the optical interface from the optical interface 300 to the network device 100 can be realized.
In an embodiment, the address fields may further include a first address field and a second address field that together determine the kind of command of the network device 100.
Table 2 is a definition table of bits of an access protocol of a set format. In this embodiment, the data exchanged by a single bus access may be 4 bytes (32 bits), and the functions represented by these 4 bytes are shown in table 2. The first address field and the second address field jointly determine whether the operation instruction is a read instruction or a write instruction; the register address field of the optical port is used for determining the optical port and the register address for reading or writing the data of the optical port; the optical port address field is used to determine optical port data for the optical port.
Table 2 definition table of bits of access protocol with set format
Figure BDA0003718878990000141
Optionally, if the address in the first address field and the address in the second address field are the first combined address, the operation instruction is a write instruction; the programmable logic device is used for receiving first optical port data sent by the network equipment according to the writing instruction and storing the first optical port data into a register address of an optical port corresponding to the register address field.
Wherein, the writing instruction can be expressed as: and 0xad 0x1c Reg _addrReg _data, wherein the bit width of the register address field (Reg _ addr) is 8 bits, and the bit width of the optical interface data (Reg _ data) is 8 bits. And after receiving the commands, the programmable logic device receives the optical interface data sent by the SPI bus and stores the optical interface data in a register with the address Reg _ addr.
Optionally, if the address in the first address field and the address in the second address field are the second combined address, the operation instruction is a read instruction; and the programmable logic device is used for sending second optical interface data to the network equipment according to the reading instruction, and the second optical interface data is stored in the register address of the optical interface corresponding to the register address field.
Wherein, the read instruction can be expressed as: and 0xad 0x1d Reg _addrReg _data, wherein the bit width of the register address field (Reg _ addr) is 8 bits, and the bit width of the optical interface data (Reg _ data) is 8 bits. After receiving the above commands, the programmable logic device may return optical port data to the SPI bus, where the optical port data is stored in the register with the address Reg _ addr.
According to the communication mechanism and the protocol, the network equipment can smoothly read and write data to the register in the programmable logic device by running the software driving code so as to monitor the optical port signal.
The optical interface management system of the embodiment solves the problem that all state signals of the optical interfaces cannot be supervised or a large amount of optical interface resources cannot be supervised due to insufficient system resources when a network device has a plurality of optical interfaces to be supervised by introducing a programmable logic device, and adopts a hardware programming language to design a customized optical interface management mechanism on the premise of limited network device interface resources (including but not limited to an SPI bus, an I2C bus, a 1wire bus and the like), so that centralized management of 24 interfaces, 48 interfaces and even more optical interfaces is realized, finally 5 signals of each optical interface can be monitored, a reliable interrupt reporting mechanism is established, the problem that the operation reliability of the system is influenced when a plurality of optical interfaces report LOS abnormality at the same time is effectively avoided, reporting between the interrupts of each optical interface is not influenced, and the expandability, maintainability and reliability of the optical interfaces are ensured.
Example two
Fig. 4 is a flowchart of an optical interface management method according to a second embodiment of the present invention, where the second embodiment is applicable to optical interface management. Specifically, the optical interface management method may be executed by an optical interface management apparatus, which may be implemented by software and/or hardware and integrated in a programmable logic device of an optical interface management system. The optical port management system further comprises a network device and a plurality of optical ports. It should be noted that technical details that are not described in detail in the present embodiment may be referred to any of the above embodiments.
As shown in fig. 4, the method specifically includes the following steps:
and S110, monitoring the signal state of each optical port according to the value of the register and the register mapping relation.
Wherein, the register mapping relation comprises: a single byte in a register of the programmable logic device corresponds to one signal and a single bit in the single byte corresponds to one optical port; each value of a single bit in the single byte corresponds to a signal state.
And S120, reporting an interrupt signal to network equipment under the condition that the signal state of any one optical port is a preset state.
In the optical interface management method provided by the embodiment of the present invention, by using a programmable logic device and reasonably designing a register mapping relationship, data exchange of multiple optical interfaces and monitoring of multiple signals are realized, expansion of the number of optical interfaces is supported, and management efficiency of multiple optical interfaces is improved.
Optionally, reporting an interrupt signal to the network device when the signal state of any optical port is a preset state, where the reporting includes:
under the condition that any bit in any byte is a first value, determining that the signal state of the corresponding signal of the optical port corresponding to the bit in the byte is an abnormal state, and reporting a first interrupt signal to network equipment;
and under the condition that any bit in any byte is changed into a second value, determining the signal state of the corresponding type signal of the optical port corresponding to the bit in the byte as a recovered normal state, and reporting a second interrupt signal to the network equipment.
Optionally, the method further includes:
receiving a command of the network equipment forwarded by the transfer device, and executing operation on a corresponding optical port according to the command;
and reporting the interrupt signals to the transfer device, wherein the interrupt signals reported by the plurality of programmable logics can be combined by the transfer device and then reported to the network equipment.
Optionally, the signal of each optical port includes an optical module presence signal, an optical signal loss signal, an optical signal failure signal, an optical signal enable signal, and a rate control signal.
Optionally, the method further includes:
receiving a command of a network device;
and analyzing the command to obtain an operation instruction, an optical port corresponding to the operation instruction and optical port data of the optical port, and processing the optical port data of the corresponding optical port according to the operation instruction.
Optionally, the command of the network device includes an address field, a register address field, and an optical interface data field, where the address field is used to determine the type of the operation instruction, the register address field is used to determine an optical interface corresponding to the operation instruction and a register address thereof, and the optical interface data field is used to determine optical interface data carried in the command.
Optionally, processing the optical port data of the corresponding optical port according to the operation instruction includes:
and if the operation instruction is a write instruction, extracting first optical interface data sent by the network equipment from the optical interface data field according to the write instruction, and storing the first optical interface data into a register address of an optical interface corresponding to the register address field.
Optionally, processing the optical port data of the corresponding optical port according to the operation instruction includes:
and if the operation instruction is a read instruction, reading second optical port data from the register address of the optical port corresponding to the register address field according to the read instruction, and carrying the second optical port data in the optical port data field to send the second optical port data to the network equipment.
The optical interface management method provided by the second embodiment of the present invention is applicable to the programmable logic device in the optical interface management system provided by any of the above embodiments, and has corresponding functions and beneficial effects.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an optical port management apparatus according to a second embodiment of the present invention. As shown in fig. 5, the optical port management apparatus includes:
the monitoring module 210 is configured to monitor a signal state of each optical port according to a value of a register and a register mapping relationship;
a reporting module 220, configured to report an interrupt signal to the network device when a signal state of any one of the optical interfaces is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to one signal and a single bit in the single byte corresponds to one optical port; each value of a single bit in the single byte corresponds to a signal state.
The optical port management device provided by the third embodiment of the present invention utilizes the register mapping relationship to implement data exchange of multiple optical ports and monitor multiple signals, supports expansion of the number of optical ports, and improves the management efficiency of multiple optical ports.
On the basis of the above embodiment, the preset state includes an abnormal state and a recovery normal state;
correspondingly, the interrupt signal comprises a first interrupt signal and a second interrupt signal;
the reporting module 220 is specifically configured to: under the condition that any bit in any byte is a first value, determining that the signal state of the corresponding signal of the optical port corresponding to the bit in the byte is an abnormal state, and reporting a first interrupt signal to the network equipment;
and under the condition that any bit in any byte is changed into a second value, determining that the signal state of the corresponding type signal of the optical port corresponding to the bit in the byte is a recovered normal state, and reporting a second interrupt signal to the network equipment.
On the basis of the above embodiment, the receiving module may be configured to receive a command of the network device forwarded by the relay device, and perform an operation on a corresponding optical port according to the command; the reporting module may be configured to report the interrupt signal to the relay device, where the interrupt signal is reported to the network device by the relay device.
On the basis of the above embodiment, the signal of each optical port includes an optical module on-bit signal, an optical signal loss signal, an optical signal failure signal, an optical signal enable signal, and a rate control signal.
On the basis of the above embodiment, the apparatus further comprises:
the receiving module is used for receiving a command of the network equipment;
the analysis module is used for analyzing the command to obtain an operation instruction, an optical port corresponding to the operation instruction and optical port data of the optical port;
and the processing module is used for processing the optical port data of the corresponding optical port according to the operation instruction. On the basis of the foregoing embodiment, the command of the network device includes an address field, a register address field, and an optical interface data field, where the address field is used to determine the type of the operation instruction, the register address field is used to determine an optical interface corresponding to the operation instruction and a register address thereof, and the optical interface data field is used to determine that optical interface data carried in the command is a write instruction on the basis of the foregoing embodiment, and if the operation instruction is a write instruction, the command is a write command if an address in the address field is a first address;
the processing module 230 is specifically configured to extract, according to the write instruction, first optical interface data sent by the network device from the optical interface data field, and store the first optical interface data in a register address of an optical interface corresponding to the register address field.
On the basis of the foregoing embodiment, if the operation instruction is a read instruction, the processing module 230 is specifically configured to read second optical port data from a register address of an optical port corresponding to the register address field according to the read instruction, carry the second optical port data in the optical port data field, and send the second optical port data to the network device.
The optical port management device provided by the third embodiment of the invention can be used for executing the optical port management method provided by any embodiment, and has corresponding functions and beneficial effects.
Example four
Fig. 6 is a schematic diagram of a hardware structure of a programmable logic device according to a second embodiment of the present invention. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the programmable logic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the programmable logic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in programmable logic device 10 are connected to I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the programmable logic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks, wireless networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the optical port management method.
In some embodiments, the optical port management method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto programmable logic device 10 via ROM 12 and/or communications unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the optical port management method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described herein can be implemented on a programmable logic device 10, the programmable logic device 10 having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to programmable logic device 10. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. An optical port management system, comprising: the optical network comprises network equipment, a programmable logic device and a plurality of optical ports;
the programmable logic device is used for monitoring the signal state of each optical port according to the value of a register and the mapping relation of the register, and reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to a signal and a single bit in the single byte corresponds to an optical port; each value of a single bit in the single byte corresponds to a signal state.
2. The system of claim 1, wherein the preset states include an abnormal state and a recovered-to-normal state;
correspondingly, the interrupt signal comprises a first interrupt signal and a second interrupt signal;
the programmable logic device is specifically configured to:
under the condition that any bit in any byte is a first value, determining that the signal state of the corresponding signal of the optical port corresponding to the bit in the byte is an abnormal state, and reporting a first interrupt signal to the network equipment;
and under the condition that any bit in any byte is changed into a second value, determining that the signal state of the corresponding type signal of the optical port corresponding to the bit in the byte is a recovered normal state, and reporting a second interrupt signal to the network equipment.
3. The system of claim 2,
the network device is further configured to query the value of the register when receiving the interrupt signal, and use any optical port in which a bit in the corresponding byte is a second value for communication.
4. The system of claim 1, wherein the number of programmable logic devices is at least two;
the system further comprises:
the relay device is used for analyzing the command of the network equipment to determine a programmable logic device corresponding to the command and forwarding the command to the corresponding programmable logic device so that the corresponding programmable logic device executes operation on the corresponding optical port according to the command;
and the interrupt processing module is also used for merging the interrupt signals of the programmable logic devices into one interrupt signal and reporting the interrupt signal to the network equipment.
5. The system of claim 1, wherein the programmable logic device is further configured to receive a command of the network device, analyze the command to obtain an operation instruction, an optical port corresponding to the operation instruction, and optical port data of the optical port, and process the optical port data of a corresponding optical port according to the operation instruction.
6. The system according to claim 5, wherein the command of the network device includes an address field, a register address field, and an optical interface data field, wherein the address field is used to determine the kind of the operation instruction, the register address field is used to determine an optical interface corresponding to the operation instruction and a register address thereof, and the optical interface data field is used to determine optical interface data carried in the command.
7. The system according to claim 6, wherein if the operation instruction is a write instruction, the programmable logic device is configured to extract first optical port data sent by the network device from the optical port data field according to the write instruction, and store the first optical port data in a register address of an optical port corresponding to the register address field.
8. The system of claim 6, wherein if the operation command is a read command,
and the programmable logic device is used for reading second optical port data from the register address of the optical port corresponding to the register address field according to the reading instruction, carrying the second optical port data in the optical port data field and sending the second optical port data to the network equipment.
9. An optical interface management method is characterized in that the method is applied to a programmable logic device in an optical interface management system, and the optical interface management system also comprises network equipment and a plurality of optical interfaces; the method comprises the following steps:
monitoring the signal state of each optical port according to the value of the register and the mapping relation of the register;
reporting an interrupt signal to the network equipment under the condition that the signal state of any one optical port is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of the programmable logic device corresponds to a signal and a single bit in the single byte corresponds to an optical port; each value of a single bit in the single byte corresponds to a signal state.
10. An optical port management device, comprising:
the monitoring module is used for monitoring the signal state of each optical port according to the value of the register and the register mapping relation;
a reporting module, configured to report an interrupt signal to a network device when a signal state of any one of the optical interfaces is a preset state;
wherein the register mapping relationship comprises: a single byte in a register of a programmable logic device corresponds to one signal and a single bit in the single byte corresponds to one optical port; each value of a single bit in the single byte corresponds to a signal state.
11. A programmable logic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the optical port management method of claim 9.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the optical port management method according to claim 9.
CN202210752785.2A 2022-06-28 2022-06-28 Optical interface management system, method, device, programmable logic device and storage medium Pending CN115168141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210752785.2A CN115168141A (en) 2022-06-28 2022-06-28 Optical interface management system, method, device, programmable logic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210752785.2A CN115168141A (en) 2022-06-28 2022-06-28 Optical interface management system, method, device, programmable logic device and storage medium

Publications (1)

Publication Number Publication Date
CN115168141A true CN115168141A (en) 2022-10-11

Family

ID=83489326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210752785.2A Pending CN115168141A (en) 2022-06-28 2022-06-28 Optical interface management system, method, device, programmable logic device and storage medium

Country Status (1)

Country Link
CN (1) CN115168141A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117687943A (en) * 2024-02-04 2024-03-12 浪潮电子信息产业股份有限公司 Acceleration device, heterogeneous computing architecture and data processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117687943A (en) * 2024-02-04 2024-03-12 浪潮电子信息产业股份有限公司 Acceleration device, heterogeneous computing architecture and data processing method
CN117687943B (en) * 2024-02-04 2024-05-14 浪潮电子信息产业股份有限公司 Acceleration equipment, heterogeneous computing architecture-based system and data processing method

Similar Documents

Publication Publication Date Title
TWI618380B (en) Management methods, service controller devices and non-stransitory, computer-readable media
US20140068134A1 (en) Data transmission apparatus, system, and method
CN103955441B (en) Equipment management system, equipment management method and IO (Input/Output) expansion interface
CN113645047B (en) Out-of-band management system and server based on intelligent network card
CN104899170A (en) Distributed intelligent platform management bus (IPMB) connection method and ATCA (Advanced Telecom Computing Architecture) machine frame
CN103838698A (en) I2C bus architecture and device availability query method
CN106375103B (en) Alarm data acquisition and transmission method
CN116150051A (en) Command processing method, device and system
CN115168141A (en) Optical interface management system, method, device, programmable logic device and storage medium
CN115794313A (en) Virtual machine debugging method, system, electronic equipment and storage medium
CN106873545A (en) A kind of real-time multiprocessors system based on FPGA
CN103092735A (en) Method for updating node states
CN101488105B (en) Method for implementing high availability of memory double-controller and memory double-controller system
CN110445700A (en) Slave communication system, method and terminal device
CN113658351A (en) Product production method and device, electronic equipment and storage medium
CN112596371A (en) Control card switching method and device, electronic equipment and storage medium
CN101072088A (en) Data backup system, main board and data backup method
TW201424295A (en) Apparatus and method for monitoring signals transmitted in bus
CN110609762B (en) Method and device for preventing advanced high performance bus (AHB) from deadlock
CN116723198A (en) Multi-node server host control method, device, equipment and storage medium
CN115729164B (en) Industrial communication system management method and device and industrial communication system
CN203658991U (en) Computer evidence obtaining system
CN114201439B (en) Server signal identification optimization method, system and storage medium
CN115509333A (en) Server collaborative power-on and power-off device, method, system and medium
CN109656609A (en) A kind of industrial control host and the method for on-line checking tool unperturbed downloading more new procedures

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