From aa86800e7a142f41a8fe957c367c133dea8d61bf Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 23 Apr 2013 00:03:02 -0500 Subject: ruby: patch checkpoint restore with garnet Due to recent changes to clocking system in Ruby and the way Ruby restores state from a checkpoint, garnet was failing to run from a checkpointed state. The problem is that Ruby resets the time to zero while warming up the caches. If any component records a local copy of the time (read calls curCycle()) before the simulation has started, then that component will not operate until that time is reached. In the context of this particular patch, the Garnet Network class calls curCycle() at multiple places. Any non-operational component can block in requests in the memory system, which the system interprets as a deadlock. This patch makes changes so that Garnet can successfully run from checkpointed state. It adds a globally visible time at which the actual execution started. This time is initialized in RubySystem::startup() function. This variable is only meant for components with in Ruby. This replaces the private variable that was maintained within Garnet since it is not possible to figure out the correct time when the value of this variable can be set. The patch also does away with all cases where curCycle() is called with in some Ruby component before the system has actually started executing. This is required due to the quirky manner in which ruby restores from a checkpoint. --- src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc') diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc index 7db9db56b..82d89912e 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc +++ b/src/mem/ruby/network/garnet/fixed-pipeline/InputUnit_d.cc @@ -53,7 +53,7 @@ InputUnit_d::InputUnit_d(int id, Router_d *router) : Consumer(router) // Instantiating the virtual channels m_vcs.resize(m_num_vcs); for (int i=0; i < m_num_vcs; i++) { - m_vcs[i] = new VirtualChannel_d(i, m_router->curCycle()); + m_vcs[i] = new VirtualChannel_d(i); } } -- cgit v1.2.3