Ejemplo n.º 1
0
 def test_005_t (self):
     src_data = (1, 2, 3, 4)
     expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4)
     src = blocks.vector_source_b(src_data)
     intlv1 = tcc_sdr.interleaver_bb(2,2)
     intlv2 = tcc_sdr.interleaver_bb(2,2)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv1)
     self.tb.connect(intlv1, intlv2)
     self.tb.connect(intlv2, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)
Ejemplo n.º 2
0
 def test_005_t(self):
     src_data = (1, 2, 3, 4)
     expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4)
     src = blocks.vector_source_b(src_data)
     intlv1 = tcc_sdr.interleaver_bb(2, 2)
     intlv2 = tcc_sdr.interleaver_bb(2, 2)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv1)
     self.tb.connect(intlv1, intlv2)
     self.tb.connect(intlv2, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)
Ejemplo n.º 3
0
 def test_006_t (self):
     src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
     expected_result = (0, 0, 0, 0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10, 12)
     src = blocks.vector_source_b(src_data)
     intlv = tcc_sdr.interleaver_bb(2,2)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv)
     self.tb.connect(intlv, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)
Ejemplo n.º 4
0
 def test_004_t (self):
     src_data = (1, 0, 0, 1, 0, 0, 1, 0, 0)
     expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0)
     src = blocks.vector_source_b(src_data)
     intlv = tcc_sdr.interleaver_bb(3,3)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv)
     self.tb.connect(intlv, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)
Ejemplo n.º 5
0
 def test_006_t(self):
     src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
     expected_result = (0, 0, 0, 0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10, 12)
     src = blocks.vector_source_b(src_data)
     intlv = tcc_sdr.interleaver_bb(2, 2)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv)
     self.tb.connect(intlv, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)
Ejemplo n.º 6
0
 def test_004_t(self):
     src_data = (1, 0, 0, 1, 0, 0, 1, 0, 0)
     expected_result = (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
                        0)
     src = blocks.vector_source_b(src_data)
     intlv = tcc_sdr.interleaver_bb(3, 3)
     dst = blocks.vector_sink_b()
     self.tb.connect(src, intlv)
     self.tb.connect(intlv, dst)
     self.tb.run()
     result_data = dst.data()
     self.assertEqual(expected_result, result_data)