/*
- * Copyright (c) 2012-2013 ARM Limited
+ * Copyright (c) 2012-2013,2016 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
#include <list>
#include <unordered_map>
+#include "mem/cache/base.hh"
#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
#include "mem/packet.hh"
public:
/** Typedef the block type used in this class. */
typedef FALRUBlk BlkType;
- /** Typedef a list of pointers to the local block type. */
- typedef std::list<FALRUBlk*> BlkList;
protected:
/** Array of pointers to blocks at the cache size boundaries. */
* Returns the access latency and inCache flags as a side effect.
* @param addr The address to look for.
* @param is_secure True if the target memory space is secure.
- * @param asid The address space ID.
* @param lat The latency of the access.
* @param inCache The FALRUBlk::inCache flags.
* @return Pointer to the cache block.
*/
CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat,
- int context_src, int *inCache);
+ int *inCache);
/**
* Just a wrapper of above function to conform with the base interface.
*/
- CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat,
- int context_src) override;
+ CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) override;
/**
* Find the block in the cache, do not update the replacement data.
void insertBlock(PacketPtr pkt, CacheBlk *blk) override;
- /**
- * Return the block size of this cache.
- * @return The block size.
- */
- unsigned
- getBlockSize() const
- {
- return blkSize;
- }
-
- /**
- * Return the subblock size of this cache, always the block size.
- * @return The block size.
- */
- unsigned
- getSubBlockSize() const
- {
- return blkSize;
- }
-
- /**
- * Return the number of sets this cache has
- * @return The number of sets.
- */
- unsigned
- getNumSets() const override
- {
- return 1;
- }
-
- /**
- * Return the number of ways this cache has
- * @return The number of ways.
- */
- unsigned
- getNumWays() const override
- {
- return numBlocks;
- }
-
/**
* Find the cache block given set and way
* @param set The set of the block.
*/
CacheBlk* findBlockBySetAndWay(int set, int way) const override;
- /**
- * Align an address to the block size.
- * @param addr the address to align.
- * @return The aligned address.
- */
- Addr blkAlign(Addr addr) const
- {
- return (addr & ~(Addr)(blkSize-1));
- }
-
/**
* Generate the tag from the addres. For fully associative this is just the
* block address.