示例#1
0
    def __request_function_with_default_arguments__(self):
        for function_node in self.get_function_definitions():
            self.ClassInstance.set_vhdl_name("self", True)
            Arglist = []
            Arglist.append({
                "name": "self",
                "symbol": v_deepcopy(self.ClassInstance),
                "ScopeType": InOut_t.InOut_tt
            })
            Arglist[-1]["symbol"]._Inout = InOut_t.InOut_tt
            Arglist += list(self.astParser.get_func_args_list(function_node))
            exist = checkIfFunctionexists(self.ClassInstance,
                                          function_node.name, Arglist)
            if exist:
                continue

            print_cnvt(
                str(gTemplateIndent) + '<request_new_template name="' +
                str(function_node.name) + '"/>')

            self.ClassInstance.__hdl_converter__.MemfunctionCalls.append(
                memFunctionCall(name=function_node.name,
                                args=[x["symbol"] for x in Arglist],
                                obj=self.ClassInstance,
                                call_func=None,
                                func_args=None,
                                setDefault=True,
                                varSigIndependent=False))
 def append_reset(self, obj):
     self.MemfunctionCalls.append(
         memFunctionCall(name="reset",
                         args=[obj],
                         obj=obj,
                         call_func=call_func_record_reset,
                         func_args=None,
                         setDefault=False,
                         varSigIndependent=True))
示例#3
0
    def get_get_call_member_function(self, obj, name, args):
        args = [x.get_symbol() for x in args]

        for x in obj.__hdl_converter__.MemfunctionCalls:
            if x.name != name:
                continue
            if not x.isSameArgs(args):
                continue
            return x

        x = memFunctionCall(name=name,
                            args=args,
                            obj=obj,
                            call_func=None,
                            func_args=None,
                            setDefault=False,
                            varSigIndependent=False)
        obj.__hdl_converter__.MemfunctionCalls.append(x)
        obj.IsConverted = False
        return x
    def __request_function_with_default_arguments__(self):
        Arglist = []
        
        Arglist += list(self.astParser.get_func_args_list(self.Function_Node ,IsFreeFunction = True ))
        exist = checkIfFunctionexists(self.freeFunction, self.freeFunction.FuncName , Arglist)
        if  exist:
            return

        print_cnvt(str(gTemplateIndent) +'<request_new_template name="'+ str(self.freeFunction.FuncName)+'"/>' )
        

        self.freeFunction.__hdl_converter__.MemfunctionCalls.append(
            memFunctionCall(
            name= self.freeFunction.FuncName,
            args= [x["symbol"] for x in   Arglist],
            obj= self.freeFunction,
            call_func = call_func,
            func_args = None,
            setDefault = False,
            varSigIndependent = False
        ))