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
pbsds has joined #amaranth-lang
<_whitenotifier-9> [YoWASP/nextpnr] whitequark pushed 1 commit to develop [+0/-0/±1] https://github.com/YoWASP/nextpnr/compare/8bc2ed114eca...5dd88b92222f
<_whitenotifier-9> [YoWASP/nextpnr] whitequark 5dd88b9 - Update dependencies.
FFY00_ has joined #amaranth-lang
FFY00 has quit [Ping timeout: 250 seconds]
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #amaranth-lang
bl0x_ has joined #amaranth-lang
bl0x has quit [Ping timeout: 264 seconds]
mkal has quit [Quit: Client closed]
bl0x_ is now known as bl0x
byteit101 has quit [Remote host closed the connection]
indy_ is now known as indy
<_whitenotifier-9> [amaranth-boards] josuah commented on pull request #208: Initial support for Tang nano 9k board - https://github.com/amaranth-lang/amaranth-boards/pull/208#issuecomment-1511509027
<_whitenotifier-9> [amaranth-boards] bl0x synchronize pull request #208: Initial support for Tang nano 9k board - https://github.com/amaranth-lang/amaranth-boards/pull/208
<_whitenotifier-9> [amaranth-boards] bl0x commented on pull request #208: Initial support for Tang nano 9k board - https://github.com/amaranth-lang/amaranth-boards/pull/208#issuecomment-1511539329
jess has quit []
jess has joined #amaranth-lang
<_whitenotifier-9> [amaranth] josuah commented on pull request #734: Initial support for gowin vendor via proprietary and apicula toolchain. - https://github.com/amaranth-lang/amaranth/pull/734#issuecomment-1511546814
<_whitenotifier-9> [amaranth] josuah commented on pull request #734: Initial support for gowin vendor via proprietary and apicula toolchain. - https://github.com/amaranth-lang/amaranth/pull/734#issuecomment-1511563473
<bl0x> I thought there was a way to do this in Amaranth, but perhaps not: I'd like to copy a single bit from one signal "src = Signal(8)" to a 1-bit signal "dst = Signal()". Which bit to select for copy depends on yet another signal "selected_bit = Signal(3)". IMO this code should do the copy: "m.d.sync += dst.eq(src[selected_bit])". However, Amaranth complains with "TypeError: Cannot index value with (sig selected_bit)". How does one get around
<bl0x> this usually?
<tpw_rules> a mux is how i would do it
<bl0x> Hm, 8 way mux then? I could also shift src by 1 every time.
<bl0x> And use a constant index. Where does this limitation come from?
<bl0x> There seems to be no problem indexing Array elements with a variable signal.
<d1b2> <Olivier Galibert> because it's memory?
<d1b2> <Olivier Galibert> I mean the arrays
<d1b2> <Olivier Galibert> can you variable-shift?
<d1b2> <Olivier Galibert> (I'm not sure whether amaranth allows it)
<bl0x> Ah, I don't need random access to the bits. I just need one after the other.
<d1b2> <Olivier Galibert> Ah, when I did that for serial I used a 9-bt shift register with a final '1' as a sentinel
<d1b2> <Olivier Galibert> doesn't really add more resources than what a mux would
<bl0x> Ok, I'll check it out. Verilog seems to have no problem with variable indexing though.
<bl0x> Thanks ppl
<d1b2> <OmniTechnoMancer> bl0x: you desire bit_select
<bl0x> Yeah, I tried that too and then got a cryptic error message. About it not being a statement.
<d1b2> <OmniTechnoMancer> can you show error?
<d1b2> <OmniTechnoMancer> And like how you tried to use it?
<bl0x> Oh, oops. It was a cryptic message because the line in question is fine, and it found another error further down. I failed to realize. Sorry, I'll go to my room now.
<d1b2> <OmniTechnoMancer> Ah all good
<bl0x> I did "dst.eq(src.bit_select(selected_bit, 1))", and I think that is the way to do it?
<d1b2> <OmniTechnoMancer> bit_select is how you do indexing if you need the index to be an HDL signal
<d1b2> <OmniTechnoMancer> Verilog basically does not distinguish the cases syntactically AFAIK
<d1b2> <Olivier Galibert> but python probably gets cranky if you want slices to work too
peeps[zen] has joined #amaranth-lang
peepsalot has quit [Ping timeout: 264 seconds]
<whitequark> hi everyone, it is time for our scheduled weekly meeting
<d1b2> <Olivier Galibert> Yay, welcome back, meetings
<Chips4MakersakaS> hello
<whitequark> I'm unfortunately in the middle of a pain flare today, but let's discuss Olivier's RFC anyway
<d1b2> <Olivier Galibert> that may not be good for the rfc 🙂
<d1b2> <Olivier Galibert> pain sucks
<cr1901> I won't be around for the meeting I think either :/
<whitequark> this will be a less formal discussion than usual because of that, but it could be useful anyway
<whitequark> or we could postpone it if you want, Olivier
<d1b2> <Olivier Galibert> you choose, if the pain is too much just go take care of yourself, the rfc won't go anywhere
<whitequark> okay, let's postpone it then, it's a large RFC
<whitequark> hopefully I have healthcare by next week
<whitequark> (I still do not unfortunately)
<d1b2> <Olivier Galibert> if the meeting is a way to stop thinking about the pain, go for the meeting
<d1b2> <Olivier Galibert> and yeah it's large
<whitequark> nothing really makes me stop thinking about pain
<cr1901> This gives me more time to look it over
<whitequark> okay, cool
<d1b2> <Olivier Galibert> I'll try to be there (it's not entirely under my control, it depends a lot on work and train traffic mishaps)
josuah has joined #amaranth-lang
sauce has quit []