def __init__(self, N_rb_dl):
        """
        This is the documentation for the LTE OFDM linear Estimator block!
	    """
        gr.hier_block2.__init__(self, "linear_OFDM_estimator_hier_vcvc",
				gr.io_signature(1,1, gr.sizeof_gr_complex*12*N_rb_dl),  # Input signature
				gr.io_signature(3,3, gr.sizeof_gr_complex*12*N_rb_dl))  # Output signature

        print "message define"
        self.message_port_register_hier_out("cell_id")
        
        # Define blocks
        
        self.eq   = lte.linear_OFDM_estimator_vcvc(N_rb_dl)
        self.sh1  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        self.sh2  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        self.sh3  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        
        print "msg connnect!"
        self.msg_connect(self, "cell_id", self.eq, "cell_id")
        
        self.connect(self, self.eq)
        self.connect( (self.eq,0),self.sh1, (self,0) )
        self.connect( (self.eq,1),self.sh2, (self,1) )
        self.connect( (self.eq,2),self.sh3, (self,2) )
    def __init__(self, N_rb_dl):
        """
        docstring
	    """
        gr.hier_block2.__init__(self, "linear_OFDM_estimator_hier_vcvc",
				gr.io_signature(1,1, gr.sizeof_gr_complex*12*N_rb_dl),  # Input signature
				gr.io_signature(3,3, gr.sizeof_gr_complex*12*N_rb_dl)) # Output signature

        # Define blocks
        
        self.eq   = lte.linear_OFDM_estimator_vcvc(N_rb_dl)
        #self.eq.set_cell_id(cell_id)
        self.sh1  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        self.sh2  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        self.sh3  = gr.skiphead(gr.sizeof_gr_complex*12*N_rb_dl,7)
        
        self.connect(self, self.eq)
        self.connect( (self.eq,0),self.sh1, (self,0) )
        self.connect( (self.eq,1),self.sh2, (self,1) )
        self.connect( (self.eq,2),self.sh3, (self,2) )
    def setUp(self):
        self.tb = gr.top_block()

        fftl = 2048
        N_rb_dl = 6

        # These blocks are just "dummy" blocks for this QA
        self.eq = lte.linear_OFDM_estimator_vcvc(N_rb_dl)
        self.demux = lte.pbch_demux_vcvc(N_rb_dl)
        self.descr = lte.descrambling_vfvf()
        self.daemon = lte.cell_id_daemon(self.eq, self.demux, self.descr)

        # Source 'n' Sink
        data = range(2 * fftl)
        self.src = gr.vector_source_c(data, False, fftl)
        self.snk = gr.vector_sink_c(fftl)
        self.tagsnk = gr.tag_debug(gr.sizeof_gr_complex * fftl, "SYMBOL TAG")
        # This is the UUT
        self.sss = lte.hier_sss_sync2_vcvc(self.daemon, fftl)

        self.tb.connect(self.src, self.sss, self.snk)
        self.tb.connect(self.sss, self.tagsnk)
    def setUp (self):
        self.tb = gr.top_block ()
        
        self.N_rb_dl = N_rb_dl = 6
        
        # For now, generate a pseudo-random sequence and do QPSK modulation.
        values = range(140*12*N_rb_dl)
        randlist = range(2*len(values))
        for i in randlist:
            randlist[i] = 1-2*random.randint(0,1) 
        for i in values:
            values[i] = complex(randlist[2*i]/math.sqrt(2), randlist[2*i+1]/math.sqrt(2))
            #print values[i]
            
        print "len(input) = " + str(len(values))
        self.src = gr.vector_source_c(values,False,12*N_rb_dl)
        
        self.snk0 = gr.vector_sink_c(12*N_rb_dl)
        self.snk1 = gr.vector_sink_c(12*N_rb_dl)
        self.snk2 = gr.vector_sink_c(12*N_rb_dl)
        
        self.snko0 = gr.vector_sink_c(12*N_rb_dl)
        self.snko1 = gr.vector_sink_c(12*N_rb_dl)
        self.snko2 = gr.vector_sink_c(12*N_rb_dl)
        
        # UUT
        self.cest0 = lte_swig.channel_estimator(N_rb_dl)
        
        self.tb.connect(self.src, self.cest0)
        self.tb.connect( (self.cest0,0), self.snk0)
        self.tb.connect( (self.cest0,1), self.snk1)
        self.tb.connect( (self.cest0,2), self.snk2)

        self.cest1 = lte_swig.linear_OFDM_estimator_vcvc(N_rb_dl)
        self.tb.connect(self.src, self.cest1)
        self.tb.connect( (self.cest1,0), self.snko0)
        self.tb.connect( (self.cest1,1), self.snko1)
        self.tb.connect( (self.cest1,2), self.snko2)
    def __init__(self, N_rb_dl):
        """
        docstring
	    """
        gr.hier_block2.__init__(
            self,
            "linear_OFDM_estimator_hier_vcvc",
            gr.io_signature(1, 1, gr.sizeof_gr_complex * 12 *
                            N_rb_dl),  # Input signature
            gr.io_signature(3, 3, gr.sizeof_gr_complex * 12 *
                            N_rb_dl))  # Output signature

        # Define blocks

        self.eq = lte.linear_OFDM_estimator_vcvc(N_rb_dl)
        #self.eq.set_cell_id(cell_id)
        self.sh1 = gr.skiphead(gr.sizeof_gr_complex * 12 * N_rb_dl, 7)
        self.sh2 = gr.skiphead(gr.sizeof_gr_complex * 12 * N_rb_dl, 7)
        self.sh3 = gr.skiphead(gr.sizeof_gr_complex * 12 * N_rb_dl, 7)

        self.connect(self, self.eq)
        self.connect((self.eq, 0), self.sh1, (self, 0))
        self.connect((self.eq, 1), self.sh2, (self, 1))
        self.connect((self.eq, 2), self.sh3, (self, 2))