<_whitenotifier>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 85e60a4 - Deploying to main from @ amaranth-lang/amaranth-soc@746709e1e992bccf6e2362450243cafd00d72a14 🚀
__DuBPiRaTe__ has quit [Quit: Leaving]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 265 seconds]
Degi_ is now known as Degi
d_olex_ has quit [Ping timeout: 248 seconds]
mabl[m] has joined #amaranth-lang
<mabl[m]>
Does that mean that the Amaranth CXXRTL simulator backend is also progressing?
d_olex_ has joined #amaranth-lang
d_olex_ has quit [Read error: Connection reset by peer]
d_olex_ has joined #amaranth-lang
d_olex_ has quit [Read error: Connection reset by peer]
d_olex_ has joined #amaranth-lang
<whitequark[cis]>
mabl: I actually plan to add CXXRTL protocol support to the Amaranth Python simulator
<maikmerten[m]>
got my Amaranth SN76489 (programmable sound generator) implementation to a satisfying state. In the simulator, it takes about 2 hours to generate one minute of audio, so here's the code and an chip-tune audio sample: https://drive.google.com/drive/folders/1tpcZts99IWvzLWVgCxoS8io277wRVM5V
<maikmerten[m]>
hmmm.. I assume I can replace "clk_counter = Signal(math.ceil(math.log(self.clk_divider + 1, 2)))" with "clk_counter = Signal(range(0, self.clk_divider))"...
jfng[m] has joined #amaranth-lang
<jfng[m]>
`ceil(log())` does unsound int->float conversions, e.g.
<jfng[m]>
```math.ceil(math.log2((1 << 64) + 1))``` would incorrectly return 64
<jfng[m]>
`range(self.clk_divider)` is fine indeed
<maikmerten[m]>
(actually, in this special case, I need range(self.clk_divider + 1), because I need to store values up to (including) self.clk_divider, but nonetheless using range() to specify a shape is indeed very neat)
<whitequark[cis]>
maikmerten: `range()` is actually how the "shape" system started! in an ancestor of Amaranth, you only had something like `Signal(min=, max=)` and you'd so easily get fencepost errors with them because it was hard to remember whether it's inclusive or exclusive
<_whitenotifier>
[amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] 82be1d0 - Deploying to main from @ amaranth-lang/amaranth@e30d822a7d93ee615e70e95a9958051dcc794802 🚀
<vup>
whitequark: I don't have in-depth understanding of how the namer works, so I might be missing something, but how would improving the namer help we with the name of the wires there?
<whitequark[cis]>
based on where they're driven, maybe
<vup>
interesting idea, I did not consider making the namer reason about non-local things. I need to think about wether this would make things clearer
<zyp[m]>
<whitequark[cis]> "based on where they're driven..." <- not if that implies that signals in bidirectional interfaces will have different prefixes