whitequark[cis] changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings: Amaranth each Mon 1700 UTC, Amaranth SoC each Fri 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
<zyp[m]> <whitequark[cis]> "we could actually have things..." <- fixed point numbers are an obvious case of that
<whitequark[cis]> yes
<whitequark[cis]> I think if we omit signed from ports then DSP people will hate it
<_whitenotifier-b> [amaranth] whitequark opened pull request #959: Eliminate uses of deprecated `Past` and `Rose` from FIFO tests - https://github.com/amaranth-lang/amaranth/pull/959
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #959: Eliminate uses of deprecated `Past` and `Rose` from FIFO tests - https://github.com/amaranth-lang/amaranth/pull/959#issuecomment-1826176916
<_whitenotifier-b> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-959-1b74c2904c246e52586dbb2f081af7ceb4257ffc - https://github.com/amaranth-lang/amaranth
<_whitenotifier-b> [amaranth] whitequark opened pull request #960: (Merge after 0.4 is released) Remove deprecated `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/960
<_whitenotifier-b> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/1b74c2904c24...28e1d2833f7c
<_whitenotifier-b> [amaranth-lang/amaranth] whitequark 28e1d28 - test_lib_fifo: eliminate uses of deprecated `Past` and `Rose`.
<_whitenotifier-b> [amaranth] whitequark closed pull request #959: Eliminate uses of deprecated `Past` and `Rose` from FIFO tests - https://github.com/amaranth-lang/amaranth/pull/959
<_whitenotifier-b> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-959-1b74c2904c246e52586dbb2f081af7ceb4257ffc - https://github.com/amaranth-lang/amaranth
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±32] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/c929f2ab253a...9db5fd652158
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 9db5fd6 - Deploying to main from @ amaranth-lang/amaranth@28e1d2833f7c29c367497a48fe84d40c33a98b5f 🚀
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #960: (Merge after 0.4 is released) Remove deprecated `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/960#issuecomment-1826179131
<_whitenotifier-b> [amaranth] whitequark opened pull request #961: (Merge after 0.4 is released) Remove `amaranth.lib.scheduler` - https://github.com/amaranth-lang/amaranth/pull/961
<_whitenotifier-b> [amaranth] whitequark edited pull request #949: (Merge after 0.4 is released) Remove non-FWFT FIFOs - https://github.com/amaranth-lang/amaranth/pull/949
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #961: (Merge after 0.4 is released) Remove `amaranth.lib.scheduler` - https://github.com/amaranth-lang/amaranth/pull/961#issuecomment-1826180305
peeps is now known as peeps[zen]
<_whitenotifier-b> [amaranth] whitequark commented on issue #692: Remove the Migen compatibility layer - https://github.com/amaranth-lang/amaranth/issues/692#issuecomment-1826180778
<_whitenotifier-b> [amaranth] whitequark edited pull request #840: (Merge after 0.4 is released) Remove the Migen compatibility layer - https://github.com/amaranth-lang/amaranth/pull/840
<_whitenotifier-b> [amaranth] whitequark commented on pull request #961: (Merge after 0.4 is released) Remove `amaranth.lib.scheduler` - https://github.com/amaranth-lang/amaranth/pull/961#issuecomment-1826181907
<_whitenotifier-b> [amaranth] whitequark commented on pull request #960: (Merge after 0.4 is released) Remove deprecated `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/960#issuecomment-1826181930
<_whitenotifier-b> [amaranth] whitequark commented on pull request #949: (Merge after 0.4 is released) Remove non-FWFT FIFOs - https://github.com/amaranth-lang/amaranth/pull/949#issuecomment-1826182089
<_whitenotifier-b> [amaranth] whitequark commented on pull request #840: (Merge after 0.4 is released) Remove the Migen compatibility layer - https://github.com/amaranth-lang/amaranth/pull/840#issuecomment-1826182445
<_whitenotifier-b> [amaranth] whitequark opened pull request #962: (Merge after 0.4 is released) Remove `Const.normalize` - https://github.com/amaranth-lang/amaranth/pull/962
<_whitenotifier-b> [amaranth] whitequark closed issue #769: Possible to define operators for aggregate types? - https://github.com/amaranth-lang/amaranth/issues/769
<_whitenotifier-b> [amaranth] whitequark commented on issue #769: Possible to define operators for aggregate types? - https://github.com/amaranth-lang/amaranth/issues/769#issuecomment-1826184824
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #962: (Merge after 0.4 is released) Remove `Const.normalize` - https://github.com/amaranth-lang/amaranth/pull/962#issuecomment-1826184847
<_whitenotifier-b> [amaranth] whitequark opened pull request #963: Update changelog to mention removal of `amaranth.compat` and `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/963
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #963: Update changelog to mention removal of `amaranth.compat` and `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/963#issuecomment-1826187265
<_whitenotifier-b> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-963-28e1d2833f7c29c367497a48fe84d40c33a98b5f - https://github.com/amaranth-lang/amaranth
<cr1901> The amaranth repos use BSD 2-Clause, so I think for parity, I'll use that as the license as well.
<whitequark[cis]> sounds good:)
<_whitenotifier-b> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/28e1d2833f7c...89d1c9bb28f1
<_whitenotifier-b> [amaranth-lang/amaranth] whitequark 89d1c9b - docs: update changelog.
<_whitenotifier-b> [amaranth] whitequark closed pull request #963: Update changelog to mention removal of `amaranth.compat` and `Sample`, `Past`, `Stable`, `Rose`, `Fell` - https://github.com/amaranth-lang/amaranth/pull/963
<_whitenotifier-b> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-963-28e1d2833f7c29c367497a48fe84d40c33a98b5f - https://github.com/amaranth-lang/amaranth
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±36] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/9db5fd652158...235bd18160ed
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 235bd18 - Deploying to main from @ amaranth-lang/amaranth@89d1c9bb28f125316ea20bef5395e1ad26883877 🚀
<_whitenotifier-b> [amaranth] wanda-phi opened pull request #964: lib.data: implement `__eq__`, `__ne__`, `__repr__` for `View`. - https://github.com/amaranth-lang/amaranth/pull/964
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #964: lib.data: implement `__eq__`, `__ne__`, `__repr__` for `View`. - https://github.com/amaranth-lang/amaranth/pull/964#issuecomment-1826200557
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 276 seconds]
Degi_ is now known as Degi
indy has quit [Ping timeout: 260 seconds]
indy_ has joined #amaranth-lang
<_whitenotifier-b> [amaranth] whitequark opened pull request #965: Move PySim name extraction functionality to Fragment and improve it - https://github.com/amaranth-lang/amaranth/pull/965
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #965: Move PySim name extraction functionality to Fragment and improve it - https://github.com/amaranth-lang/amaranth/pull/965#issuecomment-1826210667
<_whitenotifier-b> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-965-89d1c9bb28f125316ea20bef5395e1ad26883877 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-b> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 2 commits to main [+0/-0/±4] https://github.com/amaranth-lang/amaranth/compare/89d1c9bb28f1...79adbed3134a
<_whitenotifier-b> [amaranth-lang/amaranth] whitequark e7b15e1 - sim._pyrtl: formatting. NFCI
<_whitenotifier-b> [amaranth-lang/amaranth] whitequark 79adbed - sim.pysim: move name extractor functionality to Fragment.
<_whitenotifier-b> [amaranth] whitequark closed pull request #965: Move PySim name extraction functionality to Fragment and improve it - https://github.com/amaranth-lang/amaranth/pull/965
<_whitenotifier-b> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-965-89d1c9bb28f125316ea20bef5395e1ad26883877 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±32] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/235bd18160ed...dafa41712a81
<_whitenotifier-b> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] dafa417 - Deploying to main from @ amaranth-lang/amaranth@79adbed3134a4490887a6b4450381217136ffe93 🚀
notgull has quit [Ping timeout: 256 seconds]
notgull has joined #amaranth-lang
<_whitenotifier-b> [amaranth] enjoy-digital commented on issue #692: Remove the Migen compatibility layer - https://github.com/amaranth-lang/amaranth/issues/692#issuecomment-1826254714
<_whitenotifier-b> [amaranth] whitequark commented on issue #692: Remove the Migen compatibility layer - https://github.com/amaranth-lang/amaranth/issues/692#issuecomment-1826255486
<galibert[m]> Can -boards depend on -soc? Use-case is that the hps provides 3+ axi3 ports (not 100% sure about the sdram) and it would make sense that the platform provides axi3_interface-shaped objects, and that -soc provides the axi3_interface itself (and eventually arbiter, decode, csr, etc)
<whitequark[cis]> in principle yes
<galibert[m]> Ok, good
<galibert[m]> It's not a today thing, but it's good to know I see how things are supposed to interat
<galibert[m]> s/interat/interact/
ravenslofty[m] has joined #amaranth-lang
<ravenslofty[m]> Does anybody have an example of code converted to use lib.wiring? Just so I can get an idea of how to use that
<ravenslofty[m]> I guess I could read through cr1901's sentinel code and see
<whitequark[cis]> do you want simple code or complex code? (how generic are you looking for it to be)
<ravenslofty[m]> Like, my introduction to "how to write Amaranth" was more or less copying the code style of Boneless; I'm not too worried about how generic it is so much as "where before you'd do X, you now do Y"
<ravenslofty[m]> e.g. it seems to me that... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/HhFhjAFjLjUXViYOqGlAwnsa>)
<ravenslofty[m]> And perhaps this is just me, but the latter seems to provide a somewhat worse IDE experience.
<whitequark[cis]> that's funny, I was just looking at upgrading Boneless (I think you can see some of the recent commits to that end)
<whitequark[cis]> but anyway, this very much works:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/HEIajjjnSnxTOVOvXLFxLsQs>)
<whitequark[cis]> (I'm not sure where the intermediate signature came out of)
<ravenslofty[m]> As I said, I'm just looking at existing code to try to get a feel for this
<whitequark[cis]> the intent with lib.wiring was always to capture existing patterns and formalize them in a way that improves the language
<whitequark[cis]> oh I see
<whitequark[cis]> Sentinel has its own code style, I think, which isn't necessarily reflective of what I would suggest
<whitequark[cis]> I was actually going to pair with someone on lib.wiring docs, uh, in ... 5 hours from now? with the intent to finish them before the close-by 0.4 release
<ravenslofty[m]> I mean, my understanding is that signatures allow one to connect two cells together if you have the signature for them
<whitequark[cis]> (have you read the RFC?)
<whitequark[cis]> (that has some motivating examples, though it's not a particularly easy read and I wouldn't normally recommend it for beginners)
<whitequark[cis]> ravenslofty[m]: sort of. I would say there are two related goals that signatures achieve
<whitequark[cis]> the first one is that they let you specify directions of elaboratable ports (something that in code in Amaranth 0.3 is entirely implicit) in a machine-readable format
<galibert[m]> And human-readable too, which is nice
<whitequark[cis]> the second one is that they let you group those ports into bigger things--interfaces--and make connections between interfaces in a more convenient and reliable way than just manually adding a bunch of .eq statements to m.d.comb
<whitequark[cis]> does that make sense?
<ravenslofty[m]> (I kind of stopped using Amaranth for...about a year or so because it had some very rough edges to me that made the otherwise-pleasant language a bit painful)
<ravenslofty[m]> Yes, that makes sense.
<whitequark[cis]> so while you have a signature of an entire elaboratable (which I guess you could call a cell, since that's what it becomes in RTLIL) you aren't typically connecting that to anything
<galibert[m]> Lofty: it got steadily nicer meanwhile
<whitequark[cis]> it's just that it makes sense to describe the interface of an elaboratable as a whole in the same way as you describe its individual parts
<whitequark[cis]> to design this system I've reviewed every competing one I could grasp (SV interfaces, FIRRTL are the big ones) and tried to build something that would capture their essence but not their flaws
<ravenslofty[m]> (I mean, I'm happy to elaborate [excuse the pun] on those rough edges, but I'm not the first to bring them up)
<whitequark[cis]> this is some very simple and boring code using lib.wiring
<ravenslofty[m]> Mmm, that looks reasonable enough to write.
<whitequark[cis]> it doesn't actually use connect since it's just too simple and boring for that
<galibert[m]> Connect is not actually something you need that often
<galibert[m]> Surprisingly
<whitequark[cis]> the way you'd normally use `connect` is something like:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/ruGWWCbnRTUbGrOrftHlRgQs>)
<whitequark[cis]> (this is using a fantasy wishbone.Arbiter, not the real one; just to demonstrate the shape of the code)
<ravenslofty[m]> A hobby project of mine is writing chess move generators in various languages because it's something which is more complex than the prototypical whiteboard interview question while still being feasible in a few days of work
<whitequark[cis]> * the way you'd normally use `connect` is something like:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/IMVBkQxnFVqeaXcBZelaJYAl>)
<ravenslofty[m]> I do find myself doing the slightly amusing thing of writing `Signal` instead of `Signature`, but the muscle memory will adapt I'm sure
<ravenslofty[m]> ...Maybe I'll be fighting muscle memory more than that. I'm used to writing `Signal()` to imply it being one-bit wide, but `Out()` is an error because the `description` is required
DX-MON has quit [Quit: I'm not disconnecting, you're disconnecting!]
lethalbit|wut has quit [Quit: kill -9 -1]
lethalbit has joined #amaranth-lang
DX-MON has joined #amaranth-lang
<_whitenotifier-b> [amaranth] wanda-phi opened pull request #966: lib.data: implement equality for `View`, reject all other operators. - https://github.com/amaranth-lang/amaranth/pull/966
<_whitenotifier-b> [amaranth] wanda-phi edited pull request #964: lib.data: implement `__eq__`, `__ne__`, `__repr__` for `View`. - https://github.com/amaranth-lang/amaranth/pull/964
<Wanda[cis]> yay twin PRs.
<_whitenotifier-b> [amaranth] codecov[bot] commented on pull request #966: lib.data: implement equality for `View`, reject all other operators. - https://github.com/amaranth-lang/amaranth/pull/966#issuecomment-1826293851
jn_ is now known as jn
feldim2425_ has joined #amaranth-lang
feldim2425 has quit [Ping timeout: 264 seconds]
<iposthuman[m]> Curious, where is your "introduction to how to write Amaranth"? I'm learning and could use any resources 😉
<cr1901> >Sentinel has its own code style, I think, which isn't necessarily reflective of what I would suggest
<cr1901> whitequark[cis]: Critique welcome :P. It's my fault for keeping this under wraps for so long, but if I didn't and announced too early, it wouldn't have gotten done
<cr1901> One thing I notice I do... I _really_ wanted interface subsets, so I will break up interfaces into smaller ones and connect them with m.d.comb += ... instead of passing the whole interface to each component and using just the signals I need
<cr1901> instead of connect()'ing*
<ravenslofty[m]> You misread: it's phrased as in "I learned Amaranth by studying Boneless", not that I have a introduction to Amaranth.
<whitequark[cis]> interface subsets?
<cr1901> "connect() two interfaces where the dest has a subset of signals of the source (or vice-versa), but is otherwise compatible"
<whitequark[cis]> ah
<cr1901> But if there's stuff in Sentinel that you don't want to persist (as in bad code style), I would genuinely appreciate critique to change it now/before release, since the core isn't ready yet.
<cr1901> Ahhh for example, the exception router signature that lofty linked earlier: https://github.com/cr1901/sentinel/blob/main/src/sentinel/top.py#L279-L291. I use comb to connect just the relevant parts of each interface
nelgau has joined #amaranth-lang
feldim2425_ has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
feldim2425 has joined #amaranth-lang
feldim2425 has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
feldim2425 has joined #amaranth-lang
nelgau has quit [Read error: Connection reset by peer]
nelgau has joined #amaranth-lang
omnitechnomancer has quit [Quit: Idle timeout reached: 172800s]
nelgau has quit [Read error: Connection reset by peer]
nelgau has joined #amaranth-lang
nelgau has quit [Read error: Connection reset by peer]
nelgau_ has joined #amaranth-lang
nelgau_ has quit [Ping timeout: 252 seconds]
vipqualitypost[m has joined #amaranth-lang
<vipqualitypost[m> how is the best way to work with the Display7Segment resource? Are you supposed to assign the signals one at a time for each channel (a,b,c etc) or can you just assign a 7/8bit signal to the resource?
<vipqualitypost[m> i couldn't find any examples in the wild of people using it
<cr1901> I need this for a blog post: thank goodness the RFC book links to the relevant issue, since I couldn't find RFC 2's issue otherwise
nelgau has joined #amaranth-lang
<vipqualitypost[m> answering myself : Cat signals together