SimObject.py (10532:66451b99f3e6) SimObject.py (10584:babb40bd2fc6)
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

686 def swig_decl(cls, code):
687 class_path = cls.cxx_class.split('::')
688 classname = class_path[-1]
689 namespaces = class_path[:-1]
690
691 # The 'local' attribute restricts us to the params declared in
692 # the object itself, not including inherited params (which
693 # will also be inherited from the base class's param struct
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

686 def swig_decl(cls, code):
687 class_path = cls.cxx_class.split('::')
688 classname = class_path[-1]
689 namespaces = class_path[:-1]
690
691 # The 'local' attribute restricts us to the params declared in
692 # the object itself, not including inherited params (which
693 # will also be inherited from the base class's param struct
694 # here).
695 params = cls._params.local.values()
694 # here). Sort the params based on their key
695 params = map(lambda (k, v): v, sorted(cls._params.local.items()))
696 ports = cls._ports.local
697
698 code('%module(package="m5.internal") param_$cls')
699 code()
700 code('%{')
701 code('#include "sim/sim_object.hh"')
702 code('#include "params/$cls.hh"')
703 for param in params:

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

767
768
769 # Generate the C++ declaration (.hh file) for this SimObject's
770 # param struct. Called from src/SConscript.
771 def cxx_param_decl(cls, code):
772 # The 'local' attribute restricts us to the params declared in
773 # the object itself, not including inherited params (which
774 # will also be inherited from the base class's param struct
696 ports = cls._ports.local
697
698 code('%module(package="m5.internal") param_$cls')
699 code()
700 code('%{')
701 code('#include "sim/sim_object.hh"')
702 code('#include "params/$cls.hh"')
703 for param in params:

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

767
768
769 # Generate the C++ declaration (.hh file) for this SimObject's
770 # param struct. Called from src/SConscript.
771 def cxx_param_decl(cls, code):
772 # The 'local' attribute restricts us to the params declared in
773 # the object itself, not including inherited params (which
774 # will also be inherited from the base class's param struct
775 # here).
776 params = cls._params.local.values()
775 # here). Sort the params based on their key
776 params = map(lambda (k, v): v, sorted(cls._params.local.items()))
777 ports = cls._ports.local
778 try:
779 ptypes = [p.ptype for p in params]
780 except:
781 print cls, p, p.ptype_str
782 print params
783 raise
784

--- 741 unchanged lines hidden ---
777 ports = cls._ports.local
778 try:
779 ptypes = [p.ptype for p in params]
780 except:
781 print cls, p, p.ptype_str
782 print params
783 raise
784

--- 741 unchanged lines hidden ---