whitequark[cis] changed the topic of #glasgow to: https://glasgow-embedded.org · digital interface explorer · https://www.crowdsupply.com/1bitsquared/glasgow · code https://github.com/GlasgowEmbedded/glasgow · logs https://libera.irclog.whitequark.org/glasgow · matrix #glasgow-interface-explorer:matrix.org · discord https://1bitsquared.com/pages/chat
<bburky[m]> and it seems repeatable (except when it very rarely works correctly). The offset seems consistently 0x400. Do you want me to file a GitHub issue or anything?
<bburky[m]> sorry: 0x00-0xff bytes of golden and they first appear at 0x0400 of actual (I phrased it backwards)
<whitequark[cis]> fascinating, what is in the first 0x400 bytes of actual?
<bburky[m]> data and the patch I made to test: https://gist.github.com/bburky/ac39a5211eb386c2edcc73e8b29b5397
<whitequark[cis]> time for biodiff!
<whitequark[cis]> a diff that can align sequences
<bburky[m]> Data at the begining is part of the same test pattern, so not complete garbage. Perhaps (libusb?) is losing the first x bytes somehow? It would have to lose a ton of data (0x1fffe - 0x400 I think?) to land on an offset of 0x400 I think though? Very weird.
<whitequark[cis]> no, this tracks actually
<whitequark[cis]> that's 128K-2-0x400; each scheduled IN EP transfer is 32*0x200=16K, and there is at least 16 of them pipelined, which is 256K
<whitequark[cis]> but also
<whitequark[cis]> looking at biodiff
<whitequark[cis]> there's only a difference in the first 0x3fc bytes, everything afterwards is completely aligned
<whitequark[cis]> like check this out
<whitequark[cis]> this is the beginning
<whitequark[cis]> this is the end
<whitequark[cis]> everything in between matches just fine
<whitequark[cis]> it's an offset
<whitequark[cis]> oh I see what you mean
<whitequark[cis]> since it's a repeating pattern an offset is an offset by modulo
<whitequark[cis]> yeah we could probably stand to have a longer generator polynomial
<bburky[m]> yeah, that's why I called it an offset, that's what it is it seems? The USB wizardry is beyond me, so I probably won't be able to help guess what's going on at the USB/libusub level (happy to test though). The applet gateware seems to repeat forever, so if you somehow lost data, and tried to do an extra read at the end, you'd get another chunk of the pattern back, right?
<bburky[m]> A simple tweak might be to have python send the length to the fpga before starting the test, and have the fpga refuse to send more than requested?
<whitequark[cis]> yep sure
<whitequark[cis]> try using ETW tools to capture USB packets
<whitequark[cis]> i've watched Maya do this, it's kind of a pain but seems very effective, giving more information than just wireshark captures
<bburky[m]> That sounds daunting, but I'll give it a try. These seem to be the steps? https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/how-to-capture-a-usb-event-trace
Foxyloxy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<whitequark[cis]> yes
notgull has joined #glasgow
fridtjof[m]1 has quit [Quit: Idle timeout reached: 172800s]
shiz has quit [Changing host]
shiz has joined #glasgow
shiz has quit [Quit: WeeChat 3.5]
shiz has joined #glasgow
Foxyloxy has joined #glasgow
<bburky[m]> I honestly have very little idea how to use this tool, but I seem to have figured out how to filter by VID/PID and managed to turn on a bunch of columns with USB info.
<bburky[m]> I'm not sure how to actually read packet contents with this tool, or I'd look for the test pattern
<bburky[m]> Perhaps the line I have highlighted is suspicious? Following this there's a ton of 0x4000 sized reads if I understand correctly. But this odd one appears before this early OUT transfer (which perhaps is setting mode.SOURCE?).
<bburky[m]> Discord appears to have compressed the image a bit. I added it to the gist too: https://gist.github.com/bburky/ac39a5211eb386c2edcc73e8b29b5397
<bburky[m]> If I comment out `iface.reset()` under `if mode == "source":` it consistently passes. I'm not sure what the reset is supposed to do, can it cause a read?
omnitechnomancer has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier-5> [glasgow] bburky opened issue #550: `glasgow run benchmark source` fails on Windows - https://github.com/GlasgowEmbedded/glasgow/issues/550
rcombs[m] has joined #glasgow
<rcombs[m]> thinking about different methods of storing TAS data after SPI flash was suggested the other day, and realized "hey wait, isn't an SD card just a really big SPI flash with more controller features"
<rcombs[m]> I wrote off doing actual FAT stuff as impractical a while ago, but... what if I just, didn't have a filesystem
<rcombs[m]> card contains a single file at 0x0
<rcombs[m]> largest TAS I've played back is 410MB, though that compresses to a 1MB .zip so maybe the answer really is "build some actual compression ya doofus"
notgull has quit [Ping timeout: 268 seconds]
notgull has joined #glasgow
notgull has quit [Ping timeout: 268 seconds]
josHua[m] has joined #glasgow
<josHua[m]> not sure how much throughput you need and/or how much you can cram on there, but I also wonder if SERV is fast enough to do the job of doing the filesystem for you
<whitequark[cis]> <rcombs[m]> "largest TAS I've played back is..." <- yes
<rcombs[m]> what's a SERV
<josHua[m]> SERV is Olof Kindgren's ultra tiny RISC-V soft core
<ewenmcneill[m]> SERV: https://github.com/olofk/serv (it's a very slow, but very tiny, "basic microcontroller" level RISC-V CPU)
<ari> wasn't there already some applet that implemented a tiny mips-like core?
ar-jan has joined #glasgow
<voltagex[m]> it'd be really good to have the keyed plastic bit and then break out to other stuff rather than fiddly individual jumper wires
<voltagex[m]> *thank you*. I never knew this existed! (There's a tcpdump equivalent that I've used but never this!)
redstarcomrade has quit [Read error: Connection reset by peer]
bvernoux has joined #glasgow
ar-jan has quit [Ping timeout: 268 seconds]
ar-jan has joined #glasgow
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon2 has joined #glasgow
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon2 has joined #glasgow
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon2 has joined #glasgow
davidrysk[m] has joined #glasgow
<davidrysk[m]> whitequark: https://review.openocd.org/c/openocd/+/8191 I was asked to review this, can you take a look? (change in sleep command in OpenOCD remote_bitbang)
<davidrysk[m]> Asking since it may affect glasgow
ar-jan has quit [Ping timeout: 260 seconds]
ar-jan has joined #glasgow
FFY00 has joined #glasgow
whitequark[m] has joined #glasgow
<whitequark[m]> david.rysk (@_discord_169816341568684032:catircservices.org) yeah lgtm!
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
<davidrysk[m]> thanks!
notgull has joined #glasgow
notgull has quit [Ping timeout: 252 seconds]
redstarcomrade has joined #glasgow
redstarcomrade has quit [Changing host]
redstarcomrade has joined #glasgow
Foxyloxy_ has quit [Ping timeout: 255 seconds]
Foxyloxy has quit [Ping timeout: 264 seconds]
Foxyloxy_ has joined #glasgow
Foxyloxy has joined #glasgow
Attie[m] has quit [Quit: Idle timeout reached: 172800s]
<_whitenotifier-5> [glasgow] neuschaefer synchronize pull request #549: applet.interface.jtag_openocd: implement remote sleep - https://github.com/GlasgowEmbedded/glasgow/pull/549
galibert[m] has quit [Quit: Idle timeout reached: 172800s]
bvernoux has quit [Quit: Leaving]
ar-jan has quit [Ping timeout: 268 seconds]