azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/glscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
Degi_ has joined #scopehal
Degi has quit [Ping timeout: 265 seconds]
Degi_ is now known as Degi
bvernoux has quit [Read error: Connection reset by peer]
<_whitenotifier-9> [scopehal-docs] azonenberg pushed 1 commit to master [+0/-0/Β±1] https://github.com/glscopeclient/scopehal-docs/compare/974cf4b2c0a5...bdf8f89ae93d
<_whitenotifier-9> [scopehal-docs] azonenberg bdf8f89 - Documented Constant and CSV Export filters
bvernoux has joined #scopehal
<d1b2> <Mughees> Ok. And what if I want to discard output stream (i.e. output stream doesn't get displayed if input is digital)?
<azonenberg> @mughees: just set the data to nullptr
<azonenberg> or do you mean eliminate the stream entirely?
<azonenberg> Dynamic stream behavior like this is relatively new territory
<azonenberg> So we havent worked out all of the corners of what isn/isn't possible or should be done
<d1b2> <Mughees> Yeah Entirely
<azonenberg> ditto for things like feedback paths in the filter graph. I get that there's benefits for control systems but everything was architected around a linearized DAG
<azonenberg> i'd like to think about how to make it work well but it's something we need to think about how to do well
<d1b2> <Mughees> Ok for now for my application, i want amplitude of pulses plotted which doesn’t make sense for digital signal inputs.
<d1b2> <Mughees> I could simply pass the input as output for this case as for digital signals a plot of pulses amplitude is technically equal to the signal itself
<d1b2> <Mughees> So im kind of good
<d1b2> <Mughees> On a separate note, what work related to scalar type u have in mind
<azonenberg> Oh, the stuff i suggested weeks ago? I already implemented that because I needed it for something I was doing lol
<azonenberg> I guess there is still one filter that would be useful to have, an array indexing filter
<azonenberg> returns the Nth element of an analog waveform, if it exists, as a scalar
<azonenberg> (given N as a scalar)
<azonenberg> @mughees how are you at PLL design btw?
<azonenberg> Our CDR PLL filter needs to be replaced with a better PLL that has specific bandwidth characteristics etc
<d1b2> <Mughees> Never done anything with it. Except setup plls in a microcontroller for embedded software programming 😊
<azonenberg> Well then you probably aren't the guy we should throw at that filter then :)
<d1b2> <Mughees> Yeah .. I’ll discuss with Louis and M for whats next
<azonenberg> Gimme 5 mins to go through the list of tickets and i'll suggest some things
<azonenberg> There are a few that i'd love to do that are blocked on other things
<azonenberg> Also @louis poke regarding https://github.com/glscopeclient/scopehal/pull/770
<azonenberg> have you tested the function generator yet so i can merge this?
<azonenberg> @mughees ok here's one that probably isnt going to be that hard
<azonenberg> as with most measurements this should return both a global average as a scalar and a per-cycle value as a waveform
<azonenberg> the goal is you use this between two signals in a parallel bus to measure misalignment
<azonenberg> the only tricky part is, the two signals may not be sending the same data
<azonenberg> so you have to somehow align them and ignore cases where one has a toggle and not the other
<azonenberg> and only create output when they both change at about the same time
<d1b2> <Mughees> Ok that seems fine. πŸ‘
<azonenberg> somebody submitted a PR for a decode that outputted the data as digital samples but i think an analog waveform makes more sense. or maybe even both
<azonenberg> (also said PR is old and has bitrotted probably... but feel free to use it as a starting point)
<azonenberg> @mughees also this is kinda partially a duplicate https://github.com/glscopeclient/scopehal/issues/459
<azonenberg> i'm not sure if these make sense to be the same vs different wrt the skew filter
<azonenberg> this is more of an RF targeted filter so it might be OK in this case to assume the input is sinusoidal?
<azonenberg> just normalize to p-p amplitude of each input and arctan, or something like that
<azonenberg> oops
<azonenberg> also more RF targeted
Fridtjof has joined #scopehal
Fridtjof_ has quit [Ping timeout: 255 seconds]
bvernoux has quit [Quit: Leaving]
<_whitenotifier-9> [scopehal] synx508 commented on issue #285: Add GPIB protocol decode - https://github.com/glscopeclient/scopehal/issues/285#issuecomment-1500955558
<d1b2> <Mughees> Any idea why I may be getting this error after I keep a filter displayed for some time (20-30 secs): terminate called after throwing an instance of 'vk::DeviceLostError' what(): vk::Device::waitForFences: ErrorDeviceLost Aborted (core dumped)
<azonenberg> Device lost error usually indicates the GPU stopped responding for some reason
<azonenberg> and the driver reset it
<azonenberg> I've seen it here and there but havent root caused it yet
<d1b2> <Mughees> ok. It becomes stable if sample depth is kept low
<d1b2> <Mughees> for example 10ks intead of 100ks
<azonenberg> yeah that suggests you might be bumping into a timeout somewhere in the GPU driver where a shader takes too long or something
<azonenberg> but 100k should not be timing out
<azonenberg> 100M maybe on a low end integrated GPU
<azonenberg> There are some bugs i need to fix wrt intel integrated GPUs and how some of the shader coordinate math is done
<azonenberg> what card are you using?
Bird|otherbox has quit [Ping timeout: 265 seconds]
<azonenberg> ok, it is intel integrated
<d1b2> <Mughees> i have a nvidia one too...but somehow ubuntu picked this one up
<d1b2> <david.rysk> are you running on the intel or the nvidia? if nvidia, are you running the nvidia driver or the nouveau driver?
<azonenberg> Can you test and let me know if you are seeing problems specifically at memory depths over 65536 or 2097152 samples?
<d1b2> <Mughees> i did not bother to install nvidia
<azonenberg> (2^16 and 32*2^16 respectively)
<d1b2> <david.rysk> probably safe to say that nouveau will have bugs especially on newer cards
<d1b2> <Mughees> ok
<azonenberg> @david.rysk its almost certainly an optimus setup using the intel by default unless you request use of the NV
<azonenberg> for a specific app
<azonenberg> @mughees so... the intel vulkan driver has a max X axis thread count of 2^16
<azonenberg> Bad Things are likely to happen if you do anything on one that tries to launch more than 2^16 thread blocks
<azonenberg> typically we run 32 threads per block so 32 * 2^16 is where i would expect to have problems
<azonenberg> we have some shaders that assume you can run arbitrarily many thread blocks in one axis; these need to be refactored to run on a 2D grid instead of 1D
<azonenberg> That said, i would expect this to be an immediate failure
<azonenberg> the first time the shader runs vulkan would complain you asked for an invalid configuration
<azonenberg> it should not cause a hang or eventual device lost error, which leads me to believe this is not the problem you are hitting
Bird|otherbox has joined #scopehal
<d1b2> <Mughees> 65536 fails, 65540 fails, 65520 fails, 30000 works
<d1b2> <Mughees> I am a GPU virgin guys,,, English please πŸ˜„
<d1b2> <Mughees> Failure becomes very quick if I drag some waveform into a eparate window
<azonenberg> This seems like it's a different bug then
<azonenberg> Maybe poke Louis and have him take a look?
<d1b2> <Mughees> yeah will bug him....makes taking screenshots for documentation frustrating....
<d1b2> <Mughees> My logic is that sticking with intel integrated should be more stable
<azonenberg> Nvidia is our most well tested platform
<d1b2> <david.rysk> over nouveau yes, over nvidia no
<azonenberg> the nvidia binary driver that is
<azonenberg> it's what i use and i think most of the other core devs
<azonenberg> more specifically 64-bit x86 CPUs, linux, and nvidia GPU with binary driver
<d1b2> <Mughees> what if poor people need to use glscopeclinet πŸ™‚
<azonenberg> I'm not saying i dont want to support other hardware
<azonenberg> Just that this is what I have, so bugs that hit that hardware get noticed and fixed fast
<d1b2> <david.rysk> those bugs need to be tracked and fixed πŸ™‚
<azonenberg> I agree they need to be fixed
<azonenberg> The hardest part is getting a dev who knows GPU stuff to be able to reproduce it
<azonenberg> e.g. my work laptop has an intel integrated GPU and an nvidia card, and seems to run ngscopeclient fairly reliably on eithert
<azonenberg> (as long as you dont hit the max waveform size for the intel card, wrt that shader limit i mentioned above)
<azonenberg> but that's in the megapoint range not tens of kpoints
<d1b2> <Mughees> 50Ks also working good
<azonenberg> The number being close to 64K does suggest something funky is happening with shader block sizes, but i cant debug it without seeing it happen in front of me
<d1b2> <david.rysk> these kinds of bugs can be very dependent on gpu model and driver version
<azonenberg> Exactly
<azonenberg> So the hardest bit about fixing it is probably getting that exact hardware setup in front of a dev
<azonenberg> (a dev with GPU experience rather than someone writing filters who doesnt know vulkan)
<d1b2> <Mughees> yeah GPU is definitely complex stuff
<_whitenotifier-9> [scopehal] MugheesChohan opened pull request #776: Adding support for amplitude output waveform for pulse width filter - https://github.com/glscopeclient/scopehal/pull/776
<_whitenotifier-9> [scopehal-docs] MugheesChohan opened pull request #63: Adding support for amplitude output waveform for pulse width filter - https://github.com/glscopeclient/scopehal-docs/pull/63