Beispiel #1
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3 
        self.status = WES_FILTEREN
        self.interp = 3
        self.duration = 32e-6 # uS
        self.coeffs = [1, 4, 10, 16, 19, 16, 10, 4, 1]

        cic_order = whitebox_config.get('cic_order', 4)
        cic_delay = whitebox_config.get('cic_delay', 1)

        self.shift = cic_shift(9, 10, self.interp, cic_order, cic_delay)

        # Input signal
        self.cnt = ceil((self.sample_rate / self.interp) * self.duration)
        self.n = np.arange(0, self.cnt)
        self.x = np.zeros(self.cnt, dtype=np.complex128)
        self.x[0] = (1 << 14) + 1j * (1 << 14)

        # Output signal
        self.y = np.zeros(self.cnt*self.interp, dtype=np.complex128)
        for i, c in enumerate(self.coeffs):
            self.y[i] = (c << 3) + 1j * (c << 3)
        WhiteboxImpulseResponseTestCase.setUp(self)
Beispiel #2
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.interp = 1
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3 
        self.status = WES_FILTEREN

        self.cic_order = whitebox_config.get('cic_order', 4)
        self.cic_delay = whitebox_config.get('cic_delay', 1)
        self.shift = cic_shift(9, 10, self.interp,
                self.cic_order, self.cic_delay)
        print 'shift', self.shift

        # Input signal
        self.cnt = 128
        self.duration = (self.cnt * self.interp) / self.sample_rate
        self.n = np.arange(self.cnt)
        self.x = np.zeros(self.cnt, dtype=np.complex128)
        self.x[0] = (1 << 14) + 1j * (1 << 14)

        #output signal
        self.y = np.zeros(self.interp*self.cnt, dtype=np.complex128)
        for i in range(self.interp):
            self.y[i] = (1 << 7) + 1j * (1 << 7)
        WhiteboxImpulseResponseTestCase.setUp(self)
Beispiel #3
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3
        self.status = WES_FILTEREN
        self.interp = 3
        self.duration = 32e-6  # uS
        self.coeffs = [1, 4, 10, 16, 19, 16, 10, 4, 1]

        cic_order = whitebox_config.get('cic_order', 4)
        cic_delay = whitebox_config.get('cic_delay', 1)

        self.shift = cic_shift(9, 10, self.interp, cic_order, cic_delay)

        # Input signal
        self.cnt = ceil((self.sample_rate / self.interp) * self.duration)
        self.n = np.arange(0, self.cnt)
        self.x = np.zeros(self.cnt, dtype=np.complex128)
        self.x[0] = (1 << 14) + 1j * (1 << 14)

        # Output signal
        self.y = np.zeros(self.cnt * self.interp, dtype=np.complex128)
        for i, c in enumerate(self.coeffs):
            self.y[i] = (c << 3) + 1j * (c << 3)
        WhiteboxImpulseResponseTestCase.setUp(self)
Beispiel #4
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.interp = 1
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3
        self.status = WES_FILTEREN

        self.cic_order = whitebox_config.get('cic_order', 4)
        self.cic_delay = whitebox_config.get('cic_delay', 1)
        self.shift = cic_shift(9, 10, self.interp, self.cic_order,
                               self.cic_delay)
        print 'shift', self.shift

        # Input signal
        self.cnt = 128
        self.duration = (self.cnt * self.interp) / self.sample_rate
        self.n = np.arange(self.cnt)
        self.x = np.zeros(self.cnt, dtype=np.complex128)
        self.x[0] = (1 << 14) + 1j * (1 << 14)

        #output signal
        self.y = np.zeros(self.interp * self.cnt, dtype=np.complex128)
        for i in range(self.interp):
            self.y[i] = (1 << 7) + 1j * (1 << 7)
        WhiteboxImpulseResponseTestCase.setUp(self)
Beispiel #5
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3 
        self.interp = 1
        self.status = WES_DDSEN | WES_FILTEREN

        cic_order = whitebox_config.get('cic_order', 4)
        cic_delay = whitebox_config.get('cic_delay', 1)
        self.shift = cic_shift(9, 10, self.interp, cic_order, cic_delay)

        self.cnt = 512
        self.n = np.arange(0, self.cnt)
        self.x = np.array([((1 << 15)-1) + 1j * ((1 << 15)-1) \
                for i in range(self.cnt)], dtype=np.complex128)
        WhiteboxSpectrumMaskTestCase.setUp(self)
Beispiel #6
0
    def setUp(self):
        self.apb3_duration = APB3_DURATION
        self.fifo_depth = 64
        self.bulk_size = 16
        self.sample_rate = 6.144e6
        self.freq = 1.7e3
        self.interp = 1
        self.status = WES_DDSEN | WES_FILTEREN

        cic_order = whitebox_config.get('cic_order', 4)
        cic_delay = whitebox_config.get('cic_delay', 1)
        self.shift = cic_shift(9, 10, self.interp, cic_order, cic_delay)

        self.cnt = 512
        self.n = np.arange(0, self.cnt)
        self.x = np.array([((1 << 15)-1) + 1j * ((1 << 15)-1) \
                for i in range(self.cnt)], dtype=np.complex128)
        WhiteboxSpectrumMaskTestCase.setUp(self)