CN101807913B - Low-speed clock enable signal generation method, device and equipment - Google Patents
Low-speed clock enable signal generation method, device and equipment Download PDFInfo
- Publication number
- CN101807913B CN101807913B CN2010101333564A CN201010133356A CN101807913B CN 101807913 B CN101807913 B CN 101807913B CN 2010101333564 A CN2010101333564 A CN 2010101333564A CN 201010133356 A CN201010133356 A CN 201010133356A CN 101807913 B CN101807913 B CN 101807913B
- Authority
- CN
- China
- Prior art keywords
- low
- speed clock
- output
- enable signal
- clock
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
本发明实施例公开了一种低速时钟使能信号产生方法、装置和设备,涉及移动通信技术领域,实现使用高速时钟模拟固定比例的低速时钟。设备包括:由第一选择器、第二选择器、寄存器、比较器、加法器和减法器组合实现取模运算效果的等效电路。方法包括:在第n个高速时钟的周期内,将C的n倍除以P所得到的余数M与所述C相比较;若所述余数M小于C,则输出有效的低速时钟使能信号;若所述余数M大于等于C,则输出无效的低速时钟使能信号;其中,所述高速时钟与所述低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,n=1,......,P。本发明应用于通信技术。
The embodiment of the present invention discloses a method, device and equipment for generating a low-speed clock enable signal, which relates to the field of mobile communication technology and realizes the use of a high-speed clock to simulate a fixed-ratio low-speed clock. The device includes: an equivalent circuit that realizes the modulo operation effect by combining a first selector, a second selector, a register, a comparator, an adder and a subtractor. The method includes: in the cycle of the nth high-speed clock, the remainder M obtained by dividing n times C by P is compared with the C; if the remainder M is less than C, a valid low-speed clock enable signal is output; if the remainder M is greater than or equal to C, an invalid low-speed clock enable signal is output; wherein the integer ratio of the high-speed clock to the low-speed clock is: P/C, P is the integer value of the high-speed clock, C is the integer value of the low-speed clock, n=1,..., P. The present invention is applied to communication technology.
Description
技术领域 technical field
本发明涉及通信领域,尤其涉及一种低速时钟使能信号产生方法、装置和设备。The present invention relates to the communication field, in particular to a method, device and equipment for generating a low-speed clock enabling signal.
背景技术 Background technique
随着芯片规模的扩大和功能的增加,同时兼容的接口也呈倍数增长,目前,大多数芯片都是多时钟域,多时钟域的芯片存在异步与功耗问题,解决上述问题需要增大芯片容量,直接导致了芯片成本的增加。With the expansion of the chip scale and the increase of functions, the number of compatible interfaces has also increased exponentially. At present, most chips have multiple clock domains. Chips with multiple clock domains have asynchronous and power consumption problems. To solve the above problems, the chip needs to be enlarged. The capacity directly leads to the increase of chip cost.
多时钟域芯片对于同源时钟多时钟频点方案,主要由内置或外置锁相环(Phase Locked Loop,简称PLL)来实现,使用一个系统时钟产生不同时钟频点的时钟分支,但该方案受PLL配置系数的限制,同时使用PLL会增加芯片或芯片级解决方案的成本,且分频系数的扩大需要以成本增加为代价。For multi-clock domain chips, the multi-clock frequency point scheme of the same source clock is mainly realized by a built-in or external phase-locked loop (Phase Locked Loop, PLL for short), and a system clock is used to generate clock branches with different clock frequency points. Limited by the configuration coefficient of the PLL, using the PLL at the same time will increase the cost of the chip or chip-level solution, and the expansion of the frequency division coefficient needs to be at the cost of an increase in cost.
针对上述缺陷,现有技术提供一种使用最高时钟频率作为系统时钟的频率,其余频率的时钟使用系统时钟+时钟使能缺口(gap)替代时钟的实现方案。该方案可以达到只需一个晶振提供时钟的效果,不同的时钟使能gap代表不同时钟域,消除了异步处理的问题。In view of the above defects, the prior art provides an implementation scheme in which the highest clock frequency is used as the frequency of the system clock, and the clocks of other frequencies are replaced by the system clock + a clock enabling gap (gap). This solution can achieve the effect that only one crystal oscillator provides the clock, and different clock enable gaps represent different clock domains, which eliminates the problem of asynchronous processing.
具体地,在利用高速时钟模拟低速时钟时,使用行波计数器实现低速时钟使能信号。例如用100MHz时钟模拟50MHz时钟,可使用100MHz时钟设计一个1比特的计数器,于0/1间翻转,表示1/2的分频系数,达到50MHz时钟的分频效果。对于分频系数较为复杂的情况,可使用A*(B*CLK+1*gap)+(C*CLK+1*gap),即使用高速时钟产生两个快慢图案来模拟低速时钟的方法,来实现低速时钟使能信号。其中,““B*CLK+1*gap”表示快图案,物理含义为B个有效的时钟周期+1个无效的时钟周期(缺口);“C*CLK+1*gap”表示慢图案,物理含义为C个有效的时钟周期+1个无效的时钟周期(缺口);总公式A*(B*CLK+1*gap)+(C*CLK+1*gap)则表示A*(B+1)+(C+1)个时钟周期中,A个快图案与1个慢图案来模拟低速时钟使能信号,其中低速时钟与高速时钟的频率比例为(A*B+C)/(A*(B+1)+(C+1))。Specifically, when a high-speed clock is used to simulate a low-speed clock, a ripple counter is used to realize the enable signal of the low-speed clock. For example, if a 100MHz clock is used to simulate a 50MHz clock, a 1-bit counter can be designed with a 100MHz clock, which can be flipped between 0/1 to indicate a frequency division factor of 1/2 to achieve the frequency division effect of a 50MHz clock. For the case where the frequency division coefficient is more complicated, A*(B*CLK+1*gap)+(C*CLK+1*gap) can be used, that is, the method of using a high-speed clock to generate two fast and slow patterns to simulate a low-speed clock. Implements a low-speed clock enable signal. Among them, ""B*CLK+1*gap" means a fast pattern, and its physical meaning is B effective clock cycles + 1 invalid clock cycle (gap); "C*CLK+1*gap" means a slow pattern, and its physical meaning is The meaning is C valid clock cycles + 1 invalid clock cycle (gap); the total formula A*(B*CLK+1*gap)+(C*CLK+1*gap) means A*(B+1 )+(C+1) clock cycles, A fast pattern and 1 slow pattern to simulate the low-speed clock enable signal, where the frequency ratio of the low-speed clock to the high-speed clock is (A*B+C)/(A* (B+1)+(C+1)).
由于通信传输系统存在时钟指标要求,使用高速时钟模拟出的低速时钟需要达到最佳均匀的效果,以换取最佳的时钟抖动性能,因此芯片系统的时钟指标与时钟使能信号gap的均匀性相关。在实现上述方案时,发明人发现现有技术的技术方案至少存在以下问题:对于分频系统N/M较为复杂的情况,尤其是当N与M的最小公倍数较大时,使用A*(B*CLK+1*gap)+(C*CLK+1*gap)算式得出来的结果并不理想,产生的频偏较大,时钟使能信号不均匀,从而导致模拟的时钟有偏差。Due to the clock index requirements of the communication transmission system, the low-speed clock simulated by the high-speed clock needs to achieve the best uniform effect in exchange for the best clock jitter performance. Therefore, the clock index of the chip system is related to the uniformity of the clock enable signal gap . When realizing the above-mentioned scheme, the inventor finds that there are at least the following problems in the technical scheme of the prior art: for the relatively complicated situation of the frequency division system N/M, especially when the least common multiple of N and M is large, using A*(B *CLK+1*gap)+(C*CLK+1*gap) The result obtained by the formula is not ideal, the generated frequency deviation is large, and the clock enable signal is uneven, which leads to deviation of the simulated clock.
发明内容 Contents of the invention
本发明实施例提供一种低速时钟使能信号产生方法、装置和设备,能够实现使用高速时钟模拟固定比例的低速时钟。Embodiments of the present invention provide a method, device and device for generating a low-speed clock enabling signal, which can simulate a low-speed clock with a fixed ratio using a high-speed clock.
为解决上述技术问题,本发明实施例采用如下技术方案:In order to solve the above technical problems, the embodiment of the present invention adopts the following technical solutions:
一种低速时钟使能信号产生设备,包括:第一选择器、第二选择器、寄存器、比较器、加法器和减法器,其中,高速时钟与低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,则,A low-speed clock enabling signal generating device, including: a first selector, a second selector, a register, a comparator, an adder, and a subtractor, wherein the integer ratio of the high-speed clock to the low-speed clock is: P/C, P is the integer value of the high-speed clock, and C is the integer value of the low-speed clock, then,
所述第一选择器的第一输入端用于接收低速时钟整数值C,其第二输入端耦合至所述加法器的输出端,其控制输入端用于接收复位信号,其输出端耦合至所述寄存器的输入端;The first input end of the first selector is used to receive the low-speed clock integer value C, its second input end is coupled to the output end of the adder, its control input end is used to receive a reset signal, and its output end is coupled to an input to said register;
所述寄存器的输入端耦合至所述第一选择器的输出端,其驱动端用于接收高速时钟,其输出端分别耦合至所述比较器的输入端、所述第二选择器的第一输入端和所述减法器的第一输入端;The input end of the register is coupled to the output end of the first selector, its drive end is used to receive a high-speed clock, and its output end is respectively coupled to the input end of the comparator, the first selector of the second selector input and a first input of said subtractor;
所述比较器的第一输入端耦合至所述寄存器的输出端,其第二输入端用于接收高速时钟整数值P,其输出端输出低速时钟使能信号并耦合至所述第二选择器的控制输入端;The first input end of the comparator is coupled to the output end of the register, its second input end is used to receive the high-speed clock integer value P, and its output end outputs a low-speed clock enable signal and is coupled to the second selector the control input terminal;
所述第二选择器的第一输入端耦合至所述寄存器的输出端,其控制输入端耦合至所述比较器的输出端,其第二输入端耦合至所述减法器的输出端,其输出端耦合至所述加法器的第二输入端;The first input of the second selector is coupled to the output of the register, its control input is coupled to the output of the comparator, and its second input is coupled to the output of the subtractor, which an output coupled to a second input of the adder;
所述减法器的第一输入端耦合至所述寄存器的输出端,其第二输入端用于接收高速时钟整数值P,其输出端耦合至所述第二选择器的第二输入端;The first input of the subtractor is coupled to the output of the register, the second input of which is adapted to receive a high-speed clock integer value P, and the output of which is coupled to the second input of the second selector;
所述加法器的第一输入端用于接收低速时钟整数值C,其第二输入端耦合至所述第二选择器的输出端,其输出端耦合至所述第一选择器的第二输入端。The adder has a first input for receiving a low-speed clock integer value C, a second input coupled to the output of the second selector, and an output coupled to the second input of the first selector end.
一种低速时钟使能信号产生方法,包括:A method for generating a low-speed clock enable signal, comprising:
在第n个高速时钟的周期内,将C的n倍除以P所得到的余数M与所述C相比较;In the period of the nth high-speed clock, the remainder M obtained by dividing n times of C by P is compared with the C;
若所述余数M小于C,则输出有效的低速时钟使能信号;若所述余数M大于等于C,则输出无效的低速时钟使能信号;If the remainder M is less than C, an effective low-speed clock enable signal is output; if the remainder M is greater than or equal to C, an invalid low-speed clock enable signal is output;
其中,所述高速时钟与所述低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,n=1,......,P。Wherein, the integer ratio of the high-speed clock to the low-speed clock is: P/C, where P is the integer value of the high-speed clock, C is the integer value of the low-speed clock, n=1, . . . , P.
一种低速时钟使能信号产生装置,包括:A low-speed clock enable signal generating device, comprising:
比较单元,用于在第n个高速时钟的周期内,将C的n倍除以P所得到的余数M与所述C相比较;其中,所述高速时钟与所述低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,n=1,......,P;The comparison unit is used to compare the remainder M obtained by dividing n times of C by P with the C in the cycle of the nth high-speed clock; wherein, the integer ratio of the high-speed clock to the low-speed clock is : P/C, P is the integer value of the high-speed clock, C is the integer value of the low-speed clock, n=1, ..., P;
输出单元,用于若所述余数M小于C,则输出有效的低速时钟使能信号;若所述余数M大于等于C,则输出无效的低速时钟使能信号。An output unit, configured to output a valid low-speed clock enable signal if the remainder M is less than C; output an invalid low-speed clock enable signal if the remainder M is greater than or equal to C.
本发明实施例提供的低速时钟使能信号产生方法、装置和设备,利用了Sigma-Delta算法,根据得到的高速时钟与所模拟的低速时钟的整数比以及高速时钟整数值和低速时钟整数值,在高速时钟整数值的周期内,将低速时钟整数值的n倍除以高速时钟整数值所得到的余数M与低速时钟整数值相比较,当余数M小于低速时钟整数值时输出有效的低速时钟使能信号,当余数M大于等于低速时钟整数值时输出无效的低速时钟使能信号,从而利用Sigma-Delta算法等效电路输出均匀的低速时钟使能信号,从而实现了复杂的时钟分频,将高速时钟模拟固定比例的低速时钟输出。The low-speed clock enable signal generation method, device and equipment provided by the embodiments of the present invention utilize the Sigma-Delta algorithm, and according to the integer ratio of the obtained high-speed clock to the simulated low-speed clock and the integer value of the high-speed clock and the integer value of the low-speed clock, In the cycle of the integer value of the high-speed clock, the remainder M obtained by dividing n times the integer value of the low-speed clock by the integer value of the high-speed clock is compared with the integer value of the low-speed clock, and when the remainder M is less than the integer value of the low-speed clock, an effective low-speed clock is output The enable signal, when the remainder M is greater than or equal to the integer value of the low-speed clock, an invalid low-speed clock enable signal is output, so that the equivalent circuit of the Sigma-Delta algorithm is used to output a uniform low-speed clock enable signal, thereby realizing complex clock frequency division, The high-speed clock is simulated as a fixed-ratio low-speed clock output.
附图说明 Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only of the present invention. For some embodiments, those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.
图1为本发明实施例低速时钟使能信号产生方法流程图;1 is a flowchart of a method for generating a low-speed clock enable signal according to an embodiment of the present invention;
图2为本发明实施例低速时钟使能信号产生装置的结构示意图;2 is a schematic structural diagram of a low-speed clock enable signal generating device according to an embodiment of the present invention;
图3为本发明实施例低速时钟使能信号产生设备的结构示意图;3 is a schematic structural diagram of a low-speed clock enable signal generating device according to an embodiment of the present invention;
图4为本发明实施例低速时钟使能信号与系统时钟捆绑控制的电路结构示意图。FIG. 4 is a schematic diagram of a circuit structure for bundling control of a low-speed clock enable signal and a system clock according to an embodiment of the present invention.
具体实施方式 Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明实施例提供一种低速时钟使能信号产生方法、装置和设备,实现使用高速时钟模拟固定比例的低速时钟。Embodiments of the present invention provide a method, device and device for generating a low-speed clock enabling signal, so as to simulate a low-speed clock with a fixed ratio using a high-speed clock.
实施例一Embodiment one
本发明实施例提供一种低速时钟使能信号产生方法,如图1所示,该方法包括:An embodiment of the present invention provides a method for generating a low-speed clock enable signal, as shown in FIG. 1 , the method includes:
步骤101、在第n个高速时钟的周期内,将C的n倍除以P所得到的余数M与所述C相比较;
步骤102、若所述余数M小于C,则输出有效的低速时钟使能信号;若所述余数M大于等于C,则输出无效的低速时钟使能信号;
其中,所述高速时钟与所述低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,n=1,......,P。Wherein, the integer ratio of the high-speed clock to the low-speed clock is: P/C, where P is the integer value of the high-speed clock, C is the integer value of the low-speed clock, n=1, . . . , P.
本实施例所提供的方法采用Sigma-Delta算法,产生低速时钟使能信号,从而将高速时钟模拟为低速时钟输出,以下以高速时钟为10GE客户业务所采用的系统时钟,模拟的低速时钟为ODU2E业务时钟为例进行说明。其中,10GE与ODU2E为同步以太网与OTN传送网的业务类型,业务速率分别为10.3125Gbit/s与10.3558Gbit/s,主要应用在传送网络中装载低速传输业务与数据包业务。The method provided in this embodiment uses the Sigma-Delta algorithm to generate a low-speed clock enable signal, thereby simulating the high-speed clock as a low-speed clock output. In the following, the high-speed clock is used as the system clock used by the 10GE customer service, and the simulated low-speed clock is ODU2E The service clock is taken as an example for description. Among them, 10GE and ODU2E are the service types of synchronous Ethernet and OTN transport network, with service rates of 10.3125Gbit/s and 10.3558Gbit/s respectively, and are mainly used to load low-speed transmission services and data packet services in the transport network.
10GE客户业务应用于传送网络时,数据流使用硬提速方式封装成ODU(Optical Channel Data Unit,光通道数据单元)结构后经过同步背板传输。使用背板时钟作为系统时钟,时钟频率为174.96MHz,模拟时钟为ODU2E业务时钟。根据10GE与ODU2E帧结构的对应关系(239/237)得出ODU2E业务时钟的时钟频率值为162.49258306962025316455696202532MHz(此处只显示小数点后数位,此值非精确值),因此使用系统时钟无法做到绝对的0ppm(Parts Permillion,表示百万分之)频偏,需要截取模拟的低速时钟的取值,使其为系统可容忍的频偏范围之内,如+/-1ppm,将ODU2E业务时钟取值162.4925MHz,可换算得两者的整数比例可取60865∶65535,模拟的时钟频偏为1.03592ppm,为系统可接受的频偏范围。When the 10GE customer service is applied to the transmission network, the data stream is encapsulated into an ODU (Optical Channel Data Unit) structure using a hardware speed-up method and then transmitted through a synchronous backplane. Use the backplane clock as the system clock, the clock frequency is 174.96MHz, and the analog clock is the ODU2E service clock. According to the corresponding relationship between 10GE and ODU2E frame structure (239/237), the clock frequency value of the ODU2E service clock is 162.49258306962025316455696202532MHz (only the digits after the decimal point are displayed here, and this value is not accurate), so the system clock cannot be used to achieve absolute The frequency deviation of 0ppm (Parts Permillion, representing parts per million) needs to intercept the value of the simulated low-speed clock to make it within the tolerable frequency deviation range of the system, such as +/-1ppm, and set the value of the ODU2E service clock 162.4925MHz, which can be converted into an integer ratio of 60865:65535, and the analog clock frequency deviation is 1.03592ppm, which is an acceptable frequency deviation range for the system.
如果P=65535,C=60865,当n=1时,M=(nC)MODP=60865=C=60865,则输出无效的时钟使能信号;当n=2时,M=(nC)MODP=56195<C=60865,则依然输出有效的时钟使能信号;当n=3时,M=(nC)MODP=51525<C=60865,则依然输出有效的时钟使能信号;当n=4时,M=(nC)MODP=46855<C=60865,则依然输出有效的时钟使能信号;......当n=N时,M=(nC)MODP≥C=60865,则输出无效的时钟使能信号;......,其中,输出的有效的时钟使能信号为60865个,而无效的时钟使能信号为65535-60865=4670个。If P=65535, C=60865, when n=1, M=(nC)MODP=60865=C=60865, then output an invalid clock enable signal; when n=2, M=(nC)MODP= 56195<C=60865, it will still output a valid clock enable signal; when n=3, M=(nC)MODP=51525<C=60865, it will still output a valid clock enable signal; when n=4 , M=(nC)MODP=46855<C=60865, then a valid clock enable signal is still output; ......When n=N, M=(nC)MODP≥C=60865, then the output is invalid clock enable signals; ......, wherein, 60865 effective clock enable signals are output, and 65535−60865=4670 invalid clock enable signals are output.
本发明实施例还提供一种低速时钟使能信号产生装置,如图2所示,该装置包括:比较单元11和输出单元12The embodiment of the present invention also provides a low-speed clock enable signal generating device, as shown in FIG. 2 , the device includes: a comparison unit 11 and an output unit 12
比较单元11,用于在第n个高速时钟的周期内,将C的n倍除以P所得到的余数M与所述C相比较;其中,所述高速时钟与所述低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,n=1,......,P;输出单元12,用于若所述余数M小于C,则输出有效的低速时钟使能信号;若所述余数M大于等于C,则输出无效的低速时钟使能信号。即,若M=(nC)MODP<C,则输出有效的低速时钟使能信号;若M=(nC)MODP≥C,则输出无效的低速时钟使能信号,MOD为取模运算。The comparison unit 11 is used to compare the remainder M obtained by dividing n times of C by P in the cycle of the nth high-speed clock with the C; wherein, the integer ratio of the high-speed clock to the low-speed clock Be: P/C, P is the integer value of high-speed clock, C is the integer value of low-speed clock, n=1,..., P; Output unit 12, is used for if described remainder M is less than C, then output is valid low-speed clock enable signal; if the remainder M is greater than or equal to C, an invalid low-speed clock enable signal is output. That is, if M=(nC)MODP<C, an effective low-speed clock enable signal is output; if M=(nC)MODP≥C, an invalid low-speed clock enable signal is output, and MOD is a modulo operation.
本发明实施例提供的低速时钟使能信号产生方法和装置,利用了Sigma-Delta算法,根据得到的高速时钟与所模拟的低速时钟的整数比以及高速时钟整数值和低速时钟整数值,在高速时钟整数值的周期内,将低速时钟整数值的n倍除以高速时钟整数值所得到的余数M与低速时钟整数值相比较,当余数M小于低速时钟整数值时输出有效的低速时钟使能信号,当余数M大于等于低速时钟整数值时输出无效的低速时钟使能信号,从而利用Sigma-Delta算法等效电路输出均匀的低速时钟使能信号,实现了复杂的时钟分频,。The low-speed clock enable signal generation method and device provided by the embodiments of the present invention utilize the Sigma-Delta algorithm, according to the integer ratio of the obtained high-speed clock to the simulated low-speed clock and the integer value of the high-speed clock and the integer value of the low-speed clock. In the cycle of the integer value of the clock, the remainder M obtained by dividing n times the integer value of the low-speed clock by the integer value of the high-speed clock is compared with the integer value of the low-speed clock, and when the remainder M is smaller than the integer value of the low-speed clock, the effective low-speed clock is output. Signal, when the remainder M is greater than or equal to the integer value of the low-speed clock, an invalid low-speed clock enable signal is output, so that the Sigma-Delta algorithm equivalent circuit is used to output a uniform low-speed clock enable signal, and complex clock frequency division is realized.
实施例二Embodiment two
实施例一所述的利用Sigma-Delta算法实现低速时钟使能信号产生方法,由于其取余数的等效电路模拟起来比较困难,因此本实施例基于上述方法提出的低速时钟使能信号产生设备是一种利用加法器和减法器组合实现取模运算效果的等效电路,如图3所示,该设备包括:由第一选择器1、第二选择器2、寄存器3、比较器4、加法器5和减法器6组成的逻辑组合电路,可以由固定器件替代,其中,高速时钟与低速时钟的整数比例为:P/C,P为高速时钟整数值,C为低速时钟整数值,则,The method for generating the low-speed clock enabling signal by using the Sigma-Delta algorithm described in Embodiment 1 is difficult to simulate by the equivalent circuit of taking the remainder, so the low-speed clock enabling signal generating device proposed in this embodiment based on the above method is An equivalent circuit that utilizes the combination of an adder and a subtractor to realize the effect of a modulo operation, as shown in Figure 3, the device includes: a first selector 1, a
所述第一选择器1的第一输入端连接输出低速时钟整数值C的输出端,用于接收低速时钟整数值C,其第二输入端耦合至所述加法器5的输出端,其控制输入端用于接收复位信号RST,其输出端耦合至所述寄存器3的输入端;The first input end of the first selector 1 is connected to the output end of the low-speed clock integer value C for receiving the low-speed clock integer value C, and its second input end is coupled to the output end of the
所述寄存器3的第一输入端耦合至所述第一选择器1的输出端,其第二输入端(即驱动端)连接高速时钟,其输出端分别耦合至所述比较器4的输入端,所述第二选择器2的第一输入端和所述减法器6的第一输入端;The first input end of the
所述比较器4的第一输入端耦合至所述寄存器3的输出端,其第二输入端连接输出高速时钟整数值P的输出端,用于接收高速时钟整数值P,其输出端输出低速时钟使能信号并耦合至所述第二选择器2的控制输入端;The first input end of the comparator 4 is coupled to the output end of the
所述第二选择器2的第一输入端耦合至所述寄存器3的输出端,其控制输入端耦合至所述比较器4的输出端,其第二输入端耦合至所述减法器6的输出端,其输出端耦合至所述加法器5的第二输入端;The first input terminal of the
所述减法器6的第一输入端耦合至所述寄存器3的输出端,其第二输入端连接所述输出高速时钟整数值P的输出端,用于接收高速时钟整数值P,其输出端耦合至所述第二选择器2的第二输入端;The first input end of the
所述加法器5的第一输入端连接所述输出低速时钟整数值C的输出端,用于接收低速时钟整数值C,其第二输入端耦合至所述第二选择器2的输出端,其输出端耦合至所述第一选择器1的第二输入端。The first input end of the
其中,寄存器可以为上升沿触发器或下降沿触发器,由高速时钟驱动,按高速时钟进行翻转。或者,采用双沿触发器,可根据实际系统应用选择使用上升沿触发或下降沿触发作为该触发器的翻转条件。进一步地,该高速时钟可以采用系统时钟。Wherein, the register can be a rising edge trigger or a falling edge trigger, driven by a high-speed clock, and flipped according to the high-speed clock. Alternatively, if a double-edge trigger is adopted, a rising-edge trigger or a falling-edge trigger can be selected as the flip condition of the trigger according to actual system applications. Further, the high-speed clock may use a system clock.
仍然以高速时钟为10GE客户业务所采用的系统时钟,模拟低速时钟为ODU2E业务时钟为例进行说明。Still taking the high-speed clock as the system clock used by the 10GE customer service and the analog low-speed clock as the ODU2E service clock as an example for illustration.
10GE客户业务的时钟频率为174.96MHz,模拟时钟为ODU2E业务时钟。根据10GE与ODU2E帧结构的对应关系(239/237)得出ODU2E业务时钟的时钟频率值为162.49258306962025316455696202532MHz,将ODU2E业务时钟取值162.4925MHz,可换算得两者的整数比例为:60865∶65535,模拟的时钟频偏为1.03592ppm,为系统可接受的频偏范围。The clock frequency of the 10GE customer service is 174.96MHz, and the analog clock is the ODU2E service clock. According to the corresponding relationship between 10GE and ODU2E frame structure (239/237), the clock frequency value of the ODU2E service clock is 162.49258306962025316455696202532MHz, and the value of the ODU2E service clock is 162.4925MHz, which can be converted into an integer ratio of the two: 60865:65535, The simulated clock frequency deviation is 1.03592ppm, which is the acceptable frequency deviation range of the system.
将数值60865与65535分别作为Sigma-Delta等效电路的输入值C与P,使用系统时钟(clk_sys=174.96MHz)作为电路的驱动时钟,则输出的低速时钟使能信号gap与系统时钟(clk_sys=174.96MHz)等效为模拟时钟(ODU2E),即低速时钟使能信号gap作为高速时钟的指示,与高速时钟,即系统时钟捆绑使用,低速时钟使能信号gap有效,则输出系统时钟;低速时钟使能信号gap无效,则屏蔽系统时钟。The values 60865 and 65535 are respectively used as the input values C and P of the Sigma-Delta equivalent circuit, and the system clock (clk_sys=174.96MHz) is used as the driving clock of the circuit, then the output low-speed clock enable signal gap and the system clock (clk_sys= 174.96MHz) is equivalent to an analog clock (ODU2E), that is, the low-speed clock enable signal gap is used as an indication of the high-speed clock, and is used in conjunction with the high-speed clock, that is, the system clock. If the low-speed clock enable signal gap is valid, the system clock is output; the low-speed clock If the enable signal gap is invalid, the system clock is shielded.
若WN=(YN-1+C)<P,则输出无效的低速时钟使能信号;若WN=(YN-1+C)≥P,则输出有效的低速时钟使能信号。(其中,若WN-1<P,则YN-1=P;若WN-1≥P,则YN-1=WN-1-P;W为寄存器3中输出的值,Y为第二选择器中输出的值。)If W N =(Y N-1 +C)<P, output an invalid low-speed clock enable signal; if W N =(Y N-1 +C)≥P, output a valid low-speed clock enable signal. (Wherein, if W N-1 <P, then Y N-1 =P; if W N-1 ≥P, then Y N-1 =W N-1 -P; W is the value output in
则在P个高速时钟的周期内,如图3所示,比较器4获取寄存器3中的值W与P相比较,若W<P,则输出无效的低速时钟使能信号;若W≥P,则输出有效的低速时钟使能信号,即实质为产生低速时钟使能信号gap,指示在65535(P)个时钟周期内,60865(C)个有效的低速时钟使能信号,用gap=0指示;4670(65535-60865)个无效的低速时钟使能信号,用gap=1指示。其中,有效的低速时钟使能信号(C)在全部的时钟周期(P)中为均匀分布,实现过程如下:Then in the cycles of P high-speed clocks, as shown in Figure 3, the comparator 4 obtains the value W in the
驱动时钟为系统时钟(clk_sys=174.96MHz),寄存器3可以受时钟上升沿触发,即寄存器值每个时钟周期更新一次;The driving clock is the system clock (clk_sys=174.96MHz), and the
在P个时钟周期内,首先进行初始化,复位信号RST有效,第一选择器1于电路启动后将寄存器3复位为C值,此时比较器4对寄存器值(C)与P值进行比较,由于C<P,则此时输出的低速时钟使能信号gap为1,指示首个时钟周期位置为无效的低速时钟使能信号;同时,该低速时钟使能信号gap=1控制第二选择器2选择寄存器值(C)作为加法器5的输入,则加法器输出值为2C;In P clock cycles, initialization is first performed, the reset signal RST is valid, and the first selector 1 resets the
于复位撤销后的首个系统时钟clk_sys上升沿处,寄存器3对输入值进行锁存,由于此时复位信号已撤销,第一选择器1选择加法器5的输出值作为寄存器3的输入,则寄存器3存储值刷新为2C;比较器4对寄存器值(2C)与P值进行比较,由于2C>P,则此时输出的低速时钟使能信号gap为0,指示该时钟周期位置为有效的低速时钟使能信号;同时,该时钟使能信号gap=0控制第二选择器2选择减法器6的输出值(2C-P)作为加法器6的输入,则加法器6输出值为(3C-P);At the rising edge of the first system clock clk_sys after the reset is canceled, the
于第二个系统时钟clk_sys上升沿处,寄存器3再次对输入值进行锁存,后续的工作与上述一致;At the rising edge of the second system clock clk_sys, register 3 latches the input value again, and the subsequent work is consistent with the above;
电路于P个时钟周期内,C个时钟周期输出信号gap=0,表示该时钟周期的低速时钟使能信号有效;(P-C)个时钟周期输出信号gap=1,表示该时钟周期的低速时钟使能信号无效。In P clock cycles, the circuit outputs signal gap=0 for C clock cycles, indicating that the low-speed clock enable signal of this clock cycle is valid; (P-C) clock cycle output signal gap=1, indicating that the low-speed clock enable signal of this clock cycle is valid. The energy signal is invalid.
在电路工作P个时钟周期后,寄存器值经过运算重新复制为C,则第一个运算周期结束,进入下一个运算周期。电路的翻转与低速时钟使能信号gap的输出完全一致。After the circuit works for P clock cycles, the register value is re-duplicated as C after operation, then the first operation cycle ends and the next operation cycle enters. The reversal of the circuit is completely consistent with the output of the low-speed clock enable signal gap.
如图3所示,第一选择器1的复位信号RST用于控制所述第一选择器1,当复位信号有效时,所述第一选择器1选择输出接收的低速时钟整数值C,当复位信号无效时,所述第一选择器1选择输出从所述加法器5获取的值。本领域技术人员可以理解,复位方式不只有图3所示这一种形式,也可在需要复位时,由软件或硬件控制第一选择器1的第二输入端输入复位信号。As shown in FIG. 3, the reset signal RST of the first selector 1 is used to control the first selector 1. When the reset signal is valid, the first selector 1 selects and outputs the received low-speed clock integer value C. When When the reset signal is invalid, the first selector 1 selects and outputs the value obtained from the
进一步地,图3所示设备还可包括:低速时钟生成单元,用于利用所述低速时钟使能信号和所述高速时钟生成所述低速时钟。Further, the device shown in FIG. 3 may further include: a low-speed clock generating unit, configured to generate the low-speed clock by using the low-speed clock enabling signal and the high-speed clock.
本实施例提供的设备输出的低速时钟使能信号gap与系统时钟clk_sys捆绑使用,从而控制电路的翻转,即在低速时钟使能信号gap有效时,电路正常工作;低速时钟使能信号gap无效时,电路保持。如图4所示,低速时钟使能信号gap与系统时钟clk_sys捆绑使用,从而控制D触发器的翻转,并且,进一步地,可将低速时钟使能信号gap作为系统时钟的门控时钟clock-gate的控制信号,可达到降低电路的动态功耗的效果。门控时钟clock-gate的电路一般由后端厂家提供,实现电路的低功耗处理,图4的工作原理为clock-gate于gap=0时输出时钟驱动D触发器翻转,于gap=1时屏蔽时钟,则此时D触发器保持原值不作翻转,从而达到低功耗的效果。The low-speed clock enable signal gap output by the device provided in this embodiment is used in conjunction with the system clock clk_sys to control the inversion of the circuit, that is, when the low-speed clock enable signal gap is valid, the circuit works normally; when the low-speed clock enable signal gap is invalid , the circuit remains. As shown in Figure 4, the low-speed clock enable signal gap is bundled with the system clock clk_sys to control the inversion of the D flip-flop, and further, the low-speed clock enable signal gap can be used as the gating clock clock-gate of the system clock The control signal can achieve the effect of reducing the dynamic power consumption of the circuit. The clock-gate circuit of the gated clock is generally provided by the back-end manufacturer to realize low-power processing of the circuit. The working principle in Figure 4 is that the clock-gate outputs a clock to drive the D flip-flop to flip when gap=0, and flips when gap=1 If the clock is shielded, the D flip-flop keeps the original value without flipping at this time, so as to achieve the effect of low power consumption.
在本实施例的技术方案中,利用了Sigma-Delta算法的等效电路,根据得到的高速时钟与所模拟的低速时钟的整数比以及高速时钟整数值和低速时钟整数值,在高速时钟整数值的周期内,第一比较器1获取寄存器3中的值W与P相比较,若W<P,则输出有效的低速时钟使能信号;若W≥P,则输出无效的低速时钟使能信号,从而利用Sigma-Delta算法等效电路将高速时钟模拟为低速时钟输出,实现了复杂的时钟分频,输出均匀的低速时钟使能信号,并进一步地达到均匀,避免了不必要的频繁跳变,获得最佳的时钟抖动与漂移性能。In the technical solution of this embodiment, the equivalent circuit of the Sigma-Delta algorithm is used. According to the integer ratio of the obtained high-speed clock and the simulated low-speed clock and the integer value of the high-speed clock and the integer value of the low-speed clock, the integer value of the high-speed clock In the period of , the first comparator 1 obtains the value W in the
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be realized by means of software plus necessary general-purpose hardware, and of course also by hardware, but in many cases the former is a better embodiment . Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , a hard disk or an optical disk, etc., including several instructions for enabling a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101333564A CN101807913B (en) | 2010-03-26 | 2010-03-26 | Low-speed clock enable signal generation method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101333564A CN101807913B (en) | 2010-03-26 | 2010-03-26 | Low-speed clock enable signal generation method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101807913A CN101807913A (en) | 2010-08-18 |
CN101807913B true CN101807913B (en) | 2012-04-04 |
Family
ID=42609546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010101333564A Expired - Fee Related CN101807913B (en) | 2010-03-26 | 2010-03-26 | Low-speed clock enable signal generation method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101807913B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103607195A (en) * | 2013-10-17 | 2014-02-26 | 陕西万达信息工程有限公司 | Two-number-adding timing sequence unit |
KR101682272B1 (en) * | 2014-01-27 | 2016-12-05 | 엘에스산전 주식회사 | Method for generating clock for system operating in rising edge |
CN103955256B (en) * | 2014-04-24 | 2017-04-12 | 华为技术有限公司 | Clock frequency modulation method and clock frequency modulation device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5463744A (en) * | 1991-12-30 | 1995-10-31 | Intel Corporation | Emulation of slower speed processor |
JP2003256068A (en) * | 2002-03-04 | 2003-09-10 | Seiko Epson Corp | Clock control system |
JP4613080B2 (en) * | 2005-03-10 | 2011-01-12 | 池上通信機株式会社 | Clock reproduction information generation circuit and clock reproduction circuit |
CN1835389B (en) * | 2005-03-14 | 2010-07-14 | 华为技术有限公司 | Method able to eliminate frequency error of digital controlled oscillator and phase accumulator |
US7428652B2 (en) * | 2005-05-10 | 2008-09-23 | Intel Corporation | Programmable phase generator for cross-clock communication where the clock frequency ratio is a rational number |
GB0714848D0 (en) * | 2007-07-31 | 2007-09-12 | Zarlink Semiconductor Inc | Flexible waveform generation with extended range capability |
-
2010
- 2010-03-26 CN CN2010101333564A patent/CN101807913B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101807913A (en) | 2010-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100527045C (en) | Dynamic clock system and method for low power design | |
CN104158515B (en) | An Automatically Synchronized Multi-Channel Parallel Memory DDS Signal Generator | |
CN102968290B (en) | A kind of true Random Number Generator of isomery lightweight | |
CN101908883B (en) | Programmable fractional frequency divider | |
US20120194235A1 (en) | High-speed frequency driver and a phase locked loop that uses the high-speed frequency divider | |
CN105404495B (en) | For modulating the high speed PRBS generator and method for generation of wide-band transducer | |
CN111404550B (en) | Analog-to-digital converter and clock generation circuit thereof | |
CN107222189A (en) | Digital pulse width modulator | |
US8558589B2 (en) | Fully digital method for generating sub clock division and clock waves | |
CN106209038A (en) | Digital pulse width modulator based on IODELAY firmware | |
CN111124363B (en) | A True Random Number Generation Method and True Random Number Generator | |
US9525403B2 (en) | Clock frequency modulation method and clock frequency modulation apparatus | |
CN111884631A (en) | A Digital Pulse Width Modulation Module Using Hybrid Structure | |
CN101807913B (en) | Low-speed clock enable signal generation method, device and equipment | |
US8775856B1 (en) | System and method for generating clock signal for a plurality of communication ports by selectively dividing a reference clock signal with a plurality of ratios | |
CN101217277A (en) | Non-integer frequency divider and phase-locked loop capable of generating non-integer clock signal | |
De Caro et al. | A 3.3 GHz spread-spectrum clock generator supporting discontinuous frequency modulations in 28 nm CMOS | |
CN104184456B (en) | For the low frequency multi-phase differential clock tree-shaped high-speed low-power-consumption serializer of I/O interface | |
CN210958338U (en) | Three-phase digital phase-locked loop, SVPWM modulator and power grid harmonic current control system based on FPGA chip | |
CN117811539B (en) | FPGA clock glitch-free switching circuit | |
US9590637B1 (en) | High-speed programmable frequency divider with 50% output duty cycle | |
CN110311682B (en) | Time to Digital Converter | |
US20050280449A1 (en) | Apparatus and method for high frequency state machine divider with low power consumption | |
US10873443B1 (en) | Generating lower frequency multi-phase clocks using single high-frequency multi-phase divider | |
CN106325814B (en) | True Random Number Generator based on double-ring coupled oscillating circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120404 |