Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: simple network: store Switch* in PerfectSwitch and Throttle
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: remove unused functionalRead() function.
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().
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: cache memory: drop {try,test}CacheAccess functions
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.
Nilay Vaish [Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)]
ruby: adds set and way indices to AbstractCacheEntry
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.
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.
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.
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
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.
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:
fc1e41e88fd3,
882ce080c9f7,
e8a6637afa4c, and
e6e3b7097810 by Joel Hestness.
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.
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.
Joel Hestness [Fri, 14 Aug 2015 06:19:34 +0000 (01:19 -0500)]
stats: Bump for MessageBuffer, cache latency changes
Joel Hestness [Fri, 14 Aug 2015 05:19:45 +0000 (00:19 -0500)]
ruby: Protocol changes for SimObject MessageBuffers
Joel Hestness [Fri, 14 Aug 2015 05:19:44 +0000 (00:19 -0500)]
ruby: Expose MessageBuffers as SimObjects
Expose MessageBuffers from SLICC controllers as SimObjects that can be
manipulated in Python. This patch has numerous benefits:
1) First and foremost, it exposes MessageBuffers as SimObjects that can be
manipulated in Python code. This allows parameters to be set and checked in
Python code to avoid obfuscating parameters within protocol files. Further, now
as SimObjects, MessageBuffer parameters are printed to config output files as a
way to track parameters across simulations (e.g. buffer sizes)
2) Cleans up special-case code for responseFromMemory buffers, and aligns their
instantiation and use with mandatoryQueue buffers. These two special buffers
are the only MessageBuffers that are exposed to components outside of SLICC
controllers, and they're both slave ends of these buffers. They should be
exposed outside of SLICC in the same way, and this patch does it.
3) Distinguishes buffer-specific parameters from buffer-to-network parameters.
Specifically, buffer size, randomization, ordering, recycle latency, and ports
are all specific to a MessageBuffer, while the virtual network ID and type are
intrinsics of how the buffer is connected to network ports. The former are
specified in the Python object, while the latter are specified in the
controller *.sm files. Unlike buffer-specific parameters, which may need to
change depending on the simulated system structure, buffer-to-network
parameters can be specified statically for most or all different simulated
systems.
Joel Hestness [Fri, 14 Aug 2015 05:19:39 +0000 (00:19 -0500)]
ruby: Change PerfectCacheMemory::lookup to return pointer
CacheMemory and DirectoryMemory lookup functions return pointers to entries
stored in the memory. Bring PerfectCacheMemory in line with this convention,
and clean up SLICC code generation that was in place solely to handle
references like that which was returned by PerfectCacheMemory::lookup.
Joel Hestness [Fri, 14 Aug 2015 05:19:37 +0000 (00:19 -0500)]
ruby: Remove the RubyCache/CacheMemory latency
The RubyCache (CacheMemory) latency parameter is only used for top-level caches
instantiated for Ruby coherence protocols. However, the top-level cache hit
latency is assessed by the Sequencer as accesses flow through to the cache
hierarchy. Further, protocol state machines should be enforcing these cache hit
latencies, but RubyCaches do not expose their latency to any existng state
machines through the SLICC/C++ interface. Thus, the RubyCache latency parameter
is superfluous for all caches. This is confusing for users.
As a step toward pushing L0/L1 cache hit latency into the top-level cache
controllers, move their latencies out of the RubyCache declarations and over to
their Sequencers. Eventually, these Sequencer parameters should be exposed as
parameters to the top-level cache controllers, which should assess the latency.
NOTE: Assessing these latencies in the cache controllers will require modifying
each to eliminate instantaneous Ruby hit callbacks in transitions that finish
accesses, which is likely a large undertaking.
Nilay Vaish [Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)]
sim: clocked object: function for converting cycles to ticks.
Nilay Vaish [Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)]
ruby: drop some redundant includes
Nilay Vaish [Tue, 11 Aug 2015 16:39:23 +0000 (11:39 -0500)]
ruby: slicc: allow mathematical operations on Ticks
Andreas Sandberg [Fri, 7 Aug 2015 16:43:21 +0000 (17:43 +0100)]
sim: Flag EventQueue::getCurTick() as const
Andreas Sandberg [Fri, 7 Aug 2015 14:39:17 +0000 (15:39 +0100)]
stats: Update ARM stats to include programmable oscillators
Andreas Sandberg [Fri, 7 Aug 2015 08:59:28 +0000 (09:59 +0100)]
mem: Cleanup packet accessor methods
The Packet::get() and Packet::set() methods both have very strange
semantics. Currently, they automatically convert between the guest
system's endianness and the host system's endianness. This behavior is
usually undesired and unexpected.
This patch introduces three new method pairs to access data:
* getLE() / setLE() - Get data stored as little endian.
* getBE() / setBE() - Get data stored as big endian.
* get(ByteOrder) / set(v, ByteOrder) - Configurable endianness
For example, a little endian device that is receiving a write request
will use teh getLE() method to get the data from the packet.
The old interface will be deprecated once all existing devices have
been ported to the new interface.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:26 +0000 (09:59 +0100)]
dev: Implement a simple display timing generator
Timing generator for a pixel-based display. The timing generator is
intended for display processors driving a standard rasterized
display. The simplest possible display processor needs to derive from
this class and override the nextPixel() method to feed the display
with pixel data.
Pixels are ordered relative to the top left corner of the
display. Scan lines appear in the following order:
* Vertical Sync (starting at line 0)
* Vertical back porch
* Visible lines
* Vertical front porch
Pixel order within a scan line:
* Horizontal Sync
* Horizontal Back Porch
* Visible pixels
* Horizontal Front Porch
All events in the timing generator are automatically suspended on a
drain() request and restarted on drainResume(). This is conceptually
equivalent to clock gating when the pixel clock while the system is
draining. By gating the pixel clock, we prevent display controllers
from disturbing a memory system that is about to drain.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:25 +0000 (09:59 +0100)]
arm: Add support for programmable oscillators
Add support for oscillators that can be programmed using the RealView
/ Versatile Express configuration interface. These oscillators are
typically used for things like the pixel clock in the display
controller.
The default configurations support the oscillators from a Versatile
Express motherboard (V2M-P1) with a CoreTile Express A15x2.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:23 +0000 (09:59 +0100)]
dev: Add a simple DMA engine that can be used by devices
Add a simple DMA engine that sits behind a FIFO. This engine can be
used by devices that need to read large amounts of data (e.g., display
controllers). Most aspects of the controller, such as FIFO size,
maximum number of in-flight accesses, and maximum request sizes can be
configured.
The DMA copies blocks of data into its FIFO. Transfers are initiated
with a call to startFill() command that takes a start address and a
size. Advanced users can create a derived class that overrides the
onEndOfBlock() callback that is triggered when the last request to a
block has been issued. At this point, the DMA engine is ready to start
fetching a new block of data, potentially from a different address
range.
The DMA engine stops issuing new requests while it is draining. Care
must be taken to ensure that devices that are fed by a DMA engine are
suspended while the system is draining to avoid buffer underruns.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:22 +0000 (09:59 +0100)]
sim: Split ClockedObject to make it usable to non-SimObjects
Split ClockedObject into two classes: Clocked that provides the basic
clock functionality, and ClockedObject that inherits from Clocked and
SimObject to provide the functionality of the old ClockedObject.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:19 +0000 (09:59 +0100)]
base: Rewrite the CircleBuf to fix bugs and add serialization
The CircleBuf class has at least one bug causing it to overwrite the
wrong elements when wrapping. The current code has a lot of unused
functionality and duplicated code. This changeset replaces the old
implementation with a new version that supports serialization and
arbitrary types in the buffer (not just char).
Andreas Sandberg [Fri, 7 Aug 2015 08:59:15 +0000 (09:59 +0100)]
dev, x86: Fix serialization bug in the i8042 device
The i8042 device drops the contents of a PS2 device's buffer when
serializing, which results in corrupted PS2 state when continuing
simulation after a checkpoint. This changeset fixes this bug and
transitions the i8042 model to use the new serialization API that
requires the serialize() method to be const.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:14 +0000 (09:59 +0100)]
dev: Make serialization in Sinic constant
This changeset transitions the Sinic device to the new serialization
framework that requires the serialization method to be constant.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:13 +0000 (09:59 +0100)]
base: Declare a type for context IDs
Context IDs used to be declared as ad hoc (usually as int). This
changeset introduces a typedef for ContextIDs and a constant for
invalid context IDs.
Andreas Sandberg [Fri, 7 Aug 2015 08:59:12 +0000 (09:59 +0100)]
base: Use constexpr in Cycles
Declare the constructor and all of the operators that don't change the
state of a Cycles instance as constexpr. This makes it possible to use
Cycles as a static constant and allows the compiler to evaulate simple
expressions at compile time. An unfortunate side-effect of this is
that we cannot use assertions since C++11 doesn't support them in
constexpr functions. As a workaround, we throw an invalid_argument
exception when the assert would have triggered. A nice side-effect of
this is that the compiler will evaluate the "assertion" at compile
time when an expression involving Cycles can be statically evaluated.
Andreas Hansson [Fri, 7 Aug 2015 08:55:38 +0000 (04:55 -0400)]
mem: Remove extraneous acquire/release flags and attributes
This patch removes the extraneous flags and attributes from the
request and packet, and simply leaves the new commands. The change
introduced when adding acquire/release breaks all compatibility with
existing traces, and there is really no need for any new flags and
attributes. The commands should be sufficient.
This patch fixes packet tracing (urgent), and also removes the
unnecessary complexity.
Andreas Sandberg [Wed, 5 Aug 2015 09:27:11 +0000 (10:27 +0100)]
sim: Fixup comments and constness in draining infrastructure
Fix comments that got outdated by the draining rewrite. Also fixup
constness for methods in the querying drain state in the DrainManager.
Andreas Sandberg [Wed, 5 Aug 2015 09:12:12 +0000 (10:12 +0100)]
mem: Fixup incorrect include guards
--HG--
extra : rebase_source :
9dba84eaf9c734a114ecd0940e1d505303644064
Andreas Hansson [Wed, 5 Aug 2015 08:36:31 +0000 (04:36 -0400)]
util: Enable DRAM sweep to print power and efficiency
This patch enhances the functionality of the DRAM sweep script to not
only plot the bandwidth utilisation, but also total power and power
efficiency. To do so, a command-line switch is added, and a bit more
data extracted from the stats.
Andreas Hansson [Wed, 5 Aug 2015 08:36:29 +0000 (04:36 -0400)]
stats: Reflect current behaviour
Not sure what went wrong in the pushing of the Ruby patches, but
somehow these regressions are not updated.
Andreas Sandberg [Tue, 4 Aug 2015 09:31:37 +0000 (10:31 +0100)]
sim: Initialize Drainable::_drainState to the system's state
It is sometimes desirable to be able to instantiate Drainable objects
when the simulator isn't in the Running state. Currently, we always
initialize Drainable objects to the Running state. However, this
confuses many of the sanity checks in the base class since objects
aren't expected to be in the Running state if the system is in the
Draining or Drained state.
Instead of always initializing the state variable in Drainable to
DrainState::Running, initialize it to the state the DrainManager is
in.
Note: This means an object can be created in the Draining/Drained
state without first calling drain().
Andreas Sandberg [Tue, 4 Aug 2015 09:29:13 +0000 (10:29 +0100)]
stats: Update stats for tgen to reflect CommMonitor changes
The name of the stack distance stats changed slightly when the stack
distance calculator was redesigned as a probe. Update the reference
stats to reflect this.
Andreas Sandberg [Tue, 4 Aug 2015 09:29:13 +0000 (10:29 +0100)]
mem: Move trace functionality from the CommMonitor to a probe
This changeset moves the access trace functionality from the
CommMonitor into a separate probe. The probe can be hooked up to any
component that exports probe points of the type ProbePoints::Packet.
This patch moves the dependency on Google's Protocol Buffers library
from the CommMonitor to the MemTraceProbe, which means that the
CommMonitor (including stack distance profiling) no long depends on
it.
Andreas Sandberg [Tue, 4 Aug 2015 09:29:13 +0000 (10:29 +0100)]
mem: Redesign the stack distance calculator as a probe
This changeset removes the stack distance calculator hooks from the
CommMonitor class and implements a stack distance calculator as a
memory system probe instead. The probe can be hooked up to any
component that exports probe points of the type ProbePoints::Packet.
Andreas Sandberg [Tue, 4 Aug 2015 09:29:13 +0000 (10:29 +0100)]
mem: Add probe support to the CommMonitor
This changeset adds a standardized probe point type to monitor packets
in the memory system and adds two probe points to the CommMonitor
class. These probe points enable monitoring of successfully delivered
requests and successfully delivered responses.
Memory system probe listeners should use the BaseMemProbe base class
to provide a unified configuration interface and reuse listener
registration code. Unlike the ProbeListenerObject class, the
BaseMemProbe allows objects to be wired to multiple ProbeManager
instances as long as they use the same probe point name.
Matthias Jung [Tue, 4 Aug 2015 04:08:40 +0000 (23:08 -0500)]
misc: Coupling gem5 with SystemC TLM2.0
Transaction Level Modeling (TLM2.0) is widely used in industry for creating
virtual platforms (IEEE 1666 SystemC). This patch contains a standard compliant
implementation of an external gem5 port, that enables the usage of gem5 as a
TLM initiator component in SystemC based virtual platforms. Both TLM coding
paradigms loosely timed (b_transport) and aproximately timed (nb_transport) are
supported.
Compared to the original patch a TLM memory manager was added. Furthermore, the
transaction object was removed and for each TLM payload a PacketPointer that
points to the original gem5 packet is added as an TLM extension. For event
handling single events are now created.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Timothy Jones [Tue, 4 Aug 2015 04:08:40 +0000 (23:08 -0500)]
sim: function for testing for auto deletion
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Timothy Jones [Tue, 4 Aug 2015 04:08:40 +0000 (23:08 -0500)]
uby: Fix checkpointing and restore
There are 2 problems with the existing checkpoint and restore code in ruby.
The first is that when the event queue is altered by ruby during serialization,
some events that are currently scheduled cannot be found (e.g. the event to
stop simulation that always lives on the queue), causing a panic.
The second is that ruby is sometimes serialized after the memory system,
meaning that the dirty data in its cache is flushed back to memory too late
and so isn't included in the checkpoint.
These are fixed by implementing memory writeback in ruby, using the same
technique of hijacking the event queue, but first descheduling all events that
are currently on it. They are saved, along with their scheduled time, so that
the event queue can be faithfully reconstructed after writeback has finished.
Events with the AutoDelete flag set will delete themselves when they
are descheduled, causing an error when attempting to schedule them again.
This is fixed by simply not recording them when taking them off the queue.
Writeback is still implemented using flushing, so the cache recorder object,
that is created to generate the trace and manage flushing, is kept
around and used during serialization to write the trace to disk.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Tue, 4 Aug 2015 03:44:29 +0000 (22:44 -0500)]
ruby: mesi three level: multiple corrections to the protocol
1. Eliminate state NP in L0 and L1 Caches: The two states 'NP' and 'I' both
mean that the cache block is not present in the cache. 'I' also means that the
cache entry has been allocated. This causes problems when we do not correctly
initialize the cache entry when it is re-used. Hence, this patch eliminates
the state NP altogether. Everytime a new block comes into the cache, a cache
entry is allocated. Everytime a block leaves, the corresponding entry is
deallocated.
2. Separate transient state for instruction fetches: purely for accouting
purposes.
3. Drop state IS_I in L1 Cache and the message type STALE_DATA: when
invalidation is received for a block in IS, the block used to be moved to IS_I.
This meant that the data that would arrive in future would be used but not
stored since the controller lost the permissions after gaining them. This
state is being dropped and now invalidation messages would not processed till
the data has arrived. This also means that STALE_DATA type is not longer
required.
Nilay Vaish [Tue, 4 Aug 2015 03:44:28 +0000 (22:44 -0500)]
ruby: mesi two,three level: copy data only when dirty
The level 2 controller has a bug. In one particular action, the data block was
copied from a message irrespective whether the block is dirty or not. In cases
when L1 sends no data, the data value copied was incorrect.
Nilay Vaish [Tue, 4 Aug 2015 03:44:27 +0000 (22:44 -0500)]
ruby: correctly number the sequencer in MESI_Three_Level.py
Brad Beckmann [Sat, 1 Aug 2015 16:59:47 +0000 (12:59 -0400)]
ruby: removed invalid assert in message comparitor
It is perfectly valid to compare the same message and the greater than
operator should work correctly.
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: improved stall and wait debugging
Added dprintfs and asserts for identifying stall and wait bugs.
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: fix error in conflicing symbol declaration
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: enable overloading in functions not in classes
For many years the slicc symbol table has supported overloaded functions in
external classes. This patch extends that support to functions that are not
part of classes (a.k.a. no parent). For example, this support allows slicc
to understand that mapAddressToRange is overloaded and the NodeID is an
optional parameter.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: change router pipeline stages to 2
This patch changes the router pipeline stages from 4 to 2. The
canonical 4-stage router is conservative while a lower-latency router
with look ahead routing and speculative allocation is well acknowledged.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: change advance_stage for flit_d
Sets m_stage.second to the second parameter of the function.
Then, for every place where advance_stage is called, adds
a cycle to the argument being passed.
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: improved stalling support in protocols
Adds features to allow protocols to reschedule controllers when conditionally
stalling within inport logic or actions. Also insures that resource and
protocol stalls are re-evaluated the next cycle.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: expose access permission to replacement policies
This patch adds support that allows the replacement policy to identify each
cache block's access permission. This information can be useful when making
replacement decisions.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: adds size and empty apis to the msg buffer stallmap
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: fix deadlock bug in banked array resource checks
The Ruby banked array resource checks (initiated from SLICC) did a check and
allocate at the same time. If a transition needs more than one resource, then
it might check/allocate resource #1, then fail to get resource #2. Another
transition might then try to get the same resources, but in reverse order.
Deadlock.
This patch separates resource checking and resource reservation into two
steps to avoid deadlock.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: Fix for stallAndWait bug
It was previously possible for a stalled message to be reordered after an
incomming message. This patch ensures that any stalled message stays in its
original request order.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
config: add base class for ruby controllers
The CntrlBase python class handles configuration parameters such as running
counts of controllers and sequencers.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
mem: add request types for acquire and release
Add support for acquire and release requests. These synchronization operations
are commonly supported by several modern instruction sets.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: allocate a block in CacheMemory without updating LRU state
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: speed up function used for cache walks
This patch adds a few helpful functions that allow .sm files to directly
invalidate all cache blocks using a trigger queue rather than rely on each
individual cache block to be invalidated via requests from the mandatory
queue.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: support for arbitrary DPRINTF flags (not just RubySlicc)
This patch allows DPRINTFs to be used in SLICC state machines similar to how
they are used by the rest of gem5. Previously all DPRINTFs in the .sm files
had to use the RubySlicc flag.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: support for local variable declarations in action blocks
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: initialize replacement policies with their own simobjs
this is in preparation for other replacement policies that take additional
parameters.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: give access to cache tag/data latencies from SLICC
This patch exposes the tag and data array latencies to the SLICC state machines
so that it can be used to determine the correct enqueue latency for response
messages.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: support for multiple cache entry types in the same state machine
To have multiple Entry types (e.g., a cache Entry type and
a directory Entry type), just declare one of them as a secondary
type by using the pair 'main="false"', e.g.:
structure(DirEntry, desc="...", interface="AbstractCacheEntry",
main="false") {
...and the primary type would be declared:
structure(Entry, desc="...", interface="AbstractCacheEntry") {
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: Fix bug in enqueue and peek statements.
These were not generating the correct c names for types declared within a
machine scope.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: fix missing inline function in LocalVariableAST
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: improve support for prefix operations
This patch fixes the type handling when prefix operations are used. Previously
prefix operators would assume a void return type, which made it impossible to
combine prefix operations with other expressions. This patch allows SLICC
programmers to use prefix operations more naturally.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: support for transitions with a wildcard next state
This patches adds support for transitions of the form:
transition(START, EVENTS, *) { ACTIONS }
This allows a machine to collapse states that differ only in the next state
transition to collapse into one, and can help shorten/simplfy some protocols
significantly.
When * is encountered as an end state of a transition, the next state is
determined by calling the machine-specific getNextState function. The next
state is determined before any actions of the transition execute, and
therefore the next state calculation cannot depend on any of the transition
actions.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: support for multiple message types on the same buffer
This patch allows SLICC protocols to use more than one message type with a
message buffer. For example, you can declare two in ports as such:
in_port(ResponseQueue_in, ResponseMsg, responseFromDir, rank=3) { ... }
in_port(tgtResponseQueue_in, TgtResponseMsg, responseFromDir, rank=2) { ... }
Brad Beckmann [Sat, 1 Aug 2015 16:37:52 +0000 (12:37 -0400)]
slicc: fatal->panic on invalid transitions
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
mem: Hit callback delay fix
This patch was created by Bihn Pham during his internship at AMD.
There is no need to delay hit callback response messages by a cycle because
the response latency is already incurred in the Ruby protocol. This ensures
correct timing of memory instructions.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
cpu: Fixed a bug on where to fetch the next instruction from
Figure out if the next instruction to fetch comes from the micro-op ROM
or not. Otherwise, wrong instructions may be fetched.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
x86: x86 instruction-implementation bug fixes
Added explicit data sizes and an opcode type for correct execution.
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
util: added .cl OpenCL extension to file_type.py
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
util: added .mk makefile extension to file_types.py
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: re-added the addressToInt slicc interface function
This helper function is very useful converting address offsets to integers
that can be used for protocol specific destination mapping.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
syscall: Add readlink to x86 with special case /proc/self/exe
This patch implements the correct behavior.
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
ruby: add useful dprints to sequencer
Added two data block dprints that are useful when tracking down data check
failures in the ruby random tester.
David Hashe [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
slicc: isinstance bugfix
This fix prevents spurious errors when searching for a symbol that may be
located in one of multiple symbol tables.
Anthony Gutierrez [Sat, 1 Aug 2015 02:53:17 +0000 (22:53 -0400)]
util: add a vimrc that matches gem5 style guide
Andreas Sandberg [Fri, 31 Jul 2015 16:04:59 +0000 (17:04 +0100)]
stats: Update switcheroo reference stats
The Minor draining fixes affect perturb the timing slightly since it
affects how the simulator is drained. Update reference statistics to
reflect this expected change.
Andreas Sandberg [Fri, 31 Jul 2015 16:04:59 +0000 (17:04 +0100)]
cpu: Update debug message from Fetch1 isDrained() in Minor
Fix a spurious %s and include the state of the Fetch1 stage in the
debug printout.
Andreas Sandberg [Fri, 31 Jul 2015 16:04:59 +0000 (17:04 +0100)]
cpu: Fix Minor drain issues when switched out
The Minor CPU currently doesn't drain properly when it is switched
out. This happens because Fetch 1 expects to be in the FetchHalted
state when it is drained. However, because the CPU is switched out, it
is stuck in the FetchWaitingForPC state. Fix this by ignoring drain
requests and returning DrainState::Drained from MinorCPU::drain() if
the CPU is switched out. This is always safe since a switched out CPU,
by definition, doesn't have any instructions in flight.
Andreas Sandberg [Thu, 30 Jul 2015 09:16:36 +0000 (10:16 +0100)]
stats: Bump stats after Minor switcheroo inclusion
Andreas Sandberg [Thu, 30 Jul 2015 09:16:28 +0000 (10:16 +0100)]
tests: Add Minor to the ARM full switcheroo tests
Add the Minor CPU to the RealView and RealView64 full switcheroo
tests.
Andreas Sandberg [Thu, 30 Jul 2015 09:15:50 +0000 (10:15 +0100)]
cpu: Only activate thread 0 in Minor if the CPU is active
Minor currently activates thread 0 in startup() to work around an
issue where activateContext() is called from LiveProcess before the
process entry point is known. When activateContext() is called, Minor
creates a branch instruction to the process's entry point. The first
time it is called, the branch points to an undefined location (0). The
call in startup() updates the branch to point to the actual entry
point.
When instantiating a switched out Minor CPU, it still tries to
activate thread 0. This is clearly incorrect since a switched out CPU
can't have any active threads. This changeset adds a check to ensure
that the thread is active before reactivating it.
Andreas Sandberg [Thu, 30 Jul 2015 09:15:50 +0000 (10:15 +0100)]
cpu: Fix drain issues in the Minor CPU
The drain refactor patches introduced a couple of bugs in the way
Minor handles draining. This patch fixes an incorrect assert and a
case of infinite recursion when the CPU signals drain done.
Andreas Hansson [Thu, 30 Jul 2015 07:42:27 +0000 (03:42 -0400)]
stats: Update stats for clean eviction addition
Andreas Hansson [Thu, 30 Jul 2015 07:42:25 +0000 (03:42 -0400)]
mem: Add missing clean eviction on uncacheable access
This patch adds a missing clean eviction, occuring when an uncacheable
access flushes and invalidates an existing block.
Andreas Hansson [Thu, 30 Jul 2015 07:41:43 +0000 (03:41 -0400)]
mem: Remove unused RequestCause in cache
This patch removes the RequestCause, and also simplifies how we
schedule the sending of packets through the memory-side port. The
deassertion of bus requests is removed as it is not used.
David Guillen-Fandos [Thu, 30 Jul 2015 07:41:42 +0000 (03:41 -0400)]
mem: Make caches way aware
This patch makes cache sets aware of the way number. This enables
some nice features such as the ablity to restrict way allocation. The
implemented mechanism allows to set a maximum way number to be
allocated 'k' which must fulfill 0 < k <= N (where N is the number of
ways). In the future more sophisticated mechasims can be implemented.
Andreas Hansson [Thu, 30 Jul 2015 07:41:40 +0000 (03:41 -0400)]
mem: Transition away from isSupplyExclusive for writebacks
This patch changes how writebacks communicate whether the line is
passed as modified or owned. Previously we relied on the
isSupplyExclusive mechanism, which was originally designed to avoid
unecessary snoops.
For normal cache requests we use the sharedAsserted mechanism to
determine if a block should be marked writeable or not, and with this
patch we transition the writebacks to also use this
mechanism. Conceptually this is cleaner and more consistent.
Andreas Hansson [Thu, 30 Jul 2015 07:41:39 +0000 (03:41 -0400)]
mem: Tidy up CacheBlk class
This patch modernises and tidies up the CacheBlk, removing dead code.
Andreas Hansson [Thu, 30 Jul 2015 07:41:38 +0000 (03:41 -0400)]
mem: Tidy up packet
Some minor fixes and removal of dead code. Changing the flags to be
enums rather than static const (to avoid any linking issues caused by
the latter). Also adding a getBlockAddr member which hopefully can
slowly finds its way into caches, snoop filters etc.