gem5.git
12 years agose.py: Changes to ruby portion due to SE/FS merge
Nilay Vaish [Sun, 11 Mar 2012 21:51:38 +0000 (16:51 -0500)]
se.py: Changes to ruby portion due to SE/FS merge
With the SE/FS merge, interrupt controller is created irrespective of the
mode. This patch creates the interrupt controller when Ruby is used and
connects its ports.

12 years agoO3: Add fatal when fetchWidth > Impl::MaxWidth.
Brian Grayson [Sun, 11 Mar 2012 14:20:54 +0000 (10:20 -0400)]
O3: Add fatal when fetchWidth > Impl::MaxWidth.

12 years agoARM: Fix memory starting at non-zero address and exceeding max mem for a system.
Ali Saidi [Fri, 9 Mar 2012 21:45:47 +0000 (16:45 -0500)]
ARM: Fix memory starting at non-zero address and exceeding max mem for a system.

12 years agoARM: Update stats for CBNZ fix.
Ali Saidi [Fri, 9 Mar 2012 20:33:07 +0000 (15:33 -0500)]
ARM: Update stats for CBNZ fix.

12 years agoARM: Fix branch prediction issue with CB(N)Z instruction
Brian Grayson [Fri, 9 Mar 2012 20:32:41 +0000 (15:32 -0500)]
ARM: Fix branch prediction issue with CB(N)Z instruction

12 years agoARM: Update stats for valgrind fix and replace config.inis which are out of date.
Ali Saidi [Fri, 9 Mar 2012 14:59:29 +0000 (09:59 -0500)]
ARM: Update stats for valgrind fix and replace config.inis which are out of date.

12 years agoO3/Ozone: Eliminate dead code counting software prefetch insts
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
O3/Ozone: Eliminate dead code counting software prefetch insts

Eliminates dead code in the O3 and Ozone CPU models that counted
software prefetch instructions separately for the ALPHA ISA only.

12 years agoCheckerCPU: Make some basic regression tests for CheckerCPU
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
CheckerCPU: Make some basic regression tests for CheckerCPU

Adds regression tests for the CheckerCPU. ARM ISA support
only at this point.

12 years agoCheckerCPU: Add function stubs to non-ARM ISA source to compile with CheckerCPU
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
CheckerCPU: Add function stubs to non-ARM ISA source to compile with CheckerCPU

Making the CheckerCPU a runtime time option requires the code to be compatible
with ISAs other than ARM.  This patch adds the appropriate function
stubs to allow compilation.

12 years agoCheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
Geoffrey Blake [Fri, 9 Mar 2012 14:59:27 +0000 (09:59 -0500)]
CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable

Enables the CheckerCPU to be selected at runtime with the --checker option
from the configs/example/fs.py and configs/example/se.py configuration
files.  Also merges with the SE/FS changes.

12 years agoARM: Don't reset CPUs that are going to be switched in.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
ARM: Don't reset CPUs that are going to be switched in.

12 years agoSystem: Move code in initState() back into constructor whenever possible.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
System: Move code in initState() back into constructor whenever possible.

The change to port proxies recently moved code out of the constructor into
initState(). This is needed for code that loads data into memory, however
for code that setups symbol tables, kernel based events, etc this is the wrong
thing to do as that code is only called when a checkpoint isn't being restored
from.

12 years agoARM: Fix valgrind reported error on O3 that was causing minor stats changes.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
ARM: Fix valgrind reported error on O3 that was causing minor stats changes.

12 years agocache: Allow main memory to be at disjoint address ranges.
Ali Saidi [Fri, 9 Mar 2012 14:59:25 +0000 (09:59 -0500)]
cache: Allow main memory to be at disjoint address ranges.

12 years agoFix the SPARC fs regression by adding a call to createInterruptController.
Gabe Black [Thu, 8 Mar 2012 10:10:03 +0000 (02:10 -0800)]
Fix the SPARC fs regression by adding a call to createInterruptController.

12 years agobuild scripts: Made minor modifications to reduce build overhead time.
Marc Orr [Wed, 7 Mar 2012 03:07:41 +0000 (19:07 -0800)]
build scripts: Made minor modifications to reduce build overhead time.

1. --implicit-cache behavior is default.
2. makeEnv in src/SConscript is conditionally called.
3. decider set to MD5-timestamp
4. NO_HTML build option changed to SLICC_HTML (defaults to False)

12 years agoStats: Update stats for changeset 8868
Andreas Hansson [Tue, 6 Mar 2012 16:14:54 +0000 (11:14 -0500)]
Stats: Update stats for changeset 8868

Changeset 8868 slightly changes the statistics for the parser and
bzip2 regressions for ARM o3-timing. This patch merely updates the
statistics to reflect these changes.

12 years agoSConstruct: rename and document AddM5Option
Steve Reinhardt [Fri, 2 Mar 2012 22:05:00 +0000 (14:05 -0800)]
SConstruct: rename and document AddM5Option

Got rid of gratuitous M5 reference in the function name.
In the process, wondered why we have this function at all and
spent time trying to get rid of it and eventually firgured out
why it's needed.  Put the answer in a comment so we don't have
to wonder again.

12 years agoSConstruct: update comments & doc strings
Steve Reinhardt [Fri, 2 Mar 2012 21:53:52 +0000 (13:53 -0800)]
SConstruct: update comments & doc strings

Lots of references to 'M5' still, and some to SE/FS

12 years agoDynInst: get rid of dead MyHash code.
Steve Reinhardt [Fri, 2 Mar 2012 17:17:42 +0000 (09:17 -0800)]
DynInst: get rid of dead MyHash code.

Not sure what this was ever used for, but it
doesn't seem used anymore.

12 years agoCPU: Check that the interrupt controller is created when needed
Andreas Hansson [Fri, 2 Mar 2012 14:21:48 +0000 (09:21 -0500)]
CPU: Check that the interrupt controller is created when needed

This patch adds a creation-time check to the CPU to ensure that the
interrupt controller is created for the cases where it is needed,
i.e. if the CPU is not being switched in later and not a checker CPU.

The patch also adds the "createInterruptController" call to a number
of the regression scripts.

12 years agoStats: Fix the realview regression stats after nvmem move
Andreas Hansson [Fri, 2 Mar 2012 14:18:50 +0000 (09:18 -0500)]
Stats: Fix the realview regression stats after nvmem move

This patch updates the realview regressions stats to reflect that nvmem
moved in the object hierarchy and is now under system.realview.

12 years agoRuby: Rename RubyPort::sendTiming to avoid overriding base class
Andreas Hansson [Fri, 2 Mar 2012 14:16:50 +0000 (09:16 -0500)]
Ruby: Rename RubyPort::sendTiming to avoid overriding base class

This patch renames the sendTiming member function in the RubyPort to
avoid inadvertently hiding Port::sendTiming (discovered through some
rather painful debugging). The RubyPort does, in fact, rely on the
functionality of the queued port and the implementation merely
schedules a send the next cycle. The new name for the member function
is sendNextCycle to better reflect this behaviour.

In the unlikely event that we ever shift to using C++11 the member
functions in Port should have a "final" identifier to prevent any
overriding in derived classes.

12 years agoARM: FIx a bug preventing multiple cores booting a VExpress_EMM machine.
Ali Saidi [Fri, 2 Mar 2012 14:18:19 +0000 (08:18 -0600)]
ARM: FIx a bug preventing multiple cores booting a VExpress_EMM machine.

New kernel code verifies that multi-processor extensions are available
before booting secondary CPUs.

12 years agoARM: FIx missing cf controller connection.
Ali Saidi [Fri, 2 Mar 2012 04:43:23 +0000 (22:43 -0600)]
ARM: FIx missing cf controller connection.

12 years agoVNC: spacing
Chander Sudanthi [Thu, 1 Mar 2012 23:26:36 +0000 (17:26 -0600)]
VNC: spacing

Fixed some spacing in a switch statement

12 years agoARM: Add support for Versatile Express extended memory map
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add support for Versatile Express extended  memory map

Also clean up how we create boot loader memory a bit.

12 years agoARM: Add RTC device for ARM platforms.
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add RTC device for ARM platforms.

This change implements a PL031 real time clock.

--HG--
rename : src/dev/arm/timer_sp804.cc => src/dev/arm/rtc_pl031.cc
rename : src/dev/arm/timer_sp804.hh => src/dev/arm/rtc_pl031.hh

12 years agoARM: Add limited CP14 support.
Matt Horsnell [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add limited CP14 support.

New kernels attempt to read CP14 what debug architecture is available.
These changes add the debug registers and return that none is currently
available.

12 years agoCache: Fix an issue with LRU when bonus block is used to complete transaction.
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
Cache: Fix an issue with LRU when bonus block is used to complete transaction.

The block is never inserted because it's the one extra block in the cache, but
it can be invalidated twice in a row. In that case the block doesn't have a
new master id (beacuse it was never inserted), however it is valid and
the accounting goes wrong at that point.

12 years agoARM: move kernel func event to correct location.
Dam Sunwoo [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: move kernel func event to correct location.

With the recent series of patches, the symbol table loading moved from
"construct" time to "init" time, but the kernel function event
callback registration was left behind. This patch moves it to the
proper location.

12 years agoARM: fix bits-to-fp conversion function declarations.
Giacomo Gabrielli [Thu, 1 Mar 2012 23:26:30 +0000 (17:26 -0600)]
ARM: fix bits-to-fp conversion function declarations.

Add extra declarations to allow the compiler to pick up the right function.
Please note that these declarations have been added as part of the
clang-related changes.

12 years agox86: Fix x86 TLB and Walker
Nilay Vaish [Thu, 1 Mar 2012 17:37:03 +0000 (11:37 -0600)]
x86: Fix x86 TLB and Walker
This patch adds a function to X86 tlb that returns the
walker port. This port is required for correctly connecting
the walker ports for the cpu just switched in

12 years agox86: Fix switching of CPUs
Nilay Vaish [Thu, 1 Mar 2012 17:37:02 +0000 (11:37 -0600)]
x86: Fix switching of CPUs
This patch prevents creation of interrupt controller for
cpus that will be switched in later

12 years agoConfig: make option ruby available always
Nilay Vaish [Thu, 1 Mar 2012 17:36:59 +0000 (11:36 -0600)]
Config: make option ruby available always

12 years agoMEM: Make all the port proxy members const
Andreas Hansson [Wed, 29 Feb 2012 09:47:51 +0000 (04:47 -0500)]
MEM: Make all the port proxy members const

This is a trivial patch that merely makes all the member functions of
the port proxies const. There is no good reason why they should not
be, and this change only serves to make it explicit that they are not
modified through their use.

12 years agoSWIG: Ensure ptrdiff_t is a known type in gcc >= 4.6.1
Andreas Hansson [Wed, 29 Feb 2012 09:26:58 +0000 (04:26 -0500)]
SWIG: Ensure ptrdiff_t is a known type in gcc >= 4.6.1

This patch fixes a compilation error that occurs with gcc >= 4.6.1,
caused by swig not including cstddef and not using the std:: namespace
prefix for ptrdiff_t. There is an old patch,
http://reviews.m5sim.org/r/913/ that no longer applies cleanly and
this might be re-iterating the same issue.

We work around the problem by always enforcing the inclusion of
cstddef in all swig interface declarations, and also by explicitly
using std::ptrdiff_t.

12 years agoEIO: update stats (mostly order change, some renames)
Steve Reinhardt [Wed, 29 Feb 2012 06:51:39 +0000 (01:51 -0500)]
EIO: update stats (mostly order change, some renames)

12 years agoMake the IO bridge accept address headed to all the local APICs.
Gabe Black [Sun, 26 Feb 2012 23:33:07 +0000 (15:33 -0800)]
Make the IO bridge accept address headed to all the local APICs.

12 years agoX86: Use the M5PanicFault fault in execute methods instead of calling panic.
Gabe Black [Sun, 26 Feb 2012 23:32:53 +0000 (15:32 -0800)]
X86: Use the M5PanicFault fault in execute methods instead of calling panic.

If an instruction is executed speculatively and hits a situation where it
wants to panic, it should return a fault instead. If the instruction was
misspeculated, the fault can be thrown away. If the instruction wasn't
misspeculated, the fault will be invoked and the panic will still happen.

12 years agoMEM: Simplify cache ports preparing for master/slave split
Andreas Hansson [Fri, 24 Feb 2012 16:52:49 +0000 (11:52 -0500)]
MEM: Simplify cache ports preparing for master/slave split

This patch splits the two cache ports into a master (memory-side) and
slave (cpu-side) subclass of port with slightly different
functionality. For example, it is only the CPU-side port that blocks
incoming requests, and only the memory-side port that schedules send
events outside of what the transmit list dictates.

This patch simplifies the two classes by relying further on
SimpleTimingPort and also generalises the latter to better accommodate
the changes (introducing trySendTiming and scheduleSend). The
memory-side cache port overrides sendDeferredPacket to be able to not
only send responses from the transmit list, but also send requests
based on the MSHRs.

A follow on patch further simplifies the SimpleTimingPort and the
cache ports.

12 years agoMEM: Prepare mport for master/slave split
Andreas Hansson [Fri, 24 Feb 2012 16:50:15 +0000 (11:50 -0500)]
MEM: Prepare mport for master/slave split

This patch simplifies the mport in preparation for a split into a
master and slave role for the message ports. In particular,
sendMessageAtomic was only used in a single location and similarly so
sendMessageTiming. The affected interrupt device is updated
accordingly.

12 years agoRuby: Simplify tester ports by not using SimpleTimingPort
Andreas Hansson [Fri, 24 Feb 2012 16:48:48 +0000 (11:48 -0500)]
Ruby: Simplify tester ports by not using SimpleTimingPort

This patch simplfies the master ports used by RubyDirectedTester and
RubyTester by avoiding the use of SimpleTimingPort. Neither tester
made any use of the functionality offered by SimpleTimingPort besides
a trivial implementation of recvFunctional (only snoops) and
recvRangeChange (not relevant since there is only one master).

The patch does not change or add any functionality, it merely makes
the introduction of a master/slave port easier (in a future patch).

12 years agoMEM: Move all read/write blob functions from Port to PortProxy
Andreas Hansson [Fri, 24 Feb 2012 16:46:39 +0000 (11:46 -0500)]
MEM: Move all read/write blob functions from Port to PortProxy

This patch moves the readBlob/writeBlob/memsetBlob from the Port class
to the PortProxy class, thus making a clear separation of the basic
port functionality (recv/send functional/atomic/timing), and the
higher-level functional accessors available on the port proxies.

There are only a few places in the code base where the blob functions
were used on ports, and they are all for peeking into the memory
system without making a normal memory access (in the memtest, and the
malta and tsunami pchip). The memtest also exemplifies how easy it is
to create a non-translating proxy if desired. The malta and tsunami
pchip used a slave port to perform a functional read, and this is now
changed to rely on the physProxy of the system (to which they already
have a pointer).

12 years agoMEM: Make port proxies use references rather than pointers
Andreas Hansson [Fri, 24 Feb 2012 16:45:30 +0000 (11:45 -0500)]
MEM: Make port proxies use references rather than pointers

This patch is adding a clearer design intent to all objects that would
not be complete without a port proxy by making the proxies members
rathen than dynamically allocated. In essence, if NULL would not be a
valid value for the proxy, then we avoid using a pointer to make this
clear.

The same approach is used for the methods using these proxies, such as
loadSections, that now use references rather than pointers to better
reflect the fact that NULL would not be an acceptable value (in fact
the code would break and that is how this patch started out).

Overall the concept of "using a reference to express unconditional
composition where a NULL pointer is never valid" could be done on a
much broader scale throughout the code base, but for now it is only
done in the locations affected by the proxies.

12 years agoMEM: Move port creation to the memory object(s) construction
Andreas Hansson [Fri, 24 Feb 2012 16:43:53 +0000 (11:43 -0500)]
MEM: Move port creation to the memory object(s) construction

This patch moves all port creation from the getPort method to be
consistently done in the MemObject's constructor. This is possible
thanks to the Swig interface passing the length of the vector ports.
Previously there was a mix of: 1) creating the ports as members (at
object construction time) and using getPort for the name resolution,
or 2) dynamically creating the ports in the getPort call. This is now
uniform. Furthermore, objects that would not be complete without a
port have these ports as members rather than having pointers to
dynamically allocated ports.

This patch also enables an elaboration-time enumeration of all the
ports in the system which can be used to determine the masterId.

12 years agoCPU: Round-two unifying instr/data CPU ports across models
Andreas Hansson [Fri, 24 Feb 2012 16:42:00 +0000 (11:42 -0500)]
CPU: Round-two unifying instr/data CPU ports across models

This patch continues the unification of how the different CPU models
create and share their instruction and data ports. Most importantly,
it forces every CPU to have an instruction and a data port, and gives
these ports explicit getters in the BaseCPU (getDataPort and
getInstPort). The patch helps in simplifying the code, make
assumptions more explicit, andfurther ease future patches related to
the CPU ports.

The biggest changes are in the in-order model (that was not modified
in the previous unification patch), which now moves the ports from the
CacheUnit to the CPU. It also distinguishes the instruction fetch and
load-store unit from the rest of the resources, and avoids the use of
indices and casting in favour of keeping track of these two units
explicitly (since they are always there anyways). The atomic, timing
and O3 model simply return references to their already existing ports.

12 years agoMEM: Fatal when no port can be found for an address
Andreas Hansson [Fri, 24 Feb 2012 16:40:29 +0000 (11:40 -0500)]
MEM: Fatal when no port can be found for an address

This patch adds a check in the findPort method to ensure that an
invalid port id is never returned. Previously this could happen if no
default port was set, and no address matched the request, in which
case -1 was returned causing a SEGFAULT when using the id to index in
the port array. To clean things up further a symbolic name is added
for the invalid port id.

12 years agoSimObject: make get_config_as_dict() tolerate undefined params
Steve Reinhardt [Mon, 20 Feb 2012 16:11:14 +0000 (08:11 -0800)]
SimObject: make get_config_as_dict() tolerate undefined params

Without this patch, undefined params cause a cryptic KeyError
in multidict inside get_config_as_dict().  This patch lets
undefined params through get_config_as_dict() so they can
once again generate meaningful error messages later on in
the configuration process.

12 years agoMEM: Fix residual bus ports and make them master/slave
Andreas Hansson [Tue, 14 Feb 2012 19:15:30 +0000 (14:15 -0500)]
MEM: Fix residual bus ports and make them master/slave

This patch cleans up a number of remaining uses of bus.port which
is now split into bus.master and bus.slave. The only non-trivial change
is the memtest where the level building now has to be aware of the role
of the ports used in the previous level.

12 years agoScript: Fix the scripts that use the num_cpus cache parameter
Andreas Hansson [Tue, 14 Feb 2012 17:11:18 +0000 (12:11 -0500)]
Script: Fix the scripts that use the num_cpus cache parameter

This patch merely removes the use of the num_cpus cache parameter
which no longer exists after the introduction of the masterIds. The
affected scripts fail when trying to set the parameter. Note that this
patch does not update the regression stats.

12 years agoMEM: Fix master/slave ports in Ruby and non-regression scripts
Andreas Hansson [Tue, 14 Feb 2012 08:41:53 +0000 (03:41 -0500)]
MEM: Fix master/slave ports in Ruby and non-regression scripts

This patch brings the Ruby and other scripts up to date with the
introduction of the master/slave ports.

12 years agobp: fix up stats for changes to branch predictor
Ali Saidi [Mon, 13 Feb 2012 18:30:30 +0000 (12:30 -0600)]
bp: fix up stats for changes to branch predictor

12 years agoBPred: Fix RAS to handle predicated call/return instructions.
Mrinmoy Ghosh [Mon, 13 Feb 2012 18:26:25 +0000 (12:26 -0600)]
BPred: Fix RAS to handle predicated call/return instructions.

Change RAS to fix issues with predicated call/return instructions.
Handled all cases in the life of a predicated call and return instruction.

12 years agoBP: Fix several Branch Predictor issues.
Mrinmoy Ghosh [Mon, 13 Feb 2012 18:26:24 +0000 (12:26 -0600)]
BP: Fix several Branch Predictor issues.
1. Updates the Branch Predictor correctly to the state
   just after a mispredicted branch, if a squash occurs.
2. If a BTB does not find an entry, the branch is predicted not taken.
   The global history is modified to correctly reflect this prediction.
3. Local history is now updated at the fetch stage instead of
   execute stage.
4. In the Update stage of the branch predictor the local predictors are
   now correctly updated according to the state of local history during
   fetch stage.

This patch also improves performance by as much as 17% on some benchmarks

12 years agoMEM: Explicit ports and Python binding on CopyEngine
Andreas Hansson [Mon, 13 Feb 2012 11:46:43 +0000 (06:46 -0500)]
MEM: Explicit ports and Python binding on CopyEngine

The copy-engine ports were previously created implicitly and bound
based on the dma port peer rather than relying on the normal Python
binding (connectPorts) being called explicitly. This patch makes the
copy engine port similar to all other ports in that they are visibly
in the Python class and bound using the normal explicit calls through
Python.

12 years agoMEM: Pass the ports from Python to C++ using the Swig params
Andreas Hansson [Mon, 13 Feb 2012 11:45:11 +0000 (06:45 -0500)]
MEM: Pass the ports from Python to C++ using the Swig params

This patch adds basic information about the ports in the parameter
classes to be passed from the Python world to the corresponding C++
object. Currently, the only information passed is the number of
connected peers, which for a Port is either 0 or 1, and for a
VectorPort reflects the size of the VectorPort. The default port of
the bus had to be renamed to avoid using the name "default" as a field
in the parameter class. It is possible to extend the Swig'ed
information further and add e.g. a pair with a description and size.

12 years agoMEM: Introduce the master/slave port roles in the Python classes
Andreas Hansson [Mon, 13 Feb 2012 11:43:09 +0000 (06:43 -0500)]
MEM: Introduce the master/slave port roles in the Python classes

This patch classifies all ports in Python as either Master or Slave
and enforces a binding of master to slave. Conceptually, a master (such
as a CPU or DMA port) issues requests, and receives responses, and
conversely, a slave (such as a memory or a PIO device) receives
requests and sends back responses. Currently there is no
differentiation between coherent and non-coherent masters and slaves.

The classification as master/slave also involves splitting the dual
role port of the bus into a master and slave port and updating all the
system assembly scripts to use the appropriate port. Similarly, the
interrupt devices have to have their int_port split into a master and
slave port. The intdev and its children have minimal changes to
facilitate the extra port.

Note that this patch does not enforce any port typing in the C++
world, it merely ensures that the Python objects have a notion of the
port roles and are connected in an appropriate manner. This check is
carried when two ports are connected, e.g. bus.master =
memory.port. The following patches will make use of the
classifications and specialise the C++ ports into masters and slaves.

12 years agotests: fix diff-out script for op/inst stat changes.
Ali Saidi [Mon, 13 Feb 2012 00:35:59 +0000 (18:35 -0600)]
tests: fix diff-out script for op/inst stat changes.

12 years agoX86: open flags: Another patch from Vince Weaver
Gabe Black [Mon, 13 Feb 2012 00:41:29 +0000 (16:41 -0800)]
X86:  open flags: Another patch from Vince Weaver

12 years agoconfigs: fix minor config bugs posted on the mailing list
Ali Saidi [Sun, 12 Feb 2012 23:18:53 +0000 (17:18 -0600)]
configs: fix minor config bugs posted on the mailing list

12 years agostats: update stats for insts/ops and master id changes
Ali Saidi [Sun, 12 Feb 2012 22:07:43 +0000 (16:07 -0600)]
stats: update stats for insts/ops and master id changes

12 years agocpu: add separate stats for insts/ops both globally and per cpu model
Anthony Gutierrez [Sun, 12 Feb 2012 22:07:39 +0000 (16:07 -0600)]
cpu: add separate stats for insts/ops both globally and per cpu model

12 years agomem: fix cache stats to use request ids correctly
Dam Sunwoo [Sun, 12 Feb 2012 22:07:39 +0000 (16:07 -0600)]
mem: fix cache stats to use request ids correctly

This patch fixes the cache stats to use the new request ids.
Cache stats also display the requestor names in the vector subnames.
Most cache stats now include "nozero" and "nonan" flags to reduce the
amount of excessive cache stat dump. Also, simplified
incMissCount()/incHitCount() functions.

12 years agomem: Add a master ID to each request object.
Ali Saidi [Sun, 12 Feb 2012 22:07:38 +0000 (16:07 -0600)]
mem: Add a master ID to each request object.

This change adds a master id to each request object which can be
used identify every device in the system that is capable of issuing a request.
This is part of the way to removing the numCpus+1 stats in the cache and
replacing them with the master ids. This is one of a series of changes
that make way for the stats output to be changed to python.

12 years agoprefetcher: Make prefetcher a sim object instead of it being a parameter on cache
Mrinmoy Ghosh [Sun, 12 Feb 2012 22:07:38 +0000 (16:07 -0600)]
prefetcher: Make prefetcher a sim object instead of it being a parameter on cache

12 years agoRegressions: Update stats due to change in MESI protocol
Nilay Vaish [Sun, 12 Feb 2012 19:22:04 +0000 (13:22 -0600)]
Regressions: Update stats due to change in MESI protocol

12 years agoSPARC: Make PSTATE and HPSTATE a BitUnion.
Gabe Black [Sat, 11 Feb 2012 22:16:38 +0000 (14:16 -0800)]
SPARC: Make PSTATE and HPSTATE a BitUnion.

This gets rid of cryptic bits of code with lots of bit manipulation, and makes
some comments redundant.

12 years agoRuby: Remove isTagPresent() calls from Sequencer.cc
Nilay Vaish [Fri, 10 Feb 2012 17:29:02 +0000 (11:29 -0600)]
Ruby: Remove isTagPresent() calls from Sequencer.cc
This patch removes the calls to isTagPresent() from Sequencer.cc. These
calls are made just for setting the cache block to have been most recently
used. The calls have been folded in to the function setMRU().

12 years agoMESI: Add queues for stalled requests
Nilay Vaish [Fri, 10 Feb 2012 17:05:24 +0000 (11:05 -0600)]
MESI: Add queues for stalled requests
This patch adds support for stalling the requests queued up at different
controllers for the MESI CMP directory protocol. Earlier the controllers
would recycle the requests using some fixed latency. This results in
younger requests getting serviced first at times, and can result in
starvation. Instead all the requests that need a particular block to be
in a stable state are moved to a separate queue, where they wait till
that block returns to a stable state and then they are processed.

12 years agosim/system: initialize the pagePtr variable
Nilay Vaish [Fri, 10 Feb 2012 15:52:32 +0000 (09:52 -0600)]
sim/system: initialize the pagePtr variable

12 years agoRegressions: Update stats due to O3 CPU changes
Nilay Vaish [Fri, 10 Feb 2012 15:51:37 +0000 (09:51 -0600)]
Regressions: Update stats due to O3 CPU changes

12 years agoO3 CPU: Improve handling of delayed commit flag
Nilay Vaish [Fri, 10 Feb 2012 14:37:31 +0000 (08:37 -0600)]
O3 CPU: Improve handling of delayed commit flag
The delayed commit flag is used in conjunction with interrupt pending flag to
figure out whether or not fetch stage should get more instructions. This patch
clears this flag when instructions are squashed. Also, in case an interrupt is
pending, currently it is not possible to access the instruction cache. This
patch allows accessing the cache in case this flag is set.

12 years agoO3 CPU: Strengthen condition for handling interrupts
Nilay Vaish [Fri, 10 Feb 2012 14:37:30 +0000 (08:37 -0600)]
O3 CPU: Strengthen condition for handling interrupts
The condition for handling interrupts is to check whether or not the cpu's
instruction list is empty. As observed, this can lead to cases in which even
though the instruction list is empty, interrupts are handled when they should
not be. The condition is being strengthened so that interrupts get handled only
when the last committed microop did not had IsDelayedCommit set.

12 years agoO3 CPU: Provide the squashing instruction
Nilay Vaish [Fri, 10 Feb 2012 14:37:28 +0000 (08:37 -0600)]
O3 CPU: Provide the squashing instruction
This patch adds a function to the ROB that will get the squashing instruction
from the ROB's list of instructions. This squashing instruction is used for
figuring out the macroop from which the fetch stage should fetch the microops.
Further, a check has been added that if the instructions are to be fetched
from the cache maintained by the fetch stage, then the data in the cache should
be valid and the PC of the thread being fetched from is same as the address of
the cache block.

12 years agoO3 Fetch: Check if PC is pointing to Microcode ROM
Nilay Vaish [Fri, 10 Feb 2012 14:37:26 +0000 (08:37 -0600)]
O3 Fetch: Check if PC is pointing to Microcode ROM

12 years agoSE/FS: Record the system pointer all the time for the simple CPU.
Gabe Black [Fri, 10 Feb 2012 10:05:31 +0000 (02:05 -0800)]
SE/FS: Record the system pointer all the time for the simple CPU.

This pointer was only being stored in code that came from SE mode. The system
pointer is always meaningful and available, so it should always be stored.

12 years agoMEM: Remove onRetryList from BusPort and rely on retryList
Andreas Hansson [Thu, 9 Feb 2012 18:06:27 +0000 (13:06 -0500)]
MEM: Remove onRetryList from BusPort and rely on retryList

This patch removes the onRetryList field from the BusPort class and
entirely relies on the retryList which holds all ports that are
waiting to retry. The onRetryList field and the retryList were
previously used with overloaded functionalities and only one is really
needed (there were also checks to assert they held the same
information). After this patch the bus ports will be split into master
and slave ports and this simplifies that transition.

12 years agoChecker: Access workload element 0 only if there is an element 0.
Gabe Black [Tue, 7 Feb 2012 12:44:01 +0000 (04:44 -0800)]
Checker: Access workload element 0 only if there is an element 0.

12 years agoFaults: Turn off arch/faults.hh
Gabe Black [Tue, 7 Feb 2012 12:43:21 +0000 (04:43 -0800)]
Faults: Turn off arch/faults.hh

Because there are no longer architecture independent but specialized functions
in arch/XXX/faults.hh, code that isn't using the faults from a particular ISA
no longer needs to be able to include them through the switching header file
arch/faults.hh. By removing that header file (arch/faults.hh), the potential
interface between ISA code and non ISA code is narrowed.

12 years agom5=>gem5: Make the regression script build gem5.* instead of m5.*
Gabe Black [Tue, 7 Feb 2012 12:43:05 +0000 (04:43 -0800)]
m5=>gem5: Make the regression script build gem5.* instead of m5.*

12 years agoX86: Rename the bridge which allows commnication back to the local APICs.
Gabe Black [Sun, 5 Feb 2012 09:37:40 +0000 (01:37 -0800)]
X86: Rename the bridge which allows commnication back to the local APICs.

There was a collision with a name used in fs.py, and that causes that script
not to work when used with x86.

12 years agoRegressions: Fix the regress script when "all" is used.
Gabe Black [Sun, 5 Feb 2012 09:23:22 +0000 (01:23 -0800)]
Regressions: Fix the regress script when "all" is used.

When the "all" test is specified, the "tests" list should have two elements in
it, "quick" and "long", not a single element "quick,long". The later would be
appropriate as the default for one of the command line options which are split
at commas, but at that point "tests" should already be a list.

12 years agoSystem: Forgot to qrefresh with my last change.
Gabe Black [Fri, 3 Feb 2012 17:48:10 +0000 (09:48 -0800)]
System: Forgot to qrefresh with my last change.

12 years agoSystem: Fix the check which detects running out of physical memory.
Gabe Black [Fri, 3 Feb 2012 07:54:25 +0000 (23:54 -0800)]
System: Fix the check which detects running out of physical memory.

The code that checks whether pages allocated by allocPhysPages only checks
that the first page fits into physical memory, not that all of them do. This
change makes the code check the last page which should work properly. This
function used to only allocate one page at a time, so the first page and last
page used to be the same thing.

12 years agoRegression: Update the regress script after SE/FS merge
Andreas Hansson [Thu, 2 Feb 2012 09:51:13 +0000 (04:51 -0500)]
Regression: Update the regress script after SE/FS merge

This patch updates the regress script to reflect the merge of the
SE/FS builds and the new structure of the test directories. It adds a
"mode" flag to the script, that defaults to both se and fs.

12 years agoconfigs: More fixes for the memory system updates
Ali Saidi [Wed, 1 Feb 2012 17:48:28 +0000 (09:48 -0800)]
configs: More fixes for the memory system updates

12 years agoMerge with head, hopefully the last time for this batch.
Gabe Black [Wed, 1 Feb 2012 06:40:08 +0000 (22:40 -0800)]
Merge ... head, hopefully the last time for this batch.

12 years agoclang: Enable compiling gem5 using clang 2.9 and 3.0
Koan-Sin Tan [Tue, 31 Jan 2012 17:05:52 +0000 (12:05 -0500)]
clang: Enable compiling gem5 using clang 2.9 and 3.0

This patch adds the necessary flags to the SConstruct and SConscript
files for compiling using clang 2.9 and later (on Ubuntu et al and OSX
XCode 4.2), and also cleans up a bunch of compiler warnings found by
clang. Most of the warnings are related to hidden virtual functions,
comparisons with unsigneds >= 0, and if-statements with empty
bodies. A number of mismatches between struct and class are also
fixed. clang 2.8 is not working as it has problems with class names
that occur in multiple namespaces (e.g. Statistics in
kernel_stats.hh).

clang has a bug (http://llvm.org/bugs/show_bug.cgi?id=7247) which
causes confusion between the container std::set and the function
Packet::set, and this is currently addressed by not including the
entire namespace std, but rather selecting e.g. "using std::vector" in
the appropriate places.

12 years agoMEM: Remove the otherPort from the cache ports
Andreas Hansson [Tue, 31 Jan 2012 16:51:19 +0000 (11:51 -0500)]
MEM: Remove the otherPort from the cache ports

This patch is a very straight-forward simplification, removing the
unecessary otherPort pointer from the cache port. The pointer was only
used to forward range changes, and the address range is fixed for the
cache. Removing the pointer simplifies the transition to master/slave
ports.

12 years agoThread: Use inherited baseCpu rather than cpu in SimpleThread
Andreas Hansson [Tue, 31 Jan 2012 16:50:07 +0000 (11:50 -0500)]
Thread: Use inherited baseCpu rather than cpu in SimpleThread

This patch is a trivial simplification, removing the cpu pointer from
SimpleThread and relying on the baseCpu pointer in ThreadState. The
patch does not add or change any functionality, it merely cleans up
the code.

12 years agoutil: implements "writefile" gem5 op to export file from guest to host filesystem
Dam Sunwoo [Tue, 31 Jan 2012 15:46:04 +0000 (07:46 -0800)]
util: implements "writefile" gem5 op to export file from guest to host filesystem

Usage: m5 writefile <filename>

File will be created in the gem5 output folder with the identical filename.
Implementation is largely based on the existing "readfile" functionality.
Currently does not support exporting of folders.

12 years agoCheckerCPU: Re-factor CheckerCPU to be compatible with current gem5
Geoffrey Blake [Tue, 31 Jan 2012 15:46:03 +0000 (07:46 -0800)]
CheckerCPU: Re-factor CheckerCPU to be compatible with current gem5

Brings the CheckerCPU back to life to allow FS and SE checking of the
O3CPU.  These changes have only been tested with the ARM ISA.  Other
ISAs potentially require modification.

12 years agoMerge with main repository.
Gabe Black [Tue, 31 Jan 2012 05:07:57 +0000 (21:07 -0800)]
Merge with main repository.

12 years agoRuby: Connect system port in Ruby network test
Andreas Hansson [Mon, 30 Jan 2012 14:37:06 +0000 (09:37 -0500)]
Ruby: Connect system port in Ruby network test

This patch moves the connection of the system port to create_system in
Ruby.py. Thereby it allows the failing Ruby test (and other Ruby
systems) to run again.

12 years agoMEM: Make the RubyPort physMemPort a PioPort instead of M5Port
Andreas Hansson [Mon, 30 Jan 2012 10:38:24 +0000 (05:38 -0500)]
MEM: Make the RubyPort physMemPort a PioPort instead of M5Port

This patch makes the physMemPort of the RubyPort a PioPort rather than
an M5Port. This reflects the fact that the M5Port and PioPort have
different roles. The M5Port is really a coherent slave that is
connected to the CPUs and other coherent masters of the system,
e.g. DMA ports. The PioPort, on the other hand, is a master port that
is connected to the memory and other slaves, for example the pio
devices.

This simplifies future changes into master/slave ports and is
consistent with the port roles throughout the system.

12 years agoMEM: Clean-up of Functional/Virtual/TranslatingPort remnants
Andreas Hansson [Mon, 30 Jan 2012 08:44:25 +0000 (03:44 -0500)]
MEM: Clean-up of Functional/Virtual/TranslatingPort remnants

This patch cleans up forward declarations and a member-function
prototype that still referred to the old FunctionalPort, VirtualPort
and TranslatingPort. There is no change in functionality.

12 years agoYet another merge with the main repository.
Gabe Black [Sun, 29 Jan 2012 11:27:15 +0000 (03:27 -0800)]
Yet another merge with the main repository.

--HG--
rename : tests/long/10.linux-boot/ref/x86/linux/pc-o3-timing/config.ini => tests/long/fs/10.linux-boot/ref/x86/linux/pc-o3-timing/config.ini
rename : tests/long/10.linux-boot/ref/x86/linux/pc-o3-timing/simout => tests/long/fs/10.linux-boot/ref/x86/linux/pc-o3-timing/simout
rename : tests/long/10.linux-boot/ref/x86/linux/pc-o3-timing/stats.txt => tests/long/fs/10.linux-boot/ref/x86/linux/pc-o3-timing/stats.txt
rename : tests/long/10.linux-boot/ref/x86/linux/pc-o3-timing/system.pc.com_1.terminal => tests/long/fs/10.linux-boot/ref/x86/linux/pc-o3-timing/system.pc.com_1.terminal
rename : tests/long/00.gzip/ref/x86/linux/o3-timing/config.ini => tests/long/se/00.gzip/ref/x86/linux/o3-timing/config.ini
rename : tests/long/00.gzip/ref/x86/linux/o3-timing/simout => tests/long/se/00.gzip/ref/x86/linux/o3-timing/simout
rename : tests/long/00.gzip/ref/x86/linux/o3-timing/stats.txt => tests/long/se/00.gzip/ref/x86/linux/o3-timing/stats.txt
rename : tests/long/10.mcf/ref/x86/linux/o3-timing/config.ini => tests/long/se/10.mcf/ref/x86/linux/o3-timing/config.ini
rename : tests/long/10.mcf/ref/x86/linux/o3-timing/simout => tests/long/se/10.mcf/ref/x86/linux/o3-timing/simout
rename : tests/long/10.mcf/ref/x86/linux/o3-timing/stats.txt => tests/long/se/10.mcf/ref/x86/linux/o3-timing/stats.txt
rename : tests/long/20.parser/ref/x86/linux/o3-timing/config.ini => tests/long/se/20.parser/ref/x86/linux/o3-timing/config.ini
rename : tests/long/20.parser/ref/x86/linux/o3-timing/simout => tests/long/se/20.parser/ref/x86/linux/o3-timing/simout
rename : tests/long/20.parser/ref/x86/linux/o3-timing/stats.txt => tests/long/se/20.parser/ref/x86/linux/o3-timing/stats.txt
rename : tests/long/70.twolf/ref/x86/linux/o3-timing/config.ini => tests/long/se/70.twolf/ref/x86/linux/o3-timing/config.ini
rename : tests/long/70.twolf/ref/x86/linux/o3-timing/simout => tests/long/se/70.twolf/ref/x86/linux/o3-timing/simout
rename : tests/long/70.twolf/ref/x86/linux/o3-timing/stats.txt => tests/long/se/70.twolf/ref/x86/linux/o3-timing/stats.txt
rename : tests/quick/00.hello/ref/x86/linux/o3-timing/config.ini => tests/quick/se/00.hello/ref/x86/linux/o3-timing/config.ini
rename : tests/quick/00.hello/ref/x86/linux/o3-timing/simout => tests/quick/se/00.hello/ref/x86/linux/o3-timing/simout
rename : tests/quick/00.hello/ref/x86/linux/o3-timing/stats.txt => tests/quick/se/00.hello/ref/x86/linux/o3-timing/stats.txt

12 years agoImplement Ali's review feedback.
Gabe Black [Sun, 29 Jan 2012 10:04:34 +0000 (02:04 -0800)]
Implement Ali's review feedback.

Try to decrease indentation, and remove some redundant FullSystem checks.

12 years agoConfig: Enable O3 CPU and Ruby in FS mode
Nilay Vaish [Sun, 29 Jan 2012 01:33:37 +0000 (19:33 -0600)]
Config: Enable O3 CPU and Ruby in FS mode