mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-02 21:45:37 +01:00
To enable this, we keep a count of the current shortfall length. Each time an SGPIO read/write cannot be completed due to a shortfall, we increase this length. Each time an SGPIO read/write is completed successfully, we reset the shortfall length to zero. When a shortfall occurs and the existing shortfall length is zero, this indicates a new shortfall, and the shortfall count is incremented. This change adds one cycle to the normal RX & TX paths, to zero the shortfall count. To enable this to be done in a single cycle, we keep a zero handy in a high register. The extra accounting adds 10 cycles to the TX and RX shortfall paths, plus an additional 3 cycles to the RX shortfall path since there are now two branches involved: one to the shortfall handler, and another back to the main loop.