Srikant Bharadwaj has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/32600 )

Change subject: mem-garnet: Add a check to see if router is already scheduled
......................................................................

mem-garnet: Add a check to see if router is already scheduled

Currently the Switch Allocator takes up most of the simulation
wall clock time. This function checks for all VCs to see if it
should wakeup next. The input units which are simulated before
the switch allocator could have scheduled it already. This patch
adds a check for it.

Change-Id: I8609d4e7f925aa5e97198f6cd07466530f6fcf4c
---
M src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
1 file changed, 4 insertions(+), 0 deletions(-)



diff --git a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
index 144f208..3241343 100644
--- a/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
+++ b/src/mem/ruby/network/garnet2.0/SwitchAllocator.cc
@@ -350,6 +350,10 @@
 {
     Tick nextCycle = m_router->clockEdge(Cycles(1));

+    if (m_router->alreadyScheduled(nextCycle)) {
+        return;
+    }
+
     for (int i = 0; i < m_num_inports; i++) {
         for (int j = 0; j < m_num_vcs; j++) {
             if (m_router->getInputUnit(i)->need_stage(j, SA_, nextCycle)) {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32600
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: I8609d4e7f925aa5e97198f6cd07466530f6fcf4c
Gerrit-Change-Number: 32600
Gerrit-PatchSet: 1
Gerrit-Owner: Srikant Bharadwaj <srikant.bharad...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to