whitequark changed the topic of #amaranth-lang to: Amaranth hardware definition language · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang
Wolfvak has joined #amaranth-lang
Wolfvak has quit [Changing host]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 250 seconds]
Degi_ is now known as Degi
whitequark has quit [*.net *.split]
jevinskie[m] has quit [*.net *.split]
esden has quit [*.net *.split]
tcal has quit [*.net *.split]
tcal has joined #amaranth-lang
esden has joined #amaranth-lang
whitequark has joined #amaranth-lang
jevinskie[m] has joined #amaranth-lang
peepsalot has quit [Quit: Connection reset by peep]
peepsalot has joined #amaranth-lang
indy has quit [Ping timeout: 264 seconds]
indy has joined #amaranth-lang
indy has quit [Ping timeout: 252 seconds]
Dm30 has joined #amaranth-lang
indy has joined #amaranth-lang
Dm30 has quit [Ping timeout: 248 seconds]
chaoticryptidz has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
chaoticryptidz has joined #amaranth-lang
chaoticryptidz has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
chaoticryptidz has joined #amaranth-lang
<sensille> hm. now my design build again, but fails timing. not sure if it's because of the move from nmigen to amaranth or because i also updated the rest of the toolchain too :-/
indy has quit [Quit: ZNC 1.8.2 - https://znc.in]
indy has joined #amaranth-lang
indy has quit [Ping timeout: 252 seconds]
<whitequark> it's probably not because of the former
indy has joined #amaranth-lang
<robtaylor> hmm, installed with [builtin-yosys], but when i `python3 -m amaranth_boards.ecpix5`, i'm getting `Could not find required tool nextpnr-ecp5 in PATH` - is that expected?
<whitequark> yeah. builtin-yosys is only for the Verilog backend
<robtaylor> ahhh
<robtaylor> how tricky would it be to include the various backend tools? is it a big job, or something i could hack together?
<whitequark> https://yowasp.org
<robtaylor> Catherine: how do i get amaranth-boards to use it?
<adamgreig[m]> Set environment variables like YOSYS=yowasp-yosys NEXTPNR_ECP5=yowasp-nextpnr-ecp5 ECPPACK=yowasp-ecppack
<robtaylor> ah
<adamgreig[m]> Amaranth checks env vars for each tool name
<robtaylor> any reason it's not using those as default when installed [builtin-yosys] ?
<adamgreig[m]> builtin-yosys is basically unrelated to the yowasp tools except that both are clever webasm stuff, it's a minimal yosys just for making verilog, doesn't imply any ecp5 or nextpnr support
<adamgreig[m]> (well I mean both are whitequark, too, so not exactly unrelated...)
<robtaylor> ah, so it'd make sense to have a [builtin-yowasp] for amaranth-boards?
<whitequark> it's not in any way related to amaranth-boards either
<robtaylor> next issue `$ python3 -m amaranth_boards.ecpix5
<robtaylor> ERROR: Module `\SGSR' referenced in module `\cd_sync' in cell `\U$$2' is not part of the design.`
<adamgreig[m]> I guess you could imagine amaranth falling back to checking for yowasp versions of tools if the standard name can't be found, but it doesn't atm (https://github.com/amaranth-lang/amaranth/blob/main/amaranth/_toolchain/__init__.py#L24)
<whitequark> I do not want to introduce yowasp as a preferred toolchain in any way
<whitequark> it's not Amaranth's business how the toolchain is installed
<whitequark> the builtin-yosys thing exists because you should not have to build the FOSS toolchain from source just to use Vivado
<robtaylor> nod understood
<adamgreig[m]> yea, having the env var override thing works perfectly for me
<adamgreig[m]> i guess it would be neat to have some way to make it easier to use the yowasp toolchain once it's installed, maybe a wrapper or something that sets the env vars
<adamgreig[m]> probably that's already there and i just haven't looked, heh
<whitequark> it does
<whitequark> you can write a shell script exporting the env vars and set the AMARANTH_ENV_Trellis environment variable to that shell script
<whitequark> the same as for Vivado, Quartus, etc
<whitequark> should add that to the docs but the section where it'd live does not exist
<whitequark> oh, right
<adamgreig[m]> > <@rob_chipflow:matrix.org> next issue `$ python3 -m amaranth_boards.ecpix5
<adamgreig[m]> > ERROR: Module `\SGSR' referenced in module `\cd_sync' in cell `\U$$2' is not part of the design.`
<adamgreig[m]> dunno what's going on with this, though. amaranth instantiates SGSR for you as part of the ecp5 platform support if you don't specify your own sync clock domain, but it's a standard cell that should be found.... are you specifying YOSYS=yowasp-yosys or still using the builtin-yosys?
<whitequark> i think that shouldn't matter either way
<robtaylor> using builtin-yosys
<robtaylor> mm, but its amaranth latest release rather than head, could it be a clash between yosys versions?
<d1b2> <dragonmux> builtin-yosys does not contain any of the techmap files needed to target ECP5, you must use either yowasp-yosys or another source of yosys
<d1b2> <dragonmux> wq meant what she said about it only being usable for Verilog output, no more
<whitequark> yeah but how are you using builtin-yosys for synthesis?
<whitequark> (I mean, you could technically if you really put in effort, but)
<robtaylor> oh, i don't know if i am, all i know is i installed with [builtin-yosys]
<whitequark> then you aren't
<whitequark> and in any case having YOSYS= takes priority iirc
<robtaylor> hmm, why didn't i get an error from a missing yosys install then? o_o
<adamgreig[m]> but if you don't have YOSYS=, and run synthesis, won't amaranth use builtin-yosys to try and synthesise?
<whitequark> adamgreig[m]: no
<whitequark> there is no logic for that because it will never work
<adamgreig[m]> if you do install yowasp-yosys and put YOSYS=yowasp-yosys, do you get the same error?
<adamgreig[m]> hah, fair enough
<whitequark> Rob Taylor: are you setting YOSYS=yowasp-yosys?
<robtaylor> ahhhh. I did have a yosys installed, but not yowasp
<robtaylor> * not yowasp-yosys
<adamgreig[m]> whitequark: aah, I forgot that for synth it's a shell script that has a yosys to run in it, which obviously can't ever be the builtin-yosys
<whitequark> yeah
<adamgreig[m]> but must be some yosys so maybe it is running some weird or old yosys binary you have installed?
<robtaylor> mismatched yosys then, i guess!
<whitequark> adamgreig[m]: yes
<robtaylor> YOSYS=yowasp-yosysseems to be working with
<robtaylor> * seems to be working with YOSYS=yowasp-yosys
<robtaylor> whitequark: yep, that was it
<whitequark> yeah, you need matching yosys/nextpnr too, so if you use one from yowasp, you need to use the other too
<robtaylor> i'm assuming i'll need openFPGALoader installed normally (not in yowasp)?
<adamgreig[m]> it's not in yowasp
<whitequark> yeah. there is the YosysHQ fpga-toolchain build that includes programming tools too
<whitequark> yowasp intentionally excludes those
<robtaylor> nod
<adamgreig[m]> could you even run libusb etc in wasm?
<tpw_rules> there is WebUSB...
<whitequark> i looked into it
<whitequark> no, WebUSB is unrelated
<adamgreig[m]> I'm not surprised :P just realised asking you if you "could" do x in y is probably the wrong question
<whitequark> wasmtime (the engine used in yowasp) doesn't include any web APIs
<robtaylor> whitequark: i guess that's been superseded by oss-cad-suite-build ?
<tpw_rules> well it is precedent
<whitequark> yes
<whitequark> webusb is actually harder to use than adding libusb support through wasmtime
<whitequark> i could port openocd to wasmtime fairly easily but it would require a system or python-shipped libusb
<whitequark> porting openocd to webusb is considerably harder
<whitequark> though iirc someone did it
<adamgreig[m]> lot of interest in having libusb-based tools running in the browser I guess
<adamgreig[m]> be neat for web based fpga programming among a ton of other uses
<whitequark> it's doable, most of the pieces for running Amaranth and the toolchain entirely in the browser are there
<whitequark> the wavedrom guy has been very rude to me about it but i have a non-published build of yosys and nextpnr targeting actual web apis
<robtaylor> funky!
<robtaylor> Catherine: i've submitted the patches for yosys-builtin on macs (tested on a M2 with latest osx)
<tpw_rules> robtaylor: do you expect people to be able to run the chipflow mask layout steps locally too?
<whitequark> where?
<_whitenotifier-7> [amaranth-yosys] robtaylor opened pull request #5: Fixes for [builtin-yosys] on Mac M2, latest OSX - https://github.com/amaranth-lang/amaranth-yosys/pull/5
<robtaylor> Catherine: there =) . I also needed a small patch to yosys -https://github.com/YosysHQ/yosys/pull/3513
<robtaylor> I'll have a play with yowasp as well
<whitequark> Rob Taylor: hm, why?
<whitequark> why are you building builtin-yosys yourself, that is?
<robtaylor> Catherine: oh, cos didn't work on a mac m2..
<whitequark> why were you running build.sh in first place rather than installing it from pip?
<robtaylor> ^
<robtaylor> good point, may work now wasm is updated
<_whitenotifier-7> [amaranth-yosys] whitequark commented on pull request #5: Fixes for [builtin-yosys] on Mac M2, latest OSX - https://github.com/amaranth-lang/amaranth-yosys/pull/5#issuecomment-1281568876
<_whitenotifier-7> [amaranth-yosys] whitequark closed pull request #5: Fixes for [builtin-yosys] on Mac M2, latest OSX - https://github.com/amaranth-lang/amaranth-yosys/pull/5
<whitequark> I would prefer if you filed an issue stating what is not working, rather than submitting a fix without a description of what is being fixed
<robtaylor> ok, no worries
<_whitenotifier-7> [amaranth-yosys] robtaylor opened issue #6: amaranth-yosys doesn't build on MacOS - https://github.com/amaranth-lang/amaranth-yosys/issues/6
<_whitenotifier-7> [amaranth-yosys] whitequark commented on issue #6: amaranth-yosys doesn't build on MacOS - https://github.com/amaranth-lang/amaranth-yosys/issues/6#issuecomment-1281578379
<whitequark> okay, so the actual issue you're hitting is the overly strict wasmtime dependency
<whitequark> it's not really important for amaranth-yosys to build on macOS, or on Windows, or on any number of BSD systems because it's a wasm build
<whitequark> the version uploaded to PyPI should be sufficient for everyone, and if it's not, it's a bug
<whitequark> (everyone who can run wasmtime, anyway)
<_whitenotifier-7> [amaranth-yosys] robtaylor opened pull request #7: Fixes for building yosys on M1 and M2 Macs - https://github.com/amaranth-lang/amaranth-yosys/pull/7
<robtaylor> Catherine: sure, but no harm in supporting building on mac for those working on support.
<robtaylor> but yes, its probably worth just switching to wasmtime 1.0 now
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/amaranth-lang/amaranth-yosys/compare/85067f312884...af2958d6ac76
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark af2958d - Require wasmtime>=0.30,<2.0.
<whitequark> robtaylor: there is harm: now I have to ensure that any change to the build process still works on macOS
<whitequark> that's not something I want to think bout
<whitequark> s/bout/about/
<_whitenotifier-7> [amaranth-yosys] whitequark commented on issue #6: amaranth-yosys doesn't build on MacOS - https://github.com/amaranth-lang/amaranth-yosys/issues/6#issuecomment-1281582803
<robtaylor> whitequark: well, we can do that. OSX builders are supported on gitub
<robtaylor> and i think there are even M1/M2 builders now
<whitequark> there aren't
<robtaylor> ?
<whitequark> M1/M2 builders
<robtaylor> yep, there are
<whitequark> hm
<robtaylor> you need to manually add them
<robtaylor> though I don't know if its restricted to paying organisations
<whitequark> I'm following that issue since forever
<whitequark> robtaylor: and I'm as uninterested in supporting that as I'm uninterested in supporting Windows
<whitequark> it's unnecessary complexity
<whitequark> just because someone might want to run a build script on macOS
<robtaylor> would be worth having testing that macos works somewhere.. I'm more thinking I'm happy to pick up osx & m1/m2 support
<whitequark> there is nothing in the amaranth-yosys package that depends on the OS
<whitequark> which is the entire point of it
<whitequark> if I have to support it on multiple OSes I would rather deprecate it entirely since it's not fulfilling its purpose
<robtaylor> thats fair enough
<robtaylor> more important to have yowasp working
<whitequark> all of the OS-specific support is in wasmtime
<whitequark> it is the same for yowasp
<whitequark> I developed both of these packages because I wanted someone else, and not me, to deal with the operating system specific parts
<_whitenotifier-7> [amaranth-yosys] whitequark commented on pull request #7: Fixes for building yosys on M1 and M2 Macs - https://github.com/amaranth-lang/amaranth-yosys/pull/7#issuecomment-1281587412
<_whitenotifier-7> [amaranth-yosys] whitequark closed pull request #7: Fixes for building yosys on M1 and M2 Macs - https://github.com/amaranth-lang/amaranth-yosys/pull/7
<whitequark> which is why I'm so sharply opposed to adding more operating system dependent paths to them
<whitequark> I am entirely fine to tell people that developing amaranth-yosys, or yowasp for that matter, cannot be done outside of Linux
<robtaylor> yeah, i guess that makes sense
<whitequark> using them is a different story
<robtaylor> what's useful to add in CI for testing the usecase?
<whitequark> GitHub does not provide Apple AArch64 runners to FOSS projects
<whitequark> in any case I'm not particularly concerned about testing it in CI. Apple isn't going to release a new architecture every few months
<whitequark> I'll need to relax the wasmtime dependency for amaranth-yosys once, and once more for yowasp itself, which has the same problem
<robtaylor> yep
<whitequark> and that's it
<robtaylor> just about to submit patches for yowasp ;)
<whitequark> please don't
<whitequark> it's going to be more work for me than just doing it myself
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark pushed 1 commit to release [+0/-0/±1] https://github.com/amaranth-lang/amaranth-yosys/compare/85067f312884...af2958d6ac76
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark af2958d - Require wasmtime>=0.30,<2.0.
<whitequark> Rob Taylor: I've pushed an update to amaranth-yosys
<whitequark> in a few minutes you'll be able to install a version that's compatible with M1
<robtaylor> nice!
<whitequark> also, I was quite rude to you, and that was uncalled for; I'm sorry
<robtaylor> oh, thank you, that is appreciated
<robtaylor> just figuring this out =)
<whitequark> I should make it clear that I strongly prefer issues being filed over going straight to patches
<robtaylor> i expect I'll get a lot more wrong in future.
<robtaylor> I could do a README?
<whitequark> an issue allows the maintainers to discuss what is being solved and the appropriate approach to doing so, and provide the context new contributors do not have
<robtaylor> that makes a lot of sense with the underlying complexity here
<whitequark> I'll update the README in a sec
<tpw_rules> there's also a lot of projects that are emphatically the opposite
<whitequark> tpw_rules: yes, which is why it is fair for Rob Taylor to have an assumption that patches are preferred
<whitequark> this is something I need to state in a CONTRIBUTING.md file or the like
<robtaylor> I've used a PR checklist for things like that before
<whitequark> oh, that's a good idea
<whitequark> thank you
<robtaylor> whitequark: I am an inveterate drive-by patcher..
<robtaylor> robtaylor: not always the best habit ><
<whitequark> unless the patch is truly trivial I either consult the project documentation or ask around
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/amaranth-lang/amaranth-yosys/compare/af2958d6ac76...5e514bda2806
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark 5e514bd - README: add a note on build and development platforms.
<whitequark> I've updated the README
<robtaylor> the risk is more when you end up accidentally a maintainer of something like dbus... 😅
<robtaylor> that probably closes #4 as well
<whitequark> no, they're using the right Ubuntu version
<tpw_rules> should it be worded in a less open manner? "To reduce maintenance overhead, the only development environment we will support for this repository is x86_64 Linux."
<_whitenotifier-7> [amaranth-yosys] whitequark commented on issue #4: yosys-src compiling error - https://github.com/amaranth-lang/amaranth-yosys/issues/4#issuecomment-1281612526
<_whitenotifier-7> [amaranth-yosys] whitequark closed issue #4: yosys-src compiling error - https://github.com/amaranth-lang/amaranth-yosys/issues/4
<whitequark> tpw_rules: thanks
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/amaranth-lang/amaranth-yosys/compare/5e514bda2806...c14135d3157a
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark c14135d - [skip ci] README: clarify.
<whitequark> I should add this to yowasp READMEs as well
<_whitenotifier-7> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/0316b3024e85...32bb4208bd8e
<_whitenotifier-7> [YoWASP/yosys] whitequark 32bb420 - Require wasmtime>=0.30,<2.0.
<_whitenotifier-7> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/32bb4208bd8e...11a2b9302df2
<_whitenotifier-7> [YoWASP/yosys] whitequark 11a2b93 - [skip ci] README: add a note on build and development platforms.
<robtaylor> Catherine: i can confirm amaranth_yosys-0.10.0.dev47 is working on M2
<_whitenotifier-7> [YoWASP/nextpnr] whitequark pushed 2 commits to develop [+0/-0/±5] https://github.com/YoWASP/nextpnr/compare/c11b3fa145b1...0a933dc02a57
<_whitenotifier-7> [YoWASP/nextpnr] whitequark fefe14b - [skip ci] README: add a note on build and development platforms.
<whitequark> thank you
<_whitenotifier-7> [YoWASP/nextpnr] whitequark 0a933dc - Require wasmtime>=0.30,<2.0.
<whitequark> yowasp builds will be ready in a hour or two
<robtaylor> just noticed some issues highlighted in CI. I could take a look at those if useful?
<whitequark> thanks Rob Taylor and tpw_rules for the discussion, this has been very productive and will hopefully avoid further confusion
<whitequark> robtaylor: which ones?
<_whitenotifier-7> [amaranth-yosys] whitequark commented on issue #6: amaranth-yosys doesn't build on MacOS - https://github.com/amaranth-lang/amaranth-yosys/issues/6#issuecomment-1281616380
<_whitenotifier-7> [amaranth-yosys] whitequark closed issue #6: amaranth-yosys doesn't build on MacOS - https://github.com/amaranth-lang/amaranth-yosys/issues/6
<robtaylor> deprecated actions
<whitequark> oh yeah, that would be quite welcome
<robtaylor> cool. I'll take a look
<robtaylor> <whitequark> "thanks Rob Taylor and tpw_rules..." <- thank you Catherine
<robtaylor> ok, i'll leave that building and go get some sleep.. night all!
<robtaylor> Catherine: is it ok if i try uploading to TestPyPi to test the fixes for upload_wheels?
lf has quit [Ping timeout: 260 seconds]
lf has joined #amaranth-lang
<whitequark> Rob Taylor: I think you won't have the permissions for it
<_whitenotifier-7> [amaranth-yosys] robtaylor opened issue #8: CI has warnings due to Github migration from Node 12 to Node 16 - https://github.com/amaranth-lang/amaranth-yosys/issues/8
<robtaylor> whitequark: I think if I set the secret for my testpypi account and make the branch name 'develop' in my repo, it might work.. but I think better i just submit with the fixes and not try that..
<whitequark> yeah but the names are already reserved on testpypi
<_whitenotifier-7> [amaranth-yosys] robtaylor opened issue #9: CI has warnings due to the sunsetting of the master branch of gh-action-pypi-publish - https://github.com/amaranth-lang/amaranth-yosys/issues/9
<robtaylor> whitequark: ah yeah
<_whitenotifier-7> [amaranth-yosys] robtaylor opened pull request #10: Robtaylor/ci actions node16 - https://github.com/amaranth-lang/amaranth-yosys/pull/10
<_whitenotifier-7> [amaranth-yosys] whitequark closed pull request #10: Robtaylor/ci actions node16 - https://github.com/amaranth-lang/amaranth-yosys/pull/10
<_whitenotifier-7> [amaranth-yosys] whitequark closed issue #8: CI has warnings due to Github migration from Node 12 to Node 16 - https://github.com/amaranth-lang/amaranth-yosys/issues/8
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/amaranth-lang/amaranth-yosys/compare/c14135d3157a...bcf4dd77d180
<_whitenotifier-7> [amaranth-lang/amaranth-yosys] robtaylor bcf4dd7 - Update CI action versions.
<_whitenotifier-7> [amaranth-yosys] whitequark closed issue #9: CI has warnings due to the sunsetting of the master branch of gh-action-pypi-publish - https://github.com/amaranth-lang/amaranth-yosys/issues/9
<_whitenotifier-7> [amaranth-yosys] whitequark commented on pull request #10: Robtaylor/ci actions node16 - https://github.com/amaranth-lang/amaranth-yosys/pull/10#issuecomment-1281638960
<robtaylor> _whitenotifier-7: thank you Catherine !