summaryrefslogtreecommitdiff
path: root/python/m5
AgeCommit message (Collapse)Author
2005-03-22Use the multidict in the python config stuff. Makes code a bitNathan Binkert
cleaner. python/m5/config.py: Use the multidict instead of the separately coded _getparam and _getvalue stuff. While we're at it, when we see a default parameter, we stick it into the dictionary right away. --HG-- extra : convert_revision : d6f6f5cc454a479e27718ec7952cd7559229ebe7
2005-03-22Sort the sim objects in the python outputNathan Binkert
python/m5/config.py: Turn back on the sorting of sim objects so we get consistent output. This can lead to slight changes in stats. --HG-- extra : convert_revision : 8ef9bd534cd2344acd69af7f52ee90b8b1afeb24
2005-03-19Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5Steve Reinhardt
into zizzer.eecs.umich.edu:/z/stever/bk/m5-head --HG-- extra : convert_revision : a1cca61433e2cc9fd99d1a2361d32ea5c91b09c7
2005-03-18Byproducts of aborted attempt to refine 'parent' proxy semantics.Steve Reinhardt
Mostly cleanup of mpy_importer.mpy_parse(). python/m5/__init__.py: Move panic() up to top in case we want to use it in mpy_importer (though I ended up not doing that after all). python/m5/config.py: Add a couple of comments and a check for expressions like parent.any.foo (which is illegal). --HG-- extra : convert_revision : dfc99ac9b1a2d91a736ca0b773b6d3c528a4f3cc
2005-03-17Merge zizzer:/bk/m5 into zed.eecs.umich.edu:/z/hsul/work/m5/pact05Lisa Hsu
--HG-- extra : convert_revision : a0a10fccc03edcc5164536ea853788b982e332d7
2005-03-17allow the call to len on Value proxy.Lisa Hsu
--HG-- extra : convert_revision : 1a0aaf8db5ef60e0e7fc053bf4605eb90bb6e9e0
2005-03-16Merge zizzer.eecs.umich.edu:/z/stever/bk/m5-headSteve Reinhardt
into zizzer.eecs.umich.edu:/z/stever/bk/m5-py --HG-- extra : convert_revision : 39f30bd052c0f2b88524311d674bad7a0fae6358
2005-03-16Allow proxies to refer to proxies in config files.Steve Reinhardt
python/m5/config.py: Allow proxies to refer to other proxies and resolve by recurseivly calling unproxy(). Not sure this works completely (since I don't have any examples to test it on) but it doesn't seem to break any existing config scripts. --HG-- extra : convert_revision : d7fc272d0777d85f89104dfb5d1c5e4d8ddd6d6f
2005-03-16Make panic work in m5.configNathan Binkert
python/m5/config.py: get panic from the m5 package. --HG-- extra : convert_revision : 0965c13086f5eef7214298227c34cd9693534555
2005-03-16Enhancements to python config proxy class.Steve Reinhardt
python/m5/config.py: - Enhanced Proxy class now supports subscripting, e.g., parent.cpu[0] or even parent.cpu[0].icache. - Proxy also supports multiplication (e.g., parent.cycle * 3), though this feature has not been tested. - Subscript 0 works even on non-lists, so you can safely say cpu[0] and get the first cpu even if there's only one. - Changed name of proxy object from 'Super' to 'parent', and changed "wild card" notation from plain 'Super' to 'parent.any'. python/m5/objects/AlphaConsole.mpy: python/m5/objects/BaseCPU.mpy: python/m5/objects/BaseSystem.mpy: python/m5/objects/Device.mpy: python/m5/objects/Ethernet.mpy: python/m5/objects/Ide.mpy: python/m5/objects/IntrControl.mpy: python/m5/objects/Pci.mpy: python/m5/objects/PhysicalMemory.mpy: python/m5/objects/Platform.mpy: python/m5/objects/SimConsole.mpy: python/m5/objects/SimpleDisk.mpy: python/m5/objects/Tsunami.mpy: python/m5/objects/Uart.mpy: Change 'Super.foo' to 'parent.foo' (and 'Super' to 'parent.any'). --HG-- extra : convert_revision : f996d0a3366d5e3e60ae5973691148c3d7cd497d
2005-03-15Add a comment to smartdict.py.Steve Reinhardt
python/m5/smartdict.py: Add a comment explaining why this actually works. --HG-- extra : convert_revision : 39cbde547f4bf6cf626ab1c0b6ef56a5788b09b8
2005-03-15get rid of issequence and just use the isinstance builtinNathan Binkert
--HG-- extra : convert_revision : eca99aa35ad5c5c1c86325f55cf693ff585c9826
2005-03-14Fix for using Python 2.4Kevin Lim
--HG-- extra : convert_revision : 1682c4b77a76137974d3cb0d28c36e3d02e4e5cd
2005-03-14Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5Ali Saidi
--HG-- extra : convert_revision : 9eed6f31249ff099464044b32b882b3cc041b57a
2005-03-14put the syscall emulation error stuff to bed, finallyAli Saidi
remove addr from pciconfig objects and update Monet configuration for ron's changes python/m5/objects/Pci.mpy: I was a little over zelous in my removal of addr, this one should have stayed --HG-- extra : convert_revision : 6c94b11d4c63d50ffe5568b16a131a4105654126
2005-03-14- Add capability to auto-generate Param structs fromSteve Reinhardt
.mpy SimObject descriptions. Structs are defined in simobj/param/ObjectName.hh. - Move compile-time python params (from CPPDEFINES) to separate dict from run-time params (from os.environ). The former are needed to generate proper param structs. This also helps prevent users from messing things up by setting the wrong environment vars (which could have overridden compile-time settings in the old system). - Other misc cleanup of m5 python package. SConscript: Include simobj/SConscript build/SConstruct: Fix type in comment python/SConscript: Move CPPDEFINES dict-generating code to m5scons.flatten_defines python/m5/__init__.py: - Generate a build_env SmartDict here to hold compile-time params (passed in via __main__.m5_build_env). - Move panic and env here from config.py. python/m5/config.py: Move panic, env to top level (m5/__init__.py) python/m5/objects/BaseCPU.mpy: Use build_env instead of env for compile-time params python/m5/smartdict.py: Add some comments. sim/sim_object.hh: Include auto-generated Param struct. Not used yet, just here as proof of concept. test/genini.py: Put -E arguments in build_env as well as os.environ --HG-- extra : convert_revision : cf6f4a2565b230c495b33b18612d6030988adac5
2005-03-13Minor Python config bug fix.Steve Reinhardt
python/m5/config.py: Add 'panic' to __all__ (some of Nate's scripts use it). --HG-- extra : convert_revision : ae3e2398dffe3edd17ee0155f38bc757d3552df2
2005-03-13A few fixes after trying one of Nate's job scripts.Steve Reinhardt
python/m5/config.py: Add issequence to __all__ export list. Added some more comments too. --HG-- extra : convert_revision : 17cd9205e43fe276f71563fcb96ec3c5069fcc86
2005-03-13Clean up import situation... key things are:Steve Reinhardt
- global tracking of legitimate param types in separate dict keeps us from having to import objects in config.py, which gets rid of nasty circular dependence - use __all__ in config.py and restrict imports from mpy_importer to reduce m5 namespace pollution python/m5/__init__.py: Try to limit namespace pollution by only importing what's needed from mpy_importer. Explicitly set up legal parameter types rather than relying on eval(). python/m5/config.py: Use empty ParamType base class to distinguish types that are legitimate SimObject params. Explicitly add these to global param_types map. Rework CheckedInt and Range classes a little bit to fit in better with the model. No need to import objects here any longer. Add __all__ list to specify subset of names that get exported on 'from m5.config import *'. --HG-- extra : convert_revision : 01c6e82e0b175fc9b3df25dd0cc80ecd842680bc
2005-03-11Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5Ali Saidi
--HG-- rename : objects/Pci.mpy => python/m5/objects/Pci.mpy extra : convert_revision : 6902e8f9c2a309eb1846094a94b38018587a3761
2005-03-11move the conversion stuff that was in configs/kernel/Config.py intoNathan Binkert
the m5 package as convert.py add a smartdict class which stores strings and can intelligently interpret those string variables as several other types. make the env dict use the smartdict class python/m5/config.py: move a bunch of conversion functions into convert.py turn the env dict into a smartdict adapt the _CheckedInt stuff to deal with derived types python/m5/objects/BaseCPU.mpy: env is now a smartdict and can properly convert to bool --HG-- extra : convert_revision : 8abcd35a5ab14b82f280aea59020953869e33365
2005-03-11Make ConfigNodes as intermediate containers work again.Nathan Binkert
python/m5/config.py: move the type stuff into the Node constructor and only try to grab self.type if the realtype is a SimObject --HG-- extra : convert_revision : 00f6ece47e3812f67f9e1f062fe9c060bd6dd1cf
2005-03-11stick all python stuff into a top level python directory.Nathan Binkert
create an m5 package in python/m5 move the objects package into the m5 package move the m5config into the m5 package as config leave both importers outside of the package. SConscript: sim/main.cc: move sim/pyconfig/* -> python python/SConscript: m5config.py -> m5/config.py (now automatically embedded) objects -> python/m5/objects embed all python files in python/m5 python/m5/config.py: importer renamed mpy_importer move code to m5/__init__.py test/genini.py: deal with new python organization keep track of paths we want to add and add them after parameters are parsed. --HG-- rename : sim/pyconfig/SConscript => python/SConscript rename : sim/pyconfig/m5config.py => python/m5/config.py rename : objects/AlphaConsole.mpy => python/m5/objects/AlphaConsole.mpy rename : objects/AlphaTLB.mpy => python/m5/objects/AlphaTLB.mpy rename : objects/BadDevice.mpy => python/m5/objects/BadDevice.mpy rename : objects/BaseCPU.mpy => python/m5/objects/BaseCPU.mpy rename : objects/BaseCache.mpy => python/m5/objects/BaseCache.mpy rename : objects/BaseSystem.mpy => python/m5/objects/BaseSystem.mpy rename : objects/Bus.mpy => python/m5/objects/Bus.mpy rename : objects/CoherenceProtocol.mpy => python/m5/objects/CoherenceProtocol.mpy rename : objects/Device.mpy => python/m5/objects/Device.mpy rename : objects/DiskImage.mpy => python/m5/objects/DiskImage.mpy rename : objects/Ethernet.mpy => python/m5/objects/Ethernet.mpy rename : objects/Ide.mpy => python/m5/objects/Ide.mpy rename : objects/IntrControl.mpy => python/m5/objects/IntrControl.mpy rename : objects/MemTest.mpy => python/m5/objects/MemTest.mpy rename : objects/Pci.mpy => python/m5/objects/Pci.mpy rename : objects/PhysicalMemory.mpy => python/m5/objects/PhysicalMemory.mpy rename : objects/Platform.mpy => python/m5/objects/Platform.mpy rename : objects/Process.mpy => python/m5/objects/Process.mpy rename : objects/Repl.mpy => python/m5/objects/Repl.mpy rename : objects/Root.mpy => python/m5/objects/Root.mpy rename : objects/SimConsole.mpy => python/m5/objects/SimConsole.mpy rename : objects/SimpleDisk.mpy => python/m5/objects/SimpleDisk.mpy rename : objects/Tsunami.mpy => python/m5/objects/Tsunami.mpy rename : objects/Uart.mpy => python/m5/objects/Uart.mpy extra : convert_revision : aebf6ccda33028b1125974ca8b6aeab6f7570f30