type = 'LinuxArmSystem'
cxx_header = "arch/arm/linux/system.hh"
- @classmethod
- def export_method_cxx_predecls(cls, code):
- code('#include "arch/arm/linux/system.hh"')
-
@classmethod
def export_methods(cls, code):
code('''void dumpDmesg();''')
cxx_header = "cpu/kvm/base.hh"
abstract = True
- @classmethod
- def export_method_cxx_predecls(cls, code):
- code('#include "cpu/kvm/base.hh"')
-
@classmethod
def export_methods(cls, code):
code('''
# suppresses inheritance by substituting in the base (null)
# versions of these methods unless a different version is
# explicitly supplied.
- for method_name in ('export_methods', 'export_method_cxx_predecls',
- 'export_method_swig_predecls'):
+ for method_name in ('export_methods', 'export_method_swig_predecls'):
if method_name not in cls.__dict__:
base_method = getattr(MetaSimObject, method_name)
m = MethodType(base_method, cls, MetaSimObject)
def export_methods(cls, code):
pass
- # Generate the code needed as a prerequisite for the C++ methods
- # exported via export_methods() to be compiled in the _wrap.cc
- # file. Typically generates one or more #include statements. If
- # any methods are exported, typically at least the C++ header
- # declaring the relevant SimObject class must be included.
- def export_method_cxx_predecls(cls, code):
- pass
-
# Generate the code needed as a prerequisite for the C++ methods
# exported via export_methods() to be processed by SWIG.
# Typically generates one or more %include or %import statements.
for param in params:
param.cxx_predecls(code)
code('#include "${{cls.cxx_header}}"')
- cls.export_method_cxx_predecls(code)
code('''\
/**
* This is a workaround for bug in swig. Prior to gcc 4.6.1 the STL
cxx_header = "sim/system.hh"
system_port = MasterPort("System port")
- @classmethod
- def export_method_cxx_predecls(cls, code):
- code('#include "sim/system.hh"')
-
@classmethod
def export_methods(cls, code):
code('''