diff options
author | Wei Song <wsong83@gmail.com> | 2015-04-13 16:35:13 +0100 |
---|---|---|
committer | Wei Song <wsong83@gmail.com> | 2015-04-13 16:35:13 +0100 |
commit | db428184208c7a57052d4d7cc994f1e4b3664969 (patch) | |
tree | 8f798aa2b963d4355d19b7ff2201ab7b80e54408 | |
parent | 60535c23a2f8532d901e92d45a959a4d0a597dff (diff) | |
download | spike-db428184208c7a57052d4d7cc994f1e4b3664969.zip spike-db428184208c7a57052d4d7cc994f1e4b3664969.tar.gz spike-db428184208c7a57052d4d7cc994f1e4b3664969.tar.bz2 |
fix cache line index offset in cachesim.cc
-rw-r--r-- | riscv/cachesim.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/cachesim.cc b/riscv/cachesim.cc index 9a11187..90ab5be 100644 --- a/riscv/cachesim.cc +++ b/riscv/cachesim.cc @@ -45,7 +45,7 @@ void cache_sim_t::init() help(); idx_shift = 0; - for (size_t x = linesz; x; x >>= 1) + for (size_t x = linesz; x>1; x >>= 1) idx_shift++; tags = new uint64_t[sets*ways](); |