gem5.git
8 years agoruby: bloom filters: refactor code
Nilay Vaish [Wed, 23 Sep 2015 16:23:10 +0000 (11:23 -0500)]
ruby: bloom filters:  refactor code

8 years agoruby: abstract controller: mark some variables as const
Nilay Vaish [Wed, 23 Sep 2015 16:23:10 +0000 (11:23 -0500)]
ruby: abstract controller: mark some variables as const

8 years agomem: Add initial HBM configurations
Wendy Elsasser [Tue, 22 Sep 2015 18:17:53 +0000 (13:17 -0500)]
mem: Add initial HBM configurations

Created the following HBM configurations:
1) HBM gen1 (x128/CH), 2Gb die, 4H stack, 1Gbps, 8 channels
2) HBM gen2 (x64/PC), 8Gb die, 4H stack, 1Gbps, 16 pseudo-channels

The configuration values are based on:
- The HBM gen1 public JEDEC spec
- Publically released data from MemCon presentations
- Timing extrapolated from existing LPDDR configurations

Will adjust once specs become available.

8 years agoruby: garnet: mark some variables as const
Nilay Vaish [Fri, 18 Sep 2015 18:27:48 +0000 (13:27 -0500)]
ruby: garnet: mark some variables as const

8 years agoruby: print addresses in hex
Nilay Vaish [Fri, 18 Sep 2015 18:27:47 +0000 (13:27 -0500)]
ruby: print addresses in hex
Changeset 4872dbdea907 replaced Address by Addr, but did not make changes to
print statements.  So the addresses which were being printed in hex earlier
along with their line address, were now being printed in decimals.  This patch
adds a function printAddress(Addr) that can be used to print the address in hex
along with the lines address.  This function has been put to use in some of the
places.  At other places, change has been made to print just the address in
hex.

8 years agoruby: slicc: derive DataMember class from Var instead of PairContainer
Nilay Vaish [Fri, 18 Sep 2015 18:27:47 +0000 (13:27 -0500)]
ruby: slicc: derive DataMember class from Var instead of PairContainer

The DataMember class in Type.py was being derived from PairContainer.  A
separate Var object was also created for the DataMember.  This meant some
duplication of across the members of these two classes (Var and DataMember).
This patch changes DataMember from Var instead.  There is no obvious reason to
derive from PairContainer which can only hold pairs, something that Var class
already supports.  The only thing that DataMember has over Var is init_code,
which is being retained.  This change would later on help in having pointers
in DataMembers.

8 years agoruby: update WireBuffer API to match that of MessageBuffer
Tony Gutierrez [Thu, 17 Sep 2015 18:00:33 +0000 (14:00 -0400)]
ruby: update WireBuffer API to match that of MessageBuffer

this patch updates the WireBuffer API to mirror the changes in revision 11111

8 years agostats: updates due to changes to MOESI_hammer
Nilay Vaish [Thu, 17 Sep 2015 03:17:54 +0000 (22:17 -0500)]
stats: updates due to changes to MOESI_hammer

8 years agoruby: Add missing block deallocations in MOESI_hammer
Lena Olson [Thu, 17 Sep 2015 01:18:40 +0000 (20:18 -0500)]
ruby: Add missing block deallocations in MOESI_hammer

Some blocks in MOESI hammer were not getting deallocated when they were set to
an idle state (e.g. by invalidate or other_getx/s messages).  While
functionally correct, this caused some bad effects on performance, such as
blocks in I in the L1s getting sent to the L2 upon eviction, in turn evicting
valid blocks.  Also, if a valid block was in LRU, that block could be evicted
rather than a block in I.  This patch adds in the missing deallocations.

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

8 years agoruby: fix message buffer init order
Joe Gross [Wed, 16 Sep 2015 17:10:42 +0000 (13:10 -0400)]
ruby: fix message buffer init order

The recent changes to make MessageBuffers SimObjects required them to be
initialized in a particular order, which could break some protocols. Fix this
by calling initNetQueues on the external nodes of each external link in the
constructor of Network.

This patch also refactors the duplicated code for checking network allocation
and setting net queues (which are called by initNetQueues) from the simple and
garnet networks to be in Network.

8 years agostats: slight changes to MOESI_CMP_token.
Nilay Vaish [Wed, 16 Sep 2015 16:59:57 +0000 (11:59 -0500)]
stats: slight changes to MOESI_CMP_token.

Due slight change to latency for the reissue table.

8 years agoruby: message buffer, timer table: significant changes
Nilay Vaish [Wed, 16 Sep 2015 16:59:56 +0000 (11:59 -0500)]
ruby: message buffer, timer table: significant changes

This patch changes MessageBuffer and TimerTable, two structures used for
buffering messages by components in ruby.  These structures would no longer
maintain pointers to clock objects.  Functions in these structures have been
changed to take as input current time in Tick.  Similarly, these structures
will not operate on Cycle valued latencies for different operations.  The
corresponding functions would need to be provided with these latencies by
components invoking the relevant functions.  These latencies should also be
in Ticks.

I felt the need for these changes while trying to speed up ruby.  The ultimate
aim is to eliminate Consumer class and replace it with an EventManager object in
the MessageBuffer and TimerTable classes.  This object would be used for
scheduling events.  The event itself would contain information on the object and
function to be invoked.

In hindsight, it seems I should have done this while I was moving away from use
of a single global clock in the memory system.  That change led to introduction
of clock objects that replaced the global clock object.  It never crossed my
mind that having clock object pointers is not a good design.  And now I really
don't like the fact that we have separate consumer, receiver and sender
pointers in message buffers.

8 years agoruby: remove unused function removeRequest()
Nilay Vaish [Wed, 16 Sep 2015 16:59:55 +0000 (11:59 -0500)]
ruby: remove unused function removeRequest()

8 years agoruby: sequencer: remove commented out function printProgress()
Nilay Vaish [Wed, 16 Sep 2015 16:59:55 +0000 (11:59 -0500)]
ruby: sequencer: remove commented out function printProgress()

8 years agoruby: rename System.{hh,cc} to RubySystem.{hh,cc}
David Hashe [Wed, 16 Sep 2015 16:03:03 +0000 (12:03 -0400)]
ruby: rename System.{hh,cc} to RubySystem.{hh,cc}

The eventual aim of this change is to pass RubySystem pointers through to
objects generated from the SLICC protocol code.

Because some of these objects need to dereference their RubySystem pointers,
they need access to the System.hh header file.

In src/mem/ruby/SConscript, the MakeInclude function creates single-line header
files in the build directory that do nothing except include the corresponding
header file from the source tree.

However, SLICC also generates a list of header files from its symbol table, and
writes it to mem/protocol/Types.hh in the build directory. This code assumes
that the header file name is the same as the class name.

The end result of this is the many of the generated slicc files try to include
RubySystem.hh, when the file they really need is System.hh. The path of least
resistence is just to rename System.hh to RubySystem.hh.

--HG--
rename : src/mem/ruby/system/System.cc => src/mem/ruby/system/RubySystem.cc
rename : src/mem/ruby/system/System.hh => src/mem/ruby/system/RubySystem.hh

8 years agoslicc: export uint64_t instead of uint64
Anthony Gutierrez [Wed, 16 Sep 2015 16:01:39 +0000 (12:01 -0400)]
slicc: export uint64_t instead of uint64

8 years agostats: files for regression tests for Learning gem5 scripts
Jason Lowe-Power [Wed, 16 Sep 2015 14:35:36 +0000 (09:35 -0500)]
stats: files for regression tests for Learning gem5 scripts

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

8 years agotests: Add tests for the Learning gem5 scripts
Jason Lowe-Power [Wed, 16 Sep 2015 14:35:36 +0000 (09:35 -0500)]
tests: Add tests for the Learning gem5 scripts

These tests will ensure that Learning gem5 scripts are always up to date with
the changes in the mainline of gem5.

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

8 years agoconfig: Add configs scripts used in Learning gem5
Jason Lowe-Power [Wed, 16 Sep 2015 14:35:36 +0000 (09:35 -0500)]
config: Add configs scripts used in Learning gem5

Added a new directory in configs (learning_gem5) to hold the scripts that are
used in the book. See http://lowepower.com/jason/learning_gem5/ for a working
copy. For now, only the scripts in Part 1: Getting started with gem5
have been added. A separate patch adds tests for these scripts.

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

8 years agostats: updates due to recent changesets including d0934b57735a
Nilay Vaish [Tue, 15 Sep 2015 13:14:09 +0000 (08:14 -0500)]
stats: updates due to recent changesets including d0934b57735a

8 years agosparc: writing to tick_cmpr should not cause a panic
Palle Lyckegaard [Tue, 15 Sep 2015 13:14:07 +0000 (08:14 -0500)]
sparc: writing to tick_cmpr should not cause a panic

This register is writable according to UA2005

Tried to boot NetBSD which starts the kernel by writing to the tick_cmpr
register.  Without the patch gem5 crashes with a panic.  With the patch NetBSD
starts to boot normally (although sun4v support in NetBSD is not complete yet)

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

8 years agodev: IDE Disk: Handle bad IDE image size
Dongxue Zhang [Tue, 15 Sep 2015 13:14:07 +0000 (08:14 -0500)]
dev: IDE Disk: Handle bad IDE image size

Handle bad IDE disk image size 0. When image size is 0, gem5 will cause an
exception with log "Floating point exception (core dumped)".

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

8 years agomisc: Bugfix for Freezing Terminal in SystemC Simulation
Abdul Mutaal Ahmad [Tue, 15 Sep 2015 13:14:07 +0000 (08:14 -0500)]
misc: Bugfix for Freezing Terminal in SystemC Simulation

If the terminal was used in the SystemC or TLM simulations the simulation gets
in a deadlock state. This is because of the Event queue gets locked while
servicing the async events leading to event queue deadlock. This was solved by
locking the queue at the beginning of service of async events.

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

8 years agomisc: Bugfix in TLM integration regarding CleanEvict Command
Abdul Mutaal Ahmad [Tue, 15 Sep 2015 13:14:07 +0000 (08:14 -0500)]
misc: Bugfix in TLM integration regarding CleanEvict Command
The CleanEvict command was not considered in /util/tlm/sc_port.cc this could
lead to a simulator crash. This issue is solved by ignoring this special
command type.

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

8 years agocpu: pred: Local Predictor Reset in Tournament Predictor
Andrew Lukefahr [Tue, 15 Sep 2015 13:14:07 +0000 (08:14 -0500)]
cpu: pred: Local Predictor Reset in Tournament Predictor

When a branch gets squashed, it's speculative branch predictor state should get
rolled back in squash().  However, only the globalHistory state was being
rolled back.  This patch adds (at least some) support for rolling back the
local predictor state also.

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

8 years agocpu, o3: consider split requests for LSQ checksnoop operations
Hongil Yoon [Tue, 15 Sep 2015 13:14:06 +0000 (08:14 -0500)]
cpu, o3: consider split requests for LSQ checksnoop operations

This patch enables instructions in LSQ to track two physical addresses for
corresponding two split requests. Later, the information is used in
checksnoop() to search for/invalidate the corresponding LD instructions.

The current implementation has kept track of only the physical address that is
referenced by the first split request. Thus, for checksnoop(), the line
accessed by the second request has not been considered, causing potential
correctness issues.

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

8 years agoruby: topology: refactor code.
Nilay Vaish [Mon, 14 Sep 2015 15:14:50 +0000 (10:14 -0500)]
ruby: topology: refactor code.

8 years agoruby: slicc: remove member buffer_expr from Var class
Nilay Vaish [Mon, 14 Sep 2015 15:04:55 +0000 (10:04 -0500)]
ruby: slicc: remove member buffer_expr from Var class
This was added by changeset 51f40b101a56.  Instead, buffer_expr would now be
associated with the InPort class.

8 years agomerged with 62e1504b9c64
Nilay Vaish [Sat, 12 Sep 2015 21:23:47 +0000 (16:23 -0500)]
merged with 62e1504b9c64

8 years agoruby: perfect switch: refactor code
Nilay Vaish [Sat, 12 Sep 2015 21:16:17 +0000 (16:16 -0500)]
ruby: perfect switch: refactor code
Refactored the code in operateVnet(), moved partly to a new function
operateMessageBuffer().  This is required since a later patch moves to having a
wakeup event per MessageBuffer instead of one event for the entire Switch.

8 years agoruby: simple network: store Switch* in PerfectSwitch and Throttle
Nilay Vaish [Sat, 12 Sep 2015 21:16:03 +0000 (16:16 -0500)]
ruby: simple network: store Switch* in PerfectSwitch and Throttle
There are two reasons for doing so:

a. provide a source of clock to PerfectSwitch. A follow on patch removes sender
and receiver pointers from MessageBuffer means that the object owning the
buffer should have some way of providing timing info.

b. schedule events.  A follow on patch removes the consumer class.  So the
PerfectSwitch needs some EventManager object to schedule events on its own.

8 years agodev: Add an underrun statistic to the HDLCD controller
Andreas Sandberg [Fri, 11 Sep 2015 14:56:09 +0000 (15:56 +0100)]
dev: Add an underrun statistic to the HDLCD controller

Add a stat that counts buffer underruns in the HDLCD controller. The
stat counts at most one underrun per frame since the controller aborts
the current frame if it underruns.

8 years agodev, arm: Rewrite the HDLCD controller
Andreas Sandberg [Fri, 11 Sep 2015 14:55:46 +0000 (15:55 +0100)]
dev, arm: Rewrite the HDLCD controller

Rewrite the HDLCD controller to use the new DMA engine and pixel
pump. This fixes several bugs in the current implementation:

   * Broken/missing interrupt support (VSync, underrun, DMA end)
   * Fragile resolution changes (changing resolutions used
     to cause assertion errors).
   * Support for resolutions with a width that isn't divisible by 32.
   * The pixel clock can now be set dynamically.

This breaks checkpoint compatibility. Checkpoints can be upgraded with
the checkpoint conversion script. However, upgraded checkpoints won't
contain the state of the current frame. That means that HDLCD
controllers restoring from a converted checkpoint immediately start
drawing a new frame (i.e, expect timing differences).

8 years agoruby: slicc: remove nextLineHack from Type.py
Nilay Vaish [Wed, 9 Sep 2015 00:32:04 +0000 (19:32 -0500)]
ruby: slicc: remove nextLineHack from Type.py

8 years agoconfig: allow ruby to be used with Minor CPU
Nilay Vaish [Mon, 7 Sep 2015 04:11:11 +0000 (23:11 -0500)]
config: allow ruby to be used with Minor CPU

8 years agoruby: call setMRU from L1 controllers, not from sequencer
Nilay Vaish [Sat, 5 Sep 2015 14:35:39 +0000 (09:35 -0500)]
ruby: call setMRU from L1 controllers, not from sequencer
Currently the sequencer calls the function setMRU that updates the replacement
policy structures with the first level caches.  While functionally this is
correct, the problem is that this requires calling findTagInSet() which is an
expensive function.  This patch removes the calls to setMRU from the sequencer.
All controllers should now update the replacement policy on their own.

The set and the way index for a given cache entry can be found within the
AbstractCacheEntry structure. Use these indicies to update the replacement
policy structures.

8 years agoruby: adds set and way indices to AbstractCacheEntry
Nilay Vaish [Sat, 5 Sep 2015 14:35:31 +0000 (09:35 -0500)]
ruby: adds set and way indices to AbstractCacheEntry

8 years agoruby: set: reimplement using std::bitset
Nilay Vaish [Sat, 5 Sep 2015 14:34:25 +0000 (09:34 -0500)]
ruby: set: reimplement using std::bitset
The current Set data structure is slow and therefore is being reimplemented
using std::bitset. A maximum limit of 64 is being set on the number of
controllers of each type.  This means that for simulating a system with more
controllers of a given type, one would need to change the value of the variable
NUMBER_BITS_PER_SET

8 years agoruby: declare all protocol message buffers as parameters
Nilay Vaish [Sat, 5 Sep 2015 14:34:24 +0000 (09:34 -0500)]
ruby: declare all protocol message buffers as parameters

MessageBuffer is a SimObject now.  There were protocols that still declared
some of the message buffers are variables of the controller, but not as input
parameters.  Special handling was required for these variables in the SLICC
compiler.  This patch changes this.  Now all message buffers are declared as
input parameters.

8 years agomem: Avoid setting markPending if not needed
Andreas Hansson [Fri, 4 Sep 2015 17:14:03 +0000 (13:14 -0400)]
mem: Avoid setting markPending if not needed

In cases where a newly added target does not have any upstream MSHR to
mark as downstreamPending, remember that nothing is marked. This
allows us to avoid attempting to find the MSHR as part of the clearing
of downstreamPending.

8 years agomem: Tidy up CacheSet
Andreas Hansson [Fri, 4 Sep 2015 17:14:01 +0000 (13:14 -0400)]
mem: Tidy up CacheSet

Minor tweaks and house keeping.

8 years agomem: Tidy up the snoop state-transition logic
Andreas Hansson [Fri, 4 Sep 2015 17:13:58 +0000 (13:13 -0400)]
mem: Tidy up the snoop state-transition logic

Remove broken and unused option to pass dirty data on non-exclusive
snoops. Also beef up the comments a bit.

8 years agosim: Fix time unit in abort message
Andreas Hansson [Fri, 4 Sep 2015 17:13:55 +0000 (13:13 -0400)]
sim: Fix time unit in abort message

8 years agomerged with recent commits.
Nilay Vaish [Thu, 3 Sep 2015 20:40:20 +0000 (15:40 -0500)]
merged with recent commits.

8 years agoAdded tag stable_2015_09_03 for changeset 60eb3fef9c2d
Nilay Vaish [Thu, 3 Sep 2015 20:38:46 +0000 (15:38 -0500)]
Added tag stable_2015_09_03 for changeset 60eb3fef9c2d

8 years agosim: tag-based checkpoint versioning
Curtis Dunham [Wed, 2 Sep 2015 20:23:30 +0000 (15:23 -0500)]
sim: tag-based checkpoint versioning

This commit addresses gem5 checkpoints' linear versioning bottleneck.
Since development is distributed across many private trees, there exists
a sort of 'race' for checkpoint version numbers: internally a checkpoint
version may be used but then resynchronizing with the external tree causes
a conflict on that version.  This change replaces the linear version number
with a set of unique strings called tags.  Now the only conflicts that can
arise are of tag names, where collisions are much easier to avoid.

The checkpoint upgrader (util/cpt_upgrader.py) upgrades the version
representation, as one would expect. Each tag version implements its
upgrader code in a python file in the util/cpt_upgraders directory
rather than adding a function to the upgrader script itself.

The version tags are stored in the 'Globals' section rather than 'root'
(as the version was previously) because 'Globals' gets unserialized
first and can provide a warning before any other unserialization errors
can occur.

8 years agosim: support checkpointing std::set<std::string>'s
Curtis Dunham [Wed, 2 Sep 2015 20:19:44 +0000 (15:19 -0500)]
sim: support checkpointing std::set<std::string>'s

This is in support of tag-based checkpoint versioning; the version tags
are stored in string sets. This commit adds such support.

8 years agosim: make warning for absent optional parameters optional
Curtis Dunham [Wed, 2 Sep 2015 20:19:43 +0000 (15:19 -0500)]
sim: make warning for absent optional parameters optional

This is in support of tag-based checkpoint versioning. It should be
possible to examine an optional parameter in a checkpoint during
unserialization and not have it throw a warning.

8 years agoruby: remove random seed
Nilay Vaish [Tue, 1 Sep 2015 20:50:33 +0000 (15:50 -0500)]
ruby: remove random seed
We no longer use the C library based random number generator: random().
Instead we use the C++ library provided rng.  So setting the random seed for
the RubySystem class has no effect.  Hence the variable and the corresponding
option are being dropped.

8 years agoruby: directory memory: drop unused variable.
Nilay Vaish [Tue, 1 Sep 2015 20:50:32 +0000 (15:50 -0500)]
ruby: directory memory: drop unused variable.

8 years agosim: Remove broken AutoSerialize support from the event queue
Andreas Sandberg [Tue, 1 Sep 2015 14:28:45 +0000 (15:28 +0100)]
sim: Remove broken AutoSerialize support from the event queue

Event auto-serialization no longer in use and has been broken ever
since the introduction of PDES support almost two years
ago. Additionally, serializing the individual event queues is
undesirable since it exposes the thread structure of the
simulator. What this means in practice is that the number of threads
in the simulator must be the same when taking a checkpoint and when
loading the checkpoint.

This changeset removes support for the AutoSerialize event flag and
the associated serialization code.

8 years agodev: Remove auto-serialization dependency in EtherLink
Andreas Sandberg [Tue, 1 Sep 2015 14:28:44 +0000 (15:28 +0100)]
dev: Remove auto-serialization dependency in EtherLink

EtherLink currently uses a fire-and-forget link delay event that
delays sending of packets by a fixed number of ticks. In order to
serialize this event, it relies on the event queue's auto
serialization support. However, support for event auto serialization
has been broken for more than two years, which means that checkpoints
of multi-system setups are likely to drop in-flight packets.

This changeset the replaces rewrites this part of the EtherLink to use
a packet queue instead. The queue contains a (tick, packet) tuple. The
tick indicates when the packet will be ready. Instead of relying on
event autoserialization, we now explicitly serialize the packet queue
in the EhterLink::Link class.

Note that this changeset changes the way in-flight packages are
serialized. Old checkpoints will still load, but in-flight packets
will be dropped (just as before). There has been no attempt to upgrade
checkpoints since this would actually change the behavior of existing
checkpoints.

8 years agosim: Remove autoserialize support for exit events
Andreas Sandberg [Tue, 1 Sep 2015 12:41:45 +0000 (13:41 +0100)]
sim: Remove autoserialize support for exit events

This changeset removes the support for the autoserialize parameter in
GlobalSimLoopExitEvent (including exitSimLoop()) and
LocalSimLoopExitEvent.

Auto-serialization of the LocalSimLoopExitEvent was never used, so
this is not expected to affect anything. However, it was sometimes
used for GlobalSimLoopExitEvent. Unfortunately, serialization of
global events has never been supported, so checkpoints with such
events will currently cause simulation panics.

The serialize parameter to exitSimLoop() has been left in-place to
maintain API compatibility (removing it would affect m5ops). Instead
of just dropping it, we now print a warning if the parameter is set
and the exit event is scheduled in the future (i.e., not at the
current tick).

8 years agosim: Remove unused SerializeBuilder interface
Andreas Sandberg [Tue, 1 Sep 2015 12:40:28 +0000 (13:40 +0100)]
sim: Remove unused SerializeBuilder interface

8 years agosim: Replace fromInt/fromSimObject with decltype
Andreas Sandberg [Tue, 1 Sep 2015 12:40:25 +0000 (13:40 +0100)]
sim: Replace fromInt/fromSimObject with decltype

8 years agosim: Move SimObject resolver to sim_object.hh
Andreas Sandberg [Tue, 1 Sep 2015 12:40:05 +0000 (13:40 +0100)]
sim: Move SimObject resolver to sim_object.hh

The object resolver isn't serialization specific and shouldn't live in
serialize.hh. Move it to sim_object.hh since it queries to the
SimObject hierarchy.

8 years agostats: updates due to recent changes.
Nilay Vaish [Sun, 30 Aug 2015 17:24:19 +0000 (12:24 -0500)]
stats: updates due to recent changes.

8 years agoruby: specify number of vnets for each protocol
Nilay Vaish [Sun, 30 Aug 2015 17:24:18 +0000 (12:24 -0500)]
ruby: specify number of vnets for each protocol
The default value for number of virtual networks is being removed.  Each protocol
should now specify the value it needs.

8 years agoruby: network: drop member m_in_use
Nilay Vaish [Sun, 30 Aug 2015 17:24:18 +0000 (12:24 -0500)]
ruby: network: drop member m_in_use

This member indicates whether or not a particular virtual network is in use.
Instead of having a default big value for the number of virtual networks and
then checking whether a virtual network is in use, the next patch removes the
default value and the protocol configuration file would now specify the
number of virtual networks it requires.

Additionally, the patch also refactors some of the code used for computing the
virtual channel next in the round robin order.

8 years agoruby: garnet: mark few functions const in BaseGarnetNetwork.hh
Nilay Vaish [Sun, 30 Aug 2015 17:24:18 +0000 (12:24 -0500)]
ruby: garnet: mark few functions const in BaseGarnetNetwork.hh

8 years agoruby: slicc: avoid duplicate code for function argument check
Nilay Vaish [Sun, 30 Aug 2015 15:52:58 +0000 (10:52 -0500)]
ruby: slicc: avoid duplicate code for function argument check
Both FuncCallExprAST and MethodCallExprAST had code for checking the arguments
with which a function is being called.  The patch does away with this
duplication.  Now the code for checking function call arguments resides in the
Func class.

8 years agoruby: eliminate type uint64 and int64
Nilay Vaish [Sat, 29 Aug 2015 15:19:23 +0000 (10:19 -0500)]
ruby: eliminate type uint64 and int64
These types are being replaced with uint64_t and int64_t.

8 years agoruby: Use the const serialize interface in RubySystem
Andreas Sandberg [Fri, 28 Aug 2015 09:58:44 +0000 (10:58 +0100)]
ruby: Use the const serialize interface in RubySystem

The new serialization code (kudos to Tim Jones) moves all of the state
mangling in RubySystem to memWriteback. This makes it possible to use
the new const serialization interface.

This changeset moves the cache recorder cleanup from the checkpoint()
method to drainResume() to make checkpointing truly constant and
updates the checkpointing code to use the new interface.

8 years agoruby: handle llsc accesses through CacheEntry, not CacheMemory
Nilay Vaish [Thu, 27 Aug 2015 17:51:40 +0000 (12:51 -0500)]
ruby: handle llsc accesses through CacheEntry, not CacheMemory

The sequencer takes care of llsc accesses by calling upon functions
from the CacheMemory.  This is unnecessary once the required CacheEntry object
is available.  Thus some of the calls to findTagInSet() are avoided.

8 years agocpu: quiesce pseudoinsts: Always do full quiesce
Emilio Castillo [Wed, 26 Aug 2015 19:20:30 +0000 (14:20 -0500)]
cpu: quiesce pseudoinsts: Always do full quiesce

The O3CPU blocks the Fetch when it sees a quiesce instruction (IsQuiesce flag).
When the inst. is executed, a quiesce event is created to reactivate the
context and unblock the Fetch.

If the quiesceNs or quiesceCycles are called with a value of 0, the
QuiesceEvent will not be created and the Fetch stage will remain blocked.

Committed by Joel Hestness <jthestness@gmail.com>

8 years agomem: Revert requirement on packet addr/size always valid
Andreas Hansson [Mon, 24 Aug 2015 09:03:45 +0000 (05:03 -0400)]
mem: Revert requirement on packet addr/size always valid

This patch reverts part of (842f56345a42), as apparently there are
use-cases outside the main repository relying on the late setting of
the physical address.

8 years agomem: Reflect that packet address and size are always valid
Andreas Hansson [Fri, 21 Aug 2015 11:03:27 +0000 (07:03 -0400)]
mem: Reflect that packet address and size are always valid

This patch simplifies the packet, and removes the possibility of
creating a packet without a valid address and/or size. Under no
circumstances are these fields set at a later point, and thus they
really have to be provided at construction time.

The patch also fixes a case there the MinorCPU creates a packet
without a valid address and size, only to later delete it.

8 years agoarm, mem: Remove unused CLEAR_LL request flag
Andreas Hansson [Fri, 21 Aug 2015 11:03:25 +0000 (07:03 -0400)]
arm, mem: Remove unused CLEAR_LL request flag

Cleaning up dead code. The CLREX stores zero directly to
MISCREG_LOCKFLAG and so the request flag is no longer needed. The
corresponding functionality in the cache tags is also removed.

8 years agomem: Remove unused cache squash functionality
Andreas Hansson [Fri, 21 Aug 2015 11:03:24 +0000 (07:03 -0400)]
mem: Remove unused cache squash functionality

Tidying up.

8 years agomem: Add explicit Cache subclass and make BaseCache abstract
Andreas Hansson [Fri, 21 Aug 2015 11:03:23 +0000 (07:03 -0400)]
mem: Add explicit Cache subclass and make BaseCache abstract

Open up for other subclasses to BaseCache and transition to using the
explicit Cache subclass.

--HG--
rename : src/mem/cache/BaseCache.py => src/mem/cache/Cache.py

8 years agoruby: Move Rubys cache class from Cache.py to RubyCache.py
Andreas Hansson [Fri, 21 Aug 2015 11:03:21 +0000 (07:03 -0400)]
ruby: Move Rubys cache class from Cache.py to RubyCache.py

This patch serves to avoid name clashes with the classic cache. For
some reason having two 'SimObject' files with the same name creates
problems.

--HG--
rename : src/mem/ruby/structures/Cache.py => src/mem/ruby/structures/RubyCache.py

8 years agomem: Move cache_impl.hh to cache.cc
Andreas Hansson [Fri, 21 Aug 2015 11:03:20 +0000 (07:03 -0400)]
mem: Move cache_impl.hh to cache.cc

There is no longer any need to keep the implementation in a header.

8 years agocpu: Move invldPid constant from Request to BaseCPU
Andreas Hansson [Fri, 21 Aug 2015 11:03:14 +0000 (07:03 -0400)]
cpu: Move invldPid constant from Request to BaseCPU

A more natural home for this constant.

8 years agoruby: reverts to changeset: bf82f1f7b040
Nilay Vaish [Wed, 19 Aug 2015 15:02:01 +0000 (10:02 -0500)]
ruby: reverts to changeset: bf82f1f7b040

8 years agoruby: add accessor functions to SLICC def of MachineID
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: add accessor functions to SLICC def of MachineID

8 years agoruby: simple network: refactor code
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: simple network: refactor code

Drops an unused variable and marks three variables as const.

8 years agoruby: profiler: provide the number of vnets through ruby system
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: profiler: provide the number of vnets through ruby system

The aim is to ultimately do away with the static function
Network::getNumberOfVirtualNetworks().

8 years agoruby: directory memory: drop unused variable.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: directory memory: drop unused variable.

8 years agoruby: slicc: remove a stray line in StateMachine.py
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: slicc: remove a stray line in StateMachine.py

8 years agoruby: garnet: flexible: refactor flit
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: garnet: flexible: refactor flit

8 years agoruby: DataBlock: adds a comment
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: DataBlock: adds a comment

8 years agoruby: remove random seed
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: remove random seed

We no longer use the C library based random number generator: random().
Instead we use the C++ library provided rng.  So setting the random seed for
the RubySystem class has no effect.  Hence the variable and the corresponding
option are being dropped.

8 years agoruby: SubBlock: refactor code
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: SubBlock: refactor code

8 years agoruby: cache recorder: move check on block size to RubySystem.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: cache recorder: move check on block size to RubySystem.

8 years agoruby: abstract controller: mark some variables as const
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: abstract controller: mark some variables as const

8 years agoruby: simple network: store Switch* in PerfectSwitch and Throttle
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: simple network: store Switch* in PerfectSwitch and Throttle

8 years agoruby: remove unused functionalRead() function.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: remove unused functionalRead() function.

8 years agoruby: perfect switch: refactor code
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: perfect switch: refactor code

Refactored the code in operateVnet(), moved partly to a new function
operateMessageBuffer().

8 years agoruby: cache memory: drop {try,test}CacheAccess functions
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: cache memory: drop {try,test}CacheAccess functions

8 years agoruby: call setMRU from L1 controllers, not from sequencer
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: call setMRU from L1 controllers, not from sequencer
Currently the sequencer calls the function setMRU that updates the replacement
policy structures with the first level caches.  While functionally this is
correct, the problem is that this requires calling findTagInSet() which is an
expensive function.  This patch removes the calls to setMRU from the sequencer.
All controllers should now update the replacement policy on their own.

The set and the way index for a given cache entry can be found within the
AbstractCacheEntry structure. Use these indicies to update the replacement
policy structures.

8 years agoruby: adds set and way indices to AbstractCacheEntry
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: adds set and way indices to AbstractCacheEntry

8 years agoruby: eliminate type uint64 and int64
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: eliminate type uint64 and int64

These types are being replaced with uint64_t and int64_t.

8 years agoruby: slicc: use default argument value
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: slicc: use default argument value
Before this patch, while one could declare / define a function with default
argument values, but the actual function call would require one to specify
all the arguments.  This patch changes the check for  function arguments.
Now a function call needs to specify arguments that are at least as much as
those with default values and at most the total number of arguments taken
as input by the function.

8 years agoruby: slicc: avoid duplicate code for function argument check
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: slicc: avoid duplicate code for function argument check
Both FuncCallExprAST and MethodCallExprAST had code for checking the arguments
with which a function is being called.  The patch does away with this
duplication.  Now the code for checking function call arguments resides in the
Func class.

8 years agoruby: drop the [] notation for lookup function.
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: drop the [] notation for lookup function.

This is in preparation for adding a second arugment to the lookup
function for the CacheMemory class.  The change to *.sm files was made using
the following sed command:

sed -i 's/\[\([0-9A-Za-z._()]*\)\]/.lookup(\1)/' src/mem/protocol/*.sm

8 years agoruby: handle llsc accesses through CacheEntry, not CacheMemory
Nilay Vaish [Sat, 15 Aug 2015 00:28:42 +0000 (19:28 -0500)]
ruby: handle llsc accesses through CacheEntry, not CacheMemory

The sequencer takes care of llsc accesses by calling upon functions
from the CacheMemory.  This is unnecessary once the required CacheEntry object
is available.  Thus some of the calls to findTagInSet() are avoided.

8 years agostats: updates to ruby fs regression test
Nilay Vaish [Sat, 15 Aug 2015 00:26:43 +0000 (19:26 -0500)]
stats: updates to ruby fs regression test

Changes due to recent patches: fc1e41e88fd3882ce080c9f7e8a6637afa4c, and
e6e3b7097810 by Joel Hestness.

8 years agoruby: replace Address by Addr
Nilay Vaish [Fri, 14 Aug 2015 17:04:51 +0000 (12:04 -0500)]
ruby: replace Address by Addr
This patch eliminates the type Address defined by the ruby memory system.
This memory system would now use the type Addr that is in use by the
rest of the system.

8 years agoruby: rename variables Addr to addr
Nilay Vaish [Fri, 14 Aug 2015 17:04:47 +0000 (12:04 -0500)]
ruby: rename variables Addr to addr

Avoid clash between type Addr and variable name Addr.

8 years agostats: Bump for MessageBuffer, cache latency changes
Joel Hestness [Fri, 14 Aug 2015 06:19:34 +0000 (01:19 -0500)]
stats: Bump for MessageBuffer, cache latency changes