Brad, my comments are inline.
On Fri, 7 Jan 2011, Beckmann, Brad wrote:
Hi Nilay,
Unfortunately I can't provide you an example of a protocol where
getCacheEntry behaves in a different manner, but they do exist. I
reviewed your most recent patch updates and I don't think what we're
asking for is much different than what you have on reviewboard right
now. Basically, all we need to do is add back in the capability for the
programmer to write their own getCacheEntry function in the .sm file.
I know that I initially asked you to automatically generate those
functions, and I still think that is useful for most protocols, but Lisa
made me realize that we need customized getCacheEntry functions as well.
Also we may want to change the name of generated getCacheEntry function
to getExclusiveCacheEntry so that one realizes the exclusive assumption
made by the function.
Other than that, the only other change I suggest is to allow the trigger
function to directly set the implicit cache_entry and tbe_entry
variables. Below is example of what I'm envisioning:
[Nilay] If we do things in this way, then any in_port, in which cache / tb
entries are accessed before the trigger function, would still make calls
to isCacheTagPresent().
Currently in MOESI_CMP_directory-L1cache.sm:
in_port(useTimerTable_in, Address, useTimerTable) {
if (useTimerTable_in.isReady()) {
set_cache_entry(getCacheEntry(useTimerTable.readyAddress()));
set_tbe(TBEs[useTimerTable.readyAddress()]);
trigger(Event:Use_Timeout, useTimerTable.readyAddress());
}
}
Replace that with the following:
in_port(useTimerTable_in, Address, useTimerTable) {
if (useTimerTable_in.isReady()) {
trigger(Event:Use_Timeout, useTimerTable.readyAddress(),
getExclusiveCacheEntry(useTimerTable.readyAddress()),
TBEs[useTimerTable.readyAddress()]);
}
}
[Nilay] Instead of passing cache and tb entries as arguments, we can
create local variables in the trigger function using the address argument.
Please let me know if you have any questions.
Thanks...you're almost done. :)
Brad
Thanks
Nilay
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev