Searched refs:code (Results 1 - 25 of 95) sorted by relevance

1234

/gem5/src/mem/slicc/generate/
H A Ddot.py7 # met: redistributions of source code must retain the above copyright
30 def printDotty(sm, code):
31 code('digraph ${{sm.getIdent()}} {')
32 code.indent()
38 code('${{t.getStateShorthand()}} -> ${{t.getNextStateShorthand()}')
39 code(' [label="${{t.getEventShorthand()}}/${{t.getActionShorthands()}}"')
40 code.dedent()
41 code('}')
H A Dhtml.py7 # met: redistributions of source code must retain the above copyright
31 code = code_formatter()
32 code('''
37 return code
/gem5/src/mem/slicc/symbols/
H A DType.py7 # met: redistributions of source code must retain the above copyright
35 def __init__(self, symtab, ident, location, type, code, pairs,
38 code, pairs, machine)
190 code = self.symtab.codeFormatter()
191 code('''
195 * Auto generated C++ code started by $__file__:$__line__
209 code('#include "mem/ruby/protocol/$0.hh"', dm.type.c_ident)
213 code('#include "mem/ruby/protocol/$0.hh"', self["interface"])
216 code('''
224 code('(Tic
[all...]
H A DStateMachine.py8 # met: redistributions of source code must retain the above copyright
220 code = self.symtab.codeFormatter()
226 code('''
235 code.indent()
244 code('${{param.ident}} = Param.${{python_type}}(${dflt_str}"")')
251 code.dedent()
252 code.write(path, '%s.py' % py_ident)
257 code = self.symtab.codeFormatter()
261 code('''
264 * Auto generated C++ code starte
[all...]
H A DVar.py7 # met: redistributions of source code must retain the above copyright
31 def __init__(self, symtab, ident, location, type, code, pairs,
37 self.code = code
/gem5/src/mem/slicc/ast/
H A DIsValidPtrExprAST.py7 # met: redistributions of source code must retain the above copyright
41 def generate(self, code):
43 fix = code.nofix()
44 code("(")
47 code("${var_code} != NULL)")
49 code("${var_code} == NULL)")
50 code.fix(fix)
H A DOodAST.py7 # met: redistributions of source code must retain the above copyright
38 def generate(self, code):
39 code += "NULL"
H A DExprAST.py6 # met: redistributions of source code must retain the above copyright
38 code = self.slicc.codeFormatter(fix_newlines=False)
39 return_type = self.generate(code)
41 return return_type, code
43 return code
H A DIfStatementAST.py7 # met: redistributions of source code must retain the above copyright
45 def generate(self, code, return_type):
54 code.indent()
55 code('if ($cond_code) {')
57 code.indent()
59 self.then.generate(code, return_type)
61 code.dedent()
64 code('} else {')
65 code.indent()
67 self.else_.generate(code, return_typ
[all...]
H A DLiteralExprAST.py7 # met: redistributions of source code must retain the above copyright
40 def generate(self, code):
41 fix = code.nofix()
43 code('("${{self.literal}}")')
45 code('(${{str(self.literal).lower()}})')
47 code('(${{self.literal}})')
48 code.fix(fix)
H A DEnumExprAST.py7 # met: redistributions of source code must retain the above copyright
43 def generate(self, code):
44 fix = code.nofix()
45 code('${{self.type_ast.type.c_ident}}_${{self.value}}')
46 code.fix(fix)
H A DNewExprAST.py7 # met: redistributions of source code must retain the above copyright
42 def generate(self, code):
44 fix = code.nofix()
45 code("new ${{type.c_ident}}")
46 code.fix(fix)
H A DEnqueueStatementAST.py8 # met: redistributions of source code must retain the above copyright
45 def generate(self, code, return_type):
46 code("{")
47 code.indent()
58 code("std::shared_ptr<${{msg_type.c_ident}}> out_msg = "\
62 t = self.statements.generate(code, None)
67 code("(${{self.queue_name.var.code}}).enqueue(" \
70 code("(${{self.queue_name.var.code}})
[all...]
H A DStallAndWaitStatementAST.py8 # met: redistributions of source code must retain the above copyright
40 def generate(self, code, return_type):
44 in_port_code = self.in_port.var.code
45 address_code = self.address.var.code
46 code('''
H A DCheckProbeStatementAST.py8 # met: redistributions of source code must retain the above copyright
40 def generate(self, code, return_type):
44 in_port_code = self.in_port.var.code
45 address_code = self.address.var.code
46 code('''
H A DFuncCallExprAST.py8 # met: redistributions of source code must retain the above copyright
41 def generate(self, code):
67 code('DPRINTF($0, "$1: $2")',
70 code('DPRINTF($0, "$1: $2", $3)',
86 code('DPRINTFN("$0: $1")',
89 code('DPRINTFN("$0: $1", $2)',
98 code("APPEND_TRANSITION_COMMENT($0)", self.exprs[0].inline())
110 # Check the types and get the code for the parameters
131 code('''
135 code('''
[all...]
H A DCheckNextCycleAST.py7 # met: redistributions of source code must retain the above copyright
38 def generate(self, code, return_type):
39 code("scheduleEvent(Cycles(1));")
H A DMemberExprAST.py7 # met: redistributions of source code must retain the above copyright
40 def generate(self, code):
42 fix = code.nofix()
48 code("(*$gcode).m_${{self.field}}")
50 code("($gcode).m_${{self.field}}")
52 code.fix(fix)
H A DLocalVariableAST.py8 # met: redistributions of source code must retain the above copyright
48 code = self.slicc.codeFormatter(fix_newlines=False)
49 return_type = self.generate(code)
51 return return_type, code
53 return code
55 def generate(self, code):
67 code += "%s* %s" % (type.c_ident, ident)
69 code += "%s %s" % (type.c_ident, ident)
H A DPeekStatementAST.py8 # met: redistributions of source code must retain the above copyright
45 def generate(self, code, return_type):
60 qcode = self.queue_name.var.code
61 code('''
76 code('''
87 code('''
94 self.statements.generate(code, return_type)
96 code("}")
/gem5/src/systemc/python/
H A Dsystemc.py5 # met: redistributions of source code must retain the above copyright
35 def __init__(self, code, message):
36 self.code = code
/gem5/src/python/m5/
H A DSimObject.py11 # modified or unmodified, in source code or in binary form.
20 # met: redistributions of source code must retain the above copyright
102 # allows parameter validity checking in the Python code. Continuing
130 def createCxxConfigDirectoryEntryFile(code, name, simobj, is_header):
134 code('#include "params/%s.hh"' % name)
139 code('#include "%s"' % param.ptype._value_dict['cxx_header'])
140 code('#include "params/%s.hh"' % param.ptype.__name__)
142 param.ptype.cxx_ini_predecls(code)
147 code('#include "sim/cxx_config.hh"')
148 code()
[all...]
/gem5/configs/example/
H A Dsc_main.py5 # met: redistributions of source code must retain the above copyright
47 if result.code != 0:
48 m5.util.panic('sc_main return code was %d.' % result.code)
/gem5/src/systemc/tests/
H A Dconfig.py5 # met: redistributions of source code must retain the above copyright
50 if result.code != 0:
55 sys.exit(int(result.code))
/gem5/src/python/
H A Dimporter.py6 # met: redistributions of source code must retain the above copyright
33 # code objects. The keys are the module path, and the items are the
39 def add_module(self, filename, abspath, modpath, code):
43 self.modules[modpath] = (filename, abspath, code)
69 srcfile,abspath,code = self.modules[fullname]
74 code = compile(src, abspath, 'exec')
83 exec(code, mod.__dict__)
92 # add_module can be used to add code.

Completed in 20 milliseconds

1234