Skip to content
  • Brent Stapleton's avatar
    Device3: Fix block control flushing · d69ed2b2
    Brent Stapleton authored
    
    
    - Factor out the _start_drain helper function, which starts flushing
    data out of the block. We should always be disabling flow control after
    we write to the flushing registers.
    - Always attempt to flush when calling the _flush function. Previously,
    we would check if data appeared to be moving when _flush was called,
    and only write to the flush registers if data was moving. However, if
    data is stuck for some reason (for example, the block ran out of flow
    control credits), this check will give us a false positive, and we
    won't flush. Instead, we need to always begin the flushing process,
    then check those counters, and return once the counters stop changing.
    
    Note: we need to start flushing before disabling flow control so that
    the flushed data isn't flooded onto the crossbar.
    
    Co-authored-by: default avatarmichael-west <michael.west@ettus.com>
    Co-authored-by: default avatarSugandha Gupta <sugandha.gupta@ettus.com>
    d69ed2b2