Hi Derek,

As Nate suggested, please remove unwanted code instead of commenting it
out.  That way it becomes clearer to me what changes I really need to
address when I merge in our patches.

Thanks,

Brad


> -----Original Message-----
> From: m5-dev-boun...@m5sim.org [mailto:m5-dev-boun...@m5sim.org] On
> Behalf Of Derek Hower
> Sent: Tuesday, January 19, 2010 3:20 PM
> To: m5-dev@m5sim.org
> Subject: [m5-dev] [PATCH 03 of 43] Automated merge with
> ssh://h...@m5sim.org/m5
> 
> # HG changeset patch
> # User Derek Hower <d...@cs.wisc.edu>
> # Date 1251213023 18000
> # Node ID 19e532a296e0975cf7918b4d7e9ef80f1d392cac
> # Parent  e0c1c6d876499dc536cfdf0cd37736051f1fb760
> # Parent  c47323cc8f988feaf0718626f80a1b7a5bdca18f
> Automated merge with ssh://h...@m5sim.org/m5
> 
> diff --git a/src/mem/ruby/config/MI_example-homogeneous.rb
> b/src/mem/ruby/config/MI_example-homogeneous.rb
> --- a/src/mem/ruby/config/MI_example-homogeneous.rb
> +++ b/src/mem/ruby/config/MI_example-homogeneous.rb
> @@ -34,6 +34,13 @@
>    elsif $*[i] == "-m"
>      num_memories = $*[i+1].to_i
>      i = i+1
> +  elsif $*[i] == "-R"
> +    if $*[i+1] == "rand"
> +      RubySystem.random_seed = "rand"
> +    else
> +      RubySystem.random_seed = $*[i+1].to_i
> +    end
> +    i = i+ 1
>    elsif $*[i] == "-s"
>      memory_size_mb = $*[i+1].to_i
>      i = i + 1
> diff --git a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
> b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
> --- a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
> +++ b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
> @@ -40,6 +40,13 @@
>    elsif $*[i] == "-p"
>      num_cores = $*[i+1].to_i
>      i = i+1
> +  elsif $*[i] == "-R"
> +    if $*[i+1] == "rand"
> +      RubySystem.random_seed = "rand"
> +    else
> +      RubySystem.random_seed = $*[i+1].to_i
> +    end
> +    i = i+ 1
>    elsif $*[i] == "-s"
>      memory_size_mb = $*[i+1].to_i
>      i = i + 1
> diff --git a/src/mem/ruby/system/CacheMemory.hh
> b/src/mem/ruby/system/CacheMemory.hh
> --- a/src/mem/ruby/system/CacheMemory.hh
> +++ b/src/mem/ruby/system/CacheMemory.hh
> @@ -156,6 +156,7 @@
> 
>    // The first index is the # of cache lines.
>    // The second index is the the amount associativity.
> +  m5::hash_map<Address, int> m_tag_index;
>    Vector<Vector<AbstractCacheEntry*> > m_cache;
>    Vector<Vector<int> > m_locked;
> 
> @@ -286,6 +287,12 @@
>  {
>    assert(tag == line_address(tag));
>    // search the set for the tags
> +  m5::hash_map<Address, int>::const_iterator it =
> m_tag_index.find(tag);
> +  if (it != m_tag_index.end())
> +    if (m_cache[cacheSet][it->second]->m_Permission !=
> AccessPermission_NotPresent)
> +      return it->second;
> +  return -1; // Not found
> +  /*
>    for (int i=0; i < m_cache_assoc; i++) {
>      if ((m_cache[cacheSet][i] != NULL) &&
>          (m_cache[cacheSet][i]->m_Address == tag) &&
> @@ -294,6 +301,7 @@
>      }
>    }
>    return -1; // Not found
> +  */
>  }
> 
>  // Given a cache index: returns the index of the tag in a set.
> @@ -303,11 +311,19 @@
>  {
>    assert(tag == line_address(tag));
>    // search the set for the tags
> +  m5::hash_map<Address, int>::const_iterator it =
> m_tag_index.find(tag);
> +  if (it != m_tag_index.end())
> +    return it->second;
> +  return -1; // Not found
> +  /*
> +  assert(tag == line_address(tag));
> +  // search the set for the tags
>    for (int i=0; i < m_cache_assoc; i++) {
>      if (m_cache[cacheSet][i] != NULL && m_cache[cacheSet][i]-
> >m_Address == tag)
>        return i;
>    }
>    return -1; // Not found
> +  */
>  }
> 
>  // PUBLIC METHODS
> @@ -418,6 +434,7 @@
>        m_cache[cacheSet][i]->m_Address = address;
>        m_cache[cacheSet][i]->m_Permission = AccessPermission_Invalid;
>        m_locked[cacheSet][i] = -1;
> +      m_tag_index[address] = i;
> 
>        m_replacementPolicy_ptr->touch(cacheSet, i, g_eventQueue_ptr-
> >getTime());
> 
> @@ -439,6 +456,7 @@
>      delete m_cache[cacheSet][location];
>      m_cache[cacheSet][location] = NULL;
>      m_locked[cacheSet][location] = -1;
> +    m_tag_index.erase(address);
>    }
>  }
> 
> _______________________________________________
> m5-dev mailing list
> m5-dev@m5sim.org
> http://m5sim.org/mailman/listinfo/m5-dev


_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to