summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols/Func.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc/symbols/Func.py')
-rw-r--r--src/mem/slicc/symbols/Func.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/mem/slicc/symbols/Func.py b/src/mem/slicc/symbols/Func.py
index f0b92cdc9..771144efd 100644
--- a/src/mem/slicc/symbols/Func.py
+++ b/src/mem/slicc/symbols/Func.py
@@ -64,24 +64,15 @@ class Func(Symbol):
", ".join(self.param_strings))
def writeCodeFiles(self, path):
+ return
+
+ def generateCode(self):
'''This write a function of object Chip'''
if "external" in self:
- return
+ return ""
code = self.symtab.codeFormatter()
- # Header
- code('''
-/** Auto generated C++ code started by $__file__:$__line__ */
-
-#include "debug/RubySlicc.hh"
-#include "mem/protocol/Types.hh"
-''')
-
- if self.isInternalMachineFunc:
- code('#include "mem/protocol/${{self.machineStr}}_Controller.hh"')
-
- code('using namespace std;')
# Generate function header
void_type = self.symtab.find("void", Type)
return_type = self.return_type.c_ident
@@ -104,9 +95,6 @@ ${klass}::${{self.c_ident}}($params)
${{self.body}}
}
''')
- if self.isInternalMachineFunc:
- code.write(path, "%s_%s.cc" % (self.machineStr,self.c_ident))
- else:
- code.write(path, "%s.cc" % self.c_ident)
+ return str(code)
__all__ = [ "Func" ]