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 · play https://amaranth-lang.org/play/ · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 245 seconds]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
zignig has joined #amaranth-lang
<zignig> !?
hello__jk[m] has joined #amaranth-lang
<hello__jk[m]> Hello everyone I'm new here
bl0x[m] has joined #amaranth-lang
<bl0x[m]> <hello__jk[m]> "Hello everyone I'm new here" <- Hi, welcome!
<bl0x[m]> What should be the threshold for using explicit Signatures instead of declaring In and Out members? For example when I have a simple counter, does using a Signature really improve the code or is that mostly for demonstration purposes? Are signatures more useful/applicable when one has a producer/consumer scenario?
<bl0x[m]> I find the semantics a bit misleading when connecting e.g. a counter via a Signature. I'll most often have another set of Signals in the parent module that then connect to the Members is the signature. Also, a counter Signature with a trigger and a value member is neither an In nor an Out. It's usually both. And I don't want to declare two signatures. Hmmm, perhaps I'm overthinking this...
<zignig> ... bus timeout ...
zignig has quit [Quit: leaving]
d_olex has quit [Ping timeout: 256 seconds]
d_olex has joined #amaranth-lang
d_olex has quit [Max SendQ exceeded]
d_olex has joined #amaranth-lang
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #amaranth-lang
miek has quit [Ping timeout: 255 seconds]
miek has joined #amaranth-lang
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #amaranth-lang
d_olex has quit [Ping timeout: 255 seconds]
smkz has quit [Quit: smkz]
smkz has joined #amaranth-lang
smkz has quit [Client Quit]
smkz has joined #amaranth-lang
cr1901_ has joined #amaranth-lang
cr1901 has quit [Ping timeout: 260 seconds]
d_olex has joined #amaranth-lang
d_olex has quit [Ping timeout: 245 seconds]
<whitequark[cis]> <bl0x[m]> "What should be the threshold for..." <- I'm not sure what your actual question is. what is a simple counter?
<bl0x[m]> For the time being let's consider a counter an 8 Bit register that increments by 1, whenever a trigger/count signal goes from 0 to 1. The value of the register can be accessed from outside. So the counter module would have a trigger input and a count value output.
<whitequark[cis]> yeah. you could make it a component although I wouldn't make one for something that simple that can be easily inlined into elaborate()
zyp[m] has joined #amaranth-lang
<zyp[m]> <bl0x[m]> "What should be the threshold for..." <- I'd say that the rule of thumb for when it makes sense to make explicit signatures is when they'll be used as signature members
<zyp[m]> in general it doesn't make sense for the toplevel signature of a component to be externally defined, unless you're making some sort of pluggable modules where the whole interface is 100% predefined
<bl0x[m]> <whitequark[cis]> "yeah. you could make it a..." <- Well, it was a simple example.
<zyp[m]> or actually, let me put it simpler; the rule of thumb for when it makes sense to make an explicit signature is if you'd use the resulting interface with connect(), because then you'd generally want to have the same signature on both sides
<zyp[m]> you rarely want to use connect() on a whole component
<bl0x[m]> zyp[m]: Ah, I see.
<bl0x[m]> So, use a Signature and connect() call for the e.g. Data stream part of the interface and then connect other (control) signals by hand?
<whitequark[cis]> that is a common pattern, yes
<bl0x[m]> Ok, I think I get it now. Thanks
<zyp[m]> consider something like a DMA block, it'll have a bus interface and a stream input or output, so you'd call connect() once to connect the bus interface to a bus arbitrator, and once more to connect the stream interface to a data source or sink
<zyp[m]> and then the bus and stream signatures should be defined and reusable
<zyp[m]> but the resulting signature of the component is implicit and unimportant
<bl0x[m]> Ok, got it! Thanks.
<_whitenotifier-e> [amaranth] jfng commented on pull request #978: Implement RFC 30: Component metadata. - https://github.com/amaranth-lang/amaranth/pull/978#issuecomment-2085079315
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 260 seconds]
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 268 seconds]
cr1901_ is now known as cr1901
peeps[zen] has joined #amaranth-lang
_whitenotifier-e has quit [Ping timeout: 260 seconds]
lethalbit|wut has joined #amaranth-lang
lethalbit has quit [Ping timeout: 260 seconds]
peepsalot has quit [Ping timeout: 260 seconds]
lethalbit|wut has quit [Quit: kill -9 -1]
DX-MON has quit [Quit: I'm not disconnecting, you're disconnecting!]
DX-MON has joined #amaranth-lang
lethalbit has joined #amaranth-lang
_whitenotifier-3 has joined #amaranth-lang
<_whitenotifier-3> [yosys] ramalhais commented on issue #32: Please add examples on how to use this module - https://github.com/YoWASP/yosys/issues/32#issuecomment-2087265509
lf has quit [Ping timeout: 256 seconds]
lf has joined #amaranth-lang