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
_rht has quit [Quit: Connection closed for inactivity]
<GitHub109> [artiq] whitequark pushed 2 new commits to master: https://git.io/vVfLg
<GitHub109> artiq/master e75ad3d whitequark: compiler: extract runtime checks into separate cold functions....
<GitHub109> artiq/master 7213984 whitequark: compiler: raise inliner threshold to the equivalent of -O3.
<bb-m-labs> build #67 of artiq-win64-test is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-win64-test/builds/67
<bb-m-labs> build #492 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/492
<whitequark> sb0: ping
<GitHub74> [artiq] whitequark pushed 1 new commit to master: https://git.io/vVfqP
<GitHub74> artiq/master f81930f whitequark: compiler: run IPSCCP....
_rht has joined #m-labs
<sb0> whitequark, pong
<sb0> 310ns! good!
sb0 has quit [Quit: Leaving]
sb0 has joined #m-labs
rohitksingh has joined #m-labs
sandeepkr__ has joined #m-labs
rohitksingh has quit [Ping timeout: 248 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 244 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 260 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 244 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 260 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 244 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 240 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 244 seconds]
sandeepkr__ has quit [Read error: Connection reset by peer]
<whitequark> sb0: what about the DDS programming issue?
kuldeep has quit [Read error: Connection reset by peer]
<sb0> which one? speed, or the bug?
sandeepkr__ has joined #m-labs
kuldeep has joined #m-labs
<whitequark> which bug?
<whitequark> I only know about speed ie #338
<sb0> you were talking that the speed results you got were funny
<sb0> sometimes it seemed to take milliseconds
<sb0> sounds like a bug to me. or did you sort it out?
<whitequark> oh. yeah. that was RTIO FIFO backpressure.
<whitequark> I'm now using this code: http://hastebin.com/ticuwaguzi.py
<sb0> ok, but artiq was doing the right thing?
<whitequark> there wasn't anything wrong with artiq as far as I can see
<sb0> or was the backpressure completely off
<sb0> ok.
rohitksingh has joined #m-labs
<sb0> why doesn't the ttl pulserate code have this backpressure issue?
<whitequark> it sort of does
<whitequark> but it's only apparent with a much higher number of iterations
<sb0> I see
<whitequark> since TTL pulsing code is much faster and it also has fewer RTIO commands
<sb0> though I don't understand how backpressure is a problem
<sb0> if you're pulsing too fast, the fifo should get empty fast and you shouldn't get backpressure
<whitequark> the core reason of why the test can produce bogus results is self.core.break_realtime()
<whitequark> break_realtime introduces additional slack into the timeline. so let's say the pulse rate is 10us and the batch takes 10.01us
<whitequark> if we run just, say, 100 cycles, then the FIFO never gets full, simply because all batches combined fit into the FIFO
<whitequark> at the same time there's never an underflow because the slack introduced by break_realtime is never fully exhausted
<sb0> well the number of RTIO events generated by the test should be larger than the FIFO
<sb0> much larger.
<whitequark> ok. when i do that, the PulseRateDDS test returns 4.6ms instead of the real 260us
<sb0> ok, so how can it return 4.6ms?
<whitequark> e.g. with 10000 cycles, which is around 200k events I think
<whitequark> and upwards from that value it stays at 4.6ms
<sb0> and your other test says 260us?
<whitequark> yes
<sb0> well that's fishy
<whitequark> and it does that on a very wide range of cycle counts
<whitequark> from 10 (well it's more like 270) to 10000
<whitequark> so i'm quite convinced my test is correct
<sb0> ok, but this still smells like a bug to me
<whitequark> ok. i realize that i cannot fully explain why it behaves like that.
<sb0> this worries me more than understood compiled code slowness...
<sb0> FYI: the DDS output fifo is 512 entries (= AD9xxx register write) deep
<whitequark> ok, and how many writes is one dds.set ?
<sb0> 8
<whitequark> that's quite interesting
<sb0> actually a bit less since we use 9914. but the behavior is still mysterious.
<sb0> TTL output FIFOs are 64 entries deep, one signal transition = one entry
<sb0> the TTL PulseRate test uses 20k transitions
<sb0> if you start with an empty DDS FIFO (e.g. right after a board boot), can you sustain programming at 260us without underflow?
<sb0> s/empty DDS fifo/a system free of whatever corruption the test could cause
<whitequark> with DDSPulseRate or my test?
<whitequark> my test returns 260us regardless of basically anything else
<sb0> the DDSPulseRate logic obviously, since it's the one acting up
<whitequark> I have never seen it return other values
<whitequark> mh
<sb0> reboot the board, and program the DDS some thousand times at 300us intervals
<sb0> see if you get any underflow
<whitequark> ok...
<whitequark> incidentally is it hard to enable ipv6 on the board?
<sb0> theoretically no, but months of lwip fuckups and annoying debuggings (the last one being ppp) makes me think otherwise
<whitequark> sb0: ok, you are right
<whitequark> when ran on a freshly rebooted device the PulseRateDDS test returns about 364us
<GitHub53> [artiq] whitequark pushed 1 new commit to master: https://git.io/vVfDY
<GitHub53> artiq/master 42609d0 whitequark: test_pulse_rate_dds: tighten upper bound to 400us.
<whitequark> sb0: what do we do about slowness?
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 252 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 248 seconds]
rohitksingh has joined #m-labs
<sb0> whitequark, I'd focus on the bug first.
<whitequark> I have no idea where to even start
<sb0> I don't really know either.
<whitequark> wonderful
<whitequark> is there any API to get the state of FIFOs?
<sb0> so you just ran the same unittest on a freshly rebooted device, and it gives a reasonable result, whereas if other tests have been run before it, it gives 4.6ms?
<sb0> I don't know, get more data...
<sb0> getting the state of an asynchronous FIFO is nontrivial
<whitequark> is it in its own clock domain or something?
<sb0> the two ends are in different clock domains
<whitequark> I see
<sb0> and anyway - underflow detection happens in the CPU core domain
<whitequark> hm
<whitequark> that's actually very weird, I just ran it twice and it doesn't exhibit that behavior
<whitequark> let's do it another time
<sb0> there are a number of details there, but all it essentially does is compare the timestamp of the event with the counter
<sb0> and check if it is sufficiently in the future to make it through the FIFO
<whitequark> ok. I cannot reproduce the bug.
<whitequark> after rebooting, I did the exact same sequence as before (as far as I remember, at least) and I get a reasonable value back
<sb0> did the gateware meet timing?
<whitequark> always the exact same value, even, down to ns
<whitequark> hm
<whitequark> right, so it was reflashed in the meantime
<whitequark> by the CI
rohitksingh has quit [Ping timeout: 252 seconds]
<whitequark> this is the log for the build I've been using when it failed
<whitequark> wait, no
<sb0> re. #322, what about a __constant_attributes__ attribute, that would be a set of names?
<sb0> (or some other name)
<whitequark> sb0: yes. it would work exactly like __slots__
<sb0> timing seems ok...
rohitksingh has joined #m-labs
<whitequark> maybe not __constant_attributes__ since all __names__ are reserved for the use of Python itself
<whitequark> just constant_attributes seems fine?
<sb0> can you increase the number of iterations in the test?
<sb0> ok
<whitequark> sure
<rjo> but they are not constant. kernel_constants?
<whitequark> coredevice_constant_attributes?
<whitequark> or kernel_constant_attributes
bb-m-labs has quit [Quit: buildmaster reconfigured: bot disconnecting]
bb-m-labs has joined #m-labs
<GitHub3> [buildbot-config] whitequark pushed 1 new commit to master: https://github.com/m-labs/buildbot-config/commit/8de1c1f28568043c206889e85d9d31670c634bdb
<GitHub3> buildbot-config/master 8de1c1f whitequark: Notify IRC on success too.
<whitequark> ... so that we will always see what bitstream was flashed by CI at any given moment
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 252 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 246 seconds]
rohitksingh has joined #m-labs
sb0 has quit [Ping timeout: 244 seconds]
rohitksingh has quit [Ping timeout: 276 seconds]
sb0 has joined #m-labs
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 252 seconds]
sandeepkr_ has joined #m-labs
sandeepkr__ has quit [Ping timeout: 244 seconds]
kuldeep has quit [Ping timeout: 268 seconds]
rohitksingh has joined #m-labs
kuldeep has joined #m-labs
_rht has quit [Quit: Connection closed for inactivity]
rohitksingh has quit [Ping timeout: 268 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 244 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 260 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 240 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 264 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 260 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 248 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 248 seconds]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 240 seconds]