whitequark changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings on Mondays at 1700 UTC · code https://github.com/amaranth-lang · logs https://libera.irclog.whitequark.org/amaranth-lang
mkal has joined #amaranth-lang
<mkal> I'm looking for some rtl wrapper examples in amaranth. Search doesn't generate good ones.
<_whitenotifier-9> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/8946caf2b6ce...a77a20a211ba
<_whitenotifier-9> [YoWASP/nextpnr] whitequark a77a20a - Update dependencies.
<d1b2> <jer_emy> @mkal is this what you mean? https://lab.ktemkin.com/post/amaranth-instance/
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
bl0x has joined #amaranth-lang
bl0x_ has quit [Ping timeout: 240 seconds]
<mkal> d1b2 that I saw but that's a very basic one. How does one include a larger module with many ports? Is there an API which generates the instance definition from a verilog module definition? after inferring busses etc? Suppose I have a module with a couple of axi streams, clock, reset etc. I don't want to type everything from the module.
<d1b2> <zyp> there's no premade verilog parser, but it's python so you can script whatever you want
<d1b2> <zyp> to hook up groups of signals all at once you could e.g. make adapter functions like this: https://paste.jvnv.net/view/OQXP9
<mkal> I also see this discussion from 3 years ago and I'm curious if the stream abstraction has made it into amaranth library. If yes, a pointer would be appreciated.
<mkal> the adapter idea is cool. I think I'll try to figure out how to use verible or https://github.com/MikePopoloski/slang to generate something like InstanceFromVerilog
<d1b2> <Olivier Galibert> Not yet, there's work going on on the Interface aspects, which afaict are a requirement for a decent implementation of streams
mkal has quit [Quit: Client closed]
<d1b2> <Olivier Galibert> Ok, I need help. I did something, not sure what, and now amaranth/sim is doing things that are impossible in my understanding of clock domains
<d1b2> <Olivier Galibert> https://og.kervella.org/test.py
<d1b2> <Olivier Galibert> run it, look at the result in gtkwave, bench/top/pll/pll_1
<d1b2> <Olivier Galibert> also look at bench/top/s1_en and bench/top/s0_en
<d1b2> <Olivier Galibert> you can see that s0_en/s1_en select every other clk pos edge, e.g. they divide by two
<d1b2> <Olivier Galibert> the PLL object is instanciated by TB with domains set as s0=clk+s0_en and s1=clk+s1_en
<d1b2> <Olivier Galibert> pll_1 is set on m.d.s0, so it should change only on s0 enabled, e.g. at most every two clocks
<d1b2> <Olivier Galibert> yep looking at the waveform it does 1-clock wide pulses
<d1b2> <Olivier Galibert> that was working five minutes ago, I changed too many things at a time, and now I get something impossible
nak has joined #amaranth-lang
mkal has joined #amaranth-lang