Sonar equipment embedded software debugging method based on vivado

Through the embedded software debugging method based on Vivado, the problems existing in signal reception and analysis processing of sonar devices during software debugging are solved, and an efficient and accurate debugging process is realized, which simplifies operations and improves the experience of debuggers.

CN119883864APending Publication Date: 2025-04-25CHINA SHIPBUILDING MARINE EXPLORATION TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411917094.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

During the software debugging process of sonar equipment, the signal reception and analysis processing have problems such as inability to transmit signals, high noise, and invalid signals, which leads to time-consuming and labor-intensive debugging methods and limited accuracy.

Method used

The embedded software debugging method based on Vivado is adopted, and the communication and connection between the receiving module circuit board and the Vivado debugging system is carried out, and the serial port, network port and downloader are used to realize online debugging. The steps include building an experimental environment, starting the debug interface, confirming the networking, viewing working parameters in Debug mode, calculating the magnification, comparing the actual and theoretical values, and troubleshooting problems.

Benefits of technology

It effectively solves the problems of inability to transmit signals, high noise, and invalid signals, improves the effectiveness of signals and the accuracy of measurement results, simplifies the debugging process, reduces the workload, and improves the experience of debuggers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883864A_ABST
    Figure CN119883864A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of embedded software design, in particular to a vivado-based sonar equipment embedded software debugging method. A circuit involved in the method comprises a receiving module circuit board, the receiving module circuit board communicates with the Vivado debugging system and is connected with a signal source and a power module, and the signal source is divided into a high-frequency signal and a low-frequency signal; the Vivado debugging system is loaded on the debugging machine, the debugging machine and the receiving module circuit board are connected with a serial port, an internet access and a downloader, the internet access is used for issuing working parameters by the debugging machine, the serial port is used for receiving printing information of the debugging machine returned by the module circuit board, and the downloader is used for online debugging of a program. Whether debugging succeeds or not is judged by comparing whether the actual total magnification A is consistent with the calculated theoretical total magnification B. According to the method, time and labor are saved, background noise existing in an oscilloscope is avoided, and the accuracy of a measurement result is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of embedded software design, and in particular to a sonar device embedded software debugging method based on vivado. Background Art

[0002] Sonar equipment has high requirements for system stability and real-time performance, and equipment operators are required to make real-time judgments on the current status of the equipment, so the equipment software needs to be debugged. During the software debugging of the sonar equipment, the signal reception and analysis processing of the receiving unit have problems such as signal failure to transmit, high noise, and invalid signal. The traditional method is to use instruments to test the actual output values ​​of each level of the circuit step by step, and then compare them with the theoretical calculated values. To read the values ​​with instruments such as oscilloscopes or multimeters, it is necessary to measure and check at each level of the signal conditioning circuit. This method is too time-consuming and labor-intensive, with a large workload and is complicated; the oscilloscope itself has background noise, which affects the accuracy of the measurement results; and it is not easy to read when measuring small signals, which will cause large errors. Therefore, a solution is urgently needed to replace the above solution to solve the problems of signal failure to transmit, high noise, and invalid signal in the signal reception and analysis processing process. Summary of the invention

[0003] The problem to be solved by the present invention is to propose a solution to replace the traditional method, so as to solve the problems of signal reception and analysis processing in the software debugging process of sonar equipment, such as signal transmission failure, large noise, invalid signal, etc.

[0004] In view of the deficiencies of the prior art, the technical solution adopted by the present invention to solve the technical problems is: a sonar device embedded software debugging method based on Vivado, the circuit involved in the method includes a receiving module circuit board, the receiving module circuit board communicates with the Vivado debugging system and is connected to a signal source and a power module, the signal source is divided into a high-frequency signal and a low-frequency signal; the Vivado debugging system is loaded on a debugging machine, the debugging machine and the receiving module circuit board are connected with three lines of a serial port, a network port and a downloader, wherein the network port is used for the debugging machine to send working parameters, the serial port is used for the receiving module circuit board to return print information to the debugging machine, and the downloader is used for online debugging of the program, comprising the following steps,

[0005] Step 1: Build the experimental environment;

[0006] Step 2: Start the software debugging interface;

[0007] Step 3: Confirm that the debugging machine and the device are connected to the Internet successfully;

[0008] Step 4: Pause the program in Debug mode to view the working parameters;

[0009] Step 5: Run the program to display data and calculate the actual total amplification factor A of the receiving module amplifier circuit;

[0010] Step 6: Calculate the theoretical total gain B of the receiving module amplifier circuit module according to the numerical value given in the code;

[0011] Step 7. Compare the actual total magnification A with the calculated theoretical total magnification B. If the actual total magnification A is consistent with the theoretical total magnification B, it means that the amplifier circuit is working normally, the software and hardware have passed the test, and the debugging is successful; if the actual and theoretical are not consistent, start to check for possible problems;

[0012] Step 8: Check whether the program code is wrong; if there is an error, start debugging from step 3 after the error is corrected, until the software and hardware pass the test, that is, the debugging is successful;

[0013] Step 9: Check if the wiring is loose; after troubleshooting, start debugging from step 3 until the software and hardware pass the test, which means the debugging is successful;

[0014] Step 10: Check each level of amplifier circuit.

[0015] Preferably, the operating parameters described in step 4 include operating frequency, operating range, transmission pulse width and code value amplification factor and fine-tuning.

[0016] Preferably, the calculation process of the actual total amplification factor A of the receiving module amplifier circuit in step 5 is as follows: after confirming that the working command and parameters sent by the debugging machine to the receiving module circuit board are correct, run the program, check the final output waveform on the debugging machine, and use an oscilloscope to measure the last-level output waveform of the receiving circuit; calculate the actual total amplification factor A according to the maximum amplitude number of the waveform and the maximum amplitude measured by the oscilloscope, and the calculation formula is as follows:

[0017]

[0018] Among them, V out Indicates the final output signal voltage value, V e represents the amplitude voltage measured by the oscilloscope, X represents the maximum amplitude of the waveform, x represents the maximum amplitude read in each subsequent test waveform, A represents the actual total amplification factor of the receiving module amplifier circuit, V in Indicates the input voltage of the signal source.

[0019] Preferably, the theoretical total gain B of the receiving module amplifying circuit module described in step six is ​​determined by the program design and the chip manual of the chip in the amplifying circuit.

[0020] Preferably, the specific process of step ten is as follows: first, use an oscilloscope to test whether the output of each stage of amplification in the amplifier circuit module is correct. If it is correct, there is no hardware problem with the amplifier circuit at this stage; if it is not correct, check whether there are hardware problems such as cold soldering or chip damage in the amplifier circuit at this stage. After checking, start debugging from step three until the software and hardware pass the test, that is, the debugging is successful.

[0021] The beneficial effects of the present invention are as follows:

[0022] (1) The present invention connects the receiving unit to the debugging machine through a connector, and can directly debug the receiving unit circuit board on the debugging machine through the serial port and the network port, thereby avoiding the problem of signal transmission failure, checking whether the image after high and low frequency reception processing is correct, avoiding the background noise of the oscilloscope itself, reducing the influence of noise, and ensuring the validity of the signal and the accuracy of the measurement result;

[0023] (2) It can realize convenient human-computer interaction, improve the debugging experience of personnel, reduce workload, and save time and effort. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a general logic diagram of system debugging based on vivado of the present invention;

[0025] Figure 2 The invention relates to a circuit connection diagram. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

[0027] In order to solve the problem raised in the background technology, the present invention provides a sonar device embedded software debugging method based on vivado, such as Figure 2Shown is a schematic diagram of the circuit connection involved in the method of the present invention, the receiving module circuit board connects the signal source and the power module, and communicates with the Vivado debugging system, wherein the signal source is divided into two cases of high-frequency signal and low-frequency signal, the low-frequency signal is a signal of 101kHz, and the high-frequency signal is a signal of 501kHz. The amplitude of the high-frequency signal and the low-frequency signal can change at any time with different magnifications, and the minimum is not less than 1mV, and the signal source is connected to the receiving module circuit board through two lines of the signal line and the ground line. The power module is set to +24v, and the current value is about 130mA. The Vivado debugging system is loaded on the debugging machine, and the debugging machine is connected to the receiving module circuit board with three lines of serial port, network port, and downloader, wherein the network port is used for the debugging machine to issue working parameters, the serial port is used for the receiving module circuit board to return the debugging machine to print information, and the downloader is used for online debugging of the program.

[0028] First complete the single configuration item test, and then proceed to system debugging. Figure 1 This is the general logic diagram for debugging the method of the present invention. The specific general logic for system debugging is to connect the receiving module circuit board to the debugging machine after setting up the experimental environment, and a serial port, a downloader and a network port are required at the same time. After the receiving module circuit board is powered on, the receiving module circuit board starts to work, and the debugging machine starts to send commands to the receiving module circuit board; the debug mode is entered through the Vivado SDK, and the program is paused to view the data received by the receiving module for comparative analysis; after the result is correct, the program continues to run to check whether the final image data is correct.

[0029] A sonar device embedded software debugging method based on vivado, the steps are as follows:

[0030] Step 1: Set up the experimental environment: The signal source provides a signal within the bandwidth, which is a sine wave signal with an amplitude of not less than 1mV; connect the signal to the high-frequency channel, connect the power supply, serial port, network port and JTAG downloader. Turn on the power supply, set the voltage to +24V, and the current to about 130mA.

[0031] Step 2. Start the software debugging interface: Open the Vivado program, click "launch SDK", start the SDK debugging interface, click "debug system", enter the debug mode, and click "resume" to run the program; in this mode, the resume and suspend modes can start and suspend the program at any time.

[0032] Step 3. Confirm that the debugging machine and the device are successfully connected to the network: Confirm that the IP address of the debugging machine has been changed to 192.168.1.200, and the network of the sonar receiving module is 192.168.1.22; press the "win+R" shortcut key to call out the operation panel, enter "ping 192.168.1.22", if it is successful, the network is successful, otherwise troubleshoot the problem.

[0033] Step 4: The working parameters to be checked are those sent by the debugging machine, including working frequency, working range, transmitting pulse width, code value amplification factor and fine-tuning, etc. After the debugging machine sends the working parameters, click the SDK "suspend" button to suspend the program, add structure variables in the expressions window, and the variables that have changed after the program is suspended will be highlighted to check whether the receiving module has received the correct value.

[0034] Step 5. Run the program to display data and calculate the actual total gain A of the receiving module amplifier circuit: After confirming that the working command and parameters (hereinafter referred to as command) sent by the debugging machine to the receiving module circuit board are correct, run the program to view the final output waveform on the debugging machine, and use an oscilloscope to measure the output waveform of the last stage of the receiving circuit. Calculate the proportional relationship based on the maximum amplitude of the waveform and the maximum amplitude measured by the oscilloscope. In the subsequent measurement process, the actual gain of the final output signal can be directly obtained on the graph based on the proportional relationship. The calculation formulas are shown in (1) and (2):

[0035]

[0036] Among them, V out Indicates the final output signal voltage value, V e represents the amplitude voltage measured by the oscilloscope, X represents the maximum amplitude of the waveform, x represents the maximum amplitude read in each subsequent test waveform, A represents the actual total amplification factor of the receiving module amplifier circuit, V in Indicates the input voltage of the signal source.

[0037] Step 6: Calculate the theoretical total gain B of the receiving module amplifier circuit module according to the value given in the code. The value is determined by the program design and the chip manual of the chip in the amplifier circuit. Take the four-stage amplifier circuit as an example. The code gives "2222", so the gain is 2 4 , that is 16 times.

[0038] Step 7. Compare the actual total magnification A with the calculated theoretical total magnification B. If the actual total magnification A is consistent with the theoretical total magnification B, it means that the amplifier circuit is working normally, and the software and hardware have passed the test, that is, the debugging is successful; if the actual and theoretical are not consistent, start to check for possible problems.

[0039] Step 8. Check whether the program code is wrong. There may be problems such as failure to send values ​​or incorrect value content. If there are errors, start debugging from step 3 after correction until the software and hardware pass the test, which means the debugging is successful.

[0040] Step 9. Check whether the wiring is loose. The network cable socket, signal source port, power cord and other connecting wires in the debugging environment may be loose. Poor contact will affect the final value. After troubleshooting, start debugging from step 3 until the software and hardware pass the test, which means the debugging is successful.

[0041] Step 10. Check each level of the amplifier circuit: Use an oscilloscope to test whether the output of each level of the amplifier in the amplifier circuit module is correct. Take the code "2222" as an example. The amplification factor of each level of the four-level amplification is 2. Use an oscilloscope to test whether the amplification factor of each level is 2. If it is correct, there is no hardware problem with the amplifier circuit at this level; if it is not correct, check whether there are hardware problems such as cold soldering or chip damage in the amplifier circuit at this level. After checking, start debugging from step 3 until the software and hardware pass the test, which means the debugging is successful.

[0042] The present invention connects the receiving unit to the debugging machine through a connector, and can directly debug the receiving unit circuit board on the debugging machine through the serial port and the network port to check whether the images after high and low frequency reception processing are correct, thereby solving the problems of signal transmission failure, high noise, invalid signal, etc. in the signal reception and analysis processing process, avoiding the background noise of the oscilloscope itself, and ensuring the accuracy of the measurement result; the convenient human-computer interaction improves the debugging personnel's experience, reduces the workload, saves time and effort.

Claims

1. A sonar device embedded software debugging method based on Vivado, the method involves a circuit comprising a receiving module circuit board, the receiving module circuit board communicates with the Vivado debugging system and is connected to a signal source and a power module, the signal source is divided into a high-frequency signal and a low-frequency signal; The Vivado debugging system is loaded on the debugging machine. The debugging machine is connected to the receiving module circuit board through three lines: serial port, network port, and downloader. The network port is used for the debugging machine to send working parameters, the serial port is used for the receiving module circuit board to return the printing information to the debugging machine, and the downloader is used for online debugging of the program. It is characterized by: including the following steps, Step 1: Build the experimental environment; Step 2: Start the software debugging interface; Step 3: Confirm that the debugging machine and the device are connected to the Internet successfully; Step 4: Pause the program in Debug mode to view the working parameters; Step 5: Run the program to display data and calculate the actual total amplification factor A of the receiving module amplifier circuit; Step 6: Calculate the theoretical total gain B of the receiving module amplifier circuit module according to the numerical value given in the code; Step 7. Compare the actual total magnification A with the calculated theoretical total magnification B. If the actual total magnification A is consistent with the theoretical total magnification B, it means that the amplifier circuit is working normally, the software and hardware have passed the test, and the debugging is successful; if the actual and theoretical are not consistent, start to check for possible problems; Step 8: Check whether the program code is wrong; if there is an error, start debugging from step 3 after the error is corrected, until the software and hardware pass the test, that is, the debugging is successful; Step 9: Check if the wiring is loose; after troubleshooting, start debugging from step 3 until the software and hardware pass the test, which means the debugging is successful; Step 10: Check each level of amplifier circuit.

2. The vivado-based sonar device embedded software debugging method according to claim 1, characterized in that: The operating parameters described in step 4 include operating frequency, operating range, transmit pulse width, and code value amplification factor and fine-tuning.

3. The vivado-based sonar device embedded software debugging method according to claim 2, characterized in that: The calculation process of the actual total amplification factor A of the receiving module amplifier circuit described in step 5 is as follows: after confirming that the working command and parameters sent by the debugging machine to the receiving module circuit board are correct, run the program, check the final output waveform on the debugging machine, and use an oscilloscope to measure the output waveform of the last stage of the receiving circuit; calculate the actual total amplification factor A according to the maximum amplitude of the waveform and the maximum amplitude measured by the oscilloscope, and the calculation formula is as follows: Among them, V out Indicates the final output signal voltage value, V e represents the amplitude voltage measured by the oscilloscope, X represents the maximum amplitude of the waveform, x represents the maximum amplitude read in each subsequent test waveform, A represents the actual total amplification factor of the receiving module amplifier circuit, V in Indicates the input voltage of the signal source.

4. The vivado-based sonar device embedded software debugging method as claimed in claim 3, characterized in that: The theoretical total gain B of the receiving module amplifier circuit module described in step 6 is determined by the program design and the chip manual of the chip in the amplifier circuit.

5. The vivado-based sonar device embedded software debugging method according to claim 1, characterized in that: The specific process of step ten is as follows: first, use an oscilloscope to test whether the output of each stage of the amplifier in the amplifier circuit module is correct. If it is correct, there is no hardware problem with the amplifier circuit at this stage; if it is not correct, check whether there are hardware problems such as cold soldering or chip damage in the amplifier circuit at this stage. After checking, start debugging from step three until the software and hardware pass the test, that is, the debugging is successful.