Monday, February 1, 2021

Resetting d_delta in custom Delay block causes a spike in time sink

Hello, I am trying to create an OOT block similar to Delay except that if it does not receive any data for 10ms, it will reset the delay (set d_delta to the same # of samples as the initial delay) so that the next portion of received data will have a delay before it, as seen here. The inputted data is a cc1110 formatted packet that is converted from PDU to tagged stream, GFSK modulated, then sent though the custom Delay block and transmitted and received by a USRP B210.

Here's the data received by the USRP without the custom Delay block, and here's the data received by the USRP with the custom Delay block.

The initial peak in the 'with custom Delay block' picture is what confuses me as I don't know why it appears there. The peak appears when the custom Delay block first receives samples after d_delta is reset. My initial thought is that it is the USRP s initializing or something but that's just a wild guess.

The code for my custom Delay block can be found below. Main points of interest are the 'void queue_delay_impl::run()' function which determines if it has been 10ms since the last sample has been received and resets d_delta if so. And the else statement in the general_work function which provides delays by using memset() to insert 0's at the beginning of the data stream when d_delta is reset.

#ifdef HAVE_CONFIG_H
#include "config.h"

No comments:

Post a Comment