ruby: cleaning up RubyQueue and RubyNetwork dprintfs
[gem5.git] / src / mem / protocol / RubySlicc_Types.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 // External Types
31
32 //
33 // **PLEASE NOTE!** When adding objects to this file you must also add a line
34 // in the src/mem/ruby/SConscript file. Otherwise the external object's .hh
35 // file will not be copied to the protocol directory and you will encounter a
36 // undefined declaration error.
37 //
38
39 external_type(MessageBuffer, buffer="yes", inport="yes", outport="yes");
40
41 external_type(OutPort, primitive="yes");
42
43 external_type(InPort, primitive="yes") {
44 bool isReady();
45 void dequeue();
46 int dequeue_getDelayCycles();
47 void recycle();
48 bool isEmpty();
49 }
50
51 external_type(NodeID, default="0");
52 external_type(MachineID);
53
54 MessageBuffer getMandatoryQueue(int core_id);
55
56 external_type(Set, non_obj="yes") {
57 void setSize(int);
58 void add(NodeID);
59 void addSet(Set);
60 void remove(NodeID);
61 void removeSet(Set);
62 void broadcast();
63 void addRandom();
64 void clear();
65 int count();
66 bool isElement(NodeID);
67 bool isEqual(Set);
68 bool isSuperset(Set);
69 bool intersectionIsEmpty(Set);
70 NodeID smallestElement();
71 }
72
73 external_type(NetDest, non_obj="yes") {
74 void setSize(int);
75 void setSize(int, int);
76 void add(NodeID);
77 void add(MachineID);
78 void addSet(Set);
79 void addNetDest(NetDest);
80 void setNetDest(MachineType, Set);
81 void remove(NodeID);
82 void remove(MachineID);
83 void removeSet(Set);
84 void removeNetDest(NetDest);
85 void broadcast();
86 void broadcast(MachineType);
87 void addRandom();
88 void clear();
89 Set toSet();
90 int count();
91 bool isElement(NodeID);
92 bool isElement(MachineID);
93 bool isSuperset(Set);
94 bool isSuperset(NetDest);
95 bool isEmpty();
96 bool intersectionIsEmpty(Set);
97 bool intersectionIsEmpty(NetDest);
98 MachineID smallestElement(MachineType);
99 }
100
101 external_type(Sequencer) {
102 void readCallback(Address, DataBlock);
103 void readCallback(Address, GenericMachineType, DataBlock);
104 void readCallback(Address, GenericMachineType, DataBlock, Time, Time, Time);
105 void writeCallback(Address, DataBlock);
106 void writeCallback(Address, GenericMachineType, DataBlock);
107 void writeCallback(Address, GenericMachineType, DataBlock, Time, Time, Time);
108 void checkCoherence(Address);
109 void profileNack(Address, int, int, uint64);
110 }
111
112 external_type(AbstractEntry, primitive="yes");
113
114 external_type(DirectoryMemory) {
115 AbstractEntry lookup(Address);
116 bool isPresent(Address);
117 void invalidateBlock(Address);
118 }
119
120 external_type(AbstractCacheEntry, primitive="yes") {
121 void changePermission(AccessPermission);
122 }
123
124 external_type(CacheMemory) {
125 bool cacheAvail(Address);
126 Address cacheProbe(Address);
127 AbstractCacheEntry allocate(Address, AbstractCacheEntry);
128 void deallocate(Address);
129 AbstractCacheEntry lookup(Address);
130 bool isTagPresent(Address);
131 void profileMiss(CacheMsg);
132
133 void profileGenericRequest(GenericRequestType,
134 AccessModeType,
135 PrefetchBit);
136
137 void setMRU(Address);
138 }
139
140 external_type(MemoryControl, inport="yes", outport="yes") {
141
142 }
143
144 external_type(DMASequencer) {
145 void ackCallback();
146 void dataCallback(DataBlock);
147 }
148
149 external_type(TimerTable, inport="yes") {
150 bool isReady();
151 Address readyAddress();
152 void set(Address, int);
153 void unset(Address);
154 bool isSet(Address);
155 }
156
157 external_type(GenericBloomFilter) {
158
159 void clear(int);
160 void increment(Address, int);
161 void decrement(Address, int);
162 void set(Address, int);
163 void unset(Address, int);
164
165 bool isSet(Address, int);
166 int getCount(Address, int);
167 }
168
169
170
171