add BSD license
[riscv-isa-sim.git] / riscv / cachesim.h
index d6f5946780611b196f209dacc04ec9a21ffc0a0e..51044c32be740252c0b429bffe18b960e5353038 100644 (file)
@@ -1,3 +1,5 @@
+// See LICENSE for license details.
+
 #ifndef _RISCV_CACHE_SIM_H
 #define _RISCV_CACHE_SIM_H
 
@@ -22,7 +24,7 @@ class cache_sim_t
  public:
   cache_sim_t(size_t sets, size_t ways, size_t linesz, const char* name);
   cache_sim_t(const cache_sim_t& rhs);
-  ~cache_sim_t();
+  virtual ~cache_sim_t();
 
   void access(uint64_t addr, size_t bytes, bool store);
   void print_stats();
@@ -115,7 +117,7 @@ class dcache_sim_t : public cache_memtracer_t
   }
   void trace(uint64_t addr, size_t bytes, bool store, bool fetch)
   {
-    if (!fetch) cache->access(addr, bytes, false);
+    if (!fetch) cache->access(addr, bytes, store);
   }
 };