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
polysci_00232[m] has joined #amaranth-lang
<polysci_00232[m]> Is it safe to call wiring.connect() inside a control flow block? I would expect it would just behave the same as having a large block of combinational assignments inside control flow.
<whitequark[cis]> correct
<whitequark[cis]> safe, and an intended use of it
<whitequark[cis]> this is why the design makes it impossible for you to do e.g. m.d.sync += wiring.connect(), requiring you to pass m
<polysci_00232[m]> ok just wanted to confirm because I recently fixed a bug in my own code that seemed to be stemming from strange behavior of wiring.connect(). I havent had the time to try and reproduce it but might be filing an issue when I get a chance
<whitequark[cis]> that's interesting--how'd it look like?
<tpw_rules> i use it (seemingly) safely in a control block in my design
lf_ has quit [Ping timeout: 240 seconds]
lf has joined #amaranth-lang
<polysci_00232[m]> The troublesome block of code looked something like this:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/YeNgnBDBdJDGbDAmMLwFUkbp>)
<whitequark[cis]> that looks a little fishy to me
<whitequark[cis]> wait, is that not a logic loop?
<polysci_00232[m]> I didnt take super good notes when I ran into the bug last week which is why I was hesitant to report anything just yet
<polysci_00232[m]> it def isnt nice to look at
<polysci_00232[m]> I since switched to having serdes.tx.sink.valid assigned to Const(1)
<whitequark[cis]> im reasonably sure thats a logic loop either way
<whitequark[cis]> heres how
<whitequark[cis]> m.d.comb += serdes.tx.sink.valid.eq(1)
<whitequark[cis]> with m.If(self.sink.valid):
<whitequark[cis]> m.d.comb += self.sink.valid.eq(self.serdes.tx.sink.valid)
<whitequark[cis]> so unless you also had the directions wrong on both sides and the connect was a no-op (which is iirc a warning) that's an if controlling itself
<whitequark[cis]> which is illegal
<polysci_00232[m]> yea certainly looks like it. I dont remember seeing any warnings so ill try and reproduce and then see if I have more to share about the issue or if it was just me being dumb
<Wanda[cis]> .... yeaaaah the warning is a TODO
<Wanda[cis]> (soon)
<Wanda[cis]> (well, not warning, hard error)
<Wanda[cis]> Catherine: actually should I make an issue about moving stuff to `amaranth.errors`?
<whitequark[cis]> Wanda: I don't think it's a concrete enough plan to act on it for now
<Wanda[cis]> seems somewhat straightforward?
<Wanda[cis]> ... does this need an RFC
<Wanda[cis]> but yeah not very important
<mcc111[m]> <Wanda[cis]> "(on 52)" <- Oh. Uh, sorry, late response. My opinion is that I like the API in the RFC better than any of the "bikeshed" alternatives, because although it is a *little* ungainly it makes it a lot easier than any of the alternatives to build up an expression in stages/procedurally , and I like doing that.
<mcc111[m]> To clarify, when you call .case() that returns a new value, right?
jn has quit [Ping timeout: 272 seconds]
jn has joined #amaranth-lang
<whitequark[cis]> yes
<Wanda[cis]> yeah, the problem with it is that it requires a finishing as_value() in some circumstances but not all, because it has to be a ValueCastable, not a Value
<whitequark[cis]> we can teach the syntax with a finishing .as_value() at the end
<whitequark[cis]> as the only way to use it
<whitequark[cis]> sure, it'll sometimes work without too, but if it doesn't there's an easy fix
Degi has quit [Ping timeout: 272 seconds]
Degi has joined #amaranth-lang
<mcc111[m]> Tq
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 240 seconds]
<_whitenotifier-6> [amaranth] daniestevez commented on issue #1220: Question: reset-less signals in interfaces - https://github.com/amaranth-lang/amaranth/issues/1220#issuecomment-2019795155
<_whitenotifier-6> [amaranth] daniestevez commented on issue #1220: Question: reset-less signals in interfaces - https://github.com/amaranth-lang/amaranth/issues/1220#issuecomment-2019825226
Darius has quit [Ping timeout: 256 seconds]
Darius has joined #amaranth-lang
peeps[zen] has quit [Remote host closed the connection]
peeps[zen] has joined #amaranth-lang
<_whitenotifier-6> [amaranth] wanda-phi commented on issue #1220: Question: reset-less signals in interfaces - https://github.com/amaranth-lang/amaranth/issues/1220#issuecomment-2020817813
<_whitenotifier-6> [amaranth] daniestevez commented on issue #1220: Question: reset-less signals in interfaces - https://github.com/amaranth-lang/amaranth/issues/1220#issuecomment-2020944155
<_whitenotifier-5> [amaranth] wanda-phi commented on issue #1220: Question: reset-less signals in interfaces - https://github.com/amaranth-lang/amaranth/issues/1220#issuecomment-2021153038
<_whitenotifier-5> [amaranth] wanda-phi opened pull request #1247: hdl._ir: rename `Instance.named_ports` to `Instance.ports`. - https://github.com/amaranth-lang/amaranth/pull/1247
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1247: hdl._ir: rename `Instance.named_ports` to `Instance.ports`. - https://github.com/amaranth-lang/amaranth/pull/1247#issuecomment-2021178727
notgull has joined #amaranth-lang
jess has joined #amaranth-lang
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1247-fa2adbef84ca173d3c19fba37cfd7a3a042635f5 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±3] https://github.com/amaranth-lang/amaranth/compare/fa2adbef84ca...0c041f2602e7
<_whitenotifier-6> [amaranth-lang/amaranth] wanda-phi 0c041f2 - hdl._ir: rename `Instance.named_ports` to `Instance.ports`.
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1247-fa2adbef84ca173d3c19fba37cfd7a3a042635f5 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth] whitequark closed pull request #1247: hdl._ir: rename `Instance.named_ports` to `Instance.ports`. - https://github.com/amaranth-lang/amaranth/pull/1247
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±35] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/85a600495d6e...8fb2e897471d
<_whitenotifier-6> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 8fb2e89 - Deploying to main from @ amaranth-lang/amaranth@0c041f2602e7e424079560b4100074f79afe10a4 🚀
<key2> File "...python3.10/site-packages/amaranth_stdio/serial.py", line 91, in __init__
<key2> "divisor": In(unsigned(self._divisor_bits), init=self._divisor),
<key2> TypeError: Flow.__call__() got an unexpected keyword argument 'init'
<key2> Anyone knows what is wrong with that init= in serial.py ?
<tpw_rules> you probably have an old version of amaranth; recently the reset= argument became init=
<tpw_rules> well "old", even the latest release does not have that patch. you'll need to upgrade to master
<key2> 0.4.0
<key2> I see
<whitequark[cis]> yeah, in this particular case the breakage was unavoidable really
<whitequark[cis]> amaranth accepts both reset= and init= but downstream code built with PYTHONWARNINGS=error can't be tested if it has reset= still
notgull has quit [Ping timeout: 268 seconds]
<tpw_rules> or downgrade amaranth-stdio a couple commits, it's pretty slow moving
<tpw_rules> whitequark[cis]: i had thought about asking for this quirk to be backported too, perhaps without a warning, but in my mind that's a bit of a slippery slope. i had hoped to keep using amaranth-soc on stable amaranth
<tpw_rules> it seems we are on a good track to 0.5 though so perhaps i just have to be patient for another month or two
<whitequark[cis]> I would definitely not spend my own time on backporting that quirk
<key2> fixed thx
<cr1901> I've already dealt with amaranth-soc breaking on stable amaranth due to how pdm decides whether deps are satisfiable. Sentinel won't get a PyPI release until amaranth-soc 0.1 (whenever that is)
<Wanda[cis]> regarding next monday: it seems it's a religious holiday in a bunch of countries, is it going to be rescheduled?
<cr1901> .oO (April Fools RFCs)
<tpw_rules> oh that is in fact easter monda
<tpw_rules> t
<tpw_rules> y
<tpw_rules> >_>
<whitequark[cis]> <Wanda[cis]> "regarding next monday: it..." <- uhhh, good question actually
<whitequark[cis]> yes, it's a bank holiday in the UK, so everyone who works at CF (me, JF, Staf) are going to be off the clock
<whitequark[cis]> I think we should reschedule it
<_whitenotifier-6> [amaranth] whitequark opened pull request #1248: Deprecate `{Const,Signal}.{width,signed} accessors - https://github.com/amaranth-lang/amaranth/pull/1248
<_whitenotifier-5> [amaranth] whitequark edited pull request #1248: Deprecate `{Const,Signal}.{width,signed} accessors - https://github.com/amaranth-lang/amaranth/pull/1248
<_whitenotifier-6> [amaranth] whitequark edited pull request #1248: Deprecate `{Const,Signal}.{width,signed} accessors - https://github.com/amaranth-lang/amaranth/pull/1248
<_whitenotifier-6> [amaranth] codecov[bot] commented on pull request #1248: Deprecate `{Const,Signal}.{width,signed} accessors - https://github.com/amaranth-lang/amaranth/pull/1248#issuecomment-2021586240
<_whitenotifier-5> [amaranth] whitequark edited pull request #1248: Deprecate `{Const,Signal}.{width,signed}` accessors - https://github.com/amaranth-lang/amaranth/pull/1248
<Wanda[cis]> r+
<_whitenotifier-6> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1248-0c041f2602e7e424079560b4100074f79afe10a4 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-6> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±6] https://github.com/amaranth-lang/amaranth/compare/0c041f2602e7...738d8b776491
<_whitenotifier-5> [amaranth-lang/amaranth] whitequark 738d8b7 - hdl: deprecate `{Const,Signal}.{width,signed}` accessors.
<_whitenotifier-6> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1248-0c041f2602e7e424079560b4100074f79afe10a4 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-6> [amaranth] whitequark closed pull request #1248: Deprecate `{Const,Signal}.{width,signed}` accessors - https://github.com/amaranth-lang/amaranth/pull/1248
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±35] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/8fb2e897471d...a5d94bf5b6b5
<_whitenotifier-6> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] a5d94bf - Deploying to main from @ amaranth-lang/amaranth@738d8b7764911af9982365cc59c512e330eb75a4 🚀
<_whitenotifier-5> [amaranth] whitequark opened pull request #1249: docs/guide: clarify section on `IOBufferInstance` - https://github.com/amaranth-lang/amaranth/pull/1249
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1249: docs/guide: clarify section on `IOBufferInstance` - https://github.com/amaranth-lang/amaranth/pull/1249#issuecomment-2021625807
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1249-738d8b7764911af9982365cc59c512e330eb75a4 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-6> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/738d8b776491...f261071f7cde
<_whitenotifier-5> [amaranth-lang/amaranth] whitequark f261071 - docs/guide: clarify section on `IOBufferInstance`.
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1249-738d8b7764911af9982365cc59c512e330eb75a4 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-6> [amaranth] whitequark closed pull request #1249: docs/guide: clarify section on `IOBufferInstance` - https://github.com/amaranth-lang/amaranth/pull/1249
<_whitenotifier-6> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±39] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/a5d94bf5b6b5...31a4236f34e0
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 31a4236 - Deploying to main from @ amaranth-lang/amaranth@f261071f7cded39fad56381eed5ea0bda5e6be14 🚀
<_whitenotifier-6> [amaranth-soc] whitequark opened pull request #80: Update for features deprecated in Amaranth 0.5 - https://github.com/amaranth-lang/amaranth-soc/pull/80
<_whitenotifier-5> [amaranth-soc] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-80-9b90d7233889ed41ca8128f4cfcd14633b1ade91 - https://github.com/amaranth-lang/amaranth-soc
<_whitenotifier-6> [amaranth-lang/amaranth-soc] whitequark 8b1de15 - event: update for features deprecated in Amaranth 0.5.
<_whitenotifier-5> [amaranth-lang/amaranth-soc] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth-soc/compare/9b90d7233889...8b1de15973ed
<_whitenotifier-5> [amaranth-soc] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-80-9b90d7233889ed41ca8128f4cfcd14633b1ade91 - https://github.com/amaranth-lang/amaranth-soc
<_whitenotifier-6> [amaranth-soc] jfng closed pull request #80: Update for features deprecated in Amaranth 0.5 - https://github.com/amaranth-lang/amaranth-soc/pull/80
<_whitenotifier-6> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±8] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/31a4236f34e0...dedc8286da84
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] dedc828 - Deploying to main from @ amaranth-lang/amaranth-soc@8b1de15973edf51ebe4d5c86a1c9704b17578483 🚀