25 lines
457 B
C++
25 lines
457 B
C++
#include <vector>
|
|
using std::vector;
|
|
|
|
namespace CacheSim{
|
|
class Block
|
|
{
|
|
private:
|
|
bool valid;
|
|
vector<bool> tag;
|
|
short tagSize;
|
|
short recentlyAccess;
|
|
// data;
|
|
|
|
public:
|
|
Block(){};
|
|
Block(short tagSize);
|
|
bool getValid();
|
|
vector<bool> getTag();
|
|
short getAccessTime();
|
|
void update(vector<bool> tag);
|
|
void countAccess();
|
|
void access();
|
|
|
|
};
|
|
} |