simulate.py (13663:9b64aeabf9a5) simulate.py (13670:8a98db5a481f)
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

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

87 # Make sure SimObject-valued params are in the configuration
88 # hierarchy so we catch them with future descendants() walks
89 for obj in root.descendants(): obj.adoptOrphanParams()
90
91 # Unproxy in sorted order for determinism
92 for obj in root.descendants(): obj.unproxyParams()
93
94 if options.dump_config:
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

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

87 # Make sure SimObject-valued params are in the configuration
88 # hierarchy so we catch them with future descendants() walks
89 for obj in root.descendants(): obj.adoptOrphanParams()
90
91 # Unproxy in sorted order for determinism
92 for obj in root.descendants(): obj.unproxyParams()
93
94 if options.dump_config:
95 ini_file = file(os.path.join(options.outdir, options.dump_config), 'w')
95 ini_file = open(os.path.join(options.outdir, options.dump_config), 'w')
96 # Print ini sections in sorted order for easier diffing
97 for obj in sorted(root.descendants(), key=lambda o: o.path()):
98 obj.print_ini(ini_file)
99 ini_file.close()
100
101 if options.json_config:
102 try:
103 import json
96 # Print ini sections in sorted order for easier diffing
97 for obj in sorted(root.descendants(), key=lambda o: o.path()):
98 obj.print_ini(ini_file)
99 ini_file.close()
100
101 if options.json_config:
102 try:
103 import json
104 json_file = file(os.path.join(options.outdir, options.json_config), 'w')
104 json_file = open(
105 os.path.join(options.outdir, options.json_config), 'w')
105 d = root.get_config_as_dict()
106 json.dump(d, json_file, indent=4)
107 json_file.close()
108 except ImportError:
109 pass
110
111 do_dot(root, options.outdir, options.dot_config)
112

--- 260 unchanged lines hidden ---
106 d = root.get_config_as_dict()
107 json.dump(d, json_file, indent=4)
108 json_file.close()
109 except ImportError:
110 pass
111
112 do_dot(root, options.outdir, options.dot_config)
113

--- 260 unchanged lines hidden ---