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
stekern has quit [Ping timeout: 245 seconds]
stekern has joined #m-labs
stekern has quit [Ping timeout: 265 seconds]
stekern has joined #m-labs
stekern has quit [Ping timeout: 268 seconds]
stekern has joined #m-labs
<GitHub46> [artiq] whitequark pushed 1 new commit to master: https://git.io/vXYGm
<GitHub46> artiq/master 18ae8d5 whitequark: gateware: fix mailbox.
<whitequark> doh, migen arrays don't wrap
<whitequark> tookme a few hours...
<cr1901_modern> what do you mean by wrap?
<whitequark> well, I expected them to just drop the high bits
<cr1901_modern> I still don't understand. s.eq(b[1:8]), where s and b are 10 bits, doesn't connect bits 1 to 7 of "b" to bits 0 to 6 of "s"?
<whitequark> that doesn't involve any arrays
<cr1901_modern> Oh, right... Array(). Erm, I thought they did wrap too.
<GitHub75> [migen] whitequark pushed 1 new commit to master: https://git.io/vXYGw
<GitHub75> migen/master b8000db whitequark: doc: explain what happens to an Array on out-of-bounds access.
stekern has quit [Ping timeout: 245 seconds]
<bb-m-labs> build #152 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/152
<bb-m-labs> build #1049 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1049 blamelist: whitequark <whitequark@whitequark.org>
<sb0> whitequark, why does the mailbox have so many slots?
<sb0> and for large storage, use Memory which maps to more efficient FPGA resources
<whitequark> so many? it doesn't. it has three
<whitequark> I just didn't feel like messing with log2, which would probably have some subtle bugs
<sb0> I'm not sure how "& 0xff" plays out...
<sb0> how about i.adr[:bits_for(size-1)] ?
<sb0> bits_for(x) returns the number of bits you need for representing x. harder to get wrong than log2 equations...
stekern has joined #m-labs
<whitequark> oh, I thought something bits_for would be convenient, but didn't know
<sb0> hm, so you renamed them "async" rpcs...
<sb0> fire-and-forget -> background -> async ...
<whitequark> yes, "background" seems wrong
<sb0> what the fuck
<whitequark> protected branch?
<whitequark> [remote rejected] sounds like a protected branch
<whitequark> oh
<sb0> it's just a regular push
<whitequark> wait, fatal error...
<whitequark> try git gc
<sb0> didn't help
<sb0> this sort of shit was why i stopped using subversion...
<sb0> now it happens again
<GitHub145> [artiq] sbourdeauducq pushed 1 new commit to master: https://git.io/vXYZV
<GitHub145> artiq/master 43cd970 Sebastien Bourdeauducq: make set_dataset and mutate_dataset async RPCs
<sb0> unprotecting the branch solved it, even though it was not a force push or anything
<whitequark> bizarre
<bb-m-labs> build #153 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/153
<bb-m-labs> build #1050 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1050 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
kuldeep has quit [Ping timeout: 244 seconds]
sandeepkr has quit [Ping timeout: 260 seconds]
stekern has quit [Ping timeout: 268 seconds]
sandeepkr has joined #m-labs
stekern has joined #m-labs
sandeepkr has quit [Ping timeout: 260 seconds]
fengling has joined #m-labs
sandeepkr has joined #m-labs
stekern has quit [Ping timeout: 244 seconds]
<whitequark> sb0: ValueError: Vivado requires period constraints on all clocks used in false paths
stekern has joined #m-labs
kuldeep has joined #m-labs
stekern has quit [Ping timeout: 265 seconds]
stekern has joined #m-labs
stekern has quit [Ping timeout: 265 seconds]
stekern has joined #m-labs
mumptai has joined #m-labs
stekern has quit [Ping timeout: 244 seconds]
<GitHub125> [artiq] whitequark pushed 2 new commits to master: https://git.io/vXYRp
<GitHub125> artiq/master c1e6d4b whitequark: runtime: fix multiple async RPC bugs.
<GitHub125> artiq/master 636d4ef whitequark: gateware: rewrite mailbox to use bits_for.
stekern has joined #m-labs
<bb-m-labs> build #154 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/154
<bb-m-labs> build #1051 of artiq is complete: Failure [failed python_unittest_1] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1051 blamelist: whitequark <whitequark@whitequark.org>
rohitksingh has joined #m-labs
stekern has quit [Ping timeout: 244 seconds]
<whitequark> ugh, this is extremely obnoxious
<whitequark> rust stdlib was *really* not made for 0-allocation io
<whitequark> i'm not sure when it will really be done because all of the options here i have are bad,
<whitequark> ok well I'll go for the dirty hack.
<whitequark> (by 0-allocation here I mean 0-allocation *ever*, including on I/O errors; not on the fast path, which is of course provided)
<whitequark> maybe in a year something will officially be done about this, from the looks of PR discussions. i am very unhappy
stekern has joined #m-labs
<GitHub75> [artiq] whitequark pushed 1 new commit to master: https://git.io/vXYwh
<GitHub75> artiq/master 2095d01 whitequark: runtime: dirty hacks to remove allocations in ksupport.
<bb-m-labs> build #155 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/155
<bb-m-labs> build #1052 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1052 blamelist: whitequark <whitequark@whitequark.org>
stekern has quit [Ping timeout: 256 seconds]
<sb0> whitequark, how did you get that error?
<whitequark> trying to build, with --no-compile-gateware even
<sb0> build what?
<whitequark> artiq. with updated migen/misoc
<sb0> why does it work on the buildserver then?
<whitequark> noidea?
<whitequark> well, i commented that out meanwhile.
<sb0> it works on my machine too
<sb0> do you have all the commits etc.?
<whitequark> should have
<sb0> building with the same options as the buildserver?
<whitequark> python3.5 -m artiq.gateware.targets.kc705 -H nist_clock --no-compile-gateware
<sb0> what branch?
<whitequark> master
stekern has joined #m-labs
<sb0> whitequark, yup works fine here
<sb0> migen b8000db81e26b4ad947110cae89a2cd2b265e530
<sb0> misoc ad414a72cab2a5301bf5e3579659ae136831f1be
<sb0> artiq 2095d01b84ebc018f2bd438dd8da5a8d846eb9fa
<whitequark> okay, will investigate
<whitequark> current status: all plumbing in place, simple async RPCs work, complex ones fail in mysterious ways
<whitequark> File "/home/whitequark/Work/artiq-dev/artiq/artiq/test/coredevice/test_portability.py", line 221, in test_misc
<whitequark> self.assertEqual(uut.acc, sum(uut.al))
<whitequark> AssertionError: 0 != 15
<whitequark> should be the last bug...
<whitequark> ah, looks like 2nd+ async RPC gets clobbered.
<whitequark> sb0: oh.
<whitequark> there's a race condition between async and sync RPCs on the comms CPU side
fengling has quit [Ping timeout: 268 seconds]
<sb0> don't you put them all into the same fifo?
<whitequark> no?
<whitequark> sync RPCs don't have to fit into the fifo chunks
<whitequark> anyway I fixed that
<whitequark> I believe async RPCs are finally done
<GitHub60> [artiq] whitequark pushed 1 new commit to master: https://git.io/vXY1r
<GitHub60> artiq/master 6fcd57a whitequark: runtime: fix remaining async RPC bugs.
<sb0> well yes, but isn't a single fifo simpler?
<whitequark> not really. I try to write them into a chunk, then just fall back to the old path if I can
<whitequark> I suppose I could move serialization completely to ksupport
<sb0> yes, but I'd have a single path...
<sb0> replace the mailbox completely with one FIFO
<sb0> then synchronization is trivial
<whitequark> meh, it wasn't very complex in the first place
<sb0> when you do async_rpc(); normal_rpc(); does it execute normal_rpc() only after async_rpc() has completed?
<whitequark> it does
<whitequark> session.rs:486
<sb0> bah that races?
<sb0> what if the kernel CPU posts both an async RPC and a normal RPC between lines 489 and 493?
stekern has quit [Ping timeout: 252 seconds]
fengling has joined #m-labs
<bb-m-labs> build #156 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/156
fengling has quit [Ping timeout: 268 seconds]
<bb-m-labs> build #1053 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1053 blamelist: whitequark <whitequark@whitequark.org>
stekern has joined #m-labs
_whitelogger has joined #m-labs
stekern has quit [Ping timeout: 268 seconds]
stekern has joined #m-labs
stekern has quit [Ping timeout: 265 seconds]
rohitksingh has quit [Ping timeout: 250 seconds]
stekern has joined #m-labs
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
fengling has joined #m-labs
<whitequark> hm, correct
fengling has quit [Ping timeout: 268 seconds]
stekern has quit [Ping timeout: 260 seconds]
rohitksingh has joined #m-labs
<rjo> sb0: we'll have to do 'Alternate synchronization procedure #1'
<rjo> sb0: a) we can't arbitrarily move sysref relative to dac_clk and adc_clk since it needs to meet setup-hold there. that means the "[with fine delay]" should be removed.
<rjo> b) we can't use the fine delay on dac_clk or adc_clk. that would increase noise too much.
<rjo> basically we can't "fine-delay the entire clock tree to meet rtio". it also would completely sabotage reproducible (fine) phase. we'll have to coarse delay sysref (by integer dac_clk cycles) and track the fractional delay across reboots.
<rjo> but yes. we can use the hmc7044 to do the delay scan (on FPGA SYSREF only). but there will be some state saving needed.
stekern has joined #m-labs
<whitequark> sb0: oh, I remember one reason I didn't go with full on mailbox communication
<whitequark> er
<whitequark> full on queue communication
<whitequark> I thought it would make sense to have stuff like cache and watchdog requests be processed independently of the state of async RPCs
<whitequark> but now that I look at my current implementation, it doesn't take advantage of that anyway, so meh
<GitHub22> [artiq] whitequark pushed 1 new commit to master: https://git.io/vXOej
<GitHub22> artiq/master b30734a whitequark: runtime: fix a race condition with async RPCs....
<whitequark> sb0: ok that will do for now i think. i'll rewrite it in the way you want if we ever find another concurrency bug
<whitequark> what's the next priority?
<sb0> all mailbox RPCs will block the kernel CPU until the RPC is completed, correct?
<whitequark> yup
<sb0> #589
<whitequark> ah, the si5324 thing
<sb0> yes
<whitequark> ok that should be easy at least
<whitequark> do I recall it correctly that you want it to lock to clock input 1, or clock input 2, or if none of those are available, generate a clock itself?
<whitequark> and switch to whatever becomes available?
<sb0> whitequark, lock to clock input 1 if it's available, otherwise generate a clock itself (freerun)
<sb0> all inputs and outputs 62.5MHz
<sb0> rjo, first method still works, it's just that the FPGA has to know where the clock lands on each DAC, and delay sysref accordingly
<sb0> that's basically compensating for the clock/sysref skew on the PCB
<rjo> sb0: clk and sysrefs are trace-length matched anyway to each chip.
<rjo> sb0: but the state saving from the second method needs to be there. and fine-delay on dac_sysref and adc_sysref is neither useful nor possible.
<bb-m-labs> build #157 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/157
<sb0> why does it need to be there? the delay method gives you finer resolution than a cycle
<sb0> so there will be an uncertainty of one (or maybe more) delay taps, but it won't matter
<rjo> sb0: what do you want to delay?
<sb0> sysref
<rjo> to what chip?
<bb-m-labs> build #1054 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1054 blamelist: whitequark <whitequark@whitequark.org>
<sb0> and since sysref is a synchronous signal, that uncertainty is absorbed
<sb0> to the dacs
<rjo> as long as you stay with in setup-hold that doesn't change anything. if you get out of setup hold, first you violate them and then you add/sub one dac_clk cycle.
<sb0> yes
<rjo> so. you don't need the fine delay.
<sb0> the delay resolution is 25ps, which is way below the setup/hold window
<sb0> i need the fine delay on sysref
<rjo> no. it doesn't give you anything. the trace lengths are matched.
<sb0> it does
<sb0> we measure the rtio/sysref phase in fine delay taps, then adjust sysref
<rjo> as i said. you can only ever delay sysref by integer multiples of dac_clk.
<sb0> no, you can move it within its s/h window
<rjo> that is "to the dacs" as you said.
<rjo> to the fpga you can move it as much as you wwant to do the scan. yes.
<rjo> but to the dac moving it within s/h doesn't change anything.
<sb0> I mean to the DACs
<rjo> it is smack in the middle already by design.
<sb0> and the scheme I propose does rely on a few delay taps giving the same result at the DAC as it will be within the s/h window
rohitksingh1 has joined #m-labs
<rjo> iiuyc, all you are trying to do is to compensate for pcb skew. but that's not needed and not the primary concern.
<rjo> (i.e. skew between dac_sysref and dac_clk).
rohitksingh has quit [Ping timeout: 250 seconds]
fengling has joined #m-labs
<sb0> hm, yes you're right, there's a problem
<rjo> sb0: ? just needs a bit of nudging.
fengling has quit [Ping timeout: 268 seconds]
<sb0> I really dislike the state store across reboots
<sb0> it looks like microsoft or xilinx design
<sb0> rjo, what's the problem with fine-delaying the DAC clock exactly?
<rjo> well. alternatively we can leave it to the user to "make sure that dac_clk meets rtio_clk setup-hold".
<rjo> sb0: the fine delay taps are very noisy.
<sb0> where do you find that spec'd?
<rjo> "Causes phase noise degradation of up to 12 dB; therefore, do not use on noise sensitive"
<rjo> DCLK channels.
<rjo> and in the model
<sb0> ah, found it.
<sb0> well
<sb0> we can delay the rtio clock then
stekern has quit [Ping timeout: 260 seconds]
<sb0> let me think how that would work...
<rjo> but you need to store something.
<rjo> and using the fine delay on dac_clk is conceptually flawed.
<rjo> even if it was noiseless.
<whitequark> bb-m-labs: force build artiq
<bb-m-labs> build #1055 forced
<bb-m-labs> I'll give a shout when the build finishes
stekern has joined #m-labs
<sb0> leave it to the user to "make sure that dac_clk meets rtio_clk setup-hold" << how, without delaying dac_clk?
<sb0> delaying rtio clock by some fixed amount?
<rjo> they can phase delay the 100 MHz into the rack.
<bb-m-labs> build #158 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/158
<rjo> the the serial links metlino-sayma would need to be delay matched.
<sb0> sure, but the rtio clock at each sayma depends on backplane skew
<sb0> and in some configurations, the rtio clock will be derived from the same 100MHz, though we can just add a delay there
<sb0> well we can have a programmable rtio clock delay in each sayma, which is tuned for a given backplane
<sb0> doing that in the FPGA is just a MMCM and a handful of FFs
<bb-m-labs> build #1055 of artiq is complete: Failure [failed python_unittest_1] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1055
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
stekern has quit [Ping timeout: 256 seconds]
stekern has joined #m-labs
<whitequark> sb0: do you care about only loss of signal, or also frequency offset?
<sb0> there shouldn't be a long term frequency offset, though the FPGA may glitch for a while
<whitequark> it only does very crude ranges
<sb0> (the input)
<whitequark> 50-105 MHz
<sb0> what does that mean exactly?
<whitequark> wait
<whitequark> nvm, I was wrong
<whitequark> the FOS alarm ranges are 11-12ppm, 48-49ppm, 30ppm, 200ppm
<whitequark> all +/-
<whitequark> sb0: so I am looking over it again
<whitequark> and to me it looks that "switch to freerun if CKIN1 is lost" is the default behavior
<sb0> okay, but freerun needs setup, and you need to connect the xtal to clkin2
<whitequark> can you elaborate?
<sb0> freerun is about connecting the xtal (internally) to clkin22
<sb0> *clkin2
<whitequark> that's the wrong freerun mode
<whitequark> that's the bit that lets you use it in freerun mode without ever locking to an external signal
<whitequark> if you simply set it up locked to a clock and then remove the clock, it will free run by itself
<sb0> appropriate clkin1/clkin2 divider settings need to be set so that they both result in approximately the same output freq
<whitequark> are you sure?
<sb0> I know, but I want the freerun mode with the xtal on clkin2
<sb0> yes
<whitequark> ah ok
<sb0> when the system boots it hasn't seen any clock
<sb0> digital hold will fail
<whitequark> and you want clock then, right?
<whitequark> ok
<sb0> but this mode is designed for dealing with that
<whitequark> then I misunderstood
<sb0> the chip should be configured to output 62.5MHz at all times, synchronized to clkin1 whenever possible, with hitless switching when clkin1 appears/disappears, in the most automous way possible
<sb0> *autonomous
<whitequark> so automated revertive mode
<whitequark> ok
<sb0> yes
<sb0> it can do that, it's actually designed to handle this very problem that appears in some high speed serial systems like SDI
<whitequark> yeah, I know it can do that
<whitequark> I just misunderstood my task
<whitequark> ok, so we have 62.5 MHz CKIN1 and 114.285 MHz XA/XB and always 62.5 MHz CKOUT1
<whitequark> 114.285, why that crystal specifically?
<whitequark> idle question relaly
stekern has quit [Ping timeout: 260 seconds]
<sb0> whitequark, precisely because that frequency is weird. for some reason, the PLL performs better when the output frequency is not a multiple of the crystal frequency
<sb0> thanks
<whitequark> so dspllsim shows me a 0.03ppm deviation
<whitequark> I assume that's completely benign
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
<whitequark> sb0: done
stekern has joined #m-labs
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
rohitksingh1 has quit [Ping timeout: 268 seconds]
rohitksingh has joined #m-labs
fengling has joined #m-labs
stekern has quit [Ping timeout: 260 seconds]
fengling has quit [Ping timeout: 268 seconds]
stekern has joined #m-labs
stekern has quit [Ping timeout: 260 seconds]
rohitksingh has quit [Quit: Leaving.]
stekern has joined #m-labs
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Client Quit]
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
stekern has quit [Ping timeout: 260 seconds]
stekern has joined #m-labs
fengling has joined #m-labs
stekern has quit [Ping timeout: 245 seconds]
MiW has quit [Ping timeout: 252 seconds]
fengling has quit [Ping timeout: 268 seconds]
MiW has joined #m-labs
stekern has joined #m-labs
stekern has quit [Ping timeout: 250 seconds]
stekern has joined #m-labs
MiW has quit [Ping timeout: 250 seconds]
MiW has joined #m-labs
kuldeep has quit [Ping timeout: 245 seconds]
sandeepkr has quit [Ping timeout: 260 seconds]
fengling has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
mumptai has quit [Quit: Verlassend]
sandeepkr has joined #m-labs
fengling has joined #m-labs
stekern has quit [Ping timeout: 268 seconds]
stekern has joined #m-labs
fengling has quit [Ping timeout: 268 seconds]
stekern has quit [Ping timeout: 250 seconds]
stekern has joined #m-labs
kuldeep has joined #m-labs