Deleted Added
sdiff udiff text old ( 8998:c8bf5a20bc07 ) new ( 8999:6f306dd5cee0 )
full compact
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license
9# terms below provided that you ensure that this notice is replicated
10# unmodified and in its entirety in all distributions of the software,
11# modified or unmodified, in source code or in binary form.
12#
13# Copyright (c) 2005 The Regents of The University of Michigan
14# Copyright (c) 2010 Advanced Micro Devices, Inc.
15# All rights reserved.
16#
17# Redistribution and use in source and binary forms, with or without
18# modification, are permitted provided that the following conditions are
19# met: redistributions of source code must retain the above copyright
20# notice, this list of conditions and the following disclaimer;

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

39#
40# Authors: Nathan Binkert
41# Steve Reinhardt
42
43import atexit
44import os
45import sys
46
47# import the SWIG-wrapped main C++ functions
48import internal
49import core
50import stats
51import SimObject
52import ticks
53import objects
54from m5.util.dot_writer import do_dot
55
56from util import fatal
57from util import attrdict
58
59# define a MaxTick parameter
60MaxTick = 2**63 - 1
61
62# The final hook to generate .ini files. Called from the user script
63# once the config is built.

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

91 import json
92 json_file = file(os.path.join(options.outdir, options.json_config), 'w')
93 d = root.get_config_as_dict()
94 json.dump(d, json_file, indent=4)
95 json_file.close()
96 except ImportError:
97 pass
98
99 do_dot(root, options.outdir, options.dot_config)
100
101 # Initialize the global statistics
102 stats.initSimStats()
103
104 # Create the C++ sim objects and connect ports
105 for obj in root.descendants(): obj.createCCObject()
106 for obj in root.descendants(): obj.connectPorts()
107

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

122 for obj in root.descendants(): obj.loadState(ckpt)
123 need_resume.append(root)
124 else:
125 for obj in root.descendants(): obj.initState()
126
127 # Reset to put the stats in a consistent state.
128 stats.reset()
129
130need_resume = []
131need_startup = True
132def simulate(*args, **kwargs):
133 global need_resume, need_startup
134
135 if need_startup:
136 root = objects.Root.getInstance()
137 for obj in root.descendants(): obj.startup()

--- 96 unchanged lines hidden ---