pico-coder / sigrok-pico

Use a raspberry pi pico (rp2040) as a logic analyzer and oscilloscope with sigrok
727 stars 83 forks source link

not_in_flash_func reduces storage size #11

Closed pico-coder closed 2 years ago

pico-coder commented 2 years ago

In early testing with only an RPI Model B3 I saw cases where continuous streaming of packets would mostly work but then abort in a non predictive way. I thought it could either be that the XIP cache was missing on the main inner loops or possibly that it was hitting an IO limitation on the model B3. The workaround around at the time was to use the no_in_flash_func which pushed some critical loops into RAM. That adds a bit of stress on the RAM, but ensures that code has only a miss latency to RAM and not flash. Downside is that this takes away from sample depth. While it is set a 200kB in current release, there are some alignment and other requirements that likely drop the effective size below that. Need to characterize on a faster machine to see whether the issue is host performance or XIP, and then adjust sample depth accordingly.

pico-coder commented 2 years ago

Further testing didn't seem to indicate that the use not_in_flash_func didn't seem to reduce the rate of aborts so it was removed from Rev2.