Bus switching control method, device, system and equipment for optical module test
By obtaining the presence status and test request type of the optical module under test in the optical module test equipment, the corresponding channel switching signal is generated, and the analog switch chip is controlled to switch to the external bus or the internal bus, solving the problem that the optical module under test can only be connected to two The problem of establishing a communication connection with one of the hosts avoids the hang state and improves the experience of using the test equipment.
Patent Information
- Application Number
- CN202411379159.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
When the existing optical module test equipment expands the test project, the optical module to be metered can only establish a communication connection with one of the two hosts of dongle/controller, resulting in a dead state during the test and cannot be tested.
By obtaining the presence status and test request type of the optical module under test in the optical module test equipment, the corresponding channel switching signal is generated, and the analog switch chip is controlled to switch to the external bus or internal bus to ensure that different hosts can access the optical module for performance testing.
It effectively avoids downtime caused by conflicts between external hosts and internal hosts on the IIC bus, and improves the use experience and device versatility of optical module testing equipment.
Smart Images

Figure CN119336680A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of optical modules, and specifically relates to a bus switching control method, device, system and equipment for optical module testing. Background Art
[0002] The Inter-Integrated Circuit (IIC) bus is a serial communication protocol used for communication between various integrated circuits, such as sensors, memories, displays, etc. The IIC bus generally includes a serial data line (SDA) and a serial clock line (SCL). The SDA line is used to transmit data between the master device and the slave device. Through the SDA line, data is transmitted in a serial manner, either from the master device to the slave device or from the slave device to the master device. The SCL line is used to synchronize data transmission between the master device and the slave device. In IIC communication, the data transmission rate is controlled by the clock signal on the SCL line. The master device sends a clock signal to the slave device through the SCL line to ensure synchronous data transmission.
[0003] The basic working principle of IIC bus includes the following processes:
[0004] Start signal: When SCL is high, SDA changes from high to low, indicating the beginning of the start signal. At this time, the bus is considered to be in a busy state;
[0005] Send address and data: The host sends the hardware address and read / write bit (R / W) of the slave. If the slave address matches and the R / W bit is correct, the slave will generate an acknowledgement signal (ACK). Subsequently, the host can send data or commands;
[0006] Acknowledgement signal: After sending each byte of data, the host needs to wait for the slave to give an acknowledgement signal (ACK or NACK) to confirm whether the data is successfully received.
[0007] Stop signal: When SCL is high, SDA changes from low to high, indicating the start of the stop signal. At this time, the bus is considered to be in an idle state.
[0008] Obviously, the characteristics of the IIC bus determine that in the case of multiple master devices, bus conflicts need to be avoided, and an arbitration mechanism is used to ensure that only one master device controls the bus. Common conflict scenarios include host A establishing bus communication with slave B, but host C also mounts the IIC pin to the bus port of slave B. In this scenario, it is easy to cause both host A and host C to be unable to communicate with slave B, and the entire bus is in a dead state.
[0009] The IIC bus pins of the existing optical module test equipment are open to the outside, allowing users to insert the optical module to be tested to perform various optical module performance tests, such as error performance test and eye diagram test. In view of the current situation that the expansion of new test items for optical module test equipment requires the additional development of dongle drivers, hardware interfaces and test codes, the usual practice is to set up two hosts, dongle / controller, and at a certain moment one of the two hosts has communication access to the optical module to be tested, where the controller is the host fixedly configured for the test equipment, that is, the internal host, the dongle is the external host, and the optical module to be tested is the above-mentioned slave. In this way, the problem of limited test equipment items and high test item expansion costs can be solved. However, the problem that follows is that the optical module to be tested can only establish a communication connection with one of the two hosts, dongle / controller, at the same time to achieve testing. If the above-mentioned hanging state occurs during the test process, the test cannot be performed. Summary of the invention
[0010] The present application aims to solve at least one of the technical problems existing in the prior art, and discloses a bus switching control method, device, system and equipment for optical module testing, which can effectively implement the implementation of expanded test items based on the original test equipment and effectively improve the versatility and utilization rate of the equipment.
[0011] In a first aspect, the present application provides a bus switching control method for optical module testing, wherein the bus includes an internal bus and an external bus, and the method includes:
[0012] Obtaining the in-place status of the optical module to be tested in the optical module testing device;
[0013] Obtaining a test request type of the optical module testing device;
[0014] Obtaining a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type;
[0015] The channel switching signal is sent to the analog switch chip, so that the analog switch chip switches to the external bus to establish a communication connection with an external host, or switches to the internal bus to establish a communication connection with an internal host based on the channel switching signal.
[0016] In some possible embodiments, obtaining the in-place status of the optical module to be tested in the optical module testing device includes:
[0017] Get the in-place signal ModPrsl in the CMIS protocol pin in real time;
[0018] Determine whether the ModPrsl at any first moment is a high level;
[0019] If yes, determine whether the ModPrsl at the second moment is a low level, the second moment being a sampling moment after the first moment;
[0020] If so, it is determined that the in-position state of the optical module to be tested is in-position.
[0021] In some possible embodiments, the optical module testing device is provided with an external interface card, and the external interface card is provided with an external bus interface;
[0022] The obtaining of the test request type of the optical module test device includes:
[0023] Acquire the interface signal of the external bus interface in real time;
[0024] Determine whether the interface signal at any first moment is at a high level;
[0025] If yes, determining whether the interface signal at a second moment is at a low level, the second moment being a sampling moment after the first moment;
[0026] If so, it is determined that the test request type of the optical module test device is an external test request.
[0027] In some possible embodiments, the external interface board is further provided with a switching switch;
[0028] After determining that the test request type of the optical module test device is an external test request, obtaining the test request type of the optical module test device further includes:
[0029] If the interface signal at the second moment is at a low level and the on signal of the switch is received, it is secondarily determined that the test request type is an external test request.
[0030] In some possible embodiments, the optical module testing device is further provided with a protection panel covering the external interface board, and one of the protection panel and the external interface board is provided with a distance detection sensor;
[0031] The obtaining of the test request type of the optical module test device further includes:
[0032] Acquire a first distance detection signal and a second distance detection signal fed back by the distance detection sensor at a first sampling moment and a second sampling moment respectively; wherein the second sampling moment is a sampling moment after the first moment;
[0033] The first distance detection signal and the second distance detection signal are compared, and when the two are inconsistent, it is determined that the test request type is an external test request.
[0034] In some possible embodiments, the method further includes:
[0035] Obtaining the communication duration of the communication connection between the external bus and the external host;
[0036] The communication duration is compared with a duration threshold, and if the communication duration exceeds the duration threshold, a channel switching signal is generated so that the analog switch chip switches to the internal bus based on the channel switching signal to establish a communication connection with the internal host.
[0037] In a second aspect, an embodiment of the present application provides a bus switching control device for optical module testing, wherein the bus includes an internal bus and an external bus, and the device includes:
[0038] A first acquisition module, used for acquiring the in-place status of the optical module to be tested in the optical module testing device;
[0039] A second acquisition module is used to obtain a test request type of the optical module test device;
[0040] A processing module, used for obtaining a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type;
[0041] The switching module is used to send the channel switching signal to the analog switch chip, so that the analog switch chip switches to the external bus to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host based on the channel switching signal.
[0042] In a third aspect, an embodiment of the present application provides a bus switching control system for optical module testing, wherein the bus includes an internal bus and an external bus, and the system includes: an internal host, an external interface card, an analog switch chip, and a test board, wherein the test board is provided with an optical module to be tested;
[0043] The internal host is used to respectively obtain the in-position state and the test request type of the optical module to be tested, and generate a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type;
[0044] The analog switch chip is used to switch to an external bus to establish a communication connection with an external host, or to switch to an internal bus to establish a communication connection with an internal host based on the channel switching signal.
[0045] In a fourth aspect, an embodiment of the present application provides an optical module testing device, which adopts the bus switching control method described above, or includes the bus switching control device described above, or includes the bus switching control system described above.
[0046] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0047] one or more processors;
[0048] A storage unit is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors can implement the bus switching control method described above.
[0049] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the bus switching control method described above can be implemented.
[0050] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, can implement the bus switching control method described above.
[0051] Beneficial effects:
[0052] The embodiments of the present application provide a bus switching control method, device, system and equipment for optical module testing. The method first obtains the in-place status and test request type of the optical module to be tested of the optical module testing equipment respectively, and then obtains the corresponding channel switching signal according to the in-place status and the test request type, so that the analog switch chip switches to the external bus based on the channel switching signal to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host, so that different hosts can access the optical module to implement the performance test of the optical module, which can effectively avoid the downtime caused by the conflict between the external host and the internal host on the IIC bus, and improve the user experience of the optical module testing equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0054] Figure 1 This is a flow chart of a bus switching control method for optical module testing according to an embodiment of the present application;
[0055] Figure 2A schematic diagram of an external interface board of an optical module testing device according to an embodiment of the present application;
[0056] Figure 3 A specific flow chart of a bus switching control method for optical module testing according to an embodiment of the present application;
[0057] Figure 4 This is a structural schematic diagram of a bus switching control device for optical module testing according to an embodiment of the present application;
[0058] Figure 5 This is a schematic diagram of the structure of a bus switching control system for optical module testing according to an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0060] Unless otherwise specified, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the application belongs. The "include" or "comprising" used in the embodiments of the present application neither limit the shapes, numbers, steps, actions, operations, components, originals and / or their groups mentioned, nor exclude the occurrence or addition of one or more other different shapes, numbers, steps, actions, operations, components, originals and / or their groups, or add these. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity and order of the indicated technical features. Thus, the features defined as "first" and "second" can expressly or implicitly include one or more of these features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0061] Unless otherwise specifically stated, the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship, and the techniques, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but where appropriate, the techniques, methods and devices shown should be considered as part of the authorization specification. In all examples shown and discussed here, any specific other examples may have different values. It should be noted that similar symbols and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0062] In the description of the embodiments of the present application, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the embodiments of the present application, the schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in the embodiments of the present application and the features of the different embodiments or examples, without contradicting each other.
[0063] Figure 1 This is a flow chart of a bus switching control method for optical module testing according to an embodiment of the present application.
[0064] like Figure 1 As shown, a bus switching control method for optical module testing, the bus includes an internal bus and an external bus, the internal bus and the external bus can be IIC buses, and this embodiment takes the IIC bus as an example for description. The method includes the following steps S101 to S104:
[0065] Step S101: obtaining the in-place status of the optical module to be tested in the optical module testing equipment.
[0066] Specifically, in this step, the optical module in-place status of the optical module testing equipment includes the optical module in-place and the optical module offline. The so-called optical module in-place means that the optical module is inserted into the test board of the optical module testing equipment, and correspondingly, the so-called optical module offline means that the optical module is detached from the test board of the optical module testing equipment.
[0067] It should be noted that there is no limitation on how to determine the in-place status of the optical module of the optical module testing device. For example, a position sensor or a proximity sensor can be set on the optical module testing device. When the optical module is inserted into a predetermined position of the optical module testing device, such as a test board on the testing device, the relevant sensor will send a detection signal to determine the in-place status of the optical module of the optical module testing device. Of course, in addition to this, those skilled in the art can also use other methods to determine the status of the optical module of the optical module testing device, and this embodiment does not limit this.
[0068] Step S102: Acquire the test request type of the optical module testing device.
[0069] Specifically, in this step, the test request types of the optical module test device include internal test requests and external test requests. The so-called internal test request means: when the optical module is in place, the optical module is tested using the internal host built into the optical module test device; the so-called external test request means: when the optical module is in place, the optical module is tested using an external host connected to the optical module.
[0070] Step S103: obtaining a corresponding channel switching signal based on the in-position status of the optical module to be tested and the test request type.
[0071] Specifically, in this step, different channel switching signals can be obtained according to the in-position state of the optical module to be tested and the test request type. For example, when the optical module to be tested is in position and the test request type is an internal test request, the channel switching signal is an internal channel switching signal. Correspondingly, when the optical module to be tested is in position and the test request type is an external test request, the channel switching signal is an external channel switching signal.
[0072] Step S104: sending the channel switching signal to the analog switch chip, so that the analog switch chip switches to the external bus to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host based on the channel switching signal.
[0073] Specifically, in this step, after the channel switching signal is sent to the analog switch chip, as described in the above step S103, if the channel switching signal is an internal channel switching signal, it switches to the internal bus to establish a communication connection with the internal host; conversely, if the channel switching signal is an external channel switching signal, it switches to the external bus to establish a communication connection with the external host.
[0074] The bus switching control method for optical module testing in the embodiment of the present application first obtains the in-place status and test request type of the optical module to be tested of the optical module testing equipment, and then obtains the corresponding channel switching signal according to the in-place status and the test request type, so that the analog switch chip switches to the external bus based on the channel switching signal to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host, so that different hosts can access the optical module to implement performance testing of the optical module, which can effectively avoid downtime caused by conflicts between the external host and the internal host on the IIC bus, and improve the user experience of the optical module testing equipment.
[0075] In some embodiments, obtaining the in-position state of the optical module to be tested in the optical module testing device includes: obtaining the in-position signal ModPrsl in the CMIS protocol pin in real time; judging whether the ModPrsl is at a high level at any first moment; if so, judging whether the ModPrsl is at a low level at a second moment, the second moment being a sampling moment after the first moment; if so, determining that the in-position state of the optical module to be tested is in-position.
[0076] Specifically, in this step, manufacturers of optical modules will follow the MSA / CMIS protocol, and the SDA / SCL in the IIC bus belongs to the bus pins in the CMIS protocol. After the optical module is inserted into the device, the optical module will flip the level of the in-place signal ModPrsl in the CMIS protocol pin to low, that is, from a high-level signal to a low-level signal, indicating that the optical module is in place. Therefore, based on this working principle, the information of the in-place signal ModPrsl level flip can be used as a natural signal quantity to realize the in-place notification of the optical module.
[0077] The bus switching control method for optical module testing of the embodiment of the present application can detect the change immediately through the in-place signal when the optical module is inserted into or removed from the optical module testing device, thereby providing instant status feedback so as to switch between the internal bus and the external bus in time according to different test requests. In addition, the present application does not need to add other detection hardware, thereby effectively reducing costs.
[0078] In some embodiments, the optical module testing device is provided with an external interface board, and the external interface board is provided with an external bus interface; obtaining the test request type of the optical module testing device includes: obtaining the interface signal of the external bus interface in real time; judging whether the interface signal at any first moment is a high level; if so, judging whether the interface signal at a second moment is a low level, and the second moment is a sampling moment after the first moment; if so, determining that the test request type of the optical module testing device is an external test request.
[0079] Specifically, in this step, refer to Figure 2 , Figure 2 This is a schematic diagram of an external interface board of an optical module test device according to an embodiment of the present application. Figure 2 As shown, the optical module test equipment is provided with an external interface card 200, and the pins of the external interface card 200 are electrically connected to the pins on the test board in the optical module test equipment. The external interface card 200 is provided with an external bus interface 201. When the external bus is inserted into the external bus interface 201, the IO port used to detect whether it is inserted will be pulled down, so based on this level signal, it can be identified whether the external bus is inserted into the external bus interface.
[0080] The bus switching control method for optical module testing in the embodiment of the present application can be easy for users to operate through the external interface board that is set up, and it is convenient for users to plug the external bus into the external bus interface on the external interface board, so that the test request type can be determined according to the status of the external bus interface.
[0081] In some embodiments, Figure 2 As shown, the external interface board 200 is also provided with a switching switch 202. After determining that the test request type of the optical module test device is an external test request, obtaining the test request type of the optical module test device also includes: if the interface signal at the second moment is a low level and the on signal of the switching switch is received, then the test request type is secondarily determined to be an external test request.
[0082] Specifically, in this embodiment, considering that users may sometimes forget to operate, for example, the external bus is left hanging on the external bus interface 201 and is forgotten to be removed, and the IIC bus is inadvertently occupied, a switching switch 202 is added next to the external bus interface 201. After determining that the test request type of the optical module test device is an external test request, it is necessary to finally confirm the test request type based on the signal of the switching switch 202, that is, the interface signal at the second moment is a low level and the on signal of the switching switch is received, then the test request type is determined for the second time to be an external test request, which can forcibly guide the user to confirm the behavior and avoid the empty hanging phenomenon.
[0083] In some embodiments, the optical module testing device is also provided with a protective panel covering the external interface board, and one of the protective panel and the external interface board is provided with a distance detection sensor; the obtaining of the test request type of the optical module testing device also includes: obtaining a first distance detection signal and a second distance detection signal fed back by the distance detection sensor at a first sampling moment and a second sampling moment, respectively; wherein the second sampling moment is a sampling moment after the first moment; comparing the first distance detection signal and the second distance detection signal, and when the two are inconsistent, determining that the test request type is an external test request.
[0084] Specifically, in the embodiment of the present application, in order to protect the interface on the external interface board, a protection panel needs to be provided on the external interface board to prevent the interface from being contaminated by external foreign matter, etc. When the user needs to operate the interface on the external interface board, he needs to open the protection panel and then operate the interface on the external interface board. Obviously, during the process of the user opening the protection panel, the relative distance between the protection panel and the external interface board will change, so this phenomenon can be used to determine the test request type mentioned above.
[0085] Furthermore, the embodiment of the present application monitors the above-mentioned distance change through the distance detection sensor that is set up. The distance detection sensor can be set on the side of the external interface board facing the protective panel, or the distance detection sensor can also be set on the side of the protective panel facing the external interface board. Of course, when the protective panel is a transparent protective panel, the distance detection sensor can also be set on the side of the protective panel away from the external interface board, and so on. The embodiment of the present application does not specifically limit this.
[0086] In some embodiments, the method also includes: obtaining the communication duration of the communication connection between the external bus and the external host; comparing the communication duration with a duration threshold, and if the communication duration exceeds the duration threshold, generating a channel switching signal so that the analog switch chip switches to the internal bus based on the channel switching signal to build a communication connection with the internal host.
[0087] Specifically, in the embodiment of the present application, by adding a timeout mechanism, that is, monitoring the communication duration of the connection between the external host and the optical module, when the duration obviously exceeds the conventional test duration, the internal host of the device can issue a timeout prompt. If there is no response, it is deemed that the user has completed the test. The internal host of the device will forcibly seize the control of the external host and switch the control of the IIC bus back to the internal host, thereby avoiding the occurrence of idle hanging phenomenon.
[0088] Figure 3This is a specific flow chart of the bus switching control method for optical module testing in an embodiment of the present application. Figure 3 The bus switching control method of the embodiment of the present application is described in detail.
[0089] like Figure 3 As shown, the optical module test equipment is in standby state at the beginning. When the in-position signal ModPrsl is detected to be 0, it enters the default working state, otherwise it is always in standby state. In the default working state, the device host enables the IIC pin and establishes a communication connection with the optical module through the internal bus. At this time, if the switch is not detected to be pressed, the internal host and the optical module perform master-slave communication and read-write access; if the switch is detected to be pressed, it switches to Dongle mode. At this time, the internal host of the device releases the access right to the IIC bus. If the switch is not released, the external host performs master-slave communication and read-write access with the optical module through the external bus. If the switch is released, the external bus of the Dongle port is forcibly released, and the internal host IIC pin of the device is re-enabled, and the default working state is re-entered.
[0090] Based on the same inventive concept, an embodiment of the present application provides a bus switching control device for optical module testing, which can be applied to the switching control method described above. For details, please refer to the relevant records in the above text and will not be repeated here.
[0091] Figure 4 This is a schematic diagram of the structure of a bus switching control device for optical module testing according to an embodiment of the present application.
[0092] like Figure 4 As shown, a bus switching control device for an optical module test device, the bus includes an internal bus B1 and an external bus B2, and the device includes: a first acquisition module 401, used to obtain the in-position state of the optical module 504 to be tested in the optical module test device. A second acquisition module 402 is used to obtain the test request type of the optical module test device. A processing module 403 is used to obtain a corresponding channel switching signal based on the in-position state of the optical module 504 to be tested and the test request type. The switching module 404 is used to send the channel switching signal to an analog switch chip, so that the analog switch chip switches to the external bus B2 based on the channel switching signal to establish a communication connection with the external host 505, or switches to the internal bus B1 to establish a communication connection with the internal host 501.
[0093] The bus switching control device for optical module testing in the embodiment of the present application first obtains the in-place status and test request type of the optical module to be tested of the optical module testing equipment, and then obtains the corresponding channel switching signal according to the in-place status and the test request type, so that the analog switch chip switches to the external bus based on the channel switching signal to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host, so that different hosts can access the optical module to implement the performance test of the optical module, which can effectively avoid the downtime caused by the conflict between the external host and the internal host on the IIC bus, and improve the user experience of the optical module testing equipment.
[0094] Based on the same inventive concept, an embodiment of the present application also provides a bus switching control system for optical module testing, wherein the bus includes an internal bus and an external bus. Figure 5 This is a schematic diagram of the structure of a bus switching control system for optical module testing according to an embodiment of the present application.
[0095] like Figure 5 As shown, the system includes: an internal host 501, an external interface board 200, an analog switch chip 502 and a test board 503, wherein the test board 503 is provided with a light module to be tested 504. The internal host 501 is used to respectively obtain the in-position state and the test request type of the light module to be tested 504, and generate a corresponding channel switching signal based on the in-position state and the test request type of the light module to be tested 504. The analog switch chip 502 is used to switch to the external bus based on the channel switching signal to establish a communication connection with the external host, or switch to the internal bus to establish a communication connection with the internal host 501.
[0096] It should be noted that the above-mentioned internal host 501 can be an MCU board of the optical module testing equipment, and the analog switch chip 502 is respectively communicated with the optical module 504, the external interface board 200 and the internal host 501 through the optical module IIC bus, and the external interface board 200 is communicated with the external host 505 through the optical module IIC bus.
[0097] The bus switching control system for optical module testing in the embodiment of the present application can obtain a corresponding channel switching signal according to the in-place status of the optical module to be tested and the test request type, so that the analog switch chip switches to the external bus based on the channel switching signal to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host, so that different hosts can access the optical module to implement performance testing of the optical module, which can effectively avoid downtime caused by conflicts between the external host and the internal host on the IIC bus, and improve the user experience of the optical module testing equipment.
[0098] Based on the same inventive concept, an embodiment of the present application also provides an optical module testing device, which adopts the bus switching control method described above, or includes the bus switching control device described above. For details, please refer to the relevant records in the above text and will not be repeated here.
[0099] The optical module testing device of the embodiment of the present application adopts the bus switching control method or device for optical module testing recorded in the above text, and can obtain the corresponding channel switching signal according to the in-place status of the optical module and the test request type, so that the analog switch chip switches to the external bus based on the channel switching signal to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host, so that different hosts can access the optical module to implement the performance test of the optical module, which can effectively avoid the downtime caused by the conflict between the external host and the internal host on the IIC bus, and improve the user experience of the optical module testing device.
[0100] Based on the same inventive concept, an embodiment of the present application provides an electronic device, including:
[0101] one or more processors;
[0102] A storage unit is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors can implement the method described above.
[0103] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described above can be implemented.
[0104] The computer-readable medium may be included in the apparatus, device, or system of the present invention, or may exist independently.
[0105] Among them, computer-readable storage media can be any tangible media that contains or stores a program, which can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment. More specific examples include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, an optical fiber, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0106] The computer-readable storage medium may also include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code, specific examples of which include but are not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0107] Based on the same inventive concept, an embodiment of the present application provides a computer program product, including a computer program, which can implement the method described above when executed by a processor.
[0108] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.
Claims
1. A bus switching control method for optical module testing, wherein the bus includes an internal bus and an external bus, characterized in that: The method comprises: Obtaining the in-place status of the optical module to be tested in the optical module testing device; Obtaining a test request type of the optical module testing device; Obtaining a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type; The channel switching signal is sent to the analog switch chip, so that the analog switch chip switches to the external bus to establish a communication connection with an external host, or switches to the internal bus to establish a communication connection with an internal host based on the channel switching signal.
2. The method according to claim 1, characterized in that The obtaining the in-place status of the optical module to be tested in the optical module testing device includes: Get the in-place signal ModPrsl in the CMIS protocol pin in real time; Determine whether the ModPrsl at any first moment is a high level; If yes, determine whether the ModPrsl at the second moment is a low level, the second moment being a sampling moment after the first moment; If so, it is determined that the in-position state of the optical module to be tested is in-position.
3. The method according to claim 1, characterized in that The optical module testing device is provided with an external interface card, and the external interface card is provided with an external bus interface; The obtaining of the test request type of the optical module test device includes: Acquire the interface signal of the external bus interface in real time; Determine whether the interface signal at any first moment is at a high level; If yes, determining whether the interface signal at a second moment is at a low level, the second moment being a sampling moment after the first moment; If so, it is determined that the test request type of the optical module test device is an external test request.
4. The method according to claim 3, characterized in that The external interface board is also provided with a switching switch; After determining that the test request type of the optical module test device is an external test request, obtaining the test request type of the optical module test device further includes: If the interface signal at the second moment is at a low level and the on signal of the switch is received, it is secondarily determined that the test request type is an external test request.
5. The method according to claim 3, characterized in that: The optical module testing device is further provided with a protection panel covering the external interface board, and one of the protection panel and the external interface board is provided with a distance detection sensor; The obtaining of the test request type of the optical module test device further includes: Acquire a first distance detection signal and a second distance detection signal fed back by the distance detection sensor at a first sampling moment and a second sampling moment respectively; wherein the second sampling moment is a sampling moment after the first moment; The first distance detection signal and the second distance detection signal are compared, and when the two are inconsistent, it is determined that the test request type is an external test request.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining the communication duration of the communication connection between the external bus and the external host; The communication duration is compared with a duration threshold, and if the communication duration exceeds the duration threshold, a channel switching signal is generated so that the analog switch chip switches to the internal bus based on the channel switching signal to establish a communication connection with the internal host.
7. A bus switching control device for optical module testing equipment, wherein the bus includes an internal bus and an external bus, characterized in that: The device comprises: A first acquisition module, used for acquiring the in-place status of the optical module to be tested in the optical module testing device; A second acquisition module is used to obtain a test request type of the optical module test device; A processing module, used for obtaining a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type; The switching module is used to send the channel switching signal to the analog switch chip, so that the analog switch chip switches to the external bus to establish a communication connection with the external host, or switches to the internal bus to establish a communication connection with the internal host based on the channel switching signal.
8. A bus switching control system for optical module testing, wherein the bus comprises an internal bus and an external bus, characterized in that: The system comprises: an internal host, an external interface card, an analog switch chip and a test board, wherein the test board is provided with an optical module to be tested; The internal host is used to respectively obtain the in-position state and the test request type of the optical module to be tested, and generate a corresponding channel switching signal based on the in-position state of the optical module to be tested and the test request type; The analog switch chip is used to switch to an external bus to establish a communication connection with an external host, or to switch to an internal bus to establish a communication connection with an internal host based on the channel switching signal.
9. An optical module testing device, characterized in that: The optical module testing equipment adopts the bus switching control method as described in any one of claims 1 to 6, or includes the bus switching control device as described in claim 7, or includes the bus switching control system as described in claim 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the bus switching control method according to any one of claims 1 to 6 can be implemented.
Citation Information
Cited By
Optical module multi-protocol external access conflict-free hot switching test system
CN122640021A