summaryrefslogtreecommitdiff
path: root/src/mem/protocol/Network_test-cache.sm
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-12-11 10:05:55 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2012-12-11 10:05:55 -0600
commit9b72a0f627bb9d9f3028e1ad7bf65976863db099 (patch)
treebf5532471cff6bba7f790461e148da7904425a78 /src/mem/protocol/Network_test-cache.sm
parent93e283abb348b81d086225f7861d94901c9b0888 (diff)
downloadgem5-9b72a0f627bb9d9f3028e1ad7bf65976863db099.tar.xz
ruby: change slicc to allow for constructor args
The patch adds support to slicc for recognizing arguments that should be passed to the constructor of a class. I did not like the fact that an explicit check was being carried on the type 'TBETable' to figure out the arguments to be passed to the constructor. The patch also moves some of the member variables that are declared for all the controllers to the base class AbstractController.
Diffstat (limited to 'src/mem/protocol/Network_test-cache.sm')
-rw-r--r--src/mem/protocol/Network_test-cache.sm27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/mem/protocol/Network_test-cache.sm b/src/mem/protocol/Network_test-cache.sm
index 64b156938..1e49e1d7b 100644
--- a/src/mem/protocol/Network_test-cache.sm
+++ b/src/mem/protocol/Network_test-cache.sm
@@ -66,25 +66,6 @@ machine(L1Cache, "Network_test L1 Cache")
DataBlock DataBlk, desc="Data in the block";
}
- // TBE fields
- structure(TBE, desc="...") {
- State TBEState, desc="Transient state";
- DataBlock DataBlk, desc="data for the block, required for concurrent writebacks";
- }
-
- structure(TBETable, external="yes") {
- TBE lookup(Address);
- void allocate(Address);
- void deallocate(Address);
- bool isPresent(Address);
- }
-
-
- // STRUCTURES
-
- TBETable TBEs, template="<L1Cache_TBE>";
-
-
// FUNCTIONS
// cpu/testers/networktest/networktest.cc generates packets of the type
@@ -112,11 +93,11 @@ machine(L1Cache, "Network_test L1 Cache")
}
- State getState(TBE tbe, Entry cache_entry, Address addr) {
+ State getState(Entry cache_entry, Address addr) {
return State:I;
}
- void setState(TBE tbe, Entry cache_entry, Address addr, State state) {
+ void setState(Entry cache_entry, Address addr, State state) {
}
@@ -146,9 +127,7 @@ machine(L1Cache, "Network_test L1 Cache")
if (mandatoryQueue_in.isReady()) {
peek(mandatoryQueue_in, RubyRequest) {
trigger(mandatory_request_type_to_event(in_msg.Type),
- in_msg.LineAddress,
- getCacheEntry(in_msg.LineAddress),
- TBEs[in_msg.LineAddress]);
+ in_msg.LineAddress, getCacheEntry(in_msg.LineAddress));
}
}
}