ruby: mesi two,three level: copy data only when dirty
The level 2 controller has a bug. In one particular action, the data block was copied from a message irrespective whether the block is dirty or not. In cases when L1 sends no data, the data value copied was incorrect.
This commit is contained in:
parent
3d782f8df7
commit
9bf3b8828a
1 changed files with 1 additions and 1 deletions
|
@ -628,8 +628,8 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
|
||||||
action(mr_writeDataToCacheFromRequest, "mr", desc="Write data from response queue to cache") {
|
action(mr_writeDataToCacheFromRequest, "mr", desc="Write data from response queue to cache") {
|
||||||
peek(L1RequestL2Network_in, RequestMsg) {
|
peek(L1RequestL2Network_in, RequestMsg) {
|
||||||
assert(is_valid(cache_entry));
|
assert(is_valid(cache_entry));
|
||||||
cache_entry.DataBlk := in_msg.DataBlk;
|
|
||||||
if (in_msg.Dirty) {
|
if (in_msg.Dirty) {
|
||||||
|
cache_entry.DataBlk := in_msg.DataBlk;
|
||||||
cache_entry.Dirty := in_msg.Dirty;
|
cache_entry.Dirty := in_msg.Dirty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue