def _vhdl__reasign(self, obj, rhs, astParser=None,context_str=None):
        
        asOp = hdl.get_assiment_op(obj)

        
        if rhs._Inout == InOut_t.Master_t and rhs._varSigConst == varSig.signal_t:
            raise Exception("cannot read from Master")
        if rhs._Inout == InOut_t.output_t and rhs._varSigConst == varSig.signal_t:
            raise Exception("cannot read from Output")


        obj._add_output()
        
        if obj.__v_classType__ == v_classType_t.Master_t or obj.__v_classType__ == v_classType_t.Slave_t:
            hdl_call = hdl._vhdl__call_member_func(obj, "__lshift__",[obj, rhs],astParser)
            if hdl_call is None:
                astParser.Missing_template=True
                return "-- $$ template missing $$"
            return hdl_call


            
        if rhs._type != obj._type:
            raise Exception("cannot assigne different types.", str(obj), rhs._type, obj._type )
        return obj.get_vhdl_name() + asOp +  rhs.get_vhdl_name()
Example #2
0
    def impl_reasign(self, obj, rhs, astParser=None, context_str=None):

        asOp = hdl.get_assiment_op(obj)

        if rhs._Inout == InOut_t.Master_t:
            raise Exception("cannot read from Master")
        if rhs._Inout == InOut_t.output_t:
            raise Exception("cannot read from Output")

        if rhs._type != obj._type:
            raise Exception("cannot assigne different types.", str(obj),
                            rhs._type, obj._type)

        ret ="---------------------------------------------------------------------\n--  " + \
                obj.get_vhdl_name() +" << " + rhs.get_vhdl_name()+"\n"
        ret += obj.get_vhdl_name(InOut_t.output_t) + asOp + rhs.get_vhdl_name(
            InOut_t.output_t) + ";\n"
        ret += rhs.get_vhdl_name(InOut_t.input_t) + asOp + obj.get_vhdl_name(
            InOut_t.input_t)
        return ret
 def impl_reasign(self, obj, rhs, astParser=None,context_str=None):
     asOp = hdl.get_assiment_op(obj)    
     return str(obj) +asOp +  str(rhs)