System.py (8703:f2ac0bca75df) System.py (8769:f95b2a679eb0)
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;

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

32from m5.defines import buildEnv
33from m5.params import *
34from m5.proxy import *
35
36from PhysicalMemory import *
37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
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;

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

32from m5.defines import buildEnv
33from m5.params import *
34from m5.proxy import *
35
36from PhysicalMemory import *
37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
40class System(MemObject):
40class System(SimObject):
41 type = 'System'
41 type = 'System'
42 system_port = Port("System port")
43
44 @classmethod
42
43 @classmethod
45 def export_method_cxx_predecls(cls, code):
46 code('#include "sim/system.hh"')
44 def swig_objdecls(cls, code):
45 code('%include "python/swig/system.i"')
47
46
48 @classmethod
49 def export_methods(cls, code):
50 code('''
51 Enums::MemoryMode getMemoryMode();
52 void setMemoryMode(Enums::MemoryMode mode);
53''')
54
55 physmem = Param.PhysicalMemory("Physical Memory")
56 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
57 memories = VectorParam.PhysicalMemory(Self.all, "All memories is the system")
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
58 work_item_id = Param.Int(-1, "specific work item id")
51 work_item_id = Param.Int(-1, "specific work item id")
59 num_work_ids = Param.Int(16, "Number of distinct work item types")
60 work_begin_cpu_id_exit = Param.Int(-1,
61 "work started on specific id, now exit simulation")
62 work_begin_ckpt_count = Param.Counter(0,
63 "create checkpoint when work items begin count value is reached")
64 work_begin_exit_count = Param.Counter(0,
65 "exit simulation when work items begin count value is reached")
66 work_end_ckpt_count = Param.Counter(0,
67 "create checkpoint when work items end count value is reached")
68 work_end_exit_count = Param.Counter(0,
69 "exit simulation when work items end count value is reached")
70 work_cpus_ckpt_count = Param.Counter(0,
71 "create checkpoint when active cpu count value is reached")
72
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,
55 "create checkpoint when work items begin count value is reached")
56 work_begin_exit_count = Param.Counter(0,
57 "exit simulation when work items begin count value is reached")
58 work_end_ckpt_count = Param.Counter(0,
59 "create checkpoint when work items end count value is reached")
60 work_end_exit_count = Param.Counter(0,
61 "exit simulation when work items end count value is reached")
62 work_cpus_ckpt_count = Param.Counter(0,
63 "create checkpoint when active cpu count value is reached")
64
73 if buildEnv['FULL_SYSTEM']:
74 abstract = True
75 boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
76 "boot processor frequency")
77 init_param = Param.UInt64(0, "numerical value to pass into simulator")
78 boot_osflags = Param.String("a", "boot flags to pass to the kernel")
79 kernel = Param.String("", "file that contains the kernel code")
80 readfile = Param.String("", "file to read startup script from")
81 symbolfile = Param.String("", "file to get the symbols from")
82 load_addr_mask = Param.UInt64(0xffffffffff,
83 "Address to mask loading binaries with");
65 boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
66 "boot processor frequency")
67 init_param = Param.UInt64(0, "numerical value to pass into simulator")
68 boot_osflags = Param.String("a", "boot flags to pass to the kernel")
69 kernel = Param.String("", "file that contains the kernel code")
70 readfile = Param.String("", "file to read startup script from")
71 symbolfile = Param.String("", "file to get the symbols from")
72 load_addr_mask = Param.UInt64(0xffffffffff,
73 "Address to mask loading binaries with");