Fault positioning method and device for communication link, equipment and medium
By monitoring and comparing the target data bit values in the IIC bus communication link, combined with the use of multiplexers and analog-to-digital converters, the problem of low efficiency of IIC bus fault location is solved, achieving fast and accurate fault location and analyze.
Patent Information
- Application Number
- CN202410543526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, the IIC bus communication link fault location efficiency is low, requiring technicians to use an oscilloscope or multimeter to access the link for analysis, which affects the efficiency of equipment development and maintenance.
The microprocessing unit monitors the target data sent from the master device to the slave device, obtains the read and write mode of the master device, and determines the type of communication link failure based on the comparison of the value of the data bit with the preset value, including the use of multiplexers and Analog-to-digital converters perform level data monitoring and processing.
It realizes rapid location of communication link fault types, improves fault location efficiency, reduces dependence on oscilloscopes or multimeters, and simplifies maintenance work for technicians.
Smart Images

Figure CN118555192A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of equipment communication, and in particular to a method, device, equipment and medium for locating a fault of a communication link. Background Art
[0002] The IIC bus (Inter-Integrated Circuit) is a simple, bidirectional, two-wire synchronous serial bus developed by Philips. It only needs two wires to transmit information between devices connected to the bus, one is the data line (SDA, Serial Data) for bidirectional serial communication, and the other is the serial clock line (SCL, Serial Clock Line). A master device (master) can form a communication link with one or more slave devices (slave) through the IIC bus to communicate and interact with data. The IIC bus has the advantages of being simple to use and highly reliable, and is widely used in switches, sensors, storage devices and other devices.
[0003] In some related technologies, when a communication link of the IIC bus fails, in order to locate the type of the communication link failure, a tester uses a multimeter or an oscilloscope to access the communication link and locates the failure by analyzing the readings of these instruments to determine whether the failure comes from the master device, SDA, SCL or the slave device. Such a fault location method is inefficient and is not conducive to the development and maintenance of equipment. Summary of the invention
[0004] In view of the above problems, a method, apparatus, device, and medium for locating a fault of a communication link is proposed to overcome the above problems or at least partially solve the above problems, including:
[0005] A method for locating a fault in a communication link, the method comprising:
[0006] When a communication link failure is detected between the master device and the slave device, target data sent by the master device to the slave device is monitored through a first line; wherein the first line is a line through which the microprocessing unit accesses the communication link;
[0007] Acquire the read and write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device;
[0008] Based on the read / write mode, the value of each data bit in the target data is compared with a preset value to obtain a comparison result;
[0009] According to the comparison result, the communication link is fault located.
[0010] Optionally, the communication link is an IIC communication link, the IIC communication link is composed of a serial data line and a serial clock line, the microprocessing unit is connected to the multiplexer through a fourth line, the multiplexer is connected to the communication link through a fifth line, and is connected to an analog-to-digital converter through a sixth line, the analog-to-digital converter is connected to the microprocessing unit through a seventh line, and after locating the fault of the communication link according to the comparison result, the method further includes:
[0011] When it is located that the serial data line and / or the serial clock line fails, an instruction is issued to the multiplexer so that the multiplexer connects the analog-to-digital converter to the IIC communication link;
[0012] Sending instructions to the analog-to-digital converter so that the analog-to-digital converter monitors the level data of the serial data line and / or the serial clock line;
[0013] Acquiring the level data and preprocessing the level data;
[0014] The level data is reported to the central processing unit via a third line; wherein the third line is a line connecting the microprocessing unit and the central processing unit, and the central processing unit is used to process the level data to visualize the level data.
[0015] Optionally, locating a fault on the communication link according to the comparison result includes:
[0016] If the comparison result indicates that the value of the address bit in the target data is inconsistent with the value of the address bit of the slave device, it is located that the master device has a fault.
[0017] Optionally, locating a fault on the communication link according to the comparison result further includes:
[0018] If the comparison result indicates that the value of the response signal bit in the target data is inconsistent with the preset response signal value, it is determined that a failure has occurred in the slave device.
[0019] Optionally, when a communication link failure is detected between the master device and the slave device, after monitoring target data sent by the master device to the slave device through the first line, the method further includes:
[0020] If the target data sent by the master device to the slave device is not detected within a preset time, monitoring is stopped.
[0021] Optionally, the master device is a programmable logic device, and the programmable logic device is connected to the microprocessing unit through the second line with at least two pins.
[0022] Optionally, the read / write mode includes any one of the following:
[0023] Write data once, read data once, write data continuously, read data continuously.
[0024] A communication link fault location device, the device comprising:
[0025] A data monitoring module, used for monitoring target data sent by the master device to the slave device through a first line when a communication link failure between the master device and the slave device is detected; wherein the first line is a line through which the microprocessing unit accesses the communication link;
[0026] A read / write module acquisition module, used to acquire the read / write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device;
[0027] A data comparison module, used for comparing the value of each data bit in the target data with a preset value based on the read-write mode to obtain a comparison result;
[0028] A fault location module is used to locate the fault of the communication link according to the comparison result.
[0029] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the communication link fault location method as described above when executed by the processor.
[0030] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for locating a fault in a communication link as described above is implemented.
[0031] The embodiment of the present invention has the following advantages: when a fault in the communication link between a master device and a slave device is detected, target data sent by the master device to the slave device is monitored through a first line, wherein the first line is a line for the microprocessing unit to access the communication link, and a read / write mode of the master device for the target data is obtained through a second line, wherein the second line is a line for connecting the microprocessing unit to the master device; based on the read / write mode, the value of each data bit in the target data is compared with a preset value to obtain a comparison result, and the communication link is fault-located according to the comparison result, so that the type of fault in the communication link can be quickly located for the technician, and the technician no longer needs to use an oscilloscope, a multimeter or other instrument to access the communication link to locate the fault type, thereby improving the efficiency of locating the communication link fault. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0033] Figure 1 It is a flow chart of the steps of a method for locating a fault of a communication link provided by an embodiment of the present invention;
[0034] Figure 2 It is a schematic diagram of locating a fault in a communication link in a related art;
[0035] Figure 3 is a circuit structure diagram for locating a communication link fault provided by an embodiment of the present invention;
[0036] Figure 4 is another circuit structure diagram for locating a communication link fault provided by an embodiment of the present invention;
[0037] Figure 5 It is a structural block diagram of a communication link fault location device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The IIC bus (Inter-Integrated Circuit) is a simple, bidirectional, two-wire synchronous serial bus developed by Philips. It only needs two wires to transmit information between devices connected to the bus, one is the data line (SDA, Serial Data) for bidirectional serial communication, and the other is the serial clock line (SCL, Serial Clock Line). A master device (master) can form a communication link with one or more slave devices (slave) through the IIC bus to communicate and interact with data. The IIC bus has the advantages of being simple to use and highly reliable, and is widely used in switches, sensors, storage devices and other devices.
[0040] In some related technologies, when a communication link of the IIC bus fails, in order to locate the type of the communication link failure, a tester uses a multimeter or an oscilloscope to access the communication link and locates the failure by analyzing the readings of these instruments to determine whether the failure comes from the master device, SDA, SCL or the slave device. Such a fault location method is inefficient and is not conducive to the development and maintenance of equipment.
[0041] For example, a switch is designed with multiple network ports, such as Figure 2 As shown, in the switch, FPGA (Field Programmable Gate Array) is connected via multiple IIC communication links (such as Figure 2 In the switch, SDA1 and SCL2 form one IIC bus, SDA2 and SCL2 form another IIC bus, and so on) are connected to multiple network ports. During the development of the switch, if a port fails, the technician needs to insert the Eload (electronic load) fixture into the port and obtain the reading information of the Eload fixture to locate the fault of the IIC communication link. At this time, the FPGA in the switch (which can also be regarded as a switch) serves as the master device and the Eload fixture serves as the slave device. If the Eload fixture can read normally, it will respond with an ACK (Acknowledge character) signal to indicate a response.
[0042] However, Eload fixtures are used repeatedly and are inevitably prone to aging and damage. In the process of locating faults in the IIC communication link, it may be impossible to obtain Eload fixture reading information or the Eload fixture may not respond to ACK signals. At this time, it is impossible to locate whether the fault comes from the Eload fixture, the switch, SDA or SLC. In this case, it is necessary to use a multimeter or oscilloscope to access the IIC communication link to further locate the fault. Figure 2 As shown in the figure, taking the IIC bus composed of SDA1 and SCL1 as an example, the instrument is generally connected to the terminal A close to the port on SDA1 and the corresponding terminal B on SCL1 to measure the voltage or waveform of the two points and analyze the information to locate the fault. It can be seen that this fault location method not only requires technicians to connect different instruments, but also requires them to interpret the readings of the instruments, which is very time-consuming and labor-intensive, and seriously affects the efficiency of switch development or maintenance.
[0043] Reference Figure 1 , shows a flow chart of a method for locating a fault in a communication link provided by an embodiment of the present invention, which may specifically include the following steps:
[0044] Step 101, when a communication link failure is detected between a master device and a slave device, target data sent by the master device to the slave device is monitored via a first line; wherein the first line is a line through which a microprocessing unit accesses the communication link;
[0045] In this embodiment, the microprocessor unit accesses the communication link through the first line and can monitor the target data sent by the master device to the slave device. It should be noted that the microprocessor unit only monitors the target data instead of capturing it, and the target data can still be transmitted on the communication link.
[0046] As an example, for an IIC communication link, such as Figure 3 As shown, the microprocessor unit can access the IIC communication link composed of SDA and SCL through a first line composed of L1 line and L2 line, wherein the L1 line is connected to SDA and the L2 line is connected to SCL.
[0047] In this embodiment, the target data is data transmitted based on the protocol of the communication link. The protocols of different communication links have different degrees of differences in the format definition and transmission mode of the target data.
[0048] As an example, the target data sent by the master device to the slave device on the IIC communication link may include a start signal, the address of the slave device (composed of 8 data bits representing the address and 1 data bit representing read / write), a response signal, data to be sent, a stop signal, and other data bits. When transmitting data on the IIC communication link, one data bit is transmitted in each clock pulse cycle of SCL. During the period when SCL is at a high level, the level of SDA must remain stable. Only when the signal on the clock line SCL is at a low level, the level of SDA is allowed to change. At this time, the transmitted data is considered valid, because when SCL is at a high level, the change of the SDA level is specified as a control command, such as a start signal or a stop signal.
[0049] In some embodiments of the present invention, after step 101, the method further includes:
[0050] If the target data sent by the master device to the slave device is not detected within a preset time, monitoring is stopped.
[0051] In this embodiment, if the target data sent by the master device to the slave device is not detected within the preset time, it can be considered that the target data to be sent by the master device has been sent, and monitoring is stopped. By setting the preset time for stopping monitoring, firstly, more target data can be monitored as much as possible to cover the test process of fault location, thereby improving the accuracy of fault location, and secondly, it can avoid the waste of resources caused by the uninterrupted operation of the microprocessor unit.
[0052] In actual applications, according to test requirements, the preset time can be set to a relatively long time to ensure that the master device has actually stopped sending target data, such as 10 minutes, 15 minutes, 30 minutes, etc.
[0053] Step 102, obtaining the read / write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device;
[0054] In this embodiment, the target data sent by the master device to the slave device may correspond to different data formats due to different read and write modes. Therefore, in order to ensure the accuracy of target data recognition, it is necessary to obtain the read and write mode of the master device for the target data through the second line.
[0055] As an example, for an IIC communication link, such as Figure 3 As shown, the micro-processing unit can be connected to the main device through a second line composed of L3 line and L4 line to communicate and exchange data with the main device through the second line, such as issuing instructions to the main device, obtaining data sent by the main device, etc.
[0056] In some embodiments of the present invention, the master device is a programmable logic device, and the programmable logic device is connected to the microprocessing unit through the second line with at least two pins.
[0057] A programmable logic device (PLD) is a device generated by a general-purpose integrated circuit, and its logic function is determined by the user's programming of the device. It may include devices such as FPGA (Field Programmable Gate Array), PAL (Programmable Array Logic), and GAL (Generic Array Logic), which include multiple pins.
[0058] In this embodiment, the programmable logic device provides at least two pins connected to the microprocessing unit through the second line, and these pins can be high level (represented by a value of 1) or low level (represented by a value of 0), and are combined into address bits for identification by the microprocessing unit. For example, when the programmable logic device provides two pins connected to the microprocessing unit through the second line, one pin is marked as S0 and the other pin is marked as S1, and both S0 and S1 can be high level or low level, then S0 and S1 can be combined into four address bits: 00, 01, 10, and 11.
[0059] Step 103, based on the read / write mode, comparing the value of each data bit in the target data with a preset value to obtain a comparison result;
[0060] In a specific implementation, the data bits in the target data represent different meanings, such as the response signal of the slave device, the address of the slave device, etc. The preset value can be the expected value when the communication link and various devices on the communication link are in a normal state, such as the correct response signal, the correct slave device address, etc.
[0061] The read / write mode may include any of the following: single write data, single read data, continuous write data, continuous read data.
[0062] As an example, for an IIC communication link, in a read-write mode of single data reading, if the value of the data bit representing the response signal is 1 (representing a high level), it means that the slave device can normally respond to the ACK signal in the single data reading mode; and in a read-write mode of continuous data reading, if the value of the data bit representing the response signal is 0 (representing a low level), it means that the slave device can normally respond to the ACK signal in the continuous data reading mode. The above situations can all reflect that the slave device is in a normal state. When comparing the data bit representing the response signal with the preset value, if the microprocessing unit obtains that the read-write mode of the master device is a single read data, the value of the data bit is compared with the preset value 1; if the microprocessing unit obtains that the read-write mode of the master device is continuous read data, the value of the data bit is compared with the preset value 0. In any of the above read-write modes, if the comparison result is consistent, it means that the slave device is not faulty, and if the comparison result is inconsistent, it means that the slave device is faulty.
[0063] In actual applications, the levels of SDA and SCL of the IIC communication link should have high and low changes when transmitting data under normal conditions. Therefore, when the microprocessor monitors the target data sent by the master device to the slave device, it can also monitor the level changes of SDA and SCL on the IIC communication link and compare them with the expected level changes. If it is monitored that the levels of SDA and / or SCL remain high or / and low for a long time, or are inconsistent with the expected level changes, it means that SDA and / or SCL are faulty.
[0064] Step 104: locate the fault of the communication link according to the comparison result.
[0065] In the embodiment of the present invention, according to the comparison result of the values of the data bits representing different meanings in the target data with the preset values, the fault type corresponding to the abnormality of the values of these data bits can be located.
[0066] In practical applications, after the microprocessor locates the fault of the communication link, the relevant information of the fault location can be further processed. For example, when the fault is located in the slave device, the register at a certain address is set to 1; if the abnormality of SDA and SCL is located, the register at another address is set to 1 to store the relevant information of the fault location. The central processing unit obtains the value stored in the register at the specified address according to the storage format agreed upon above to determine the result of the fault location performed by the microprocessor. By using the value stored in a specific register to represent the corresponding fault type, resources are saved and the processing speed of fault location is effectively improved.
[0067] In some embodiments of the present invention, locating the fault of the communication link according to the comparison result includes:
[0068] If the comparison result indicates that the value of the address bit in the target data is inconsistent with the value of the address bit of the slave device, it is located that the master device has a fault.
[0069] In this embodiment, if the comparison result indicates that the value of the address bit in the target data is inconsistent with the address bit of the slave device, for example, the value of the 9-bit address bit of the slave device should be "001010101", while the value of the address bit in the target data is "101011000", and the two are completely inconsistent, it means that the master device cannot correctly address the slave device, and the master device is faulty. The microprocessing unit automatically locates the fault of the master device according to the comparison result, thereby improving the efficiency of fault location and facilitating the technicians to repair or maintain the master device in a timely manner.
[0070] In some embodiments of the present invention, locating the fault of the communication link according to the comparison result further includes:
[0071] If the comparison result indicates that the value of the response signal bit in the target data is inconsistent with the preset response signal value, it is determined that a failure has occurred in the slave device.
[0072] In this embodiment, if the comparison result indicates that the value of the response signal bit in the target data is inconsistent with the preset response signal value, for example, the preset response signal value of the slave device in a normal state should be 1, but the value of the response signal bit in the target data is 0, it means that the slave device cannot respond to the response signal and the slave device is faulty. The microprocessing unit automatically locates the fault of the slave device according to the comparison result, which improves the efficiency of fault location and facilitates the technician to replace the faulty slave device in time during the test of the master device, so as to quickly advance the research and development progress of the master device.
[0073] In some embodiments of the present invention, the communication link is an IIC communication link, the IIC communication link is composed of a serial data line and a serial clock line, the microprocessing unit is connected to the multiplexer through a fourth line, the multiplexer is connected to the communication link through a fifth line, and is connected to the analog-to-digital converter through a sixth line, the analog-to-digital converter is connected to the microprocessing unit through a seventh line, and after locating the fault of the communication link according to the comparison result, it also includes:
[0074] When it is located that the serial data line and / or the serial clock line fails, an instruction is issued to the multiplexer so that the multiplexer connects the analog-to-digital converter to the IIC communication link;
[0075] Sending instructions to the analog-to-digital converter so that the analog-to-digital converter monitors the level data of the serial data line and / or the serial clock line;
[0076] Acquiring the level data and preprocessing the level data;
[0077] The level data is reported to the central processing unit via a third line; wherein the third line is a line connecting the microprocessing unit and the central processing unit, and the central processing unit is used to process the level data to visualize the level data.
[0078] In a specific implementation, when the communication link is an IIC communication link, the circuit structure composed of various devices can be as follows: Figure 4 As shown, the FPGA (the FPGA of the master device) communicates via multiple IIC links ( Figure 4 The serial data line SDA1 and serial clock line SCL1, serial data line SDA2 and serial clock line SCL2, etc.) are connected to the port (port of the slave device), and are connected to the microprocessor unit (MCU, Microcontroller Unit) through the S0 and S1 pins. At the same time, the microprocessor is connected to the central processing unit (CPU, Central Processing Unit) and connected to the IIC communication link; the multiplexer (MUX, Multiplexer) is also connected to the IIC communication link, connected to the analog to digital converter (ADC, Analog to Digital Converter) and the microprocessor unit, and is controlled by the microprocessor unit; the analog to digital converter is connected to the microprocessor to send the collected level data to the microprocessor. When the IIC communication link is in a normal state, the microprocessor, the multiplexer, and the analog to digital converter do not work, and the analog to digital converter is not connected to the communication link, which will not affect the data transmission of the IIC communication link.
[0079] Furthermore, when the microprocessor unit detects that the IIC communication link is faulty, the technician inputs instructions to the central processor, and the central processor in turn issues control instructions to the microprocessor unit to locate the fault. When the microprocessor unit locates that the serial data line and / or the serial clock line is faulty, the microprocessor unit issues instructions to the multiplexer, causing the multiplexer to connect the analog-to-digital converter to the IIC communication link.
[0080] Furthermore, the microprocessor unit issues instructions to the analog-to-digital converter, instructing the analog-to-digital converter to monitor the level signals of SDA and SLC in the IIC communication link. The analog-to-digital converter converts the monitored level signals of SDA and SLC into digital signals, i.e., level data, and reports them to the microprocessor unit.
[0081] Furthermore, after receiving the level data, the microprocessing unit preprocesses the level data, such as arranging the level data into a predefined data format according to a data dictionary, cleaning the level data, etc., and then reports the preprocessed level data to the central processing unit.
[0082] Furthermore, the central processing unit further processes the received level data, such as converting the level data into corresponding graphics and outputting them to a graphical interface for visual display; or outputting an analysis result report of the level data to a graphical interface for viewing by technicians.
[0083] By visually displaying the level data to technicians, technicians can quickly locate the level anomalies of SDA and / or SLC in the communication link. There is no need to connect an oscilloscope or multimeter to measure the level of SDA and / or SLC and perform reading analysis, which greatly improves the efficiency of fault location and analysis.
[0084] The embodiment of the present invention has the following advantages: when a fault in the communication link between a master device and a slave device is detected, target data sent by the master device to the slave device is monitored through a first line, wherein the first line is a line for the microprocessing unit to access the communication link, and a read / write mode of the master device for the target data is obtained through a second line, wherein the second line is a line for connecting the microprocessing unit to the master device; based on the read / write mode, the value of each data bit in the target data is compared with a preset value to obtain a comparison result, and the communication link is fault-located according to the comparison result, so that the type of fault in the communication link can be quickly located for the technician, and the technician no longer needs to use an oscilloscope, a multimeter or other instrument to access the communication link to locate the fault type, thereby improving the efficiency of locating the communication link fault.
[0085] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0086] Reference Figure 5 , shows a schematic diagram of the structure of a communication link fault location device provided by an embodiment of the present invention, which may specifically include the following modules:
[0087] The data monitoring module 501 is used to monitor the target data sent by the master device to the slave device through a first line when a communication link failure is detected between the master device and the slave device; wherein the first line is a line through which the microprocessing unit accesses the communication link;
[0088] The read / write module acquisition module 502 is used to acquire the read / write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device;
[0089] A data comparison module 503 is used to compare the value of each data bit in the target data with a preset value based on the read / write mode to obtain a comparison result;
[0090] The fault location module 504 is used to locate the fault of the communication link according to the comparison result.
[0091] In some embodiments of the present invention, the communication link is an IIC communication link, the IIC communication link is composed of a serial data line and a serial clock line, the microprocessing unit is connected to the multiplexer through a fourth line, the multiplexer is connected to the communication link through a fifth line, and is connected to the analog-to-digital converter through a sixth line, and the device further includes:
[0092] an analog-to-digital converter access module, configured to issue an instruction to the multiplexer when a fault is detected in the serial data line and / or the serial clock line, so that the multiplexer connects the analog-to-digital converter to the IIC communication link;
[0093] A level monitoring module, used for issuing instructions to the analog-to-digital converter, so that the analog-to-digital converter monitors the level data of the serial data line and / or the serial clock line;
[0094] A data preprocessing module, which obtains the level data and preprocesses the level data;
[0095] The data reporting module reports the level data to the central processing unit through a third line; wherein the third line is a line connecting the microprocessing unit and the central processing unit, and the central processing unit is used to process the level data to visualize the level data.
[0096] In some embodiments of the present invention, the fault location module 504 includes:
[0097] The first fault locating submodule is used to locate that a fault occurs in the master device if the comparison result indicates that the value of the address bit in the target data is inconsistent with the value of the address bit of the slave device.
[0098] In some embodiments of the present invention, the fault location module 504 further includes:
[0099] The second fault locating submodule locates that a fault occurs in the slave device if the comparison result indicates that the value of the response signal bit in the target data is inconsistent with the preset response signal value.
[0100] In some embodiments of the present invention, the device further comprises:
[0101] The stop monitoring module is used to stop monitoring if the target data sent by the master device to the slave device is not monitored within a preset time.
[0102] In some embodiments of the present invention, the master device is a programmable logic device, and the programmable logic device is connected to the microprocessing unit through the second line with at least two pins.
[0103] In some embodiments of the present invention, the read / write mode includes any one of the following:
[0104] Write data once, read data once, write data continuously, read data continuously.
[0105] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the above communication link fault locating method is implemented.
[0106] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for locating a fault in a communication link as described above is implemented.
[0107] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above communication link fault location method when executed by a processor.
[0108] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0110] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0111] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0112] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0115] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0116] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0117] The above is a detailed introduction to the provided communication link fault location method, device, equipment, and medium. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for locating a fault in a communication link, It is characterized in that The method comprises: When a communication link failure is detected between the master device and the slave device, target data sent by the master device to the slave device is monitored through a first line; wherein the first line is a line through which the microprocessing unit accesses the communication link; Acquire the read and write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device; Based on the read / write mode, the value of each data bit in the target data is compared with a preset value to obtain a comparison result; According to the comparison result, the communication link is fault located.
2. The method according to claim 1, It is characterized in that The communication link is an IIC communication link, the IIC communication link is composed of a serial data line and a serial clock line, the microprocessing unit is connected to the multiplexer through a fourth line, the multiplexer is connected to the communication link through a fifth line, and is connected to the analog-to-digital converter through a sixth line, the analog-to-digital converter is connected to the microprocessing unit through a seventh line, and after locating the fault of the communication link according to the comparison result, the method further includes: When it is located that the serial data line and / or the serial clock line fails, an instruction is issued to the multiplexer so that the multiplexer connects the analog-to-digital converter to the IIC communication link; Sending instructions to the analog-to-digital converter so that the analog-to-digital converter monitors the level data of the serial data line and / or the serial clock line; Acquiring the level data and preprocessing the level data; The level data is reported to the central processing unit via a third line; wherein the third line is a line connecting the microprocessing unit and the central processing unit, and the central processing unit is used to process the level data to visualize the level data.
3. The method according to claim 1 or 2, It is characterized in that The performing fault location on the communication link according to the comparison result includes: If the comparison result indicates that the value of the address bit in the target data is inconsistent with the value of the address bit of the slave device, it is located that the master device has a fault.
4. The method according to claim 1 or 2, It is characterized in that The performing fault location on the communication link according to the comparison result further includes: If the comparison result indicates that the value of the response signal bit in the target data is inconsistent with the preset response signal value, it is determined that a failure has occurred in the slave device.
5. The method according to claim 1 or 2, It is characterized in that When a communication link failure is detected between the master device and the slave device, after monitoring the target data sent by the master device to the slave device through the first line, the method further includes: If the target data sent by the master device to the slave device is not detected within a preset time, monitoring is stopped.
6. The method according to claim 1 or 2, It is characterized in that The master device is a programmable logic device, and the programmable logic device is connected to the microprocessing unit through the second line with at least two pins.
7. The method according to claim 1 or 2, It is characterized in that The read / write mode includes any of the following: Write data once, read data once, write data continuously, read data continuously.
8. A communication link fault location device, It is characterized in that The device comprises: A data monitoring module, used for monitoring target data sent by the master device to the slave device through a first line when a communication link failure between the master device and the slave device is detected; wherein the first line is a line through which the microprocessing unit accesses the communication link; A read / write module acquisition module, used to acquire the read / write mode of the master device for the target data through a second line; wherein the second line is a line connecting the microprocessing unit and the master device; A data comparison module, used for comparing the value of each data bit in the target data with a preset value based on the read-write mode to obtain a comparison result; A fault location module is used to locate the fault of the communication link according to the comparison result.
9. An electronic device, It is characterized in that The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for locating a fault of a communication link according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for locating a fault in a communication link according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Fault chip detection method and device, computing equipment and storage medium
CN115616377A
Faulty chip detection method, apparatus, computing device, and storage medium
CN115616377B
