sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
`_^gk`_^1wm`_^ has joined #m-labs
`_^gk`_^1wm`_^ has quit [K-Lined]
hozer has quit [Quit: Leaving.]
sb0 has joined #m-labs
<sb0>
rjo, do you think it would be acceptable, EMI-wise, to send one of the Artix-7 transceiver clocks over the RTM connector?
<sb0>
an alternative is to use this picxo thing to build a si5324 equivalent inside the fpga, but this is more complex
<sb0>
(since we need two loop timings, and we have only one 5324 on rtm)
hedgeberg|away is now known as hedgeberg
bentley` has joined #m-labs
sb0 has quit [Ping timeout: 258 seconds]
sb0 has joined #m-labs
sb0 has quit [Quit: Leaving]
<rjo>
sb0: yes. i think that's fine.
sb0 has joined #m-labs
<rjo>
sb0: EMI-wise, afaict, digital signals are only problematic if they non-scrambled and are in close proximity/same die/package as the sensitive ones (clocks or actual analog signals). i.e. clocks on the rtm connector are ok. they give us fixed frequency spurs but that's it. no data dependent noise.
<sb0>
I like the elegance of the PICXO DPLL, but (1) not interfacing it to Xilinx hardblocks (2) Xilinx seems to be particularly protective of their reference design (3) Joe will complain about paying for it
<sb0>
pragmatically, we can operate a synchronous IOSERDES on the LVDS lines instead
<rjo>
picxo?
<rjo>
that xapp?
<rjo>
let me read that.
<rjo>
sb0: why do we need two loop timings? for the two links? can't they be the same?
<sb0>
RTIO is asynchronous to the wishbone bus
<sb0>
and we can't tunnel Wishbone in DRTIO because we need wishbone to initialize the clocks required for DRTIO
<rjo>
sb0: ah ye.
<rjo>
ah yes.
<sb0>
for only one loop timing, we can reconfigure the link at a new data rate after the clock chips are initialized
<sb0>
but this sounds fragile and cause difficult debugging situations
<sb0>
we also lose control completely if the clock chips are misconfigured
<rjo>
can't we just bootstrap that? i.e. have the AUX FPGA configure the 5324 using the sequencer and then wait for link/drtio establishment and then transfer?
<rjo>
i guess that's what you mean.
<rjo>
don't we have to do that same mechanism anyway for the AMC FPGA?
<sb0>
you always need to do that to implement loop timing.
<sb0>
and the two clocks you are switching need to be at almost the same frequency
<sb0>
this is a big assumption for wishbone/rtio clocks.
<rjo>
sure.
<sb0>
also, I don't like the sequencer that much for configuring the 5324 - not enough visibility/debuggability/control
<sb0>
better use a softcore cpu
<sb0>
and the automatic clock switching built into the 5324 doesn't work well as I mentioned, better have the CPU switch it manually when appropriate
<rjo>
i agree. did you change the drtio master/satellite so to configure in runtime?
<sb0>
yes
<sb0>
this is how I found that long-standing drtio bug
<rjo>
then, since wishbone-over-GT* is jittery and large latency anyway, why don't we AsyncFIFO it to the RTIO clock domain?
<sb0>
the reason we need loop timing for wishbone is because the IOSERDES on the AMC side does not have a CDR
<sb0>
this is simply a matter of clocking the RTM -> AMC transceiver synchronously to the AMC -> RTM and with a fixed phase offset
<rjo>
the PICXO sounds good and very adequate for DRTIO in general.
<sb0>
if there was a CDR on the AMC side, we could do even simpler than what you propose - clock the two ways asynchronously and add CDCs
<sb0>
PICXO may not be so adequate for DRTIO because it seems you cannot extract the corrected clock and send it into the fabric to implement TTLs etc.
<sb0>
but I may be wrong
<sb0>
the only clock you have is the jittery CDR output
<sb0>
AFAICT PICXO only does *transceiver* loop timing
<rjo>
you get TXOUTCLK.
<sb0>
right...
<rjo>
which is not the serial clock. right.
<rjo>
so you'd have to slip any SERDES high speed clock to align.
<sb0>
it is the serial clock when you bypass the elastic buffers but I think you cannot do that when using PICXO (as usual, Xilinx know how to fuck up their silicon)
<sb0>
there *may* be a trick to extract the corrected clock, but one has to dig into Xilinx docs and pray that there isn't some obscure silicon bug lurking somewhere
<larsc>
the PICXO is using the same resources like the CDR, since you can get the CDR clock, you should be able to get that clock as well
<sb0>
well, there's a trick, route a transceiver's TX to another transceiver clock input on the PCB, and transmit K28.7 :-)
<sb0>
larsc, aren't the CDR resources already occupied by the receiving section of the same transceiver?
<larsc>
looks like there is one for TX and one for RX
<rjo>
oh. and even with only the slow TXOUTCLK it wouldn't be a problem because you can use a regular PLL to get a well-phased faster clock.
<sb0>
the PICXO appnote says "Transmit buffer bypass is not supported"
<rjo>
so in short I'd acctually like to see PICXO.
<sb0>
larsc, ah yes! good find
<sb0>
if we have TXOUTCLKPMA we can perhaps hack that idiotic elastic buffer into fixed latency by having TXUSERCLK=TXOUTCLKPMA+some empirically determined phase offset. assuming there are no reset issues.
<larsc>
I think you can bypass the buffer
<sb0>
not when using PICXO, according to xapp589
<sb0>
without yes, and the latency is fixed, I've been doing that already
<larsc>
if you run your fabric with the same clock as the SERDES you should be able to bypass it
<sb0>
Mandatory Conditions and Limitations - Transmit buffer bypass is not supported.
<sb0>
now this doesn't say why, it could be simply that the soft design doesn't support it
<larsc>
it could be that the phase offset of the TXOUTCLKPMA is too large, who knows
<sb0>
what do you mean?
<larsc>
I think normally when running in buffer bypass mode the PMA clock is aligned to the USRCLK using the PI, but since in this case the PMA clock is the user clock that wouldn't work
<larsc>
so I guess bypass does not work
<larsc>
I take back what I said before
<sb0>
ooh i see+
<sb0>
but when they use that elastic buffer they manage to clock one end synchronously to the PMA still (without PI), so why didn't they just put a register there and give the other end to the fabric
<sb0>
sigh
<larsc>
a register wouldn't work, would it? I mean your clocks still have a phase offset so setup and hold wouldn't be met
<larsc>
you have to route the TXOUTCLKPMA to a BUFG first and then back to the USRCLK input
<sb0>
a register gives a wide timing margin (and a small setup+hold window), then the phase requirement becomes rather relaxed
<sb0>
that USRCLK input is useless, it should be a regular TXOUT -> BUFG -> fabric FF -> transceiver input FF
<sb0>
I don't see why USRCLK is needed at all and why it would be hard at all to meet timing on the path above
<sb0>
anyway, all FPGA transceivers are pieces of shit and we don't have much of a choice here
<sb0>
I think the elastic buffer latency jumps should happen every 10 line UI? maybe having TXUSRCLK offset from TXOUTCLKPMA is a working hack to fix latency ...
<sb0>
actually I think some White Rabbit folks inconsciously do that, and it works for them