sb0 changed the topic of #m-labs to: https://m-labs.hk :: Logs http://irclog.whitequark.org/m-labs :: Due to spam bots, only registered users can talk. See: https://freenode.net/kb/answer/registration
<GitHub-m-labs> [artiq] sbourdeauducq commented on issue #1176: LGTM as well but breaks unittests on the buildbot for some reason. https://github.com/m-labs/artiq/pull/1176#issuecomment-435724340
<sb0> larsc: you may have problems with 1) the idiosyncratic out-of-band signaling of SATA 2) recovering RX clock unless the hard disk does loop timing (I don't know if it does)
[X-Scale] has joined #m-labs
X-Scale has quit [Ping timeout: 264 seconds]
[X-Scale] is now known as X-Scale
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
<GitHub-m-labs> [artiq] whitequark commented on issue #1007: > What semantics changes are you thinking about?... https://github.com/m-labs/artiq/issues/1007#issuecomment-435744207
<GitHub-m-labs> [artiq] sbourdeauducq commented on issue #1007: What do you propose? Removing all run-time devirtualization, i.e. all method calls must be resolvable at compile tme? https://github.com/m-labs/artiq/issues/1007#issuecomment-435746111
<GitHub-m-labs> [artiq] sbourdeauducq commented on issue #1007: What do you propose? Removing all run-time devirtualization, i.e. all method calls must be resolvable at compile time? https://github.com/m-labs/artiq/issues/1007#issuecomment-435746111
<GitHub-m-labs> [artiq] whitequark commented on issue #1007: Yes, effectively turning Python classes into Rust traits, which are a much better runtime model. That would also give us a sane way to implement polymorphism. https://github.com/m-labs/artiq/issues/1007#issuecomment-435750643
<GitHub-m-labs> [artiq] sbourdeauducq commented on issue #1007: @dhslichter @jordens @cjbe @dtcallcock @klickverbot Thoughts on doing this?... https://github.com/m-labs/artiq/issues/1007#issuecomment-435750917
rohitksingh has joined #m-labs
rohitksingh_ has joined #m-labs
rohitksingh has quit [Ping timeout: 268 seconds]
rohitksingh_ has quit [Ping timeout: 240 seconds]
<whitequark> what is nmigen?
<sb0> new migen with common problems hopefully addressed and without backward compatibility (other than being installable along the current migen with legacy cores that can be instantiated)
<whitequark> that sounds great
rohitksingh_work has joined #m-labs
<whitequark> if you can get basic CDC, FIFOs, FSMs and Records working it can probably be tested on Glasgow as that doesn't use anything else from migen (apart from mibuild I guess), and is a reasonably nontrivial design
<sb0> e.g. support for multiple output modules, deterministic signal names, PEP8-friendly syntax, no "self.submodules += ..." etc. that are easily forgotten
<whitequark> I would be fine with just a __del__ on a Module that complains if it isn't plugged anywhere
<whitequark> asyncio style
<sb0> not just on modules, you can also forget self.comb, self.sync, etc.
<whitequark> hm, overloading <=
<whitequark> that's kind of gross. how do you do comparisons?
<whitequark> can i suggest using @= instead?
<whitequark> maybe not as verilog-y, but it is very unambiguous
<sb0> yeah, it's a hack. if the result of "<=" isn't used in another operation, then it turns into an assignment
<whitequark> the `with If(count == 4):` stuff seems much less elegant than current migen, but I suppose that's the cost of doing a proper eDSL
<whitequark> i feel like nmigen should avoid such hacks altogether rather than switching to slightly different ones...
<whitequark> imagine writing higher order code that manipulates results of comparison
<whitequark> that is very error prone
<whitequark> e.g. def f(x): pass; f(a <= b)
<sb0> it's either hacks like this, or having self.comb/self.sync
<sb0> well it doesn't have to be <=
<whitequark> if you do it with @= you don't need a hack
<whitequark> because it doesn't overlap with anything else on integers
<whitequark> regarding self.comb/self.sync, the main problem with them as I see is that you have to go for NextValue/eq in FSM instead of uniformy using eq
<sb0> okay. you still need to stack/global state though
<whitequark> right
<whitequark> but you can't avoid the global implicit state and have uniform syntax in FSMs and non FSMs right?
<whitequark> at least, I do not know of any way that wouldn't be even worse
<whitequark> whereas @= seems like a simple fix to me
<whitequark> sb0: actually, hang on a sec
<whitequark> I think I know a way that doesn't involve implict global state
<whitequark> let me prototype
<whitequark> i think if i had to revamp migen's syntax, this is the best i can come up with
<sb0> I suppose it should be "with f.If ..."
<whitequark> right
<whitequark> of course, you can forget `as f` easily, but you can just add a flag to each context manager, "am I top of stack?"
<whitequark> and raise if it's not
<whitequark> on the plus side, this has zero magic going on anywhere
<sb0> yeah, I don't know which is better, nicer syntax with global state/stack/"magic" or somewhat cluttered syntax but no hacks
<whitequark> this is actually more compact than your code
<whitequark> slightly. 39 lines vs 35
<whitequark> I personally find with Comb / with Sync to be worse than f.comb / f.sync
<whitequark> because they add nesting
<whitequark> and migen code already has way too much of it
<sb0> yes, partly because I have only one statement in each comb/sync, which is a bit contrived
<whitequark> ok, let me convert some real-world code to this proposed syntax
<whitequark> i wonder if pythonparser can be hacked up to do this automatically
<sb0> with f.If(start) as f:
<sb0> f.next_state = "RUNNING"
<sb0> would the "If" forward "next_state" to its parent, the FSM?
<whitequark> that's the idea. forward while keeping context
<whitequark> there's... somewhat more visual clutter? but this is easily offset by,
<whitequark> a) never hunting that stray paren again (this is the #1 time sink when bringing up a new migen design i think)
<whitequark> b) uniform comb/sync
<sb0> what about multiple clock domains? same as now i.e. f.sync.domain?
<whitequark> yes
<whitequark> sb0: oh, I realized one way I don't like about your with Comb() design in particular
<whitequark> not only it privileges one kind of logic (which is weird on its own) but it also adds another bit of global state
<whitequark> imagine copy pasting some code from with Comb() block into a with Sync()
<whitequark> this is *very* bad imo
<whitequark> this is definitely going to result in hard to diagnose bugs
<sb0> comb by default sounds fine to me, and fsm.act() already does that
<whitequark> I've definitely hit bugs where I copied code from a sync block into fsm.act and it didn't work
<sb0> so you want f.comb or f.sync on every single statement?
<whitequark> blanket requiring this in nmigen is not something I would do, but I am strongly considering writing my code like that
<whitequark> (and adding an editor extension to highlight comb/sync in different ways)
<whitequark> sb0: there's another consideration
<whitequark> let's say you're copying a part of f.sync += [ ... ] block
<whitequark> when you are pasting it, you have to stop and think about context
<whitequark> like, do you add it to an exising f.??? block? do you write a new one?
<whitequark> because that part of block is not valid on its own
<whitequark> if you are copying a part of nmigen code with syntax just like "count <= 0" which IS valid on its own
<whitequark> you do not have this "speed bump"
<whitequark> so it's easier to make this mistake than even code with multiple statement f.??? += [ ... ] blocks
<whitequark> I think only like 30% of eDSL ergonomics is about making it readable, and the rest is about ensuring it does not break horribly when you are refactoring something
<whitequark> by the way, I would very much like code coverage in migen or nmigen
<whitequark> but that's orthogonal
<cr1901_modern> "after" is definitely more difficult to read for me, but I have no idea if that's only because I'm not used to it yet. It does take my eyes longer to see If/Else conditionals
<cr1901_modern> But it looks like it maps nicely to old migen
<whitequark> cr1901_modern: it is more cluttered, yes
<whitequark> but it is, in my opinion, much safer to *modify*
<whitequark> because the clutter carries important context
<sb0> cr1901_modern: which one? with or without f.?
<cr1901_modern> with f.
<whitequark> well, there is a middle ground, I guess
<whitequark> have comb/sync but not f.
<whitequark> but it seems like not gaining very much
<cr1901_modern> I know it's odd, but those "f." make it more difficult for my eyes to immediately see "oh that's a conditional"
<cr1901_modern> whitequark: I understand why it should be "f."
<whitequark> yes, I think the "f." in "with" statements are kind of bad
<whitequark> but I don't see a way around it that would not just produce more obscure bugs elsewhere
<cr1901_modern> One thing in old migen is that If() returns an object where Else() can be called. In this new syntax, it looks like you can start an "If", and then create a new context that's not an Else or Elif
<cr1901_modern> how would that be handled?
<whitequark> the parent context of an "If" has a small FSM that handles conditionals
<whitequark> so it knows what to do if it sees an Elif or Else
<cr1901_modern> That'll work. Still should probably yell at someone who tries to be cute and not pair their If/Elses :)
rohitksingh_work has quit [Read error: Connection reset by peer]
<whitequark> I mean, it'd go back to the initial state if it sees anything but Elif or Else
* cr1901_modern thinks
<cr1901_modern> well that's no different from verilog other than begin/end is implicit... I _think_
<cr1901_modern> sb0: How do you do submodules w/ this new syntax?
<sb0> cr1901_modern: nest two with Module
<cr1901_modern> can I still create multiple "with Module()"s at file scope? Can I subclass Module so I can do "with MySubClassedModule()"?
<whitequark> the latter is pretty much required
<cr1901_modern> Module("top") is equivalent to "self.submodules.top += Module()" in old Migen?
<whitequark> you need some way to do interfaces
<sb0> you can have user classes that define the interface, and have a implement() method that creates the Module
<sb0> then warn in __del__ if implement() is never called
<cr1901_modern> I would have to see an example
<sb0> there should be a way to silance that warning, e.g. if you only want a CSR map, you can skip implement(), which might take a somewhat long time on a slow machine with a big design
<whitequark> hm, makes sense
<cr1901_modern> Right now it doesn't look like one can import a Module defined in one file into another, because everything is stored in the global_context variable (I guess there's no way around the global state)
<cr1901_modern> >you can have user classes that define the interface, <-- oh okay, I think I get it now. Still less boilerplate than old migen.
<sb0> also it separates the two in a clear way, unlike the current way of doing things
<GitHub-m-labs> [artiq] klickverbot commented on issue #1176: Hmm, looks like something went wrong with the rebase there, leaving some mixed string/enum comparisons in tests.... https://github.com/m-labs/artiq/pull/1176#issuecomment-435782750
<cr1901_modern> The NextValue/eq dance never really bothered me, but the uniform syntax is nice
<cr1901_modern> hopefully before_entering/after_entering/etc are still there
m4ssi has joined #m-labs
rohitksingh_work has joined #m-labs
<GitHub-m-labs> [artiq] jordens commented on issue #1176: No strong preference from me. Your choice. https://github.com/m-labs/artiq/pull/1176#issuecomment-435794070
<GitHub-m-labs> [artiq] jordens commented on issue #1007: Conceptually fine. **But** can we please maintain and manage the current one first? Starting a new revision of ARTIQ-Python while the current state waits for regression fixes, documentation, performance metrics, speed improvements, and block releases is too early and too risky for my taste. https://github.com/m-labs/artiq/issues/1007#issuecomment-435796191
rohitksingh_work has quit [Read error: Connection reset by peer]
<GitHub-m-labs> [artiq] jordens commented on issue #1007: Conceptually fine. **But** can we please maintain and manage the current ARTIQ-Python first? Starting a new revision of ARTIQ-Python while the current state waits for regression fixes, documentation, performance metrics, speed improvements, and block releases is too early and too risky for my taste. https://github.com/m-labs/artiq/issues/1007#issuecomment-435796191
rohitksingh has joined #m-labs
sb0 has quit [Ping timeout: 244 seconds]
sb0 has joined #m-labs
sb0 has quit [Ping timeout: 272 seconds]
<GitHub-m-labs> artiq/urukul-sync f0f67b0 Robert Jördens: ad9910: add init bit explanation
<GitHub-m-labs> artiq/urukul-sync 11be892 Robert Jördens: test: add Urukul CPLD HITL tests...
<GitHub-m-labs> artiq/urukul-sync 08f5e2b Robert Jördens: ad9910: fiducial timestamp for tracking phase mode
<GitHub-m-labs> [artiq] jordens pushed 4 new commits to urukul-sync: https://github.com/m-labs/artiq/compare/9f9f156c53e2...9a11ffcce906
<rjo> bb-m-labs: force build --branch=urukul-sync artiq
<bb-m-labs> build forced [ETA 54m51s]
<bb-m-labs> I'll give a shout when the build finishes
<bb-m-labs> build #1967 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1967
<bb-m-labs> build #1968 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1968
<bb-m-labs> build #2663 of artiq is complete: Exception [exception python_unittest_2 board_unlock_1] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2663
rohitksingh has quit [Ping timeout: 244 seconds]
<GitHub-m-labs> [artiq] jordens pushed 5 new commits to urukul-sync: https://github.com/m-labs/artiq/compare/9a11ffcce906...3a4999d10b1d
<GitHub-m-labs> artiq/urukul-sync 50a0cd2 Robert Jördens: kasli: add sync to LUH, HUB, Opticlock...
<GitHub-m-labs> artiq/urukul-sync b104274 Robert Jördens: kasli_tester: urukul0 mmcx clock defunct
<GitHub-m-labs> artiq/urukul-sync 32b360a Robert Jördens: test_ad9910: relax ifc mode read
<rjo> bb-m-labs: force build --branch=urukul-sync artiq
<bb-m-labs> build forced [ETA 54m51s]
<bb-m-labs> I'll give a shout when the build finishes
<GitHub-m-labs> [artiq] drewrisinger commented on pull request #1188 7074615: Can you explain why the type annotations should be removed? Other than not being used elsewhere in ARTIQ (https://github.com/m-labs/artiq/pull/1181#discussion_r227604791)?... https://github.com/m-labs/artiq/pull/1188#discussion_r230823647
mauz555 has joined #m-labs
<bb-m-labs> build #1969 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1969
<GitHub-m-labs> [artiq] drewrisinger commented on issue #1188: @jordens FYI, I found a few other instances of that same return style in that file.... https://github.com/m-labs/artiq/pull/1188#issuecomment-435947251
<GitHub-m-labs> [artiq] drewrisinger commented on pull request #1185 b5a5be4: Ok. So it is an extra comment to make things just slightly more explicit. https://github.com/m-labs/artiq/pull/1185#discussion_r230826984
<GitHub-m-labs> [artiq] jordens commented on issue #1188: @drewrisinger touché. Then either style is fine. https://github.com/m-labs/artiq/pull/1188#issuecomment-435948410
<GitHub-m-labs> [artiq] drewrisinger commented on pull request #1185 b5a5be4: That is taken care of by `choices=[...]` in line 99:... https://github.com/m-labs/artiq/pull/1185#discussion_r230828888
<GitHub-m-labs> [artiq] drewrisinger commented on pull request #1181 7329f8f: See my thoughts in https://github.com/m-labs/artiq/pull/1188#discussion_r230823647 https://github.com/m-labs/artiq/pull/1181#discussion_r230831253
<GitHub-m-labs> [artiq] drewrisinger commented on issue #1188: > @drewrisinger touché. Then either style is fine.... https://github.com/m-labs/artiq/pull/1188#issuecomment-435952891
<rjo> sb0: how is urukul0 on kasli tester clocked? the current device db entry doesn't lock. for SYNC CI the 125 MHz from Kasli should be connected, the board should be populated for MMCX clock, and https://github.com/m-labs/artiq/commit/b104274d7e77b2bf878ea7c179eb5289a0ab16a7 should be reverted.
<bb-m-labs> build #1970 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1970
<GitHub-m-labs> [artiq] drewrisinger commented on issue #1181: @sbourdeauducq which annotations are you referring to? the ones in [tools.py](https://github.com/m-labs/artiq/pull/1181/files/20477227f5c825413b253a436bdff3b9fe35e05a#diff-a9d5cce2afacd2d9ffadd55d275e02be) or the ones in `frontend/artiq_client.py`, etc? And are you talking about removing the docstrings as well? https://github.com/m-labs/artiq/pull/1181#issuecom
<bb-m-labs> build #2664 of artiq is complete: Exception [exception python_unittest_2 board_unlock_1] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2664
mauz555 has quit []
mumptai has joined #m-labs
<GitHub-m-labs> [artiq] jordens pushed 1 new commit to urukul-sync: https://github.com/m-labs/artiq/commit/15d2b21a487dccdbcc7b5b4b61e063ee257bca5b
<GitHub-m-labs> artiq/urukul-sync 15d2b21 Robert Jördens: test_urukul: relax speed...
<rjo> bb-m-labs: force build --branch=urukul-sync artiq
<bb-m-labs> build forced [ETA 54m51s]
<bb-m-labs> I'll give a shout when the build finishes
m4ssi has quit [Remote host closed the connection]
<bb-m-labs> build #1971 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1971
<bb-m-labs> build #1972 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1972
<GitHub-m-labs> [artiq] jbqubit opened pull request #1189: apply brittonlab changes (master...brittonlaba) https://github.com/m-labs/artiq/pull/1189
<GitHub-m-labs> [artiq] jbqubit closed pull request #1189: apply brittonlab changes (master...brittonlaba) https://github.com/m-labs/artiq/pull/1189
<bb-m-labs> build #2665 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2665
<GitHub-m-labs> [artiq] jordens opened pull request #1190: Urukul sync (master...urukul-sync) https://github.com/m-labs/artiq/pull/1190
<GitHub-m-labs> [artiq] jordens force-pushed urukul-sync from 15d2b21 to 6fb1827: https://github.com/m-labs/artiq/commits/urukul-sync
<GitHub-m-labs> artiq/urukul-sync f62c1ff Robert Jördens: TTLClockGen: expose acc_width...
<GitHub-m-labs> artiq/urukul-sync 0433e8f Robert Jördens: urukul: add sync_in generator...
<GitHub-m-labs> artiq/urukul-sync f755a46 Robert Jördens: device_db_ptb: fix zotino clr...
<GitHub-m-labs> [artiq] jordens closed issue #1143: Urukul: Kasli-Urukul synchronization using SYNC IN driven by Kasli https://github.com/m-labs/artiq/issues/1143
<bb-m-labs> build #1973 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1973
<bb-m-labs> build #1974 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/1974
<bb-m-labs> build #2666 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2666
mumptai has quit [Read error: Connection reset by peer]
mauz555 has joined #m-labs
mumptai has joined #m-labs
mumptai has quit [Remote host closed the connection]
mauz555 has quit [Remote host closed the connection]
mauz555 has joined #m-labs
<GitHub-m-labs> [artiq] klickverbot commented on pull request #1185 b5a5be4: I'd categorise this as (mild) code smell – comments like these add cognitive overhead to express something that is already obvious from just reading the code as plain English.... https://github.com/m-labs/artiq/pull/1185#discussion_r230948993
mauz555 has quit [Remote host closed the connection]
mauz555 has joined #m-labs
mauz555 has quit [Ping timeout: 252 seconds]