StateMachine.py (8341:30daf1dd5c91) | StateMachine.py (8478:435179113834) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 154 unchanged lines hidden (view full) --- 163 self.printControllerCC(path) 164 self.printCSwitch(path) 165 self.printCWakeup(path) 166 self.printProfilerCC(path) 167 self.printProfilerHH(path) 168 self.printProfileDumperCC(path) 169 self.printProfileDumperHH(path) 170 | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 154 unchanged lines hidden (view full) --- 163 self.printControllerCC(path) 164 self.printCSwitch(path) 165 self.printCWakeup(path) 166 self.printProfilerCC(path) 167 self.printProfilerHH(path) 168 self.printProfileDumperCC(path) 169 self.printProfileDumperHH(path) 170 |
171 for func in self.functions: 172 func.writeCodeFiles(path) 173 | |
174 def printControllerPython(self, path): 175 code = self.symtab.codeFormatter() 176 ident = self.ident 177 py_ident = "%s_Controller" % ident 178 c_ident = "%s_Controller" % self.ident 179 code(''' 180from m5.params import * 181from m5.SimObject import SimObject --- 758 unchanged lines hidden (view full) --- 940void 941$c_ident::${{action.ident}}(const Address& addr) 942{ 943 DPRINTF(RubyGenerated, "executing ${{action.ident}}\\n"); 944 ${{action["c_code"]}} 945} 946 947''') | 171 def printControllerPython(self, path): 172 code = self.symtab.codeFormatter() 173 ident = self.ident 174 py_ident = "%s_Controller" % ident 175 c_ident = "%s_Controller" % self.ident 176 code(''' 177from m5.params import * 178from m5.SimObject import SimObject --- 758 unchanged lines hidden (view full) --- 937void 938$c_ident::${{action.ident}}(const Address& addr) 939{ 940 DPRINTF(RubyGenerated, "executing ${{action.ident}}\\n"); 941 ${{action["c_code"]}} 942} 943 944''') |
945 for func in self.functions: 946 code(func.generateCode()) 947 |
|
948 code.write(path, "%s.cc" % c_ident) 949 950 def printCWakeup(self, path): 951 '''Output the wakeup loop for the events''' 952 953 code = self.symtab.codeFormatter() 954 ident = self.ident 955 --- 686 unchanged lines hidden --- | 948 code.write(path, "%s.cc" % c_ident) 949 950 def printCWakeup(self, path): 951 '''Output the wakeup loop for the events''' 952 953 code = self.symtab.codeFormatter() 954 ident = self.ident 955 --- 686 unchanged lines hidden --- |