CacheSim/set.h
2022-01-22 19:30:39 +08:00

24 lines
475 B
C++

#include "block.h"
#include <vector>
#include <tuple>
using std::vector;
using std::tuple;
using CacheSim::Block;
namespace CacheSim{
class Set
{
private:
short waySize;
short emptySize;
short replacePolicy;
vector<Block> blocks;
public:
Set(short waySize, short tagSize, short replacePolicy);
tuple<bool, short> read(vector<bool> tag, short offset);
void countAccess(short baseAccessTime);
};
}