ChanServ changed the topic of #glasgow to: glasgow interface explorer · code https://github.com/GlasgowEmbedded/glasgow · logs https://freenode.irclog.whitequark.org/glasgow · discord https://1bitsquared.com/pages/chat · production https://www.crowdsupply.com/1bitsquared/glasgow · no ETAs at the moment
<d1b2> <Attie> whitequark: sorry to ask more questions about resets... but it seems that registers don't get reset when the applet is restarted - is that correct?
<d1b2> <Attie> it also seems that rw registers may only be written to from the glasgow utility (not the gateware), which makes sense if true, but was a little unexpected
<whitequark> yes and yes
<whitequark> in general, try to avoid using registers
<whitequark> for... this reason basically
<d1b2> <Attie> oh, okay
<whitequark> that's what the serdes+sideband business is all about
<d1b2> <Attie> i'm working on a frequency / duty counter, and they seemed appropriate for getting 32-bit values in/out
<d1b2> <Attie> i'll take a look - 8-bit FIFO based?
<whitequark> hmmm
<whitequark> as a separate applet?
<whitequark> in that case registers are actually reasonably appropriate
<whitequark> i was thinking you were still working on i2s stuff
<d1b2> <Attie> ah, sorry - yes a separate applet
<d1b2> <Attie> sort of grown out of the i2s stuff
<d1b2> <Attie> i wanted to get i2s to autodetect bitrate / sample rate, and figured this also made sense as a standalone
<whitequark> hmm
<whitequark> have you seen the UART autobaud thing?
<d1b2> <Attie> i have, but didn't look too closely at it
<whitequark> take a closer look
<d1b2> <Attie> okay!
<d1b2> <Attie> (for guidance on register usage / or not... or because it may do this task already?)
<whitequark> register usage is fine for something like autobaud
<whitequark> the problems really start when you need register r/w synchronized with the main applet fifos
<whitequark> because i think it might well be generalizable for i2s
<whitequark> or rather, no generalization is needed
<d1b2> <Attie> for i2s we have a bit clock and frame clock, which makes the task a lot easier
<d1b2> <Attie> if i'm understanding your intent correctly
<whitequark> ohhh
<d1b2> <Attie> but we need to resolve "n syc_clock cycles" to a real number, like 44.1kHz for the sample rate in the wav file
<d1b2> <Attie> *sys_clock
<whitequark> ok that's way easier than uart autobaud
<whitequark> i think you should make that a part of the i2s applet itself
<whitequark> i would probably use an r/o register and assume that the i2s bitrate doesn't really change much, so no synchronization is needed
<whitequark> basically use a doubly buffered counter
<whitequark> the first stage counts up until the next posedge, the second stage captures the count
<whitequark> and you can read out the second stage through the i2c register
<whitequark> nice and simple
<d1b2> <Attie> i think that's basically what I've done, though I used distinct "detect bitrate" / "detect frame rate" / "capture audio" states... the first two can be skipped if the user wishes
<d1b2> <Attie> i wanted to break that functionality out though, into a standalone frequency / duty-cycle counter
<whitequark> hmm
<d1b2> <Attie> that could give you details like period / low-time / high-time, over a number of cycles
<d1b2> <Attie> periodic waveform required of course
<whitequark> distinct states would also work
<whitequark> distinct states work better if the i2s stream is not always on
<d1b2> <Attie> yeah (in my case it isn't) - the other side of the equation is that:
<d1b2> <Attie> A) we loose the first n samples / bits, because we're doing auto-detect - which can be disabled if you know what you're working with
<d1b2> <Attie> B) i believe we need to declare the sample rate and sample size upfront for the wave package, before we write any samples out
<whitequark> yep, i think you made a good decision there
<d1b2> <Attie> cool, thanks for the sanity check
<_whitenotifier-f> [glasgow] attie opened pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTU6D
<_whitenotifier-f> [glasgow] attie synchronize pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTU6D
electronic_eel has quit [Ping timeout: 256 seconds]
electronic_eel has joined #glasgow
PyroPeter_ has joined #glasgow
PyroPeter has quit [Ping timeout: 240 seconds]
PyroPeter_ is now known as PyroPeter
StM_ has joined #glasgow
emilazy_ has joined #glasgow
analprolapse_ has joined #glasgow
emilazy has quit [Ping timeout: 240 seconds]
StM has quit [Ping timeout: 240 seconds]
analprolapse has quit [Ping timeout: 240 seconds]
emilazy_ is now known as emilazy
analprolapse_ is now known as analprolapse
cqc has quit [Ping timeout: 240 seconds]
cqc_ has joined #glasgow
mwk has quit [Ping timeout: 240 seconds]
mwk_ has joined #glasgow
Stormwind_mobile has quit [Ping timeout: 264 seconds]
Stormwind_mobile has joined #glasgow
_whitelogger has joined #glasgow
<_whitenotifier-f> [glasgow] gregdavill synchronize pull request #191: RFC: applet.program.ecp5_sram: initial ecp5 applet - https://git.io/JfLua
<_whitenotifier-f> [glasgow] gregdavill commented on pull request #191: RFC: applet.program.ecp5_sram: initial ecp5 applet - https://git.io/JTUpB
<_whitenotifier-f> [glasgow] whitequark commented on pull request #191: RFC: applet.program.ecp5_sram: initial ecp5 applet - https://git.io/JTUpH
Stephanie has joined #glasgow
Stephanie has quit [Excess Flood]
Stephie has quit [Ping timeout: 246 seconds]
Stephie has joined #glasgow
Stephie has quit [Client Quit]
Stephie has joined #glasgow
Stephie has quit [Excess Flood]
Stephie has joined #glasgow
PyroPeter_ has joined #glasgow
PyroPeter__ has joined #glasgow
PyroPeter has quit [Ping timeout: 260 seconds]
PyroPeter__ is now known as PyroPeter
PyroPeter_ has quit [Ping timeout: 240 seconds]
PyroPeter has quit [Ping timeout: 272 seconds]
PyroPeter has joined #glasgow
<yorick> yeah, I had a discussion with the roommate about some i2c peripheral not being supported that boiled down to this misunderstanding
mwk_ is now known as mwk
<whitequark> that's mildly infortunate
tomtastic has quit [Read error: Connection reset by peer]
tomtastic has joined #glasgow
FFY00 has quit [Quit: dd if=/dev/urandom of=/dev/sda]
FFY00 has joined #glasgow
Cynthia has joined #glasgow
Chips4Makers has quit [Ping timeout: 240 seconds]
Chips4Makers has joined #glasgow
Xesxen_ has joined #glasgow
disasm[m] has quit [*.net *.split]
disasm[m] has joined #glasgow
midnight has quit [*.net *.split]
Xesxen has quit [*.net *.split]
Qyriad has quit [*.net *.split]
russss has quit [*.net *.split]
smkz has quit [*.net *.split]
sven has quit [*.net *.split]
Qyriad has joined #glasgow
sven has joined #glasgow
russss has joined #glasgow
smkz has joined #glasgow
midnight has joined #glasgow
jevinskie[m] has quit [Ping timeout: 260 seconds]
jevinskie[m] has joined #glasgow
<_whitenotifier-f> [glasgow] attie synchronize pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTU6D
<_whitenotifier-f> [glasgow] attie synchronize pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTU6D
<_whitenotifier-f> [glasgow] electroniceel commented on pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTkef
<_whitenotifier-f> [glasgow] attie commented on pull request #216: applet.interface.freq_counter: implement a frequency and duty-cycle counter - https://git.io/JTkI1
millerresearch has joined #glasgow
millerresearch has quit [Remote host closed the connection]
new_glasgow_user has joined #glasgow
<new_glasgow_user> 'glasgow run selftest pins-ext' and '... pins-loop' say PASS, but '... pins-int' says FAIL (all pins fail high). Should I be worried?
<electronic_eel> new_glasgow_user: no, this is a know issue
<new_glasgow_user> oh good, thank you
<electronic_eel> the selftest isn't really working for revC devices, it was designed for revA and revB, but not adapted to revC yet
bvernoux has quit [Quit: Leaving]
<electronic_eel> Attie: I think your idea with the min_lo/max_lo/... is even better than mine
Stephie has quit [Quit: Fuck this shit, I'm out!]
new_glasgow_user has left #glasgow [#glasgow]
Stephie has joined #glasgow
Stephie has quit [Excess Flood]
<d1b2> <Attie> @electronic_eel thanks! I'm about half way through giving it a go
<d1b2> <Attie> I probably won't be able to progress it further today though
<electronic_eel> no worries, we are in no hurry
Stephie has joined #glasgow