ChanServ changed the topic of #nmigen to: nMigen hardware description language · code at https://github.com/nmigen · logs at https://freenode.irclog.whitequark.org/nmigen
Sarayan has quit [Ping timeout: 272 seconds]
proteus-guy has joined #nmigen
proteus-guy has quit [Ping timeout: 260 seconds]
Sarayan has joined #nmigen
focus has joined #nmigen
focus has quit [Ping timeout: 268 seconds]
focus has joined #nmigen
Ekho has joined #nmigen
focus has quit [Ping timeout: 260 seconds]
<_whitenotifier-3> [nmigen-soc] whitequark commented on issue #6: RecursionError when elaborating a csr.Multiplexer with alignment >= 8 - https://git.io/JvZVC
<_whitenotifier-3> [nmigen-soc] whitequark commented on issue #6: RecursionError when elaborating a csr.Multiplexer with alignment >= 8 - https://git.io/JvZV8
focus has joined #nmigen
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 2 commits to master [+0/-0/±4] https://git.io/JvZVo
<_whitenotifier-3> [nmigen/nmigen] whitequark f7abe36 - hdl.mem: document Memory.
<_whitenotifier-3> [nmigen/nmigen] whitequark 31cd72c - hdl.mem: add synthesis attribute support.
<_whitenotifier-3> [nmigen] whitequark closed issue #291: Need a way to attach attributes to memories - https://git.io/JvZVK
<_whitenotifier-3> [nmigen] whitequark commented on issue #291: Need a way to attach attributes to memories - https://git.io/JvZVy
focus has quit [Ping timeout: 268 seconds]
<_whitenotifier-3> [nmigen] Success. 82.27% (+0.09%) compared to dfcf793 - https://codecov.io/gh/nmigen/nmigen/commit/31cd72c0b6250cb74e001df0e25a013bed17fdf2
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 82.17%) - https://codecov.io/gh/nmigen/nmigen/commit/31cd72c0b6250cb74e001df0e25a013bed17fdf2
<_whitenotifier-3> [nmigen] Success. 82.18% (+<.01%) compared to dfcf793 - https://codecov.io/gh/nmigen/nmigen/commit/31cd72c0b6250cb74e001df0e25a013bed17fdf2
<_whitenotifier-3> [nmigen-soc] jfng commented on issue #6: RecursionError when elaborating a csr.Multiplexer with alignment >= 8 - https://git.io/JvZwP
focus has joined #nmigen
<_whitenotifier-3> [nmigen-soc] whitequark commented on issue #6: RecursionError when elaborating a csr.Multiplexer with alignment >= 8 - https://git.io/JvZrI
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 2 commits to master [+0/-0/±4] https://git.io/JvZoV
<_whitenotifier-3> [nmigen/nmigen] whitequark 86b57fe - hdl.dsl: type check when adding to m.domains.
<_whitenotifier-3> [nmigen/nmigen] whitequark 3df4297 - hdl.dsl: reject name mismatch in `m.domains.<name> +=`.
<_whitenotifier-3> [nmigen] whitequark closed issue #282: Assigning local domain with different name - https://git.io/JvZow
focus has quit [Ping timeout: 265 seconds]
<_whitenotifier-3> [nmigen] Success. 82.29% (+0.11%) compared to 31cd72c - https://codecov.io/gh/nmigen/nmigen/commit/3df429703c4067baf7718c00cb21d733d4454492
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 82.18%) - https://codecov.io/gh/nmigen/nmigen/commit/3df429703c4067baf7718c00cb21d733d4454492
<_whitenotifier-3> [nmigen] Success. 82.2% (+0.02%) compared to 31cd72c - https://codecov.io/gh/nmigen/nmigen/commit/3df429703c4067baf7718c00cb21d733d4454492
test12 has joined #nmigen
test12 has quit [Remote host closed the connection]
test12 has joined #nmigen
test12 has quit [Remote host closed the connection]
focus has joined #nmigen
<_whitenotifier-3> [nmigen] whitequark commented on issue #291: Need a way to attach attributes to memories - https://git.io/JvZKB
<_whitenotifier-3> [nmigen] whitequark commented on issue #291: Need a way to attach attributes to memories - https://git.io/JvZK0
<_whitenotifier-3> [nmigen] whitequark reopened issue #291: Need a way to attach attributes to memories - https://git.io/JvZVK
focus has quit [Ping timeout: 265 seconds]
focus has joined #nmigen
<whitequark> here's a question
<whitequark> do you think an interactive console, like Python REPL, but enhanced to work like the nMigen simulator, would be useful?
<whitequark> you could write an nMigen expression and it'd tell you which value it evaluates to
<ZirconiumX> So if you did something like `a = Array(foo, bar, baz, quux); a[2]`, do you get `a[2]`? `baz`?
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 2 commits to master [+0/-0/±2] https://git.io/JvZic
<_whitenotifier-3> [nmigen/nmigen] whitequark d3775ee - back.pysim: make `write_vcd(traces=)` actually use those traces.
<_whitenotifier-3> [nmigen/nmigen] whitequark 882fddf - back.pysim: emit toplevel inputs in VCD files as well.
<_whitenotifier-3> [nmigen] whitequark closed issue #280: pysim2 doesn't write input signals to VCD - https://git.io/JvZiC
<_whitenotifier-3> [nmigen] whitequark commented on issue #280: pysim2 doesn't write input signals to VCD - https://git.io/JvZiW
<ZirconiumX> What about if you do `foo + bar + baz + quux`?
focus has quit [Ping timeout: 260 seconds]
<_whitenotifier-3> [nmigen] Success. 82.28% (+0.07%) compared to 3df4297 - https://codecov.io/gh/nmigen/nmigen/commit/882fddfa96955da8d8406832d51a79d240d317de
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 82.2%) - https://codecov.io/gh/nmigen/nmigen/commit/882fddfa96955da8d8406832d51a79d240d317de
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.01% but relative coverage increased by +17.79% compared to 3df4297 - https://codecov.io/gh/nmigen/nmigen/commit/882fddfa96955da8d8406832d51a79d240d317de
<whitequark> ZirconiumX: you'd get the value of baz
<whitequark> and in the latter case, you'd get the sum of the values of those signals
<whitequark> symbolic execution would be pretty cool but I think it's way out of scope for nmigen
<whitequark> well, right now at least
<whitequark> awygle: jfng: emily: can we bikeshed this? https://github.com/nmigen/nmigen/issues/292#issuecomment-578784030
<whitequark> options: (a+b).signed(), (a+b).to_signed(), (a+b).as_signed()
<whitequark> I think .as_signed() is perhaps the best because this conversion is a reinterpretation of the bit pattern
<whitequark> i.e. it would not be width-changing (I don't think we need width-changing signedness conversions at all with nMigen's casting rules)
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/JvZij
<_whitenotifier-3> [nmigen/nmigen] whitequark 97cc78a - hdl.ir: type check ports.
<_whitenotifier-3> [nmigen] whitequark closed issue #290: Unclear error message when using an Array as port - https://git.io/JvZPe
focus has joined #nmigen
<_whitenotifier-3> [nmigen] Success. 82.29% (+0.1%) compared to 882fddf - https://codecov.io/gh/nmigen/nmigen/commit/97cc78a3db546f72a7fb971dce800ef1cfd060d4
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 82.19%) - https://codecov.io/gh/nmigen/nmigen/commit/97cc78a3db546f72a7fb971dce800ef1cfd060d4
<_whitenotifier-3> [nmigen] Success. 82.20% (+0.01%) compared to 882fddf - https://codecov.io/gh/nmigen/nmigen/commit/97cc78a3db546f72a7fb971dce800ef1cfd060d4
<_whitenotifier-3> [nmigen] Success. 100.00% of diff hit (target 82.19%) - https://codecov.io/gh/nmigen/nmigen/commit/97cc78a3db546f72a7fb971dce800ef1cfd060d4
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 1 commit to master [+0/-0/±2] https://git.io/JvZPi
<_whitenotifier-3> [nmigen/nmigen] whitequark a1c5863 - hdl.dsl: make referencing undefined FSM states an error.
<_whitenotifier-3> [nmigen] whitequark closed issue #315: FSM with transition to nonexistent state should not elaborate - https://git.io/JvY83
jfng has joined #nmigen
<jfng> I like as_signed(), and there are parts of minerva that could benefit from this feature
<jfng> e.g. an immediate interpreted as signed or unsigned depending on the insn opcode
<whitequark> ok, let's do that then
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.99% but relative coverage increased by +17.79% compared to 97cc78a - https://codecov.io/gh/nmigen/nmigen/commit/a1c58633e644fa5266ff1c042b560055f5753ad6
<_whitenotifier-3> [nmigen] Success. 100% of diff hit (target 82.2%) - https://codecov.io/gh/nmigen/nmigen/commit/a1c58633e644fa5266ff1c042b560055f5753ad6
focus has quit [Quit: Leaving]
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -1.08% but relative coverage increased by +17.79% compared to 97cc78a - https://codecov.io/gh/nmigen/nmigen/commit/a1c58633e644fa5266ff1c042b560055f5753ad6
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/JvZXV
<_whitenotifier-3> [nmigen/nmigen] whitequark 9301e31 - test_lib_fifo: define all referenced FSM states.
<_whitenotifier-3> [nmigen] adamgreig commented on issue #280: pysim2 doesn't write input signals to VCD - https://git.io/JvZXX
<awygle> whitequark: i also like .as_signed, and the interactive console seems nice but not tremendously useful without an interactive simulator/waveform viewer
<_whitenotifier-3> [nmigen] Success. 82.3% (+1.18%) compared to a1c5863 - https://codecov.io/gh/nmigen/nmigen/commit/9301e31b69a7c37c42f33e6cba5f3f37bc97402f
<_whitenotifier-3> [nmigen] Success. Coverage not affected when comparing a1c5863...9301e31 - https://codecov.io/gh/nmigen/nmigen/commit/9301e31b69a7c37c42f33e6cba5f3f37bc97402f
<_whitenotifier-3> [nmigen] Success. 82.21% (+1.09%) compared to a1c5863 - https://codecov.io/gh/nmigen/nmigen/commit/9301e31b69a7c37c42f33e6cba5f3f37bc97402f
<whitequark> awygle: the idea is that the console would be an interface to the simulator
<whitequark> but... yeah, an interactive waveform viewer is difficult
<awygle> yes
<awygle> i want to be able to adjust pipeline delays in real-time to line signals up with each other, things like that
<whitequark> right, ok, that's much more ambitious
<awygle> indeed
<whitequark> still worth thinking about... some day
<awygle> so i am broadly in favor of the console thing, but would likely not use it much and primarily see it as a step to future things.
<awygle> although as i'm thinking about it i did have that "how do i see the value of this Const expression" problem the other night so... maybe i'm underestimating its usefulness
<whitequark> yes, that's what prompted it; though you're not the first
<whitequark> awygle: btw for something completely different, do you think you could look at https://github.com/nmigen/nmigen/issues/181 ?
<awygle> whitequark: i'm _deeply_ swamped right now but i can take a look this evening (in about 9-10 hours)
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 1 commit to master [+0/-0/±5] https://git.io/JvZ1O
<_whitenotifier-3> [nmigen/nmigen] whitequark 27b47fa - hdl.ast: add Value.{as_signed,as_unsigned}.
<_whitenotifier-3> [nmigen] whitequark closed issue #292: There's no explicit way to convert between signed <-> unsigned values - https://git.io/JvZ13
<whitequark> awygle: no rush, if you get around to it within a month I'll be happy :)
<awygle> copy :) thanks for resolving the invalid FSM state thing!
<awygle> any chance you can look at the "inputs don't show up in gtkwave" thing? :)
<whitequark> already fixed
<whitequark> it was a 2 line patch...
<whitequark> not sure why it took so long, really
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.38% but relative coverage increased by +1.11% compared to 9301e31 - https://codecov.io/gh/nmigen/nmigen/commit/27b47faf169908e6e5acdc4588b4caf58582e69d
<_whitenotifier-3> [nmigen] Success. 83.33% of diff hit (target 82.21%) - https://codecov.io/gh/nmigen/nmigen/commit/27b47faf169908e6e5acdc4588b4caf58582e69d
<awygle> oh, awesome, i'll update
<_whitenotifier-3> [nmigen] Success. Absolute coverage decreased by -0.02% but relative coverage increased by +1.11% compared to 9301e31 - https://codecov.io/gh/nmigen/nmigen/commit/27b47faf169908e6e5acdc4588b4caf58582e69d
<awygle> you da best
<whitequark> :D
<_whitenotifier-3> [nmigen] whitequark commented on issue #310: hdl.ast.Value.word_select() works incorrectly on actual platform (ECP5 Versa) - https://git.io/JvZM4
<_whitenotifier-3> [nmigen] whitequark closed issue #310: hdl.ast.Value.word_select() works incorrectly on actual platform (ECP5 Versa) - https://git.io/JvZMB
<_whitenotifier-3> [nmigen] Failure. 82.18% (+-0.03%) compared to 9301e31 - https://codecov.io/gh/nmigen/nmigen/commit/27b47faf169908e6e5acdc4588b4caf58582e69d
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark pushed 1 commit to master [+1/-0/±0] https://git.io/JvZy2
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark 81fcae4 - Initial commit.
<_whitenotifier-3> [nmigen.github.io] Success. GitHub Pages successfully built your site. - https://nmigen.github.io
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark created branch gh-pages https://git.io/JvZya
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark deleted branch master
<_whitenotifier-3> [nmigen.github.io] whitequark deleted branch master - https://git.io/JvZyV
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark created branch master https://git.io/JvZya
<_whitenotifier-3> [nmigen.github.io] Success. GitHub Pages successfully built your site. - https://nmigen.github.io
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark pushed 1 commit to master [+1/-0/±0] https://git.io/JvZyr
<_whitenotifier-3> [nmigen/nmigen.github.io] whitequark ed09273 - Create CNAME
<_whitenotifier-3> [nmigen.github.io] Success. GitHub Pages successfully built your site. - http://nmigen.info
<Sarayan> ERROR: Assert `false' failed in backends/cxxrtl/cxxrtl.cc:865.
<Sarayan> weeee
<whitequark> unsupported cell
<whitequark> did you add a memory perhaps?
<whitequark> wait
<whitequark> unsupported external cell
<Sarayan> Not yet, I just wrapped the k053252 in another module
<whitequark> oh yeah, you have to run flatten
<whitequark> limitation of the cxxrtl backend
<Sarayan> and how do I do that?
<Sarayan> current code is online
<Sarayan> also... ram doesn't work in cxxrtl?
<Sarayan> because I was going to add some in the evening
<whitequark> it does
<whitequark> you just have to run memory_collect
<whitequark> ok, so after `proc` in overdrive.py, add `flatten`
<Sarayan> back
<Sarayan> adding flatten works, perfect
<Sarayan> rom is still mempry you just don't write to?
<whitequark> yes
<Sarayan> ok. Surprising, I'd have thought having it convertible to LUTs could have been an optimization
<whitequark> yosys will convert it to LUT if it makes sense
<whitequark> or to BRAM
<Sarayan> oh, it'll notice you never write to it then?
<whitequark> yes
<Sarayan> ok then :-)
<Sarayan> when should I add the memory_collect once I've added the memory?
<whitequark> after flatten
<Sarayan> thanks
adamgreig has joined #nmigen
<_whitenotifier-3> [nmigen/nmigen-boards] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/JvZ7n
<_whitenotifier-3> [nmigen/nmigen-boards] whitequark f37fe02 - versa_ecp5: fix switch{4..7} IO_TYPE.
ktemkin has joined #nmigen
<awygle> whitequark: what's the intended separation between nmigen/lib, nmigen-soc, and nmigen-io?
<whitequark> nmigen/lib is stuff that's of overwhelmingly general usefulness (like CDC) and which also varies from vendor to vendor (like... well... CDC)
<whitequark> nmigen-stdio is implementations of standard IO like UART or SPI where the FPGA-side interface is just signals/fifos/etc
<whitequark> nmigen-soc is the plumbing for memory/io buses that SoCs are full of
<whitequark> it's not strictly speaking limited to SoCs in the sense of "something with a CPU core"
<whitequark> it's more like, "here are all the parts you can construct a SoC from, and also other things"
<whitequark> specifically out of scope for nmigen-soc is all the junk that you need to build a toolchain, a BIOS, etc
<whitequark> which was in scope for misoc/litex
<whitequark> there are far too many approaches for that (Windows? Rust or C? which architectures? LLVM/Clang or GCC? Nix or Makefiles? etc etc) and it's a bikeshed I'm *super* uninterested in
<ktemkin> which is good, since these things only generally wind up being maintainable (and thus maintained) if they're focused rather than trying to provide Everything Related (TM)
<whitequark> yeah; I imagine _florent_ will port LiteX to nMigen at some point and then that'll provide all the toolchain stuff. I'm totally happy with that.
<whitequark> and I'm sure there will be other approaches too and I'm happy with that too.
<whitequark> I'll just make sure they can use the same plumbing with no issues.
<whitequark> ZirconiumX: does quartus warning suppression actually work for you? it doesn't for my copy of it...
<whitequark> 18.1.0
<ZirconiumX> Yeeaah, it seems rather finicky.
<awygle> whitequark: seems like you'd run into overlap between nmigen-stdio and nmigen-soc, since you'll want to be able to configure your cores for UART or SPI, no?
<ZirconiumX> I think the idea here is that you can have a UART segment agnostic to the SoC bus, awygle
<jfng> you could have wrappers in nmigen-soc for cores in nmigen-stdio
<jfng> for example, an AsyncSerialPeripheral in nmigen-soc, that provides a CSR interface to control an AsyncSerial core in nmigen-stdio
<awygle> mm. so drag everything that'd come from a register, like e.g. baud rate, out to a port of the nmigen-stdio module?
<jfng> yes, and RX/TX data, strobes, etc. and maybe FIFOs in both directions
<awygle> I see
<jfng> but then, if a peripheral also has a memory interface, like say, a DRAM controller, it would not be bus-agnostic
<jfng> so maybe these wrappers should not be in nmigen-soc
<whitequark> this is all correct yeah
<whitequark> it's not entirely clear yet what to do with a DRAM controller
<whitequark> i figure we'll just decide once we get there
<awygle> so just to list some stuff ZirconiumX and i have coming down the pipe (all or none of which may end up being written in nmigen and/or upstreamed): UART - nmigen-stdio UTMI/ULPI - nmigen-stdio. SPI-mode SD card - nmigen-stdio (probably in two parts). DDR2 - nmigen-soc maybe? unclear. I2C - nmigen-stdio. yes?
<whitequark> yup
<awygle> what about like, a hypothetical controller for a specific I2C peripheral? is that kind of thing in scope?
<whitequark> hmm
<whitequark> unless it's something so common as to be "industry standard" then no
<awygle> mk
<awygle> so SPI-mode SD card, yes. weird I2C RTC thing, no.
<whitequark> like, pcf8574 would count
<whitequark> but weird I2C RTC thing, no.
<awygle> copy
<whitequark> btw, there is one important blocker for populating more stuff in nmigen-stdio
<whitequark> a stream interface needs to be added to nmigen.lib
<whitequark> there's been some progress towards that (private communication with key2 i think) but it's a topic worthy of a wider discussion
<awygle> can you elaborate on "stream interface"? i think i basically understand what you mean but want to make sure
<whitequark> it should be definitely based on AXI4-Stream, and the payload should definitely be an nMigen Record or something similar
<whitequark> and there should be an easy way to insert a FIFO anywhere, and in general connect things together in a flow graph style
<whitequark> that last one is the main stumbling block, actually
<whitequark> Record.connect (which implements the Migen interface with minimal changes) is pretty footgunny
<whitequark> AFAICT it was an ad-hoc generalization of the way MiSoC implemented CSRs
<whitequark> except it's not really very... general
<whitequark> you can use it to connect Wishbone interfaces 1:1, but the way the API is shaped lets you connect Wishbone interfaces 1:n too
<whitequark> and that doesn't actually work unless your peripherals implement a very specific kind of Wishbone subset (one where dout is always 0 when the peripheral is not addressed,)
<whitequark> another issue is that you can use DIR_FANIN to do "wired-OR" for flags you might have around, but you can't do any other function
<_whitenotifier-3> [nmigen/nmigen] whitequark pushed 2 commits to master [+0/-0/±10] https://git.io/JvZFl
<_whitenotifier-3> [nmigen/nmigen] whitequark 5888f29 - xilinx_{7series,ultrascale}: run `report_methodology`.
<_whitenotifier-3> [nmigen/nmigen] whitequark 3e2ecdf - build.res,vendor: place clock constraint on port, not net, if possible.
<_whitenotifier-3> [nmigen] whitequark closed issue #301: vendor.xilinx_7series: Vivado TIMING-2 Warning - https://git.io/JvZF8
<_whitenotifier-3> [nmigen] whitequark commented on issue #301: vendor.xilinx_7series: Vivado TIMING-2 Warning - https://git.io/JvZFB
<awygle> hm, all right, i'll add "read up on axi4-stream" to my todo list lol
<_whitenotifier-3> [nmigen] Success. 82.3% (+0.11%) compared to 27b47fa - https://codecov.io/gh/nmigen/nmigen/commit/3e2ecdf2fb49d7339ac6f812521c290513dc8a10
<_whitenotifier-3> [nmigen] Failure. 81.81% of diff hit (target 82.18%) - https://codecov.io/gh/nmigen/nmigen/commit/3e2ecdf2fb49d7339ac6f812521c290513dc8a10
<_whitenotifier-3> [nmigen] Failure. 82.18% (+-0.01%) compared to 27b47fa - https://codecov.io/gh/nmigen/nmigen/commit/3e2ecdf2fb49d7339ac6f812521c290513dc8a10
<awygle> Do you have a specific affection for axi4-stream over Avalon-st or the pipelined modes of WB4?
<whitequark> WB is... let's say, not very good in general
<whitequark> I consider it a legacy bus and while it has first class support, that's mostly because it's historically popular in OSHW
<whitequark> I haven't investigated Avalon-ST in detail but it seems virtually identical to AXI4-Stream
<whitequark> the idea is to not have AXI4-Stream put in nmigen.lib *verbatim*, but rather have a very similar stream interface that can have near-zero-cost adapters to specific buses
<awygle> sure, ok
<whitequark> in practice I suspect it'll be something like "can be bridged to either axi4-stream or avalon-st, and to that end, handles edge cases in a way restricted enough to be compatible with both"
<whitequark> it'll be necessary to look closely at everything we want to interface with first, maybe that wouldn't work out, but you see the general direction
<awygle> the only major issue with WB i'm really aware of is that it's underspecified, so "wishbone-compatible" doesn't mean much
<awygle> but i can't say i've investigated deeply
<whitequark> that's the main one
<whitequark> for example, I'm still not sure exactly how error and retry strobes are supposed to work
<awygle> in any case, this discussion would probably be better captured on an issue. would you like me to file one?
<whitequark> absolutely