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>
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>
Nilay Vaish [Tue, 15 Sep 2015 13:14:09 +0000 (08:14 -0500)]
stats: updates due to recent changesets including
d0934b57735a
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>
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>
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>
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>
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>
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>
Nilay Vaish [Mon, 14 Sep 2015 15:14:50 +0000 (10:14 -0500)]
ruby: topology: refactor code.
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.
Nilay Vaish [Sat, 12 Sep 2015 21:23:47 +0000 (16:23 -0500)]
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.
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.
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.
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).
Nilay Vaish [Wed, 9 Sep 2015 00:32:04 +0000 (19:32 -0500)]
ruby: slicc: remove nextLineHack from Type.py
Nilay Vaish [Mon, 7 Sep 2015 04:11:11 +0000 (23:11 -0500)]
config: allow ruby to be used with Minor CPU
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.
Nilay Vaish [Sat, 5 Sep 2015 14:35:31 +0000 (09:35 -0500)]
ruby: adds set and way indices to AbstractCacheEntry
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
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.
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.
Andreas Hansson [Fri, 4 Sep 2015 17:14:01 +0000 (13:14 -0400)]
mem: Tidy up CacheSet
Minor tweaks and house keeping.
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.
Andreas Hansson [Fri, 4 Sep 2015 17:13:55 +0000 (13:13 -0400)]
sim: Fix time unit in abort message
Nilay Vaish [Thu, 3 Sep 2015 20:40:20 +0000 (15:40 -0500)]
merged with recent commits.
Nilay Vaish [Thu, 3 Sep 2015 20:38:46 +0000 (15:38 -0500)]
Added tag stable_2015_09_03 for changeset
60eb3fef9c2d
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.
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.
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.
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.
Nilay Vaish [Tue, 1 Sep 2015 20:50:32 +0000 (15:50 -0500)]
ruby: directory memory: drop unused variable.
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.
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.
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).
Andreas Sandberg [Tue, 1 Sep 2015 12:40:28 +0000 (13:40 +0100)]
sim: Remove unused SerializeBuilder interface
Andreas Sandberg [Tue, 1 Sep 2015 12:40:25 +0000 (13:40 +0100)]
sim: Replace fromInt/fromSimObject with decltype
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.
Nilay Vaish [Sun, 30 Aug 2015 17:24:19 +0000 (12:24 -0500)]
stats: updates due to recent changes.
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.
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.
Nilay Vaish [Sun, 30 Aug 2015 17:24:18 +0000 (12:24 -0500)]
ruby: garnet: mark few functions const in BaseGarnetNetwork.hh
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.
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.
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.
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.
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>
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.
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.
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.
Andreas Hansson [Fri, 21 Aug 2015 11:03:24 +0000 (07:03 -0400)]
mem: Remove unused cache squash functionality
Tidying up.
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
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
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.
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.
Nilay Vaish [Wed, 19 Aug 2015 15:02:01 +0000 (10:02 -0500)]
ruby: reverts to changeset:
bf82f1f7b040
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: add accessor functions to SLICC def of MachineID
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.
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().
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: directory memory: drop unused variable.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: slicc: remove a stray line in StateMachine.py
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: garnet: flexible: refactor flit
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: DataBlock: adds a comment
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.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: SubBlock: refactor code
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: cache recorder: move check on block size to RubySystem.
Nilay Vaish [Sat, 15 Aug 2015 00:28:44 +0000 (19:28 -0500)]
ruby: abstract controller: mark some variables as const
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.