#pragma once

#ifndef CACHE_LRU_HPP
  #define CACHE_LRU_HPP

  #include <cstdint>
  #include <list>
  #include <unordered_map>
  #include <vector>

namespace cache {

class lru {
public:
  lru(int32_t line_count, int32_t associativity);
  ~lru() = default;

  bool access(uint64_t address);

private:
  struct block_entry {
    uint64_t tag;
  };

  int32_t _lines;
  int32_t _assoc;

  std::vector<std::list<block_entry>> _cache_lines;
  std::vector<std::unordered_map<uint64_t, std::list<block_entry>::iterator>>
      _lookup;
};

} // namespace cache

  #include "../src/cache.cpp"

#endif
