CN104158538A - Baud rate generation method, baud rate generator and communication equipment - Google Patents

Baud rate generation method, baud rate generator and communication equipment Download PDF

Info

Publication number
CN104158538A
CN104158538A CN201410418225.9A CN201410418225A CN104158538A CN 104158538 A CN104158538 A CN 104158538A CN 201410418225 A CN201410418225 A CN 201410418225A CN 104158538 A CN104158538 A CN 104158538A
Authority
CN
China
Prior art keywords
baud rate
counter
initial value
div
etu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410418225.9A
Other languages
Chinese (zh)
Other versions
CN104158538B (en
Inventor
黎永健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd filed Critical SHENZHEN CHIPSBANK TECHNOLOGY Co Ltd
Priority to CN201410418225.9A priority Critical patent/CN104158538B/en
Publication of CN104158538A publication Critical patent/CN104158538A/en
Application granted granted Critical
Publication of CN104158538B publication Critical patent/CN104158538B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the invention discloses a baud rate generator which is applied to communication equipment. The baud rate generator comprises a baud rate counter which is connected with a system internal clock of the communication equipment and is used for generating duration of one communication bit, a baud rate clock signal generating module for generating a baud rate clock signal when the counting result of the baud rate counter is up to a preset threshold value, an ETU (Elementary Time Unit) counter for counting and accumulating when the counting result of the baud rate counter is up to the preset threshold value, and an initial value loading module for loading an initial value to the baud rate counter according to the counting result of the ETU counter, wherein the initial value is 0 or 1. According to the baud rate generator provided by the embodiment of the application, different initial values are set for the baud rate counter to realize fractional frequency division, so that a baud rate error between both communication parties is reduced, and a higher communication rate requirement is met. The embodiment of the application further provides a baud rate generation method and the communication equipment.

Description

Baud rate generation method, Baud rate generator and communication equipment
Technical field
The present invention relates to communication technical field, more particularly, relate to a kind of baud rate generation method, Baud rate generator and communication equipment.
Background technology
Baud rate (Baud rate) is modulation rate, refers to the modulated variation within the unit interval later of signal, the number of times that unit interval intercarrier parameter changes.The effect of Baud rate generator is the baud rate needing from chip system clock generating.Usually, the baud rate clock frequency/baud rate factor=baud rate, for example, traditional baud rate generation method can be expressed as with formula:
BaudRate=Fsys/(Div*16) (1)
Wherein, BaudRate is baud rate, the frequency of the clock that Fsys is chip internal, and Div is the value for generation of the Frequency Dividing Factor register of baud rate.
Can find out from formula (1), traditional baud rate generation method be integral multiple frequency division based on 16 (can only be 16 frequency divisions, 32 frequency divisions, 64 frequency divisions ..., n*16 frequency division) generate baud rate, therefore, the baud rate precision that traditional baud rate generation method generates is lower, in the time that target baud rate is not 16 the integral multiple frequency division of Fsys, between the baud rate of communicating pair, easily there is relatively large deviation, causing can not proper communication, have people to propose a kind of improved method based on this, the method after concrete improvement can be expressed as follows for formula:
BaudRate=Fsys/(Div*16+BFINE) (2)
Wherein, BaudRate is baud rate, the frequency of the clock that Fsys is chip internal, and Div is the value for generation of the frequency division register of baud rate; BFINE is fine setting data register value, and the value of BFINE is the integer value between 0~15.
But, inventor finds realizing in process of the present invention, although the method after above-mentioned improvement is finely tuned baud rate, make baud rate not only be confined to 16 integral multiple frequency division, but, it still can only generate baud rate by integral frequency divisioil, therefore, the precision of the baud rate that the method after improvement generates is still lower, in the time that target baud rate is not the integral multiple frequency division (inverse that is baud rate is not the integral multiple of the clock cycle of the clock of chip internal) of Fsys, between the baud rate of communicating pair, still there will be deviation.In the time that target baud rate is lower, this deviation is little; And in the time that target baud rate is higher, the deviation between the baud rate of communicating pair still can be larger, serious also causing cannot proper communication.
Summary of the invention
The object of this invention is to provide a kind of baud rate generation method, Baud rate generator and communication equipment, to improve baud rate precision, while making target baud rate be not the integral multiple frequency division of Fsys, baud rate also can meet communication requirement.
For achieving the above object, the invention provides following technical scheme:
A kind of Baud rate generator, is applied to communication equipment, and described Baud rate generator comprises: baud rate counter, ETU counter, baud rate clock signal generation module and initial value load-on module; Wherein,
Described baud rate counter is connected with the internal system clock of institute's communication equipment, for generation of the duration of a communication bit;
Described baud rate clock signal generation module, in the time that the count results of described baud rate counter reaches predetermined threshold value, generates baud rate clock signal;
Described ETU counter, in the time that the count results of described baud rate counter reaches described predetermined threshold value, is counted cumulative;
Described initial value load-on module loads initial value for the counting accumulation result according to described ETU counter to described baud rate counter, and described initial value is 0 or 1.
Above-mentioned Baud rate generator, preferred, the computing formula of baud rate is:
BaudRate=Fsys/(Div_base+Div_numt/n)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n.
Above-mentioned Baud rate generator, preferred, described initial value load-on module comprises:
Map unit, for the mapping relations according to default, is obtained the binary number of a n position by the molecule mapping of the described decimal factor;
Determining unit, for determining described binary number, the value of the bit corresponding with the count results of described ETU counter;
Loading unit, for determining that in described determining unit the value of the bit corresponding with the count results of described ETU counter is at 1 o'clock, loads initial value 0 to described baud rate counter; Otherwise described baud rate counter loads initial value 1.
Above-mentioned Baud rate generator, preferred, described determining unit comprises:
First determines subelement, in the time that the determined quantity of the count results m of described ETU counter is less than or equal to n, determines that in described binary number, m bit is the bit corresponding with the count results of described ETU counter;
Second determines subelement, in the time that the determined quantity of the count results m of described ETU counter is greater than n, determines that in described binary number, a bit is the bit corresponding with the count results of described ETU counter; The value of the units that wherein, a is described count results m.
A kind of communication equipment, comprises the Baud rate generator described in as above any one.
A kind of baud rate generation method, is applied to communication equipment, and described method comprises:
Produce the duration of a communication bit by baud rate counter;
In the time that the count results of described baud rate counter reaches predetermined threshold value, generate baud rate clock signal;
In the time that the count results of described baud rate counter reaches described predetermined threshold value, count cumulative;
According to counting accumulation result, described baud rate counter is loaded to initial value, described initial value is 0 or 1.
Said method, preferred, the computing formula of baud rate is:
BaudRate=Fsys/(Div_base+Div_numt/n)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n.
Said method, preferred, the described counting accumulation result of described foundation loads initial value to described baud rate counter and comprises:
According to default mapping relations, obtained the binary number of a n position by the molecule mapping of the described decimal factor;
Determine in described binary number the value of the bit corresponding with described counting accumulation result;
If determine that the value of the bit corresponding with described counting accumulation result is 1, described baud rate counter loaded to initial value 0; Otherwise, described baud rate counter is loaded to initial value 1.
Said method, preferred, the determining step of the bit corresponding with described counting accumulation result comprises:
In the time that the determined quantity of counting accumulation result m is less than or equal to n, determine that in described binary number, m bit is the bit corresponding with described counting accumulation result;
In the time that the determined quantity of described counting accumulation result m is greater than n, determine that in described binary number, a bit is the bit corresponding with described counting accumulation result; Wherein, a is the units of described counting accumulation result m.
Known by above scheme, a kind of baud rate generation method, Baud rate generator and communication equipment that the application provides, by the lasting duration of a communication bit of baud rate counter generation; In the time that the count results of described baud rate counter reaches predetermined threshold value, generate baud rate clock signal; In the time that the count results of described baud rate counter reaches described predetermined threshold value, count cumulative; According to described counting accumulation result, described baud rate counter is loaded to initial value, described initial value is 0 or 1.
To sum up, baud rate generation method, Baud rate generator and communication equipment that the embodiment of the present application provides, by being arranged to different initial values, baud rate counter realizes fractional frequency division, improve baud rate precision, dwindle the error of baud rate of communicating pair, while making target baud rate be not the integral multiple frequency division of Fsys, the baud rate that Baud rate generator generates also can meet communication requirement, can meet higher traffic rate demand.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
A kind of structural representation of the Baud rate generator that Fig. 1 provides for the embodiment of the present application;
A kind of structural representation of the initial value load-on module that Fig. 2 provides for the embodiment of the present application;
A kind of realization flow figure of the baud rate generation method that Fig. 3 provides for the embodiment of the present application;
A kind of realization flow figure that according to described counting accumulation result, baud rate counter is loaded initial value that Fig. 4 provides for the embodiment of the present application;
The another kind of realization flow figure of the baud rate generation method that Fig. 5 provides for the embodiment of the present application.
Term " first " in specification and claims and above-mentioned accompanying drawing, " second ", " the 3rd " " 4th " etc. (if existence) are for distinguishing similar part, and needn't be used for describing specific order or precedence.The data that should be appreciated that such use suitably can exchanged in situation, so that the application's described herein embodiment can be with except the order enforcement here illustrated.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In Baud rate generator that the embodiment of the present application provides, baud rate generation method application communication equipment.
Refer to Fig. 1, a kind of structural representation of the Baud rate generator that Fig. 1 provides for the embodiment of the present application, can comprise:
Baud rate counter 11, ETU counter 12, baud rate clock signal generation module 13 and initial value load-on module 14; Wherein,
Baud rate counter 11 is connected with the internal system clock of communication equipment, for generation of the duration of a communication bit;
Baud rate is the one tolerance to symbol transmission speed, the number of bits transmitting each second, and therefore, the inverse of baud rate is the 1 required lasting time of bit symbol of transmission, i.e. the duration of a communication bit.
In the embodiment of the present application, baud rate counter 11 can carry out using internal system clock as clock source timing, to produce the duration of a communication bit.
Baud rate clock signal generation module 13, in the time that the count results of described baud rate counter 11 reaches predetermined threshold value, generates baud rate clock signal.
Wherein, described predetermined threshold value is determined according to target baud rate.In the embodiment of the present application, target baud rate is and communicates required baud rate.
Concrete, predetermined threshold value is the inverse of target baud rate, i.e. the target duration of a communication bit; That is to say, baud rate clock signal generation module 13 when reach the target duration of a communication bit in the count results of baud rate counter 11, generates baud rate clock signal.
ETU counter 12, in the time that the count results of described baud rate counter 11 reaches described predetermined threshold value, is counted cumulative;
The accumulated value that ETU counter 12 is counted while adding up is 1, and, in the time that the count results of baud rate counter 11 reaches described predetermined threshold value, the count value of ETU counter 12 adds 1.
The inverse of baud rate is the duration of 1bit symbol, and this duration represents with 1 ETU.Therefore,, in the embodiment of the present application, ETU counter 12 also can be described as ETU is counted.
Described initial value load-on module 14 loads initial value for the count results according to described ETU counter 12 to described baud rate counter 11, and described initial value is 0 or 1.
Generating after baud rate clock signal, need to be to baud rate counter 11 replacement initial values, to judge the generation moment of next baud rate clock signal.
In the embodiment of the present application, the initial value of baud rate counter 11 is not fixing value, but selects corresponding initial value according to the count results of ETU counter 12.
How to realize fractional frequency division taking the count value of ETU counter 12 as 10 as example explanation this programme below.
In this example, in the time that the count value of ETU counter 12 is 10, the data that receive 10bit are described, the number that is also ETU is 10, and in other words, the number of times that baud rate counter 11 produces the duration of a communication bit is 10 times.
Suppose to reach at 10 o'clock in the count value of ETU counter 12, baud rate counter 11 initial value in the time that the 5th is put initial value has been set to 0, other is all set to 19 times, so, the value of ETU corresponding to the 5th is (Div_Base+1) * Tsys, wherein, Div_base is described predetermined threshold value, is natural number; Tsys is the clock cycle of the internal system clock of described communication equipment; The value of other ETU of 9 times is Div_Base*Tsys.
So, in 10 ETU, the value of average each ETU is:
( Div _ Base + 1 ) * Tsys + 9 * Div _ Base * Tsys 10 = ( Div _ Base + 1 / 10 ) * Tsys - - - ( 3 )
And Tsys=1/Fsys, the frequency of the internal system clock that Fsys is described communication equipment, therefore, baud rate BaudRate=1/ETU=Fsys/ (Div_Base+1/10).
Again for example, suppose to reach at 10 o'clock in the count value of ETU counter 12, baud rate counter 11 initial value in the time putting initial value and put initial value the 6th time for the 3rd time is put all for 0, other is all set to 18 times, so, the value of the 3rd time and the 6th time corresponding ETU is (Div_Base+1) * Tsys, wherein, Div_base is described predetermined threshold value, the clock cycle of the internal system clock that Tsys is described communication equipment; The value of other ETU of 8 times is Div_Base*Tsys.
So, in 10 ETU, the value of average each ETU is:
2 * ( Div _ Base + 1 ) * Tsys + 8 * Div _ Base * Tsys 10 = ( Div _ Base + 2 / 10 ) * Tsys - - - ( 4 )
And Tsys=1/Fsys, the frequency of the internal system clock that Fsys is described communication equipment; Therefore, baud rate BaudRate=1/ETU=Fsys/ (Div_Base+2/10).
And no matter be (Div_Base+1/10), still (Div_Base+2/10), is decimal, visible, the scheme providing by the embodiment of the present application has realized by fractional frequency division and has generated baud rate.
A kind of Baud rate generator that the embodiment of the present application provides, by the lasting duration of a communication bit of baud rate counter generation; In the time that the count results of described baud rate counter reaches predetermined threshold value, baud rate clock signal generation module generates baud rate clock signal; In the time that the count results of described baud rate counter reaches described predetermined threshold value, ETU counter is counted cumulative; In the time that the count results of described baud rate counter reaches described predetermined threshold value, initial value load-on module loads initial value according to described counting accumulation result to described baud rate counter, and described initial value is 0 or 1.
To sum up, the Baud rate generator that the embodiment of the present application provides, by being arranged to different initial values, baud rate counter realizes fractional frequency division, improve baud rate precision, dwindle the error of baud rate of communicating pair, while making target baud rate be not the integral multiple frequency division of Fsys, the baud rate that Baud rate generator generates also can meet communication requirement, can meet higher traffic rate demand.
In above-described embodiment, preferred, the computing formula of baud rate can be:
BaudRate=Fsys/(Div_base+Div_numt/n) (5)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n, Div_numt is nonnegative integer.
Wherein, the value of Div_base and Div_numt can be according to practical communication requirements set.Concrete, according to communication requirement, can determine the value of target baud rate, the value that can know Div_base+Div_numt/n according to formula (5) is: Fsys and target baud rate are done the result of business's computing, be Div_base+Div_numt/n=Fsys/BaudRate, so, in this programme, Div_base is the integer part that Fsys and target baud rate are done the result of business's computing, Div_numt/n is the fractional part that Fsys and target baud rate are done the result of business's computing, the fractional part of result and the product of n that Fsys and target baud rate are done business's computing are Div_numt.
In the embodiment of the present application, in the time of integral multiple frequency division that target baud rate is Fsys, because the value of Div_base+Div_numt/n is integer, therefore, Div_numt/n value is zero, thereby the value of Div_numt is zero, be Div_numt=0, now, BaudRate=Fsys/Div_base, generates baud rate by integral frequency divisioil, in the time that target baud rate is not the integral multiple frequency division of Fsys, the value of Div_base+Div_numt/n comprises integer part and fractional part, therefore, the value of Div_numt/n is to be greater than zero decimal, thereby the value of Div_numt is greater than zero, be Div_numt>0, now, due to Div_numt/n<0, be Div_numt<n, therefore, now to generate baud rate by fractional frequency division, that is to say, the Baud rate generator providing by the embodiment of the present application, both can generate baud rate by integral frequency divisioil, also can generate baud rate by fractional frequency division.
In above-described embodiment, preferred, a kind of structural representation of described initial value load-on module 15 as shown in Figure 2, can comprise:
Map unit 21, determining unit 22 and loading unit 23; Wherein,
Map unit 21, for the mapping relations according to default, is obtained the binary number of a n position by the molecule Div_numt mapping of the described decimal factor;
In the embodiment of the present application, described default mapping relations are the mapping relations between molecule and the n bit of the decimal factor.
The figure place of " 1 " wherein, comprising in the n bit corresponding with Div_numt is Div_numt.
Preferably, in the time of definite n bit, the principle that can stagger according to the position of " 1 ", is evenly distributed in Div_numt position " 1 " in n bit, further to reduce the possibility of communication failure.Wherein, Div_numt position " 1 " is evenly distributed in n bit and can refers in n bit, and in front q bit and rear q bit, the number of " 1 " number difference identical or " 1 " is 1, wherein, and n=2q, or, n=2q+1.
Determining unit 22 is for determining described binary number, the value of the bit corresponding with the count results of described ETU counter 12;
Loading unit 23, for determining that in described determining unit 22 value of the bit corresponding with the count results of described ETU counter 12 is at 1 o'clock, loads initial value 0 to described baud rate counter 11; Otherwise described baud rate counter 11 loads initial value 1.
In the embodiment of the present application, determine that in described determining unit 22 value of the bit corresponding with the count results of described ETU counter 12 is at 1 o'clock, described baud rate counter 11 is loaded to initial value 0; Determine that in described determining unit 22 value of the bit corresponding with the count results of described ETU counter 12 is at 0 o'clock, described baud rate counter is loaded to initial value 1.
In above-described embodiment, preferred, described determining unit 22 can comprise:
First determines subelement, in the time that the determined quantity of the count results m of described ETU counter 12 is less than or equal to n, determines that in described binary number, m bit is the bit corresponding with the count results of described ETU counter;
The counting initial value of ETU counter 12 may be zero may be also 1, therefore, in the time that the counting initial value of ETU counter 12 is zero, the determined quantity of count results m of ETU counter 12 is m+1, and in the time that the counting initial value of ETU counter 12 is 1, the determined quantity of the count results m of ETU counter 12 is m;
It should be noted that, in the time of certain bit bit position of determining in described binary number, the counting initial value set-up mode of bit is identical with the initial value set-up mode of ETU counter 12,, if the counting initial value of ETU counter 12 is zero, in the time determining the position that in binary number, certain bit is, also count from zero; In like manner, if the counting initial value of ETU counter 12 is 1, in the time determining the position that in binary number, certain bit is, also count since 1.
Second determines subelement, in the time that the determined quantity of the count results m of described ETU counter 12 is greater than n, determines that in described binary number, a bit is the bit corresponding with the count results of described ETU counter; The value of the units that wherein, a is described count results m.
In above-described embodiment, preferred, the value of described n is 10;
Accordingly, it is as shown in table 1 that described default mapping relations are mapping relations between molecule and the n bit of the decimal factor, Ke Yiwei:
Table 1
div_numt gen_numt
4'h0 10'b0000000000
4'h1 10'b0000010000
4'h2 10'b0010010000
4'h3 10'b0010010010
4'h4 10'b1010010010
4'h5 10'b1010011010
4'h6 10'b1010111010
4'h7 10'b1011111010
4'h8 10'b1011111110
4'h9 10'b1011111111
Wherein, 4'h represents that div_numt is the 16 system numbers of 4; Gen_numt is the binary number of 10, and 10'b represents that gen_numt is the binary number of 10.
Illustrate and determine the detailed process of baud rate counter 11 being carried out initial value and loaded required counting initial value below in conjunction with table 1.
The value of supposing div_numt is 4, so, can determine that by table 1 10 bits are 1010010010; The counting initial value of ETU counter 12 is 0, so,
In the time that the count value of ETU counter 12 is 0, because gen_numt[0]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 1, because gen_numt[1]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 2, because gen_numt[2]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 3, because gen_numt[3]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 4, because gen_numt[4]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 5, because gen_numt[5]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 6, because gen_numt[6]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 7, because gen_numt[7]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 8, because gen_numt[8]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 9, because gen_numt[9]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
In the time that the count value of ETU counter 12 is 10, because gen_numt[10]=gen_numt[0]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 11, because gen_numt[11]=gen_numt[1]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1;
……
In the time that the count value of ETU counter 12 is 20, because gen_numt[20]=gen_numt[0]=1, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 0;
In the time that the count value of ETU counter 12 is 21, because gen_numt[21]=gen_numt[1]=0, therefore, baud rate counter 11 is carried out to initial value, and to load required counting initial value be 1.
……
The embodiment of the present application also provides a kind of communication equipment, and this communication equipment has the Baud rate generator that as above any embodiment provides.
Corresponding with the Baud rate generator that said apparatus embodiment provides, the embodiment of the present application also provides a kind of baud rate generation method, and a kind of realization flow figure of the baud rate generation method that the embodiment of the present application provides as shown in Figure 3, can comprise:
Step S31: the duration that produces a communication bit by baud rate counter;
Baud rate is the one tolerance to symbol transmission speed, the number of bits transmitting each second, and therefore, the inverse of baud rate is the 1 required lasting time of bit symbol of transmission, i.e. the duration of a communication bit.
In the embodiment of the present application, baud rate counter can carry out using internal system clock as clock source timing, to produce the duration of a communication bit.
Step S32: in the time that the count results of described baud rate counter reaches predetermined threshold value, generate baud rate clock signal;
Wherein, described predetermined threshold value is determined according to target baud rate.In the embodiment of the present application, target baud rate is and communicates required baud rate.
Concrete, predetermined threshold value is the inverse of target baud rate, i.e. the target duration of a communication bit; That is to say, in the time that the count results of baud rate counter reaches the target duration of a communication bit, generate baud rate clock signal.
Step S33: in the time that the count results of described baud rate counter reaches described predetermined threshold value, count cumulative; Namely the number of the duration to the communication bit producing is counted cumulative.
The inverse of baud rate is the duration of 1bit symbol, and this duration represents with 1 ETU.Therefore, in the embodiment of the present application, in the time that the count results of described baud rate counter reaches described predetermined threshold value, be, that ETU is counted and added up.
The accumulated value of counting while adding up is 1, and, in the time that the count results of baud rate counter reaches described predetermined threshold value, the count value that ETU is counted adds 1.
Step S34: according to described counting accumulation result, described baud rate counter is loaded to initial value, described initial value is 0 or 1.
Generating after baud rate clock signal, need to be to baud rate counter replacement initial value, to judge the generation moment of next baud rate clock signal.
In the embodiment of the present application, the initial value of baud rate counter is not fixing value, but selects corresponding initial value according to counting accumulation result.
A kind of baud rate generation method that the embodiment of the present application provides, by the lasting duration of a communication bit of baud rate counter generation; In the time that the count results of described baud rate counter reaches predetermined threshold value, generate baud rate clock signal; In the time that the count results of described baud rate counter reaches described predetermined threshold value, count cumulative; In the time that the count results of described baud rate counter reaches described predetermined threshold value, according to described counting accumulation result, described baud rate counter is loaded to initial value, described initial value is 0 or 1.
To sum up, baud rate generation method, Baud rate generator and communication equipment that the embodiment of the present application provides, by being arranged to different initial values, baud rate counter realizes fractional frequency division, improve baud rate precision, dwindle the error of baud rate of communicating pair, while making target baud rate be not the integral multiple frequency division of Fsys, the baud rate that Baud rate generator generates also can meet communication requirement, can meet higher traffic rate demand.
In above-described embodiment, preferred, the computing formula of baud rate can be:
BaudRate=Fsys/(Div_base+Div_numt/n)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n, Div_numt is nonnegative integer.
In the embodiment of the present application, in the time of Div_numt=0, BaudRate=Fsys/Div_base, can generate baud rate by integral frequency divisioil; In the time of Div_numt>0, due to Div_numt<n, therefore, now to generate baud rate by fractional frequency division, that is to say, the Baud rate generator providing by the embodiment of the present application, both can generate baud rate by integral frequency divisioil, also can generate baud rate by fractional frequency division.
In above-described embodiment, preferred, the described counting accumulation result of described foundation to a kind of realization flow figure of described baud rate counter loading initial value as shown in Figure 4, can comprise:
Step S41: according to default mapping relations, obtained the binary number of a n position by the molecule Div_numt mapping of the described decimal factor;
In the embodiment of the present application, described default mapping relations are the mapping relations between molecule and the n bit of the decimal factor.
Step S42: determine in described binary number the value of the bit corresponding with described counting accumulation result;
Step S43: if determine that the value of the bit corresponding with described counting accumulation result is 1, described baud rate counter is loaded to initial value 0; Otherwise described baud rate counter loads initial value 1.
In the embodiment of the present application, be 1 o'clock in the value of determining the bit corresponding with described counting accumulation result, described baud rate counter is loaded to initial value 0; Be 0 o'clock in the value of determining the bit corresponding with described counting accumulation result, described baud rate counter is loaded to initial value 1.
In above-described embodiment, preferred, the determining step of the corresponding bit of described and described counting accumulation result comprises:
In the time that the determined quantity of counting accumulation result m is less than or equal to n, determine that in described binary number, m bit is the bit corresponding with described counting accumulation result;
In the time that the determined quantity of described counting accumulation result m is greater than n, determine that in described binary number, a bit is the bit corresponding with described counting accumulation result; Wherein, a is the units of described counting accumulation result m.
Counting cumulative counting initial value and may be zero may be also 1, therefore,, in the time counting cumulative counting initial value and be zero, the determined quantity of counting accumulation result m is m+1, and in the time counting cumulative counting initial value and be 1, the determined quantity of counting accumulation result m is m;
It should be noted that, in the time of certain bit bit position of determining in described binary number, the counting initial value set-up mode of bit is identical with the set-up mode of counting cumulative initial value,, be set to zero if count cumulative counting initial value, in the time determining the position that in binary number, certain bit is, also count from zero; In like manner, if count cumulative counting initial value for arranging 1, in the time determining the position that in binary number, certain bit is, also count since 1.
In above-described embodiment, preferred, the value of described n is 10;
Accordingly, it is as shown in table 1 that described default mapping relations are mapping relations between molecule and the n bit of the decimal factor.
The another kind of realization flow figure of the baud rate generation method that the embodiment of the present application provides as shown in Figure 5, can comprise:
Step S51: for baud rate counter loads initial value, wherein, baud rate counter is for generation of the duration of a communication bit;
Step S52: whether the count value that judges baud rate counter reaches predetermined threshold value, if so, exports baud rate clock signal, and performs step S53; Otherwise, execution step S54;
The count value of step S53:ETU counter adds 1, and performs step S55;
Step S54: the count value of described baud rate counter adds 1, and return to execution step S52;
Step S55: determine whether long period, be specially: according to default mapping relations, obtained the binary number of a n position by the molecule mapping of the described decimal factor; Determine in described binary number the value of the bit corresponding with counting accumulation result; If determine that the value of the bit corresponding with described meter cumulative number result is 1, be defined as long period, and perform step S56; Otherwise, be defined as the short period, and perform step S57;
Step S56: the initial value of determining baud rate counter is 0, and return to execution step S51;
Step S57: the initial value of determining baud rate counter is 1, and return to execution step S51.
To the above-mentioned explanation of the disclosed embodiments, make professional and technical personnel in the field can realize or use the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiment, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (9)

1. a Baud rate generator, is applied to communication equipment, it is characterized in that, described Baud rate generator comprises: baud rate counter, ETU counter, baud rate clock signal generation module and initial value load-on module; Wherein,
Described baud rate counter is connected with the internal system clock of institute's communication equipment, for generation of the duration of a communication bit;
Described baud rate clock signal generation module, in the time that the count results of described baud rate counter reaches predetermined threshold value, generates baud rate clock signal;
Described ETU counter, in the time that the count results of described baud rate counter reaches described predetermined threshold value, is counted cumulative;
Described initial value load-on module loads initial value for the counting accumulation result according to described ETU counter to described baud rate counter, and described initial value is 0 or 1.
2. Baud rate generator according to claim 1, is characterized in that, the computing formula of baud rate is:
BaudRate=Fsys/(Div_base+Div_numt/n)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n.
3. Baud rate generator according to claim 2, is characterized in that, described initial value load-on module comprises:
Map unit, for the mapping relations according to default, is obtained the binary number of a n position by the molecule mapping of the described decimal factor;
Determining unit, for determining described binary number, the value of the bit corresponding with the count results of described ETU counter;
Loading unit, for determining that in described determining unit the value of the bit corresponding with the count results of described ETU counter is at 1 o'clock, loads initial value 0 to described baud rate counter; Otherwise described baud rate counter loads initial value 1.
4. Baud rate generator according to claim 3, is characterized in that, described determining unit comprises:
First determines subelement, in the time that the determined quantity of the count results m of described ETU counter is less than or equal to n, determines that in described binary number, m bit is the bit corresponding with the count results of described ETU counter;
Second determines subelement, in the time that the determined quantity of the count results m of described ETU counter is greater than n, determines that in described binary number, a bit is the bit corresponding with the count results of described ETU counter; The value of the units that wherein, a is described count results m.
5. a communication equipment, is characterized in that, comprises the Baud rate generator as described in claim 1-4 any one.
6. a baud rate generation method, is applied to communication equipment, it is characterized in that, described method comprises:
Produce the duration of a communication bit by baud rate counter;
In the time that the count results of described baud rate counter reaches predetermined threshold value, generate baud rate clock signal;
In the time that the count results of described baud rate counter reaches described predetermined threshold value, count cumulative;
According to counting accumulation result, described baud rate counter is loaded to initial value, described initial value is 0 or 1.
7. method according to claim 6, is characterized in that, the computing formula of baud rate is:
BaudRate=Fsys/(Div_base+Div_numt/n)
Wherein, BaudRate is baud rate; Fsys is the frequency of the internal system clock of described communication equipment; Div_base is described predetermined threshold value; Div_numt/n is the decimal factor, 8≤n≤L, and L is the length of frame data; 0≤Div_numt<n.
8. method according to claim 7, is characterized in that, the described counting accumulation result of described foundation loads initial value to described baud rate counter and comprises:
According to default mapping relations, obtained the binary number of a n position by the molecule mapping of the described decimal factor;
Determine in described binary number the value of the bit corresponding with described counting accumulation result;
If determine that the value of the bit corresponding with described counting accumulation result is 1, described baud rate counter loaded to initial value 0; Otherwise, described baud rate counter is loaded to initial value 1.
9. method according to claim 8, is characterized in that, the determining step of the bit corresponding with described counting accumulation result comprises:
In the time that the determined quantity of counting accumulation result m is less than or equal to n, determine that in described binary number, m bit is the bit corresponding with described counting accumulation result;
In the time that the determined quantity of described counting accumulation result m is greater than n, determine that in described binary number, a bit is the bit corresponding with described counting accumulation result; Wherein, a is the units of described counting accumulation result m.
CN201410418225.9A 2014-08-22 2014-08-22 Baud rate generation method, Baud rate generator and communication equipment Expired - Fee Related CN104158538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410418225.9A CN104158538B (en) 2014-08-22 2014-08-22 Baud rate generation method, Baud rate generator and communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410418225.9A CN104158538B (en) 2014-08-22 2014-08-22 Baud rate generation method, Baud rate generator and communication equipment

Publications (2)

Publication Number Publication Date
CN104158538A true CN104158538A (en) 2014-11-19
CN104158538B CN104158538B (en) 2017-04-05

Family

ID=51883962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410418225.9A Expired - Fee Related CN104158538B (en) 2014-08-22 2014-08-22 Baud rate generation method, Baud rate generator and communication equipment

Country Status (1)

Country Link
CN (1) CN104158538B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413558A (en) * 2019-07-15 2019-11-05 广芯微电子(广州)股份有限公司 A kind of realization low-power consumption serial port module dynamic dividing method
CN110688338A (en) * 2019-09-12 2020-01-14 深圳市航顺芯片技术研发有限公司 Baud rate generation method, terminal and storage medium
CN111711444A (en) * 2019-03-18 2020-09-25 华大半导体有限公司 Special baud rate generator and communication method
CN113986801A (en) * 2021-09-28 2022-01-28 山东云海国创云计算装备产业创新中心有限公司 Baud rate generation method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460328A (en) * 2001-03-30 2003-12-03 皇家菲利浦电子有限公司 Baud rate generator with fractional divider
CN102142951A (en) * 2011-01-07 2011-08-03 天津天地伟业数码科技有限公司 Reversing control structure of RS485 transceiver chip and control method thereof
CN102324927A (en) * 2011-05-04 2012-01-18 中颖电子股份有限公司 Baud rate generator
US20140006912A1 (en) * 2012-06-27 2014-01-02 Canon Kabushiki Kaisha Communication system via cascade connection and communication device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460328A (en) * 2001-03-30 2003-12-03 皇家菲利浦电子有限公司 Baud rate generator with fractional divider
CN102142951A (en) * 2011-01-07 2011-08-03 天津天地伟业数码科技有限公司 Reversing control structure of RS485 transceiver chip and control method thereof
CN102324927A (en) * 2011-05-04 2012-01-18 中颖电子股份有限公司 Baud rate generator
US20140006912A1 (en) * 2012-06-27 2014-01-02 Canon Kabushiki Kaisha Communication system via cascade connection and communication device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711444A (en) * 2019-03-18 2020-09-25 华大半导体有限公司 Special baud rate generator and communication method
CN111711444B (en) * 2019-03-18 2024-03-29 小华半导体有限公司 Special baud rate generator and communication method
CN110413558A (en) * 2019-07-15 2019-11-05 广芯微电子(广州)股份有限公司 A kind of realization low-power consumption serial port module dynamic dividing method
CN110688338A (en) * 2019-09-12 2020-01-14 深圳市航顺芯片技术研发有限公司 Baud rate generation method, terminal and storage medium
CN113986801A (en) * 2021-09-28 2022-01-28 山东云海国创云计算装备产业创新中心有限公司 Baud rate generation method and device and storage medium
CN113986801B (en) * 2021-09-28 2024-02-13 山东云海国创云计算装备产业创新中心有限公司 Baud rate generation method, device and storage medium

Also Published As

Publication number Publication date
CN104158538B (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN104158538A (en) Baud rate generation method, baud rate generator and communication equipment
CN107507557B (en) A kind of LED driving pulse width dividing method and system
CN203386459U (en) Display control system supporting grayscale extension and driving chip
DE2831270A1 (en) DEVICE FOR TEMPERATURE MEASUREMENT
CN104954015A (en) Method of generating a clock, and semiconductor device
CN104184571A (en) Time correction method of driven clock equipment and device thereof
CN103812447A (en) Method and device for generating Gaussian white noise
CN104580005A (en) Method for sending random length message according to flow model accurately
CN105116366A (en) Quick calibration method based on pulse constant adjustment
CN107508687A (en) A kind of method, apparatus of charging, Internet of Things application platform and accounting server
CN105373930A (en) RFID tag estimation method and RFID tag estimation device for tracing system
CN105811968B (en) The method that modulator, phase-locked loop and response frequency control word generate control code
CN108811077A (en) A kind of generation method of secondary synchronization sequences, detection method, base station and user equipment
CN110557242A (en) Apparatus for recovering data, data transceiving system and data descrambling method
WO2016201809A1 (en) Sts-based prepaid electricity selling system and method
CN103441813B (en) A kind of low associated binary sequence set creation method for cdma system
CN104506271A (en) Method and device for generating ZC (Zadoff-Chu) sequence
CN105657480B (en) Method and device for adjusting TS stream code rate in fractional times
CN106716292B (en) The generation of high-speed sine curve sequence
CN101127575B (en) An equably distributed random number generator and its generation method
CN109450607A (en) A kind of calibration of baud rate and device of UART Universal Asynchronous Receiver Transmitter
CN100356735C (en) Pseudo-random number generator and test system using it
CN110308644A (en) A kind of intelligent electric meter clock timing precision compensation method, device and equipment
CN105388780A (en) IRIG-B000 code simulation device
EP4096099A1 (en) Clock sending apparatus and method, and clock receiving apparatus and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170405

Termination date: 20190822

CF01 Termination of patent right due to non-payment of annual fee