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
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 264 seconds]
Degi_ is now known as Degi
peeps[zen] has joined #amaranth-lang
<_whitenotifier-f> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/ec94d49655da...cfb8adcc6098
<_whitenotifier-f> [YoWASP/nextpnr] whitequark cfb8adc - Update dependencies.
Darius has quit [Ping timeout: 240 seconds]
Darius has joined #amaranth-lang
<cr1901> I have added a signed multicycle divider to smolarith. Not as rigorously tested, but it works to my satisfaction: https://github.com/cr1901/smolarith/blob/main/src/smolarith/div.py
<cr1901> (It's only a signed divider. I'll have to write an unsigned divider later when I'm up for it)
<whitequark[cis]> nice!!!
<cr1901> Tyvm :). Bedtime for me I think. Maybe I'll think of a way to combine an unsigned/signed divider while I sleep. One size-friendly way is to extend the divider inputs/outputs by one bit more than needed (to represent the entire unsigned range). Certainly better than two dividers :P.
notgull has quit [Ping timeout: 240 seconds]
notgull has joined #amaranth-lang
trabucay1e is now known as trabucayre
toshywoshy has quit [Server closed connection]
toshywoshy has joined #amaranth-lang
<galibert[m]> I thought one could directly give objects with interfaces to ports=[...], I guess it's not in yet?
<whitequark[cis]> you omit ports entirely
<galibert[m]> ohhh
<galibert[m]> TypeError: The convert() function requires a ports= argument
<whitequark[cis]> I think it might be in a branch
<whitequark[cis]> one sec
<galibert[m]> Oh, I did a Fragment.get I shoudln't have done
<whitequark[cis]> ahhh yeah
<whitequark[cis]> that's a bit awkward yea
<galibert[m]> It's better not to have to do the Fragment.get actually, so I like how it's now
<galibert[m]> errr what, wishbone.Arbiter doesn't have a signature?
<whitequark[cis]> we're still in process of migrating stuff
<whitequark[cis]> I think jfng is working on this at the moment, but better ask him about it
<galibert[m]> I guess, but jfng told me... yesterday? it was in
<galibert[m]> " btw, feel free to try the new bus interfaces in amaranth-soc, they're in main now"
<galibert[m]> now... am I up to date though?
<galibert[m]> Yes, yes I am " wishbone.bus: migrate to lib.wiring interfaces."
<galibert[m]> I guess there's an issue for how the Arbiter manages its interface
<galibert[m]> more stuff to understand, cool :-)
<galibert[m]> Hmmm, Arbiter._bus is an interface, but Arbiter itself doesn't have a signature
<galibert[m]> I wonder if it's how it should be? I mean, you don't usually want to generate verilog for an arbiter itself, so it may not matter
<galibert[m]> Or Arbiter should have a .signature with ._bus in it?
<galibert[m]> Ok, I managed to make the Arbiter have a correct signature, need to PR that
<_whitenotifier-f> [amaranth-soc] galibert opened pull request #54: wishbone.bus: Ensure Arbiter has a correct .signature - https://github.com/amaranth-lang/amaranth-soc/pull/54
<galibert[m]> How short the commit is is, I think, a demonstration of how nice the design is in the first place
<galibert[m]> So, I generate the verilog now, but there is a kink. The test adds two wishbone interfaces as targets, but the verilog generator does not pick them up as ports. Not sure it can. That's in large part why I thought giving a list of interfaces was useful
<galibert[m]> the generated verilog for the problematic part looks sane:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/tzSFLGYXRBxcCmCHIoWtzEqs>)
jfng[m] has joined #amaranth-lang
<jfng[m]> galibert: the reason i've punted adding `.signature`s to Arbiter/Decoder primitives is that in the case of Decoders, the bus interface has a MemoryMap, which is assigned to it after creation:
<jfng[m]> and if this was using `.signature`, i don't know how to assign this memory map inside `.signature.create()`
<jfng[m]> for wishbone.Arbiter, it isn't a problem indeed, as it doesn't use a memory map
<jfng[m]> a possible solution is to stop doing that, and pass memory_map as a constructor parameter of the decoder
<galibert[m]> Yeah, I didn’t try to change Decoder given the complexity. Arbiter was easy though:-)
tpw_rules has quit [Server closed connection]
tpw_rules has joined #amaranth-lang
jess has quit []
lambda has quit [Quit: WeeChat 4.0.4]
lambda has joined #amaranth-lang
chaoticryptidz has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jjsuperpower has joined #amaranth-lang
chaoticryptidz has joined #amaranth-lang
notgull has quit [Ping timeout: 240 seconds]
notgull has joined #amaranth-lang
sporniket has joined #amaranth-lang
<galibert[m]> Ah, found the loop, and it's a bad one
<galibert[m]> wait... how does the current arbiter manage to work in the first place?
<sporniket> hello, I reach the point where I am ready to instanciate a Pll for my platform, and use the output signals as clocks, and I found some sample code for that there : https://codeberg.org/ECP5-PCIe/ECP5-PCIe/src/branch/main/Gateware/ecp5_pcie
<sporniket> Do I understand correctly that all it takes is to declare something like m.d.comb += ClockSignal("my_new_domain").eq(myPll.clkout0) to bring the new clock domain "my_new_domain" into existence, or is there a catch ?
<galibert[m]> m.d.comb += self.video.clk.eq(self.o_video_clk)
<galibert[m]> m.d.comb += self.audio.clk.eq(self.o_audio_clk)
<galibert[m]> No, you create your new domain then you set its .clk
<sporniket> Understood, thanks :)
<galibert[m]> Enjoy :-)
sporniket has quit [Quit: Client closed]
pbsds has quit [Ping timeout: 246 seconds]
pbsds has joined #amaranth-lang
<cr1901> Unsigned division is now working as well. It defaults to signed division, and the user is expected to use as_unsigned() if they need to grab unsigned values (and signed parameter is false) on output: https://github.com/cr1901/smolarith/blob/main/src/smolarith/div.py#L11
<cr1901> Now, after a break, I'll improve this code to be more pleasant to read