__init__.py (3101:6cce868ddaa6) | __init__.py (3102:225b76c8ac68) |
---|---|
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 --- 57 unchanged lines hidden (view full) --- 66import smartdict 67build_env = smartdict.SmartDict() 68build_env.update(defines.m5_build_env) 69 70# make a SmartDict out of the OS environment too 71env = smartdict.SmartDict() 72env.update(os.environ) 73 | 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 --- 57 unchanged lines hidden (view full) --- 66import smartdict 67build_env = smartdict.SmartDict() 68build_env.update(defines.m5_build_env) 69 70# make a SmartDict out of the OS environment too 71env = smartdict.SmartDict() 72env.update(os.environ) 73 |
74from main import options, arguments, main 75 | |
76# The final hook to generate .ini files. Called from the user script 77# once the config is built. 78def instantiate(root): 79 params.ticks_per_sec = float(root.clock.frequency) 80 # ugly temporary hack to get output to config.ini 81 sys.stdout = file(os.path.join(options.outdir, 'config.ini'), 'w') 82 root.print_ini() 83 sys.stdout.close() # close config.ini --- 117 unchanged lines hidden (view full) --- 201# 1. Put all intra-package imports at the *bottom* of the file, unless 202# they're absolutely needed before that (for top-level statements 203# or class attributes). Imports of "trivial" packages that don't 204# import other packages (e.g., 'smartdict') can be at the top. 205# 2. Never use 'from foo import *' on an intra-package import since 206# you can get the wrong result if foo is only partially imported 207# at the point you do that (i.e., because foo is in the middle of 208# importing *you*). | 74# The final hook to generate .ini files. Called from the user script 75# once the config is built. 76def instantiate(root): 77 params.ticks_per_sec = float(root.clock.frequency) 78 # ugly temporary hack to get output to config.ini 79 sys.stdout = file(os.path.join(options.outdir, 'config.ini'), 'w') 80 root.print_ini() 81 sys.stdout.close() # close config.ini --- 117 unchanged lines hidden (view full) --- 199# 1. Put all intra-package imports at the *bottom* of the file, unless 200# they're absolutely needed before that (for top-level statements 201# or class attributes). Imports of "trivial" packages that don't 202# import other packages (e.g., 'smartdict') can be at the top. 203# 2. Never use 'from foo import *' on an intra-package import since 204# you can get the wrong result if foo is only partially imported 205# at the point you do that (i.e., because foo is in the middle of 206# importing *you*). |
207from main import options |
|
209import objects 210import params | 208import objects 209import params |
210from SimObject import resolveSimObject |
|