Deleted Added
sdiff udiff text old ( 5773:7434b2271b0c ) new ( 6001:00251eb95de7 )
full compact
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

28# Steve Reinhardt
29
30import atexit
31import os
32import sys
33
34# import the SWIG-wrapped main C++ functions
35import internal
36from main import options
37import SimObject
38import ticks
39import objects
40
41# The final hook to generate .ini files. Called from the user script
42# once the config is built.
43def instantiate(root):
44 # we need to fix the global frequency
45 ticks.fixGlobalFrequency()
46
47 root.unproxy_all()
48
49 if options.dump_config:
50 ini_file = file(os.path.join(options.outdir, options.dump_config), 'w')
51 root.print_ini(ini_file)
52 ini_file.close()
53
54 # Initialize the global statistics
55 internal.stats.initSimStats()
56
57 # Create the C++ sim objects and connect ports
58 root.createCCObject()
59 root.connectPorts()
60
61 # Do a second pass to finish initializing the sim objects
62 internal.core.initAll()
63
64 # Do a third pass to initialize statistics
65 internal.core.regAllStats()
66
67 # Check to make sure that the stats package is properly initialized
68 internal.stats.check()
69
70 # Reset to put the stats in a consistent state.
71 internal.stats.reset()
72
73def doDot(root):
74 dot = pydot.Dot()
75 instance.outputDot(dot)
76 dot.orientation = "portrait"
77 dot.size = "8.5,11"
78 dot.ranksep="equally"
79 dot.rank="samerank"

--- 108 unchanged lines hidden ---