Fault diagnosis method and system for recording device before inspection
By setting up disconnection isolation in the pre-inspection recording device and counting the DDR empty-to-full conversion time and the number of DMA transmissions, the problem of substandard recording and playback rate was solved, rapid fault diagnosis and efficient troubleshooting were achieved, and maintenance difficulty was reduced.
Patent Information
- Application Number
- CN202410787639.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-06
AI Technical Summary
In pre-inspection recording devices in the field of satellite communications or radar communications, the problem of substandard recording and playback rates is difficult to quickly diagnose, especially in the R&D and operation phases. Due to the complexity of the transmission links, troubleshooting is time-consuming and maintenance is difficult.
By setting disconnection isolation between the hardware components of the pre-inspection recording device, the fault diagnosis factor is obtained, and by counting the time of the DDR empty-to-full conversion process and the number of DMA transmissions, the data transmission speed is calculated, and the actual value is compared with the theoretical value to determine the fault. The part where it is located.
It realizes module-level fault diagnosis of the pre-inspection recording device, quickly locates the problem, improves the efficiency of troubleshooting in the R&D and operation stages, and reduces the difficulty of maintenance.
Smart Images

Figure CN118606090A
Abstract
Description
Technical Field
[0001] The invention relates to fault diagnosis technology, and in particular to a fault diagnosis method and system for a pre-inspection recording device. Background Art
[0002] In the field of satellite communication or radar communication, a pre-detection recording device is required to complete the recording of signals. The recorded data is stored on a disk for subsequent analysis.
[0003] The pre-inspection recording device consists of a digital or analog board and a computer with a disk array. The FPGA of the board and the computer use the PCIE bus for high-speed communication, involving high-speed data transmission in the field of satellite remote sensing and communication, usually with a data processing capacity of 4 to 5 GB / s or more. Figure 1 As shown, the hardware structure of the pre-inspection recording device is realized by inserting a FPGA signal processing board through the expansion of the PCIE card slot. The PCIE expansion card is connected to the computer memory or control unit through the computer internal bus.
[0004] The computer uses the DMA under the PCIE bus to transfer the data collected by the FPGA to the computer memory. This process is called signal acquisition. The computer memory data is transferred to the DDR of the FPGA through DMA. This process is called signal playback. The acquisition or playback rate is an important indicator of the pre-inspection recording device. During the development, delivery and operation of the acquisition and recording device, the recording and playback rate often fails to meet the standard.
[0005] When the transmission rate drops, it is necessary to diagnose and troubleshoot the associated module parts, but due to the long transmission link and many influencing factors, it usually takes a lot of effort to eliminate them one by one during the R&D stage and the operation and maintenance stage. The long link is reflected in the large number of devices involved: high-speed disk array, computer CPU, computer memory, PCIE board interface technology, DMA IP core, board FPGA circuit program, board DDR technology, board A / D and DA technology. In the R&D stage, the faults of each stage can be gradually checked, but due to the comprehensive R&D expertise, it involves repeated communication and testing between hardware engineers, FPGA circuit engineers, driver engineers, and host computer engineers, and a lot of time, manpower, and material resources are invested. After the product is delivered, the operation faults caused by the environment and integration are even more difficult to troubleshoot. At the same time, most of the products are solidified and the structure is difficult to disassemble. Some products have special working environments, and after delivery and installation, there are maintenance risks that the products are inaccessible and irreversible during transportation, such as commercial satellite products and deep-sea test equipment products. Summary of the invention
[0006] The technical problem to be solved by the present invention is as follows: In view of the above-mentioned problems in the prior art, a method and system for diagnosing faults of a pre-inspection recording device are provided, which can perform module-level diagnosis of rate drop faults in the pre-inspection recording device development process and the pre-inspection recording device delivery and operation stage respectively to quickly locate the problem.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A method for diagnosing faults of a pre-test recording device, wherein the fault diagnosis during the development process comprises the following steps:
[0009] Disconnection and isolation are set between the hardware components of the pre-inspection recording device, and corresponding fault diagnosis factors are obtained. The fault diagnosis factors are compared with preset reference values to determine the component where the fault is located.
[0010] Furthermore, the fault diagnosis during the operation phase includes the following steps:
[0011] The time and DMA transfer times of the FPGA board DDR empty-full conversion process of the pre-inspection recording device are counted, and the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR is calculated based on the time and the DMA transfer times. The actual value is compared with the theoretical value to determine the component where the fault is located.
[0012] Further, when disconnection isolation is set between the hardware components of the pre-detection recording device and the corresponding fault diagnosis factor is obtained, the steps of setting disconnection isolation and obtaining the fault diagnosis factor when playing back the data specifically include:
[0013] Disconnect the computer memory from the FPGA board IP core, read data from the computer storage disk to the computer memory, calculate the transmission rate V1 and use it as the corresponding fault diagnosis factor;
[0014] Restore the connection between the computer memory and the FPGA board IP core, disconnect the computer storage disk from the computer memory, and disconnect the FPGA board IP core from the FPGA board DDR, transfer the computer memory data to the FPGA board IP core, calculate the transmission rate V2 and use it as the corresponding fault diagnosis factor;
[0015] Restore the connection between the computer storage disk and the computer memory, and restore the connection between the FPGA board IP core and the FPGA board DDR. Disconnect the computer memory from the FPGA board IP core, and disconnect the FPGA board DDR from the FPGA board A / D module. Transfer the computer memory data to the FPGA board DDR, calculate the transmission rate V3 and use it as the corresponding fault diagnosis factor.
[0016] Further, when disconnection isolation is set between the hardware components of the pre-detection recording device and the corresponding fault diagnosis factor is obtained, the steps of setting disconnection isolation and obtaining the fault diagnosis factor when collecting data include:
[0017] Disconnect the computer memory from the FPGA board IP core, read data from the computer memory to the computer storage disk, calculate the transmission rate V1' and use it as the corresponding fault diagnosis factor;
[0018] Restore the connection between the computer memory and the FPGA board IP core, disconnect the computer storage disk from the computer memory, and disconnect the FPGA board IP core from the FPGA board DDR, transfer the FPGA board IP core data to the computer memory, calculate the transmission rate V2' and use it as the corresponding fault diagnosis factor;
[0019] Restore the connection between the computer storage disk and the computer memory, and restore the connection between the FPGA board IP core and the FPGA board DDR. Disconnect the computer memory from the FPGA board IP core, and disconnect the FPGA board DDR from the FPGA board A / D module. Transfer the FPGA board DDR data to the computer memory, calculate the transmission rate V3' and use it as the corresponding fault diagnosis factor.
[0020] Furthermore, the calculation of the transmission rate includes: dividing the amount of data transmitted per unit time by the time used to obtain the corresponding transmission rate.
[0021] Further, when counting the time of the FPGA board DDR empty-full conversion process and the number of DMA transfers of the pre-detection recording device, the following steps are included:
[0022] In the initial state, the FPGA board DDR is idle, and the idle flag is set to 1;
[0023] When the FPGA board DDR is replaying data transmission, the FPGA board DDR status is read in real time;
[0024] If the DDR is not full and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded;
[0025] If the DDR is not full and the idle flag is 0, the number of DMA transfers is incremented;
[0026] If the DDR is full and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR idle to DDR full. The corresponding number of DMA transfers is saved as the number of DMA transfers from DDR idle to DDR full.
[0027] Further, when counting the time of the FPGA board DDR empty-full conversion process and the number of DMA transfers of the pre-detection recording device, the following steps are included:
[0028] In the initial state, the FPGA board DDR is full, and the idle flag is set to 1;
[0029] When the FPGA board DDR is collecting and transmitting data, the FPGA board DDR status is read in real time;
[0030] If the DDR is not empty and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded;
[0031] If the DDR is not empty and the idle flag is 0, the DMA transfer count is incremented;
[0032] If the DDR is idle and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR full to DDR idle process, and the corresponding DMA transfer number is saved as the DMA transfer number from DDR full to DDR idle process.
[0033] Furthermore, when calculating the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR based on the time and the number of DMA transmissions, it includes: multiplying the number of DMA transmissions by the amount of data transmitted each time, subtracting the capacity of the FPGA board DDR, and then dividing the difference by the time to obtain the actual value of the data transmission speed.
[0034] Furthermore, when comparing the actual value with the theoretical value to determine the component where the fault is located, the method includes:
[0035] If the actual value is greater than the theoretical value, then there is a fault in the DDR processing circuit of the FPGA;
[0036] If the actual value is smaller than the theoretical value, there is a fault in the D / A module of the FPGA.
[0037] The present invention also provides a pre-inspection recording device fault diagnosis system, comprising a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute any one of the pre-inspection recording device fault diagnosis methods.
[0038] Compared with the prior art, the advantages of the present invention are:
[0039] In the process of developing the pre-test recording device, the present invention sets disconnection isolation between the hardware components, obtains the fault diagnosis factor corresponding to each component, and compares it with the preset reference value, so that the component where the fault is located can be clearly judged, and then in the actual operation of the pre-test recording device, the time from DDR idle to DDR full process and the number of DMA transmissions are counted to judge the component where the fault is located. The whole process presents direct fault detection and high reliability of diagnosis, which is an important reliable basis for further troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a structural block diagram of the pre-inspection recording device.
[0041] Figure 2 This is a schematic diagram of the data flow for playback and acquisition of data by the pre-inspection recording device.
[0042] Figure 3 Schematic diagram of the DDR idle state of the FPGA in the pre-detection recording device.
[0043] Figure 4 This is a schematic diagram of the DDR usage status of the FPGA in the pre-inspection recording device.
[0044] Figure 5 Schematic diagram of the DDR full state of the FPGA in the recording device before detection.
[0045] Figure 6 The figure is a flow chart of a method according to an embodiment of the present invention.
[0046] Figure 7 The figure is a flow chart of data transmission between the computer memory of the recording device and the DDR of the FPGA when replaying the data.
[0047] Figure 8 This is a flowchart for counting the time from DDR idle to DDR full and the number of DMA transfers when playing back data.
[0048] Fig. 9 It is a flowchart of data transmission between the computer memory of the pre-detection recording device and the DDR of the FPGA when collecting data.
[0049] Fig.10 This is a flowchart for counting the time from DDR full to DDR idle and the number of DMA transfers when collecting data. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0051] Before introducing the specific embodiments of the present invention, the relevant concepts are first explained.
[0052] The computer of the pre-inspection recording device is installed with Windows, Linux or Kylin systems, and runs application software. The pre-inspection recording software can be developed by high-level languages such as C, C++, Java, etc. after the kernel driver is installed normally. It can have a human-computer interaction interface running state or a command line interfaceless running state. In any running state, it can report the working status to an external third party.
[0053] The processing speed failure of the pre-inspection recording device is often related to the associated hardware components, and the stable operation of the hardware components is affected by complex factors such as temperature, humidity, dust particle index, air pressure, acidity and alkalinity.
[0054] In the actual device development process or operation process, when the acquisition and playback rate do not meet the standard, rapid fault location can effectively improve the R&D efficiency or the after-sales maintenance efficiency of the device operation. From the composition analysis of hardware components, the hardware components that may cause the rate reduction failure include hard disk, memory, PCIE expansion card slot, DDR, A / D, and D / A.
[0055] like Figure 2 As shown, the pre-inspection recording device analyzes two basic processes, namely, playback data and acquisition data, from the perspective of computer software flow.
[0056] Figure 2 (a) is an example of playback data, which goes through the data transfer process of labels 1, 2, 3 and 4. Label 1 is the process of writing computer storage disk data into computer memory, which is implemented by the application software based on the operating system inside the computer. Label 2 is the process of transferring data from computer memory to the IP core of FPGA, which is the application process of DMA. Labels 3 and 4 are the internal processes of the logic circuit implemented by the internal circuit of the FPGA signal board.
[0057] The process of data collection is the reverse process of data playback. Figure 2 (b) is an example of data collection, which goes through the data flow process of numbers 5, 6, 7 and 8. Number 8 is the process of writing computer memory data to the computer storage disk, which is implemented by the application software based on the operating system inside the computer. Number 7 is the process of the FPGA IP core transmitting data to the computer memory, which is the application process of DMA. Numbers 5 and 6 are the internal processes of the logic circuit implemented by the internal circuit of the FPGA signal board.
[0058] From the above process, we can see that the internal data of the computer is transmitted to the signal processing board of the FPGA through the DMA method of the extended PCIE.
[0059] The pre-detection recording device transmits data through DMA, including configuration registers and status registers to control the flow of data between different hardware modules to meet the stable system data rate output.
[0060] The DDR of the FPGA signal processing board is a 2GB physical memory, which is provided to the application software through the status register to obtain whether its capacity is full. If the status register is set to 0 during the playback process, it means that the DDR memory is full of transmitted data, otherwise it is set to 1 to continue writing, and the D / A will take data from the DDR as soon as possible, trying to transfer more data from the computer memory to the DDR cache. Usually DDR is 2GB, and each DMA transfer data unit is 16MB.
[0061] like Figure 3 As shown, in the initial state, the computer control software reads the status register of the FPGA board. In this state, the 2GB DDR memory is idle, the writable register is 1, and the control software has the conditions to transmit data through DMA.
[0062] like Figure 4 As shown, the D / A module fetches data from DDR, DDR still has free memory, the writable register is 1, and DMA is ready for transmission.
[0063] like Figure 5 As shown in the figure, the FPGA's DDR memory is full, the register status is 0, and the conditions for DMA transmission are not met. The control software suspends the DMA operation and continuously reads the status register until it is 1 to continue DMA transmission.
[0064] Embodiment 1
[0065] This embodiment proposes a fault diagnosis method for a pre-inspection recording device, abstracts the influencing factors to analyze the faulty parts of the hardware module, accelerates the troubleshooting of fault problems, and assists in providing fault resolution strategies. Based on the "disconnection and speed difference statistics method", module-level diagnosis of rate drop faults is performed during the pre-inspection recording device development process and the pre-inspection recording device delivery and operation stage to quickly locate the problem.
[0066] like Figure 6 As shown, the method includes:
[0067] 1. Fault diagnosis in the R&D process includes the following steps:
[0068] Disconnection and isolation are set between the hardware components of the pre-inspection recording device, and corresponding fault diagnosis factors are obtained. The fault diagnosis factors are compared with preset reference values to determine the component where the fault is located.
[0069] 2. Fault diagnosis during operation includes the following steps:
[0070] The time and DMA transfer times of the FPGA board DDR empty-full conversion process of the pre-inspection recording device are counted, and the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR is calculated based on the time and the DMA transfer times. The actual value is compared with the theoretical value to determine the component where the fault is located.
[0071] The relevant contents are described in detail below.
[0072] In the fault diagnosis process of the development process of this embodiment, disconnection isolation is set between the hardware components of the pre-detection recording device, and the corresponding fault diagnosis factors are obtained, including the steps of setting disconnection isolation and obtaining fault diagnosis factors when playing back data, specifically including:
[0073] S101) disconnect the recording device software before inspection Figure 2 The connection between the computer memory and the FPGA board IP core shown in the middle number 2 reads data from the computer storage disk to the computer memory, and the amount of data transmitted per unit time is divided by the time used to obtain the transmission rate V1 and used as the corresponding fault diagnosis factor;
[0074] S102) Recover the pre-check recording device software Figure 2 Disconnect the connection between the computer memory and the FPGA board IP core shown in the label 2. Figure 2 The connection between the computer storage disk and the computer memory shown in the label 1 is disconnected at the same time Figure 2 The connection between the FPGA board IP core and the FPGA board DDR shown in the middle number 3 transmits the computer memory data to the FPGA board IP core, and the amount of data transmitted per unit time is divided by the time used to obtain the transmission rate V2 and used as the corresponding fault diagnosis factor;
[0075] S103) Recover the pre-check recording device software Figure 2 The connection between the FPGA board IP core and the FPGA board DDR shown in the label 3 is maintained Figure 2 The computer storage disk shown in the label 1 is disconnected from the computer memory and disconnected Figure 2 The connection between the FPGA board DDR and the FPGA board A / D module shown in the middle label 4 transmits the computer memory data to the FPGA board DDR, and the amount of data transmitted per unit time is divided by the time used to obtain the transmission rate V3 and use it as the corresponding fault diagnosis factor.
[0076] In the fault diagnosis process of the development process of this embodiment, when disconnection isolation is set between the hardware components of the pre-detection recording device and the corresponding fault diagnosis factors are obtained, the steps of setting disconnection isolation and obtaining fault diagnosis factors when collecting data are also included, which specifically include:
[0077] S201) disconnect the recording device software before inspection Figure 2 The connection between the computer memory and the FPGA board IP core shown in the middle number 7, reading data from the computer memory to the computer storage disk, dividing the amount of data transmitted per unit time by the time used to obtain the transmission rate V1' and use it as the corresponding fault diagnosis factor;
[0078] S202) Recover the pre-check recording device software Figure 2 Disconnect the connection between the computer memory and the FPGA board IP core shown in the label 7. Figure 2 The connection between the computer storage disk and the computer memory shown in the middle label 8 is disconnected at the same time Figure 2 The connection between the FPGA board IP core and the FPGA board DDR shown in the middle number 6 is used to transfer the FPGA board IP core data to the computer memory, and the amount of data transmitted per unit time is divided by the time used to obtain the transmission rate V2' and used as the corresponding fault diagnosis factor;
[0079] S203) Recover the pre-check recording device software Figure 2 The connection between the FPGA board IP core and the FPGA board DDR shown in the label 6 is maintained Figure 2 The computer storage disk shown in the middle label 8 is disconnected from the computer memory and disconnected Figure 2 The connection between the FPGA board DDR and the FPGA board A / D module shown in the middle label 5 transmits the FPGA board DDR data to the computer memory, and the amount of data transmitted per unit time is divided by the time used to obtain the transmission rate V3' and use it as the corresponding fault diagnosis factor.
[0080] After calculating the rates of V1, V2, V3, V1', V2', and V3' through the above steps, evaluate the similarity to the theoretical speed. If it is similar to the theoretical speed, the calibration is successful. Otherwise, it can obviously show the stage where the fault is located. When evaluating the similarity to the theoretical speed, methods including but not limited to similarity calculation, absolute error calculation, relative error calculation, etc. can be used. If the similarity is greater than or equal to the specified threshold, the corresponding module does not have a fault. Otherwise, the corresponding module has a fault.
[0081] The above steps are the acquisition and recording stage of basic data and empirical data. The acquisition of this data is intended to provide common sense and basic data comparison reference for subsequent diagnosis. Due to the combined influence of factors such as differences in FPGA board DDR, computer memory manufacturers, FPGA circuit programmer design differences, computer driver software design differences, and host computer software program design differences, the above values fluctuate with positive and negative deviations within a certain range.
[0082] The fault diagnosis process in the running stage of this embodiment includes the fault diagnosis of the playback data flow. Figure 2 The process of transferring memory data to DDR by calling DMA in numbers 2 and 3 is as follows Figure 7 As shown, the pre-detection recording device software starts continuous data transmission, obtains the flag status of whether the FPGA's DDR is full, and decides whether to perform DMA data transmission to the DDR in the next step according to the idle or busy status of the DDR.
[0083] Furthermore, Figure 2 The FPGA IP cores corresponding to the numbers 2, 3, and 4 receive data from the computer's memory and forward it to the DDR. The A / D module then obtains data from the DDR in the following process: Figure 8 As shown, Figure 8 In the above, count indicates the number of DMA transfers from DDR idle to DDR full; the flag variable indicates that DDR idle to DDR full has occurred at time t1 (flag = 0 indicates that DDR idle to full state has occurred, the default value is 1), which is mainly used to control the subsequent cyclic process so that the t1 time will not be updated incorrectly, resulting in rate calculation errors. When counting the time and DMA transfer number of the FPGA board DDR empty and full conversion process of the pre-detection recording device, the following steps are included:
[0084] In the initial state, the FPGA board DDR is idle, and the idle flag is set to 1;
[0085] When the FPGA board DDR is replaying data transmission, the FPGA board DDR status is read in real time;
[0086] If the DDR is not full and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded;
[0087] If the DDR is not full and the idle flag is 0, the number of DMA transfers is incremented;
[0088] If the DDR is full and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR idle to DDR full. The corresponding number of DMA transfers is saved as the number of DMA transfers from DDR idle to DDR full.
[0089] Specifically, after the pre-check recording device starts the playback service process, the transmission rate V from the computer memory to the DDR of the FPGA is set pd (unit: MB / S), the rate at which the FPGA's A / D module fetches data from DDR is V da (Unit: MB / S), DMA transfers data in units of 16MB each time. Figure 8 As shown in the figure, after several transmissions, the DDR of the FPGA board is full, where the number of transmissions in this stage is defined as M (i.e. Figure 8The capacity of DDR is 2GB, recorded as R (in MB). The time when DDR is empty is recorded as time t0, and the time when data transmission makes DDR full is recorded as time t1, time t = t1-t0, where t is in seconds. Figure 8 The process shown can be derived into the following two equations:
[0090] Formula 1: V pd *t=M*16
[0091] Formula 2: (V pd –V da )*t=R
[0092] Combining equation 1 and equation 2, we can get V da :
[0093] Formula 3:
[0094] By removing the constant from Equation 3, we can know that the rate at which the FPGA's A / D module fetches data from DDR is V da The count M is related to the time t. The pre-test recording device software can calculate the actual value and judge the health status and fault module of the device by comparing the proximity between the actual value and the theoretical value. da If the value is too small, it means that there is redundancy in the DDR circuit processing or the board clock cycle is inaccurate, and the design of this part needs to be checked; V da If the value is too large, it means that the board clock cycle is inaccurate or the D / A module is faulty.
[0095] The fault diagnosis process in the operation phase of this embodiment also includes the fault diagnosis of the data collection process. Figure 2 The process of transferring the board DDR data to the computer memory by calling DMA in the numbers 6 and 7 is as follows: Fig. 9 As shown, the pre-detection recording device software starts continuous data transmission, obtains the flag status of whether the FPGA's DDR is empty, and decides whether to perform DMA data transmission to the DDR in the next step according to the idle or busy status of the DDR.
[0096] Furthermore, Figure 2 The A / D modules corresponding to the numbers 5, 6, and 7 send data to the DDR, and then the FPGA IP core receives the data from the DDR and forwards it to the computer's memory. Fig.10 As shown, Fig.10Where count indicates the number of DMA transfers from DDR full to DDR idle; flag variable indicates that DDR full to DDR idle has occurred at time t1 (flag = 0 indicates that DDR has been in a state from full to idle, the default value is 1), which is mainly used to control the subsequent cyclic process so that the t1 time will not be updated incorrectly, resulting in rate calculation errors. When counting the time and DMA transfer number of the FPGA board DDR empty-full conversion process of the pre-detection recording device, the following steps are included:
[0097] In the initial state, the FPGA board DDR is full, and the idle flag is set to 1;
[0098] When the FPGA board DDR is collecting and transmitting data, the FPGA board DDR status is read in real time;
[0099] If the DDR is not empty and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded;
[0100] If the DDR is not empty and the idle flag is 0, the DMA transfer count is incremented;
[0101] If the DDR is idle and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR full to DDR idle process, and the corresponding DMA transfer number is saved as the DMA transfer number from DDR full to DDR idle process.
[0102] Specifically, after the recording device starts the acquisition service process, it sets the transmission rate V from the FPGA DDR to the computer memory. dp (unit: MB / S), the rate at which the FPGA's A / D module transmits data to the DDR is V ad (Unit is MB / S), the DMA data transmission unit size is 16MB of data each time, as shown in the figure below. After several transmissions, the DDR of the FPGA board is in an idle state, where the number of transmissions in this stage is defined as M (i.e., the count number in the figure below). The capacity of DDR is 2GB, recorded as R (unit is MB). The time when DDR is full is recorded as time t0, and the time when data transmission makes DDR idle is recorded as time t1, time t = t1-t0, where t is in seconds. According to Fig.10 The process shown can be derived into the following two equations:
[0103] Formula 4: V dp *t=M*16
[0104] Formula 5: (V dp –V ad )*t=R
[0105] Combining equations 4 and 5, we can get Vad :
[0106] Formula 6:
[0107] By removing the constant in Equation 6, we can know the rate at which the FPGA's A / D module transmits data to the DDR: ad The count M is related to the time t. The pre-test recording device software can calculate the actual value and judge the health status and fault module of the device by comparing the proximity between the actual value and the theoretical value. ad If the value is too small, it means that there is redundancy in the DDR circuit processing or the board clock cycle is inaccurate, and the design of this part needs to be checked; V ad If the value is too large, it means that the board clock cycle is inaccurate or the D / A module is faulty.
[0108] It can be seen from Formula 3 and Formula 6 that when calculating the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR based on the time and the number of DMA transmissions, it includes: multiplying the number of DMA transmissions by the amount of data transmitted each time, subtracting the capacity of the FPGA board DDR, and then dividing the difference by the time to obtain the actual value of the data transmission speed.
[0109] Through analysis, it can be concluded that the probability of inaccurate clock cycle is extremely low, so the actual value is compared with the theoretical value to determine the component where the fault is located, including:
[0110] If the actual value is greater than the theoretical value, then there is a fault in the DDR processing circuit of the FPGA;
[0111] If the actual value is smaller than the theoretical value, there is a fault in the D / A module of the FPGA.
[0112] Through the above steps, the fault analysis table is obtained as shown in Table 1:
[0113] Table 1 Fault Analysis Table
[0114]
[0115]
[0116] Embodiment 2
[0117] This embodiment further provides a pre-inspection recording device fault diagnosis system, comprising a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute the pre-inspection recording device fault diagnosis method described in the first embodiment.
[0118] This embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the pre-detection recording device fault diagnosis method described in the first embodiment.
[0119] In summary, the present invention proposes a method for diagnosing faults of a pre-inspection recording device, and proposes a system for this method, in which disconnection isolation is set between the hardware components inside the device, the factor for fault diagnosis (transmission rate V) is found, and the reference value is calibrated; then, the fault diagnosis factor (transmission rate V and count M) is abstracted in a consumer-producer model in the actual operation of the project, and the module-level distribution of the fault is given.
[0120] The method of the invention is easy to implement and has high transplantability, can be implemented using C language, JAVA, and C++, and has a good engineering foundation.
[0121] The present invention has clear principles, direct fault presentation, and high reliability in diagnosis, and is an important and reliable basis for further troubleshooting.
[0122] The present invention partially covers the professional interweaving of hard disk performance, DMA transmission, PCIE bus, logic circuit, logic software, and application software. It can effectively clarify the distribution of design defects of application software personnel, hardware designers, and FPGA logic circuit designers in the research and development stage, reduce communication, and provide accurate clues for troubleshooting.
[0123] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for diagnosing faults of a pre-inspection recording device, It is characterized in that Troubleshooting during the development process includes the following steps: Disconnection and isolation are set between the hardware components of the pre-inspection recording device, and corresponding fault diagnosis factors are obtained. The fault diagnosis factors are compared with preset reference values to determine the component where the fault is located.
2. The method for diagnosing a fault of a pre-detection recording device according to claim 1, It is characterized in that Fault diagnosis during operation includes the following steps: The time and DMA transfer times of the FPGA board DDR empty-full conversion process of the pre-inspection recording device are counted, and the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR is calculated based on the time and the DMA transfer times. The actual value is compared with the theoretical value to determine the component where the fault is located.
3. The method for diagnosing faults of a pre-detection recording device according to claim 1, It is characterized in that When disconnection isolation is set between the hardware components of the pre-detection recording device and the corresponding fault diagnosis factor is obtained, the steps of setting disconnection isolation and obtaining the fault diagnosis factor when playing back the data specifically include: Disconnect the computer memory from the FPGA board IP core, read data from the computer storage disk to the computer memory, calculate the transmission rate V1 and use it as the corresponding fault diagnosis factor; Restore the connection between the computer memory and the FPGA board IP core, disconnect the computer storage disk from the computer memory, and disconnect the FPGA board IP core from the FPGA board DDR, transfer the computer memory data to the FPGA board IP core, calculate the transmission rate V2 and use it as the corresponding fault diagnosis factor; Restore the connection between the FPGA board IP core and the FPGA board DDR, keep the computer storage disk disconnected from the computer memory, disconnect the FPGA board DDR from the FPGA board A / D module, transfer the computer memory data to the FPGA board DDR, calculate the transmission rate V3 and use it as the corresponding fault diagnosis factor.
4. The method for diagnosing a fault of a pre-detection recording device according to claim 1, It is characterized in that When disconnection isolation is set between the hardware components of the pre-test recording device and the corresponding fault diagnosis factor is obtained, the steps of setting disconnection isolation and obtaining the fault diagnosis factor when collecting data are included, specifically including: Disconnect the computer memory from the FPGA board IP core, read data from the computer memory to the computer storage disk, calculate the transmission rate V1' and use it as the corresponding fault diagnosis factor; Restore the connection between the computer memory and the FPGA board IP core, disconnect the computer storage disk from the computer memory, and disconnect the FPGA board IP core from the FPGA board DDR, transfer the FPGA board IP core data to the computer memory, calculate the transmission rate V2' and use it as the corresponding fault diagnosis factor; Restore the connection between the FPGA board IP core and the FPGA board DDR, keep the computer storage disk disconnected from the computer memory, disconnect the FPGA board DDR from the FPGA board A / D module, transfer the FPGA board DDR data to the computer memory, calculate the transmission rate V3' and use it as the corresponding fault diagnosis factor.
5. The method for diagnosing faults of a pre-detection recording device according to claim 3 or 4, It is characterized in that The calculation of the transmission rate includes: dividing the amount of data transmitted per unit time by the time used to obtain the corresponding transmission rate.
6. The method for diagnosing faults of a pre-detection recording device according to claim 2, It is characterized in that When counting the time of the DDR empty-full conversion process and the number of DMA transfers of the FPGA board card of the pre-detection recording device, the following steps are included: In the initial state, the FPGA board DDR is idle, and the idle flag is set to 1; When the FPGA board DDR is replaying data transmission, the FPGA board DDR status is read in real time; If the DDR is not full and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded; If the DDR is not full and the idle flag is 0, the number of DMA transfers is incremented; If the DDR is full and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR idle to DDR full. The corresponding number of DMA transfers is saved as the number of DMA transfers from DDR idle to DDR full.
7. The method for diagnosing faults of a pre-detection recording device according to claim 2, It is characterized in that When counting the time of the DDR empty-full conversion process and the number of DMA transfers of the FPGA board card of the pre-detection recording device, the following steps are included: In the initial state, the FPGA board DDR is full, and the idle flag is set to 1; When the FPGA board DDR is collecting and transmitting data, the FPGA board DDR status is read in real time; If the DDR is not empty and the idle flag is 1, the idle flag is set to 0 and the current time t0 is recorded; If the DDR is not empty and the idle flag is 0, the DMA transfer count is incremented; If the DDR is idle and the idle flag is 0, the idle flag is set to 1 and the current time t1 is recorded. The difference between time t1 and t0 is calculated to obtain the time from DDR full to DDR idle process, and the corresponding DMA transfer number is saved as the DMA transfer number from DDR full to DDR idle process.
8. The method for diagnosing faults of a pre-detection recording device according to claim 2, It is characterized in that When calculating the actual value of the data transmission speed between the A / D module of the FPGA board and the DDR according to the time and the number of DMA transmissions, it includes: multiplying the number of DMA transmissions by the amount of data transmitted each time, subtracting the capacity of the FPGA board DDR, and then dividing the difference by the time to obtain the actual value of the data transmission speed.
9. The method for diagnosing faults of a pre-detection recording device according to claim 2, It is characterized in that Comparing the actual value with the theoretical value to determine the component where the fault is located includes: If the actual value is greater than the theoretical value, then there is a fault in the DDR processing circuit of the FPGA; If the actual value is smaller than the theoretical value, there is a fault in the D / A module of the FPGA.
10. A pre-inspection recording device fault diagnosis system, It is characterized in that The invention comprises a microprocessor and a computer-readable storage medium connected to each other, wherein the microprocessor is programmed or configured to execute the fault diagnosis method for a pre-detection recording device according to any one of claims 1 to 9.
