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 quit [Ping timeout: 252 seconds]
notgull has joined #amaranth-lang
lf has quit [Ping timeout: 240 seconds]
lf has joined #amaranth-lang
Guest92 has joined #amaranth-lang
Guest92 has quit [Quit: Client closed]
ggangliu has joined #amaranth-lang
<ggangliu>  Hi, I'm using 0.4.2 now. I got this info "DeprecationWarning: The `add_sync_process` method is deprecated per RFC 47. Use `add_process` or `add_testbench` instead.",  after using add_process, I met a new error "Received default command from process '/home/ggang/first-riscv/tutorial/up_counter.py:52' that was added with add_process(); did you
<ggangliu> mean to add this process with add_sync_process() instead?", it seems that yield command trigers this issue. So I'am confused that what I should to do for it ? Thanks for help in advance
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 246 seconds]
Degi_ is now known as Degi
<ggangliu> I have handled it by "pip3 install --user --upgrade 'amaranth[builtin-yosys]'", maybe it caused by local different python version matching
ggangliu has quit [Quit: Client closed]
cr1901_ has joined #amaranth-lang
cr1901 has quit [Read error: Connection reset by peer]
<whitequark[cis]> <cr1901> "This isn't actionable right now,..." <- it's not possible to add this lint
ggangliu has joined #amaranth-lang
ggangliu has quit [Client Quit]
<Wanda[cis]> took a shot at immutable AST nodes; turns out we modify src_loc after the fact in some places
<Wanda[cis]> hdl/_xfrm.py and lib/wiring.py specifically
frgo has quit [Read error: Connection reset by peer]
frgo has joined #amaranth-lang
<Wanda[cis]> I'm inclined to just hack around it in hdl/_xfrm.py; for lib/wiring.py I think what we need is Value constructors that take src_loc, not just src_loc_at
<whitequark[cis]> tbqh we could also just leave src_loc out of the contract
<whitequark[cis]> doesn't seem consequential
<Wanda[cis]> true
notgull has quit [Ping timeout: 264 seconds]
<Wanda[cis]> hrm.
<Wanda[cis]> Signal name is also set from ClockDomain.rename for obvious reasons
<Wanda[cis]> I'm not sure why we even have it in the first place?
<whitequark[cis]> hmm
<whitequark[cis]> should we allow setting both name and src_loc? name is more semantically important, though
<Wanda[cis]> idk
<whitequark[cis]> (this is about more than just ClockDomain.rename)
<Wanda[cis]> I already fixed the src_loc thing by adding constructor arg though
<whitequark[cis]> so to expand on this, when I wanted to make nodes immutable, I didn't want to deal with like... ok, can we change an Operator's operands? or a Cat parts?
<whitequark[cis]> the answer to that is clearly no
<Wanda[cis]> yeah
<whitequark[cis]> but I can see having legitimate reasons to change name or src_loc
<Wanda[cis]> mhm
<_whitenotifier-7> [amaranth] wanda-phi opened pull request #1165: hdl._ast: Make AST nodes immutable. - https://github.com/amaranth-lang/amaranth/pull/1165
<_whitenotifier-7> [amaranth] codecov[bot] commented on pull request #1165: hdl._ast: Make AST nodes immutable. - https://github.com/amaranth-lang/amaranth/pull/1165#issuecomment-1968468961
<Wanda[cis]> I'm going to add src_loc constructor arg anyway, it's going to reduce _xfrm.py criminality a bit
<whitequark[cis]> to every value?
<Wanda[cis]> yes
<whitequark[cis]> what if you pass both?
<whitequark[cis]> proposal: we add structured source locations first, in which case the answer is just "both are used"
<Wanda[cis]> src_loc takes precedence? I mean we already have this pattern in some places
<whitequark[cis]> hm
<Wanda[cis]> Switch for one
<whitequark[cis]> Switch isn't public API but src_loc attributes are
<whitequark[cis]> at least, their existence is
<Wanda[cis]> also what do you mean by "pass both"?
<whitequark[cis]> uh so like
<Wanda[cis]> src_loc_at is implicit anyway
<whitequark[cis]> `Signal(src_loc_at=1, src_loc="foo")
<whitequark[cis]> * Signal(src\_loc\_at=1, src\_loc="foo")
<whitequark[cis]> * Signal(src_loc_at=1, src_loc="foo")
<whitequark[cis]> they're like... explicitly documented https://amaranth-lang.org/docs/amaranth/latest/reference.html#source-locations
<Wanda[cis]> hrm, yes, I see
<whitequark[cis]> we kinda don't document how to read them for good reason (the data type within is garbage)
<whitequark[cis]> so, do you wanna fix the data type being garbage first? I have that on the roadmap already even
<Wanda[cis]> yeah I see it's on 0.5 list
<Wanda[cis]> let's see... still opaque to user, but internally represented as a list of (filename, start line+col, end line+col), wrapped in a nice class, and providing some sort of combining function (+ operator maybe even?) that gives you a new SrcLoc with all of the included locations in order?
<whitequark[cis]> class SourceRange: filename [absolute], start_line, start_col, stop_line, stop_col
<whitequark[cis]> class DebugLocation: def __iter__(self) -> Iterator[SourceRange]
<whitequark[cis]> this is what I've been thinking about
<whitequark[cis]> yeah basically, + works
<whitequark[cis]> actually
<whitequark[cis]> tbh I think we could have just one class which is the container for any number of locations rather than have two
<whitequark[cis]> makes the algebra simpler
<Wanda[cis]> yup
<whitequark[cis]> yeah just go ahead with your design, it's nicer and was my original one before i decided to make it more complicated for no reason
<Wanda[cis]> or at least
<Wanda[cis]> well
<Wanda[cis]> only one of those would be user-facing, right?
<Wanda[cis]> I do think we still need both a "list" and "list item" class
<Wanda[cis]> (that or just use a tuple as list item ...)
<Wanda[cis]> but also, as I understand it, we cannot actually get columns or more than one line with tracer, right?
<Wanda[cis]> oh
<Wanda[cis]> wait
<Wanda[cis]> they changed it recently, didn't they
<whitequark[cis]> yeah I think so
<Wanda[cis]> I just need to do more crimes
<whitequark[cis]> yep!
<Wanda[cis]> perfect
<_whitenotifier-7> [amaranth] whitequark published v0.4.3 | 0.4.3 - https://github.com/amaranth-lang/amaranth/releases/tag/v0.4.3
<_whitenotifier-5> [amaranth] wanda-phi opened pull request #1166: lib.memory: Add missing __eq__ to signature types. - https://github.com/amaranth-lang/amaranth/pull/1166
<_whitenotifier-7> [amaranth] codecov[bot] commented on pull request #1166: lib.memory: Add missing __eq__ to signature types. - https://github.com/amaranth-lang/amaranth/pull/1166#issuecomment-1968525281
<_whitenotifier-5> [amaranth] wanda-phi opened pull request #1167: lib.io: Add missing __repr__ to signature type. - https://github.com/amaranth-lang/amaranth/pull/1167
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1166-c6bc9b47ef4d29f1d1fa340c3e0048deccd56ae0 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1167: lib.io: Add missing __repr__ to signature type. - https://github.com/amaranth-lang/amaranth/pull/1167#issuecomment-1968535881
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1167-8af9fe2606314d37daf079c533a48e6ce0df9bd5 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] wanda-phi 8af9fe2 - lib.memory: Add missing __eq__ to signature types.
<_whitenotifier-7> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±2] https://github.com/amaranth-lang/amaranth/compare/c6bc9b47ef4d...8af9fe260631
<_whitenotifier-7> [amaranth] whitequark closed pull request #1166: lib.memory: Add missing __eq__ to signature types. - https://github.com/amaranth-lang/amaranth/pull/1166
<_whitenotifier-7> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1166-c6bc9b47ef4d29f1d1fa340c3e0048deccd56ae0 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] d928432 - Deploying to main from @ amaranth-lang/amaranth@8af9fe2606314d37daf079c533a48e6ce0df9bd5 🚀
<_whitenotifier-7> [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/51b6980804de...d928432e3991
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±2] https://github.com/amaranth-lang/amaranth/compare/8af9fe260631...1dd2e6150c4c
<_whitenotifier-7> [amaranth-lang/amaranth] wanda-phi 1dd2e61 - lib.io: Add missing __repr__ to signature type.
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1167-8af9fe2606314d37daf079c533a48e6ce0df9bd5 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-7> [amaranth] whitequark closed pull request #1167: lib.io: Add missing __repr__ to signature type. - https://github.com/amaranth-lang/amaranth/pull/1167
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 9e61b0f - Deploying to main from @ amaranth-lang/amaranth@1dd2e6150c4c3524a44a8d371802758699e19c4a 🚀
<_whitenotifier-7> [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/d928432e3991...9e61b0fdc953
<_whitenotifier-7> [amaranth] whitequark commented on pull request #1152: back.rtlil: Opportunistically trim zero and sign extension on operands. - https://github.com/amaranth-lang/amaranth/pull/1152#issuecomment-1968564849
<zyp[m]> <ggangliu> "mean to add this process with..." <- you probably want `add_testbench()`, and instead of plain `yield`, use `yield Tick()`
<_whitenotifier-7> [amaranth] whitequark created tag v0.5.0.dev0 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] whitequark tagged 597b1b8 as v0.5.0.dev0 https://github.com/amaranth-lang/amaranth/commit/597b1b883924d8949061b52270eb55b97a7cfb76
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+166/-0/±0] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/9e61b0fdc953...d8065bff766e
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] whitequark d8065bf - Deploying to main from @ amaranth-lang/amaranth@597b1b883924d8949061b52270eb55b97a7cfb76 🚀
<_whitenotifier-7> [amaranth-stdio] whitequark opened pull request #16: Follow RFC 43 - https://github.com/amaranth-lang/amaranth-stdio/pull/16
<_whitenotifier-7> [amaranth-boards] whitequark created branch amaranth-0.5 - https://github.com/amaranth-lang/amaranth-boards
<_whitenotifier-5> [amaranth-boards] whitequark opened pull request #240: Mark as compatible with Amaranth 0.5 - https://github.com/amaranth-lang/amaranth-boards/pull/240
<_whitenotifier-5> [amaranth-boards] whitequark closed pull request #240: Mark as compatible with Amaranth 0.5 - https://github.com/amaranth-lang/amaranth-boards/pull/240
<_whitenotifier-7> [amaranth-boards] whitequark deleted branch amaranth-0.5 - https://github.com/amaranth-lang/amaranth-boards
<_whitenotifier-5> [amaranth-lang/amaranth-boards] whitequark 5b2cb8e - Mark as compatible with Amaranth 0.5.
<_whitenotifier-7> [amaranth-lang/amaranth-boards] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth-boards/compare/170675812b71...5b2cb8e38ebc
<_whitenotifier-5> [amaranth-stdio] codecov[bot] commented on pull request #16: Follow RFC 43 - https://github.com/amaranth-lang/amaranth-stdio/pull/16#issuecomment-1968769924
<_whitenotifier-7> [amaranth-stdio] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-16-4aa39e8c9dc68c4e3605bbb80a0ca84e3a25d019 - https://github.com/amaranth-lang/amaranth-stdio
<_whitenotifier-7> [amaranth-stdio] whitequark edited pull request #16: Follow RFCs 43 and 47 - https://github.com/amaranth-lang/amaranth-stdio/pull/16
<_whitenotifier-5> [amaranth-stdio] whitequark commented on pull request #15: serial: use init= and add_testbench. - https://github.com/amaranth-lang/amaranth-stdio/pull/15#issuecomment-1968773528
<_whitenotifier-7> [amaranth-stdio] whitequark closed pull request #15: serial: use init= and add_testbench. - https://github.com/amaranth-lang/amaranth-stdio/pull/15
<_whitenotifier-5> [amaranth-lang/amaranth-stdio] whitequark 8ebce9b - Remove unused and deprecated import.
<_whitenotifier-7> [amaranth-lang/amaranth-stdio] github-merge-queue[bot] pushed 3 commits to main [+0/-0/±6] https://github.com/amaranth-lang/amaranth-stdio/compare/4aa39e8c9dc6...ae774a570932
<_whitenotifier-5> [amaranth-lang/amaranth-stdio] whitequark ae774a5 - Follow RFC 47.
<_whitenotifier-7> [amaranth-lang/amaranth-stdio] whitequark e126924 - Follow RFC 43.
<_whitenotifier-7> [amaranth-stdio] whitequark closed pull request #16: Follow RFCs 43 and 47 - https://github.com/amaranth-lang/amaranth-stdio/pull/16
<_whitenotifier-7> [amaranth-stdio] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-16-4aa39e8c9dc68c4e3605bbb80a0ca84e3a25d019 - https://github.com/amaranth-lang/amaranth-stdio
<whitequark[cis]> thinking out loud about the UART in stdio: I think the right thing to do here is to just have an UAR and UAT
<_whitenotifier-5> [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/d8065bff766e...d40c1879f757
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] d40c187 - Deploying to main from @ amaranth-lang/amaranth-stdio@ae774a5709321d5bffddbcebed09b0e350cb6282 🚀
<whitequark[cis]> not only that, but also have, as the default UART in soc, one which lets you configure independent baud rates for the receive and transmit half
<whitequark[cis]> (and of course a 16550-compatible one, for Linux etc)
<jfng[m]> yeah, also as some have noticed here before (zyp, iirc), you can't do connect() on the -stdio AsyncSerial due to the way it is built
<_whitenotifier-7> [amaranth] wanda-phi opened pull request #1168: lib.io: Expose `Pin` path and name as attributes. - https://github.com/amaranth-lang/amaranth/pull/1168
<_whitenotifier-7> [amaranth] codecov[bot] commented on pull request #1168: lib.io: Expose `Pin` path and name as attributes. - https://github.com/amaranth-lang/amaranth/pull/1168#issuecomment-1968811610
<_whitenotifier-7> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1168-1dd2e6150c4c3524a44a8d371802758699e19c4a - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±2] https://github.com/amaranth-lang/amaranth/compare/1dd2e6150c4c...f2dab705ee24
<_whitenotifier-7> [amaranth-lang/amaranth] wanda-phi f2dab70 - lib.io: Expose `Pin` path and name as attributes.
<_whitenotifier-7> [amaranth] whitequark closed pull request #1168: lib.io: Expose `Pin` path and name as attributes. - https://github.com/amaranth-lang/amaranth/pull/1168
<_whitenotifier-7> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1168-1dd2e6150c4c3524a44a8d371802758699e19c4a - https://github.com/amaranth-lang/amaranth
<_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/d40c1879f757...b19c19d604ad
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] b19c19d - Deploying to main from @ amaranth-lang/amaranth@f2dab705ee245e82f71a0b1d283a1652d6d026c7 🚀
<jfng[m]> <whitequark[cis]> "or I guess InputOnly, PushPull..." <- in OpenDrain mode, you'd only drive `oe` if `o` is 0 ?
<whitequark[cis]> yes
<whitequark[cis]> well, you always drive o=0, and you do oe=OData or whatever the field was called
<jfng[m]> yeah
<_whitenotifier-7> [amaranth] wanda-phi opened pull request #1169: build.plat: Fix `toolchain_prepare` interface breakage. - https://github.com/amaranth-lang/amaranth/pull/1169
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1169: build.plat: Fix `toolchain_prepare` interface breakage. - https://github.com/amaranth-lang/amaranth/pull/1169#issuecomment-1968860989
<_whitenotifier-7> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1169-f2dab705ee245e82f71a0b1d283a1652d6d026c7 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] wanda-phi 2356e8d - build.plat: Fix `toolchain_prepare` interface breakage.
<_whitenotifier-7> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/f2dab705ee24...2356e8d06b3c
<_whitenotifier-7> [amaranth] whitequark closed pull request #1169: build.plat: Fix `toolchain_prepare` interface breakage. - https://github.com/amaranth-lang/amaranth/pull/1169
<_whitenotifier-7> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1169-f2dab705ee245e82f71a0b1d283a1652d6d026c7 - https://github.com/amaranth-lang/amaranth
<_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/b19c19d604ad...0d2e3261a55e
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 0d2e326 - Deploying to main from @ amaranth-lang/amaranth@2356e8d06b3c5222b587d9478607105b3297580b 🚀
<_whitenotifier-5> [amaranth] whitequark opened pull request #1170: CI: smoketest some downstream projects - https://github.com/amaranth-lang/amaranth/pull/1170
<_whitenotifier-7> [amaranth] codecov[bot] commented on pull request #1170: CI: smoketest some downstream projects - https://github.com/amaranth-lang/amaranth/pull/1170#issuecomment-1968916064
<_whitenotifier-5> [amaranth] wanda-phi opened pull request #1171: build.plat: Avoid calling `_propagate_domains` twice. - https://github.com/amaranth-lang/amaranth/pull/1171
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1171: build.plat: Avoid calling `_propagate_domains` twice. - https://github.com/amaranth-lang/amaranth/pull/1171#issuecomment-1968940492
<_whitenotifier-7> [amaranth-boards] whitequark opened pull request #241: Add smoke tests for a selection of iCE40, ECP5, Gowin, Xilinx boards - https://github.com/amaranth-lang/amaranth-boards/pull/241
<_whitenotifier-5> [amaranth-stdio] kivikakk commented on pull request #15: serial: use init= and add_testbench. - https://github.com/amaranth-lang/amaranth-stdio/pull/15#issuecomment-1968981614
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1170-2356e8d06b3c5222b587d9478607105b3297580b - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/2356e8d06b3c...aa9f48ccb29c
<_whitenotifier-7> [amaranth-lang/amaranth] whitequark aa9f48c - CI: smoketest some downstream projects.
<_whitenotifier-5> [amaranth] whitequark closed pull request #1170: CI: smoketest some downstream projects - https://github.com/amaranth-lang/amaranth/pull/1170
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1170-2356e8d06b3c5222b587d9478607105b3297580b - https://github.com/amaranth-lang/amaranth
<_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/0d2e3261a55e...4d198fefcf19
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 4d198fe - Deploying to main from @ amaranth-lang/amaranth@aa9f48ccb29c0bed95b16fb346f6fb73bcdcf29a 🚀
<_whitenotifier-5> [amaranth] wanda-phi edited pull request #1171: build.plat, back.rtlil: Fix #1104 fallout. - https://github.com/amaranth-lang/amaranth/pull/1171
<_whitenotifier-7> [amaranth] whitequark reviewed pull request #1171 commit - https://github.com/amaranth-lang/amaranth/pull/1171#discussion_r1505991833
<_whitenotifier-5> [amaranth] whitequark reviewed pull request #1171 commit - https://github.com/amaranth-lang/amaranth/pull/1171#discussion_r1505992274
<_whitenotifier-7> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1171-aa9f48ccb29c0bed95b16fb346f6fb73bcdcf29a - https://github.com/amaranth-lang/amaranth
cr1901_ is now known as cr1901
<_whitenotifier-5> [amaranth] wanda-phi reviewed pull request #1171 commit - https://github.com/amaranth-lang/amaranth/pull/1171#discussion_r1506004404
<_whitenotifier-5> [amaranth-lang/amaranth] wanda-phi 5442583 - build.plat, back.rtlil: Fix #1104 fallout.
<_whitenotifier-7> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±3] https://github.com/amaranth-lang/amaranth/compare/aa9f48ccb29c...544258354bdc
<_whitenotifier-7> [amaranth] whitequark closed pull request #1171: build.plat, back.rtlil: Fix #1104 fallout. - https://github.com/amaranth-lang/amaranth/pull/1171
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1171-aa9f48ccb29c0bed95b16fb346f6fb73bcdcf29a - https://github.com/amaranth-lang/amaranth
<_whitenotifier-7> [amaranth] whitequark opened pull request #1172: CI: use HEAD Amaranth for smoke testing - https://github.com/amaranth-lang/amaranth/pull/1172
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 7ed6514 - Deploying to main from @ amaranth-lang/amaranth@544258354bdcc2773b037c29c77b95ba01e6cd17 🚀
<_whitenotifier-7> [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/4d198fefcf19...7ed65146eddb
<_whitenotifier-5> [amaranth] codecov[bot] commented on pull request #1172: CI: use HEAD Amaranth for smoke testing - https://github.com/amaranth-lang/amaranth/pull/1172#issuecomment-1969045876
<_whitenotifier-7> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1172-544258354bdcc2773b037c29c77b95ba01e6cd17 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1172-544258354bdcc2773b037c29c77b95ba01e6cd17 - https://github.com/amaranth-lang/amaranth
<cr1901> >it's not possible to add this lint. Why?
<whitequark[cis]> how would you suppress it?
<cr1901> # noqa: AMA10x (I was thinking an external linter. Is there any reason why this is impossible other than "it's out of scope", which btw is perfectly reasonable)
<whitequark[cis]> Amaranth doesn't do hot comments in the middle of the file
<whitequark[cis]> any lint that is added must have a way to suppress it with just normal Amaranth syntax
<cr1901> You're already embedded into Python, with all it's facilities. Why are hot comments out of scope?
<whitequark[cis]> (I also find the # noqa: pattern so egregious that I will never accept the use of a tool that requires it in any project I maintain)
<whitequark[cis]> cr1901: because they're syntactically foreign to the language
<Wanda[cis]> we're currently not doing any crimes that require actually parsing the file ourselves
<whitequark[cis]> a hot comment is attached to what? the line? the expression? the preceding text? the following text? the entire block after?
<whitequark[cis]> Wanda[cis]: except for the `# amaranth: UnusedElaboratable` thing
<whitequark[cis]> which is both problematic enough, and janky enough that it doesn't work (I think the open bug was filed by cr1901 even?)
<Wanda[cis]> barely counts as parsing
<Wanda[cis]> heh
<whitequark[cis]> but yeah, # amaranth: doesn't require parsing as it has to be the very first thing in the file
<_whitenotifier-5> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1172-544258354bdcc2773b037c29c77b95ba01e6cd17 - https://github.com/amaranth-lang/amaranth
<whitequark[cis]> so thinking more about this, I think we maybe can do `my_sig_with_intenum_shape == (MyVariant & cond1 & cond2).bool()` ?
<whitequark[cis]> that is: warn on a comparison where one operand has a non-unsigned(1) shape and the other is a logical expression which isn't wrapped in .bool()
<cr1901> That would detect all the errors I made last night
<cr1901> (Transforming m.If(a & b & c): to m.If(d == e & b & c): via find-replace without thinking to include parens)
<whitequark[cis]> here's the issue: https://github.com/amaranth-lang/amaranth/issues/380
<cr1901> Okay, very good, thank you :D
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/544258354bdc...3a1f0a7c32cb
<_whitenotifier-7> [amaranth-lang/amaranth] whitequark 3a1f0a7 - CI: use HEAD Amaranth for smoke testing.
<_whitenotifier-5> [amaranth] whitequark closed pull request #1172: CI: use HEAD Amaranth for smoke testing - https://github.com/amaranth-lang/amaranth/pull/1172
<_whitenotifier-7> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1172-544258354bdcc2773b037c29c77b95ba01e6cd17 - https://github.com/amaranth-lang/amaranth
<cr1901> Yea I was confused by "how would you suppress it?"; we both agree based on #380 that this is something you almost never want.
<_whitenotifier-7> [amaranth] whitequark commented on issue #380: Emit a diagnostic when parentheses are omitted in logical expressions with comparisons - https://github.com/amaranth-lang/amaranth/issues/380#issuecomment-1969098849
<whitequark[cis]> but when you do want it, how do you actually write it?
<whitequark[cis]> given that PYTHONWARNINGS=error exists and should be widely used in Amaranth projects
<_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/7ed65146eddb...ba05d29aeea3
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] ba05d29 - Deploying to main from @ amaranth-lang/amaranth@3a1f0a7c32cb1999ba4db6d6a397bc393457ab23 🚀
<whitequark[cis]> something that can't be reasonably suppressed when you do want it has no right to be a lint, no matter what else
<cr1901> I don't know how you actually write that without triggering a lint
<whitequark[cis]> then it can't be a lint
<whitequark[cis]> every single one of our lints has an immediately applicable "here's how you make the compiler shut up if you actually want this" section in the message
<cr1901> I almost said "add parens", but that won't help since the parens aren't there by the time you're doing the lint
<whitequark[cis]> like... the whole point of having a diagnostic as a lint is because it can have false positives
<whitequark[cis]> if it never has false positives it should be a hard error, yes?
<whitequark[cis]> and if it does have false positives it must be suppressable without making you do busywork that you will hate, because if that happens a few times in a row people will just suppress all lints globally (or write you hate mail, or both)
<cr1901> Yes, it could have false positives. "I cannot comprehend the confusion" where the current behavior is desirable, but that doesn't mean those situations don't exist.
<whitequark[cis]> it's not super difficult to imagine a situation where it's desirable
<whitequark[cis]> `with m.If(flags == (mask & old_flags)):`
<whitequark[cis]> depending on how restrictive the conditions for the lint firing are, it may or may not fire for all of the variations there. e.g. you could exclude any logical expressions whose both operands have a non-boolean shape
<whitequark[cis]> however `with m.If(flags == (1 & old_flags)):` is still basically reasonable to write
<cr1901> Yes, all the use cases I debugged yesterday were transforming an If expression of bools into "If expression of bools and an IntEnum flag"
<whitequark[cis]> if it wasn't an IntEnum we could have made Enum.__eq__ fire a warning on comparison with non-enum
<whitequark[cis]> but with IntEnum this is explicitly allowed
<cr1901> Something else broke when I used plain old enum, and had to use IntEnum. I'll check after breakfast.
<cr1901> Maybe that condition is gone/no longer applies and I can go back to plain old enums
<whitequark[cis]> actually
<whitequark[cis]> Wanda has implemented the check in Enum.__eq__, right?
<whitequark[cis]> yeah, she did! so this should've been covered already if you weren't using an IntEnum
<cr1901> Yea I don't need IntEnum, I made a mistake in my tbs
<cr1901> (yield my_enum) == enum_var =>(yield my_enum) == enum_var.value
<cr1901> you can't do the version on the LHS of => without IntEnum, and I forgot that .value works with Enum
<whitequark[cis]> oh yeah, we're actually planning to fix that with the async testbenches
<cr1901> oh nice
<_whitenotifier-5> [amaranth] wanda-phi commented on issue #1150: Driver-Driver conflict causes unclear error message [regression from 0.4] - https://github.com/amaranth-lang/amaranth/issues/1150#issuecomment-1969146813
<_whitenotifier-7> [amaranth] codecov[bot] commented on pull request #1173: hdl._ir: Inline `AssignmentLegalizer` into netlist building. - https://github.com/amaranth-lang/amaranth/pull/1173#issuecomment-1969150553
<_whitenotifier-5> [amaranth-boards] whitequark closed pull request #241: Add smoke tests for a selection of iCE40, ECP5, Gowin, Xilinx boards - https://github.com/amaranth-lang/amaranth-boards/pull/241
<_whitenotifier-7> [amaranth-lang/amaranth-boards] whitequark b67996c - Add smoke tests for a selection of iCE40, ECP5, Xilinx, Intel boards.
<_whitenotifier-5> [amaranth-lang/amaranth-boards] whitequark pushed 1 commit to main [+0/-0/±8] https://github.com/amaranth-lang/amaranth-boards/compare/5b2cb8e38ebc...b67996c48f1b
<_whitenotifier-7> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1173-3a1f0a7c32cb1999ba4db6d6a397bc393457ab23 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-5> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±6] https://github.com/amaranth-lang/amaranth/compare/3a1f0a7c32cb...f8e2d26b8f36
<_whitenotifier-7> [amaranth-lang/amaranth] wanda-phi f8e2d26 - hdl._ir: Inline `AssignmentLegalizer` into netlist building.
<_whitenotifier-7> [amaranth] whitequark closed pull request #1173: hdl._ir: Inline `AssignmentLegalizer` into netlist building. - https://github.com/amaranth-lang/amaranth/pull/1173
<_whitenotifier-5> [amaranth] whitequark closed issue #1150: Driver-Driver conflict causes unclear error message [regression from 0.4] - https://github.com/amaranth-lang/amaranth/issues/1150
<_whitenotifier-7> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1173-3a1f0a7c32cb1999ba4db6d6a397bc393457ab23 - https://github.com/amaranth-lang/amaranth
<_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/ba05d29aeea3...eb2d102059e9
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] eb2d102 - Deploying to main from @ amaranth-lang/amaranth@f8e2d26b8f366fe88980f485c03873b2e897bb6a 🚀
<_whitenotifier-5> [amaranth-lang/playground] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/playground/compare/69bd7326abfc...89cbf9e4f51c
<_whitenotifier-7> [amaranth-lang/playground] whitequark 89cbf9e - Update for Amaranth v0.4.3.
<_whitenotifier-5> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±2] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/eb2d102059e9...a973998cd7eb
<_whitenotifier-7> [amaranth-lang/amaranth-lang.github.io] whitequark a973998 - Deploying to main from @ amaranth-lang/playground@89cbf9e4f51c2635d12fcee975636924c2dccaec 🚀
<cr1901> https://github.com/amaranth-lang/amaranth/blob/main/.github/workflows/main.yaml#L130 Why is linkcheck a separate job from building docs?
<Wanda[cis]> so that it can fail
<Wanda[cis]> eg. due to some server shitting itself
<whitequark[cis]> because failure to build docs prevents a PR from being mergeable, and failure of an external party to keep their website up should not
<whitequark[cis]> the only things that should prevent a PR from being mergeable are those which are under our control or GitHub's
<whitequark[cis]> this is mostly true right now, in particular, launchpad going down breaks Amaranth builds because formal
<whitequark[cis]> cr1901: btw, can you remind me the status of yowasp-boolector? is it generally usable?
<whitequark[cis]> did it need a better SAT engine plugged in or something?
<cr1901> It needs a better SAT engine, I got it working locally w/ MiniSAT for far better performance (about half as good as Cadical, the best), but I haven't upstreamed any of the required patches yet
<whitequark[cis]> gotcha
<whitequark[cis]> any timeline on that? it seems like the current published version is basically unusable, which I should probably make a note about, or just unpublish it
<cr1901> I'll look into it after I get smolarith published (hopefully today or tomorrow)
<whitequark[cis]> cool, thank you
<whitequark[cis]> David Sporn was doing yices2, right
<cr1901> yes
<whitequark[cis]> if we had yices2, we could remove our dependency on launchpad, which seems to go down quite a bit recently
<cr1901> TLDR: "minisat, without changes, requires gzip/or similar to build. And boolector actually doesn't link in minisat properly if gzip isn't on the system path. But wait, I don't actually need the gzip crap, so why not upstream a "basic build mode" and patch boolector to know about it?"
<whitequark[cis]> yeah
<whitequark[cis]> there's also an experimental proposal for adding SjLj to wasi-libc https://github.com/WebAssembly/wasi-libc/pull/467
<whitequark[cis]> that wouldn't work on yowasp though because none of the yowasp targets are EH-enabled and it lowers to exception handling
<whitequark[cis]> but it's good that there is progress
<whitequark[cis]> also the "new" EH proposal is something I might be able to write a lowering for in binaryen
<cr1901> Before I completely lose my train of thought- there's no "allow failure" for the GHA linkcheck?
<cr1901> (I use "|| true" for steps I can allow to fail lmao)
<whitequark[cis]> then how will I learn that linkcheck failed?
<cr1901> Actually I lied... I use continue-on-error inside a single job for a step which a failure is tolerable, looking at Sentinel
<cr1901> Mainly, if linkcheck in Amaranth fails as-is, it'll make your CI red, correct?
<whitequark[cis]> it'll make a job red. I don't actually look at the CI as a whole since Amaranth has dozens of jobs
<cr1901> So not sure how having it as a different step will prevent marking a PR mergeable
<cr1901> Ahhh
<whitequark[cis]> I know branch protection rules won't let me merge something which fails an important job
<whitequark[cis]> so I just look through them for relevant failures
<_whitenotifier-5> [amaranth] tpwrules commented on issue #1160: Normalize diagnostics to use either a backtick or a single quote, not both at random - https://github.com/amaranth-lang/amaranth/issues/1160#issuecomment-1969422606
<Chips4MakersakaS> Talking about YoWASP; would you see ngspice falling under that umbrella ? Was packaging ngspice some days ago and would have liked a python installable version. May want to learn how to do it myself (no hard promise though).
<whitequark[cis]> it's a CLI tool, right? does it spawn subprocesses?
<Chips4MakersakaS> It can be run as CLI tool but can also have it's own crude X11 interface (I think still Athena widgets...). I don't think it needs subprocess; it can be run multi-threaded though.
<cr1901> https://smolarith.readthedocs.io/en/doc/api.html Okay, docs are done. Could I have some extra eyes over them? I applied previous feedback.
<cr1901> (Of course I found one thing already lmao)
<whitequark[cis]> Chips4MakersakaS: sounds good. wasm has threads support, so that's not an issue
<Chips4MakersakaS> So you see YoWASP broader than digital FPGA ? ngspice is clearly analog ASIC focused.
<whitequark[cis]> cr1901: if you want to be compatible with Amaranth streams with *no upgrade necessary*, use payload/valid/ready
<whitequark[cis]> Chips4MakersakaS: YoWASP is a software distribution
<cr1901> Ack
<whitequark[cis]> I'm happy to ship anything that builds to Wasm and is vaguely EE-related
<whitequark[cis]> I'll need to refactor a few things to keep maintenance overhead low, but it's not exactly very high already
<Chips4MakersakaS> Perfect, I will look further coming days; have also interest in getting to know more about WebAssembly.
<cr1901> Anyone build OCaml C code using WASM? The SAIL RISC-V emulator is painful enough to compile that both olofk and I provide a Linux binary in-line
<whitequark[cis]> sounds good
<galibert[m]> does webasm in the browser still require js glue?
<whitequark[cis]> define JS glue?
<galibert[m]> iirc it wasn't possible to reach the dom and change it, at least?
<whitequark[cis]> it still isn't
<galibert[m]> iow, it's not possible to have no js
<whitequark[cis]> it's not a particularly high priority goal, though I know people have been working towards that
<whitequark[cis]> I literally do not care about having no JS
<galibert[m]> Sure, but I know you'd know the state of things :-)
* tpw_rules thinks about nix in the corner
<cr1901> from amaranth.lib.payload import StructLayout <-- whoops
<whitequark[cis]> tpw_rules: what has worse UX: pip or nix?
<tpw_rules> definitely nix
<tpw_rules> that's why i don't say use it :P
<whitequark[cis]> hehe
<whitequark[cis]> the cool thing about yowasp is that as we're moving towards wasm components, it should be possible to ship just the wasm file, with the data files embedded inside in a virtual filesystem
<tpw_rules> maybe i'll set up nix to build the wasm someday, more for my own edification than anything
<whitequark[cis]> I can already do this for everything except yosys, really
<tpw_rules> i think that's cool, but it's good to trace back to the source too
mcc111[m] has quit [Quit: Idle timeout reached: 172800s]
<galibert[m]> what's special with yosys?
<whitequark[cis]> and then the wasm file is runnable on any embedder that implements wasi
<whitequark[cis]> galibert: some of the yosys share files are needed by the outside code (CXXRTL, primarily)
<galibert[m]> ahhhhh
<whitequark[cis]> this is what you'll eventually use to manipulate DOM from Wasm
<tpw_rules> is webidl related to COM
<whitequark[cis]> sorta?
<galibert[m]> "Side effects of reading this code may include facepalming, mouth drops, and a strong desire to rewrite all of it. Proceed at your own risk"
<galibert[m]> Love that
<whitequark[cis]> it's related inasmuch as WebIDL and COM both use IDL
<tpw_rules> that's what i thought
<whitequark[cis]> at least as a basis
<tpw_rules> what's old is new again i guess
<whitequark[cis]> I think IDL predates COM by over five years
<whitequark[cis]> WebIDL has actually been used all this time
<galibert[m]> IDL is from the time people thought CORBA was useful :-P
<whitequark[cis]> wasm components are not entirely unlike corba
<whitequark[cis]> they use WIT (a type of interface description language, not compatible with IDL) to describe methods that can be called on resources passed between shared-nothing (as opposed to shared-memory) components
<galibert[m]> the layers of interpretation/jit allow for transparent serializing i guess when needed
<whitequark[cis]> more of the abstract execution model, but yeah
<whitequark[cis]> * more it is the abstract execution model that allows it, but yeah
<whitequark[cis]> since wasm code has to explicitly request every single thing it's using, even a linear memory
<whitequark[cis]> cr1901: in `:type:` blocks, you can explicitly use e.g. `:func:` and `:class:` etc
<whitequark[cis]> this gives you cross-referencing at the cost of being kind of verbose
<whitequark[cis]> <cr1901> "Anyone build OCaml C code..." <- I think there's wasm_of_ocaml now
<whitequark[cis]> although wasm_of_ocaml requires EH, GC, TC, and JSPI, which is a pretty tall order
<whitequark[cis]> (I think it means basically "runs in Chrome")
<cr1901> heh
<cr1901> SAIL is hell to build only because I'm not exactly great w/ OCaml build systems (especially since everyone seems to be going to Dune now and I've basically no Dune experience)
<cr1901> Oh, and it takes 30 minutes to compile, but I imagine I could fix that by removing LTO if I actually knew how to ocaml-build-system
<whitequark[cis]> which of the 11 build systems in wide use?
<whitequark[cis]> OCamlMakefile, ocamlbuild, omake, topkg, OASIS, dune, ... it's been a while since I've done this
<cr1901> I only know of two of those lmao
<whitequark[cis]> you are incredibly lucky
<galibert[m]> I know none of them, I feel luckier :-)
<cr1901> The SAIL build does basically "just work" now that I automated it, just... the ppl writing the current conformance tests should provide binaries for the SAIL model. I know ppl who gave up and use the old tests b/c of SAIL and riscof plugins being a pain to write
<whitequark[cis]> cr1901: > Signature containing the following attributes:
<whitequark[cis]> Signatures do not have (user-specified) attributes, they have members
<whitequark[cis]> Interfaces have attributes (which correspond to signature members)
<cr1901> fixed locally
<cr1901> Idk if it's a bug, or me not getting the syntax just right, but writing out :class:`amaranth:amaranth.hdl.Signal` in e.g. Attributes section doesn't generate a link
<cr1901> Generates "
<cr1901> " verbatim (no hyperlink)
<cr1901> Type:
<cr1901> amaranth:amaranth.hdl.Signal
<cr1901> But it's good to know that you can use these roles in type blocks
<whitequark[cis]> hm, interesting
<whitequark[cis]> I might just be wrong, but I thought I used those
<whitequark[cis]> maybe you need napoleon for that?
<cr1901> I am using Napoleon actually. This would be the only weirdness I see with refs getting eaten: https://github.com/cr1901/smolarith/blob/doc/src/smolarith/div.py#L199-L200 I could be Napoleon preprocessor shenanigans.
<cr1901> wouldn't* be
<cr1901> https://github.com/amaranth-lang/amaranth/blob/main/.github/workflows/main.yaml#L233-L234 TIL that Amaranth is expanding into the HTML game industry
<whitequark[cis]> HTML game industry?
<cr1901> https://twinery.org/ (I confused Twine with Ren'Py, which _is_ a Python game making library. Presumably this is not the same twine)
<whitequark[cis]> oh, nice
<cr1901> I've never auto-published packages before, so looking at Amaranth's CI and perhaps stealing the parts that'll work for me
<whitequark[cis]> ah yeah
<whitequark[cis]> you'll also need to enable OIDC publishing
jjsuperpower has quit [Ping timeout: 240 seconds]
jjsuperpower has joined #amaranth-lang
<cr1901> Noted. After taking a look, I might do that next release then, just so I can get a release out the door (and remove more stuff from my current todo stack)
jjsuperpower has quit [Remote host closed the connection]
jjsuperpower has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
frgo_ has joined #amaranth-lang
frgo has quit [Ping timeout: 252 seconds]
frgo_ has quit [Ping timeout: 272 seconds]
frgo has joined #amaranth-lang
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 268 seconds]
Guest93 has joined #amaranth-lang
Guest93 has quit [Client Quit]
notgull has joined #amaranth-lang