whitequark changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings on Mondays at 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang
lf has quit [Ping timeout: 248 seconds]
lf has joined #amaranth-lang
<jfng[m]> <whitequark> "jfng: have you run the Minerva..." <- i just did, and it still passes
<_whitenotifier-9> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/d0a6a83225e5...eb95085f7a6f
<_whitenotifier-9> [YoWASP/nextpnr] whitequark eb95085 - Update dependencies.
bl0x_ has joined #amaranth-lang
bl0x has quit [Ping timeout: 268 seconds]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 255 seconds]
Degi_ is now known as Degi
smkz has quit [Quit: smkz]
smkz has joined #amaranth-lang
<josuah> something interesting with a standard library: once address mapping are generated, the firmware driving might not need to change much in any language
<josuah> so if one use an amaranth FPGA CPU core and a small firmware for "business logic", it can go kind of fast to get some kind of tiny "SDK" or "HAL" going
<josuah> only the application-specific cores need some binding then
<byteit101> hmm... my FSM isn't resetting, how do I configure that?
<byteit101> Wait, it's resetting in sims, but not on-target
<jn> on which target platform?
<byteit101> artix-7 (xilinx)
<byteit101> basys 3 board
<byteit101> All of my verilog glue logic Is resetting, but none of the amaranth logic is resetting
<byteit101> If I'm not doing anything fancy I don't need to add a resetinserter or anything like that? Just wire up .rst(reset) ?
Dm30 has joined #amaranth-lang
<d1b2> <marble> Is there a way in amaranth to get a list of all available pads of a platform with a specific device and package? like LatticeECP5Platform with LFE5U-25F in a BG256
<d1b2> <marble> i would like to write a generic pin scan
<byteit101> I simplified it down to a simple state machine, and it also fails to reset. Bug?
<byteit101> Oh! are amaranth resets synchronous or async?
<vup> @marble do you want to iterate over the pads used in a platform definition or do you want to know about all pads of the device? The latter information is not know to amaranth currently. There was some discussion about using similar information to perform validation checks of platform definitions, but no conclusion / concrete design was reached: https://github.com/amaranth-lang/amaranth-boards/issues/128
<vup> byteit101: your choice, when creating a `ClockDomain` you can use `async_reset=True` to create a clockdomain with a async reset. By default this option is false. This also applies to the default `sync` domain that is created if you do not create it yourself.
<byteit101> How do I use ClockDomain? my source dosn't have that right now
<vup> you can add a clock domain using `m.domains += ClockDomain("domain_name")`, which can then be used using `m.d.domain_name += stmts`
<byteit101> so at the top level I can just say "sync" and all the children domains are now async?
<vup> what do you mean by children domains?
<byteit101> *Children modules
<byteit101> *submodules
<vup> right
<vup> by default clock domains are global in amaranth. This means you can add a `ClockDomain` anywhere in the design hierarchy and any (sub)module using a clock domain with the same name will use this `ClockDomain`
<vup> optionally you can make a `ClockDomain` local (`local=True`), which will cause it to only propagate downwards in the design hierarchy
<vup> Finally the `ClockDomain` used by a module instance can be changed using `DomainRenamer` (this way in a multi clock design you can write all your modules using the `sync` domain and then use `DomainRenamer` when adding them as a submodule to make them use the "correct" `ClockDomain`)
<byteit101> Ah, handy! It would be great if this was documented somewhere
<Sarayan> documentation is worked on but bottlenecked :-)
<vup> Yeah, the documentation is WIP. FWIW the tests, examples are pretty useful aswell as the documentation of the source code.
<vup> Take for instance this async reset example: https://github.com/amaranth-lang/amaranth/blob/main/examples/basic/arst.py :)
<Sarayan> clock domains can propagate up?
<vup> Sarayan: yes
<Sarayan> hmmmm
<vup> unless you do `local=True`
<Sarayan> not a choice I'm happy with for a default
<Sarayan> I hate spooky actions at a distance
<vup> yeah, I agree. In general im am not fully convinced even the late binding mechanism for the clock and reset domains is that useful. For my code I prefer clock domains to be eagerly bound and only propagated downwards.
<Sarayan> that would be my natural inclination too
<d1b2> <marble> The latter. So all device pins. I'm currently looking at this pin scan implementation. https://github.com/q3k/chubby75/tree/master/5a-75b/pin-scan They have a csv with all the pins. Maybe I just copy that.
<vup> (fyi that csv is available on the lattice website)
<Sarayan> you can find equivalent csvs for any fpga model, afaict
<d1b2> <20goto10> Gosh I wish that was standard for microcontrollers Fed up with transcribing from PDFs
<whitequark> vup: it'd seriously limit how you can assemble designs if you did not have late binding
peepsalot has quit [Ping timeout: 248 seconds]
<vup> whitequark: Do you have an example where you would be bothered by this limitation?
<whitequark> ResetInserter?
<whitequark> eagerly binding domains means you have to pass domains top-down into every submodule at the site of use
<whitequark> control inserters exist so that you don't have to do exactly that
<whitequark> I agree that local=True should have been the default from the beginning, though that will take a significant amount of work to rectify
nak has joined #amaranth-lang
<byteit101> can I save only some signals in the vcd?
peepsalot has joined #amaranth-lang
feldim2425 has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
feldim2425 has joined #amaranth-lang
<cr1901> whitequark: Are you still looking for a register diagram generator? Have you excluded any yet?
<whitequark> wavedrom's probably fine
<cr1901> sphinx-wavedrom doesn't work on Windoze, just FYI: https://github.com/bavovanachte/sphinx-wavedrom/issues/36
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark pushed 1 commit to main [+0/-0/±2] https://github.com/YoWASP/yowasp.github.io/compare/8b50bbe0123a...78849a84cef7
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark 78849a8 - Explain how full automation works.
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/YoWASP/yowasp.github.io/compare/78849a84cef7...a6bd10fb3551
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark a6bd10f - Update link to YosysHQ toolchain.
<whitequark> cr1901: that seems like a straightforward fix to cairocffi
<whitequark> actually, hm, I don't see why this needs fixing?
<whitequark> it's already an optional dep
<whitequark> yeah, I just checked, in a fresh virtualenv on my Linux machine it doesn't install xcffib
<whitequark> and I don't see why it should; it's not actually a dependency of anything I see
<cr1901> Ahhh hmmm... well then I guess something was weird w/ my env
<cr1901> this isn't the same Windoze installed- hard drive died a month after I commented
<cr1901> I'll try again
<whitequark> oh I see what's going on
<whitequark> if you install cairosvg, it doesn't install xcffib
<byteit101> Can I set the top module name to something other than "top"? currently I have to rename one of my two generated modules in verilog
<whitequark> but installing sphinxcontrib-wavedrom does
<byteit101> (from verilog.generate(...)
<whitequark> byteit101: yeah, it's an option to `convert`
<byteit101> even just dull api docs, a-la javadoc would be handy :-)
<cr1901> yea that was the string I was looking for lol
<whitequark> which is probably just wrong?
<whitequark> sphinxcontrib-wavedrom directly depends on xcffib
<whitequark> try removing it and seeing if that works
* cr1901 is testing... one sec
<cr1901> whitequark: That worked :D. And html is generated
<whitequark> okay, I think you can submit a PR to sphinxcontrib-wavedrom then, removing that line?
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark pushed 1 commit to main [+0/-0/±2] https://github.com/YoWASP/yowasp.github.io/compare/a6bd10fb3551...98769345b992
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark 9876934 - Add FOSSi Foundation affiliation.
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/YoWASP/yowasp.github.io/compare/98769345b992...2e1a51e999e4
<_whitenotifier-9> [YoWASP/yowasp.github.io] whitequark 2e1a51e - Wasmtime supports AArch64 macOS for a while.
peeps[zen] has joined #amaranth-lang
peepsalot has quit [Ping timeout: 252 seconds]