summaryrefslogtreecommitdiff
path: root/python/m5
AgeCommit message (Collapse)Author
2005-04-06fix typo in python config stuffNathan Binkert
python/m5/config.py: fix typo --HG-- extra : convert_revision : 2208453d93149ba4af140dd78c29be4c4943b397
2005-04-06Fix the python NetworkBandwidth conversion functionNathan Binkert
python/m5/convert.py: Fix the NetworkBandwidth conversion function --HG-- extra : convert_revision : 93d9856fe6b59827c116e15835d2ef51292bd6c4
2005-04-06formattingNathan Binkert
--HG-- extra : convert_revision : 0b041556222c3892ee72e4d56c8acdda72bfc303
2005-04-06Add TcpPort and UdpPort as python typesNathan Binkert
python/m5/objects/SimConsole.mpy: the listener port is a TcpPort --HG-- extra : convert_revision : c26fdd93d3bc35d9f1563ac1087a7f75471c9020
2005-04-06full_system isn't a useful parameter anymore, get rid of it.Nathan Binkert
python/m5/objects/Root.mpy: sim/universe.cc: util/stats/stats.py: full_system isn't a useful parameter --HG-- extra : convert_revision : 557091be1faa3cf121c55102aba4e6f4c1bd45ef
2005-04-04Add more prefetcher support.Ron Dreslinski
SConscript: Add GHB prefetcher to build list python/m5/objects/BaseCache.mpy: Add parameters about when to remove prefetches and wether or not to use cpuid to differentiate access patterns --HG-- extra : convert_revision : 1d3fef21910f2f34b8c28d01b5f6e86eef53357c
2005-04-02Added support for multiple prefetch address from single access (depth of ↵Ron Dreslinski
prefetch) also added the ability to squash some prefetchs to match the GHB technique python/m5/objects/BaseCache.mpy: Added parameters --HG-- extra : convert_revision : 92b646eb61455d283a5c2ac0b3f8fbd62e39fb87
2005-04-01Some hand mergesRon Dreslinski
--HG-- rename : objects/BaseCache.mpy => python/m5/objects/BaseCache.mpy extra : convert_revision : b24ff4c1feb480cf280207d4bbdfe08ef80d1aa2
2005-03-25Better handling of latency/frequency parameter typesNathan Binkert
python/m5/config.py: Addr is slightly different from memory size in that Addr will take non strings. Deal with the fact that the convert.toFoo functions only accept strings. Add RootFrequency as a special type for the Root.frequency parameter which is not scaled. Add ClockPeriod parameter type. python/m5/convert.py: Be more strict about what's allowed. Only accept strings as inputs for these conversion functions. If the user wants to accept something else, they need to deal with the failure and convert other types on their own. python/m5/objects/Bus.mpy: Use the new ClockPeriod parameter type python/m5/objects/Root.mpy: Can't use integers for frequency anymore python/m5/smartdict.py: rename SmartDict.Proxy to just Variable. Create a new class UndefinedVariable that is returned when the user tries to get a variable that is not in the dict. Undefined variable evaluates to false, and will cause an error elsewhere. --HG-- extra : convert_revision : 1d55246fd1af65106f102396234827d6401ef9ce
2005-03-25Better exceptions in python configNathan Binkert
python/m5/config.py: Don't raise a new exception, just modify and re-raise the old one. --HG-- extra : convert_revision : 47f6da3a8cb2ee18a6b400863e7ea80ab0c9a5ea
2005-03-24Improve toBoolNathan Binkert
python/m5/convert.py: an empty string should still be false --HG-- extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e
2005-03-24Add Frequency and Latency as new parameter types and use themNathan Binkert
where we can python/m5/config.py: Add two new parameter types: Frequency and Latency. These will soon be an integral part of the tick is picosecond thing. If the value can be converted directly to an integer without any special tricks, we assume that the number is the exact value desired. Otherwise, we convert the number assuming that it is in Hz or s. python/m5/objects/Bus.mpy: Use the new Latency and Frequency types where we can --HG-- extra : convert_revision : b3cff6020db83fb819507c348451c98697d1cf27
2005-03-23Formatting fixesNathan Binkert
--HG-- extra : convert_revision : 9a726945b7a1decbecf460df6714257b88742dc8
2005-03-23First step in fixing up parameter handling. Clean up theNathan Binkert
way ranges work, more fully support metric prefixes for all integer types, and convert memory sized parameters to the MemorySize type. python/m5/config.py: - no more _Param and _ParamProxy stuff. Use the names ParamBase and ParamFactory to hopefully make it clearer what we intend. - Get rid of RangeSize and the old Range class and more fully flesh out the Range class to deal with types of parameters and different kinds of ranges. - Call toInteger on the CheckedInt types so we can use metric prefixes in strings for all integers. - Get rid of the K, M, and G constants. Use the proper type or call one of the functions in the convert package. python/m5/convert.py: Simple way to deal with both floating point and integer strings. python/m5/objects/BaseCache.mpy: python/m5/objects/Ethernet.mpy: This is a MemorySize typed parameter --HG-- extra : convert_revision : 92b4ea662d723abdd6c0a49065b79c25400fac9b
2005-03-22styleNathan Binkert
python/m5/convert.py: python/m5/smartdict.py: follow our naming convention --HG-- extra : convert_revision : d57a103dfbad1fb6a076bfacdca226c4b1893fb8
2005-03-22Fix a bug introduced with the multidict commit.Nathan Binkert
python/m5/config.py: search for any base class that is a confignode instead of those that derive from param type so that non-type classes work too. (Those that are just derived from ConfigNode and not SimObject.) --HG-- extra : convert_revision : 422181b2e5efd4675ec34adcffecfb58eee0e4e7
2005-03-22clean up python exceptionsNathan Binkert
python/m5/config.py: clean up exception output a bit. --HG-- extra : convert_revision : a27e75276ffc9001f44c44595172cf2b455e5e23
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