A kind of apparatus debugging method
Technical field
The present invention relates to equipment debugging, particularly relate to a kind of apparatus debugging method.
Background technology
Develop a new project, debug a new module or algorithm, formulate a new topo structure. It is required for substantial amounts of manpower and materials to carry out debugging and testing. When suffering a problem that on stream, being generally all, after writing code compilation, be burnt in dsp chip with emulator by code, observe phenomenon and then again debug amendment code, repeatable operation to the last solves problem. It addition, segment chip supports in-circuit emulation, it is possible to increase some debugging methods, but emulator is expensive, increase material resources cost.
Due to the compiler that the debugging method of VC to provide far more than chip manufacturer. Therefore by the grand code distinguished under VC and CCS translation and compiling environment, use the VC compiler can the code of artificial debugging major part CCS. So major part problem just can be transferred under VC environment, and debugging method is various, it is possible to be quickly found out problem place. It addition, add some debugging interfaces inside program, it is also possible to obtain some information from equipment, solve problem Optimized code.
The disappearance of debugging method, directly affects development progress. In debugging process, the instrument taken is many, and elapsed time is long, and the code efficiency write is low, and ultimately increases project development cost. And because the project development time, cause project delay, many chances can be lost.
Summary of the invention
In order to solve the problems of the prior art, the invention provides a kind of apparatus debugging method.
The invention provides a kind of apparatus debugging method, comprise the following steps:
S1, analogue audio input, in VC program, remove to read under a certain path the audio file of a WAV form according to the interval of the 48K sample rate of equipment, export finally by PC speaker, the audio signal of emulator the overall process of last audio signal output can be input to by the method, VC gives tacit consent to 0 passage input, 0 passage output, can change input/output port by changing simInPort and simOutPort;
S2, outloop and inloop;
S3, to any channel levels detection and record between;
S4, check algorithm statistical information.
As a further improvement on the present invention, step S2 is: acquiescence outloop and inloop are false, carry out audio data frame statistics at each audioIf interface.
As a further improvement on the present invention, step S3 is: obtained the level value of the specified a certain passage of processor by parametric controller, the data recorded then are saved under working directory with PCM format.
As a further improvement on the present invention, step S4 is: before entering, records current CPU time, after processor has processed, record current CPU time, then carry out maximum, minima, the calculating of meansigma methods, and reflect the arg parameter to system, consult at any time.
As a further improvement on the present invention, step S3 includes following son:
S301, input;
S302, debugging enable, if value is false, then export, if value is true, then enter next step;
S303, just can carry out recording, if value is false, then export, if value is true, then send data to network interface; Detection enables, if value is false, then exports, if value is true, then calculates level value;
S304, output.
As a further improvement on the present invention, step S4 includes following son:
S401, input;
S402, statistics enable, if value is false, then calls processor algorithm and export, if value is true, then enter next step;
S403, record time;
S404, call processor algorithm;
S405, calculating time;
S406, output.
The invention has the beneficial effects as follows: by such scheme, adopt VC auxiliary emulation, by arranging breakpoint, allocating stack, checking memory headroom can the problem place of quick finder editor; During debugging processor algorithm, it is possible to the process of comparatively real artificial actual voice data stream, in VC compiler, anywhere check data, add code, data obtained in algorithm are write fixed disk file, convenient debugging; Simultaneously in the most of the time, it is possible to save the sequence of operations such as compiling, packing, burning, restarting equipment, saved greatly time cost.
Accompanying drawing explanation
Fig. 1 is recording and the overhaul flow chart of a kind of apparatus debugging method of the present invention.
Fig. 2 is the Time Calculation flow chart of the processor of a kind of apparatus debugging method of the present invention.
Fig. 3 is the audio signal flow graph in system of a kind of apparatus debugging method of the present invention.
Detailed description of the invention
Illustrate below in conjunction with accompanying drawing and detailed description of the invention the present invention is further described.
As shown in Figure 1 to Figure 3, a kind of apparatus debugging method, comprise the following steps:
1. analogue audio input
In VC program, remove to read under a certain path the audio file of a WAV form according to the interval of the 48K sample rate of equipment, export finally by PC speaker. The audio signal of emulator the overall process of last audio signal output can be input to by the method. VC gives tacit consent to 0 passage input, 0 passage output. Input/output port can be changed by changing simInPort and simOutPort. So can emulate the effect of internal processor algorithm more really, in debugging process, eliminate CCS compiling, packing, restart, all multi-steps such as operation.
2. outloop and inloop
In current double-core processes, containing anologIf, uppIf, multiple audioIf interface such as netAudioIf, if whole system cannot normal operation, how quickly location is host CPU or from the problem of CPU, or analogue audio frequency drives, DAB drives, the problem of UPP, is always up means of comparatively difficulty. In this programme, it is proposed to the concept of outloop and inloop, this problem is made to become masterly. Fig. 2 is the flow graph of system audio signal and outloop and inloop mark position, system default outloop and inloop is false. Meanwhile, audio data frame is also had to add up at each audioIf interface, by each interface, it is possible to more quickly problem analysis place.
3. pair detection of any channel levels and recording
Formulating after a new Topo structure, tending not to disposable just have voice output. According to topo structure, a certain passage of each APU is carried out level monitoring, can quickly position the topo problem place formulated. Same, in debugging algorithm process, what kind of change is audio signal, after algorithm, occur most important. Traditional method of testing is analyzed mainly by the output signal of analog output mouth, is all analogue signal due to what gather, it does not have digitized, and, also other algorithm after topo after algorithm output, analyze inconvenience. Voice data is processed and with the addition of the debugging methods such as the recording to this passage and detection by each passage of each processor of this programme, by a total enable, it is possible to improve the utilization rate of CPU, concrete flow chart such as Fig. 3. The level value of a certain passage of specified processor can be obtained by Win-TosClient.Exe parametric controller, the data recorded then are saved under Win-TosClient.Exe working directory with PCM format, it is possible to use the professional softwares such as coolEdit or audio are analyzed.
4. check algorithm statistical information
Native system comprises comprehensive and accurate statistical information, including include single algorithm, overall algorithm, Frame interval, main thread, from thread, the maximum time of data thread, minimum time, average time. With the maximum time of computation processor algorithm, minimum time, average time is example, before entering, record current CPU time, after processor has processed, record current CPU time, then carry out maximum, minima, the calculating of meansigma methods, and reflect the arg parameter to system, consult at any time.
A kind of apparatus debugging method provided by the invention, ARM, DSP program code shares same set of code, distinguishes compiling by grand, so conveniently manages debugging. And support VC artificial debugging, because using the emulation of VC compiler, it is possible to be configured breakpoint, check variate-value, check many debugging methods such as category information, allocating stack. Can the BUG of maximum settlement procedure. Under normal circumstances, VC can compile by and properly functioning, ARM, DSP program under CCS also without make too many amendment just can compile by and properly functioning. In system, many Debugging message are also reserved. Debugging method can be opened by Win-TosClient.exe control station and obtain code issue place according to these debugging methods. These Debugging message VC and the equal adjustable of equipment.
A kind of apparatus debugging method provided by the invention has the advantage that
1. adopting VC auxiliary emulation, by arranging breakpoint, allocating stack, checking memory headroom can the problem place of quick finder editor. During debugging processor algorithm, it is possible to the process of comparatively real artificial actual voice data stream, in VC compiler, anywhere check data, add code, data obtained in algorithm are write fixed disk file, convenient debugging. Simultaneously in the most of the time, it is possible to save the sequence of operations such as compiling, packing, burning, restarting equipment, saved greatly time cost.
2. when there is BUG in program and topo, cause there is no voice output or export abnormal, the inloop of the interfaces such as anologIf, uppIf, netAudioAnd if the debugging method of outloop can be set, quickly problem is contracted to less scope, then passes through other debugging method to solve problem.
3., in the passage of each processor exports, all contain the functions such as detection, recording. Due to when under VC environment, operation result and physical device operation result disagree, it is possible to analyze internal actual audio data by the debugging method recorded. Meanwhile, the internal testing mechanism increasing similar probe, it is possible to the error count when passage one by one of processor algorithm carries out level value acquisition and device interior voice data communication one by one.
4. by checking the time parameters such as internal algorithm, processor, thread, it is possible to make program run and reach optimum.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, it is impossible to assert that specific embodiment of the invention is confined to these explanations. For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, it is also possible to make some simple deduction or replace, protection scope of the present invention all should be considered as belonging to.