def test_001_t (self):
        # set up fg
        cfg = phy(slow_rate=False)
        data_in = range(541) # some random prime number
        self.src = blocks.vector_source_f(data_in)
        self.intlv = ieee802_15_4.deinterleaver_ff(intlv_seq=())
        self.snk = blocks.vector_sink_f(1)
        self.tb.connect(self.src, self.intlv, self.snk)
        self.tb.run ()

        # check data
        data_out = self.snk.data()
        self.assertFloatTuplesAlmostEqual(data_in, data_out) 
Ejemplo n.º 2
0
    def test_001_t(self):
        # set up fg
        cfg = phy(slow_rate=False)
        data_in = range(541)  # some random prime number
        self.src = blocks.vector_source_f(data_in)
        self.intlv = ieee802_15_4.deinterleaver_ff(intlv_seq=())
        self.snk = blocks.vector_sink_f(1)
        self.tb.connect(self.src, self.intlv, self.snk)
        self.tb.run()

        # check data
        data_out = self.snk.data()
        self.assertFloatTuplesAlmostEqual(data_in, data_out)
    def test_002_t (self):
		# set up fg
		cfg = phy(slow_rate=True)
		data_in = range(3*len(cfg.intlv_seq))
		self.src = blocks.vector_source_f(data_in)
		self.intlv = ieee802_15_4.deinterleaver_ff(intlv_seq=cfg.intlv_seq)
		self.snk = blocks.vector_sink_f(1)
		self.tb.connect(self.src, self.intlv, self.snk)
		self.tb.run ()

		# check data
		data_out = self.snk.data()
		ref = []
		for n in range(3):
			for i in range(len(cfg.intlv_seq)):
				ref.append(data_in[n*len(cfg.intlv_seq)+cfg.intlv_seq[i]])       
		self.assertFloatTuplesAlmostEqual(ref, data_out)              
Ejemplo n.º 4
0
    def test_002_t(self):
        # set up fg
        cfg = phy(slow_rate=True)
        data_in = range(3 * len(cfg.intlv_seq))
        self.src = blocks.vector_source_f(data_in)
        self.intlv = ieee802_15_4.deinterleaver_ff(intlv_seq=cfg.intlv_seq)
        self.snk = blocks.vector_sink_f(1)
        self.tb.connect(self.src, self.intlv, self.snk)
        self.tb.run()

        # check data
        data_out = self.snk.data()
        ref = []
        for n in range(3):
            for i in range(len(cfg.intlv_seq)):
                ref.append(data_in[n * len(cfg.intlv_seq) + cfg.intlv_seq[i]])
        self.assertFloatTuplesAlmostEqual(ref, data_out)