python/m5/config.py:
Clock should not be a NumericParamValue since math on it can be
ambiguous. (As the comment clearly says.)
--HG--
extra : convert_revision : 74f8ec846c6a980d92e0bf4bf1c7fac73a75b923
python/m5/config.py:
Make Clock a NumericParamValue so you can do math with it
--HG--
extra : convert_revision : 7fa548d1a23c604a31d3ecae3853949b064a1830
losing type information.
python/m5/config.py:
Allow math on CheckedInt-derived ParamValue classes w/o
losing type information.
- Make CheckedInt derive from NumericParamValue, and *not*
multiply inherit from long
- Move CheckedInt bounds check to _check() hook so we can
call it when value is updated (not just in constructor)
python/m5/convert.py:
- make toInteger() return a long, making toLong() unnecessary
- toMemorySize should return long rather than float
--HG--
extra : convert_revision : c1cf5e15b9ff35d9b573dd545e076fe68afef989
python/m5/config.py:
NextEthernetAddr shouldnt' be a Singleton since we want __init__ to be
called more than once.
Make the EthernetAddr class a "proxy" so that unproxy will
be called and NextEthernetAddr will generally work correctly.
--HG--
extra : convert_revision : c89bf268e805e202ae71030fcea4833867c7e477
Fixed printing so the tokenizer in m5 doesn't get confused
Expanded NullSimObject so it could be used as an element in a VectorParam
--HG--
extra : convert_revision : 661b1916967d663ab7aee891f15f7ca190deeba6
python/m5/config.py:
Bug fix: code was silently converting between
incompatible SimObject types as an unintended
side-effect of the object cloning support.
--HG--
extra : convert_revision : 236f4fe5370f2eddf8af8fab68e2b83dccc34305
python/m5/config.py:
Make NetworkBandwidth and MemoryBandwidth work
python/m5/objects/Ethernet.py:
Make 1Gbps default for ethernet
--HG--
extra : convert_revision : 59e62f7e62624356ae8d7304598617f60667f040
Fix description for Bus clock_ratio (no longer a ratio).
Add Clock param type (generic Frequency or Latency).
cpu/base_cpu.cc:
cpu/base_cpu.hh:
cpu/beta_cpu/alpha_full_cpu_builder.cc:
cpu/simple_cpu/simple_cpu.cc:
dev/ide_ctrl.cc:
dev/ns_gige.cc:
dev/ns_gige.hh:
dev/pciconfigall.cc:
dev/sinic.cc:
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/uart.cc:
python/m5/objects/BaseCPU.py:
python/m5/objects/BaseCache.py:
python/m5/objects/BaseSystem.py:
python/m5/objects/Bus.py:
python/m5/objects/Ethernet.py:
python/m5/objects/Root.py:
sim/universe.cc:
Standardize clock parameter names to 'clock'.
Fix description for Bus clock_ratio (no longer a ratio).
python/m5/config.py:
Minor tweaks on Frequency/Latency:
- added new Clock param type to avoid ambiguities
- factored out init code into getLatency()
- made RootFrequency *not* a subclass of Frequency so it
can't be directly assigned to a Frequency paremeter
--HG--
extra : convert_revision : fc4bb8562df171b454bbf696314cda57e1ec8506
configs/splash2/run.py:
Update file for new config changes.
python/m5/config.py:
- isParamContext() not defined any more
- fix bug with re-assigning vectors over scalars
and vice versa
--HG--
rename : configs/splash2/run.mpy => configs/splash2/run.py
extra : convert_revision : 2eb28a92f8de327f6dfddd01467c61e759275f6b
Special mpy importer is gone; everything is just plain
Python now (funky, but straight-up).
May not completely work yet... generates identical ini
files for many configs/kernel settings, but I have yet
to run it against regressions. This commit is for my
own convenience and won't be pushed until more testing
is done.
python/m5/__init__.py:
Get rid of mpy_importer and param_types.
python/m5/config.py:
Major cleanup. We now have separate classes and
instances for SimObjects. Proxy handling and param
conversion significantly reorganized. No explicit
instantiation step anymore; we can dump an ini file
straight from the original tree.
Still needs more/better/truer comments.
test/genini.py:
Replace LoadMpyFile() with built-in execfile().
Export __main__.m5_build_env.
python/m5/objects/AlphaConsole.py:
python/m5/objects/AlphaFullCPU.py:
python/m5/objects/AlphaTLB.py:
python/m5/objects/BadDevice.py:
python/m5/objects/BaseCPU.py:
python/m5/objects/BaseCache.py:
python/m5/objects/BaseSystem.py:
python/m5/objects/Bus.py:
python/m5/objects/CoherenceProtocol.py:
python/m5/objects/Device.py:
python/m5/objects/DiskImage.py:
python/m5/objects/Ethernet.py:
python/m5/objects/Ide.py:
python/m5/objects/IntrControl.py:
python/m5/objects/MemTest.py:
python/m5/objects/Pci.py:
python/m5/objects/PhysicalMemory.py:
python/m5/objects/Platform.py:
python/m5/objects/Process.py:
python/m5/objects/Repl.py:
python/m5/objects/Root.py:
python/m5/objects/SimConsole.py:
python/m5/objects/SimpleDisk.py:
python/m5/objects/Tsunami.py:
python/m5/objects/Uart.py:
Fixes for eliminating mpy_importer, and modified
handling of frequency/latency params.
Also renamed parent to Parent.
--HG--
rename : python/m5/objects/AlphaConsole.mpy => python/m5/objects/AlphaConsole.py
rename : python/m5/objects/AlphaFullCPU.mpy => python/m5/objects/AlphaFullCPU.py
rename : python/m5/objects/AlphaTLB.mpy => python/m5/objects/AlphaTLB.py
rename : python/m5/objects/BadDevice.mpy => python/m5/objects/BadDevice.py
rename : python/m5/objects/BaseCPU.mpy => python/m5/objects/BaseCPU.py
rename : python/m5/objects/BaseCache.mpy => python/m5/objects/BaseCache.py
rename : python/m5/objects/BaseSystem.mpy => python/m5/objects/BaseSystem.py
rename : python/m5/objects/Bus.mpy => python/m5/objects/Bus.py
rename : python/m5/objects/CoherenceProtocol.mpy => python/m5/objects/CoherenceProtocol.py
rename : python/m5/objects/Device.mpy => python/m5/objects/Device.py
rename : python/m5/objects/DiskImage.mpy => python/m5/objects/DiskImage.py
rename : python/m5/objects/Ethernet.mpy => python/m5/objects/Ethernet.py
rename : python/m5/objects/Ide.mpy => python/m5/objects/Ide.py
rename : python/m5/objects/IntrControl.mpy => python/m5/objects/IntrControl.py
rename : python/m5/objects/MemTest.mpy => python/m5/objects/MemTest.py
rename : python/m5/objects/Pci.mpy => python/m5/objects/Pci.py
rename : python/m5/objects/PhysicalMemory.mpy => python/m5/objects/PhysicalMemory.py
rename : python/m5/objects/Platform.mpy => python/m5/objects/Platform.py
rename : python/m5/objects/Process.mpy => python/m5/objects/Process.py
rename : python/m5/objects/Repl.mpy => python/m5/objects/Repl.py
rename : python/m5/objects/Root.mpy => python/m5/objects/Root.py
rename : python/m5/objects/SimConsole.mpy => python/m5/objects/SimConsole.py
rename : python/m5/objects/SimpleDisk.mpy => python/m5/objects/SimpleDisk.py
rename : python/m5/objects/Tsunami.mpy => python/m5/objects/Tsunami.py
rename : python/m5/objects/Uart.mpy => python/m5/objects/Uart.py
extra : convert_revision : 9dc55103a6f5b40eada4ed181a71a96fae6b0b76
(plus some small fixes).
python/m5/config.py:
Hacks to allow multiplication on Frequency/Latency-valued proxies.
Provide __rmul__ as well as __mul__ on Proxy objects.
test/genini.py:
Default value for -EFOO should be True not 1 (since 1 is no longer
convertable to Bool).
--HG--
extra : convert_revision : f8a221fcd9e095fdd7b7db4be0ed0cdcd20074be
CPU cycle ticks. This allows the user to have CPUs of different
frequencies, and also allows frequencies and latencies that are
not evenly divisible by the CPU frequency. For now, the CPU
frequency is still set to the global frequency, but soon, we'll
hopefully make the global frequency fixed at something like 1THz
and set all other frequencies independently.
arch/alpha/ev5.cc:
The cycles counter is based on the current cpu cycle.
cpu/base_cpu.cc:
frequency isn't the cpu parameter anymore, cycleTime is.
cpu/base_cpu.hh:
frequency isn't the cpu parameter anymore, cycleTime is.
create several public functions for getting the cpu frequency
and the numbers of ticks for a given number of cycles, etc.
cpu/memtest/memtest.cc:
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
cpu/trace/trace_cpu.cc:
Now that ticks aren't cpu cycles, fixup code to advance
by the proper number of ticks.
cpu/memtest/memtest.hh:
cpu/trace/trace_cpu.hh:
Provide a function to get the number of ticks for a given
number of cycles.
dev/alpha_console.cc:
Update for changes in the way that frequencies and latencies are
accessed. Move some stuff to init()
dev/alpha_console.hh:
Need a pointer to the system and the cpu to get the frequency
so we can pass the info to the console code.
dev/etherbus.cc:
dev/etherbus.hh:
dev/etherlink.cc:
dev/etherlink.hh:
dev/ethertap.cc:
dev/ide_disk.hh:
dev/ns_gige.cc:
dev/ns_gige.hh:
update for changes in the way bandwidths are passed from
python to C++ to accomidate the new way that ticks works.
dev/ide_disk.cc:
update for changes in the way bandwidths are passed from
python to C++ to accomidate the new way that ticks works.
Add some extra debugging printfs
dev/platform.cc:
dev/sinic.cc:
dev/sinic.hh:
outline the constructor and destructor
dev/platform.hh:
outline the constructor and destructor.
don't keep track of the interrupt frequency. Only provide the
accessor function.
dev/tsunami.cc:
dev/tsunami.hh:
outline the constructor and destructor
Don't set the interrupt frequency here. Get it from the actual device
that does the interrupting.
dev/tsunami_io.cc:
dev/tsunami_io.hh:
Make the interrupt interval a configuration parameter. (And convert
the interval to the new latency/frequency stuff in the python)
kern/linux/linux_system.cc:
update for changes in the way bandwidths are passed from
python to C++ to accomidate the new way that ticks works.
For now, we must get the boot cpu's frequency as a parameter
since allowing the system to have a pointer to the boot cpu would
cause a cycle.
kern/tru64/tru64_system.cc:
For now, we must get the boot cpu's frequency as a parameter
since allowing the system to have a pointer to the boot cpu would
cause a cycle.
python/m5/config.py:
Fix support for cycle_time relative latencies and frequencies.
Add support for getting a NetworkBandwidth or a MemoryBandwidth.
python/m5/objects/BaseCPU.mpy:
All CPUs now have a cycle_time. The default is the global frequency,
but it is now possible to set the global frequency to some large value
(like 1THz) and set each CPU frequency independently.
python/m5/objects/BaseCache.mpy:
python/m5/objects/Ide.mpy:
Make this a Latency parameter
python/m5/objects/BaseSystem.mpy:
We need to pass the boot CPU's frequency to the system
python/m5/objects/Ethernet.mpy:
Update parameter types to use latency and bandwidth types
python/m5/objects/Platform.mpy:
this frequency isn't needed. We get it from the clock interrupt.
python/m5/objects/Tsunami.mpy:
The clock generator should hold the frequency
sim/eventq.hh:
Need to remove this assertion because the writeback event
queue is different from the CPU's event queue which can cause
this assertion to fail.
sim/process.cc:
Fix comment.
sim/system.hh:
Struct member to hold the boot CPU's frequency.
sim/universe.cc:
remove unneeded variable.
--HG--
extra : convert_revision : 51efe4041095234bf458d9b3b0d417f4cae16fdc
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
python/m5/config.py:
Don't raise a new exception, just modify and re-raise the old one.
--HG--
extra : convert_revision : 47f6da3a8cb2ee18a6b400863e7ea80ab0c9a5ea
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
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
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
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
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
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
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
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
.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
python/m5/config.py:
Add 'panic' to __all__ (some of Nate's scripts use it).
--HG--
extra : convert_revision : ae3e2398dffe3edd17ee0155f38bc757d3552df2
python/m5/config.py:
Add issequence to __all__ export list.
Added some more comments too.
--HG--
extra : convert_revision : 17cd9205e43fe276f71563fcb96ec3c5069fcc86
- 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
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
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