Commit graph

158 commits

Author SHA1 Message Date
Nathan Binkert 6172f79d9e add some comments.
sim/pyconfig/m5config.py:
    Add some comments to indicate what the decorators mean.

--HG--
extra : convert_revision : fbcbcbe4ad8cd62f2bd12af6b1f141c66752b870
2005-03-01 11:07:44 -05:00
Ali Saidi 107233adf1 Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG--
extra : convert_revision : a63405fac7237014c4ef8b765d31d59d3e1bb500
2005-02-24 15:59:29 -05:00
Nathan Binkert b78b634107 Fix the python panic message
sim/pyconfig/m5config.py:
    Fix panic

--HG--
extra : convert_revision : 56d93398e992ed6e95380f6dcdb61cbee54b3893
2005-02-23 12:26:35 -05:00
Ali Saidi 27a338fe2b Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG--
extra : convert_revision : f149b8ea762d4a83ef76b3bb95f28e0709391ecf
2005-02-23 11:47:49 -05:00
Ali Saidi 9ebeb9b2de Added mmap start and end so detailed CPU can know if an access is
in a mmaped region

--HG--
extra : convert_revision : e4ee0520c84d94a0d2e804d02035228766abe71f
2005-02-23 11:45:25 -05:00
Steve Reinhardt af33e74638 Small initial steps toward generating C++ param structs
from Python object descriptions.  Mostly cleanup of Python
code based on things I encountered trying to figure out
what's going on.  Main reason I'm committing this now is
to transfer work from my laptop to zizzer.

sim/pyconfig/m5config.py:
    Small steps toward param struct generation: all param
    objects should now have a _cppname attribute that holds
    their corresponding C++ type name.

    Made Param ptype attribute an actual type instead of a
    string.  String is still stored in ptype_string.

    Get rid of AddToPath() and Import() (redundant copies
    are in importer, and that seems to be the more logical
    place for them).

    Add a few comments, delete some unused code.
test/genini.py:
    A few fixes to make the environment more compatible
    with what really happens when configs are executed
    from the m5 binary.

--HG--
extra : convert_revision : 9fc8f72cd0c22ba3deada02f37484787342534f2
2005-02-22 23:53:34 -05:00
Nathan Binkert 9b1e2db811 Clean up CPU stuff and make it use params structs
cpu/base_cpu.cc:
cpu/base_cpu.hh:
    Convert the CPU stuff to use a params struct
cpu/memtest/memtest.cc:
    The memory tester is really not a cpu, so don't derive from
    BaseCPU since it just makes things a pain in the butt.  Keep
    track of max loads in the memtest class now that the base class
    doesn't do it for us.
    Don't have any default parameters.
cpu/memtest/memtest.hh:
    The memory tester is really not a cpu, so don't derive from
    BaseCPU since it just makes things a pain in the butt.  Keep
    track of max loads in the memtest class now that the base class
    doesn't do it for us.
cpu/simple_cpu/simple_cpu.cc:
    Convert to use a params struct.
    remove default parameters
cpu/simple_cpu/simple_cpu.hh:
    convert to use a params struct
cpu/trace/opt_cpu.cc:
cpu/trace/opt_cpu.hh:
cpu/trace/trace_cpu.cc:
cpu/trace/trace_cpu.hh:
    this isn't really a cpu.  don't derive from BaseCPU
objects/MemTest.mpy:
    we only need one max_loads parameter
sim/main.cc:
    Don't check for the number of CPUs since we may be doing something
    else going on.  If we don't have anything to simulate, the
    simulator will exit anyway.

--HG--
extra : convert_revision : 2195a34a9ec90b5414324054ceb3bab643540dd5
2005-02-19 11:46:41 -05:00
Kevin Lim f4d3f781f1 Include errno.h to fix compile errors in gcc 3.4
sim/main.cc:
    Include errno.h

--HG--
extra : convert_revision : ff91579ae590b3c1d11f7468b71f295e6f3edd68
2005-02-17 19:22:42 -05:00
Nathan Binkert cfe6ed7c48 Fix compile on linux
sim/main.cc:
    For some unknown reason linux's basename doesn't take a const char *

--HG--
extra : convert_revision : 30289195881e16a05429f7025abab7914a9e3eb6
2005-02-17 03:40:17 -05:00
Nathan Binkert 5de3bba758 Make code more portable.
sim/main.cc:
    basename is in libgen

--HG--
extra : convert_revision : 1af6ff2f492b4deee9e56edfa5ee6ea235cd4eb0
2005-02-17 02:50:34 -05:00
Nathan Binkert a24016c731 Several tweaks to make binning work in any simulation
configuration so that we can always have binning on.

base/statistics.cc:
    If we're binning, and there is no bin active at the time
    we check all stats stuff, create a bin.
base/statistics.hh:
    FS_MEASURE doesn't exist anymore
base/stats/text.cc:
    don't print out bin names if there is only one bin
sim/process.cc:
    don't zero stats.  It happens automatically.
    Don't activate the context at the time it is registered,
    instead activate the first context in a startup callback.
sim/process.hh:
    Add startup callback to initialize the first exec context

--HG--
extra : convert_revision : bcb23cdb184b0abf7cecd79902f8a59b50f71fe4
2005-02-17 02:48:56 -05:00
Nathan Binkert 10ee909fbd Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/merge

--HG--
extra : convert_revision : 5d73046310a64b80a6ba3832df3b30b55532d707
2005-02-11 09:48:23 -05:00
Nathan Binkert 06a4686af9 Rework the command line paramters for python output and how
output files and the output directory are are handled.  Make
the output directory configuration via a command line parameter,
or an environment variable.

SConscript:
    Add new output file stuff
base/misc.cc:
dev/simconsole.cc:
    use new output file code
cpu/base_cpu.cc:
    use new output file code to generate output streams
dev/etherdump.cc:
    use the output file code to find the output directory
    use a real stream instead of a pointer
dev/etherdump.hh:
    use a real stream instead of a pointer
objects/Root.mpy:
    output_dir and config_output_file are not longer configured here.
sim/main.cc:
    - Completely rework the command line argument passing to deal with
    changes in python and output files.
    - Update help output to reflect changes.
    - Remove all direct support for .ini files.  They are strictly
    for intermediate representation.
    - Remove the --foo:bar=blah syntax for .ini files and add --foo.bar=blah
    syntax for python.  This will generate: foo.bar = 'blah' in the python
    script.
    - Add '-d' to set the output directory.
    - Use new output file code to access the output stream.
sim/serialize.cc:
    use the new code to find the output directory
sim/universe.cc:
    Get rid of makeOutputStream.  Use the new output file code.
    Remove output_dir and config_output_file as parameters.

--HG--
extra : convert_revision : df2f0e13d401c3a60cae1239aa1ec3511721544d
2005-02-11 09:47:41 -05:00
Nathan Binkert 60b263466e Make sure we have all values when trying to generate the ini file
sim/pyconfig/m5config.py:
    When getting all values, make sure we get the ones that are
    parameter defaults as well.

--HG--
extra : convert_revision : 2b1c4b2f27dfab17ef9df18d7e5936e4a00bb12e
2005-02-11 01:40:49 -05:00
Nathan Binkert 8efd7d9063 More fixes to the pbs stuff to make it more robust.
sim/pyconfig/SConscript:
    Embed the jobfile.py script into the binary so that we don't
    need to copy it into the Base directory every time.
test/genini.py:
    Add the util/pbs directory to the path so we can get to
    jobfile.py
    Add a -I argument to set to add to the path.
util/pbs/pbs.py:
    Create a MyPOpen class.  This is a lot like the popen2.Popen3 class
    in the python library except that my version allows redirection of
    standard in and standard out to a file instead of a pipe.
    Use this popen class to execute qsub or ssh qsub.  This was important
    for the ssh version of qsub because we need to pipe the script into
    standard in of ssh so that the script can get to the qsub command.
    (Otherwise we have a problem discovering the path.)
util/pbs/send.py:
    Tweak the script so it figures out paths in NFS correctly.
    Use the new system for running qsub.

--HG--
extra : convert_revision : 1289915ba99cec6fd464b71215c32d2197ff2824
2005-02-09 23:55:21 -05:00
Nathan Binkert b46baf107f enable the Trace, Statistics, and Serialize param contexts.
objects/Root.mpy:
    Fake the param context stuff for now.
sim/param.cc:
    Make empty vector enums work
sim/serialize.cc:
    serialize_dir is always valid

--HG--
extra : convert_revision : c46373f0f4c70e6a2f01a81c0fa6bacab72d4c4f
2005-02-09 17:33:28 -05:00
Nathan Binkert 89ba024b98 Fix the panic message so that it looks more like M5's panic.
Make it so the same path is not added to the system path twice.

--HG--
extra : convert_revision : fe18db38cc4e335ad3525a364e9f8faf62b60e52
2005-02-09 13:41:53 -05:00
Nathan Binkert 6eaa4d3571 fix indent (so emacs and vi aren't screwed up.)
--HG--
extra : convert_revision : 589f37476fec14aa5e3c6e018631e291113d4e69
2005-02-09 13:40:02 -05:00
Nathan Binkert 52403a5ddf get rid of defined and just access the env dict directly
get rid of the alias for true to True and false to False to keep
consistent python syntax.

util/stats/info.py:
    Fix typo

--HG--
extra : convert_revision : e69588a8de52424e043315e70008ca3a3ede7d5b
2005-02-03 17:04:54 -05:00
Nathan Binkert 936ad58402 small python config related fixes.
dev/simconsole.cc:
sim/universe.cc:
    isValid isn't compatible with new python stuff, so whack it.

--HG--
extra : convert_revision : 0c50038769a558650479c51122a8be5d92e7d9c4
2005-02-03 14:33:02 -05:00
Nathan Binkert a736a8fab6 Update config file language to take simobj and no longer use siminst
objects/AlphaConsole.mpy:
objects/AlphaTLB.mpy:
objects/BadDevice.mpy:
objects/BaseCPU.mpy:
objects/BaseCache.mpy:
objects/BaseSystem.mpy:
objects/Bus.mpy:
objects/CoherenceProtocol.mpy:
objects/Device.mpy:
objects/DiskImage.mpy:
objects/Ethernet.mpy:
objects/Ide.mpy:
objects/IntrControl.mpy:
objects/MemTest.mpy:
objects/Pci.mpy:
objects/PhysicalMemory.mpy:
objects/Platform.mpy:
objects/Process.mpy:
objects/Repl.mpy:
objects/Root.mpy:
objects/SimConsole.mpy:
objects/SimpleDisk.mpy:
objects/Tsunami.mpy:
objects/Uart.mpy:
    simobj now requires a type= line if it is actually intended
    to be a type
sim/pyconfig/SConscript:
    keep track of the filename of embedded files for better
    error messages.
sim/pyconfig/m5config.py:
    Add support for the trickery done with the compiler to get the
    simobj language feature added to the importer.

    fix the bug that gave objects the wrong name in error messages.
test/genini.py:
    Globals have been fixed and use execfile

--HG--
extra : convert_revision : b74495fd6f3479a87ecea7f1234ebb6731279b2b
2005-02-02 21:13:01 -05:00
Ali Saidi 2aae3636ee Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG--
extra : convert_revision : ed089f6062639ae5be930fbaea3dd7f7622653cc
2005-01-27 16:01:32 -05:00
Ali Saidi 7ec713edc8 added support for outputing Dot if pydot is installed
--HG--
extra : convert_revision : bdb1032cddb2478e999399647f893d320260ef7e
2005-01-27 16:01:25 -05:00
Kevin Lim e6b99b0768 Merge zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5-patched/m5-new

--HG--
extra : convert_revision : e802c800a478c297d3aa780a9ea3c6701453d91d
2005-01-21 18:31:30 -05:00
Nathan Binkert 6cbce7631a Add a couple statistics contexts.
arch/alpha/pseudo_inst.cc:
    rename the context for consistency.
sim/pyconfig/m5config.py:
    Add a ParamContext class so that param contexts work with
    the new config stuff.

--HG--
extra : convert_revision : 3a6b583a25c86237baca7a2b4eccc9d12f86a384
2005-01-21 04:34:01 -05:00
Kevin Lim 554dc7831f Merge zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5-patched/m5-new

--HG--
extra : convert_revision : c51d9a7361d8e3c23e9494640c66df8505322b00
2005-01-18 15:46:00 -05:00
Nathan Binkert d728d44b55 More configuration fixes
sim/pyconfig/m5config.py:
    put panic, AddToPath, and Import here so they're always available.

--HG--
extra : convert_revision : 104dba5ccac0d64479b4109d477b5192c4b07a6e
2005-01-18 15:28:34 -05:00
Kevin Lim aed3e6780a Merge changes to make m5 g++ 3.4 compatible.
sim/param.cc:
    Merge changes.

--HG--
extra : convert_revision : b5044e1f7c48ae2d74d5233dd4fabfb7a801d7c8
2005-01-18 13:02:47 -05:00
Nathan Binkert 82df189bad Config cleanups
sim/pyconfig/m5config.py:
    Remove unused code
    remove the defined() function that was masking the one
    that I really wanted
test/genini.py:
    Add the directory that a script was executed from to the
    path

--HG--
extra : convert_revision : a1861065b2de46d77c94691d0c5a7865cdce0f09
2005-01-17 23:41:35 -05:00
Nathan Binkert 32d3b0aa36 get the exit condition for the python code right
sim/main.cc:
    get the exit condition right

--HG--
extra : convert_revision : 0dada3d68492c46981c51d3de0de409b282bb13b
2005-01-17 01:30:39 -05:00
Nathan Binkert a5df4b5c32 Add the pentium 4 configuration. Add some command line options
to M5 to support the python configuration stuff.

sim/main.cc:
    Make the -I option update the include path for phython as
    well as cpp
    Make the -P option pass a raw python string to the interpreter
    Make the -E option add strings to the environment
    Break up the various steps of python processing to accomidate
    multiple files and the various new options
test/genini.py:
    Make this executable

--HG--
extra : convert_revision : 6acc50d2e4367c5ceaee013db987c8a1db924df3
2005-01-17 00:52:51 -05:00
Nathan Binkert 3ece6ab029 New and improved configuration mechanism. No more writing of
wierd ini files.  The ini files are still used as an intermediate step,
but a sophisticated python library exists to help build them more
easily.

SConscript:
    add the new embedded file stuff
    remove all of the old object description junk
base/inifile.cc:
base/inifile.hh:
    get rid of findDefault and findAppend since they were the source
    of much evil.
base/trace.cc:
    For now, if we don't have the dprintf_stream set up, dump
    to standard out.  We probably want a command line option
    for this.
dev/alpha_console.cc:
    PioDevice now takes a platform parameter.
    All PioDevices must have a pio_latency parameter.  We stick
    a dummy parameter in here for now until we get rid of the
    builder stuff.
dev/alpha_console.hh:
    don't need Platform anymore
dev/baddev.cc:
    PioDevice now takes a platform parameter.
    All PioDevices must have a pio_latency parameter.  We stick
    a dummy parameter in here for now until we get rid of the
    builder stuff. Same for the platform parameter, though we just
    pass the PioDevice a null parameter since it isn't used by
    this device and it's quicker.
dev/baddev.hh:
    fix #include guards
dev/etherlink.cc:
    rename parameters.
dev/ethertap.cc:
    rename parameters
dev/ide_ctrl.cc:
    All devices need an address even if it will get overwritten later.
dev/ide_disk.cc:
    use an enum for the drive ID stuff.
    rename disk_delay -> delay
    Actually, I think that we should implement "cable select" and
    have the controller tell the drive what it is.
dev/io_device.cc:
dev/io_device.hh:
    All IO devices take a Platform *
dev/ns_gige.cc:
    all devices need an io_bus.  rename header_bus to io_bus
    We don't need stuff for the interrupt controller since
    it's all in the platform now.
dev/ns_gige.hh:
    We don't need stuff for the interrupt controller now since
    it's all in the platform.
dev/pciconfigall.cc:
    Pass a dummy NULL to the PioDevice for the platform since
    we don't need one.
dev/pcidev.cc:
    Move a bunch of common functionality into the PciDev
dev/platform.hh:
    remove unneeded code
dev/tsunami.cc:
    remove unused param
dev/tsunami_cchip.cc:
    pass platform pointer
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/uart.cc:
    pass platform variable
dev/uart.hh:
    don't need to keep a platform pointer.  it's in the base class
kern/linux/linux_system.cc:
kern/tru64/tru64_system.cc:
    rename some parameters
sim/builder.cc:
    clean up builder code. use more parameters from the
    config node.  all sections with a type= are now created,
    the old mechanisms no longer work
sim/builder.hh:
    remove some extra variables since they are found in the ConfigNode
sim/main.cc:
    add a quick hack command line argument -X to dump out the
    embedded files.  (probably should be fixed up a little.)
    accept .mpy files
    printing to the streams has to happen after the hierarchy
    is built since we're moving away from param contexts
sim/param.cc:
    add parsing support for ranges
sim/process.cc:
    isValid isn't very useful anymore.  interpret the names
    stdout, stderr, cout, cerr for the file descriptors
sim/pyconfig/SConscript:
    Add Action handlers for creating an embedded python file
    and for creating an embedded C file.

    use these action handlers to embed all objects found in the objects
    tree into the binary along with the importer and the m5config stuff
sim/pyconfig/m5config.py:
    Major changes to the original configuration file generator.  These
    changes largely involve implementing copy-on-write like semantics
    for all of the SimObjects.  Real documentation must be written.
sim/universe.cc:
    Universe becomes a SimObject since we don't really have the notion of
    param contexts in the python code.

--HG--
rename : sim/pyconfig/m5configbase.py => sim/pyconfig/m5config.py
extra : convert_revision : c353453e5beb91c37f15755998fc0d8858c6829a
2005-01-15 04:12:25 -05:00
Kevin Lim f58d85128d Fixes so m5 compiles on gcc 3.4, which has much stricter syntax. Most changes come from templated code,
which is evaluated slightly differently than in previous versions of gcc.

arch/alpha/alpha_linux_process.cc:
    Alphabetize includes.
arch/alpha/vptr.hh:
    Change the constants that are being used for alpha pagebytes to come from the ISA.
base/random.hh:
cpu/static_inst.cc:
sim/param.cc:
    Fix up template syntax.
base/range.hh:
    Include iostream for << operator.
base/res_list.hh:
base/statistics.hh:
cpu/simple_cpu/simple_cpu.hh:
cpu/static_inst.hh:
sim/eventq.hh:
sim/param.hh:
    Fixup for templated code to resolve different scope lookup in gcc 3.4.  This defers the lookup of the
    function/variable until actual instantiation time by making it dependent on the templated class/function.
base/trace.cc:
    Fix call to new.
base/trace.hh:
    Fix up #define to have full path.
cpu/base_cpu.cc:
    Fix up call to new.
dev/etherlink.hh:
dev/ns_gige.hh:
dev/sinic.hh:
    Fixup for friend class/function declaration.  g++ 3.4 no longer allows typedefs to be declared as
    a friend class.
dev/pcidev.hh:
    Fix up re-definition of access level to params.
kern/linux/linux_syscalls.hh:
kern/tru64/tru64_syscalls.hh:
    Fix up header.  Fix up template syntax.
sim/serialize.cc:
    Include errno.h.
sim/startup.cc:
    Change startupq.  queue was getting destructed before all things had called ~StartupCallback(), which lead
    to a segfault.  This puts startupq in global space, and we allocate it ourselves.  Other code may be similar
    to this and may need changing in the future.
sim/syscall_emul.hh:
    Include cpu/exec_context.hh and sim/process.hh, as forward declarations are no longer sufficient.
sim/universe.cc:
    Include errno.h

--HG--
extra : convert_revision : e49d08ee89eb06a28351f02bafc028ca6652d5af
2005-01-14 18:34:56 -05:00
Steve Reinhardt 7bac427874 Minor fixes.
base/loader/ecoff_object.cc:
    Only warn (not die) if we can't load symbols from an ecoff object.
sim/debug.cc:
    Compile in functioning debug_break unless NDEBUG,
    not only if DEBUG.  Print warning if we hit breakpoint
    when compiled with NDEBUG.
sim/debug.hh:
    Compile in functioning debug_break unless NDEBUG,
    not only if DEBUG.

--HG--
extra : convert_revision : baef2caac4a9c88e1389660823eaa7c42b1d19c8
2004-11-18 10:52:56 -05:00
Steve Reinhardt b1816cb837 Minor cleanup of symtab code/includes.
base/loader/symtab.cc:
base/loader/symtab.hh:
    Get rid of old unused calls.
cpu/simple_cpu/simple_cpu.hh:
    No need to include base/loader/symtab.hh
kern/linux/linux_system.cc:
kern/tru64/tru64_system.cc:
    Include base/loader/symtab.hh (since it's no longer included in system.hh)
sim/system.hh:
    Replace include of base/loader/symtab.hh with forward class decl.

--HG--
extra : convert_revision : 3a778c2f409ec94e3b00eaa9b3859943cb39918c
2004-11-15 20:30:51 -05:00
Steve Reinhardt fed64a3b36 Add support for sampled PC profiling to FullCPU.
Simple text list of symbol (or address) and count
will be dumped to m5prof.<cpu-name> if the cpu's
pc_sample_interval param is set.

SConscript:
    Add cpu/full_cpu/pc_sample_profile.cc
base/callback.hh:
    Add a comment about MakeCallback.
    Fix type in another comment.
base/loader/symtab.cc:
    Revamp findNearestSymbol() to provide addresses of both
    nearest symbols (preceding and following) as well as
    string for former.

    Move global definition of debugSymbolTable here too.
base/loader/symtab.hh:
    Revamp findNearestSymbol() to provide addresses of both
    nearest symbols (preceding and following) as well as
    string for former.

    Move global declaration of debugSymbolTable here too.
cpu/exetrace.cc:
    Use new findNearestSymbol() interface for trace symbols.
kern/linux/linux_system.cc:
sim/system.cc:
    Remove extern of debugSymbolTable (now in symtab.hh)
sim/process.cc:
    Initialize debugSymbolTable if binary has a symbol table.

--HG--
extra : convert_revision : 0b5393dc39c40ac88c953684708f1125da550671
2004-11-15 01:56:40 -05:00
Nathan Binkert d82e0d11d1 make activation of exec contexts happen in startup
the registration stuff all moves into BaseCPU

cpu/base_cpu.cc:
    Move the registration stuff into the BaseCPU since all
    other CPUs use it.
cpu/base_cpu.hh:
    Move the defer registration stuff into the BaseCPU since all
    other CPUs use it.
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
    registration stuff moved to base class
sim/system.cc:
    the activation of exec contexts should happen at startup, not
    when they are registered.
sim/system.hh:
    the system now has a startup function

--HG--
extra : convert_revision : bb6a7c2da5a1ecf5fe7ede1078200bfe5245f8ef
2004-11-03 20:46:33 -05:00
Nathan Binkert 78ae8764a9 add a new phase to the simulator. Basically the simulator now goes
through the following phases.

1) Construct all param contexts
2) Call the checkParams() on each context
3) Build the configuration hierarchy
4) Construct all SimObjects
5) Initialize all SimObjects by calling init() on each one
6) Unserialize the checkpoint
7) Register all statisitcs
8) Check validity of all statistics (after that, no new stats)
9) Reset all stats.
10) Call SimStartup() which calls startup() on all SimObjects,
ParamContexts, and any other object deriving from StartupCallback

SConscript:
    no more SimInit() we have SimStartup() now
sim/param.hh:
    Make all params have a startup callback.
sim/sim_events.cc:
    the init callbacks no longer exist.  We can simplify code by
    using startup().
sim/sim_object.hh:
    Make all SimObjects derive from StartupCallback

--HG--
extra : convert_revision : ab81e259eb5510cc597f7bacb2bfb619fb4cc15f
2004-11-03 11:47:55 -05:00
Steve Reinhardt 40c665dd7b Major documentation update for 570 F04.
sim/main.cc:
    Get rid of default.ini processing... it's kind of a pain and nobody uses it.
util/tracediff:
    Add comments on usage.

--HG--
extra : convert_revision : b811288b2945585d60685684ea88c99d1913fbf3
2004-10-27 22:37:52 -04:00
Steve Reinhardt e852f9e31a Add explicit phases to order ParamContext initializations.
--HG--
extra : convert_revision : c24fba2bded2493a892fa93de0c61f9674cfedbb
2004-10-25 00:56:47 -04:00
Steve Reinhardt 7c58c38e66 Very minor formatting glitches.
sim/main.cc:
    Add 'u' option back in to help message.

--HG--
extra : convert_revision : 9f535c9d898a9e8e54c54cf83044a24a8843f62e
2004-10-22 22:51:28 -04:00
Steve Reinhardt f267dc4a87 Clean up/standardize handling of various output files.
No more non-intuitive behavior shifts depending on whether
outputDirectory is set (at the expense of backwards compatibility).
outputDirectory is now always valid, defaults to ".".

dev/etherdump.cc:
    Use makeOutputStream() to create output file.
    New behavior: actually complain if dump file can't
    be opened, instead of quietly ignoring the problem.
dev/etherdump.hh:
dev/simconsole.cc:
dev/simconsole.hh:
    Use makeOutputStream() to create output file.
sim/builder.cc:
sim/builder.hh:
sim/main.cc:
    builderStream() is now *configStream.
sim/serialize.cc:
    outputDirectory is now always valid, no need to check.
sim/universe.cc:
    Clean up/standardize handling of various output files.
    No more non-intuitive behavior shifts depending on whether
    outputDirectory is set (at the expense of backwards compatibility).
    outputDirectory is now always valid, defaults to ".".
    New function makeOutputStream() does "the right thing" to
    associate a stream with a filename.

--HG--
extra : convert_revision : a03c58c547221b3906e0d6f55e4a569843f2d646
2004-10-19 20:00:20 -04:00
Ali Saidi b5a71e5e52 Merge saidi@zizzer.eecs.umich.edu:/bk/m5
into ali-saidis-computer.local:/research/m5

--HG--
extra : convert_revision : 0b97ac6ae704e47023bb9db9694004022c548b4f
2004-10-17 22:32:17 -05:00
Steve Reinhardt d257169358 Clean up obsolete g++ 2.95 workaround.
--HG--
extra : convert_revision : d8fe9415d855af57e48978904e8f6a52bb7a83cc
2004-10-17 22:04:23 -04:00
Ali Saidi 3ef950abba Fixes for bigendian platforms
arch/alpha/vtophys.cc:
    PGOFSET -> ALPHA_PGOFSET to avoid include file problems
base/callback.hh:
    Added  a class to create a callback from a function
base/intmath.hh:
    make FloorLog2 inlined
dev/pcidev.cc:
    more work in getting pciconfig space happy with different endiannesses
dev/uart.cc:
    used an incorrect size for write uint64_t instead of uint8_t
sim/system.cc:
    when writing things into system data structures we need to pay
    attention to endianness

--HG--
extra : convert_revision : 52f441b5789c45db30ef2f6fd4975cbc7323a381
2004-10-16 19:10:51 -05:00
Ali Saidi eb7d329076 fix unaligned memory offset and some small fixes to interrupt binning
code

arch/alpha/alpha_memory.cc:
    Fixed unaligned trap faults
arch/alpha/ev5.cc:
    little more verbose faulting information
kern/linux/linux_system.cc:
    more descriptive errors, and the correct offsets from symbols
sim/system.cc:
    load local pal symbols

--HG--
extra : convert_revision : 0c81badf77321d5e1a060dcae2d42204e5a1fc84
2004-09-22 18:25:06 -04:00
Ali Saidi af620e1187 added system option to bin interrupt code seperately.
arch/alpha/ev5.cc:
    set the mode explictly rather than having a bool user/notuser
cpu/simple_cpu/simple_cpu.hh:
    there is no class Kernel
kern/kernel_stats.cc:
    use cpu_mode_num
kern/kernel_stats.hh:
    add interrupt mode and use cpu_mode_num rather than constant
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/system_events.cc:
kern/system_events.hh:
    add events to change the mode to/from interrupt
sim/system.cc:
sim/system.hh:
    add a pal symbol table

--HG--
extra : convert_revision : 9d30e826b72122062a5ea12d094f94760e75c66a
2004-09-03 14:12:59 -04:00
Ali Saidi 23e0643c69 Updates to make SMP work.
dev/tsunami_cchip.cc:
    updates to ipi handling chipset code
sim/system.cc:
    debugSymbolTable, now has symbols from pal, console, and linux

--HG--
extra : convert_revision : c981d857f7e3d75f4c46172809e6d14e5f0a1238
2004-08-31 23:47:57 -04:00
Nathan Binkert 9023f5c96d - Clean up and factor out all of the binning code into a
single place so it's easier to work with.
-  Add support for binning kernel/user/idle time separately from
lisa's binning stuff, but make the two compatible.
-  KernelStats used to directly implement the pImpl idiom, but
it makes more sense to just remove the level of indirection and
make the exec context have a pointer to the stats.
-  Factor common code out of LinuxSystem and Tru64System and put
it into the System base class.  While doing that, make all
constructors take a pointer to a parameter struct instead of
naming the parameters individually to make it much easier to add
parameters to these classes.

SConscript:
    Move the function tracking and binning stuff around.
arch/alpha/ev5.cc:
    kernelStats is now a pointer
arch/alpha/pseudo_inst.cc:
    kernelStats is now a pointer
    the parameters to the system have been moved into their own
    struct
base/trace.hh:
    provide a little functor class for wrapping a string that
    can allow you to define name() in any scope very simply
    for use with DPRINTF
cpu/base_cpu.cc:
    New order of arguments for consistency.
cpu/exec_context.cc:
    kernelStats no longer has the level of indirection in it,
    execContext has the indirection now.  so, kernelStats is a pointer.
    We also need a pointer to the kernelBinning stuff from the system
    and we need to figure out if we want to do binning or not.
    Move a whole bunch of code into kern_binning.cc so it's all
    in the same place.
cpu/exec_context.hh:
    We want pointers to the kernel binning/stats stuff and we'll
    have the exec_context and system have the level of indirection
    instead of having the extra layer in the kernel stats class.
cpu/simple_cpu/simple_cpu.cc:
    call through the exec context to do the special binning
    stuff.
kern/kernel_stats.cc:
kern/kernel_stats.hh:
    Re-organize the stats stuff and remove the level of indirection
    (that was there to simplify building) and move the binning stuff
    into its own class/file.
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/system.cc:
sim/system.hh:
    move lots of common system code into the base system class so
    that it can be shared between linux, tru64, and whatever else
    we decide to support in the future.

    Make the constructor take a pointer to a parameter struct so that
    it is easier to pass parameters to the parent.
kern/system_events.cc:
    move the majority of the binning code into the Kernel::Binning class
    in the kern_binning file
kern/system_events.hh:
    FnEvents only need to know the bin
    create the Idle start event to find the PCBB of the idle
    process when it starts.
kern/tru64/tru64_events.cc:
    memCtrl -> memctrl
sim/process.cc:
sim/process.hh:
    re-order args for consistency

--HG--
extra : convert_revision : 86cb39738c41fcd680f2aad125c9dde000227b2b
2004-08-20 11:35:31 -04:00
Nathan Binkert 239183cfe6 Fix a small bug in parameter processing that would always result
in at least on entry in a VectorParam even if the string was
empty.

sim/param.cc:
    if there are no parameters, leave the vector empty.

--HG--
extra : convert_revision : d0d41baa8c77651a27ac6a4d02cc388711f47dbe
2004-08-17 11:19:04 -04:00