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
Degi has quit [Ping timeout: 272 seconds]
Degi has joined #amaranth-lang
mindw0rk has quit [Ping timeout: 252 seconds]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 244 seconds]
mindw0rk has joined #amaranth-lang
<cr1901> More circuit potpourri... I made an ADC in Amaranth. Requires 1 diff input, a resistor, and capacitor
whitequark[cis] has joined #amaranth-lang
<whitequark[cis]> nice!
frgo has joined #amaranth-lang
<cr1901> It's a slow ADC (sample rate a few kHz), but there's plenty of slow sensors. Good for ice40/ecp5/"Xilinx where xadc is already in use".
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
<whitequark[cis]> it's something I might want to use in Glasgow actually
<whitequark[cis]> although on second look, I think we don't actually need it to be as accurate and a simple "measure time" circuit would suffice for the needs
frgo has quit [Ping timeout: 246 seconds]
<cr1901> In the code, I multiply the "measure time" part by a constant to normalize the count to a power of two (2**lut_width); the raw=True param will give you that value proportional to the count instead of feeding it to a LUT to correct nonlinearity
<cr1901> value proportional to the "measure time" val
<whitequark[cis]> yeah I just mean that for a single counter and a trigger I don't want to pull in a library
<whitequark[cis]> oh I guess there's also no license so I can't
<whitequark[cis]> but I wouldn't want to anyway, so please don't do anything just for me
<cr1901> It's definitely not ready anyway. With that said, when it _is_ ready, I'd appreciate you trying the demo (not ready) on one of your own boards and your own capacitors if you have access to an R2R DAC. I want this ADC to be turnkey (including building the RC circuit, but there's a lot of potential fun failure modes. I want to see if I can catch them as part of param checking.
<cr1901> (And yes I'll add a LICENSE by that point)
<whitequark[cis]> yeah I can try it out
<whitequark[cis]> just ping me
<cr1901> will do
<cr1901> Related... my poor icebreaker has seen better days... the button fell off. Well, at least the default amaranth bitstream can be used to test my soldering job tomorrow
Ekho has quit [*.net *.split]
smkz has quit [*.net *.split]
tcal has quit [*.net *.split]
cr1901 has quit [*.net *.split]
pbsds35 has quit [*.net *.split]
norineko has quit [*.net *.split]
Guest1880 has quit [*.net *.split]
jjsuperpower has quit [*.net *.split]
oter has quit [*.net *.split]
sugarbeet has quit [*.net *.split]
dyniec has quit [*.net *.split]
nimh_ has quit [*.net *.split]
Xesxen has quit [*.net *.split]
jeanthomas has quit [*.net *.split]
ChanServ has quit [*.net *.split]
_whitenotifier-1 has quit [*.net *.split]
mwk has quit [*.net *.split]
adamse has quit [*.net *.split]
Darius has quit [*.net *.split]
mobius has quit [*.net *.split]
sauce has quit [*.net *.split]
Hoernchen has quit [*.net *.split]
nyanotech has quit [*.net *.split]
lethalbit has quit [*.net *.split]
pie_ has quit [*.net *.split]
lambda has quit [*.net *.split]
indy has quit [*.net *.split]
_alice has quit [*.net *.split]
bob_twinkles has quit [*.net *.split]
marcan has quit [*.net *.split]
ormiret has quit [*.net *.split]
feldim2425 has quit [*.net *.split]
Raito_Bezarius has quit [*.net *.split]
electronic_eel has quit [*.net *.split]
V has quit [*.net *.split]
toshywoshy has quit [*.net *.split]
qookie has quit [*.net *.split]
marcan has joined #amaranth-lang
ormiret has joined #amaranth-lang
feldim2425 has joined #amaranth-lang
ChanServ has joined #amaranth-lang
jeanthomas has joined #amaranth-lang
Xesxen has joined #amaranth-lang
nimh_ has joined #amaranth-lang
dyniec has joined #amaranth-lang
sugarbeet has joined #amaranth-lang
oter has joined #amaranth-lang
Guest1880 has joined #amaranth-lang
jjsuperpower has joined #amaranth-lang
Raito_Bezarius has joined #amaranth-lang
mobius has joined #amaranth-lang
_alice has joined #amaranth-lang
mwk has joined #amaranth-lang
indy has joined #amaranth-lang
_whitenotifier-1 has joined #amaranth-lang
tcal has joined #amaranth-lang
Ekho has joined #amaranth-lang
cr1901 has joined #amaranth-lang
smkz has joined #amaranth-lang
nyanotech has joined #amaranth-lang
lethalbit has joined #amaranth-lang
sauce has joined #amaranth-lang
pie_ has joined #amaranth-lang
pbsds35 has joined #amaranth-lang
Hoernchen has joined #amaranth-lang
electronic_eel has joined #amaranth-lang
norineko has joined #amaranth-lang
V has joined #amaranth-lang
bob_twinkles has joined #amaranth-lang
toshywoshy has joined #amaranth-lang
lambda has joined #amaranth-lang
qookie has joined #amaranth-lang
adamse has joined #amaranth-lang
Darius has joined #amaranth-lang
Raito_Bezarius has quit [Max SendQ exceeded]
Raito_Bezarius has joined #amaranth-lang
Ekho has quit [*.net *.split]
smkz has quit [*.net *.split]
tcal has quit [*.net *.split]
tcal has joined #amaranth-lang
smkz has joined #amaranth-lang
Ekho has joined #amaranth-lang
Ekho has quit [Max SendQ exceeded]
mindw0rk has quit [*.net *.split]
DX-MON has quit [*.net *.split]
whitequark[cis] has quit [*.net *.split]
yuriks has quit [*.net *.split]
mithro has quit [*.net *.split]
sorear has quit [*.net *.split]
jess has quit [*.net *.split]
DX-MON has joined #amaranth-lang
whitequark[cis] has joined #amaranth-lang
mindw0rk has joined #amaranth-lang
mithro has joined #amaranth-lang
yuriks has joined #amaranth-lang
sorear has joined #amaranth-lang
jess has joined #amaranth-lang
Ekho- has joined #amaranth-lang
roflin has quit [*.net *.split]
urja has quit [*.net *.split]
Psentee has quit [*.net *.split]
balrog has quit [*.net *.split]
tpw_rules has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
gatecat has quit [*.net *.split]
esden has quit [*.net *.split]
esden has joined #amaranth-lang
roflin has joined #amaranth-lang
Psentee has joined #amaranth-lang
gatecat has joined #amaranth-lang
gruetzkopf has joined #amaranth-lang
balrog has joined #amaranth-lang
urja has joined #amaranth-lang
tpw_rules has joined #amaranth-lang
jn has quit [*.net *.split]
key2 has quit [*.net *.split]
cyrozap has quit [*.net *.split]
miek has quit [*.net *.split]
_catircservices has quit [*.net *.split]
palmer has quit [*.net *.split]
anuejn_ has quit [*.net *.split]
vup has quit [*.net *.split]
adamgreig has quit [*.net *.split]
XgFgX has quit [*.net *.split]
LoveMHz has quit [*.net *.split]
XgFgX has joined #amaranth-lang
_catircservices has joined #amaranth-lang
LoveMHz has joined #amaranth-lang
miek has joined #amaranth-lang
anuejn_ has joined #amaranth-lang
palmer has joined #amaranth-lang
adamgreig has joined #amaranth-lang
vup has joined #amaranth-lang
cyrozap has joined #amaranth-lang
jn has joined #amaranth-lang
key2 has joined #amaranth-lang
Hoernchen has quit [Remote host closed the connection]
Hoernchen has joined #amaranth-lang
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 260 seconds]
Hoernchen has quit [Remote host closed the connection]
Hoernchen has joined #amaranth-lang
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
frgo has quit [Quit: Leaving...]
Chips4MakersakaS has joined #amaranth-lang
<Chips4MakersakaS> <cr1901> "It's a slow ADC (sample rate a..." <- Nice, just want to remark that I think you can multiplex up to 16 analog inputs to one XADC.
jeanthomas has quit [Ping timeout: 246 seconds]
adamgreig has quit [Ping timeout: 248 seconds]
adamgreig has joined #amaranth-lang
jeanthomas has joined #amaranth-lang
urja has quit [Read error: Connection reset by peer]
mindw0rk has quit [Ping timeout: 252 seconds]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
balrog has quit [Ping timeout: 244 seconds]
urja has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
Hoernchen has quit [Ping timeout: 260 seconds]
Hoernchen has joined #amaranth-lang
<cr1901> Oh, well... if you want to multiplex inputs, that requires more RC circuits and diff pairs, or an analog switch before the lone diff input (like what Orangecrab does) :)
Hoernchen has quit [Remote host closed the connection]
Hoernchen has joined #amaranth-lang
Hoernchen has quit [Remote host closed the connection]
Hoernchen has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
Lord_Nightmare has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
balrog has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
peepsalot has quit [Ping timeout: 276 seconds]
mindw0rk has joined #amaranth-lang
Guest1880 has quit [*.net *.split]
jjsuperpower has quit [*.net *.split]
oter has quit [*.net *.split]
sugarbeet has quit [*.net *.split]
dyniec has quit [*.net *.split]
nimh_ has quit [*.net *.split]
Xesxen has quit [*.net *.split]
Guest1880 has joined #amaranth-lang
jjsuperpower has joined #amaranth-lang
sugarbeet has joined #amaranth-lang
oter has joined #amaranth-lang
nimh_ has joined #amaranth-lang
Xesxen has joined #amaranth-lang
dyniec has joined #amaranth-lang
sugarbeet has quit [Ping timeout: 246 seconds]
sugarbeet has joined #amaranth-lang
<cr1901> whitequark[cis]: I had to make a local change to make the ADC demo work... https://github.com/amaranth-lang/amaranth/blob/main/amaranth/vendor/_siliconblue.py#L576 should there be a "invert_lut = isinstance(buffer, io.Buffer)" after the highlighted line?
<cr1901> I got an "UnboundLocal" error without adding that line
<cr1901> But I don't actually know if that's the correct fix or something less obvious is required
<whitequark[cis]> seems okay but lets ask Wanda
Wanda[cis] has joined #amaranth-lang
<Wanda[cis]> umm
<Wanda[cis]> what in the hell is this code doing
<cr1901> Damned if I know
<Wanda[cis]> oh.
sauce has quit [Ping timeout: 252 seconds]
<Wanda[cis]> I accidentally removed a comment when porting this thing
<Wanda[cis]> okay, so, no
<Wanda[cis]> there shouldn't be a line like that
<Wanda[cis]> the invert_lut parameter should just not be passed in that case at all
<Wanda[cis]> since it's only useful for differential outputs
<cr1901> Ahh alright. Want me to make PRs for 0.5.x and main, or would you rather do it because you know what comments should be there?
<_whitenotifier-1> [amaranth] wanda-phi opened pull request #1567: vendor._siliconblue: fix differential input. - https://github.com/amaranth-lang/amaranth/pull/1567
<_whitenotifier-1> [amaranth] wanda-phi opened pull request #1568: vendor._siliconblue: fix differential input. [0.5 backport] - https://github.com/amaranth-lang/amaranth/pull/1568
<cr1901> (Well, that answers my q)
peepsalot has joined #amaranth-lang
<_whitenotifier-1> [amaranth] robtaylor opened issue #1569: Missing return in elaborate results in cryptic error - https://github.com/amaranth-lang/amaranth/issues/1569
<_whitenotifier-1> [amaranth] github-merge-queue[bot] created branch gh-readonly-queue/main/pr-1567-9f9ea2c8496100c124a362a9c14523faae475ca1 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-1> [amaranth] whitequark commented on issue #1569: Missing return in elaborate results in cryptic error - https://github.com/amaranth-lang/amaranth/issues/1569#issuecomment-2699198993
<_whitenotifier-1> [amaranth-lang/amaranth] github-merge-queue[bot] pushed 1 commit to main [+0/-0/±1] https://github.com/amaranth-lang/amaranth/compare/9f9ea2c84961...cf4a29d3a29f
<_whitenotifier-1> [amaranth-lang/amaranth] wanda-phi cf4a29d - vendor._siliconblue: fix differential input.
<_whitenotifier-1> [amaranth] github-merge-queue[bot] deleted branch gh-readonly-queue/main/pr-1567-9f9ea2c8496100c124a362a9c14523faae475ca1 - https://github.com/amaranth-lang/amaranth
<_whitenotifier-1> [amaranth] whitequark closed pull request #1567: vendor._siliconblue: fix differential input. - https://github.com/amaranth-lang/amaranth/pull/1567
<_whitenotifier-1> [amaranth] whitequark closed pull request #1568: vendor._siliconblue: fix differential input. [0.5 backport] - https://github.com/amaranth-lang/amaranth/pull/1568
<_whitenotifier-1> [amaranth-lang/amaranth-lang.github.io] whitequark pushed 1 commit to main [+0/-0/±35] https://github.com/amaranth-lang/amaranth-lang.github.io/compare/9eed04343a14...ff3a0a128722
<_whitenotifier-1> [amaranth-lang/amaranth-lang.github.io] github-merge-queue[bot] ff3a0a1 - Deploying to main from @ amaranth-lang/amaranth@cf4a29d3a29fd316207aa77c5b63f991a4e81756 🚀