-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clock recovery in Sinara/ARTIQ #15
Comments
NB to do: dig out the WR closed-loop phase noise plots and compare to Weida's data. IIRC, WR is quite a bit worse (partially because all the WR VCXOs I've seen used are a lot noisier than the Si549 for the reasons discussed above). |
NB also:
See my post above for the reasons I favor the DCXO to a VCXO + DAC. |
If the Si549 scheme continues to work out well, is the plan still to implement it in Kasli 2.0? |
@dtcallcock good question. I was putting off thinking about that until we knew how well it worked. But, I think we have enough data now to show that the performance of a WR PLL would be good enough to be useful for many applications. At this point, I think we can say that there will be a version of Kasli with the WR PLL in. Whether that's (a) the "standard" version of kasli (b) a population variant (c) a fork of Kasli depends on interest from users. We also have to decide what we want to do about the Si5324. My preference would be to keep it in Kasli as well but have some means of switching between them. The rational for this is that -- even if we do a good job of integrating WR with ARTIQ/misoc and producing design tools (e.g. a python loop filter design tool) -- the Si5324 is always going to be easier to get running, so it's good to have it there as a fallback option. We need a fanout after the Si549 anyway, so there isn't much cost making it a (cheapish LVDS) mux and connecting the Si5324 to the second input (it can always be DNPd in any case). |
NB Weida has made some progress getting the TI chip working https://e2e.ti.com/support/clock_and_timing/f/48/t/723417# The noise for that chip should be the same as the Si549, but the documentation/design tools aren't as good so it's harder to find the optimal configuration. So, it's a bit of a trade-off with the Si549 being less readily available, but much nicer to use. Thankfully, this isn't such a big deal since the two chips are close enough to being footprint + pin compatible that we should be able to use the same layout for both with some resistor jumpers on low-speed signals. |
Does anything say "preliminary data" more than a photograph of a plot on a monitor? Anyway, here is a measurement of the stability of WR using the Si549. As above, we're using the recovered clocks from two independent KC705s. Now we're beating them together on a mixer as a phase comparator.
|
@jordens what are your thoughts about Kasli integration? Any objections to (a) making this a population variant on the mainline Kasli branch (b) making it a "default" population option? |
NB this is on the basis that we will commit to
|
Is risk the only downside of making it the default? The let's do some more careful analysis, reviews and tests and go for it. |
By "default" I mean, populating it by default. For the time being, my proposal would be to keep both the Si5324 and the WR-PLL. My thinking is that we will need a fanout after the DCXO, so there isn't really any cost in making that fanout a mux. At that point the selection between the two clocking options can be done in software. So, the only downside is the extra cost associated with the PLL. Eventually, one might want to DNP the Si5324 to save money, but I'd argue that we should keep it around until we have a decent amount of experience with the WR PLL (no matter how careful one is on the test bench, there is always room for unexpected things to come up in the field). |
So long as we do a decent job of the design tool, that shouldn't be an issue. If one isn't trying to scrape the last few dB of noise out, and only wants a simple type-II loop filter then the design tool can be pretty simple and intuitive. |
What about the recovered clock output connection from the FPGA GTs? Is that another fanout? And the external reference input? Another one? And we need to make sure that we can turn off both oscillators individually. Otherwise the mux isolation will be problematic. |
You mean
The easiest thing would be to route the external reference directly to a differential input on the FPGA. Then route an FPGA output to the Si5324 input. That way the FPGA can do the muxing as required. You'll pick up a bit of high-frequency jitter, but nothing the Si5324 can't clean up (i.e. a lot less than you get from the recovered clock). In any case, I don't see that being a problem since the Si5324 isn't really suitable for generating noise/drift-critical clocks anyway due to the known issues with it. Having said that, one might want a clock buffer between the SMA and the FPGA to provide some protection against abuse from users. If we go down that path, it could be a 2-output LVDS fanout. But, that's optional.
IIRC (but it's something I'd need to double check before finalizing the designs) DCXO and the Si5324 can both be shutdown in software. Otherwise, we can add a FET on their power lines. So, essentially yes, the points you raise are all good and there are definitely some implementation details that need to be thought through before we commit to anything. |
Well, probably the best thing is not to worry to much about "default" population options. So long as no one objects to having the pads for the WR circuitry and maybe having to add an extra mux, the best solution is probably to agree to add it to the design and make a decision once we've got ARTIQ up and running with it. |
Trying to wrap up measurements on our test setup this week. Here is some more data:
|
That looks very good!. I'm just curious where the 170Hz peak comes from. next peak comes probably from SMPS. |
FWIW this setup is a mess of eval boards with a large loop area for pickup and somewhat poor grounding. I expect some of those spurs to vanish once we put it all on a pcb... |
Well, some other spikes come in. |
@gkasprow so, here is the Sinara-WR proposal in full:
@gkasprow @sbourdeauducq how does that sound? Any questions? Do we have enough pins to implement this on Kasli? |
LMK61e07 only seems to reach the specified noise performance for some fractional divider ratios. So, when used in a feedback loop the noise can be quite a bit worse than the data sheet indicates. As a result, we don't think it's suitable for WR, although we haven't conclusively ruled it out yet (need to chase TI to get them to confirm that the numbers on the data sheet are not representative). |
Regarding the Sinara-WR proposal.12 by @hartytp |
Wow! Are all issues on Sayma fixed already? |
@hartytp We agreed with Joe that I will release schematics today :) |
@hartytp do you care that much about oscillator output type? The SI549 with CMOS output ( 549CBAC000112ABG) |
OK, in other WR designs I did it was routed to CC pin. I'm pretty sure that somebody from WR commmunity told mi that it is not strict requirement. I managed to shift lines and get two GC pins close to each other and GC for ref clock as well. |
@gkasprow GC is definitely not required. Not sure if CC pin is required. The DDMTD noise doesn't depend strongly on the helper noise, but if it gets too bad this can be a problem. I'd like to keep the helper pin CC if possible. CC/GC is not needed for ref/main DCXO. |
DDmtd is symmetric. You can sample the helper with the both the recovered and the main clock or (classic) sample both recovered and main with the helper. The first should work, may need fewer GC inputs in our case but might be one more internal CDC. |
The ones with LVDS outputs and same cost are not available. Available LVDS ones are 42$ per piece. |
Aah, you're right, I'd misread that. Okay, let's stick with LVCMOS for now. If the performance is bad then we can change the population option in a later revision. If we produce a large enough batch of boards with Si549 WR then we should consider ordering a batch of LVDS DCXOs from SI. |
The scenarios which have been tested by us, always route the HELPER to a CC pair. |
Thanks. So in theory it should be sufficient to route the clock to MGTREFCLK only? No clock copy required to GC ? |
|
I asked just for curiosity. I connected both MGTREFCLK and GC. |
Right @WeiDaZhang.
|
@jordens @sbourdeauducq @gkasprow here is a BD of the WR test setup we used on the KC705. @WeiDaZhang correct me if I'm wrong, but the configuration was:
Sources of idiosyncrasy in this setup:
|
Not shown in the above BD are a few baluns and fanout buffers. Message @WeiDaZhang for a copy of his Vivado design. |
A few comments about the TI oscillators (@WeiDaZhang please correct any mistakes):
|
|
Thanks Weida |
@WeiDaZhang that plot is really nice. Could you stick the Si549 noise on as well for clarity, then it really gives one all the info about the different chips. One other comment about this: in these calculations we assume the DCXO is updated once per loop iteration, so around 4kHz. The DCXOs support update rates of twice this, so it's possible to update twice per loop iteration to get an effective 1bit increase in tuning resolution and a corresponding 6dB reduction in the 1/f2 noise. This is something we'll probably do in the final version, but we haven't implemented it in our tests. |
@WeiDaZhang: @sbourdeauducq is now using DDMTD in ARTIQ for Sayma SYSREF phase calibration. He's observed that the DDMTD jitter is significantly worse when the FPGA is heavily loaded. IIRC you also spent quite a while testing DDMTD noise/stability on the KC705 under varying FPGA loads, but didn't see a significant effect. Can you remind me what measurements you made on this? Also relevant here is @sbourdeauducq's comment
@sbourdeauducq to check I understand what you mean by this:
@WeiDaZhang how does that compare to your observations on the KC705/design for WR in Sinara? |
Also, @sbourdeauducq am I right in thinking that the deglitcher you've implemented is more of a debouncer class DDMTDEdgeDetector(Module):
def __init__(self, i):
self.rising = Signal()
history = Signal(4)
deglitched = Signal()
self.sync.helper += history.eq(Cat(history[1:], i))
self.comb += deglitched.eq(i | history[0] | history[1] | history[2] | history[3])
deglitched_r = Signal()
self.sync.helper += [
deglitched_r.eq(deglitched),
self.rising.eq(deglitched & ~deglitched_r)
] IIRC the Cern papers discuss a few more sophisticated ways of doing this that reduce jitter further (@WeiDaZhang is using one of the ways discussed in that paper) |
NB not trying to suggest you should do anything different here, just trying to keep track of the different work being done on related projects and pool info in one place. |
That's correct, except that it's not relevant if the HMC7043 output goes to a GC pin on the FPGA (it's connected to a DFF input). The "jitter" is the peak-peak jitter measured by the first test of the firmware that operates on the raw (before averaging) results from the DDMTD core. |
That's the first deglitcher from the CERN paper, "First Edge selects the first positive edge as a good edge for the time differences counter". |
@hartytp @sbourdeauducq The attached is the stability test diagram and result. |
We tried:
I'm afraid I have not found what did we conclude by the time through searching in the email chain. @hartytp |
Was that loaded by static logic or was the logic switching and doing something? |
LFSRs were feeding DSP48E slices or distributed slices to do multiplications, outputs are XORed to feed LED. |
Moving from sinara-hw/sinara#515 (comment)
Putting out our thought process so far in detail for anyone who's interested:
Current situation in ARTIQ:
So, we are considering implementing something closer to the CDR element White Rabbit, using the DDMTD technique. Comments about this:
So, our plan is:
The text was updated successfully, but these errors were encountered: