gem5.git
10 years agocpu: Dynamically instantiate O3 CPU LSQUnits
Joel Hestness [Wed, 11 Sep 2013 20:34:50 +0000 (15:34 -0500)]
cpu: Dynamically instantiate O3 CPU LSQUnits

Previously, the LSQ would instantiate MaxThreads LSQUnits in the body of it's
object, but it would only initialize numThreads LSQUnits as specified by the
user. This had the effect of leaving some LSQUnits uninitialized when the
number of threads was less than MaxThreads, and when adding statistics to the
LSQUnit that must be initialized, this caused the stats initialization check to
fail. By dynamically instantiating LSQUnits, they are all initialized and this
avoids uninitialized LSQUnits from floating around during runtime.

10 years agoconfig: Initialize and check cpt_starttick
Joel Hestness [Wed, 11 Sep 2013 20:34:21 +0000 (15:34 -0500)]
config: Initialize and check cpt_starttick

The previous changeset (9816) that fixes the use of max ticks introduced the
variable cpt_starttick, which is used for setting the relative max tick.
Unfortunately, with checkpointing at an instruction count or with simpoints,
the checkpoint tick is not stored conveniently, so to ensure that cpt_starttick
is initialized, set it to 0. Also, if using --rel-max-tick, check the use of
instruction counts or simpoints to warn the user that the max tick setting does
not include the checkpoint ticks.

10 years agoruby: Statically allocate stats in SimpleNetwork, Switch, Throttle
Joel Hestness [Wed, 11 Sep 2013 20:33:27 +0000 (15:33 -0500)]
ruby: Statically allocate stats in SimpleNetwork, Switch, Throttle

The previous changeset (9863:9483739f83ee) used STL vector containers to
dynamically allocate stats in the Ruby SimpleNetwork, Switch and Throttle. For
gcc versions before at least 4.6.3, this causes the standard vector allocator
to call Stats copy constructors (a no-no, since stats should be allocated in
the body of each SimObject instance). Since the size of these stats arrays is
known at compile time (NOTE: after code generation), this patch changes their
allocation to be static rather than using an STL vector.

10 years agostats: add operator= for DataWrapVec class
Nilay Vaish [Mon, 9 Sep 2013 23:52:23 +0000 (18:52 -0500)]
stats: add operator= for DataWrapVec class

gcc/g++ 4.4.7 complained about the operator= being undefined.
This changeset adds the operator.

10 years agostats: ruby: updates due to recent changes.
Nilay Vaish [Fri, 6 Sep 2013 21:21:36 +0000 (16:21 -0500)]
stats: ruby: updates due to recent changes.

10 years agoruby: network: convert to gem5 style stats
Nilay Vaish [Fri, 6 Sep 2013 21:21:35 +0000 (16:21 -0500)]
ruby: network: convert to gem5 style stats

10 years agoruby: network: correct naming of routers
Nilay Vaish [Fri, 6 Sep 2013 21:21:33 +0000 (16:21 -0500)]
ruby: network: correct naming of routers

The routers are created before the network class. This results in the routers
becoming children of the first link they are connected to and they get generic
names like int_node and node_b. This patch creates the network object first
and passes it to the topology creation function. Now the routers are children
of the network object and names are much more sensible.

10 years agoruby: profiler: removes function resourceUsage()
Nilay Vaish [Fri, 6 Sep 2013 21:21:32 +0000 (16:21 -0500)]
ruby: profiler: removes function resourceUsage()

10 years agoruby: remove undefined message size type
Nilay Vaish [Fri, 6 Sep 2013 21:21:30 +0000 (16:21 -0500)]
ruby: remove undefined message size type
This message size type does not work well with one of the statistical
variables. It also seems unnecessary.

10 years agoruby: network: removes reset functionality
Nilay Vaish [Fri, 6 Sep 2013 21:21:30 +0000 (16:21 -0500)]
ruby: network: removes reset functionality

10 years agoruby: network: shorten variable names
Nilay Vaish [Fri, 6 Sep 2013 21:21:29 +0000 (16:21 -0500)]
ruby: network: shorten variable names

10 years agostats: adds a Formula operator for division
Nilay Vaish [Fri, 6 Sep 2013 21:21:29 +0000 (16:21 -0500)]
stats: adds a Formula operator for division

10 years agoruby: converts sparse memory stats to gem5 style
Nilay Vaish [Fri, 6 Sep 2013 21:21:28 +0000 (16:21 -0500)]
ruby: converts sparse memory stats to gem5 style

10 years agosim: Fix clang warning for unused variable
Andreas Hansson [Thu, 5 Sep 2013 17:53:54 +0000 (13:53 -0400)]
sim: Fix clang warning for unused variable

This patch ensures the NULL ISA can build without causing issues with
an unused variable.

10 years agoutil: Add ini string as tooltip info in dot output
Andreas Hansson [Wed, 4 Sep 2013 17:23:00 +0000 (13:23 -0400)]
util: Add ini string as tooltip info in dot output

This patch adds the config ini string as a tooltip that can be
displayed in most browsers rendering the resulting svg. Certain
characters are modified for HTML output.

Tested on chrome and firefox.

10 years agoutil: Add colours to the dot output
Andreas Hansson [Wed, 4 Sep 2013 17:22:59 +0000 (13:22 -0400)]
util: Add colours to the dot output

This patch is adding a splash of colour to the dot output to make it
easier to distinguish objects of different types. As a bonus, the
pastel-colour palette also makes the output look like a something from
the 21st century.

10 years agoutil: Add class name to dot graph and output to svg
Andreas Hansson [Wed, 4 Sep 2013 17:22:58 +0000 (13:22 -0400)]
util: Add class name to dot graph and output to svg

This patch adds the class name to the label, creates some more space
by increasing the rank separation, and additionally outputs the graph
as an editable SVG in addition to the PDF.

10 years agotests: Move ISA-independent tests to the NULL ISA
Andreas Hansson [Wed, 4 Sep 2013 17:22:57 +0000 (13:22 -0400)]
tests: Move ISA-independent tests to the NULL ISA

This patch simply takes a first step to use the NULL ISA build for
tests that do not make use of a CPU. Most of the Ruby tests could go
the same way, but to avoid duplicating a lot of compilation targets
that will have to wait until Ruby is built as a library and linked in
independently.

--HG--
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest/config.ini => tests/quick/se/50.memtest/ref/null/none/memtest/config.ini
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest/simerr => tests/quick/se/50.memtest/ref/null/none/memtest/simerr
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest/simout => tests/quick/se/50.memtest/ref/null/none/memtest/simout
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest/stats.txt => tests/quick/se/50.memtest/ref/null/none/memtest/stats.txt
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-dram/simerr => tests/quick/se/70.tgen/ref/null/none/tgen-simple-dram/simerr
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-dram/simout => tests/quick/se/70.tgen/ref/null/none/tgen-simple-dram/simout
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-dram/stats.txt => tests/quick/se/70.tgen/ref/null/none/tgen-simple-dram/stats.txt
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-mem/simerr => tests/quick/se/70.tgen/ref/null/none/tgen-simple-mem/simerr
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-mem/simout => tests/quick/se/70.tgen/ref/null/none/tgen-simple-mem/simout
rename : tests/quick/se/70.tgen/ref/arm/linux/tgen-simple-mem/stats.txt => tests/quick/se/70.tgen/ref/null/none/tgen-simple-mem/stats.txt

10 years agoarch: Resurrect the NOISA build target and rename it NULL
Andreas Hansson [Wed, 4 Sep 2013 17:22:57 +0000 (13:22 -0400)]
arch: Resurrect the NOISA build target and rename it NULL

This patch makes it possible to once again build gem5 without any
ISA. The main purpose is to enable work around the interconnect and
memory system without having to build any CPU models or device models.

The regress script is updated to include the NULL ISA target. Currently
no regressions make use of it, but all the testers could (and perhaps
should) transition to it.

--HG--
rename : build_opts/NOISA => build_opts/NULL
rename : src/arch/noisa/SConsopts => src/arch/null/SConsopts
rename : src/arch/noisa/cpu_dummy.hh => src/arch/null/cpu_dummy.hh
rename : src/cpu/intr_control.cc => src/cpu/intr_control_noisa.cc

10 years agocpu: Move the branch predictor out of the BaseCPU
Andreas Hansson [Wed, 4 Sep 2013 17:22:56 +0000 (13:22 -0400)]
cpu: Move the branch predictor out of the BaseCPU

The branch predictor is guarded by having either the in-order or
out-of-order CPU as one of the available CPU models and therefore
should not be used in the BaseCPU. This patch moves the parameter to
the relevant CPU classes.

10 years agoarch: Header clean up for NOISA resurrection
Andreas Hansson [Wed, 4 Sep 2013 17:22:55 +0000 (13:22 -0400)]
arch: Header clean up for NOISA resurrection

This patch is a first step to getting NOISA working again. A number of
redundant includes make life more difficult than it has to be and this
patch simply removes them. There are also some redundant forward
declarations removed.

10 years agoalpha: Move system virtProxy to Alpha only
Andreas Hansson [Wed, 4 Sep 2013 17:22:55 +0000 (13:22 -0400)]
alpha: Move system virtProxy to Alpha only

This patch moves the system virtual port proxy to the Alpha system
only to make the resurrection of the NOISA slightly less
painful. Alpha is the only ISA that is actually using it.

10 years agoscons: Enable build on OSX
Andreas Hansson [Wed, 4 Sep 2013 17:22:54 +0000 (13:22 -0400)]
scons: Enable build on OSX

This patch changes the SConscript to build gem5 with libc++ on OSX as
the conventional libstdc++ does not have the C++11 constructs that the
current code base makes use of (e.g. std::forward).

Since this was the last use of the transitional TR1, the unordered map
and set header can now be simplified as well.

10 years agoARM: Fix configuration files for bare-metal binaries.
Ali Saidi [Mon, 26 Aug 2013 15:58:06 +0000 (10:58 -0500)]
ARM: Fix configuration files for bare-metal binaries.

10 years agostats: update eio stats
Steve Reinhardt [Sat, 24 Aug 2013 16:03:10 +0000 (12:03 -0400)]
stats: update eio stats

10 years agoutil/regress: set --no-lto on regressions
Steve Reinhardt [Thu, 22 Aug 2013 00:31:08 +0000 (17:31 -0700)]
util/regress: set --no-lto on regressions

See comment for motivation.

10 years agostats: update ruby.stats, config.ini files for x86 fs test
Nilay Vaish [Tue, 20 Aug 2013 16:32:33 +0000 (11:32 -0500)]
stats: update ruby.stats, config.ini files for x86 fs test

10 years agoruby: add option for number of transitions per cycle
Nilay Vaish [Tue, 20 Aug 2013 16:32:31 +0000 (11:32 -0500)]
ruby: add option for number of transitions per cycle
The number of transitions per cycle that a controller can carry out is
a proxy for the number of ports that a controller has. This value is
currently 32 which is way too high. The patch introduces an option
for the number of ports and uses this option in the protocol files
to set the number of transitions. The default value is being set to
4. None of the se regressions change. Ruby stats for the fs regression
change and are being updated.

10 years agocpu: Fix timing CPU isDrained comment formatting
Andreas Hansson [Tue, 20 Aug 2013 15:21:27 +0000 (11:21 -0400)]
cpu: Fix timing CPU isDrained comment formatting

This patch fixes up the comment formatting for isDrained in the timing
CPU.

10 years agobase: Fix VectorPrint initialisation
Andreas Hansson [Tue, 20 Aug 2013 15:21:26 +0000 (11:21 -0400)]
base: Fix VectorPrint initialisation

This patch changes how the initialisation of the VectorPrint struct is
done so that gcc 4.4 is happy again.

11 years agostats: Cumulative stats update
Andreas Hansson [Mon, 19 Aug 2013 07:52:36 +0000 (03:52 -0400)]
stats: Cumulative stats update

This patch updates the stats to reflect the: 1) addition of the
internal queue in SimpleMemory, 2) moving of the memory class outside
FSConfig, 3) fixing up of the 2D vector printing format, 4) specifying
burst size and interface width for the DRAM instead of relying on
cache-line size, 5) performing merging in the DRAM controller write
buffer, and 6) fixing how idle cycles are counted in the atomic and
timing CPU models.

The main reason for bundling them up is to minimise the changeset
size.

11 years agocpu: Accurately count idle cycles for simple cpu
Lena Olson [Mon, 19 Aug 2013 07:52:35 +0000 (03:52 -0400)]
cpu: Accurately count idle cycles for simple cpu

Added a couple missing updates to the notIdleFraction stat. Without
these, it sometimes gives a (not) idle fraction that is greater than 1
or less than 0.

11 years agoconfig: Command line support for multi-channel memory
Andreas Hansson [Mon, 19 Aug 2013 07:52:34 +0000 (03:52 -0400)]
config: Command line support for multi-channel memory

This patch adds support for specifying multi-channel memory
configurations on the command line, e.g. 'se/fs.py
--mem-type=ddr3_1600_x64 --mem-channels=4'. To enable this, it
enhances the functionality of MemConfig and moves the existing
makeMultiChannel class method from SimpleDRAM to the support scripts.

The se/fs.py example scripts are updated to make use of the new
feature.

11 years agomem: Change AbstractMemory defaults to match the common case
Andreas Hansson [Mon, 19 Aug 2013 07:52:33 +0000 (03:52 -0400)]
mem: Change AbstractMemory defaults to match the common case

This patch changes the default parameter value of conf_table_reported
to match the common case. It also simplifies the regression and config
scripts to reflect this change.

11 years agocpu: Fix TrafficGen trace playback
Sascha Bischoff [Mon, 19 Aug 2013 07:52:32 +0000 (03:52 -0400)]
cpu: Fix TrafficGen trace playback

This patch addresses an issue with trace playback in the TrafficGen
where the trace was reset but the header was not read from the trace
when a captured trace was played back for a second time. This resulted
in parsing errors as the expected message was not found in the trace
file.

The header check is moved to an init funtion which is called by the
constructor and when the trace is reset. This ensures that the trace
header is read each time when the trace is replayed.

This patch also addresses a small formatting issue in a panic.

11 years agomem: Use STL deque in favour of list for DRAM queues
Andreas Hansson [Mon, 19 Aug 2013 07:52:32 +0000 (03:52 -0400)]
mem: Use STL deque in favour of list for DRAM queues

This patch changes the data structure used for the DRAM read, write
and response queues from an STL list to deque. This optimisation is
based on the observation that the size is small (and fixed), and that
the structures are frequently iterated over in a linear fashion.

11 years agomem: Perform write merging in the DRAM write queue
Andreas Hansson [Mon, 19 Aug 2013 07:52:31 +0000 (03:52 -0400)]
mem: Perform write merging in the DRAM write queue

This patch implements basic write merging in the DRAM to avoid
redundant bursts. When a new access is added to the queue it is
compared against the existing entries, and if it is either
intersecting or immediately succeeding/preceeding an existing item it
is merged.

There is currently no attempt made at avoiding iterating over the
existing items in determining whether merging is possible or not.

11 years agomem: Replacing bytesPerCacheLine with DRAM burstLength in SimpleDRAM
Amin Farmahini [Mon, 19 Aug 2013 07:52:30 +0000 (03:52 -0400)]
mem: Replacing bytesPerCacheLine with DRAM burstLength in SimpleDRAM

This patch gets rid of bytesPerCacheLine parameter and makes the DRAM
configuration separate from cache line size. Instead of
bytesPerCacheLine, we define a parameter for the DRAM called
burst_length. The burst_length parameter shows the length of a DRAM
device burst in bits. Also, lines_per_rowbuffer is replaced with
device_rowbuffer_size to improve code portablity.

This patch adds a burst length in beats for each memory type, an
interface width for each memory type, and the memory controller model
is extended to reason about "system" packets vs "dram" packets and
assemble the responses properly. It means that system packets larger
than a full burst are split into multiple dram packets.

11 years agocpu: Fix timing CPU drain check
Andreas Hansson [Mon, 19 Aug 2013 07:52:30 +0000 (03:52 -0400)]
cpu: Fix timing CPU drain check

This patch modifies the SimpleTimingCPU drain check to also consider
the fetch event. Previously, there was an assumption that there is
never a fetch event scheduled if the CPU is not executing
microcode. However, when a context is activated, a fetch even is
scheduled, and microPC() is zero.

11 years agoalpha: Check interrupts before quiesce
Andreas Hansson [Mon, 19 Aug 2013 07:52:29 +0000 (03:52 -0400)]
alpha: Check interrupts before quiesce

This patch adds a check to the quiesce operation to ensure that the
CPU does not suspend itself when there are unmasked interrupts
pending. Without this patch there are corner cases when the CPU gets
an interrupt before the quiesce is executed and then never wakes up
again.

11 years agostats: Fix issue when printing 2D vectors
Sascha Bischoff [Mon, 19 Aug 2013 07:52:29 +0000 (03:52 -0400)]
stats: Fix issue when printing 2D vectors

This patch addresses an issue with the text-based stats output which
resulted in Vector2D stats being printed without subnames in the event
that one of the dimensions was of length 1.

This patch also fixes the total printing for the 2D vector. Previously
totals were printed without explicitly stating that a total was being
printed. This has been rectified in this patch.

11 years agopower: Add voltage domains to the clock domains
Akash Bagdia [Mon, 19 Aug 2013 07:52:28 +0000 (03:52 -0400)]
power: Add voltage domains to the clock domains

This patch adds the notion of voltage domains, and groups clock
domains that operate under the same voltage (i.e. power supply) into
domains. Each clock domain is required to be associated with a voltage
domain, and the latter requires the voltage to be explicitly set.

A voltage domain is an independently controllable voltage supply being
provided to section of the design. Thus, if you wish to perform
dynamic voltage scaling on a CPU, its clock domain should be
associated with a separate voltage domain.

The current implementation of the voltage domain does not take into
consideration cases where there are derived voltage domains running at
ratio of native voltage domains, as with the case where there can be
on-chip buck/boost (charge pumps) voltage regulation logic.

The regression and configuration scripts are updated with a generic
voltage domain for the system, and one for the CPUs.

11 years agoconfig: Move the memory instantiation outside FSConfig
Andreas Hansson [Mon, 19 Aug 2013 07:52:27 +0000 (03:52 -0400)]
config: Move the memory instantiation outside FSConfig

This patch moves the instantiation of the memory controller outside
FSConfig and instead relies on the mem_ranges to pass the information
to the caller (e.g. fs.py or one of the regression scripts). The main
motivation for this change is to expose the structural composition of
the memory system and allow more tuning and configuration without
adding a large number of options to the makeSystem functions.

The patch updates the relevant example scripts to maintain the current
functionality. As the order that ports are connected to the memory bus
changes (in certain regresisons), some bus stats are shuffled
around. For example, what used to be layer 0 is now layer 1.

Going forward, options will be added to support the addition of
multi-channel memory controllers.

11 years agomem: Warn instead of panic for tXAW violation
Andreas Hansson [Mon, 19 Aug 2013 07:52:26 +0000 (03:52 -0400)]
mem: Warn instead of panic for tXAW violation

Until the performance bug is fixed, avoid killing simulations.

11 years agomem: Allow disabling of tXAW through a 0 activation limit
Andreas Hansson [Mon, 19 Aug 2013 07:52:26 +0000 (03:52 -0400)]
mem: Allow disabling of tXAW through a 0 activation limit

This patch fixes an issue where an activation limit of 0 was not
allowed. With this patch, setting the limit to 0 simply disables the
tXAW constraint.

11 years agomem: Add an internal packet queue in SimpleMemory
Andreas Hansson [Mon, 19 Aug 2013 07:52:25 +0000 (03:52 -0400)]
mem: Add an internal packet queue in SimpleMemory

This patch adds a packet queue in SimpleMemory to avoid using the
packet queue in the port (and thus have no involvement in the flow
control). The port queue was bound to 100 packets, and as the
SimpleMemory is modelling both a controller and an actual RAM, it
potentially has a large number of packets in flight. There is
currently no limit on the number of packets in the memory controller,
but this could easily be added in a follow-on patch.

As a result of the added internal storage, the functional access and
draining is updated. Some minor cleaning up and renaming has also been
done.

The memtest regression changes as a result of this patch and the stats
will be updated.

11 years agocpu: Fix a bug in the O3 CPU introduced by the cache line patch
Andreas Hansson [Mon, 19 Aug 2013 07:52:24 +0000 (03:52 -0400)]
cpu: Fix a bug in the O3 CPU introduced by the cache line patch

This patch fixes a bug in the O3 fetch stage that was introduced when
the cache line size was moved to the system. By mistake, the
initialisation and resetting of the fetch stage was merged and put in
the constructor. The resetting is now re-added where it should be.

11 years agoarm: use -march when compiling m5op_arm.S
Anthony Gutierrez [Wed, 14 Aug 2013 14:51:47 +0000 (10:51 -0400)]
arm: use -march when compiling m5op_arm.S

Using arm-linux-gnueabi-gcc 4.7.3-1ubuntu1 on Ubuntu 13.04 to compiled
the m5 binary yields the error:

m5op_arm.S: Assembler messages:
m5op_arm.S:85: Error: selected processor does not support ARM mode `bxj lr'

For each of of the SIMPLE_OPs. Apparently, this compiler doesn't like the
interworking of these code types for the default arch. Adding -march=armv7-a
makes it compile. Another alternative that I found to work is replacing the
bxj lr instruction with mov pc, lr, but I don't know how that affects the
KVM stuff and if bxj is needed.

11 years agoruby: slicc: remove double trigger, continueProcessing
Nilay Vaish [Wed, 7 Aug 2013 19:51:18 +0000 (14:51 -0500)]
ruby: slicc: remove double trigger, continueProcessing
These constructs are not in use and are not being maintained by any one.
In addition, it is not known if doubleTrigger works correctly with Ruby now.

11 years agoruby: slicc: move some code to AbstractController
Nilay Vaish [Wed, 7 Aug 2013 19:51:18 +0000 (14:51 -0500)]
ruby: slicc: move some code to AbstractController
Some of the code in StateMachine.py file is added to all the controllers and
is independent of the controller definition. This code is being moved to the
AbstractController class which is the parent class of all controllers.

11 years agox86: add tlb checkpointing
Nilay Vaish [Wed, 7 Aug 2013 19:51:17 +0000 (14:51 -0500)]
x86: add tlb checkpointing
This patch adds checkpointing support to x86 tlb. It upgrades the
cpt_upgrader.py script so that previously created checkpoints can
be updated. It moves the checkpoint version to 6.

11 years agocpu: Remove unused getBranchPred() method from BaseCPU
Andreas Sandberg [Fri, 19 Jul 2013 09:52:07 +0000 (11:52 +0200)]
cpu: Remove unused getBranchPred() method from BaseCPU

Remove unused virtual getBranchPred() method from BaseCPU as it is not
implemented by any of the CPU models. It used to always return NULL.

11 years agoConfigs: Fix up maxtick and maxtime
Joel Hestness [Thu, 18 Jul 2013 19:46:54 +0000 (14:46 -0500)]
Configs: Fix up maxtick and maxtime

This patch contains three fixes to max tick options handling in Options.py and
Simulation.py:

 1) Since the global simulator frequency isn't bound until m5.instantiate()
is called, the maxtick resolution needs to happen after this call, since
changes to the global frequency will cause m5.simulate() to misinterpret the
maxtick value. Shuffling this also requires tweaking the checkpoint directory
handling to signal the checkpoint restore tick back to run().  Fixing this
completely and correctly will require storing the simulation frequency into
checkpoints, which is beyond the scope of this patch.

 2) The maxtick option in Options.py was defaulted to MaxTicks, so the old code
would always skip over the maxtime part of the conditionals at the beginning
of run(). Change the maxtick default to None, and set the maxtick local
variable in run() appropriately.

 3) To clarify whether max ticks settings are relative or absolute, split the
maxtick option into separate options, for relative and absolute. Ensure that
these two options and the maxtime option are handled appropriately to set the
maxtick variable in Simulation.py.

11 years agoconfig: Update script to set cache line size on system
Andreas Hansson [Thu, 18 Jul 2013 12:31:19 +0000 (08:31 -0400)]
config: Update script to set cache line size on system

This patch changes the config scripts such that they do not set the
cache line size per cache instance, but rather for the system as a
whole.

11 years agomem: Set the cache line size on a system level
Andreas Hansson [Thu, 18 Jul 2013 12:31:16 +0000 (08:31 -0400)]
mem: Set the cache line size on a system level

This patch removes the notion of a peer block size and instead sets
the cache line size on the system level.

Previously the size was set per cache, and communicated through the
interconnect. There were plenty checks to ensure that everyone had the
same size specified, and these checks are now removed. Another benefit
that is not yet harnessed is that the cache line size is now known at
construction time, rather than after the port binding. Hence, the
block size can be locally stored and does not have to be queried every
time it is used.

A follow-on patch updates the configuration scripts accordingly.

11 years agomem: Add cache class destructor to avoid memory leaks
Xiangyu Dong [Thu, 18 Jul 2013 12:29:47 +0000 (08:29 -0400)]
mem: Add cache class destructor to avoid memory leaks

Make valgrind a little bit happier

11 years agoscons: Use python-config instead of distutils
Andreas Hansson [Thu, 18 Jul 2013 12:29:28 +0000 (08:29 -0400)]
scons: Use python-config instead of distutils

This patch changes how we determine the Python-related compiler and
linker flags. The previous approach used the internal LINKFORSHARED
which is not intended as part of the external API
(http://bugs.python.org/issue3588) and causes failures on recent OSX
installations.

Instead of using distutils we now rely on python-config and scons
ParseConfig. For backwards compatibility we also parse out the
includes and libs although this could safely be dropped. The drawback
of this patch is that Python 2.5 is now required, but hopefully that
is an acceptable compromise as any system with gcc 4.4 most likely
will have Python >= 2.5.

11 years agosim: Make MaxTick in Python match the one in C++
Andreas Hansson [Thu, 18 Jul 2013 12:29:08 +0000 (08:29 -0400)]
sim: Make MaxTick in Python match the one in C++

This patch aligns the MaxTick in Python with the one in C++. Thus,
both reflect the maximum value that an unsigned 64-bit integer can
have.

11 years agoloader: Load weak symbols for function tracing
Deyuan Guo [Mon, 15 Jul 2013 22:08:57 +0000 (18:08 -0400)]
loader: Load weak symbols for function tracing

11 years agodebug : Fixes the issue wherein Debug symbols were not getting dumped into trace...
Umesh Bhaskar [Mon, 15 Jul 2013 15:08:34 +0000 (11:08 -0400)]
debug : Fixes the issue wherein Debug symbols were not getting dumped into trace files for SE mode

11 years agodev: make BasicPioDevice take size in constructor
Steve Reinhardt [Fri, 12 Jul 2013 02:57:04 +0000 (21:57 -0500)]
dev: make BasicPioDevice take size in constructor

Instead of relying on derived classes explicitly assigning
to the BasicPioDevice pioSize field, require them to pass
a size value in to the constructor.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agodev: consistently end device classes in 'Device'
Steve Reinhardt [Fri, 12 Jul 2013 02:56:50 +0000 (21:56 -0500)]
dev: consistently end device classes in 'Device'

PciDev and IntDev stuck out as the only device classes that
ended in 'Dev' rather than 'Device'.  This patch takes care
of that inconsistency.

Note that you may need to delete pre-existing files matching
build/*/python/m5/internal/param_* as scons does not pick up
indirect dependencies on imported python modules when generating
params, and the PciDev -> PciDevice rename takes place in a
file (dev/Device.py) that gets imported quite a bit.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agodev/arm: get rid of AmbaDev namespace
Steve Reinhardt [Fri, 12 Jul 2013 02:56:39 +0000 (21:56 -0500)]
dev/arm: get rid of AmbaDev namespace

It was confusing having an AmbaDev namespace along with an
AmbaDevice class.  The namespace stuff is now moved in to
a new base AmbaDevice class, which is a mixin for classes
AmbaPioDevice (the former AmbaDevice) and AmbaDmaDevice
to provide the readId function as an inherited member function.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agodevices: make more classes derive from BasicPioDevice
Steve Reinhardt [Fri, 12 Jul 2013 02:56:24 +0000 (21:56 -0500)]
devices: make more classes derive from BasicPioDevice
A couple of devices that have single fixed memory mapped regions
were not derived from BasicPioDevice, when that's exactly
the functionality that BasicPioDevice provides.  This patch
gets rid of a little bit of redundant code by making those
devices actually do so.

Also fixed the weird case of X86ISA::Interrupts, where
the class already did derive from BasicPioDevice but
didn't actually use all the features it could have.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agoruby: removed the very old double trigger hack stable_2013_10_14
Brad Beckmann [Thu, 11 Jul 2013 18:56:05 +0000 (13:56 -0500)]
ruby: removed the very old double trigger hack

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agoregressions: update a couple stats.txt
Nilay Vaish [Tue, 2 Jul 2013 15:11:00 +0000 (10:11 -0500)]
regressions: update a couple stats.txt
The statistics for 30.eio-mp, pc-simple-timing-ruby tests are being updated
to incorporate the changes due to recent patches.

11 years agoregressions: update a couple of configs
Nilay Vaish [Tue, 2 Jul 2013 15:10:58 +0000 (10:10 -0500)]
regressions: update a couple of configs
The configs for pc-simple-timing-ruby, t1000-simple-atomic had not been
updated correctly in the patch 6e6cefc1db1f.

11 years agoruby: append transition comment only when in opt/debug
Nilay Vaish [Sat, 29 Jun 2013 02:42:27 +0000 (21:42 -0500)]
ruby: append transition comment only when in opt/debug

11 years agoconfigs: rearrange the available options in Options.py
Nilay Vaish [Sat, 29 Jun 2013 02:42:26 +0000 (21:42 -0500)]
configs: rearrange the available options in Options.py
It also changes the instantiation of physmem in se.py so as to make
use of the memory size supplied by the mem_size option.

11 years agoruby: network: remove reconfiguration code
Nilay Vaish [Sat, 29 Jun 2013 02:36:37 +0000 (21:36 -0500)]
ruby: network: remove reconfiguration code
This code seems not to be of any use now. There is no path in the simulator
that allows for reconfiguring the network. A better approach would be to
take a checkpoint and start the simulation from the checkpoint with the new
configuration.

11 years agoruby: check for compatibility between mem size and num dirs
Nilay Vaish [Sat, 29 Jun 2013 02:36:11 +0000 (21:36 -0500)]
ruby: check for compatibility between mem size and num dirs
The configuration scripts provided for ruby assume that the available
physical memory is equally distributed amongst the directory controllers.
But there is no check to ensure this assumption has been adhered to. This
patch adds the required check.

11 years agostats: Update stats for monitor, cache and bus changes
Andreas Hansson [Thu, 27 Jun 2013 09:49:51 +0000 (05:49 -0400)]
stats: Update stats for monitor, cache and bus changes

This patch removes the sparse histogram total from the CommMonitor
stats. It also bumps the stats after the unit fixes in the atomic
cache access. Lastly, it updates the stats to match the new port
ordering. All numbers are the same, and the only thing that changes is
which master corresponds to what port index.

11 years agomem: Reorganize cache tags and make them a SimObject
Prakash Ramrakhyani [Thu, 27 Jun 2013 09:49:50 +0000 (05:49 -0400)]
mem: Reorganize cache tags and make them a SimObject

This patch reorganizes the cache tags to allow more flexibility to
implement new replacement policies. The base tags class is now a
clocked object so that derived classes can use a clock if they need
one. Also having deriving from SimObject allows specialized Tag
classes to be swapped in/out in .py files.

The cache set is now templatized to allow it to contain customized
cache blocks with additional informaiton. This involved moving code to
the .hh file and removing cacheset.cc.

The statistics belonging to the cache tags are now including ".tags"
in their name. Hence, the stats need an update to reflect the change
in naming.

11 years agomem: Remove the cache builder
Andreas Hansson [Thu, 27 Jun 2013 09:49:50 +0000 (05:49 -0400)]
mem: Remove the cache builder

This patch removes the redundant cache builder class.

11 years agoconfig: Remove Clock parameter multiplication
Andreas Hansson [Thu, 27 Jun 2013 09:49:50 +0000 (05:49 -0400)]
config: Remove Clock parameter multiplication

This patch removes the multiplication operator support for Clock
parameters as this functionality is now achieved by creating derived
clock domains.

Nate, this one is for you.

11 years agosim: Add the notion of clock domains to all ClockedObjects
Akash Bagdia [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
sim: Add the notion of clock domains to all ClockedObjects

This patch adds the notion of source- and derived-clock domains to the
ClockedObjects. As such, all clock information is moved to the clock
domain, and the ClockedObjects are grouped into domains.

The clock domains are either source domains, with a specific clock
period, or derived domains that have a parent domain and a divider
(potentially chained). For piece of logic that runs at a derived clock
(a ratio of the clock its parent is running at) the necessary derived
clock domain is created from its corresponding parent clock
domain. For now, the derived clock domain only supports a divider,
thus ensuring a lower speed compared to its parent. Multiplier
functionality implies a PLL logic that has not been modelled yet
(create a separate clock instead).

The clock domains should be used as a mechanism to provide a
controllable clock source that affects clock for every clocked object
lying beneath it. The clock of the domain can (in a future patch) be
controlled by a handler responsible for dynamic frequency scaling of
the respective clock domains.

All the config scripts have been retro-fitted with clock domains. For
the System a default SrcClockDomain is created. For CPUs that run at a
different speed than the system, there is a seperate clock domain
created. This domain incorporates the CPU and the associated
caches. As before, Ruby runs under its own clock domain.

The clock period of all domains are pre-computed, such that no virtual
functions or multiplications are needed when calling
clockPeriod. Instead, the clock period is pre-computed when any
changes occur. For this to be possible, each clock domain tracks its
children.

11 years agoconfig: Add a BaseSESystem builder for re-use in regressions
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
config: Add a BaseSESystem builder for re-use in regressions

This patch extends the existing system builders to also include a
syscall-emulation builder. This builder is deployed in all
syscall-emulation regressions that do not involve Ruby,
i.e. o3-timing, simple-timing and simple-atomic, as well as the
multi-processor regressions o3-timing-mp, simple-timing-mp and
simple-atomic-mp (the latter are only used by SPARC at this point).

The values chosen for the cache sizes match those that were used in
the existing config scripts (despite being on the large
side). Similarly, a mem_class parameter is added to the builder base
class to enable simple-atomic to use SimpleMemory and o3-timing to use
the default DDR3 configuration.

Due to the different order the ports are connected, the bus stats get
shuffled around for the multi-processor regressions. A separate patch
bumps the port indices. Besides this, all behaviour is exactly the
same.

11 years agoconfig: Rename clock option to Ruby clock
Akash Bagdia [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
config: Rename clock option to Ruby clock

This patch changes the 'clock' option to 'ruby-clock' as it is only
used by Ruby.

11 years agoconfig: Add a system clock command-line option
Akash Bagdia [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
config: Add a system clock command-line option

This patch adds a 'sys_clock' command-line option and use it to assign
clocks to the system during instantiation.

As part of this change, the default clock in the System class is
removed and whenever a system is instantiated a system clock value
must be set. A default value is provided for the command-line option.

The configs and tests are updated accordingly.

11 years agoconfig: Add a CPU clock command-line option
Akash Bagdia [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
config: Add a CPU clock command-line option

This patch adds a 'cpu_clock' command-line option and uses the value
to assign clocks to components running at the CPU speed (L1 and L2
including the L2-bus). The configuration scripts are updated
accordingly.

The 'clock' option is left unchanged in this patch as it is still used
by a number of components. In follow-on patches the latter will be
disambiguated further.

11 years agoconfig: Remove redundant explicit setting of default clocks
Akash Bagdia [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
config: Remove redundant explicit setting of default clocks

This patch removes the explicit setting of the clock period for
certain instances of CoherentBus, NonCoherentBus and IOCache where the
specified clock is same as the default value of the system clock. As
all the values used are the defaults, there are no performance
changes. There are similar cases where the toL2Bus is set to use the
parent CPU clock which is already the default behaviour.

The main motivation for these simplifications is to ease the
introduction of clock domains.

11 years agotests: Prune 00.gzip from the regressions
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
tests: Prune 00.gzip from the regressions

This patch prunes the 00.gzip regressions with the main motivation
being that it adds little (or no) coverage and requires a substantial
amount of run time.

A complete regression run, including compilation from a clean repo, is
almost 20% faster(!).

11 years agomem: Tidy up the bridge with const and additional checks
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Tidy up the bridge with const and additional checks

This patch does a bit of tidying up in the bridge code, adding const
where appropriate and also removing redundant checks and adding a few
new ones.

There are no changes to the behaviour of any regressions.

11 years agomem: Fix CommMonitor style and response check
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Fix CommMonitor style and response check

This patch fixes the CommMonitor local variable names, and also
introduces a variable to capture if it expects to see a response. The
latter check considers both needsResponse and memInhibitAsserted.

11 years agomem: Align cache timing to clock edges
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Align cache timing to clock edges

This patch changes the cache timing calculations such that the results
are aligned to clock edges.

Plenty stats change as a results of this patch.

11 years agocpu: Consider instructions waiting for FU completion in draining
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
cpu: Consider instructions waiting for FU completion in draining

This patch changes the IEW drain check to include the FU pool as there
can be instructions that are "stored" in FU completion events and thus
not covered by the existing checks. With this patch, we simply include
a check to see if all the FUs are considered non-busy in the next
tick.

Without this patch, the pc-switcheroo-full regression fails after
minor changes to the cache timing (aligning to clock edge).

11 years agomem: Cycles converted to Ticks in atomic cache accesses
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Cycles converted to Ticks in atomic cache accesses

This patch fixes an outstanding issue in the cache timing calculations
where an atomic access returned a time in Cycles, but the port
forwarded it on as if it was in Ticks.

A separate patch will update the regression stats.

11 years agoscons: Identify runs that fail and runs with stats differences
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
scons: Identify runs that fail and runs with stats differences

This patch changes the regression script such that it is possible to
identify the runs that fail with an exit code, and those that finish
with stats differences. The ones that truly fail are reported as
FAILED, and those that finish with changed stats as CHANGED.

The yellow colour has been reclaimed from the skipped regressions and
is now used for the changed ones. With no obvious good option left the
skipped ones are now in cyan.

While I was editing the script I also bumped any occurence of M5 to
gem5.

11 years agobase: Fix address range granularity calculation
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
base: Fix address range granularity calculation

This patch fixes a bug in the granularity calculation. For example, if
the high bit is 6 (counting from 0) and we have one interleaving bit,
then the granularity is now 2 ** (6 - 1 + 1) = 64.

11 years agomem: Remove a redundant heap allocation for a snoop packet
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Remove a redundant heap allocation for a snoop packet

This patch changes the updards snoop packet to avoid allocating and
later deleting it. As the code executes in 0 time and the lifetime of
the packet does not extend beyond the block there is no reason to heap
allocate it.

11 years agomem: Remove CoherentBus snoop port unused private member
Andreas Hansson [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
mem: Remove CoherentBus snoop port unused private member

This patch removes an unused member to avoid getting compiler warnings
when using clang.

11 years agostats: Remove printing of SparseHist total
Sascha Bischoff [Thu, 27 Jun 2013 09:49:49 +0000 (05:49 -0400)]
stats: Remove printing of SparseHist total

This patch removes the printing of the SparseHist total in the
stats.txt output file. This has been removed as a sparse histogram has
no total, and therefore this was printing out the value of a
non-local, unrelated variable.

11 years agostats: updates due to changes to stat collection in ruby
Nilay Vaish [Tue, 25 Jun 2013 05:32:04 +0000 (00:32 -0500)]
stats: updates due to changes to stat collection in ruby

11 years agoruby: moesi cmp directory: separate actions for external hits
Nilay Vaish [Tue, 25 Jun 2013 05:32:04 +0000 (00:32 -0500)]
ruby: moesi cmp directory: separate actions for external hits
This patch adds separate actions for requests that missed in the local cache
and messages were sent out to get the requested line. These separate actions
are required for differentiating between the hit and miss latencies in the
statistics collected.

11 years agoruby: mesi cmp directory: separate actions for external hits
Nilay Vaish [Tue, 25 Jun 2013 05:32:03 +0000 (00:32 -0500)]
ruby: mesi cmp directory: separate actions for external hits
This patch adds separate actions for requests that missed in the local cache
and messages were sent out to get the requested line. These separate actions
are required for differentiating between the hit and miss latencies in the
statistics collected.

11 years agoruby: profiler: lots of inter-related changes
Nilay Vaish [Tue, 25 Jun 2013 05:32:03 +0000 (00:32 -0500)]
ruby: profiler: lots of inter-related changes
The patch started of with removing the global variables from the profiler for
profiling the miss latency of requests made to the cache. The corrresponding
histograms have been moved to the Sequencer. These are combined together when
the histograms are printed. Separate histograms are now maintained for
tracking latency of all requests together, of hits only and of misses only.

A particular set of histograms used to use the type GenericMachineType defined
in one of the protocol files. This patch removes this type. Now, everything
that relied on this type would use MachineType instead. To do this, SLICC has
been changed so that multiple machine types can be declared by a controller
in its preamble.

11 years agostats: Bump x86 stats
Andreas Hansson [Mon, 24 Jun 2013 18:17:22 +0000 (14:17 -0400)]
stats: Bump x86 stats

This patch bumps the x86 stats to reflect the recent fixes.

11 years agoruby: remove the three files related to profiling
Nilay Vaish [Mon, 24 Jun 2013 13:59:08 +0000 (08:59 -0500)]
ruby: remove the three files related to profiling
This patch removes the following three files: RubySlicc_Profiler.sm,
RubySlicc_Profiler_interface.cc and RubySlicc_Profiler_interface.hh.
Only one function prototyped in the file RubySlicc_Profiler.sm. Rest of the
code appearing in any of these files is not in use. Therefore, these files
are being removed.

That one single function, profileMsgDelay(), is being moved to the protocol
files where it is in use. If we need any of these deleted functions, I think
the right way to make them visible is to have the AbstractController class in
a .sm and let the controller state machine inherit from this class. The
AbstractController class can then have the prototypes of these profiling
functions in its definition.

11 years agoruby: MessageBuffer: Remove unused m_size variable
Joel Hestness ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E) [Mon, 24 Jun 2013 11:57:06 +0000 (06:57 -0500)]
ruby: MessageBuffer: Remove unused m_size variable

The m_size variable attempted to track m_prio_heap.size(), but it did so
incorrectly due to the functions reanalyzeMessages and reanalyzeAllMessages().
Since this variable is intended to track m_prio_heap.size(), we can simply
replace instances where m_size is referenced with m_prio_heap.size(), which
has the added bonus of removing the need for m_size.

Note: This patch also removes an extraneous DPRINTF format string designator
from reanalyzeAllMessages()

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

11 years agoruby: fix typo in MOESI_CMP_token protocol
Lena Olson [Thu, 20 Jun 2013 21:20:38 +0000 (16:20 -0500)]
ruby: fix typo in MOESI_CMP_token protocol