2 * Copyright (c) 1999-2005 Mark D. Hill and David A. Wood
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 // **PLEASE NOTE!** When adding objects to this file you must also add a line
33 // in the src/mem/ruby/SConscript file. Otherwise the external object's .hh
34 // file will not be copied to the protocol directory and you will encounter a
35 // undefined declaration error.
38 external_type(MessageBuffer, buffer="yes", inport="yes", outport="yes");
39 external_type(OutPort, primitive="yes");
41 structure(InPort, external = "yes", primitive="yes") {
44 Time dequeue_getDelayCycles();
49 external_type(NodeID, default="0", primitive="yes");
50 external_type(MachineID);
52 structure (Set, external = "yes", non_obj="yes") {
62 bool isElement(NodeID);
65 bool intersectionIsEmpty(Set);
66 NodeID smallestElement();
69 structure (NetDest, external = "yes", non_obj="yes") {
71 void setSize(int, int);
75 void addNetDest(NetDest);
76 void setNetDest(MachineType, Set);
78 void remove(MachineID);
80 void removeNetDest(NetDest);
82 void broadcast(MachineType);
87 bool isElement(NodeID);
88 bool isElement(MachineID);
90 bool isSuperset(NetDest);
92 bool intersectionIsEmpty(Set);
93 bool intersectionIsEmpty(NetDest);
94 MachineID smallestElement(MachineType);
97 structure (Sequencer, external = "yes") {
98 void readCallback(Address, DataBlock);
99 void readCallback(Address, GenericMachineType, DataBlock);
100 void readCallback(Address, GenericMachineType, DataBlock, Time, Time, Time);
101 void writeCallback(Address, DataBlock);
102 void writeCallback(Address, GenericMachineType, DataBlock);
103 void writeCallback(Address, GenericMachineType, DataBlock, Time, Time, Time);
104 void checkCoherence(Address);
105 void profileNack(Address, int, int, uint64);
106 void evictionCallback(Address);
107 void recordRequestType(SequencerRequestType);
108 bool checkResourceAvailable(CacheResourceType, Address);
111 structure(RubyRequest, desc="...", interface="Message", external="yes") {
112 Address LineAddress, desc="Line address for this request";
113 Address PhysicalAddress, desc="Physical address for this request";
114 RubyRequestType Type, desc="Type of request (LD, ST, etc)";
115 Address ProgramCounter, desc="Program counter of the instruction that caused the miss";
116 RubyAccessMode AccessMode, desc="user/supervisor access type";
117 int Size, desc="size in bytes of access";
118 PrefetchBit Prefetch, desc="Is this a prefetch request";
119 int contextId, desc="this goes away but must be replace with Nilay";
122 structure(AbstractEntry, primitive="yes", external = "yes") {
123 void changePermission(AccessPermission);
126 structure (DirectoryMemory, external = "yes") {
127 AbstractEntry allocate(Address, AbstractEntry);
128 AbstractEntry lookup(Address);
129 bool isPresent(Address);
130 void invalidateBlock(Address);
131 void recordRequestType(DirectoryRequestType);
134 structure(AbstractCacheEntry, primitive="yes", external = "yes") {
135 void changePermission(AccessPermission);
138 structure (CacheMemory, external = "yes") {
139 bool cacheAvail(Address);
140 Address cacheProbe(Address);
141 AbstractCacheEntry allocate(Address, AbstractCacheEntry);
142 void allocateVoid(Address, AbstractCacheEntry);
143 void deallocate(Address);
144 AbstractCacheEntry lookup(Address);
145 bool isTagPresent(Address);
146 void profileMiss(RubyRequest);
148 void profileGenericRequest(GenericRequestType,
152 void setMRU(Address);
153 void recordRequestType(CacheRequestType);
154 bool checkResourceAvailable(CacheResourceType, Address);
157 structure (WireBuffer, inport="yes", outport="yes", external = "yes") {
161 structure (MemoryControl, inport="yes", outport="yes", external = "yes") {
162 void recordRequestType(CacheRequestType);
165 structure (DMASequencer, external = "yes") {
167 void dataCallback(DataBlock);
168 void recordRequestType(CacheRequestType);
171 structure (TimerTable, inport="yes", external = "yes") {
173 Address readyAddress();
174 void set(Address, Cycles);
179 structure (GenericBloomFilter, external = "yes") {
181 void increment(Address, int);
182 void decrement(Address, int);
183 void set(Address, int);
184 void unset(Address, int);
186 bool isSet(Address, int);
187 int getCount(Address, int);
190 structure (Prefetcher, external = "yes") {
191 void observeMiss(Address, RubyRequestType);
192 void observePfHit(Address);
193 void observePfMiss(Address);