System.py (8773:ac39e3421c34) System.py (8795:0909f8ed7aa0)
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# Copyright (c) 2011 Regents of the University of California
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;

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

36from PhysicalMemory import *
37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
40class System(SimObject):
41 type = 'System'
42
43 @classmethod
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# Copyright (c) 2011 Regents of the University of California
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;

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

36from PhysicalMemory import *
37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
40class System(SimObject):
41 type = 'System'
42
43 @classmethod
44 def swig_objdecls(cls, code):
45 code('%include "python/swig/system.i"')
44 def export_method_cxx_predecls(cls, code):
45 code('#include "sim/system.hh"')
46
46
47 @classmethod
48 def export_methods(cls, code):
49 code('''
50 Enums::MemoryMode getMemoryMode();
51 void setMemoryMode(Enums::MemoryMode mode);
52''')
53
47 physmem = Param.PhysicalMemory("Physical Memory")
48 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
49 memories = VectorParam.PhysicalMemory(Self.all, "All memories is the system")
50
51 work_item_id = Param.Int(-1, "specific work item id")
52 work_begin_cpu_id_exit = Param.Int(-1,
53 "work started on specific id, now exit simulation")
54 work_begin_ckpt_count = Param.Counter(0,

--- 17 unchanged lines hidden ---
54 physmem = Param.PhysicalMemory("Physical Memory")
55 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
56 memories = VectorParam.PhysicalMemory(Self.all, "All memories is the system")
57
58 work_item_id = Param.Int(-1, "specific work item id")
59 work_begin_cpu_id_exit = Param.Int(-1,
60 "work started on specific id, now exit simulation")
61 work_begin_ckpt_count = Param.Counter(0,

--- 17 unchanged lines hidden ---