Ruby: Remove CacheMsg class from SLICC
[gem5.git] / src / mem / protocol / RubySlicc_Exports.sm
1
2 /*
3 * Copyright (c) 1999-2005 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 /*
31 * $Id$
32 *
33 */
34
35 // defines
36 external_type(int, primitive="yes", default="0");
37 external_type(bool, primitive="yes", default="false");
38 external_type(std::string, primitive="yes");
39 external_type(uint64, primitive="yes");
40 external_type(Time, primitive="yes", default="0");
41 external_type(Address);
42 structure(DataBlock, external = "yes", desc="..."){
43 void clear();
44 void copyPartial(DataBlock, int, int);
45 }
46
47 // Declarations of external types that are common to all protocols
48
49 // AccessPermission
50 // The following five states define the access permission of all memory blocks.
51 // These permissions have multiple uses. They coordinate locking and
52 // synchronization primitives, as well as enable functional accesses.
53 // One should not need to add any additional permission values and it is very
54 // risky to do so.
55 enumeration(AccessPermission, desc="...", default="AccessPermission_NotPresent") {
56 // Valid data
57 Read_Only, desc="block is Read Only (modulo functional writes)";
58 Read_Write, desc="block is Read/Write";
59
60 // Invalid data
61 Invalid, desc="block is in an Invalid base state";
62 NotPresent, desc="block is NotPresent";
63 Busy, desc="block is in a transient state, currently invalid";
64 }
65
66 // TesterStatus
67 enumeration(TesterStatus, desc="...") {
68 Idle, desc="Idle";
69 Action_Pending, desc="Action Pending";
70 Ready, desc="Ready";
71 Check_Pending, desc="Check Pending";
72 }
73
74 // InvalidateGeneratorStatus
75 enumeration(InvalidateGeneratorStatus, desc="...") {
76 Load_Waiting, desc="Load waiting to be issued";
77 Load_Pending, desc="Load issued";
78 Inv_Waiting, desc="Store (invalidate) waiting to be issued";
79 Inv_Pending, desc="Store (invalidate) issued";
80 }
81
82 // SeriesRequestGeneratorStatus
83 enumeration(SeriesRequestGeneratorStatus, desc="...") {
84 Thinking, desc="Doing work before next action";
85 Request_Pending, desc="Request pending";
86 }
87
88 // LockStatus
89 enumeration(LockStatus, desc="...") {
90 Unlocked, desc="Lock is not held";
91 Locked, desc="Lock is held";
92 }
93
94 // SequencerStatus
95 enumeration(SequencerStatus, desc="...") {
96 Idle, desc="Idle";
97 Pending, desc="Pending";
98 }
99
100 enumeration(TransitionResult, desc="...") {
101 Valid, desc="Valid transition";
102 ResourceStall, desc="Stalled due to insufficient resources";
103 ProtocolStall, desc="Protocol specified stall";
104 }
105
106 // RubyRequestType
107 enumeration(RubyRequestType, desc="...", default="RubyRequestType_NULL") {
108 LD, desc="Load";
109 ST, desc="Store";
110 ATOMIC, desc="Atomic Load/Store";
111 IFETCH, desc="Instruction fetch";
112 IO, desc="I/O";
113 REPLACEMENT, desc="Replacement";
114 Load_Linked, desc="";
115 Store_Conditional, desc="";
116 RMW_Read, desc="";
117 RMW_Write, desc="";
118 Locked_RMW_Read, desc="";
119 Locked_RMW_Write, desc="";
120 COMMIT, desc="Commit version";
121 NULL, desc="Invalid request type";
122 }
123
124 enumeration(SequencerRequestType, desc="...", default="SequencerRequestType_NULL") {
125 LD, desc="Load";
126 ST, desc="Store";
127 NULL, desc="Invalid request type";
128 }
129
130 enumeration(GenericRequestType, desc="...", default="GenericRequestType_NULL") {
131 GETS, desc="gets request";
132 GET_INSTR, desc="get instr request";
133 GETX, desc="getx request";
134 UPGRADE, desc="upgrade request";
135 DOWNGRADE, desc="downgrade request";
136 INV, desc="invalidate request";
137 INV_S, desc="invalidate shared copy request";
138 PUTS, desc="puts request";
139 PUTO, desc="puto request";
140 PUTX, desc="putx request";
141 L2_PF, desc="L2 prefetch";
142 LD, desc="Load";
143 ST, desc="Store";
144 ATOMIC, desc="Atomic Load/Store";
145 IFETCH, desc="Instruction fetch";
146 IO, desc="I/O";
147 NACK, desc="Nack";
148 REPLACEMENT, desc="Replacement";
149 WB_ACK, desc="WriteBack ack";
150 EXE_ACK, desc="Execlusive ack";
151 COMMIT, desc="Commit version";
152 LD_XACT, desc="Transactional Load";
153 LDX_XACT, desc="Transactional Load-Intend-Modify";
154 ST_XACT, desc="Transactional Store";
155 BEGIN_XACT, desc="Begin Transaction";
156 COMMIT_XACT, desc="Commit Transaction";
157 ABORT_XACT, desc="Abort Transaction";
158 DMA_READ, desc="DMA READ";
159 DMA_WRITE, desc="DMA WRITE";
160 NULL, desc="null request type";
161 }
162
163 enumeration(GenericMachineType, desc="...", default="GenericMachineType_NULL") {
164 L1Cache, desc="L1 Cache Mach";
165 L2Cache, desc="L2 Cache Mach";
166 L3Cache, desc="L3 Cache Mach";
167 Directory, desc="Directory Mach";
168 Collector, desc="Collector Mach";
169 L1Cache_wCC, desc="L1 Cache Mach with Cache Coherence (used for miss latency profile)";
170 L2Cache_wCC, desc="L1 Cache Mach with Cache Coherence (used for miss latency profile)";
171 NULL, desc="null mach type";
172 }
173
174 // MessageSizeType
175 enumeration(MessageSizeType, default="MessageSizeType_Undefined", desc="...") {
176 Undefined, desc="Undefined";
177 Control, desc="Control Message";
178 Data, desc="Data Message";
179 Request_Control, desc="Request";
180 Reissue_Control, desc="Reissued request";
181 Response_Data, desc="data response";
182 ResponseL2hit_Data, desc="data response";
183 ResponseLocal_Data, desc="data response";
184 Response_Control, desc="non-data response";
185 Writeback_Data, desc="Writeback data";
186 Writeback_Control, desc="Writeback control";
187 Broadcast_Control, desc="Broadcast control";
188 Multicast_Control, desc="Multicast control";
189 Forwarded_Control, desc="Forwarded control";
190 Invalidate_Control, desc="Invalidate control";
191 Unblock_Control, desc="Unblock control";
192 Persistent_Control, desc="Persistent request activation messages";
193 Completion_Control, desc="Completion messages";
194 }
195
196 // AccessType
197 enumeration(AccessType, desc="...") {
198 Read, desc="Reading from cache";
199 Write, desc="Writing to cache";
200 }
201
202 // RubyAccessMode
203 enumeration(RubyAccessMode, default="RubyAccessMode_User", desc="...") {
204 Supervisor, desc="Supervisor mode";
205 User, desc="User mode";
206 Device, desc="Device mode";
207 }
208
209 enumeration(PrefetchBit, default="PrefetchBit_No", desc="...") {
210 No, desc="No, not a prefetch";
211 Yes, desc="Yes, a prefetch";
212 L1_HW, desc="This is a L1 hardware prefetch";
213 L2_HW, desc="This is a L2 hardware prefetch";
214 }
215
216 // CacheMsg
217 structure(SequencerMsg, desc="...", interface="Message") {
218 Address LineAddress, desc="Line address for this request";
219 Address PhysicalAddress, desc="Physical address for this request";
220 SequencerRequestType Type, desc="Type of request (LD, ST, etc)";
221 Address ProgramCounter, desc="Program counter of the instruction that caused the miss";
222 RubyAccessMode AccessMode, desc="user/supervisor access type";
223 DataBlock DataBlk, desc="Data";
224 int Len, desc="size in bytes of access";
225 PrefetchBit Prefetch, desc="Is this a prefetch request";
226 }
227
228 // MaskPredictorType
229 enumeration(MaskPredictorType, "MaskPredictorType_Undefined", desc="...") {
230 Undefined, desc="Undefined";
231 AlwaysUnicast, desc="AlwaysUnicast";
232 TokenD, desc="TokenD";
233 AlwaysBroadcast, desc="AlwaysBroadcast";
234 TokenB, desc="TokenB";
235 TokenNull, desc="TokenNull";
236 Random, desc="Random";
237 Pairwise, desc="Pairwise";
238 Owner, desc="Owner";
239 BroadcastIfShared, desc="Broadcast-If-Shared";
240 BroadcastCounter, desc="Broadcast Counter";
241 Group, desc="Group";
242 Counter, desc="Counter";
243 StickySpatial, desc="StickySpatial";
244 OwnerBroadcast, desc="Owner/Broadcast Hybrid";
245 OwnerGroup, desc="Owner/Group Hybrid";
246 OwnerBroadcastMod, desc="Owner/Broadcast Hybrid-Mod";
247 OwnerGroupMod, desc="Owner/Group Hybrid-Mod";
248 LastNMasks, desc="Last N Masks";
249 BandwidthAdaptive, desc="Bandwidth Adaptive";
250 }
251
252 // MaskPredictorIndex
253 enumeration(MaskPredictorIndex, "MaskPredictorIndex_Undefined", desc="...") {
254 Undefined, desc="Undefined";
255 DataBlock, desc="Data Block";
256 PC, desc="Program Counter";
257 }
258
259 // MaskPredictorTraining
260 enumeration(MaskPredictorTraining, "MaskPredictorTraining_Undefined", desc="...") {
261 Undefined, desc="Undefined";
262 None, desc="None";
263 Implicit, desc="Implicit";
264 Explicit, desc="Explicit";
265 Both, desc="Both";
266 }
267
268 // Network Topologies
269 enumeration(TopologyType, desc="...") {
270 CROSSBAR, desc="One node per chip, single switch crossbar";
271 HIERARCHICAL_SWITCH, desc="One node per chip, totally ordered hierarchical tree switched network";
272 TORUS_2D, desc="One node per chip, 2D torus";
273 PT_TO_PT, desc="One node per chip, Point to Point Network";
274 FILE_SPECIFIED, desc="described by the file NETWORK_FILE";
275 }
276
277 // DNUCA AllocationStrategy
278 enumeration(AllocationStrategy, desc="...") {
279 InMiddle, desc="";
280 InInvCorners, desc="";
281 InSharedSides, desc="";
282 StaticDist, desc="";
283 RandomBank, desc="";
284 FrequencyBank, desc="";
285 FrequencyBlock, desc="";
286 LRUBlock, desc="";
287 }
288
289 // DNUCA SearchMechanism
290 enumeration(SearchMechanism, desc="...") {
291 Perfect, desc="";
292 PartialTag, desc="";
293 BloomFilter, desc="";
294 Random, desc="";
295 None, desc="";
296 }
297
298 // DNUCA link type
299 enumeration(LinkType, desc="...") {
300 RC_1500UM, desc="";
301 RC_2500UM, desc="";
302 TL_9000UM, desc="";
303 TL_11000UM, desc="";
304 TL_13000UM, desc="";
305 NO_ENERGY, desc="";
306 NULL, desc="";
307 }
308
309 // transient request type
310 enumeration(TransientRequestType, desc="...", default="TransientRequestType_Undefined") {
311 Undefined, desc="";
312 OffChip, desc="";
313 OnChip, desc="";
314 LocalTransient, desc="";
315 }
316
317 // Request Status
318 enumeration(RequestStatus, desc="...", default="RequestStatus_NULL") {
319 Ready, desc="The sequencer is ready and the request does not alias";
320 Issued, desc="The sequencer successfully issued the request";
321 BufferFull, desc="Can not issue because the sequencer is full";
322 Aliased, desc="This request aliased with a currently outstanding request";
323 NULL, desc="";
324 }