<_whitenotifier-b>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 9db5fd6 - Deploying to main from @ amaranth-lang/amaranth@28e1d2833f7c29c367497a48fe84d40c33a98b5f 🚀
<_whitenotifier-b>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 235bd18 - Deploying to main from @ amaranth-lang/amaranth@89d1c9bb28f125316ea20bef5395e1ad26883877 🚀
<_whitenotifier-b>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] dafa417 - Deploying to main from @ amaranth-lang/amaranth@79adbed3134a4490887a6b4450381217136ffe93 🚀
<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"
<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 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
<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!]
<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.
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