Matt Sinclair has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/51368 )
Change subject: mem-ruby: Move VIPER TCC decrements to action from in_port
......................................................................
mem-ruby: Move VIPER TCC decrements to action from in_port
Currently, the GPU VIPER TCC protocol handles races between atomics in
the triggerQueue_in. This in_port does not check for resource
availability, which can cause the trigger queue to execute multiple
times. Although this is the expected behavior, the code for handling
atomic races decrements the atomicDoneCnt flag in the trigger queue,
which is not safe since resource contention may cause it to execute
multiple times.
To resolve this issue, this commit moves the decrementing of this
counter to a new action that is called in an event that happens only
when the race between atomics is detected.
Change-Id: I552fd4f34fdd9ebeec99fb7aeb4eeb7b150f577f
---
M src/mem/ruby/protocol/GPU_VIPER-TCC.sm
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/src/mem/ruby/protocol/GPU_VIPER-TCC.sm
b/src/mem/ruby/protocol/GPU_VIPER-TCC.sm
index 6112f38..cf7cda5 100644
--- a/src/mem/ruby/protocol/GPU_VIPER-TCC.sm
+++ b/src/mem/ruby/protocol/GPU_VIPER-TCC.sm
@@ -268,7 +268,6 @@
if (tbe.numAtomics == 0 && tbe.atomicDoneCnt == 1) {
trigger(Event:AtomicDone, in_msg.addr, cache_entry, tbe);
} else {
- tbe.atomicDoneCnt := tbe.atomicDoneCnt - 1;
trigger(Event:AtomicNotDone, in_msg.addr, cache_entry, tbe);
}
}
@@ -599,6 +598,10 @@
}
}
+ action(dadc_decrementAtomicDoneCnt, "dadc", desc="decrement atomics done
cnt flag") {
+ tbe.numAtomics := tbe.atomicDoneCnt - 1;
+ }
+
action(ptr_popTriggerQueue, "ptr", desc="pop Trigger") {
triggerQueue_in.dequeue(clockEdge());
}
@@ -787,6 +790,7 @@
}
transition(A, AtomicNotDone) {TagArrayRead} {
+ dadc_decrementAtomicDoneCnt;
ptr_popTriggerQueue;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51368
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I552fd4f34fdd9ebeec99fb7aeb4eeb7b150f577f
Gerrit-Change-Number: 51368
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Sinclair <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s