Пример #1
0
    def test_f_003(self):
        # Test scenariou where we have defined a puncture pattern with
        # more bits than the puncsize with a delay. The python code
        # doesn't account for this when creating self.expected, but
        # this should be equivalent to a puncpat of the correct size.

        self.puncsize = 4
        self.puncpat0 = 0x5555 # too many bits set
        self.puncpat1 = 0x55   # num bits = puncsize
        self.delay = 1

        src = blocks.vector_source_f(self.src_data)
	op0  = fec.puncture_ff(self.puncsize, self.puncpat0, self.delay)
	op1  = fec.puncture_ff(self.puncsize, self.puncpat1, self.delay)
	dst0 = blocks.vector_sink_f()
	dst1 = blocks.vector_sink_f()

	self.tb.connect(src, op0, dst0)
	self.tb.connect(src, op1, dst1)
	self.tb.run()

	dst_data0 = list(dst0.data())
	dst_data1 = list(dst1.data())

        self.assertEqual(dst_data1, dst_data0)
Пример #2
0
    def test_f_003(self):
        # Test scenariou where we have defined a puncture pattern with
        # more bits than the puncsize with a delay. The python code
        # doesn't account for this when creating self.expected, but
        # this should be equivalent to a puncpat of the correct size.

        self.puncsize = 4
        self.puncpat0 = 0x5555  # too many bits set
        self.puncpat1 = 0x55  # num bits = puncsize
        self.delay = 1

        src = blocks.vector_source_f(self.src_data)
        op0 = fec.puncture_ff(self.puncsize, self.puncpat0, self.delay)
        op1 = fec.puncture_ff(self.puncsize, self.puncpat1, self.delay)
        dst0 = blocks.vector_sink_f()
        dst1 = blocks.vector_sink_f()

        self.tb.connect(src, op0, dst0)
        self.tb.connect(src, op1, dst1)
        self.tb.run()

        dst_data0 = list(dst0.data())
        dst_data1 = list(dst1.data())

        self.assertEqual(dst_data1, dst_data0)
Пример #3
0
    def test_f_000(self):
        # Test normal operation of the float puncture block

        self.puncsize = 8
        self.puncpat = 0xEF
        self.delay = 0

        self.puncture_setup()

        src = blocks.vector_source_f(self.src_data)
	op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
	dst = blocks.vector_sink_f()

	self.tb.connect(src, op, dst)
	self.tb.run()

	dst_data = list(dst.data())
        self.assertEqual(self.expected, dst_data)
Пример #4
0
    def test_f_000(self):
        # Test normal operation of the float puncture block

        self.puncsize = 8
        self.puncpat = 0xEF
        self.delay = 0

        self.puncture_setup()

        src = blocks.vector_source_f(self.src_data)
        op = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
        dst = blocks.vector_sink_f()

        self.tb.connect(src, op, dst)
        self.tb.run()

        dst_data = list(dst.data())
        self.assertEqual(self.expected, dst_data)
Пример #5
0
    def test_f_002(self):
        # Test scenariou where we have defined a puncture pattern with
        # more bits than the puncsize.

        self.puncsize = 4
        self.puncpat = 0x5555
        self.delay = 0

        self.puncture_setup()

        src = blocks.vector_source_f(self.src_data)
	op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
	dst = blocks.vector_sink_f()

	self.tb.connect(src, op, dst)
	self.tb.run()

	dst_data = list(dst.data())
        self.assertEqual(self.expected, dst_data)
Пример #6
0
    def test_f_002(self):
        # Test scenariou where we have defined a puncture pattern with
        # more bits than the puncsize.

        self.puncsize = 4
        self.puncpat = 0x5555
        self.delay = 0

        self.puncture_setup()

        src = blocks.vector_source_f(self.src_data)
        op = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
        dst = blocks.vector_sink_f()

        self.tb.connect(src, op, dst)
        self.tb.run()

        dst_data = list(dst.data())
        self.assertEqual(self.expected, dst_data)