Commit graph

9276 commits

Author SHA1 Message Date
Nilay Vaish 88ba1c452b ruby: makes some members non-static
This patch makes some of the members (profiler, network, memory vector)
of ruby system non-static.
2012-10-02 14:35:45 -05:00
Nilay Vaish 4488379244 ruby: changes to simple network
This patch makes the Switch structure inherit from BasicRouter, as is
done in two other networks.
2012-10-02 14:35:45 -05:00
Nilay Vaish b370f6a7b2 ruby: rename template_hack to template
I don't like using the word hack. Hence, the patch.
2012-10-02 14:35:44 -05:00
Nilay Vaish d58f84c481 ruby: remove unused code in protocols 2012-10-02 14:35:44 -05:00
Nilay Vaish 73eafe4849 ruby: remove some unused things in slicc
This patch removes the parts of slicc that were required for multi-chip
protocols. Going ahead, it seems multi-chip protocols would be implemented
by playing with the network itself.
2012-10-02 14:35:43 -05:00
Nilay Vaish 3c9d3b16d8 ruby: move functional access to ruby system
This patch moves the code for functional accesses to ruby system. This is
because the subsequent patches add support for making functional accesses
to the messages in the interconnect. Making those accesses from the ruby port
would be cumbersome.
2012-10-02 14:35:42 -05:00
Nilay Vaish 95664da097 MI coherence protocol: add copyright notice 2012-09-30 13:20:53 -05:00
Malek Musleh 3fc23b9b96 Configs: SE script fix for Alpha and Ruby simulations
PIO interrupt port is only present for x86. Do not attempt to connect
for other ISAs.
2012-09-28 09:35:25 -04:00
Andreas Hansson 6596059d05 Configs: Fix memtest cache latency to match new parameters
This patch changes the memtest config to use the new response latency
of the cache model.
2012-09-27 08:59:25 -04:00
Andreas Hansson 9d9b71e485 Configs: Fix memtest.py by moving the system port
The memtest.py script used to connect the system port directly to the
SimpleMemory, but the latter is now single ported. Since the system
port is not used for anything in this particular example, a quick fix
is to attach it to the functional bus instead.
2012-09-27 03:24:21 -04:00
Ali Saidi 91e74beee6 ARM: update stats for bp and squash fixes. 2012-09-25 11:49:41 -05:00
Djordje Kovacevic 80a26a3e39 MEM: Put memory system document into doxygen 2012-09-25 11:49:41 -05:00
Mrinmoy Ghosh 6fc0094337 Cache: add a response latency to the caches
In the current caches the hit latency is paid twice on a miss. This patch lets
a configurable response latency be set of the cache for the backward path.
2012-09-25 11:49:41 -05:00
Sascha Bischoff 74ab69c7ea Statistics: Add a function to configure periodic stats dumping
This patch adds a function, periodicStatDump(long long period), which will dump
and reset the statistics every period. This function is designed to be called
from the python configuration scripts. This allows the periodic stats dumping to
be configured more easilly at run time.

The period is currently specified as a long long as there are issues passing
Tick into the C++ from the python as they have conflicting definitions. If the
period is less than curTick, the first occurance occurs at curTick. If the
period is set to 0, then the event is descheduled and the stats are not
periodically dumped.

Due to issues when resumung from a checkpoint, the StatDump event must be moved
forward such that it occues AFTER the current tick. As the function is called
from the python, the event is scheduled before the system resumes from the
checkpoint. Therefore, the event is moved using the updateEvents() function.
This is called from simulate.py once the system has resumed from the checkpoint.

NOTE: It should be noted that this is a fairly temporary patch which re-adds the
capability to extract temporal information  from the communication monitors. It
should not be used at the same time as anything that relies on dumping the
statistics based on in simulation events i.e. a context switch.
2012-09-25 11:49:41 -05:00
Dam Sunwoo acbb7a2eed ARM: added support for flattened device tree blobs
Newer Linux kernels require DTB (device tree blobs) to specify platform
configurations. The input DTB filename can be specified through gem5 parameters
in LinuxArmSystem.
2012-09-25 11:49:41 -05:00
Ali Saidi 5adb4ddc12 O3: Pack the comm structures a bit better to reduce their size. 2012-09-25 11:49:40 -05:00
Ali Saidi 396600de10 mem: Add a gasket that allows memory ranges to be re-mapped.
For example if DRAM is at two locations and mirrored this patch allows the
mirroring to occur.
2012-09-25 11:49:40 -05:00
Ali Saidi 0c99d21ad7 ARM: Squash outstanding walks when instructions are squashed. 2012-09-25 11:49:40 -05:00
Sascha Bischoff 29acf859eb Util: Added script to semantically diff two config.ini files
This script (util/diff_config.pl) takes two config.ini files and compares them.
It highlights value changes, as well as displaying which parts are unique to
a specific config.ini file. This is useful when trying to replicate an earlier
experiment and when trying to make small changes to an existing configuration.
2012-09-25 11:49:40 -05:00
Andreas Sandberg 6f603e0807 arm: Use a static_assert to test that miscRegName[] is complete
Instead of statically defining miscRegName to contain NUM_MISCREGS
elements, let the compiler determine the length of the array. This
allows us to use a static_assert to test that all registers are listed
in the name vector.
2012-09-25 11:49:40 -05:00
Andreas Sandberg 4544f3def4 base: Check for static_assert support and provide fallback
C++11 has support for static_asserts to provide compile-time assertion
checking. This is very useful when testing, for example, structure
sizes to make sure that the compiler got the right alignment or vector
sizes.
2012-09-25 11:49:40 -05:00
Andreas Sandberg 6598241f2c sim: Move CPU-specific methods from SimObject to the BaseCPU class 2012-09-25 11:49:40 -05:00
Andreas Sandberg 5f32eceeda sim: Remove SimObject::setMemoryMode
Remove SimObject::setMemoryMode from the main SimObject class since it
is only valid for the System class. In addition to removing the method
from the C++ sources, this patch also removes getMemoryMode and
changeTiming from SimObject.py and updates the simulation code to call
the (get|set)MemoryMode method on the System object instead.
2012-09-25 11:49:40 -05:00
Djordje Kovacevic d060a28a29 CPU: Add abandoned instructions to O3 Pipe Viewer 2012-09-25 11:49:40 -05:00
Nathanael Premillieu bfffbb6797 ARM: Inst writing to cntrlReg registers not set as control inst
Deletion of the fact that instructions that writes to registers of type
"cntrlReg" are not set as control instruction (flag IsControl not set).
2012-09-25 11:49:40 -05:00
Ali Saidi 04ca96427c ARM: Predict target of more instructions that modify PC. 2012-09-25 11:49:40 -05:00
Ali Saidi 17aa2b0f1b gem5: Update the README file to be a bit less out-of-date. 2012-09-25 11:49:40 -05:00
Andreas Sandberg 1b29352dd5 build: Add missing dependencies when building param SWIG interfaces
This patch adds an explicit dependency between param_%s.i and the
Python source file defining the object. Previously, the build system
didn't rebuild SWIG interfaces correctly when an object's Python
sources were updated.
2012-09-25 11:49:40 -05:00
Andreas Hansson 4f8ad7aa05 Stats: Update stats for twosys-tsunami after setting CPU clock
This patch updates the stats to reflect the addition of a clock
period other than the default 1 Tick.
2012-09-24 18:03:43 -04:00
Andreas Hansson 103a4a049c Regression: Set the clock for twosys-tsunami CPUs
This patch merely adds a clock other than the default 1 Tick for the
CPUs of both the test system and drive system for the twosys-tsunami
regression.

The CPU frequency of the driver system is choosed to be twice that of
the test system to ensure it is not the bottleneck (although in this
case it mostly serves as a demonstration of a two-system setup),
2012-09-24 18:03:41 -04:00
Joel Hestness 4095af5fd6 RubyPort and Sequencer: Fix draining
Fix the drain functionality of the RubyPort to only call drain on child ports
during a system-wide drain process, instead of calling each time that a
ruby_hit_callback is executed.

This fixes the issue of the RubyPort ports being reawakened during the drain
simulation, possibly with work they didn't previously have to complete. If
they have new work, they may call process on the drain event that they had
not registered work for, causing an assertion failure when completing the
drain event.

Also, in RubyPort, set the drainEvent to NULL when there are no events
to be drained. If not set to NULL, the drain loop can result in stale
drainEvents used.
2012-09-23 13:57:08 -05:00
Andreas Hansson 6427342318 SimpleDRAM: A basic SimpleDRAM regression
--HG--
rename : tests/configs/tgen-simple-mem.py => tests/configs/tgen-simple-dram.py
rename : tests/quick/se/70.tgen/tgen-simple-mem.cfg => tests/quick/se/70.tgen/tgen-simple-dram.cfg
rename : tests/quick/se/70.tgen/tgen-simple-mem.trc => tests/quick/se/70.tgen/tgen-simple-dram.trc
2012-09-21 11:48:14 -04:00
Andreas Hansson 3b6a143ec5 DRAM: Introduce SimpleDRAM to capture a high-level controller
This patch introduces a high-level model of a DRAM controller, with a
basic read/write buffer structure, a selectable and customisable
arbiter, a few address mapping options, and the basic DRAM timing
constraints. The parameters make it possible to turn this model into
any desired DDRx/LPDDRx/WideIOx memory controller.

The intention is not to be cycle accurate or capture every aspect of a
DDR DRAM interface, but rather to enable exploring of the high-level
knobs with a good simulation speed. Thus, contrary to e.g. DRAMSim
this module emphasizes simulation speed with a good-enough accuracy.

This module is merely a starting point, and there are plenty additions
and improvements to come. A notable addition is the support for
address-striping in the bus to enable a multi-channel DRAM
controller. Also note that there are still a few "todo's" in the code
base that will be addressed as we go along.

A follow-up patch will add basic performance regressions that use the
traffic generator to exercise a few well-defined corner cases.
2012-09-21 11:48:13 -04:00
Andreas Hansson efea870fce TrafficGen: Add a basic traffic generator regression
This patch adds a basic regression for the traffic generator. The
regression also serves as an example of the file formats used. More
complex regressions that make use of a DRAM controller model will
follow shortly.
2012-09-21 11:48:11 -04:00
Andreas Hansson d75b1b5a73 TrafficGen: Add a basic traffic generator
This patch adds a traffic generator to the code base. The generator is
aimed to be used as a black box model to create appropriate use-cases
and benchmarks for the memory system, and in particular the
interconnect and the memory controller.

The traffic generator is a master module, where the actual behaviour
is captured in a state-transition graph where each state generates
some sort of traffic. By constructing a graph it is possible to create
very elaborate scenarios from basic generators. Currencly the set of
generators include idling, linear address sweeps, random address
sequences and playback of traces (recording will be done by the
Communication Monitor in a follow-up patch). At the moment the graph
and the states are described in an ad-hoc line-based format, and in
the future this should be aligned with our used of e.g. the Google
protobufs. Similarly for the traces, the format is currently a
simplistic ad-hoc line-based format that merely serves as a starting
point.

In addition to being used as a black-box model for system components,
the traffic generator is also useful for creating test cases and
regressions for the interconnect and memory system. In future patches
we will use the traffic generator to create DRAM test cases for the
controller model.

The patch following this one adds a basic regressions which also
contains an example configuration script and trace file for playback.
2012-09-21 11:48:08 -04:00
Andreas Hansson 4aee3aa073 Mem: Tidy up bus member variables types
This patch merely tidies up the types used for the bus member
variables. It also makes the constant ones const.
2012-09-21 10:11:24 -04:00
Andreas Hansson 166afc43e0 Scons: Verbose messages when dependencies are not installed
This patch adds a few more checks to ensure that a compiler is present
on the system, along with swig. It references the relevant packages on
Ubuntu/RedHat, and also adds a similar line for the Python headers.
2012-09-21 10:11:22 -04:00
Lluc Alvarez c8de765468 SE: Ignore FUTEX_PRIVATE_FLAG of sys_futex
This patch ignores the FUTEX_PRIVATE_FLAG of the sys_futex system call
in SE mode.

With this patch, when sys_futex with the options FUTEX_WAIT_PRIVATE or
FUTEX_WAKE_PRIVATE is emulated, the FUTEX_PRIVATE_FLAG is ignored and
so their behaviours are the regular FUTEX_WAIT and FUTEX_WAKE.

Emulating FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE as if they were
non-private is safe from a functional point of view. The
FUTEX_PRIVATE_FLAG does not change the semantics of the futex, it's
just a mechanism to improve performance under certain circunstances
that can be ignored in SE mode.
2012-09-21 04:51:18 -04:00
Anthony Gutierrez 9cd0c5ecc8 bus: removed outdated warn regarding 64 B block sizes
this warn is outdated as 64 B blocks are very common, and even
the default size for some CPU types. E.g., arm_detailed.
2012-09-20 17:25:52 -04:00
Andreas Hansson a731f8f9dd Mem: Remove the file parameter from AbstractMemory
This patch removes the unused file parameter from the
AbstractMemory. The patch serves to make it easier to transition to a
separation of the actual contigious host memory backing store, and the
gem5 memory controllers.

Without the file parameter it becomes easier to hide the creation of
the mmap in the PhysicalMemory, as there are no longer any reasons to
expose the actual contigious ranges to the user.

To the best of my knowledge there is no use of the parameter, so the
change should not affect anyone.
2012-09-19 06:15:46 -04:00
Andreas Hansson ffb6aec603 AddrRange: Transition from Range<T> to AddrRange
This patch takes the final plunge and transitions from the templated
Range class to the more specific AddrRange. In doing so it changes the
obvious Range<Addr> to AddrRange, and also bumps the range_map to be
AddrRangeMap.

In addition to the obvious changes, including the removal of redundant
includes, this patch also does some house keeping in preparing for the
introduction of address interleaving support in the ranges. The Range
class is also stripped of all the functionality that is never used.

--HG--
rename : src/base/range.hh => src/base/addr_range.hh
rename : src/base/range_map.hh => src/base/addr_range_map.hh
2012-09-19 06:15:44 -04:00
Andreas Hansson c34df76272 AddrRange: Simplify Range by removing stream input/output
This patch simplifies the Range class in preparation for the
introduction of a more specific AddrRange class that allows
interleaving/striping.

The only place where the parsing was used was in the unit test.
2012-09-19 06:15:43 -04:00
Andreas Hansson 12c291f9d7 AddrRange: Remove unused range_multimap
This patch simply removes the unused range_multimap in preparation for
a more specific AddrRangeMap that also allows interleaving in addition
to pure ranges.
2012-09-19 06:15:42 -04:00
Andreas Hansson fccbf8bb45 AddrRange: Simplify AddrRange params Python hierarchy
This patch simplifies the Range object hierarchy in preparation for an
address range class that also allows striping (e.g. selecting a few
bits as matching in addition to the range).

To extend the AddrRange class to an AddrRegion, the first step is to
simplify the hierarchy such that we can make it as lean as possible
before adding the new functionality. The only class using Range and
MetaRange is AddrRange, and the three classes are now collapsed into
one.
2012-09-19 06:15:41 -04:00
Nilay Vaish 33c904e0a5 ruby: eliminate typedef integer_t 2012-09-18 22:49:12 -05:00
Nilay Vaish 86b1c0fd54 ruby: avoid using g_system_ptr for event scheduling
This patch removes the use of g_system_ptr for event scheduling. Each consumer
object now needs to specify upfront an EventManager object it would use for
scheduling events. This makes the ruby memory system more amenable for a
multi-threaded simulation.
2012-09-18 22:46:34 -05:00
Andreas Hansson d2b57a7473 Stats: Update stats to reflect SimpleMemory bandwidth
This patch simply bumps the stats to reflect the introduction of a
bandwidth limit of 12.8GB/s for SimpleMemory.
2012-09-18 10:30:04 -04:00
Andreas Hansson 7c55464aac Mem: Add a maximum bandwidth to SimpleMemory
This patch makes a minor addition to the SimpleMemory by enforcing a
maximum data rate. The bandwidth is configurable, and a reasonable
value (12.8GB/s) has been choosen as the default.

The changes do add some complexity to the SimpleMemory, but they
should definitely be justifiable as this enables a far more realistic
setup using even this simple memory controller.

The rate regulation is done for reads and writes combined to reflect
the bidirectional data busses used by most (if not all) relevant
memories. Moreover, the regulation is done per packet as opposed to
long term, as it is the short term data rate (data bus width times
frequency) that is the limiting factor.

A follow-up patch bumps the stats for the regressions.
2012-09-18 10:30:02 -04:00
Andreas Hansson d1f3a3b91a gcc: Enable Link-Time Optimization for gcc >= 4.6
This patch adds Link-Time Optimization when building the fast target
using gcc >= 4.6, and adds a scons flag to disable it (-no-lto). No
check is performed to guarantee that the linker supports LTO and use
of the linker plugin, so the user has to ensure that binutils GNU ld
>= 2.21 or the gold linker is available. Typically, if gcc >= 4.6 is
available, the latter should not be a problem. Currently the LTO
option is only useful for gcc >= 4.6, due to the limited support on
clang and earlier versions of gcc. The intention is to also add
support for clang once the LTO integration matures.

The same number of jobs is used for the parallel phase of LTO as the
jobs specified on the scons command line, using the -flto=n flag that
was introduced with gcc 4.6. The gold linker also supports concurrent
and incremental linking, but this is not used at this point.

The compilation and linking time is increased by almost 50% on
average, although ARM seems to be particularly demanding with an
increase of almost 100%. Also beware when using this as gcc uses a
tremendous amount of memory and temp space in the process. You have
been warned.

After some careful consideration, and plenty discussions, the flag is
only added to the fast target, and the warning that was issued in an
earlier version of this patch is now removed. Similarly, the flag used
to enable LTO, now the default is to use it, and the flag has been
modified to disable LTO. The rationale behind this decision is that
opt is used for development, whereas fast is only used for long runs,
e.g. regressions or more elaborate experiments where the additional
compile and link time is amortized by a much larger run time.

When it comes to the return on investment, the regression seems to be
roughly 15% faster with LTO. For a bit more detail, I ran twolf on
ARM.fast, with three repeated runs, and they all finish within 42
minutes (+- 25 seconds) without LTO and 31 minutes (+- 25 seconds)
with LTO, i.e. LTO gives an impressive >25% speed-up for this case.

Without LTO (ARM.fast twolf)

real	42m37.632s
user	42m34.448s
sys	0m0.390s

real	41m51.793s
user	41m50.384s
sys	0m0.131s

real	41m45.491s
user	41m39.791s
sys	0m0.139s

With LTO (ARM.fast twolf)

real	30m33.588s
user	30m5.701s
sys	0m0.141s

real	31m27.791s
user	31m24.674s
sys	0m0.111s

real	31m25.500s
user	31m16.731s
sys	0m0.106s
2012-09-14 12:13:22 -04:00
Andreas Hansson a57eda0843 scons: Add a target for google-perftools profiling
This patch adds a new target called 'perf' that facilitates profiling
using google perftools rather than gprof. The perftools CPU profiler
offers plenty useful information in addition to gprof, and the latter
is kept mostly to offer profiling also on non-Linux hosts.
2012-09-14 12:13:21 -04:00