Mitch Hayenga [Tue, 1 Apr 2014 19:24:36 +0000 (14:24 -0500)]
mem: Don't print out the data of a cache block
This never actually worked since it was printing out only a word
of the cache block and not the entire thing and doubly didn't work
csprintf overrides the %#x specifier and assumes a char* array is
actually a string.
Mitchell Hayenga [Wed, 23 Apr 2014 09:18:20 +0000 (05:18 -0400)]
arm: Don't use a stack allocated mnemonic
FailUnimplemented passed a stack created mnemonic as a const char * which
causes some grief when the stack goes away.
Dam Sunwoo [Wed, 23 Apr 2014 09:18:18 +0000 (05:18 -0400)]
cpu: Add O3 CPU width checks
O3CPU has a compile-time maximum width set in o3/impl.hh, but checking
the configuration against this limit was not implemented anywhere
except for fetch. Configuring a wider pipe than the limit can silently
cause various issues during the simulation. This patch adds the proper
checking in the constructor of the various pipeline stages.
Curtis Dunham [Wed, 23 Apr 2014 09:17:59 +0000 (05:17 -0400)]
base: explicitly suggest potential use of 'All' debug flags
Without this declaration, new clangs will complain about this value
being unused. It has no explicit use in the codebase, but it can be
useful to turn on all debugging flags while in a debugger to greatly
increase simulator verbosity.
Curtis Dunham [Wed, 23 Apr 2014 09:17:57 +0000 (05:17 -0400)]
arch: remove 'null update' check in isa-parser
SCons already does this for all build steps.
Curtis Dunham [Tue, 11 Feb 2014 00:24:20 +0000 (18:24 -0600)]
stats: better error message for uninitialized statistic
As suggested by Nathan Binkert in 2008:
http://permalink.gmane.org/gmane.comp.emulators.m5.users/2676
Andreas Hansson [Tue, 22 Apr 2014 07:12:15 +0000 (03:12 -0400)]
stats: updates for pc-switcheroo-full due to o3 smt fix
Nilay Vaish [Sat, 19 Apr 2014 14:16:14 +0000 (09:16 -0500)]
stats: updates due to o3 smt fix
+ changes to one ruby regression config.ini file.
Nilay Vaish [Sat, 19 Apr 2014 14:00:31 +0000 (09:00 -0500)]
ruby: slicc: remove old documentation
Has not been maintained at all. Since there is alternate documentation
available on gem5.org, no need to have this separately.
Nilay Vaish [Sat, 19 Apr 2014 14:00:31 +0000 (09:00 -0500)]
ruby: slicc: slight change to rule for transitions
It had an unnecessary pairs token which is being removed.
Faissal Sleiman [Sat, 19 Apr 2014 14:00:30 +0000 (09:00 -0500)]
o3: Fix occupancy checks for SMT
A number of calls to isEmpty() and numFreeEntries()
should be thread-specific.
In cpu.cc, the fact that tid is /*commented*/ out is a bug. Say the rob
has instructions from thread 0 (isEmpty() returns false), and none from
thread 1. If we are trying to squash all of thread 1, then
readTailInst(thread 1) will be called because rob->isEmpty() returns
false. The result is end_it is not in the list and the while
statement loops indefinitely back over the cpu's instList.
In iew_impl.hh, all threads are told they have the entire remaining IQ, when
each thread actually has a certain allocation. The result is extra stalls at
the iew dispatch stage which the rename stage usually takes care of.
In commit_impl.hh, rob->readHeadInst(thread 1) can be called if the rob only
contains instructions from thread 0. This returns a dummyInst (which may work
since we are trying to squash all instructions, but hardly seems like the right
way to do it).
In rob_impl.hh this fix skips the rest of the function more frequently and is
more efficient.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Marco Elver [Sat, 19 Apr 2014 14:00:30 +0000 (09:00 -0500)]
ruby: recorder: Fix (de-)serializing with different cache block-sizes
Upon aggregating records, serialize system's cache-block size, as the
cache-block size can be different when restoring from a checkpoint. This way,
we can correctly read all records when restoring from a checkpoints, even if
the cache-block size is different.
Note, that it is only possible to restore from a checkpoint if the
desired cache-block size is smaller or equal to the cache-block size
when the checkpoint was taken; we can split one larger request into
multiple small ones, but it is not reliable to do the opposite.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Sat, 19 Apr 2014 14:00:30 +0000 (09:00 -0500)]
config: ruby: remove memory controller from network test
It is not in use and not required as such.
Anthony Gutierrez [Mon, 14 Apr 2014 23:30:24 +0000 (19:30 -0400)]
arm: set default kernels for VExpress_EMM and VExpress_EMM64
Andreas Hansson [Sun, 13 Apr 2014 14:07:55 +0000 (10:07 -0400)]
scons: Fix python-config parsing by adding strip()
This patch fixes an issue with the way the python-config path is
parsed, as it caused issues on systems where a newline ended up being
included in the path.
Gedare Bloom [Thu, 10 Apr 2014 18:43:33 +0000 (13:43 -0500)]
config: add num-work-ids command line option
Adds the parameter --num-work-ids to Options.py and reads the parameter
into the System params in Simulation.py. This parameter enables setting
the number of possible work items to different than 16. Support for this
parameter already exists in src/sim/System.py, so this changeset only
affects the Python config files.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Stian Hvatum [Thu, 10 Apr 2014 18:40:15 +0000 (13:40 -0500)]
scons: compile on systems where python2 and python3 co-exist
Compile gem5 on systems where python2 and python3 co-exists without any
changes in path. python2-config is chosen over python-config if it exists.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Andreas Sandberg [Wed, 9 Apr 2014 14:01:58 +0000 (16:01 +0200)]
kvm, x86: Add initial support for multicore simulation
Simulating a SMP or multicore requires devices to be shared between
multiple KVM vCPUs. This means that locking is required when accessing
devices. This changeset adds the necessary locking to allow devices to
execute correctly. It is implemented by temporarily migrating the KVM
CPU to the VM's (and devices) event queue when handling
MMIO. Similarly, the VM migrates to the interrupt controller's event
queue when delivering an interrupt.
The support for fast-forwarding of multicore simulations added by this
changeset assumes that all devices in a system are simulated in the
same thread and each vCPU has its own thread. Special care must be
taken to ensure that devices living under the CPU in the object
hierarchy (e.g., the interrupt controller) do not inherit the parent
CPUs thread and are assigned to device thread. The KvmVM object is
assumed to live in the same thread as the other devices in the system.
Andreas Sandberg [Wed, 9 Apr 2014 14:01:43 +0000 (16:01 +0200)]
dev: Protect PollEvent processing when running in parallel mode
The calling thread is undefined when the PollQueue services events.
This implies that PollEvents need to handle the case where they are
processed from a different thread than the thread that created the
event. This changeset adds temporary event queue migrations to the VNC
server, the ethernet tap device, and the terminal to protect them from
inter-thread calls.
Nilay Vaish [Tue, 8 Apr 2014 18:26:30 +0000 (13:26 -0500)]
ruby: slicc: change enqueue statement
As of now, the enqueue statement can take in any number of 'pairs' as
argument. But we only use the pair in which latency is the key. This
latency is allowed to be either a fixed integer or a member variable of
controller in which the expression appears. This patch drops the use of pairs
in an enqueue statement. Instead, an expression is allowed which will be
interpreted to be the latency of the enqueue. This expression can anything
allowed by slicc including a constant integer or a member variable.
Nilay Vaish [Tue, 8 Apr 2014 18:26:29 +0000 (13:26 -0500)]
ruby: coherence protocols: drop the phrase IntraChip
The phrase is no longer valid since we do not distinguish between
inter and intra chip communication.
Andreas Sandberg [Thu, 3 Apr 2014 09:22:49 +0000 (11:22 +0200)]
sim: Add the ability to lock and migrate between event queues
We need the ability to lock event queues to enable device accesses
across threads. The serviceOne() method now takes a service lock prior
to handling a new event. By locking an event queue, a different
thread/eq can effectively execute in the context of the locked event
queue. To simplify temporary event queue migrations, this changeset
introduces the EventQueue::ScopedMigration class that unlocks the
current event queue, locks a new event queue, and updates the current
event queue variable.
In order to prevent deadlocks, event queues need to be released when
waiting on barriers. This is implemented using the
EventQueue::ScopedRelease class. An instance of this class is, for
example, used in the BaseGlobalEvent class to release the event queue
when waiting on the synchronization barrier.
The intended use for this functionality is when devices need to be
accessed across thread boundaries. For example, when fast-forwarding,
it might be useful to run devices and CPUs in separate threads. In
such a case, the CPU locks the device queue whenever it needs to
perform IO. This functionality is primarily intended for KVM.
Note: Migrating between event queues can lead to non-deterministic
timing. Use with extreme care!
--HG--
extra : rebase_source :
23e3a741a1fd73861d1339782dbbe1bc76285315
Anthony Gutierrez [Tue, 1 Apr 2014 16:44:30 +0000 (12:44 -0400)]
ext: add McPAT source
this patch adds the source for mcpat, a power, area, and timing modeling
framework.
Anthony Gutierrez [Tue, 1 Apr 2014 16:35:31 +0000 (12:35 -0400)]
arm: fix typos in makefile for ARM m5 util and link statically
1) fixes a typo for clean target libgemOpJni.so -> libgem5OpJni.so
2) addes jni_gem5Op.h to clean since it is added during make
3) links the m5 utility statically since it won't work on some images otherwise
Nilay Vaish [Tue, 1 Apr 2014 16:17:46 +0000 (11:17 -0500)]
configs: use SimpleMemory when using ruby in se mode
A recent changeset altered the default memory class to DRAMCtrl. In se mode,
ruby uses the physical memory to check if a given address is within the bounds
of the physical memory. SimpleMemory is enough for this. Moreover,
SimpleMemory does not check whether it is connected or not, something which
DRAMCtrl does.
Marco Elver [Tue, 25 Mar 2014 18:15:04 +0000 (13:15 -0500)]
cpu: o3: lsq: Fix TSO implementation
This patch fixes violation of TSO in the O3CPU, as all loads must be
ordered with all other loads. In the LQ, if a snoop is observed, all
subsequent loads need to be squashed if the system is TSO.
Prior to this patch, the following case could be violated:
P0 | P1 ;
MOV [x],mail=/usr/spool/mail/nilay | MOV EAX,[y] ;
MOV [y],mail=/usr/spool/mail/nilay | MOV EBX,[x] ;
exists (1:EAX=1 /\ 1:EBX=0) [is a violation]
The problem was found using litmus [http://diy.inria.fr].
Committed by: Nilay Vaish <nilay@cs.wisc.edu
Andreas Hansson [Sun, 23 Mar 2014 15:12:19 +0000 (11:12 -0400)]
stats: Update stats for DRAM changes
This patch updates the stats to reflect the changes to the DRAM
controller.
Andreas Hansson [Sun, 23 Mar 2014 15:12:14 +0000 (11:12 -0400)]
mem: Track DRAM read/write switching and add hysteresis
This patch adds stats for tracking the number of reads/writes per bus
turn around, and also adds hysteresis to the write-to-read switching
to ensure that the queue does not oscilate around the low threshold.
Andreas Hansson [Sun, 23 Mar 2014 15:12:12 +0000 (11:12 -0400)]
mem: Rename SimpleDRAM to a more suitable DRAMCtrl
This patch renames the not-so-simple SimpleDRAM to a more suitable
DRAMCtrl. The name change is intended to ensure that we do not send
the wrong message (although the "simple" in SimpleDRAM was originally
intended as in cleverly simple, or elegant).
As the DRAM controller modelling work is being presented at ISPASS'14
our hope is that a broader audience will use the model in the future.
--HG--
rename : src/mem/SimpleDRAM.py => src/mem/DRAMCtrl.py
rename : src/mem/simple_dram.cc => src/mem/dram_ctrl.cc
rename : src/mem/simple_dram.hh => src/mem/dram_ctrl.hh
Andreas Hansson [Sun, 23 Mar 2014 15:12:10 +0000 (11:12 -0400)]
mem: Change memory defaults to be more representative
Make the default memory type DDR3-1600 x64, and use the open-adaptive
page policy. This change is aiming to ensure that users by default are
using a realistic memory system.
Wendy Elsasser [Sun, 23 Mar 2014 15:12:08 +0000 (11:12 -0400)]
mem: Add close adaptive paging policy to DRAM controller model
This patch adds a second adaptive page policy to the DRAM controller,
closing the page unless there are already queued accesses to the open
page.
Andreas Hansson [Sun, 23 Mar 2014 15:12:06 +0000 (11:12 -0400)]
mem: DRAM controller tidying up
Minor tidying up and removing of redundant code, including the
printing of queue state every million accesses.
Andreas Hansson [Sun, 23 Mar 2014 15:12:05 +0000 (11:12 -0400)]
mem: Fix bug in DRAM bytes per activate
This patch ensures that we do not sample the bytes per activate when
the row has already been closed.
Andreas Hansson [Sun, 23 Mar 2014 15:12:03 +0000 (11:12 -0400)]
mem: Limit the accesses to a page before forcing a precharge
This patch adds a basic starvation-prevention mechanism where a DRAM
page is forced to close after a certain number of accesses. The limit
is combined with the open and open-adaptive page policy and if reached
causes an auto-precharge.
Andreas Hansson [Sun, 23 Mar 2014 15:12:01 +0000 (11:12 -0400)]
mem: Make DRAM write queue draining more aggressive
This patch changes the triggering condition for the write draining
such that we grab the opportunity to issue writes if there are no
reads waiting (as opposed to waiting for the writes to reach the high
threshold). As a result, we potentially drain some of the writes in read
idle periods (if any).
A low threshold is added to be able to control how many write bursts
are kept in the memory controller queue (acting as on-chip storage).
The high and low thresholds are updated to sensible values for a 32/64
size write buffer. Note that the thresholds should be adjusted along
with the queue sizes.
This patch also adds some basic initialisation sanity checks and moves
part of the initialisation to the constructor.
Andreas Hansson [Sun, 23 Mar 2014 15:12:00 +0000 (11:12 -0400)]
config: Add a DRAM efficiency-sweep script
This patch adds a configuration that simplifies evaluation of DRAM
controller configurations by automating a sweep of stride size and
bank parallelism. It works in a rather unconventional way, as it needs
to print the traffic generator stimuli based on the memory
organisation. Hence, it starts by configuring the memory, then it
prints a traffic-generator config file, and loads it.
The resulting stats have one period per data point, identified by the
stride size, and the number of banks being used.
Neha Agarwal [Sun, 23 Mar 2014 15:11:58 +0000 (11:11 -0400)]
cpu: DRAM Traffic Generator
This patch enables a new 'DRAM' mode to the existing traffic
generator, catered to generate specific requests to DRAM based on
required hit length (stride size) and bank utilization. It is an add on
to the Random mode.
The basic idea is to control how many successive packets target the
same page, and how many banks are being used in parallel. This gives a
two-dimensional space that stresses different aspects of the DRAM
timing.
The configuration file needed to use this patch has to be changed as
follow: (reference to Random Mode, LPDDR3 memory type)
'STATE 0
10000000000 RANDOM 50 0
134217728 64 3004 5002 0'
-> 'STATE 0
10000000000 DRAM 50 0
134217728 32 3004 5002 0 96 1024 8 6 1'
The last 4 parameters to be added are:
<stride size (bytes), page size(bytes), number of banks available in DRAM,
number of banks to be utilized, address mapping scheme>
The address mapping information is used to get the stride address
stream of the specified size and to know where to find the bank
bits. The configuration file has a parameter where '0'-> RoCoRaBaCh,
'1'-> RoRaBaCoCh/RoRaBaChCo address-mapping schemes. Note that the
generator currently assumes a single channel and a single rank. This
is to avoid overwhelming the traffic generator with information about
the memory organisation.
Neha Agarwal [Sun, 23 Mar 2014 15:11:56 +0000 (11:11 -0400)]
mem: DDR3 config for comparing with DRAMSim2
This patch adds a new DDR3 configuration to match with the parameters
that are specified in one of the DDR3 configs used in DRAMSim2.
Andreas Hansson [Sun, 23 Mar 2014 15:11:53 +0000 (11:11 -0400)]
mem: More descriptive address-mapping scheme names
This patch adds the row bits to the name of the address mapping
schemes to make it more clear that all the current schemes places the
row bits as the most significant bits.
Curtis Dunham [Sun, 23 Mar 2014 15:11:51 +0000 (11:11 -0400)]
scons: Shush scons
make 'scons -s' actually silent.
Stan Czerniawski [Sun, 23 Mar 2014 15:11:49 +0000 (11:11 -0400)]
misc: Fix -q (quiet) flag
Check the right flag.
Andreas Hansson [Sun, 23 Mar 2014 15:11:48 +0000 (11:11 -0400)]
ruby: Move Ruby debug flags to ruby dir and remove stale options
This patch moves the Ruby-related debug flags to the ruby
sub-directory, and also removes the state SConsopts that add the
no-longer-used NO_VECTOR_BOUNDS_CHECK.
Andreas Hansson [Sun, 23 Mar 2014 15:11:46 +0000 (11:11 -0400)]
util: Add support for detection of gzipped packet traces
This patch adds support for automatically detecting a gzipped packet
trace, thus accepting either a compressed or uncompressed trace.
Andreas Hansson [Sun, 23 Mar 2014 15:11:44 +0000 (11:11 -0400)]
mem: Include the DRAMSim2 wrapper in NULL build
This patch makes sure DRAMSim2 is included in a build of the NULL ISA.
Andreas Hansson [Sun, 23 Mar 2014 15:11:42 +0000 (11:11 -0400)]
ext: Fix typo in DRAMSim2 SConscript
This patch fixes a typo in the SConscript which caused the DRAMSim2
sources to be built without the appropriate flags.
Sascha Bischoff [Sun, 23 Mar 2014 15:11:40 +0000 (11:11 -0400)]
mem: CommMonitor trace warn on non-timing mode
Add a warning to the CommMonitor which will alert the user if they try
and record a trace when the system is not in timing mode.
Stan Czerniawski [Sun, 23 Mar 2014 15:11:39 +0000 (11:11 -0400)]
cpu: Add basic check to TrafficGen initial state
Prevent incomplete configuration of TrafficGen class from causing
segmentation faults. If an 'INIT' line is not present in the
configuration file then the currState variable will remain
uninitialized which may result in a crash.
Andrew Bardsley [Sun, 23 Mar 2014 15:11:37 +0000 (11:11 -0400)]
dev: Fix IsaFake's cxx_header setting
cxx_header was set incorrectly on IsaFake
Eric Van Hensbergen [Sun, 23 Mar 2014 15:11:34 +0000 (11:11 -0400)]
arm: m5ops readfile64 args broken, offset coming through garbage
There were several sections of the m5ops code which were
essentially copy/pasted versions of the 32-bit code. The
problem is that some of these didn't account fo4 64-bit
registers leading to arguments being in the wrong registers.
This patch addresses the args for readfile64, writefile64,
and addsymbol64 -- all of which seemed to suffer from a
similar set of problems when moving to 64-bit.
Andreas Hansson [Sun, 23 Mar 2014 15:11:32 +0000 (11:11 -0400)]
base: Fix error message time unit (cycle -> tick)
This patch fixes the unit used in all error messages.
Nilay Vaish [Thu, 20 Mar 2014 14:16:35 +0000 (09:16 -0500)]
stats: updates due to changes to ruby config scripts
These updates to ruby regression stats are due to renaming piobus to iobus
and dropping piobus in the se mode.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: consumer: avoid accessing wakeup times when waking up
Each consumer object maintains a set of tick values when the object is supposed
to wakeup and do some processing. As of now, the object accesses this set both
when scheduling a wakeup event and when the object actually wakes up. The set
is accessed during wakeup to remove the current tick value from the set. This
functionality is now being moved to the scheduling function where ticks are
removed at a later time.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: garnet: convert network interfaces into clocked objects
This helps in configuring the network interfaces from the python script and
these objects no longer rely on the network object for the timing information.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: slicc: code refactor
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
config: ruby: rename _cpu_ruby_ports to _cpu_ports
Nilay Vaish [Thu, 20 Mar 2014 14:14:08 +0000 (09:14 -0500)]
config: fs.py: move creating of test/drive systems to functions
The code that creates test and drive systems is being moved to separate
functions so as to make the code more readable. Ultimately the two
functions would be combined so that the replicated code is eliminated.
Nilay Vaish [Thu, 20 Mar 2014 13:03:09 +0000 (08:03 -0500)]
config: remove ruby_fs.py
The patch removes the ruby_fs.py file. The functionality is being moved to
fs.py. This would being ruby fs simulations in line with how ruby se
simulations are started (using --ruby option). The alpha fs config functions
are being combined for classing and ruby memory systems. This required
renaming the piobus in ruby to iobus. So, we will have stats being renamed
in the stats file for ruby fs regression.
Nilay Vaish [Thu, 20 Mar 2014 13:03:09 +0000 (08:03 -0500)]
ruby: no piobus in se mode
Piobus was recently added to se scripts for ruby so that the interrupt
controller can be connected to something (required since the interrupt
controller sends address range messages). This patch removes the piobus
and instead, the pio port of ruby port will now ignore the range change
messages in se mode.
Nilay Vaish [Mon, 17 Mar 2014 22:40:15 +0000 (17:40 -0500)]
config: ruby: remove piobus from protocols
This patch removes the piobus from the protocol config files. The ports
are now connected to the piobus in the Ruby.py file.
Nilay Vaish [Mon, 17 Mar 2014 22:40:14 +0000 (17:40 -0500)]
ruby: remove some of the unnecessary code
Andreas Sandberg [Sun, 16 Mar 2014 16:40:58 +0000 (17:40 +0100)]
kvm: Clean up signal handling
KVM used to use two signals, one for instruction count exits and one
for timer exits. There is really no need to distinguish between the
two since they only trigger exits from KVM. This changeset unifies and
renames the signals and adds a method, kick(), that can be used to
raise the control signal in the vCPU thread. It also removes the early
timer warning since we do not normally see if the signal was
delivered.
--HG--
extra : rebase_source :
cd0e45ca90894c3d6f6aa115b9b06a1d8f0fda4d
Andreas Sandberg [Sun, 16 Mar 2014 16:30:24 +0000 (17:30 +0100)]
kvm: x86: Adjust PC to remove the CS segment base address
gem5 seems to store the PC as RIP+CS_BASE. This is not what KVM
expects, so we need to subtract CS_BASE prior to transferring the PC
into KVM. This changeset adds the necessary PC manipulation and
refactors thread context updates slightly to avoid reading registers
multiple times from KVM.
--HG--
extra : rebase_source :
3f0569dca06a1fcd8694925f75c8918d954ada44
Andreas Sandberg [Sun, 16 Mar 2014 16:28:23 +0000 (17:28 +0100)]
kvm: x86: Add support for x86 INIT and STARTUP handling
This changeset adds support for INIT and STARTUP IPI handling. We
currently handle both of these interrupts in gem5 and transfer the
state to KVM. Since we do not have a BIOS loaded, we pretend that the
INIT interrupt suspends the CPU after reset.
--HG--
extra : rebase_source :
7f3b25f3801d68f668b6cd91eaf50d6f48ee2a6a
Paul Rosenfeld [Wed, 12 Mar 2014 12:03:22 +0000 (07:03 -0500)]
alpha: Small removal of dead comments/code from alpha ISA
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Andreas Hansson [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
cpu: Make CPU and ThreadContext getters const
This patch merely tidies up the CPU and ThreadContext getters by
making them const where appropriate.
Geoffrey Blake [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
arm: Handle functional TLB walks properly
The table walker code currently accounts for two types of walks,
Atomic and Timing, and treats them differently. Atomic walks keep a
single instance of WalkerState around for all walks to use in
currState. Timing mode keeps a queue of in-flight WalkerStates and
maintains currState as NULL between walks.
If a functional walk is done during Timing mode, it is treated as an
atomic walk and either creates a persistent WalkerState if in between
Timing walks, or stomps an existing currState for an in-progress
Timing walk.
This patch distinguishes functional walks as being able to exist at
any time and sets up a temporary WalkerState for its exclusive use and
then cleans up when finished, leaving any in progress Atomic or Timing
walks undisturbed.
Prakash Ramrakhyani [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Fix incorrect assert failure in the Cache
This patch fixes an assert condition that is not true at all
times. There are valid situations that arise in dual-core
dual-workload runs where the assert condition is false. The function
call following the assert however needs to be called only when the
condition is true (a block cannot be invalidated in the tags structure
if has not been allocated in the structure, and the tempBlock is never
allocated). Hence the 'assert' has been replaced with an 'if'.
Radhika Jagtap [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Edit proto Packet and enhance the python script
This patch changes the decode script to output the optional fields of
the proto message Packet, namely id and flags. The flags field is set
by the communication monitor.
The id field is useful for CPU trace experiments, e.g. linking the
fetch side to decode side. It had to be renamed because it clashes
with a built in python function id() for getting the "identity" of an
object.
This patch also takes a few common function definitions out from the
multiple scripts and adds them to a protolib python module.
Mitch Hayenga [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
scons: Fix clang version identification for OSX
The version string may have additional trailing information
Stephan Diestelhorst [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
misc: Add panic_if / fatal_if / chatty_assert
This snippet can be used to replace if + {panics, fatals, asserts} constructs.
The idea is to have both the condition checking and a verbose printout in a single statement. The interface is as follows:
panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
fatal_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
chatty_assert(foo == bar, "These should be equal: foo %i bar %i", foo, bar);
Mitch Hayenga [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
scons: Fixes uninitialized warnings issued by clang
Small fixes to appease recent clang versions.
Stephan Diestelhorst [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
arm: Fix uninitialised warning with gcc 4.8
Small fix for a warning that prevents compilation with gcc 4.8.1 due
to detecting that a variable might be uninitialised. The fix is to
assign a safe default.
Ali Saidi [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Wakeup sleeping CPUs without caches on LLSC
For systems without caches, the LLSC code does not get snoops for
wake-ups. We add the LLSC code in the abstract memory to do the job
for us.
Andreas Sandberg [Thu, 6 Mar 2014 14:59:53 +0000 (15:59 +0100)]
sim: Schedule the global sync event at curTick() + simQuantum
The global synchronization event used to be scheduled at
simQuantum. This prevented repeated entries into gem5 from Python as
it can be scheduled in the past. This changeset ensures that the first
global synchronization happens at curTick() + simQuantum instead.
Andreas Sandberg [Mon, 3 Mar 2014 13:44:57 +0000 (14:44 +0100)]
x86: Setup correct TSL/TR segment attributes on INIT
The TSL/LDT & TR/TSS segments didn't contain valid attributes. This
caused problems when transfering the state into KVM where invalid
state is a no-go. Fixup the attributes with values from AMD's
architecture programmer's manual.
Andreas Sandberg [Mon, 3 Mar 2014 13:34:33 +0000 (14:34 +0100)]
kvm: x86: Always assume segments to be usable
When transferring segment registers into kvm, we need to find the
value of the unusable bit. We used to assume that this could be
inferred from the selector since segments are generally unusable if
their selector is 0. This assumption breaks in some weird corner
cases. Instead, we just assume that segments are always usable. This
is what qemu does so it should work.
Andreas Sandberg [Mon, 3 Mar 2014 13:31:39 +0000 (14:31 +0100)]
kvm: Initialize signal handlers from startupThread()
Signal handlers in KVM are controlled per thread and should be
initialized from the thread that is going to execute the CPU. This
changeset moves the initialization call from startup() to
startupThread().
Nilay Vaish [Sun, 2 Mar 2014 05:59:58 +0000 (23:59 -0600)]
ruby: message buffer: changes related to tracking push/pop times
The last pop operation is now tracked as a Tick instead of in Cycles.
This helps in avoiding use of the receiver's clock during the enqueue
operation.
Nilay Vaish [Sun, 2 Mar 2014 05:59:57 +0000 (23:59 -0600)]
ruby: make the max_size variable of the MessageBuffer unsigned
Christopher Torng [Sun, 2 Mar 2014 05:35:23 +0000 (23:35 -0600)]
cpu: Enable fast-forwarding for MIPS InOrderCPU and O3CPU
A copyRegs() function is added to MIPS utilities
to copy architectural state from the old CPU to
the new CPU during fast-forwarding. This
addition alone enables fast-forwarding for the
o3 cpu model running MIPS.
The patch also adds takeOverFrom() and
drainResume() functions to the InOrderCPU to
enable it to take over from another CPU. This
change enables fast-forwarding for the inorder
cpu model running MIPS, but not for Alpha.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Sun, 2 Mar 2014 05:35:21 +0000 (23:35 -0600)]
ruby: profiler: statically allocate stats variable
Couple of users observed segmentation fault when the simulator tries to
register the statistical variable m_IncompleteTimes. It seems that there
is some problem with the initialization of these variables when allocated
in the constructor.
Nilay Vaish [Tue, 25 Feb 2014 02:50:06 +0000 (20:50 -0600)]
stats: updates due to
c0db268f811b
Nilay Vaish [Tue, 25 Feb 2014 02:50:05 +0000 (20:50 -0600)]
ruby: correct errors in changeset
4eec7bdde5b0
Couple of errors were discovered in
4eec7bdde5b0 which necessitated this patch.
Firstly, we create interrupt controllers in the se mode, but no piobus was
being created. RubyPort, which earlier used to ignore range changes now
forwards those to the piobus. The lack of piobus resulted in segmentation
fault. This patch creates a piobus even in se mode. It is not created only
when some tester is running. Secondly, I had missed out on modifying port
connections for other coherence protocols.
Nilay Vaish [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
stats: updates due to changes to ruby pio access handling
Nilay Vaish [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
ruby: route all packets through ruby port
Currently, the interrupt controller in x86 is connected to the io bus
directly. Therefore the packets between the io devices and the interrupt
controller do not go through ruby. This patch changes ruby port so that
these packets arrive at the ruby port first, which then routes them to their
destination. Note that the patch does not make these packets go through the
ruby network. That would happen in a subsequent patch.
Andreas Hansson [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
ruby: Simplify RubyPort flow control and routing
This patch simplfies the retry logic in the RubyPort, avoiding
redundant attributes, and enforcing more stringent checks on the
interactions with the normal ports. The patch also simplifies the
routing done by the RubyPort, using the port identifiers instead of a
heavy-weight sender state.
The patch also fixes a bug in the sending of responses from PIO
ports. Previously these responses bypassed the queue in the queued
port, and ignored the return value, potentially leading to response
packets being lost.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
config: topologies: slight code refactor
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: message buffer: refactor code
Code in two of the functions was exactly the same. This patch moves
this code to a new function which is called from the two functions
mentioned initially.
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: remove few not required #includes
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: slicc: remove unused COPY_HEAD functionality
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: protocols: remove unused action z_stall
Nilay Vaish [Fri, 21 Feb 2014 14:02:06 +0000 (08:02 -0600)]
config: ruby_random_test: updates due to recent unrelated changes
Nilay Vaish [Fri, 21 Feb 2014 14:02:05 +0000 (08:02 -0600)]
ruby: network: move message buffers to base network class.
Nilay Vaish [Fri, 21 Feb 2014 14:02:04 +0000 (08:02 -0600)]
ruby: network: garnet: fixed: removes net_ptr from links
Nilay Vaish [Fri, 21 Feb 2014 14:02:02 +0000 (08:02 -0600)]
ruby: cache: remove not required variable m_cache_name
Nilay Vaish [Thu, 20 Feb 2014 23:28:01 +0000 (17:28 -0600)]
ruby: network: garnet: fixed: removes next cycle functions
At several places, there are functions that take a cycle value as input
and performs some computation. Along with each such function, another
function was being defined that simply added one more cycle to input and
computed the same function. This patch removes this second copy of the
function. Places where these functions were being called have been updated
to use the original function with argument being current cycle + 1.
Nilay Vaish [Thu, 20 Feb 2014 23:27:45 +0000 (17:27 -0600)]
ruby: controller: slight code refactoring
Nilay Vaish [Thu, 20 Feb 2014 23:27:17 +0000 (17:27 -0600)]
ruby: mesi three level: rename incorrectly named files
Two files had been incorrectly named with a .cache suffix.
--HG--
rename : src/mem/protocol/MESI_Three_Level-L0.cache => src/mem/protocol/MESI_Three_Level-L0cache.sm
rename : src/mem/protocol/MESI_Three_Level-L1.cache => src/mem/protocol/MESI_Three_Level-L1cache.sm
Nilay Vaish [Thu, 20 Feb 2014 23:27:07 +0000 (17:27 -0600)]
ruby: network: removes unused code.
Nilay Vaish [Thu, 20 Feb 2014 23:26:49 +0000 (17:26 -0600)]
ruby: slicc: slight code refactoring