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
OwenAnderson[m] has quit [Quit: Idle timeout reached: 172800s]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 268 seconds]
_whitelogger has quit [Ping timeout: 260 seconds]
_whitelogger has joined #amaranth-lang
feldim2425_ has joined #amaranth-lang
feldim2425 has quit [Ping timeout: 256 seconds]
Bonnom has joined #amaranth-lang
Bonnom has quit [Client Quit]
frgo has quit [Ping timeout: 240 seconds]
sohaiber[m] has joined #amaranth-lang
<sohaiber[m]> whats the main reason of having both Array and ArrayLayout? isn't slice just one comb stmt away from becoming a new Signal object?
Bonnom has joined #amaranth-lang
Bonnom10 has joined #amaranth-lang
Bonnom10 has quit [Client Quit]
Bonnom has quit [Client Quit]
Bonnom66 has joined #amaranth-lang
Bonnom66 has quit [Client Quit]
Bonnom has joined #amaranth-lang
<Wanda[cis]> Array is for multiplexing non-uniform inputs
<Wanda[cis]> * Array is useful for multiplexing non-uniform inputs
<Wanda[cis]> eg. you can implement a register interface by stuffing various registers with varying widths into an Array and reading/writing it
frgo has joined #amaranth-lang
<sohaiber[m]> oh right i assumed fixed size elements, thanks
<Wanda[cis]> (also it predates ArrayLayout)
<Wanda[cis]> there are plans to introduce a more flexible mechanism than Array (see https://github.com/wanda-phi/rfcs/blob/choice/text/0052-choice.md), but it's most likely going to happen in 0.6
<sohaiber[m]> this is great 👍
peeps[zen] has quit [Remote host closed the connection]
peeps[zen] has joined #amaranth-lang
frgo_ has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
antoinevg[m] has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier-9> [vscode] TheZoq2 opened pull request #2: Always include all files in the project - https://github.com/YoWASP/vscode/pull/2
Miyu-saki has joined #amaranth-lang
<Miyu-saki> Is there a way to assert reset on the test?
<whitequark[cis]> can you give more context?
<Miyu-saki> I'm looking at https://vivonomicon.com/2020/04/14/learning-fpga-design-with-nmigen/, and there's a `reset` parameter. Is there a global reset wire I can assert?
<whitequark[cis]> ah! so in simulation, all of the registers are initialized to the reset value
<whitequark[cis]> you could also do yield ResetSignal().eq(1)
<whitequark[cis]> actually hold on, that hits an issue on the latest release
<Miyu-saki> Thanks. :) And yeah, I'm encountering \> AttributeError: 'ResetSignal' object has no attribute 'reset'
<whitequark[cis]> try [this playground
<whitequark[cis]> xuZGVmIHRlc3RiZW5jaCgpOlxuICAgIGZvciB4IGluIHJhbmdlKDEwKTpcbiAgICAgICAgeWllbGQgY2Rfc3luYy5yc3QuZXEoeCA8IDUpXG4gICAgICAgIHlpZWxkIFRpY2soXCJzeW5jXCIpXG4gICAgICAgIHByaW50KGZcImNvdW50OiB7eWllbGQgY291bnR9XCIpXG5cbnNpbSA9IFNpbXVsYXRvcihtKVxuc2ltLmFkZF9jbG9jaygxZS02KVxuc2ltLmFkZF9wcm9jZXNzKHRlc3RiZW5jaClcbndpdGggYW1hcmFudGhfcGxheWdyb3VuZC5zaG93X3dhdmVmb3JtcyhzaW0pOlxuICAgIHNpbS5ydW4oKVxuIn0=)
<whitequark[cis]> oh wow that looks gnarly on IRC
<Miyu-saki> Yep. : P I think I can connect with Matrix
MyrlHex[m] has joined #amaranth-lang
<MyrlHex[m]> Hm. Is there a limit to what gets sent to IRC? I'm curious about why this code doesn't work as I expect it to, but I'm worried about spamming IRC
<whitequark[cis]> the limit is 3 or 5 lines or something
<whitequark[cis]> but I think if you send one really massive line it doesn't get applied because Matrix
<whitequark[cis]> you could just use a paste site for this I think
<MyrlHex[m]> Trying to understand better what clock ticks are, and I don't understand why this assertion is false.
<whitequark[cis]> ah, okay, you're hitting an awkward edge case which is going to be fixed in the next release (that'll happen in a week or two)
<whitequark[cis]> try replacing your bare yield with yield; yield Settle()
<MyrlHex[m]> Thanks. :) That works.
<whitequark[cis]> basically, yield gives you a state of the simulation just after the clock tick, and just before every combinational signal settles on their final value
<whitequark[cis]> this isn't what is wanted 98% of time, so we're fixing that (it's like this for historical reasons)
<MyrlHex[m]> Thanks! I was actually also slightly confused by the counter example's assertion, and I just thought I miscounted lol.
<whitequark[cis]> no, it's just ... weird
<whitequark[cis]> it was initially designed to be Migen-compatible but that kind of brought more pain than benefit in the end
<_whitenotifier-9> [YoWASP/vscode] whitequark pushed 1 commit to main [+0/-0/±3] https://github.com/YoWASP/vscode/compare/fca9b4ec1ca0...846964056b73
<_whitenotifier-9> [YoWASP/vscode] TheZoq2 8469640 - Provide the entire workspace folder as input to all commands.
<_whitenotifier-9> [vscode] whitequark commented on pull request #2: Always include all files in the project - https://github.com/YoWASP/vscode/pull/2#issuecomment-2127862669
<_whitenotifier-9> [vscode] whitequark closed pull request #2: Always include all files in the project - https://github.com/YoWASP/vscode/pull/2
<_whitenotifier-9> [YoWASP/vscode] whitequark tagged 8469640 as v0.3.0 https://github.com/YoWASP/vscode/commit/846964056b73981703927fbe1f7c670f30f001f6
<_whitenotifier-9> [vscode] whitequark created tag v0.3.0 - https://github.com/YoWASP/vscode
<_whitenotifier-9> [YoWASP/vscode] whitequark pushed 1 commit to main [+0/-0/±2] https://github.com/YoWASP/vscode/compare/846964056b73...61cdfc5e2af6
<_whitenotifier-9> [YoWASP/vscode] whitequark 61cdfc5 - Bump version.
<MyrlHex[m]> Hm, how do I rename the reset wire, actually? Most of my code uses reset
<MyrlHex[m]> Hey cool, I got to rewrite my Verilog code in Amaranth really quickly. :)
<MyrlHex[m]> One last question I guess: is there a way to satisfyingly do locals like this? https://gist.github.com/adrianparvino/742fccb6fd7458d4d01f8f23dfed1197#file-x-py-L55-L61
<MyrlHex[m]> `not` doesn't work.
<MyrlHex[m]> I could also just use != 1 I guess.
notgull has joined #amaranth-lang
<whitequark[cis]> take a look at the [language guide](https://amaranth-lang.org/docs/amaranth/latest/guide.html)
notgull has quit [Ping timeout: 268 seconds]
<whitequark[cis]> re: the reset wire, do you mean in the output Verilog or something else?
<Miyu-saki> Yep, the Verilog output.
<whitequark[cis]> cd_sync.rst.name = "reset" is an easy one
<whitequark[cis]> you could also make it a port of your component and do m.d.comb += ResetSignal().eq(reset)
<Miyu-saki> Thanks. :) Though I'm guessing the latter technically has 2 reset inputs?
<whitequark[cis]> no, the one you're seeing now is only emitted because nothing is driving it explicitly
<whitequark[cis]> if you do verilog.convert(component) only the component ports and implicitly created clock domains cause signals to appear in the signature
<Miyu-saki> Thanks. :) I really appreciate all the help.
Xesxen_ is now known as Xesxen
lf has quit [Ping timeout: 268 seconds]
lf_ has joined #amaranth-lang