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
<cr1901_modern> Yea, no parameter support in the output Verilog. IME not as limiting as it sounds
AceChen has quit [Ping timeout: 252 seconds]
<mithro> I don't get how to move a single clock domain forward in Migen simulation....
<whitequark> you can't
<whitequark> you can only set a ratio
<whitequark> between different clocks
<whitequark> and it's strictly integral iirc
AceChen has joined #m-labs
<lkcl> cr1901_modern: thx.
<cr1901_modern> I don't think it's integral? You supply the desired clock period for each clk as part of the simulation params
<cr1901_modern> unless I misunderstand what you mean
<mithro> whitequark: Does yield always move the fastest clock forward by one cycle?
<whitequark> I think so
AceChen has quit [Ping timeout: 250 seconds]
AceChen has joined #m-labs
_whitelogger has joined #m-labs
futarisIRCcloud has joined #m-labs
_whitelogger has joined #m-labs
<lkcl> drat. i really need the << operator not the <<< operator, as well.
<lkcl> whitequark: self.comb += mi.rw_byte_mask.eq(
<lkcl> _Operator("<<", [unshifted_load_store_byte_mask,
<lkcl> load_store_address_low_2]))
<lkcl> works fine... it's just that the simulator doesn't recognise it.
<lkcl> bitcontainer value_bits_sign recognises whether the value is signed or unsigned and will return one more MSB
<lkcl> however it doesn't recognise the << or >> operators
<lkcl> and str2op in core.py doesn't recognise it either
_whitelogger has joined #m-labs
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #m-labs
futarisIRCcloud has joined #m-labs
<sb0> mithro: it moves the generator's clock by one cycle
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
<whitequark> lkcl: ok, thanks for investigating
<whitequark> think you could comment on the github issue?
<lkcl> whitequark: no problem. i needed it here as well :)
<lkcl> unfortunately i can't: i'm classified as a strict "software libre" developer.
<lkcl> i got called out for having a github account about... 6 years ago, and realised i had to delete it
<lkcl> otherwise i get slated as a hypocrite by sponsors and backers
<lkcl> honestly... it's a pain in the ass :)
<whitequark> that's pretty extreme
<lkcl> it's nothing that any other software libre developer has to abide by... or get sidelined
<lkcl> it's a matter of where you draw the line. i'm happy to do git clone / pull from github, as the only info they get from me is the IP address.
<GitHub-m-labs> [migen] whitequark pushed 1 new commit to master: https://github.com/m-labs/migen/commit/b5d723bba512c0cd412195485081a78dbd76bac7
<GitHub-m-labs> migen/master b5d723b whitequark: build/lattice/trellis: update for newer ecppack....
<GitHub-m-labs> [migen] whitequark pushed 1 new commit to master: https://github.com/m-labs/migen/commit/4eca436cecd3046b71bce3233c3663a45a472ebb
<GitHub-m-labs> migen/master 4eca436 whitequark: fhdl/specials: allow passing name hint to TSTriple....
<bb-m-labs> build #345 of migen is complete: Failure [failed python_unittest] Build details are at http://buildbot.m-labs.hk/builders/migen/builds/345 blamelist: whitequark <whitequark@whitequark.org>
<bb-m-labs> build #346 of migen is complete: Failure [failed python_unittest] Build details are at http://buildbot.m-labs.hk/builders/migen/builds/346 blamelist: whitequark <whitequark@whitequark.org>
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 268 seconds]
<GitHub-m-labs> [migen] whitequark pushed 2 new commits to master: https://github.com/m-labs/migen/compare/4eca436cecd3...c05fc0c69e3c
<GitHub-m-labs> migen/master c05fc0c whitequark: build/lattice/icestorm: add fine grained clock constraint support....
<GitHub-m-labs> migen/master 0c57a44 whitequark: build/lattice/icestorm: simplify.
<bb-m-labs> build #347 of migen is complete: Failure [failed python_unittest] Build details are at http://buildbot.m-labs.hk/builders/migen/builds/347 blamelist: whitequark <whitequark@whitequark.org>
lkcl has quit [Ping timeout: 240 seconds]
rohitksingh has joined #m-labs
lkcl has joined #m-labs
futarisIRCcloud has joined #m-labs
<sb0> whitequark: any update on the various artiq issues we discussed?
rohitksingh has quit [Ping timeout: 250 seconds]
rohitksingh has joined #m-labs
vup2 has joined #m-labs
mauz555 has joined #m-labs
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
<GitHub-m-labs> [artiq] jordens pushed 1 new commit to master: https://github.com/m-labs/artiq/commit/a81c12de947aa09a877efc1bf6840007b71a265f
<GitHub-m-labs> artiq/master a81c12d Robert Jördens: urukul: work around windows numpy int peculiarity...
<GitHub-m-labs> [artiq] jordens pushed 1 new commit to release-4: https://github.com/m-labs/artiq/commit/cc61ee91394c2776b562e47e82b382ca9f7810f7
<GitHub-m-labs> artiq/release-4 cc61ee9 Robert Jördens: urukul: work around windows numpy int peculiarity...
mumptai has joined #m-labs
vup2 has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
vup2 has joined #m-labs
vup2 has quit [Quit: vup2]
vup2 has joined #m-labs
<bb-m-labs> build #2078 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2078
mauz555 has quit [Remote host closed the connection]
rohitksingh has quit [Ping timeout: 250 seconds]
<bb-m-labs> build #2079 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2079
<bb-m-labs> build #2720 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2720 blamelist: Robert J?rdens <rj@quartiq.de>
<GitHub-m-labs> [artiq] sbourdeauducq pushed 1 new commit to master: https://github.com/m-labs/artiq/commit/af9ea1f3240477039d89877db430e3feb5c97442
<GitHub-m-labs> artiq/master af9ea1f Sebastien Bourdeauducq: gui: update background
mauz555 has joined #m-labs
mauz555 has quit [Read error: Connection reset by peer]
<sb0> rjo: how to test suservo?
<bb-m-labs> build #2080 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2080
<sb0> rjo: and is COEFF_DEPTH supposed to hit the middle of the 3 "coeff" bits that are currently in the address field?
<sb0> rjo: why is the bit-shifting not abstracted in the read and write functions?
<rjo> sb0: what kind of test?
<rjo> sb0: feel free to abstract it.
<sb0> rjo: all the bit manipulations to interface it into the rtio, which are complicated, duplicated, and error-prone
<sb0> things like return self.read(STATE_SEL | (adc << 1) | (1 << 8)) are quite obscure. what is 1 << 8 doing?
<sb0> set bit 3 in profile?
<sb0> (which will break if the widths are changed)
<bb-m-labs> build #2081 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2081
<rjo> sb0: have you had a look at the memory layout documentation?
rohitksingh has joined #m-labs
<bb-m-labs> build #956 of artiq-win64-test is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-win64-test/builds/956
<bb-m-labs> build #2721 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2721
mauz555 has joined #m-labs
mauz555 has quit [Remote host closed the connection]
mauz555 has joined #m-labs
<bb-m-labs> build #2082 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2082
mauz555 has quit [Remote host closed the connection]
<bb-m-labs> build #2083 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2083
<bb-m-labs> build #2722 of artiq is complete: Failure [failed python_unittest_2] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2722 blamelist: Sebastien Bourdeauducq <sb@m-labs.hk>
rohitksingh has quit [Ping timeout: 245 seconds]
mauz555 has joined #m-labs
rohitksingh has joined #m-labs
mauz555 has quit [Remote host closed the connection]
mauz555 has joined #m-labs
mauz555 has quit [Ping timeout: 272 seconds]
rohitksingh has quit [Ping timeout: 246 seconds]
<sb0> rjo: I don't understand it
<sb0> "The state memory holds all Y1 values (IIR processor outputs) for all profiles of all channels in the lower half (1 << W.profile + W.channel addresses) and the pairs of old and new ADC input values X1, and X0, in the upper half (1 << W.channel addresses)."???
<sb0> rjo: and that does not answer the question about COEFF_DEPTH
<sb0> why does it seem to be the middle bit and not the lowest one?
<cr1901_modern> sb0: (This came up in #timvideos) The difference between ClockSignal("my_cd") and self.clock_domains.cd_my_cd.clk is that the former works everywhere, and the latter only works in the module where you declared the clock domain, correct?
<sb0> this thing is so complicated and without any unit test, how are we supposed to maintain it?
<lkcl> oo, scary. python without unit test equals baaad :)
<lkcl> i'm still in the middle of learning and evaluating migen at the moment
<lkcl> for the libre-riscv soc (800mhz+ quad-core smp rv64gv-sv riscv)
<lkcl> and clock domains will definitely be something we'll need
<lkcl> stability and confidence in migen will be absolutely essential
<cr1901_modern> I've been using Migen for 3.5 years, and clock domain errors still throw me off sometimes b/c the rules are a bit messy
<lkcl> so, if the team decides to go ahead with migen, we'll help out ok?
<lkcl> cr1901_modern: that helps to know about.
<lkcl> you may be interested to know that in bluespec, clock domain synchronisation is an absolute damn nuisance :)
<lkcl> the rules are so strict it's almost impossible to get them right
<whitequark> migen is definitely on the fuzzier side, in kind of its host language, python
<whitequark> e.g. the width extension rules
<whitequark> i would have personally preferred it to be more strictly typed, but it's such a significant improvement over trying to write verilog that it's not nearly enough to dissuade me from using migen
<cr1901_modern> The "automatic renaming of clock domains in submodules" feels like a misfeature sometimes, tbh. You can write self.sync.my_undeclared_cd += [] just fine.
<lkcl> oh, from the operators, carrying the bitwidth through the python objects?
<sb0> oh fuck this. i'll just move the overflowing address bits into data and consider it an opaque value.
<cr1901_modern> Having a bad day?
<whitequark> lkcl: I would have preferred if truncating or extending a value had a speed bump in it, but I also recognize that this would make some generic code significantly less readable
<whitequark> and to some extent, more fragile
<mithro> sb0: So, if I do a "mem.get_port(...., clock_domain="blah")" I get the following error when trying to generate gateware;
<mithro> sb0: It seems to work if I just do a "port.clock = self.cd_blah.clk" but then simulation breaks with a "AttributeError: 'Signal' object has no attribute 'cd'"
<whitequark> mithro: you need to do `self.specials += port`
<whitequark> I hit this just today
<mithro> Welp, yosys is optimizing my design down to 2 LCs.. something is obviously wrong...
<whitequark> forgot self.submodules += ?
<mithro> whitequark: Possibly - but everything seems to be in the output verilog file that I can see -- I think it's constant propagation
<GitHub-m-labs> [artiq] sbourdeauducq pushed 3 new commits to new: https://github.com/m-labs/artiq/compare/53e79f553f88...450a035f9ef0
<GitHub-m-labs> artiq/new b32e894 Sebastien Bourdeauducq: Merge branch 'master' into new
<GitHub-m-labs> artiq/new ae8ef18 Sebastien Bourdeauducq: rtlink: sanity-check parameters
<GitHub-m-labs> artiq/new 450a035 Sebastien Bourdeauducq: suservo: move overflowing RTIO address bits into data
<mithro> The clean after "3.7.2. Executing OPT_EXPR pass (perform const folding). " seems to remove all the important stuff.....
<whitequark> reset?
<GitHub-m-labs> [artiq] sbourdeauducq merged new into master: https://github.com/m-labs/artiq/compare/af9ea1f32404...450a035f9ef0
<mithro> whitequark: Seems it was putting the self.clockdomain values in the top level
<cr1901_modern> ?
<mithro> Now it looks like Yosys isn't inferring blockram for my buffer...
<cr1901_modern> what does "putting the self.clockdomain values in the top level" mean?
<cr1901_modern> if you create a clock domain inside a submodule with the same name as a clock domain as a parent module, Migen will treat them as two separate clock domaisn
<cr1901_modern> There's... nothing wrong with that
<mithro> Seems to be an issue with this memory -- two read/write ports? https://www.irccloud.com/pastebin/C1t3meH0/
<cr1901_modern> you can do self.sync.usb_48 in your USB submodule and Migen will know that refers to usb_48 in your parent.
<sb0> bb-m-labs: force build artiq
<bb-m-labs> build forced [ETA 58m43s]
<bb-m-labs> I'll give a shout when the build finishes
<cr1901_modern> that refers to the usb_48 clock domain that exists in your parent
<sb0> whitequark: sometimes the test_host_to_device fails with a transfer rate of 1465162 (always around that value)
<whitequark> sb0: the SACK PR should help with that
<mithro> hrm - maybe not -> removing unused `$mem' cell `\mem_1'.
<whitequark> I should review that...
<bb-m-labs> build #2084 of artiq-board is complete: Failure [failed conda_build] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/2084
<bb-m-labs> build #2723 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/2723
mumptai has quit [Quit: Verlassend]
<GitHub-m-labs> [artiq] sbourdeauducq pushed 2 new commits to master: https://github.com/m-labs/artiq/compare/450a035f9ef0...c56c0ba41f4b
<GitHub-m-labs> artiq/master c56c0ba Sebastien Bourdeauducq: rtio/dds: use write-only RT2WB...
<GitHub-m-labs> artiq/master 09141e5 Sebastien Bourdeauducq: rtio/wishbone: support write-only interface
<lkcl> whitequark: weeeell... what about making it a new option to Signal(), for the bitwidth to be enforced / mandatory / fixed?
<whitequark> lkcl: there's sb0's effort called "nmigen"
<whitequark> which is probably a better place to fix this
<lkcl> ahh ok :)
<whitequark> I'm not fond of "optional correctness"
<lkcl> lol
<whitequark> that just makes it so that you have to test an entire matrix with your module
* lkcl waves to sb0
<whitequark> e.g. does it work correctly if you pass in a signal with this option? does it work correctly if you pass a signal without?
<whitequark> python already has weak typing, let's not make it worse
<lkcl> oh: you sure as hell wouldn't pass it in as a runtime (verilog) parameter
<lkcl> as it would change the outputted verilog
<whitequark> no, i mean, you can pass signals to a submodule constructor
<whitequark> s = Signal()
<whitequark> self.submodules += ClockDiv(s, sdiv, 1000)
<whitequark> or something
<lkcl> ah yeh.
<lkcl> yes. so... that would be a runtime assertion
<sb0> lkcl: what is enforcing the signal bitwidth?
<whitequark> sb0: forbidding implicit truncation of signals
<lkcl> sb0: the operators increase the bitwidth based on the input parameters
<whitequark> well, implicit truncation is primaraily a footgun
<lkcl> or decrease
<whitequark> implicit expansion is more defensible
<whitequark> though still can be a footgun
<lkcl> whitequark: ok.
<sb0> arithmetic modulo some power of 2 is pretty common in FPGAs
<lkcl> i'm implementing rv32 in migen, and there are some very specific arithmetic rules that need to be obeyed.
<whitequark> sb0: extensively using implicit truncation results in code that is hard to understand if you did not write it
<whitequark> and even if you did
<sb0> aren't rv32 operations mod 2**32?
<sb0> (most of the time)
<whitequark> because you do not necessarily have visibility into the signals used in any specific expression
<whitequark> they may come from another module, or you might be generic over this signal
<whitequark> i have hit bugs caused by implicit expansion a lot of times
<whitequark> last one was... a few hours ago. wasted like a hour on that one.
<lkcl> sb0: from what i can gather, yes. so, it would be really helpful to not have implicit expansion/truncation.
<whitequark> sure, experienced migen developers may condition themselves to code defensively against this, but that doesn't make it a good design choice
<sb0> lkcl: then if your target signal is 32-bit, what does not work?
<lkcl> sb0: i haven't got to running unit tests yet, i'm still doing a conversion from verilog
<lkcl> i ran into the same "<<<" operator issue that whitequark ran into a couple days ago.
futarisIRCcloud has joined #m-labs
<lkcl> and, as an inexperienced migen developer, it's more that i don't *know* what could be tripping me up, if that makes sense