System.py (9281:9b6882b58a3f) System.py (9313:0ad73254027b)
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;

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

37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
40class System(MemObject):
41 type = 'System'
42 system_port = MasterPort("System port")
43
44 # Override the clock from the ClockedObject which looks at the
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;

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

37
38class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing']
39
40class System(MemObject):
41 type = 'System'
42 system_port = MasterPort("System port")
43
44 # Override the clock from the ClockedObject which looks at the
45 # parent clock by default
46 clock = '1t'
47 # @todo Either make this value 0 and treat it as an error if it is
48 # not overridden, or choose a more sensible value in the range of
49 # 1GHz
45 # parent clock by default. The 1 GHz default system clock serves
46 # as a start for the modules that rely on the parent to provide
47 # the clock.
48 clock = '1GHz'
50
51 @classmethod
52 def export_method_cxx_predecls(cls, code):
53 code('#include "sim/system.hh"')
54
55 @classmethod
56 def export_methods(cls, code):
57 code('''

--- 29 unchanged lines hidden ---
49
50 @classmethod
51 def export_method_cxx_predecls(cls, code):
52 code('#include "sim/system.hh"')
53
54 @classmethod
55 def export_methods(cls, code):
56 code('''

--- 29 unchanged lines hidden ---