Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glasgow run benchmark source fails on Windows #550

Open
bburky opened this issue Apr 1, 2024 · 0 comments
Open

glasgow run benchmark source fails on Windows #550

bburky opened this issue Apr 1, 2024 · 0 comments
Labels
software Component: software

Comments

@bburky
Copy link

bburky commented Apr 1, 2024

On a Windows 11 computer I'm seeing glasgow run benchmark source fail:

I: glasgow.cli: running handler for applet 'benchmark'
I: glasgow.applet.internal.benchmark: running benchmark mode source for 8.000 MiB
E: glasgow.applet.internal.benchmark: mode source failed!

Very rarely, it sometimes succeeds:

I: glasgow.applet.internal.benchmark: running benchmark mode source for 8.000 MiB
I: glasgow.applet.internal.benchmark: mode source: 37.70 MiB/s (301.61 Mb/s)

After comparing the actual vs golden data, it seems there is a 0x400 offset to the test pattern in the actual data. It would seem some initial data is getting lost somehow?

(A future improvement to the benchmark test might be to send the requested length from Python to the FPGA, and have it refuse to send more than the requested amount of data. This likely would have caused an unexpectedly short read in this case, and may have made the bug more visible initially.)

If I comment out iface.reset() here, it consistently works fine (I don't know what the impact of removing the reset() call is though):

if mode == "source":
await device.write_register(self.__addr_mode, Mode.SOURCE.value)
await iface.reset()

Does DirectDemultiplexer.reset() cause a read (or discard some read data) that could interfere with the test?

actual and golden data available here: https://gist.github.com/bburky/ac39a5211eb386c2edcc73e8b29b5397
I'm not an expert in USB debugging, but if there's something specific I can check I'm happy to.

@whitequark whitequark added the software Component: software label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
software Component: software
Projects
None yet
Development

No branches or pull requests

2 participants