0a1,27
> /*
> * Copyright (c) 2006 The Regents of The University of Michigan
> * All rights reserved.
> *
> * Redistribution and use in source and binary forms, with or without
> * modification, are permitted provided that the following conditions are
> * met: redistributions of source code must retain the above copyright
> * notice, this list of conditions and the following disclaimer;
> * redistributions in binary form must reproduce the above copyright
> * notice, this list of conditions and the following disclaimer in the
> * documentation and/or other materials provided with the distribution;
> * neither the name of the copyright holders nor the names of its
> * contributors may be used to endorse or promote products derived from
> * this software without specific prior written permission.
> *
> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
7a35,49
> /**
> * ActivityRecorder helper class that informs the CPU if it can switch
> * over to being idle or not. It works by having a time buffer as
> * long as any time buffer in the CPU, and the CPU and all of its
> * stages inform the ActivityRecorder when they write to any time
> * buffer. The ActivityRecorder marks a 1 in the "0" slot of the time
> * buffer any time a stage writes to a time buffer, and it advances
> * its time buffer at the same time as all other stages. The
> * ActivityRecorder also records if a stage has activity to do next
> * cycle. The recorder keeps a count of these two. Thus any time the
> * count is non-zero, there is either communication still in flight,
> * or activity that still must be done, meaning that the CPU can not
> * idle. If count is zero, then the CPU can safely idle as it has no
> * more outstanding work to do.
> */
14,16c56,59
< /** Advances the activity buffer, decrementing the activityCount if active
< * communication just left the time buffer, and descheduling the CPU if
< * there is no activity.
---
>
> /** Advances the activity buffer, decrementing the activityCount
> * if active communication just left the time buffer, and
> * determining if there is no activity.
18a62
>
20a65
>
23a69
> /** Returns how many things are active within the recorder. */
25a72,74
> /** Sets the count to a starting value. Can be used to disable
> * the idling option.
> */
28a78
> /** Returns if the CPU should be active. */
30a81
> /** Clears the time buffer and the activity count. */
32a84
> /** Debug function to dump the contents of the time buffer. */
34a87,89
> /** Debug function to ensure that the activity count matches the
> * contents of the time buffer.
> */
47a103
> /** Longest latency time buffer in the CPU. */
60a117
> /** Number of stages that can be marked as active or inactive. */