A kind of apparatus debugging method
Technical field
The present invention relates to equipment debugging more particularly to a kind of apparatus debugging methods.
Background technology
A new project is developed, debugs new a module or algorithm, formulates a new topo structure.It is required for
A large amount of manpower and materials are debugged and are tested.Usually all it is to write code volume when suffering a problem that in the process of development
After translating, code is burnt in dsp chip with emulator, observation phenomenon then again debugging modification code, operate repeatedly until
It brings the issue to a final solution.In addition, segment chip supports in-circuit emulation, some debugging methods can be increased, however emulator is expensive, increases
Add material resources cost.
The compiler that provided due to the debugging method of VC far more than chip manufacturer.Therefore by it is macro come distinguish VC and
Code under CCS translation and compiling environments, can be with the code of artificial debugging major part CCS using VC compilers.Problem most of in this way is just
It can be transferred under VC environment, debugging method is various, can be quickly found out where problem.In addition, it is added inside program
Debugging interface, can also slave device obtain some information, to solve the problems, such as and Optimized code.
The missing of debugging method, directly affects development progress.In debugging process, the tool of occupancy is more, and elapsed time is long,
The code efficiency write is low, and ultimately increases project development cost.And because of the project development time, lead to project delay,
Many chances can be lost.
Invention content
In order to solve the problems in the prior art, the present invention provides a kind of apparatus debugging methods.
The present invention provides a kind of apparatus debugging methods, include the following steps:
S1, analogue audio input, in VC programs, go according to the time interval of the 48K sample rates of equipment under a certain path
The audio file of a WAV form is read, exports finally by PC loud speakers, can be believed by the method with the audio of emulator
Number input to the end audio signal output overall process, VC give tacit consent to 0 channel input, 0 channel output, by changing simInPort
Input/output port can be changed with simOutPort;
S2, outloop and inloop;
S3, arbitrary channel levels are detected and are recorded;
S4, algorithm statistical information is checked.
As a further improvement on the present invention, step S2 is:It is false to give tacit consent to outloop and inloop, each
AudioIf interfaces carry out audio data frame statistics.
As a further improvement on the present invention, step S3 is:By control platform obtain specified by a certain channel of processor
Level value, and record data be then stored under working directory with PCM format.
As a further improvement on the present invention, step S4 is:Before entering, current CPU time, processor processing are recorded
After complete, the current CPU time is recorded, then carries out maximum value, minimum value, the calculating of average value, and reflects that the arg to system joins
Number, is consulted at any time.
As a further improvement on the present invention, step S3 includes following son:
S301, input;
S302, debugging are enabled, if value is false, export, if value is true, enter in next step;
S303, it just can be recorded, if value is false, exported, if value is true, send data to network interface;
Detection is enabled, if value is false, exports, if value is true, calculates level value;
S304, output.
As a further improvement on the present invention, step S4 includes following son:
S401, input;
S402, statistics are enabled, if value is false, calls processor algorithm and export, if value is true, into
Enter in next step;
S403, record time;
S404, processor algorithm is called;
S405, the time is calculated;
S406, output.
The beneficial effects of the invention are as follows:Through the above scheme, using VC assist emulate, by set breakpoint, allocating stack,
Check memory headroom can quickly finder editor the problem of where;It, can be more true when debugging processor algorithm
Emulate actual audio data stream process, in VC compilers, anywhere check data, addition code, by algorithm gained
The data write-in fixed disk file arrived, facilitates debugging;Simultaneously in the most of the time, compiling can be saved, packing, burning, restarted
The sequence of operations such as equipment, have saved greatly time cost.
Description of the drawings
Fig. 1 is recording and the overhaul flow chart of a kind of apparatus debugging method of the present invention.
Fig. 2 is a kind of time calculation flow chart of the processor of apparatus debugging method of the present invention.
Fig. 3 is a kind of flow graph of the audio signal of apparatus debugging method of the present invention in system.
Specific embodiment
The present invention is further described for explanation and specific embodiment below in conjunction with the accompanying drawings.
As shown in Figure 1 to Figure 3, a kind of apparatus debugging method, includes the following steps:
1. analogue audio inputs
In VC programs, one WAV form of reading under a certain path is removed according to the time interval of the 48K sample rates of equipment
Audio file is exported finally by PC loud speakers.Audio to the end can be inputted with the audio signal of emulator by the method
The overall process of signal output.VC gives tacit consent to the input of 0 channel, the output of 0 channel.It can be with by changing simInPort and simOutPort
Change input/output port.It in debugging process, can be saved than more actually emulating the effect of internal processor algorithm in this way
CCS compilings are packaged, restart, all multi-step such as operation.
2. outloop and inloop
In current double-core processing, containing multiple audioIf interfaces such as anologIf, uppIf, netAudioIf, such as
Fruit whole system can not work normally, how quickly to position host CPU or from CPU the problem of or analogue audio frequency driving, number
The problem of word audio driven, UPP is always a more difficult means.In the present solution, proposing outloop and inloop
Concept makes this problem become masterly.Fig. 3 is the flow graph of system audio signal and outloop and inloop mark
Position, system default outloop and inloop are false.Meanwhile also have audio data frame statistics in each audioIf interfaces,
It, can more quick problem analysis place by each interface.
3. pair arbitrary channel levels detection and recording
As soon as after a new Topo structures are formulated, tend not to disposably have sound output.According to topo structures to every
The a certain channel of one algorithm processor is monitored into line level, you can where the problem of quick positioning topo is formulated.Likewise,
During debugging algorithm, audio signal is passed through after algorithm, and it is most important that kind of variation occurs.Traditional test method is main
It is to be analyzed by the output signal to simulation output port, what it is due to acquisition is all analog signal, is not digitized, and
And other algorithms after algorithm output also after topo, analyze inconvenience.Each processor of this programme it is every
One channel is added to the debugging methods such as recording and detection to the channel to audio data processing, total enabled by one,
The utilization rate of CPU, specific flow chart such as Fig. 3 can be improved.It can be obtained by Win- TosClient. Exe control platforms
The level value of the specified a certain channel of processor, and the data recorded then are stored in Win- TosClient. Exe with PCM format
Under working directory, the coolEdit either professional softwares such as audio can be used to be analyzed.
4. check algorithm statistical information
This system includes comprehensive and accurate statistical information, including including single algorithm, overall algorithm, data frame period, main line
Journey, from thread, the maximum time of data thread, minimum time, average time.With the maximum time of computation processor algorithm, most
The small time for average time, before entering, records the current CPU time, after processor has been handled, when recording current CPU
Between, maximum value, minimum value, the calculating of average value, and the arg parameters reflected to system are then carried out, is consulted at any time.
A kind of apparatus debugging method provided by the invention, ARM, DSP program code share same set of code, pass through Hong Lai areas
Lacing is translated so that it is convenient to manage debugging.And support VC artificial debuggings, because being emulated using VC compilers, can be configured disconnected
Point, checks variate-value, checks many debugging methods such as category information, allocating stack.Can settlement procedure to the greatest extent BUG.
Under normal conditions, VC can compile by and normal operation, the ARM under CCS, DSP programs are also without making too many modification just
It can compile through simultaneously normal operation.In system, many Debugging message have also been reserved.It is controlled by Win-TosClient.exe
Where platform can open debugging method and obtain code issue according to these debugging methods.These Debugging message VC and equipment
Debugging.
A kind of apparatus debugging method provided by the invention has the following advantages:
1. using VC auxiliary emulation, by setting breakpoint, allocating stack, checking that memory headroom can quick finder
Where the problem of editor.When debugging processor algorithm, the process of actual audio data stream more can be really emulated, is compiled in VC
It translates in device, anywhere checks data, addition code, fixed disk file is written into data obtained in algorithm, facilitate debugging.Together
When in the most of the time, the sequence of operations such as compiling, packing, burning, restarting equipment can be saved, saved greatly the time into
This.
2. BUG occur in program and topo, no sound output is caused either to export abnormal, can set
The inloop of the interfaces such as anologIf, uppIf, netAudioAnd if the debugging method of outloop, quickly by problem be contracted to compared with
Then small range is solved the problems, such as by other debugging methods.
3. in the channel output of each processor, all containing functions such as detection, recording.Due to running knot under VC environment
When fruit disagrees with physical device operation result, internal actual audio data can be analyzed by the debugging method of recording.
Meanwhile the internal testing mechanism for increasing similar probe, can processor algorithm one by one channel one by one carry out level value obtain with
And the error count during communication of equipment internal audio frequency data.
It 4. by checking the time parameters such as internal algorithm, processor, thread, can be optimal program operation.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, it is impossible to assert
The specific implementation of the present invention is confined to these explanations.For those of ordinary skill in the art to which the present invention belongs, exist
Under the premise of not departing from present inventive concept, several simple deduction or replace can also be made, should all be considered as belonging to the present invention's
Protection domain.