Func.py (6999:f226c098c393) Func.py (7007:79413d1ec307)
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;

--- 81 unchanged lines hidden (view full) ---

90 if self.isInternalMachineFunc:
91 klass = "%s_Controller" % self.machineStr
92 else:
93 klass = "Chip"
94
95 params = ', '.join(self.param_strings)
96
97 code('''
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;

--- 81 unchanged lines hidden (view full) ---

90 if self.isInternalMachineFunc:
91 klass = "%s_Controller" % self.machineStr
92 else:
93 klass = "Chip"
94
95 params = ', '.join(self.param_strings)
96
97 code('''
98$return_type ${klass}::${{self.c_ident}}($params)
98$return_type
99${klass}::${{self.c_ident}}($params)
99{
100${{self.body}}
101}
102''')
103 code.write(path, "%s.cc" % self.c_ident)
104
105__all__ = [ "Func" ]
100{
101${{self.body}}
102}
103''')
104 code.write(path, "%s.cc" % self.c_ident)
105
106__all__ = [ "Func" ]