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
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #amaranth-lang
<_whitenotifier> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/c9152e713763...5dd7d7dc8027
<_whitenotifier> [YoWASP/yosys] whitequark 5dd7d7d - Update dependencies.
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/1dde7d8c1ea8...76355ebdc286
<_whitenotifier> [YoWASP/nextpnr] whitequark 76355eb - Update dependencies.
Degi has quit [Ping timeout: 246 seconds]
Degi has joined #amaranth-lang
cr1901__ has joined #amaranth-lang
cr1901_ has quit [Ping timeout: 246 seconds]
cr1901_ has joined #amaranth-lang
cr1901__ has quit [Ping timeout: 244 seconds]
nak has joined #amaranth-lang
cr1901__ has joined #amaranth-lang
cr1901_ has quit [Ping timeout: 245 seconds]
SpaceCoaster has quit [Ping timeout: 246 seconds]
cr1901__ is now known as cr1901
SpaceCoaster has joined #amaranth-lang
vipqualitypost[m has quit [Quit: Idle timeout reached: 172800s]
jfng[m] has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier> [YoWASP/runtime] whitequark pushed 2 commits to develop [+1/-1/±1] https://github.com/YoWASP/runtime/compare/e08d2780e73b...0e36f0b18efb
<_whitenotifier> [YoWASP/runtime] whitequark 5359412 - Update workflow name. NFC
<_whitenotifier> [YoWASP/runtime] whitequark 0e36f0b - Use PyPI Trusted Publishing.
<_whitenotifier> [YoWASP/runtime] whitequark pushed 1 commit to develop [+2/-2/±0] https://github.com/YoWASP/runtime/compare/0e36f0b18efb...4e4ee6c71230
<_whitenotifier> [YoWASP/runtime] whitequark 4e4ee6c - Rename workflows for consistency with yosys and nextpnr.
<_whitenotifier> [YoWASP/runtime] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/runtime/compare/4e4ee6c71230...dca6661862d5
<_whitenotifier> [YoWASP/runtime] whitequark dca6661 - [autorelease] Use PyPI Trusted Publishing on production PyPI.
<_whitenotifier> [YoWASP/runtime] whitequark pushed 4 commits to release [+3/-3/±2] https://github.com/YoWASP/runtime/compare/e08d2780e73b...dca6661862d5
<_whitenotifier> [YoWASP/runtime] whitequark 5359412 - Update workflow name. NFC
<_whitenotifier> [YoWASP/runtime] whitequark 0e36f0b - Use PyPI Trusted Publishing.
<_whitenotifier> [YoWASP/runtime] whitequark 4e4ee6c - Rename workflows for consistency with yosys and nextpnr.
<_whitenotifier> [YoWASP/runtime] whitequark dca6661 - [autorelease] Use PyPI Trusted Publishing on production PyPI.
<_whitenotifier> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/5dd7d7dc8027...86127390b6d7
<_whitenotifier> [YoWASP/yosys] whitequark 8612739 - [autorelease] Use PyPI Trusted Publishing.
<_whitenotifier> [YoWASP/yosys] whitequark pushed 1 commit to develop [+1/-0/±0] https://github.com/YoWASP/yosys/compare/86127390b6d7...f1950ca79979
<_whitenotifier> [YoWASP/yosys] whitequark f1950ca - [skip ci] Add sponsor button.
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+1/-0/±0] https://github.com/YoWASP/nextpnr/compare/d6eb8e60e836...be4a6b56887e
<_whitenotifier> [YoWASP/nextpnr] whitequark be4a6b5 - [skip ci] Add sponsor button.
<whitequark[cis]> all right, let's try out PyPI's/GitHub's new model for publishing packages (that I think is quite a lot better than the existing one)
<_whitenotifier> [YoWASP/runtime] whitequark pushed 1 commit to develop [+1/-0/±0] https://github.com/YoWASP/runtime/compare/dca6661862d5...f8fabbbe321f
<_whitenotifier> [YoWASP/runtime] whitequark f8fabbb - [skip ci] Add sponsor button.
<_whitenotifier> [YoWASP/yosys] whitequark pushed 82 commits to release [+1/-1/±97] https://github.com/YoWASP/yosys/compare/210ec5552569...86127390b6d7
<_whitenotifier> [YoWASP/yosys] whitequark 281931d - Minor fixes.
<_whitenotifier> [YoWASP/yosys] whitequark 0d60ddb - Update dependencies.
<_whitenotifier> [YoWASP/yosys] whitequark a124f4b - Update dependencies.
<_whitenotifier> [YoWASP/yosys] ... and 79 more commits.
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/be4a6b56887e...3aac031797ee
<_whitenotifier> [YoWASP/nextpnr] whitequark 3aac031 - [skip ci] Update PyPI GH publish action syntax.
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/76355ebdc286...d6eb8e60e836
<_whitenotifier> [YoWASP/nextpnr] whitequark d6eb8e6 - [autorelease] Use PyPI Trusted Publishing.
<_whitenotifier> [YoWASP/yosys] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/yosys/compare/f1950ca79979...daede40bbf86
<_whitenotifier> [YoWASP/yosys] whitequark daede40 - [skip ci] Update PyPI GH publish action syntax.
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/3aac031797ee...1ab5c213a40b
<_whitenotifier> [YoWASP/nextpnr] whitequark 1ab5c21 - Update PyPI GH publish action syntax.
<cr1901> https://github.com/cr1901/efbutils/blob/main/ufm_reader/rtl/ufm_streamer.v#L183 Is it possible to represent "if current state != previous state" in Amaranth FSMs?
<cr1901> Something like "if not fsm.just_entered(state)"
<whitequark[cis]> not directly
<_whitenotifier> [YoWASP/nextpnr] whitequark pushed 85 commits to release [+16/-2/±125] https://github.com/YoWASP/nextpnr/compare/8eb863faa37f...1ab5c213a40b
<_whitenotifier> [YoWASP/nextpnr] whitequark 8405963 - Update dependencies.
<_whitenotifier> [YoWASP/nextpnr] whitequark f0cd5ea - Update dependencies.
<_whitenotifier> [YoWASP/nextpnr] whitequark cf26c2d - Update dependencies.
<_whitenotifier> [YoWASP/nextpnr] ... and 82 more commits.
<whitequark[cis]> okay, I think that should finish the conversion of token-based PyPI auth to something more like RBAC
<whitequark[cis]> i.e. "this workflow is allowed to publish"
<cr1901> Also that should be "if fsm.just_entered(state)". Basically, I need a strobe when certain states are entered.
<cr1901> Actually, I can do this in terms of ongoing, but it's cursed
<cr1901> (bitvector of fsm.ongoing("state") and prev bitvector of fsm.ongoing("state"))
<whitequark[cis]> yep
<whitequark[cis]> Migen had such functionality, but it was prone to creating combinatorial loops in some cases
<whitequark[cis]> so I cut all of it
<cr1901> I don't think the bitvector approach is better as a user.
<whitequark[cis]> so after_entering and after_leaving were fine, but before_entering and before_leaving weren't
<whitequark[cis]> however I didn't feel like removing only half of them
<whitequark[cis]> instead I planned to rethink the whole approach and see what the actual needs are
<cr1901> My main gripe is having to create and split the bitvectors manually, and those will change every time I add/delete a state. Is there a way to iterate over state names?
<cr1901> >those will change every time I add/delete a state (yes, this is hypothetical right now. I already know all the states.)
<whitequark[cis]> here's the definition of the FSM class:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/qZbgXeSyXWsAXuJVgXFWiBwk>)
<whitequark[cis]> all of these things are public
<whitequark[cis]> encoding is a map from state to int, decoding is uh... I dunno why it's public... it's a thing for the FSM signal decoder to use
<whitequark[cis]> you can use state and encoding yourself if you want
<cr1901> how convenient, encoding is a dict. Sounds like something I can iterate over
<whitequark[cis]> however, note that the width and reset value of state will change when with m.FSM(): scope ends
<cr1901> So I can't do: prev = Signal.like(fsm.state) and expect it to work? Once we leave the m.FSM() context, the fsm var is gone
<whitequark[cis]> it's not gone
<whitequark[cis]> Python scoping rules aren't like Rust's for example
<cr1901> huh, interesting :o
<whitequark[cis]> this is general, not specific to amaranth
<whitequark[cis]> Python only removes variables in a few special cases... I think when you're using exceptions it sets e to None or something like that?
<whitequark[cis]> but you do keep the variable after for, after with, after if
<cr1901> where does the context manager modify state's width?
<cr1901> (I did self.state CTRL+F, but that didn't return much)
<whitequark[cis]> dsl.py:464
<cr1901> Okay cool. Well, I'll deal with this. >instead I planned to rethink the whole approach and see what the actual needs are <-- Well, I needed a "just entered" strobe :P.