[go: up one dir, main page]

CN109814835A - A FPGA-based interval equalization device and IP core - Google Patents

A FPGA-based interval equalization device and IP core Download PDF

Info

Publication number
CN109814835A
CN109814835A CN201910092904.4A CN201910092904A CN109814835A CN 109814835 A CN109814835 A CN 109814835A CN 201910092904 A CN201910092904 A CN 201910092904A CN 109814835 A CN109814835 A CN 109814835A
Authority
CN
China
Prior art keywords
equally
module
value
fpga
count
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
CN201910092904.4A
Other languages
Chinese (zh)
Other versions
CN109814835B (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201910092904.4A priority Critical patent/CN109814835B/en
Publication of CN109814835A publication Critical patent/CN109814835A/en
Application granted granted Critical
Publication of CN109814835B publication Critical patent/CN109814835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Logic Circuits (AREA)

Abstract

本申请公开了一种基于FPGA的间隔均分装置及IP核,包括:间隔计数模块,用于对待均分间隔值进行计数输出;与间隔计数模块连接的均分计算模块,用于确定均分值和修正值;与均分计算模块连接的并以修正值为模的修正计数模块,用于产生修正脉冲,并对修正脉冲进行计数输出,以实现对均分过程产生的偏差进行修正;与均分计算模块和修正计数模块连接的并以均分值为模的均分计数模块,用于产生均分脉冲,并对均分脉冲进行计数输出;其中,间隔计数模块、修正计数模块和均分计数模块均为基于FPGA的计数器构建的,均分计算模块为基于FPGA的除法器构建的。本申请能够有效提高时间均分精度,且无需占用过多资源。

The present application discloses an FPGA-based interval dividing device and an IP core, including: an interval counting module, which is used to count and output the interval value to be divided; value and correction value; the correction counting module connected to the averaging calculation module and modulo the correction value is used to generate correction pulses, and count and output the correction pulses, so as to correct the deviation generated in the averaging process; and The average division counting module connected with the average division calculation module and the correction counting module and taking the average division value as the modulus is used to generate the average division pulse and count and output the average division pulse; wherein, the interval counting module, the correction counting module and the average division The division counting modules are constructed based on FPGA counters, and the mean division calculation modules are constructed based on FPGA dividers. The present application can effectively improve the time-averaged accuracy without occupying too many resources.

Description

A kind of interval equipartition device and IP kernel based on FPGA
Technical field
The present invention relates to simultaneous techniques field, in particular to a kind of interval equipartition device and IP kernel based on FPGA.
Background technique
With the development of computer and smart machine, the rate of network communication is getting faster, equipment in many application scenarios Between group-net communication, clock synchronization it is synchronous required precision it is higher and higher, especially measuring and controlling the fields such as application.Interval is divided equally It is real-time pulse spacing value to be divided into D parts, and guarantee stable and precision, is common function in the fields such as observing and controlling, communication.
Interval equal distribution function mostly uses greatly hardware resource or hardware resource is needed to participate in realizing at present, but its implementation, It is difficult to ensure that precision respectively or implementation are excessively complicated, resource occupation is more.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of interval equipartition device and IP kernel based on FPGA, Neng Gouyou Effect improves the time and divides equally precision, and without occupying excess resource.Its concrete scheme is as follows:
In a first aspect, this application discloses a kind of interval equipartition device based on FPGA, comprising:
Gap count module carries out counting output for treating respectively spacing value;
What is connect with the gap count module divides equally computing module, for determining equal score value and correction value;
With it is described divide equally computing module connect and using the correction value as the amendment counting module of mould, for generate correct Pulse, and counting output is carried out to the corrected impulse, to realize that the deviation generated to respectively process is modified;
Connect with the respectively computing module and the amendment counting module and respectively counting using the equal score value as mould Digital-to-analogue block divides equally pulse for generating, and carries out counting output to the respectively pulse;
Wherein, the gap count module, the amendment counting module and the counting module of dividing equally are based on FPGA Counter building, it is described divide equally computing module be based on FPGA divider building.
Optionally, the gap count module is specifically used for when second pulse signal arrives, by itself count value at this time It is determined as the spacing value to be divided equally of current second, then exports the spacing value to be divided equally, and be zeroed out and count again.
Optionally, it is described divide equally computing module, specifically for by the gap count module output described in wait divide equally between Divide equally number divided by preset every value, obtains the first remainder and the first quotient as equal score value;By the spacing value to be divided equally Divided by first remainder, the second remainder and the second quotient as correction value are obtained.
Optionally, the amendment counting module, is specifically used in clock increasing process, be greater than when the count value of itself or Equal to the correction value, then New count of laying equal stress on is reset, and export corrected impulse.
Optionally, described to divide equally counting module, in clock increasing process, when getting the amendment counting module When the corrected impulse of output, then stop counting within a corresponding clock cycle;When the count value of itself is greater than or waits In the equal score value, then New count of laying equal stress on is reset, and export and divide equally pulse.
Optionally, described to divide equally counting module, it is also used to reset New count of laying equal stress on, simultaneously when second pulse signal arrives Pulse is divided equally in output.
Optionally, the interval equipartition device, further includes:
Parameter updating unit, for being updated to the number of dividing equally.
Optionally, the parameter updating unit is specifically used for through preset parameter input interface, and get parms update letter Breath is updated the number of dividing equally using the parameter more new information.
Second aspect, this application discloses a kind of IP kernel, the IP kernel is to carry out to aforementioned disclosed interval equipartition device It is obtained after encapsulation.
As it can be seen that the application introduces amendment counting module, for generating corrected impulse, and corrected impulse count defeated Out, to realize that the deviation generated to respectively process is modified, so that improving the time divides equally precision, also, divide equally interval dress Set be based in FPGA counter and divider construct, be both easily achieved in this way, need not also occupy excessive resource.It is comprehensive On, the application can effectively improve the time and divide equally precision, and without occupying excess resource.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of interval equipartition device structural schematic diagram based on FPGA disclosed by the invention;
Fig. 2 is a kind of specifically interval equipartition device structural schematic diagram based on FPGA disclosed by the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Currently, with the development of computer and smart machine, the rate of network communication is getting faster, in many application scenarios The synchronous required precision of group-net communication, clock synchronization is higher and higher between equipment, is especially measuring and controlling the fields such as application.Interval It is respectively real-time pulse spacing value to be divided into D parts, and guarantee stable and precision, is common in the fields such as observing and controlling, communication Function.At present interval equal distribution function mostly use hardware resource greatly or need hardware resource participate in realize, but its implementation or It is difficult to ensure that precision respectively or implementation are excessively complicated, resource occupation is more.For this purpose, this application provides a kind of bases In the interval equipartition device of FPGA, can either effectively improve the time divides equally precision, without occupying excess resource.
It is shown in Figure 1, the embodiment of the invention discloses a kind of interval equipartition device based on FPGA, comprising:
Gap count module 11 carries out counting output for treating respectively spacing value;
What is connect with the gap count module 11 divides equally computing module 12, for determining equal score value and correction value;
With it is described divide equally computing module 12 connect and using the correction value as the amendment counting module 13 of mould, for generating Corrected impulse, and counting output is carried out to the corrected impulse, to realize that the deviation generated to respectively process is modified;
With it is described divide equally computing module 12 and it is described amendment counting module 13 connect and using the equal score value as the equal of mould Divide counting module 14, divide equally pulse for generating, and counting output is carried out to the respectively pulse;
Wherein, the gap count module 11, the amendment counting module 13 and the counting module 14 of dividing equally are base It is constructed in the counter of FPGA, the computing module 12 of dividing equally is the divider building based on FPGA.
As it can be seen that the embodiment of the present application introduces amendment counting module, carried out for generating corrected impulse, and to corrected impulse Output is counted, to realize that the deviation generated to respectively process is modified, so that improving the time divides equally precision, also, is divided equally Escapement be based in FPGA counter and divider construct, be both easily achieved, need not also occupy excessive in this way Resource.To sum up, the embodiment of the present application can effectively improve the time and divide equally precision, and without occupying excess resource.
It should be pointed out that the interval equipartition device in the present embodiment can be applied to TT&C system or communication system etc. pair In the more demanding system of timing tracking accuracy.
In the following, being dispensed so that GPS second interval common in TT&C system is divided equally in real time as an example to the interval in the present embodiment It sets and is specifically described.
Shown in Figure 2, in the present embodiment, the gap count module 11 specifically can be used for as second pulse signal s_ When pulse arrives, itself count value at this time is determined as to the spacing value S to be divided equally of current second, then output is described wait divide equally Spacing value, and be zeroed out and count again.Thus start next second gap count, so recycle, to realize the reality at interval Shi Tongji output.
It is described divide equally computing module 12, specifically can be used for exporting the gap count module 11 described in wait divide equally between Divide equally number D divided by preset every value S, obtains the first remainder R and the first quotient Q as equal score value;Will it is described wait divide equally between Every value S divided by first remainder R, the second remainder C and the second quotient M as correction value are obtained.Formula includes: accordingly
S=D*Q+R; (1)
S=R*M+C; (2)
In formula, S indicates that the spacing value to be divided equally of the gap count module output, D indicate described and divide equally number, Q Indicate that first quotient for being used as equal score value, R indicate that first remainder, M indicate the second quotient for being used as correction value, C table Show second remainder.
As it can be seen that dividing equally computing module in the present embodiment has carried out two-wheeled division arithmetic, why two-wheeled division fortune is carried out Calculate, be since it is considered that if using Q be the counting interval carry out count output respectively pulse, the error of R clock cycle can be generated, In order to reduce error, the present embodiment has carried out the second wheel division arithmetic, to realize that remainder compensates, to reduce error, increases Divide equally precision.
The amendment counting module 13 is specifically used in clock increasing process, when the count value of itself is greater than or equal to The correction value M then resets New count of laying equal stress on, and exports corrected impulse m_pulse.
It is described to divide equally counting module 14, in clock increasing process, when getting, the amendment counting module 13 to be defeated When the corrected impulse m_pulse out, then stop counting within a corresponding clock cycle;When the count value of itself is greater than Or be equal to the equal score value Q, then New count of laying equal stress on is reset, and export and divide equally pulse a_pulse.
In order to guarantee precision, prevent error accumulation, it is necessary to for it is per second the last one divide equally pulse carry out specially treated, Specifically, described divide equally counting module 14, it is also used to reset New count of laying equal stress on when second pulse signal arrives, while exporting equal Sectors punching.
Further, the interval equipartition device in the present embodiment can also include:
Parameter updating unit, for being updated to the number D that divides equally.
Wherein, the parameter updating unit specifically can be used for through preset parameter input interface, and get parms update Information is updated the number of dividing equally using the parameter more new information.
It should be pointed out that the update needs of D value are uniformly processed at pulse per second (PPS) in the present embodiment.
, can according to demand and actual conditions in addition, the update for Q value and M value, first within the current second is divided equally It updates before pulse, or is updated at next pulse per second (PPS).
Above-mentioned technical proposal in through this embodiment can will divide equally the first remainder R calculated and balancedly be inserted into During point, to ensure that at interval of the interior precision divided equally, and error does not add up.
Error analysis is carried out to above-mentioned result of dividing equally below:
Interval divides equally process and resets counting at each pulse per second (PPS), if opening to pulse number is divided equally from initial pulse per second (PPS) Begin to be 0,1,2,3 ..., D-1, D divides equally pulse in total, then ideally divides equally position of the pulse in second interval n-th Are as follows:
And press above-mentioned interval equal division methodology, n-th divide equally position of the pulse in second interval are as follows:
Correspondingly, its deviation is: Deviation=Pos2-Pos1;
By by the S in formula (1) alternate form (3), by the S in formula (2) alternate form (4), by Deviation abbreviation at:
It can be obtained by further analyzing: whenWhen greater than 0,When its etc. When 0,
It can be seen that error corresponding with the equal offshoot program in above-mentioned interval, is no more than a clock cycle in a negative direction, It is no more than in positive directionIn actual use, relevant parameter can be designed according to the actual situation.
Further, disclosed herein as well is a kind of IP kernel, the IP kernel is to divide equally to interval disclosed in previous embodiment Device obtains after being packaged.Wherein, it can refer in previous embodiment and disclose about the specific configuration of the interval equipartition device Corresponding contents, no longer repeated herein.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
A kind of interval equipartition device and IP kernel based on FPGA provided by the present invention is described in detail above, this Apply that a specific example illustrates the principle and implementation of the invention in text, the explanation of above example is only intended to It facilitates the understanding of the method and its core concept of the invention;At the same time, for those skilled in the art, think of according to the present invention Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair Limitation of the invention.

Claims (9)

1. a kind of interval equipartition device based on FPGA characterized by comprising
Gap count module carries out counting output for treating respectively spacing value;
What is connect with the gap count module divides equally computing module, for determining equal score value and correction value;
With it is described divide equally computing module connect and using the correction value as the amendment counting module of mould, for generate correct arteries and veins Punching, and counting output is carried out to the corrected impulse, to realize that the deviation generated to respectively process is modified;
With it is described divide equally computing module and it is described amendment counting module connect and using the equal score value as mould respectively count module Block divides equally pulse for generating, and carries out counting output to the respectively pulse;
Wherein, the gap count module, the amendment counting module and the counting module of dividing equally are based on FPGA Number device building, the computing module of dividing equally is the divider building based on FPGA.
2. the interval equipartition device according to claim 1 based on FPGA, which is characterized in that
The gap count module is specifically used for being determined as itself count value at this time currently when second pulse signal arrives Then the spacing value to be divided equally of second exports the spacing value to be divided equally, and is zeroed out and counts again.
3. the interval equipartition device according to claim 2 based on FPGA, which is characterized in that
It is described to divide equally computing module, specifically for by spacing value to be divided equally described in gap count module output divided by default Divide equally number, obtain the first remainder and the first quotient as equal score value;By the spacing value to be divided equally divided by described first Remainder obtains the second remainder and the second quotient as correction value.
4. the interval equipartition device according to claim 3 based on FPGA, which is characterized in that
The amendment counting module is specifically used in clock increasing process, when the count value of itself is greater than or equal to described repair Positive value then resets New count of laying equal stress on, and exports corrected impulse.
5. the interval equipartition device according to claim 4 based on FPGA, which is characterized in that
It is described to divide equally counting module, in clock increasing process, when getting described in the amendment counting module exports When corrected impulse, then stop counting within a corresponding clock cycle;When the count value of itself is greater than or equal to described divide equally Value then resets New count of laying equal stress on, and exports and divide equally pulse.
6. the interval equipartition device according to claim 5 based on FPGA, which is characterized in that it is described to divide equally counting module, It is also used to reset New count of laying equal stress on, while exporting and dividing equally pulse when second pulse signal arrives.
7. according to the described in any item interval equipartition devices based on FPGA of claim 3 to 6, which is characterized in that further include:
Parameter updating unit, for being updated to the number of dividing equally.
8. the interval equipartition device according to claim 7 based on FPGA, which is characterized in that
The parameter updating unit is specifically used for through preset parameter input interface, and get parms more new information, using described Parameter more new information is updated the number of dividing equally.
9. a kind of IP kernel, which is characterized in that the IP kernel is to interval equipartition device as claimed in any one of claims 1 to 8 It is obtained after being packaged.
CN201910092904.4A 2019-01-30 2019-01-30 FPGA-based interval uniform distribution device and IP core Active CN109814835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910092904.4A CN109814835B (en) 2019-01-30 2019-01-30 FPGA-based interval uniform distribution device and IP core

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910092904.4A CN109814835B (en) 2019-01-30 2019-01-30 FPGA-based interval uniform distribution device and IP core

Publications (2)

Publication Number Publication Date
CN109814835A true CN109814835A (en) 2019-05-28
CN109814835B CN109814835B (en) 2022-02-18

Family

ID=66605840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910092904.4A Active CN109814835B (en) 2019-01-30 2019-01-30 FPGA-based interval uniform distribution device and IP core

Country Status (1)

Country Link
CN (1) CN109814835B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110492966A (en) * 2019-09-12 2019-11-22 积成电子股份有限公司 A kind of method for synchronizing time of distribution protective relaying device
CN111211779A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 A FPGA-based interval equalization design method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4442547A (en) * 1982-09-01 1984-04-10 Rca Corporation Counter arrangement useful in a frequency locked loop tuning system for measuring the frequency of a local oscillator signal
CN102035472A (en) * 2010-10-29 2011-04-27 中国兵器工业集团第二一四研究所苏州研发中心 Programmable digital frequency multiplier
CN103713552A (en) * 2013-12-23 2014-04-09 国电南瑞科技股份有限公司 Self-adaptive dynamic synchronous sampling control device and method based on pulse per second
CN104991441A (en) * 2015-07-22 2015-10-21 广州供电局有限公司 GPS synchronous time giving circuit
US20160112034A1 (en) * 2012-06-29 2016-04-21 Renesas Electronics Corporation Clock correction circuit and clock correction method
CN106027187A (en) * 2016-04-29 2016-10-12 国家电网公司 GPS (Global Positioning System) synchronizing signal frequency source circuit
CN107577140A (en) * 2017-09-14 2018-01-12 国电南瑞科技股份有限公司 A kind of synchronised clock management module based on FPGA

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4442547A (en) * 1982-09-01 1984-04-10 Rca Corporation Counter arrangement useful in a frequency locked loop tuning system for measuring the frequency of a local oscillator signal
CN102035472A (en) * 2010-10-29 2011-04-27 中国兵器工业集团第二一四研究所苏州研发中心 Programmable digital frequency multiplier
US20160112034A1 (en) * 2012-06-29 2016-04-21 Renesas Electronics Corporation Clock correction circuit and clock correction method
CN103713552A (en) * 2013-12-23 2014-04-09 国电南瑞科技股份有限公司 Self-adaptive dynamic synchronous sampling control device and method based on pulse per second
CN104991441A (en) * 2015-07-22 2015-10-21 广州供电局有限公司 GPS synchronous time giving circuit
CN106027187A (en) * 2016-04-29 2016-10-12 国家电网公司 GPS (Global Positioning System) synchronizing signal frequency source circuit
CN107577140A (en) * 2017-09-14 2018-01-12 国电南瑞科技股份有限公司 A kind of synchronised clock management module based on FPGA

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
于洋: "基于FPGA高速时间交织ADC校准与研究", 《中国优秀硕士学位论文全文数据库-信息科技辑》 *
高嵩: "基于FPGA的多道脉冲幅度分析器研究", 《中国优秀硕士学位论文全文数据库-信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110492966A (en) * 2019-09-12 2019-11-22 积成电子股份有限公司 A kind of method for synchronizing time of distribution protective relaying device
CN111211779A (en) * 2019-12-31 2020-05-29 苏州浪潮智能科技有限公司 A FPGA-based interval equalization design method and device
WO2021135303A1 (en) * 2019-12-31 2021-07-08 苏州浪潮智能科技有限公司 Fpga-based design method and device for equally dividing interval
CN111211779B (en) * 2019-12-31 2023-01-06 苏州浪潮智能科技有限公司 FPGA-based interval uniform design method and device
US11923863B2 (en) 2019-12-31 2024-03-05 Inspur Suzhou Intelligent Technology Co., Ltd. FPGA-based design method and device for equally dividing interval

Also Published As

Publication number Publication date
CN109814835B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN106817184B (en) The method for synchronizing time and device of local clock and GPS clock in network measure
CN106483866B (en) Guidance and control semi-matter simulating system timing method and system
CN112162591B (en) Electronic device with multiple processors and synchronization method thereof
CN108037656A (en) Real-time timepiece chip calibration method, device and terminal device
TW201212544A (en) Frequency calibration circuit for automatically calibrating frequency and method thereof
CN102879641A (en) Frequency measurement method and system
CN109302255A (en) Time synchronization control method, device, system and computer readable storage medium
CN109814835A (en) A FPGA-based interval equalization device and IP core
CN106597097A (en) High-precision frequency measurement method
CN106645780A (en) Rotating speed detection method and system base on DSP
TW201304418A (en) Method and system for calibrating frequency
JP5936716B2 (en) Signal processing device
CN106383438B (en) One kind taming and dociling clock method based on sliding window time extension high-precision
CN106326639B (en) A kind of ECG emulation signal modeling and segmentation method for generation
CN112506268A (en) Time synchronization method, device, equipment and storage medium among multiple FPGA (field programmable Gate array)
CN110928177B (en) Clock synchronization system and method
US9647674B2 (en) Apparatus for generating clock signals having a PLL part and synthesizer part with programmable output dividers
CN205901711U (en) Accurate digital frequency divider based on GPS pulse signal second
CN104635046A (en) Modulation domain frequency counter and continuous frequency measurement method thereof
US20130346022A1 (en) Physical quantity measuring apparatus and physical quantity measuring method
CN110687773B (en) Method, device and system for measuring timing accuracy of time unified system
CN103471588B (en) A kind of inertial measuring unit asynchronous communication synchronous method based on error compensation
CN104238372B (en) The dispatching method and device of multiple model parallel artificials
CN109167736A (en) The data packet of high evenness is given out a contract for a project method and device
CN115408867A (en) Method and device for improving calculation precision in electric power real-time simulation and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant