if isinstance(c, MetaSimObject):
bTotal += 1
if bTotal > 1:
- raise TypeError, "SimObjects do not support multiple inheritance"
+ raise TypeError, \
+ "SimObjects do not support multiple inheritance"
base = bases[0]
code('''#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
-#include "sim/sim_object.hh"
#include "params/$cls.hh"
#include "sim/init.hh"
+#include "sim/sim_object.hh"
+
#include "${{cls.cxx_header}}"
''')
if keys in self._hr_values\
and keys in self._values\
- and not isinstance(self._values[keys], m5.proxy.BaseProxy):
+ and not isinstance(self._values[keys],
+ m5.proxy.BaseProxy):
cmd_str = cmd_line_str + keys
acc_str = access_str + keys
flags_dict[cmd_str] = ParamInfo(ptype,
self._parent = parent
self._name = name
- # Return parent object of this SimObject, not implemented by SimObjectVector
- # because the elements in a SimObjectVector may not share the same parent
+ # Return parent object of this SimObject, not implemented by
+ # SimObjectVector because the elements in a SimObjectVector may not share
+ # the same parent
def get_parent(self):
return self._parent
match_obj = self._values[pname]
if found_obj != None and found_obj != match_obj:
raise AttributeError, \
- 'parent.any matched more than one: %s and %s' % (found_obj.path, match_obj.path)
+ 'parent.any matched more than one: %s and %s' % \
+ (found_obj.path, match_obj.path)
found_obj = match_obj
return found_obj, found_obj != None
#ifdef linux
#define _GNU_SOURCE
#include <sched.h>
+
#endif
#include <err.h>
{ "checkpoint", do_checkpoint, "[delay [period]]" },
{ "addsymbol", do_addsymbol, "<address> <symbol>" },
{ "loadsymbol", do_loadsymbol, "" },
- { "initparam", do_initparam, "[key] // key must be shorter than 16 chars" },
+ { "initparam", do_initparam, "[key] // key must be shorter"
+ " than 16 chars" },
{ "sw99param", do_sw99param, "" },
#ifdef linux
{ "pin", do_pin, "<cpu> <program> [args ...]" }
exit(1);
}
- m5_mem = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, M5OP_ADDR);
+ m5_mem = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
+ M5OP_ADDR);
if (!m5_mem) {
perror("Can't mmap /dev/mem");
exit(1);