Commit graph

8 commits

Author SHA1 Message Date
Steve Reinhardt c4793184bd Build options are set via a build_options file in the
build directory instead of being inferred from the name
of the build directory.
Options are passed to C++ via config/*.hh files instead of
via the command line.  Build option flags are now always
defined to 0 or 1, so checks must use '#if' rather than
'#ifdef'.

SConscript:
    MySQL detection moved to SConstruct.
    Add config/*.hh files (via ConfigFile builder).
arch/alpha/alpha_memory.cc:
arch/alpha/ev5.cc:
arch/alpha/ev5.hh:
arch/alpha/isa_traits.hh:
base/fast_alloc.hh:
base/statistics.cc:
base/statistics.hh:
base/stats/events.cc:
base/stats/events.hh:
cpu/base.cc:
cpu/base.hh:
cpu/base_dyn_inst.cc:
cpu/base_dyn_inst.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/o3/alpha_cpu.hh:
cpu/o3/alpha_cpu_builder.cc:
cpu/o3/alpha_cpu_impl.hh:
cpu/o3/alpha_dyn_inst.hh:
cpu/o3/alpha_dyn_inst_impl.hh:
cpu/o3/alpha_params.hh:
cpu/o3/commit_impl.hh:
cpu/o3/cpu.cc:
cpu/o3/cpu.hh:
cpu/o3/fetch_impl.hh:
cpu/o3/iew.hh:
cpu/o3/iew_impl.hh:
cpu/o3/regfile.hh:
cpu/o3/rename_impl.hh:
cpu/o3/rob_impl.hh:
cpu/ozone/cpu.hh:
cpu/pc_event.cc:
cpu/simple/cpu.cc:
cpu/simple/cpu.hh:
sim/process.cc:
sim/process.hh:
    Convert compile flags from def/undef to 0/1.
    Set via #include config/*.hh instead of command line.
arch/alpha/isa_desc:
    Convert compile flags from def/undef to 0/1.
    Set via #include config/*.hh instead of command line.
    Revamp fenv.h support... most of the ugliness is hidden
    in base/fenv.hh now.
base/mysql.hh:
    Fix typo in #ifndef guard.
build/SConstruct:
    Build options are set via a build_options file in the
    build directory instead of being inferred from the name
    of the build directory.
    Options are passed to C++ via config/*.hh files instead of
    via the command line.
python/SConscript:
    Generate m5_build_env directly from scons options
    instead of indirectly via CPPDEFINES.
python/m5/convert.py:
    Allow '0' and '1' for booleans.
    Rewrite toBool to use dict.
base/fenv.hh:
    Revamp <fenv.h> support to make it a compile option
    (so we can test w/o it even if it's present) and to
    make isa_desc cleaner.

--HG--
extra : convert_revision : 8f97dc11185bef5e1865b3269c7341df8525c9ad
2005-08-30 13:18:54 -04:00
Steve Reinhardt d4559c32e4 Add licenses in python dir.
python/m5/__init__.py:
python/m5/convert.py:
python/m5/multidict.py:
python/m5/smartdict.py:
    Add license.

--HG--
extra : convert_revision : 825dcad94e13b18aadc7188053ad1999a0219eae
2005-06-05 01:57:57 -04:00
Nathan Binkert f3544a13f3 Fix the python NetworkBandwidth conversion function
python/m5/convert.py:
    Fix the NetworkBandwidth conversion function

--HG--
extra : convert_revision : 93d9856fe6b59827c116e15835d2ef51292bd6c4
2005-04-06 17:59:31 -04:00
Nathan Binkert 40bab977bc Better handling of latency/frequency parameter types
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-25 22:59:29 -05:00
Nathan Binkert d10412d565 Improve toBool
python/m5/convert.py:
    an empty string should still be false

--HG--
extra : convert_revision : dd9900794d94cd018b57ec81bcbce1d412e2a83e
2005-03-24 12:24:54 -05:00
Nathan Binkert 153130e558 First step in fixing up parameter handling. Clean up the
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-23 13:25:48 -05:00
Nathan Binkert 48e0b9ed4d style
python/m5/convert.py:
python/m5/smartdict.py:
    follow our naming convention

--HG--
extra : convert_revision : d57a103dfbad1fb6a076bfacdca226c4b1893fb8
2005-03-22 14:51:31 -05:00
Nathan Binkert c393a51f4a move the conversion stuff that was in configs/kernel/Config.py into
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-11 18:47:11 -05:00