Difference between revisions of "Clock jitter removal in VHDL"
(→The solution) |
(→The solution) |
||
Line 25: | Line 25: | ||
First, we will have to get a more precise measurement of the frame clock. We will use the assumed stable master clock for this, and if we count the amount of master clock cycles for one frame duration, we'll end up with 2083 cycles (100000100011 binary notation). Or 2084 cycles. To get more precision, more frames have to be measured to get a more precise measurement. If we measure 1024 frame times, the duration is 2133333 master clock cycles (1000001000110101010101 binary). If you look closer at the binary notation, you could notice that the start of the 1024 cycle measurement matches the 1 frame binary. We can call this the integer part. The remaining 10 bits we could call the fractional part. So the frame time we can express in integer:fractional time: 2083:341 bits. | First, we will have to get a more precise measurement of the frame clock. We will use the assumed stable master clock for this, and if we count the amount of master clock cycles for one frame duration, we'll end up with 2083 cycles (100000100011 binary notation). Or 2084 cycles. To get more precision, more frames have to be measured to get a more precise measurement. If we measure 1024 frame times, the duration is 2133333 master clock cycles (1000001000110101010101 binary). If you look closer at the binary notation, you could notice that the start of the 1024 cycle measurement matches the 1 frame binary. We can call this the integer part. The remaining 10 bits we could call the fractional part. So the frame time we can express in integer:fractional time: 2083:341 bits. | ||
+ | |||
+ | So what exactly does the fractional part mean? It means that, if we send out 1024 times 2083 bits, we would still have to send out 341 bit times in order to match the original measured time of 1024 frame times. so if we send out 341x2084 bits and (1024-341=)683x2083 bits, we did not alter the frequency of the original signal. We can group these two distinct bit counts in order to minimise the jitter frequency, and make it more behave like wander instead of jitter. Wander is less perceptible and intrusive than jitter, so this is preferred. |
Revision as of 14:38, 8 June 2015
Project: Clock jitter removal in VHDL | |
---|---|
Featured: | |
State | Active |
Members | Danny Witberg |
GitHub | No GitHub project defined. Add your project here. |
Description | Jitter removal in clock signals with VHDL implementation |
Picture | |
No project picture! Fill in form Picture or Upload a jpeg here |
Unstable clock signals
Stable clock signals in digital domains is, generally speaking, something you should aim for, and desirable in most designs. A stable clock signal is reliable, and other circuits can depend on them. For instance, a reference signal to a PLL greatly depends on its stability in order for them to generate a higher frequency with a multiple oscillation frequency.
But what is this is not the case? What if your clock signal varies in frequency? This could really ruin your day! This project describes a way to stabilize a relative low frequency signal, with a much higher frequency, but stable, reference signal. To implement this inside an FPGA, an design is proposed in VHDL.
What is jitter?
A periodic variance in the frequency of a signal is called jitter. There can be a number of other unwanted characteristics to a clock signal, but jitter is one of the most common. The higher the jitter frequency, the more problems it could cause. Preferably, the jitter frequency would be 0Hz, but if you sample a clock with a higher frequency reference clock, you always end up with some sort of jitter. The VHDL implementation of this design converts a high jitter frequency to a lower one. Apart from the jitter frequency, also the amount that the jitter is influencing the signal should be reduced to a minimum. In short, the jitter frequency and amplitude must be reduced to increasethe clock quality.
The problem
So how is this jitter caused? For example, let's take a data link. This datalink is clocked at 25MHz, and is transmitting frames of information. The frequency of these frame is very important, and every 20.8uS, a full frame is transmitted. Because there is no common divider between the 25MHz datalink frequency and the 48kHz (20.8uS) frame repetition, a frame duration can be 521x bits in the datalink, or 520. Additional timing issues even can introduce frames of 519 or 521 bits. Because this 48kHz is fed into a PLL, the frequency must be as stable as can be.
The solution
A common divider between 25MHz and 48kHz is 150MHz. 150.000.000/25.000.000 = 6 and 150.000.000/48.000 = 3125. This is a very good choice of frequency if you want to exactly rate match the frame clock to the bit clock. However, if another frame clock is chosen, this is no longer valid and another solution has to be formed. A general master clock of 100MHz is chosen from a stable crystal oscillator. This means that, no matter what we try to do in VHDL, there will Always be some amount of jitter present in the frame clock. We can however try to minimize the effectiveness of the jitter, to keep its frequency and amplitude as low as possible.
First, we will have to get a more precise measurement of the frame clock. We will use the assumed stable master clock for this, and if we count the amount of master clock cycles for one frame duration, we'll end up with 2083 cycles (100000100011 binary notation). Or 2084 cycles. To get more precision, more frames have to be measured to get a more precise measurement. If we measure 1024 frame times, the duration is 2133333 master clock cycles (1000001000110101010101 binary). If you look closer at the binary notation, you could notice that the start of the 1024 cycle measurement matches the 1 frame binary. We can call this the integer part. The remaining 10 bits we could call the fractional part. So the frame time we can express in integer:fractional time: 2083:341 bits.
So what exactly does the fractional part mean? It means that, if we send out 1024 times 2083 bits, we would still have to send out 341 bit times in order to match the original measured time of 1024 frame times. so if we send out 341x2084 bits and (1024-341=)683x2083 bits, we did not alter the frequency of the original signal. We can group these two distinct bit counts in order to minimise the jitter frequency, and make it more behave like wander instead of jitter. Wander is less perceptible and intrusive than jitter, so this is preferred.