mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-12 10:19:40 +01:00
Keep count of number of shortfalls.
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.
This commit is contained in:
@@ -163,6 +163,8 @@ typedef struct {
|
||||
uint32_t m0_count;
|
||||
/** Number of bytes transferred by the M4. */
|
||||
uint32_t m4_count;
|
||||
/** Number of shortfalls. */
|
||||
uint32_t num_shortfalls;
|
||||
} hackrf_m0_state;
|
||||
|
||||
struct hackrf_device_list {
|
||||
|
||||
Reference in New Issue
Block a user