Optical module information reading method and device and related equipment
By introducing programmable logic devices and memory virtualized optical module data transmission in silicon optical switches, the problem of low serial access efficiency of MCU optical module information is solved, and parallel access and software complexity are achieved.
Patent Information
- Application Number
- CN202510377421.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-04
AI Technical Summary
The access efficiency of optical module information of MCUs in silicon optical switches is low. In the prior art, the optical module information stored in the EEPROM of MCUs can only be accessed serially, resulting in low access efficiency.
By setting up programmable logic devices between the CPU and the MCU, the optical module information of each MCU periodically synchronizes the memory blocks and realizes parallel access through DMA to reduce the software time complexity.
Parallel access to optical module information in the MCU is realized, reducing access time consumption and software complexity, and improving access efficiency.
Smart Images

Figure CN120264173A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technologies, and in particular, to a method and device for reading optical module information and related equipment. Background Art
[0002] The design solution of a silicon photonics switch is favored by the market for its hardware advantages of low latency and low cost. However, the access method of software port data in the current solution has disadvantages compared with general switches.
[0003] For example, the port-side design solution of a silicon photonics switch shows that 64 800G optical channels are controlled by 8 MCUs (Microcontroller Units), and the EEPROM (Electrically Erasable Programmable Read-Only Memory) of one MCU stores 6.4T of optical channel information, corresponding to the information of 8 800G optical modules. Normally, the information of 8 800G optical modules is stored in 8 EEPROMs and can be accessed in parallel, and the up status of 8 ports is not affected by each other. However, there is only one EEPROM in the MCU, and the corresponding 8 ports can only be accessed serially, resulting in low access efficiency. Summary of the Invention
[0004] This application provides a method and device for reading optical module information and related equipment.
[0005] In a first aspect, this application provides a method for reading optical module information, which is applied to a switching device. The switching device includes a CPU and several MCUs, and a programmable logic device is arranged between the CPU and the MCUs. The method includes:
[0006] The CPU sends a synchronization task for synchronizing the optical module information of each optical module included in each MCU to the programmable logic device;
[0007] Based on the synchronization task, the programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for the MCU;
[0008] When the CPU receives a request to read the optical module information of each optical module included in the target MCU, it reads the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU.
[0009] Optionally, the method further includes:
[0010] The programmable logic device pre-applies a corresponding memory block for each optical module included in each MCU.
[0011] Optionally, the step of the programmable logic device synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU periodically based on the synchronization task includes:
[0012] The programmable logic device synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for the optical module periodically.
[0013] Optionally, an optical module information maintained in the memory includes a check field, a public data field, and a private data field, wherein the check field is used to identify whether the optical module information is the latest information.
[0014] Optionally, the step of synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU periodically includes:
[0015] Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the MCU by means of DMA.
[0016] In a second aspect, the present application provides an optical module information reading device, which is applied to a switching device. The switching device includes a CPU and several MCUs, and a programmable logic device is arranged between the CPU and the MCUs; the device includes:
[0017] A sending unit, configured to send a synchronization task of synchronizing the optical module information of each optical module included in each MCU to the programmable logic device;
[0018] A synchronization unit, configured to synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the MCU periodically based on the synchronization task;
[0019] A reading unit, configured to read the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU when receiving a request for reading the optical module information of each optical module included in the target MCU.
[0020] Optionally, the device further includes:
[0021] An application unit, configured to apply for corresponding memory blocks for each optical module included in each MCU in advance.
[0022] Optionally, when synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU periodically based on the synchronization task, the synchronization unit is specifically configured to:
[0023] Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the optical module.
[0024] Optionally, an optical module information maintained in memory includes a check field, a public data field, and a private data field, where the check field is used to identify whether the optical module information is the latest information.
[0025] Optionally, when periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU, the synchronization unit is specifically configured to:
[0026] Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the MCU by means of DMA.
[0027] In a third aspect, an embodiment of the present application provides an optical module information reading device, which includes:
[0028] A memory for storing program instructions;
[0029] A processor for calling the program instructions stored in the memory and executing the steps of the method according to any one of the above first aspects according to the obtained program instructions.
[0030] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions for causing the computer to execute the steps of the method according to any one of the above first aspects.
[0031] In summary, the optical module information reading method provided by the embodiment of the present application is applied to a switching device, where the switching device includes a CPU and a plurality of MCUs, and a programmable logic device is provided between the CPU and the MCUs; the method includes: the CPU sends a synchronization task for synchronizing the optical module information of each optical module included in each MCU to the programmable logic device; the programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for the MCU based on the synchronization task; when the CPU receives a request to read the optical module information of each optical module included in the target MCU, the CPU reads the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU.
[0032] By using the optical module information reading method provided by the embodiment of the present application, the optical module information of each optical module included in each MCU is pre-synchronized to the memory. In this way, when the CPU reads the information of the target optical module subsequently, it only needs to read from the memory, realizing parallel memory access-level optical module information reading. Through the programmable logic device and memory virtualization optical module data transmission, the software time complexity is reduced. It solves the problem that the data of each optical module in the MCU cannot be accessed in parallel, resulting in low access efficiency. Description of the Drawings
[0033] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments of the present application or the prior art. Obviously, the drawings described below are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0034] Figure 1 It is a detailed flowchart of a method for reading optical module information provided by an embodiment of the present application;
[0035] Figure 2 It is a detailed flowchart of a method for reading optical module information provided by an embodiment of the present application;
[0036] Figure 3 It is a schematic diagram of the data structure of optical module information provided by an embodiment of the present application;
[0037] Figure 4 It is a schematic diagram of a process for reading optical module information provided by an embodiment of the present application;
[0038] Figure 5 It is a schematic diagram of the structure of a device for reading optical module information provided by an embodiment of the present application;
[0039] Figure 6 It is a schematic diagram of the hardware architecture of a device for reading optical module information provided by an embodiment of the present application. Detailed implementation manners
[0040] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and do not limit the present application. The singular forms "a", "the" and "said" used in the present application and the claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more of the associated listed items.
[0041] It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" may be interpreted as "when" or "while" or "in response to a determination".
[0042] Currently, a gating chip device is added between the CPU and 8 MCUs. On the one hand, it can replace the CPU to implement the port I2C controller, reducing the CPU resource consumption. On the other hand, the gating chip device controls the parallel access between the MCUs connected to 8 I2Cs through gating.
[0043] However, although the gating chip device enables parallelism between MCUs, it cannot optimize the fact of serial access to the EEPROM inside the MCU. Which 800G data information inside the MCU needs to be accessed is distinguished by the way of bank switching. According to the CMIS 5.2 protocol, at least 40ms of waiting is required for each operation. Compared with the traditional optical module access, it increases the software complexity and time consumption.
[0044] Exemplarily, refer to Figure 1 As shown, it is a schematic diagram of port polling in the related art; the traditional port polls 64 800G optical module information. Because it can operate in parallel, the time consumption is to access 1 800G optical module, assumed to be 500ms. And the prior art polls all the MCU information (64 800G optical module information). Due to the serial operation inside the MCU, the time consumption is 8 800G optical modules and 7 bank switches, totaling 4280ms.
[0045] The embodiment of the present application provides a technical solution for data transmission between a programmable logic device and a memory virtualized optical module, reducing the software time complexity.
[0046] Exemplarily, refer to Figure 2 As shown, it is a detailed flowchart of a method for reading optical module information provided by the embodiment of the present application. This method is applied to a switching device, and the switching device includes a CPU and several MCUs. A programmable logic device is arranged between the CPU and the MCU; this method includes the following steps:
[0047] Step 200: The CPU sends a synchronization task to the programmable logic device to synchronize the optical module information of each optical module included in each MCU.
[0048] In practical applications, after an external light source is inserted into the switching device, the hardware in-position pin is pulled low, thus triggering a software terminal. After the CPU of the switching device senses this terminal, it sends a periodic task to the programmable logic device, and this periodic task is used to instruct the programmable logic device to periodically synchronize the optical module information of each optical module included in each MCU.
[0049] In the embodiment of the present application, before executing step 200, the above method for reading optical module information may further include the following steps:
[0050] The programmable logic device has pre-applied corresponding memory blocks for each optical module included in each MCU.
[0051] That is to say, the programmable logic device applies for corresponding memory blocks for each MCU from the memory of the switching device. Or rather, for each optical module included in each MCU, a corresponding memory block is applied for.
[0052] The memory block corresponding to one MCU is used to store the optical module information of each optical module included in this MCU; the memory block corresponding to one optical module is used to store the optical module information of this optical module.
[0053] Step 210: Based on the synchronization task, the programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for this MCU.
[0054] In the embodiment of the present application, when periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for this MCU, a preferred implementation manner is:
[0055] Through the DMA method, periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for this MCU.
[0056] When the programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for this MCU, a preferred implementation manner is:
[0057] The programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for this optical module.
[0058] Specifically, the programmable logic device synchronizes the EEPROM information of 8 MCUs to the agreed memory address periodically through the DMA method. Among them, the EEPROM information of each block is divided into 8 groups of memory blocks connected end to end. That is to say, the large memory block corresponding to one MCU includes 8 groups of memory blocks corresponding to optical modules.
[0059] In practical applications, taking the size of each group of memory blocks set to 2048 bytes as an example. At the start of accessing the nth port (optical module), the DMA base address + (n - 1) * 2048 can be directly accessed to reduce the consumption of accessing the port by switching banks.
[0060] In the embodiment of the present application, refer to Figure 3 As shown, it is a schematic diagram of the optical module information data structure provided by the embodiment of the present application; an optical module information maintained in the memory includes a check field, a public data field, and a private data field. Among them, the check field is used to identify whether this optical module information is the latest information.
[0061] At the beginning of each update cycle, set the check field included in the optical module information in the memory block to a first value, where the first value is used to identify that the optical module information is not the latest information. During this update cycle, when the latest optical module information is obtained from the MCU and written to the corresponding memory block, set the check field to a second value, where the second value is used to identify that the optical module information is the latest.
[0062] Step 220: When the CPU receives a request to read the optical module information of each optical module included in the target MCU, read the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU.
[0063] In this way, when the CPU receives a request triggered by the user to read the optical module information of each optical module included in the target MCU, it only needs to directly read the required data from the memory according to the recorded starting memory address and size corresponding to the target MCU.
[0064] Furthermore, the CPU can also maintain the starting memory address information of the optical module information of each optical module, as well as the starting memory address information of various types of attribute data in the optical module information of each optical module, so as to meet the needs of various types of rapid data reading.
[0065] Next, the optical module information reading process provided by the embodiments of the present application will be described in detail in combination with a specific application scenario. Exemplarily, refer to Figure 4 As shown, it is a schematic diagram of an optical module information reading process provided by an embodiment of the present application; the programmable logic device synchronizes the optical module information of each optical module included in each MCU to the memory through the DMA method. When the CPU polls the diagnostic information (temperature, voltage, optical reception and transmission, etc.) of PORT 1 (such as optical module 1), directly access the memory DMA base address + (n - 1) * 2048 (n = 1) to obtain whether the check bit information is normal. If the check is incorrect, wait for 50 ms and then read again (50 ms is the time interval for the programmable logic device to write data to the memory through DMA (which can be customized according to the application scenario / requirements)). If the check is still incorrect, return failed and locate and troubleshoot the cause. If the check is successful, directly access the memory to read the diagnostic information according to the recorded memory address corresponding to PORT1.
[0066] Exemplarily, refer to Figure 5 As shown, it is a schematic structural diagram of an optical module information reading device provided by an embodiment of the present application. The device is applied to a switching device, and the switching device includes a CPU and several MCUs. A programmable logic device is provided between the CPU and the MCU; the device includes:
[0067] A sending unit 50, configured to send a synchronization task for synchronizing the optical module information of each optical module included in each MCU to the programmable logic device;
[0068] A synchronization unit 51, configured to periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the MCU based on the synchronization task;
[0069] A reading unit 52, configured to read the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU when receiving a request to read the optical module information of each optical module included in the target MCU.
[0070] Optionally, the apparatus further includes:
[0071] An application unit, configured to apply for corresponding memory blocks for each optical module included in each MCU in advance.
[0072] Optionally, when periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU based on the synchronization task, the synchronization unit 51 is specifically configured to:
[0073] Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the optical module.
[0074] Optionally, an optical module information maintained in the memory includes a check field, a public data field, and a private data field, where the check field is used to identify whether the optical module information is the latest information.
[0075] Optionally, when periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for the MCU based on the synchronization task, the synchronization unit 51 is specifically configured to:
[0076] Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for the MCU in a DMA manner.
[0077] The above units may be one or more integrated circuits configured to implement the above methods. For example: one or more Application Specific Integrated Circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0078] Furthermore, for the optical module information reading device provided in the embodiments of the present application, from a hardware perspective, the schematic diagram of the hardware architecture of the optical module information reading device can be seen in Figure 6 as shown. The... device may include: a memory 60 and a processor 61,
[0079] The memory 60 is used to store program instructions; the processor 61 calls the program instructions stored in the memory 60 and executes the above method embodiments according to the obtained program instructions. The specific implementation manners and technical effects are similar and will not be elaborated here.
[0080] Optionally, the present application further provides a switching device, including at least one processing element (or chip) for executing the above method embodiments.
[0081] Optionally, the present application further provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions for causing the computer to execute the above method embodiments.
[0082] Here, the machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and so on. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
[0083] The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or a combination of any several of these devices.
[0084] For convenience of description, when describing the above devices, they are described as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in one or more software and / or hardware.
[0085] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0086] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0087] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the process Figure 1 in one process or multiple processes and / or blocks Figure 1 steps for the functions specified in one block or multiple blocks.
[0089] The foregoing is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for reading optical module information, characterized in that Applied to a switching device, the switching device includes a CPU and a plurality of MCUs, and a programmable logic device is arranged between the CPU and the MCUs; the method includes: The CPU sends a synchronization task of synchronizing the optical module information of each optical module included in each MCU to the programmable logic device; Based on the synchronization task, the programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for this MCU; When the CPU receives a request to read the optical module information of each optical module included in the target MCU, it reads the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU.
2. The method according to claim 1, characterized in that, The method further includes: The programmable logic device pre-applies a corresponding memory block for each optical module included in each MCU.
3. The method according to claim 2, characterized in that, The step of the programmable logic device periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for this MCU includes: The programmable logic device periodically synchronizes the optical module information of each optical module included in each MCU to the memory block allocated for this optical module.
4. The method according to any one of claims 1 to 3, characterized in that, An optical module information maintained in the memory includes a check field, a public data field, and a private data field, wherein the check field is used to identify whether the optical module information is the latest information.
5. The method according to claim 4, wherein The step of periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for this MCU includes: Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for this MCU by means of DMA.
6. An optical module information reading device, characterized in that, Applied to a switching device, the switching device includes a CPU and a plurality of MCUs, and a programmable logic device is arranged between the CPU and the MCUs; the device includes: A sending unit, configured to send a synchronization task of synchronizing the optical module information of each optical module included in each MCU to the programmable logic device; A synchronization unit, configured to periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for this MCU based on the synchronization task; A reading unit, configured to, when receiving a request to read the optical module information of each optical module included in the target MCU, read the optical module information of each optical module included in the target MCU from the memory block allocated for the target MCU.
7. The device according to claim 6, characterized in that, The device further includes: An application unit, configured to pre-apply a corresponding memory block for each optical module included in each MCU.
8. The device according to claim 7, characterized in that, When periodically synchronizing the optical module information of each optical module included in each MCU to the memory block allocated for this MCU based on the synchronization task, the synchronization unit is specifically configured to: Periodically synchronize the optical module information of each optical module included in each MCU to the memory block allocated for this optical module.
9. An optical module information reading device, characterized in that, The optical module information reading device includes: A memory, configured to store program instructions; A processor, configured to call the program instructions stored in the memory and execute the steps of the method according to any one of claims 1-5 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method according to any one of claims 1-5.