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
mumptai_ has joined #m-labs
mumptai has quit [Ping timeout: 240 seconds]
rohitksingh_work has joined #m-labs
fengling has joined #m-labs
sb0 has quit [Quit: Leaving]
sb0 has joined #m-labs
ohsix has quit [Ping timeout: 255 seconds]
<bb-m-labs> build #562 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/562
<bb-m-labs> build #477 of artiq-win64-test is complete: Warnings [warnings python_unittest] Build details are at http://buildbot.m-labs.hk/builders/artiq-win64-test/builds/477 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
<bb-m-labs> build #1504 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1504
ohsix has joined #m-labs
<sb0> rjo, whitequark, ping
<GitHub187> [artiq] sbourdeauducq pushed 3 new commits to master: https://github.com/m-labs/artiq/compare/e7382f47530d...d8eff2aa4e5a
<GitHub187> artiq/master d8eff2a Sebastien Bourdeauducq: update/cleanup gitignore
<GitHub187> artiq/master 6bdb76e Sebastien Bourdeauducq: core device logging controller WIP (#691)
<GitHub187> artiq/master 5ccca74 Sebastien Bourdeauducq: fold comm device into core device
<bb-m-labs> build #563 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/563
<bb-m-labs> build #1505 of artiq is complete: Failure [failed artiq_corelog] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1505 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
<bb-m-labs> build #564 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/564
<bb-m-labs> build #1506 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1506 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
<sb0> ERROR: test_dma_record_time (coredevice.test_rtio.DMATest) ConnectionResetError: [Errno 104] Connection reset by peer
<sb0> whitequark, ^
<sb0> :(
<GitHub199> [artiq] sbourdeauducq closed issue #640: experiments submitted with Flush=True cannot interrupt other experiments https://github.com/m-labs/artiq/issues/640
<GitHub102> [artiq] sbourdeauducq commented on issue #640: This is not a bug, "flushed" previously meant "nothing else ahead of us", which is a perfectly valid definition. It now means "nothing else ahead of us at our and higher priority levels".... https://github.com/m-labs/artiq/issues/640#issuecomment-303065887
<rjo> sb0: yes. kasli gets ethernet on sfp.
<rjo> hartytp: back from vacation. that's one reason i'd like to keep the backplane for kasli in mind. depending on the pin numbers you can run additional EEMs from there.
<rjo> hartytp: re #191 and your Ca+Sr setup. do you plan to _just_ use two saymas plus sevaral kaslis? we haven't planned for that. we'd usually expect to have one Metlino as well. you'd get 3 SFP from metlino and 2 SFP from each sayma. (DRTIO switch support is a requirement then).
hartytp has joined #m-labs
<hartytp> rjo: at the moment we don't have a fixed plan, we're just trying to figure out our options.
<rjo> hartytp: the AD9912 don't have ASF functionality.
<bb-m-labs> build #565 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/565
<hartytp> But, yes, running Metlino-free is definitely something we're considering for a few different reasons.
<sb0> rjo, what about pdq2_client?
<sb0> does it make sense to keep it? i suspect it's bitrotten anyway
<bb-m-labs> build #1507 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1507 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
<rjo> sb0: pdq2_client should be moved to the pdq repository. otherwise ok.
<sb0> rjo, pdq2_client talks to the corresponding artiq controller
<sb0> at least in its current form
<GitHub196> [artiq] sbourdeauducq pushed 2 new commits to master: https://github.com/m-labs/artiq/compare/e4a631a3d72f...e845de2ff27e
<GitHub196> artiq/master e845de2 Sebastien Bourdeauducq: remove aqcli_pdq2
<GitHub196> artiq/master cf746ce Sebastien Bourdeauducq: fix documentation formatting problems
<hartytp> rjo: thank you, should have checked for that. Switch to AD9910?
<hartytp> cost and power consumption are about the same IIRC
<GitHub131> [artiq] sbourdeauducq pushed 1 new commit to release-2: https://github.com/m-labs/artiq/commit/a1cf632d14fd101e12b1f742e78907a489275d23
<GitHub131> artiq/release-2 a1cf632 Sebastien Bourdeauducq: remove pdq2_client
<sb0> hartytp, doesn't ad9910 have this silicon bug that causes output glitches on io_update?
<hartytp> would need to recheck that.
<hartytp> Or, rather, need to check more carefully what circumstances that occurs under
<sb0> hartytp, have you used the 9914 at all?
<hartytp> Nope. But, I'd guess it has similar bugs. and, I'd like to avoid it due to power dissipation/cost
<hartytp> My guess is that the AD9910 glitches don't occur when the reset phase on IO_UPDATE mode is not enabled. If so, it's not a problem for the use cases we have planned. I can check this later today if we need to
<hartytp> But, maybe rjo needs the 48-bit FTW of the AD9912?
<bb-m-labs> build #566 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/566
<rjo> hartytp: yes. 48 bit ftw (or programmable modulus) was a requirement.
<hartytp> okay, so that limits you to the AD9912 or AD9914 AFAICT
<rjo> hartytp: i'll see whether they could work with 32 bit and benefit from ASF instead.
<rjo> hartytp: yes.
<hartytp> with AD9912, how do you plan to do intensity stabilisation? External modulator?
<hartytp> I think my order of preference would be: AD9910; AD9914; AD9912 + external modulator (ideally built into Urukul, but that means more IDCs!)
<bb-m-labs> build #1508 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1508 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
sb0 has quit [Quit: Leaving]
<rjo> hartytp: for opticlock we could even just regulate slowly via the laser currents. or coarse via the attenuator.
<hartytp> rjo: other than requiring more gateware (DRTIO switch) is there a major disadvantage to using Kasli as the core device?
<rjo> hartytp: how dependent are you on 1 GHz DDS clock? do you guys tend to have lots of >200 MHz AOMs?
<hartytp> 200MHz is our highest centre frequency IIRC. So, we'd like to go to at least 300MHz but ideally 400MHz
<rjo> hartytp: no SAWG, no fast ADCs, no fast DACs.
<rjo> hartytp: i thought so.
<hartytp> Well, one can get a small number of them via DRTIO though, right?
<rjo> hartytp: there is no gateware for that and the gateware might not fit the Kasli FPGA.
<rjo> hartytp: but in principle you are correct.
<hartytp> what gateware is needed exactly?
<rjo> to drive fast DACs in a sensible way? something like SAWG.
<rjo> to handle fast ADCs? depends on the application. PID loops should be doable. but most likely not 60 of them.
<hartytp> Maybe I've misunderstood, but I though the SAWG only has to go on the Sayma FPGA, not on the core device?
<rjo> hartytp: correct. SAWG would be where the fast DACs are.
<rjo> but that also applies to kasli if it were to drive fast DACs.
<hartytp> I'm assuming that the Kasli core device never drives fast DACs/ADCs directly, but only via DRTIO links (e.g. to a Sayma)
<hartytp> In fact, that no Kasli ever drives a fast DAC/ADC directly.
<hartytp> e.g. for the intensity stabilisation loop I have in mind, we'd have a dedicated Kasli DRTIO slave device that controlled ~10 DDSs, with MSPS ADCs for a servo loop
<hartytp> that needs pretty minimal resources, right?
<rjo> for those 10 PID loops in gateware?
<hartytp> yes
<hartytp> Can't remember what our current 8CH MSPS noise eater uses, but I don't think it was at all big
<rjo> the control (rtio clock domain), the SPI command generator, and the arbitration with the other DDS commands on the SPI bus may be the biggest resource user here.
<rjo> and it is decidedly single-purpose. would be hard to generalize it to other DDS and other bus architectures, command formats...
<hartytp> ACK. Do you think that will be a problem for Kasli's FPGA? If so, should we consider something a bit bigger?
<hartytp> True, there will have to be some special purpose stuff in there, but that's usually the case. And, it's mainly pretty trivial AFAICT
<hartytp> I'm open to other suggestions of how to do this, but I'd ideally like to have an option that doesn't involve Sayma if we can
<rjo> hartytp: could you spell out the specifications for that (artiq or sinara wiki page)? loop bandwidth, which IIR functions (p,i,i,d), integrator-hold, limiter, re-lock, modulation, demodulation, number of loops, how you expect to use the SPI bus while the loop is running, etc, etc
<hartytp> The majority of what we do is apply a switched CW, fixed-frequency to an AOM with a basic PI servo. For that Sayma is vast overkill
<hartytp> Drawbacks of Sayma include: cost; lead-time; power consumption etc etc
<hartytp> Having an option based on cheap few-layer boards such as Urukul that we can solder up ourselves and hack trivial gateware is very appealing
<rjo> hartytp: agreed. bus "basic PI" (integ-hold is not basic PI IMHO) and "fixed-frequency" (i.e. SPI arbitration) is what we need to think about.
<rjo> hartytp: absolutely agree on the general idea.
<hartytp> okay, I'll jot something down after lunch.
<rjo> s/ bus "basic/ but "basic/
<rjo> hartytp: thanks.
<GitHub113> [artiq] jordens opened issue #735: SAWG: expose limiter limits and phase mode https://github.com/m-labs/artiq/issues/735
sb0 has joined #m-labs
rohitksingh_work has quit [Read error: Connection reset by peer]
<hartytp> very initial thoughts: https://github.com/m-labs/sinara/wiki/Urukul
rohitksingh has joined #m-labs
<rjo> hartytp: ok.
hartytp has quit [Quit: Page closed]
<sb0> is there any tool that helps you take a plot from a datasheet and convert it into some code (e.g. spline approximation)?
<whitequark> sb0: yes
<whitequark> sec
<whitequark> or a non-cloud one http://www.im2graph.co.il/
<whitequark> that's actually more than I remember since last looking at this
<whitequark> oh, webplotdigitizer is also FOSS, cool
<sb0> whitequark, thanks
<rjo> engauge is the good old tool for physicists reading old papers.
<rjo> whitequark: how do i cast an ARTIQ python TBool to an TInt32? int32() or int() won't let me.
<rjo> or sb0: ^^^
<whitequark> rjo: it won't? that's a bug then
<whitequark> all valid python casts should be valid artiq python casts
<whitequark> well implicit ones
<rjo> whitequark: let me try the implicit one...
<whitequark> no, um
<whitequark> int() is an implicit cast technically
<whitequark> nevermind what I said, it's not useful regardless of how technically true it is
<whitequark> just add a signature for TInt in inferencer.py that accepts a TBool
<whitequark> that should be the only necessary chaneg
<whitequark> for the int() primitive, I mean
<GitHub94> [artiq] jordens opened issue #736: implicit TBool -> TInt casts https://github.com/m-labs/artiq/issues/736
<rjo> the implicit cast is not technically useful?
<whitequark> no, what I'm saying right now is not useful in fixing the bug
<whitequark> sb0: yes. add a valid_form for int(x:bool)->numpy.int? and add builtins.is_bool to the condition
<whitequark> and a check to the lit test that handles int(1.0) and such
<whitequark> the precise argument/result type for casts is erased in the IR hence no changes there are neede
<rjo> so is_numeric(TBool) should still be false?
<whitequark> yes
<whitequark> well
<whitequark> >>> list(range(False, True))
<whitequark> [0]
<whitequark> hrm
<whitequark> what a ridiculous design for booleans
<rjo> they always felt numeric to me...
<whitequark> booleans are a `type bool = True | False` and treating them any other way leads to unnecessary logic errors
<whitequark> python manages to add even more unnecessary logic errors with the implicit conversion into boolean by `if`
<whitequark> all of that should have never been done or at least ripped away in py3 but we're stuck with it i guess
<whitequark> well
<whitequark> to think a bit more about it, is_numeric is for int|float
<whitequark> and python doesn't treat booleans as numerics, it treats them as int(width=1) essentially
<larsc> you are thinking about this too academic. Strict typing is not programmer friendly
<whitequark> larsc: you have stockholm syndrome from writing too much c, sorry. i know it is painful but unlearning this habit will improve your code.
<larsc> The problem is it does not sell
<whitequark> i'm also generally not interested in discussing this because weak typing will disappear the way the `goto` statement did in not so much time
<whitequark> that's untrue even if you were talking about the ridiculous "static vs dynamic typing" discussion, but for weak typing it is untrue in the most obvious way
<larsc> I'm on your side, I think a good type system is essential. But there are a lot of people who would say it is a hassle
<larsc> bad engineering can easily be offset by faster technology
<whitequark> i do not feel a need to argue in favor of the statements above because nearly every improvement in the field of languages validates what i say
<whitequark> it's just boring
<whitequark> rjo: more on topic. it's possible to treat booleans as int(width=1). but it will break some assumptions in artiq code itself (those are few and they will be easily fixed), on the other hand it will significantly reduce ergonomics
<whitequark> well, you could have an int(width=?) literal unified with True
<whitequark> i think it's actually better to provide special forms of primitives (which we mostly do) and coercions (which I think we already cover all) for the same effect
<rjo> whitequark: https://hastebin.com/uzigiliwel.rb help?
<whitequark> hm
<whitequark> do we really not handle that? i'm surprised
<whitequark> sec
<rjo> i can just add it there.
<whitequark> i want to see why it breaks, because i think we may miss some other cases
<whitequark> doing it now.
<whitequark> rjo: yes. we do miss them. we do not handle bool->int coercions in almost all cases
<rjo> yes. certainly not the implicit ones (True << 1).
<whitequark> rjo: on reflection, bool should be a numeric type.
<whitequark> let me try to see if this will cause any major fallout.
<rjo> whitequark: ;)
<whitequark> well.
<rjo> whitequark: alternatively, sketch the solution here and i'll do my best implementing it.
<whitequark> there's a proper solution but it's really tedious.
<whitequark> we need a new category for "int or bool", and we need to accept it almost everywhere is_int is currently used. but not everywhere as this will cause codegen issues, potentially
<whitequark> this is the place where i grumble to larsc about python lacking 'strict typing' (really, ADTs), making it impossible to safely refactor such things *even with 100% test coverage*, but without a fuzzer or something.
<whitequark> so i think for now is_numeric will suffice
<whitequark> rjo: okay, so, let me sketch it.
<whitequark> add bool to is_numeric (obviously). grep for every use of is_numeric in the compiler (there are only 12, thankfully). write a lit test for every code path inside those branches, and verify that it matches host python
<whitequark> that's what i do for every coercion when i write it myself
<whitequark> rjo: then... look at all uses of is_int (but without a specific width) and consider whether they should also explicitly accept is_bool
<whitequark> if you have an is_int32, probably not. if you have an is_int that unifies the width parameter with something else, probably not
<whitequark> of primitives, only min, max and range should be changed
<whitequark> of coercions, the question is more complicated
<whitequark> looks like [] * True/False needs to be handled, bitwise ops will need to be handled (on both rhs and lhs)
<whitequark> and I think that's it. less than what I expected.
<whitequark> there are _coerce_numeric and _coerce_binop in inferencer.py that need updating, analogously to code paths for is_int
<whitequark> and the second-to-last branch in process_Coerce in llvm_ir_generator.py should be generalized to treat booleans as integers as width 1, since that's what llvm does anyway
<whitequark> for arithmetics the existing code paths look like they will handle booleans correctly already
<whitequark> rjo: ah one more thing
<whitequark> bool binop bool requires a widening numeric coercion, that will need special handling. so True:bool + True:bool = 2:np.int32
<whitequark> I don't think we have any mandatory widening numeric coercions yet, np.int1 + np.int1 would wrap using existing logic.
<whitequark> soooo, _coerce_numeric should have a branch where it checks for both lhs and rhs being bool, and widening.
<whitequark> (just return it through assigning to `typ`. _coerce_numeric should probably be called _widen_numeric, that's all it does)
<whitequark> rjo: i foresee a lot of tests here. and sb0 was asking why it took so long to write the new compiler back then...
<rjo> ouch. i got thoroghly stuck with writing the lit tests already... will need to defer that project and work around it for now.
<whitequark> what's the problem with lit tests?
<whitequark> they're not super ergonomic but they're the best i got; using python unittest was far worse.
<whitequark> gnerally cargo culting an existing similar test is the right direction
<rjo> whitequark: i need to read up to the syntax, functionality etc.
<whitequark> ah. yeah.
<whitequark> unfortunately while lit is the right lit (llvm's) OutputCheck in pip is not
<whitequark> someone decided to 'improve' it, unnecessarily breaking all syntax and removing like the third of useful functionality
<whitequark> i'm quite sad about the whole thing
<whitequark> in all honesty, i should have just ported my mini-lit extracted from llvm to python (it was in ocaml but a rewrite would be an almost mechanical task)
<whitequark> *mini-outputcheck
<whitequark> unfortunately i decided to save a day or two 1.5 years ago and now we have a hundred tests written with the broken one.
rohitksingh has quit [Read error: Connection reset by peer]
<bb-m-labs> build #567 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/567
<bb-m-labs> build #1509 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1509 blamelist: Robert Jordens <rj@m-labs.hk>
<rjo> sb0: dma broke phaser again: error[E0433]: failed to resolve. Could not find `rtio_dma` in `csr`
<GitHub96> [artiq] jordens pushed 2 new commits to master: https://github.com/m-labs/artiq/compare/06721c19c4af...bfc224d4ba0f
<GitHub96> artiq/master bfc224d Robert Jordens: phaser: adjust to new jesd
<GitHub96> artiq/master 679060a Robert Jordens: phaser: enable dma
<bb-m-labs> build #568 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/568
<bb-m-labs> build #1510 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1510 blamelist: Robert Jordens <rj@m-labs.hk>
hartytp has joined #m-labs
<hartytp> rho: let me know what you think about all that (Kasli as master + Urukul servo)
<hartytp> in particular, whether we can get ~1MSPS update rate.
<hartytp> (for the servo). Doing this without 1 IDC per DDS requires some kind of SPI multiplexing (e.g. DDR).
<hartytp> AFAICT, this would require a (small) upgrade to the SPI core, which is something we could probably fund
<hartytp> We'd also need to upgrade Novogorny to run at 1MSPS per channel (again, this will probably require some SPI multiplexing to keep the IDC count reasonable).
<hartytp> If we are going to go down that path, I'd like to let greg know asap to avoid wasting time testing the old version
hartytp has quit [Ping timeout: 260 seconds]
mumptai_ has quit [Quit: Verlassend]