Daft-Freak / DERP

RP2040/PicoSystem emulator
22 stars 0 forks source link

sigrok / PulseView #5

Open Gadgetoid opened 1 year ago

Gadgetoid commented 1 year ago

I suspect it's possible to have support for DERP integrating directly with signal decoders/analyzers like PulseView

It looks like either TCP/IP or creating a virtual serial port to emulate the OpenBench (https://sigrok.org/wiki/Openbench_Logic_Sniffer) protocol might be the most sensible way to accomplish this. OpenBench specifically because it supports 32 channels via - I think - (an extended version of?) the SUMP protocol https://www.sump.org/projects/analyzer/protocol/.

There may be a more direct method I'm overlooking. EG: sigrok supports raw binary input data from a file, so the emulator could capture data, save on exit and let you view the traces after the fact. But it would be waaay cooler to do it in realtime.

Being able to watch registers and memory in the same way would be interesting, but would need a front-end that can understand and graph values, presumably via the GDB server. Would something like MemoryView work? https://marketplace.visualstudio.com/items?itemName=mcu-debug.memory-view

Daft-Freak commented 1 year ago

Would something like MemoryView work? https://marketplace.visualstudio.com/items?itemName=mcu-debug.memory-view

Seems to work.

This does look like an interesting idea, though the ubuntu upgrade seems to have broken pulseview... (driver list is empty? ... or doesn't open?) sigh

Daft-Freak commented 1 year ago

Hmm, libserialport doesn't like using a PTY as a virtual serial port(https://sigrok.org/bugzilla/show_bug.cgi?id=1642) and the OLS driver doesn't work over TCP (https://sigrok.org/bugzilla/show_bug.cgi?id=1490)... so realtime might be a bit tricky.

Time to fill up my drive with dumps I guess...

Daft-Freak commented 1 year ago

Time to fill up my drive with dumps I guess...

2.8GB for 2.8s of... not very exiting data :laughing: Screenshot from 2023-05-21 18-27-23

Unsurprisingly due to my lack of peripherals, though this does seem a good way to test those. :thinking:

Daft-Freak commented 1 year ago

Update: I actually did run out of disk space.

Oh, and can see what the inputs are doing now. (Suspiciously perfect 50Hz TE) Screenshot from 2023-05-22 21-01-06

Daft-Freak commented 1 year ago

Accidental progress on #4 (PWM support) Screenshot from 2023-05-24 14-44-45

Also, turns out the backlight PWM is 65535/65536.

Gadgetoid commented 1 year ago

God grief, that's a beaut.

1GB/second is... uh...

Daft-Freak commented 1 year ago

Yeah, ideally need a more direct way to get the data into PulseView... (I'm writing a sort-of RLE dump, but had to write a script to expand it to raw 250MHz data)