Summary of the invention
Technical matters to be solved by this invention is, in same system, by configuration parameter, obtains the performance number of different demand.
In order to solve this technical problem, the invention provides a kind of method obtaining performance number, comprising:
Step one, a signal system is divided into multiple frame according to given protocol, each frame is divided according to given protocol, obtains multiple subframe;
Step 2, acquisition demand according to N number of performance number, arrange N group configuration parameter, the configuration parameter often organized is: the combination of a subframe or multiple continuous subframes, and N is at least 2;
Step 3, according to a demand, select the i-th group configuration parameter corresponding to described demand from N group, system, according to the i-th group configuration parameter, finds the time period of the combination correspondence of a subframe or multiple continuous subframes, is designated as ti, wherein i=[1, N];
Timing is carried out to described signal system, the time at any a moment is designated as t;
Judge whether t is included in ti, is, open enable signal, otherwise close enable signal;
When opening enable signal, within the ti time period, power calculation is carried out to the electric signal in described signal system, by the performance number reporting calculated;
Judging whether other demands in addition, is from N group, select a group configuration parameter corresponding to other demands described, complete the power calculation under corresponding configuration parameter, otherwise, terminate.
Further, described step 3 specifically comprises:
Locating the position of each subframe with the time, using there is 0 point of the time of frame head indicator signal as timing, the end time of a frame being designated as T;
According to a demand, from N group, select the i-th group configuration parameter corresponding to described demand, according to the i-th group configuration parameter, find a period of time of the combination correspondence of a subframe or multiple continuous subframes, be designated as ti, wherein i=[1, N], ti=[T1, T2], T1, T2 are less than T.
Further, described a period of time is the time of individual system clock and the product of system clock number; Describedly timing is carried out to signal system, by obtaining the counting of system clock number.
Further, the frequency of described system clock is F MHz, and the time shared by a frame is T ' ms, then the system clock number cnt=FxT ' x10 shared by a frame
3.
Further, any one subframe described is subdivided into time slot 0 and time slot 1.
Further, the described configuration parameter often organized is: a time slot in a subframe or the combination of multiple continuous subframes.
The number of described subframe is 10, and described subframe comprises: subframe 0 ~ subframe 9.
The invention provides a kind of method obtaining performance number, guarantee electronics or communication system, configuration parameter can be passed through, complete the power calculation of different demand, to ensure that same system passes through configuration parameter, the performance number of different demand can be obtained, to analyze the duty of this system, performance and fault, thus high degree facilitates this system research and development to test, reduce this system O&M cost, Improving The Quality of Products.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
See Fig. 1, the invention provides a kind of method obtaining performance number, comprising:
Step one, a signal system is divided into multiple frame according to given protocol, each frame is divided according to given protocol, obtains multiple subframe;
Step 2, acquisition demand according to N number of performance number, arrange N group configuration parameter, the configuration parameter often organized is: the combination of a subframe or multiple continuous subframes, and N is at least 2;
Step 3, according to a demand, from N group, select a group configuration parameter, the time period that system finds this group configuration parameter corresponding, during this period of time, power calculation is carried out to the electric signal in described signal system, by the performance number reporting calculated; If also have other demands, from N group, select corresponding configuration parameter, complete the power calculation under corresponding configuration parameter.
Further, see Fig. 2, described step 3 specifically comprises:
S301: according to a demand, selects the i-th group configuration parameter corresponding to described demand from N group, and system, according to the i-th group configuration parameter, finds the time period of the combination correspondence of a subframe or multiple continuous subframes, is designated as ti, wherein i=[1, N];
S302: carry out timing to described signal system, is designated as t by the time at any a moment;
S303: judge whether t is included in ti, is, opens enable signal, otherwise closes enable signal;
S304: when opening enable signal, within the ti time period, power calculation is carried out to the electric signal in described signal system, by the performance number reporting calculated;
S305: judging whether other demands in addition, is select a group configuration parameter corresponding to other demands described from N group, complete the power calculation under corresponding configuration parameter, otherwise, terminate.
Further, described S301 specifically comprises:
Locating the position of each subframe with the time, using there is 0 point of the time of frame head indicator signal as timing, the end time of a frame being designated as T;
According to a demand, from N group, select the i-th group configuration parameter corresponding to described demand, according to the i-th group configuration parameter, find a period of time of the combination correspondence of a subframe or multiple continuous subframes, be designated as ti, wherein i=[1, N], ti=[T1, T2], T1, T2 are less than T.
Further, described a period of time is the time of individual system clock and the product of system clock number; Describedly timing is carried out to signal system, by obtaining the counting of system clock number.
Further, the frequency of described system clock is F MHz, and the time shared by a frame is T ' ms, then system clock number cnt=F × T ' × 10 shared by a frame
3.
Further, any one subframe described is subdivided into time slot 0 and time slot 1.
Further, the described configuration parameter often organized is: a time slot in a subframe or the combination of multiple continuous subframes.
The number of described subframe is 10, and described subframe comprises: subframe 0 ~ subframe 9.
Suppose: (1) system only has M subframe, subframe 0 ~ subframe M-1, does not have time slot in subframe, then the clock number shared by any one subframe j is y, and wherein j=[0, M-1], K are the shared total clock number of M subframe.
yj=[(K/M)×j,(K/M)×(j+1)-1],
(2) system has M subframe, subframe 0 ~ subframe M-1, and also have 2 time slots in each subframe, time slot 0 and time slot 1, then the clock number shared by time slot 0 in any one subframe j is y0,
yj0=[(K/M)×j,(K/2M)×(2j+1)-1],
The clock number shared by time slot 1 in any one subframe j is y1,
yj1=[(K/2M)×(2j+1),(K/M)×(j+1)-1],
Below in conjunction with specific embodiment, realization of the present invention is described in detail:
Described signal system has specific frame structure, and every 10ms is a frame, has frame head indicator signal, and a frame has 10 subframes, and a subframe is 1ms, and each subframe divides two time slots, and each time slot is 0.5ms.The implication that each time slot signal represents, freely can define according to system requirements, as shown in Figure 3.
Be 0 point with frame head indicator signal, the duration of a whole frame signal is 10ms, supposes that the work clock of this system is 10MHz, namely has 10 in 1s
7the individual clock period, then have 10 in 10ms
5the individual clock period.The present invention, by counting the number of this clock, positions the time slot position of subframe, subframe.As shown in Figure 3, in order to indicate the relation of clock and frame head indicator signal in the drawings, that the pulse width of clock is drawn is wider, but in figure, the number of clock can not reflect the position of real subframe or time slot, in this explanation.
Such as, this signal system needs the power demand of measurement as follows at present: (1) calculates the power of subframe 0 signal; (2) power of time slot 1 signal in subframe 1 is calculated; (3) power of continuous subframes 5, subframe 6, subframe 7, subframe 8, subframe 9 signal is calculated.(4) power of the time slot 0 of subframe 0, time slot 1 signal of subframe 1 is calculated.
Just specifically be described below because for (4) item demand, the time slot 0 of subframe 0 and the time slot 1 of subframe 1 discontinuous, so system does not support this configuration, system prompt does not support the power calculation of this configuration, and enable signal is closed.
(1) power of subframe 0 signal is calculated:
The first step: the configuration parameter arranging the 1st group, described configuration parameter comprises: time slot 0, time slot 1; Subframe 0.
Second step: using there is 0 point of the time of frame head indicator signal as counting, by carrying out timing to signal system, subframe 0 is positioned.
Suppose that the time residing for subframe 0 is t1, t1=(10
-7the number y0 of) × clock period, wherein, 10
-7be the time of 1 clock period, so can obtain the value of t1 by calculating y0, now, y0 can adopt the computing formula of yj, is specifically calculated as follows:
y0=[(K/M)×j,(K/M)×(j+1)-1]=[(10
5/10)×0,(10
5/10)×(0+1)-1]
=[0,10
4-1],
Wherein, K=10
5, M=10, j=0.
3rd step: carry out timing to described signal system, is designated as t by the time at any a moment, t=(10
-7) × clock period number y, judges whether y value drops on 0 ~ 10
4in-1 scope, be represent that in t1 be subframe 0, open enable signal, otherwise, close enable signal.
4th step: when enable signal is opened, power calculation is carried out to the electric signal in the t1 time period, result of calculation is reported.
(2) power of time slot 1 signal of subframe 1 is calculated:
The first step: the configuration parameter arranging the 2nd group, described configuration parameter comprises: time slot 1; Subframe 1.
Second step: using there is 0 point of the time of frame head indicator signal as counting, by carrying out timing to signal system, the time slot 1 of subframe 1 is positioned.
Suppose that the time residing for subframe 1 time slot 1 is t2, t2=(10
-7the number y11 of) × clock period, wherein, 10
-7be the time of 1 clock period, so can obtain the value of t2 by calculating y11, now, y11 can adopt the computing formula of yj1, is specifically calculated as follows:
y11=[(K/2M)×(2j+1),(K/M)×(j+1)-1]=[(10
5/2*10)×3,(10
5/10)×2-1]=[1.5×10
4,2×10
4-1],
Wherein, K=10
5, M=10, j=1.
3rd step: carry out timing to described signal system, is designated as t by the time at any a moment, t=(10
-7) × clock period number y, judges whether y value drops on 1.5 × 10
4~ 2 × 10
4in-1 scope, be the time slot 1 in subframe 1 in expression t2, open enable signal, otherwise, close enable signal.
4th step: when enable signal is opened, power calculation is carried out to the electric signal in the t2 time period, result of calculation is reported.
(3) power of continuous subframes 5, subframe 6, subframe 7, subframe 8, subframe 9 signal is calculated:
The first step: the configuration parameter arranging the 3rd group, described configuration parameter comprises: time slot 0, time slot 1; Subframe 5, subframe 6, subframe 7, subframe 8, subframe 9.
Second step: using there is 0 point of the time of frame head indicator signal as counting, by carrying out timing to signal system, the time slot 1 of subframe 1 is positioned.
Suppose that the time residing for subframe 5 ~ subframe 9 is t3, t3=(10
-7the number ycont of) × clock period, wherein, 10
-7it is the time of 1 clock period, so the value of t3 can be obtained by calculating ycont, now, because ycont is the clock number of continuous subframes, the starting point of ycont is the starting point of subframe 5, and the terminal of ycont is the terminal of subframe 9, so first calculate y5 and y9, y5 and y9 can adopt the computing formula of yj, is specifically calculated as follows:
y5=[(K/M)×j,(K/M)×(j+1)-1]=[(10
5/10)×5,(10
5/10)×(5+1)-1]
=[5×10
4,6×10
4-1],
Wherein, K=10
5, M=10, j=5;
y9=[(K/M)×j,(K/M)×(j+1)-1]=[(10
5/10)×9,(10
5/10)×(9+1)-1]
=[9×10
4,10
5-1],
Wherein, K=10
5, M=10, j=9.
So, ycont=[5 × 10
4, 10
5-1]
3rd step: carry out timing to described signal system, is designated as t by the time at any a moment, t=(10
-7) × clock period number y, judges whether y value drops on 5 × 10
4~ 10
5in-1 scope, be represent that in t3 be subframe 5 ~ subframe 9, open enable signal, otherwise, close enable signal.
4th step: when enable signal is opened, power calculation is carried out to the electric signal in the t3 time period, result of calculation is reported.
The invention provides a kind of method obtaining performance number, guarantee electronics or communication system, configuration parameter can be passed through, complete the power calculation of different demand, to ensure that same system passes through configuration parameter, the performance number of different demand can be obtained, to analyze the duty of this system, performance and fault, thus high degree facilitates this system research and development to test, reduce this system O&M cost, Improving The Quality of Products.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.