base.cc (9614:c35b47fd0df8) base.cc (9795:a31d1a0888a2)
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 35 unchanged lines hidden (view full) ---

44 * @file
45 * Definition of BaseCache functions.
46 */
47
48#include "cpu/base.hh"
49#include "cpu/smt.hh"
50#include "debug/Cache.hh"
51#include "debug/Drain.hh"
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 35 unchanged lines hidden (view full) ---

44 * @file
45 * Definition of BaseCache functions.
46 */
47
48#include "cpu/base.hh"
49#include "cpu/smt.hh"
50#include "debug/Cache.hh"
51#include "debug/Drain.hh"
52#include "mem/cache/tags/fa_lru.hh"
53#include "mem/cache/tags/lru.hh"
52#include "mem/cache/base.hh"
54#include "mem/cache/base.hh"
55#include "mem/cache/cache.hh"
53#include "mem/cache/mshr.hh"
54#include "sim/full_system.hh"
55
56using namespace std;
57
58BaseCache::CacheSlavePort::CacheSlavePort(const std::string &_name,
59 BaseCache *_cache,
60 const std::string &_label)

--- 700 unchanged lines hidden (view full) ---

761 setDrainState(Drainable::Draining);
762 DPRINTF(Drain, "Cache not drained\n");
763 return count;
764 }
765
766 setDrainState(Drainable::Drained);
767 return 0;
768}
56#include "mem/cache/mshr.hh"
57#include "sim/full_system.hh"
58
59using namespace std;
60
61BaseCache::CacheSlavePort::CacheSlavePort(const std::string &_name,
62 BaseCache *_cache,
63 const std::string &_label)

--- 700 unchanged lines hidden (view full) ---

764 setDrainState(Drainable::Draining);
765 DPRINTF(Drain, "Cache not drained\n");
766 return count;
767 }
768
769 setDrainState(Drainable::Drained);
770 return 0;
771}
772
773BaseCache *
774BaseCacheParams::create()
775{
776 int numSets = size / (assoc * block_size);
777
778 if (numSets == 1) {
779 FALRU *tags = new FALRU(block_size, size, hit_latency);
780 return new Cache<FALRU>(this, tags);
781 } else {
782 LRU *tags = new LRU(numSets, block_size, assoc, hit_latency);
783 return new Cache<LRU>(this, tags);
784 }
785}