RTSA-lab01-CacheAnalysis/include/ConcreteState.h

39 lines
705 B
C
Raw Normal View History

2022-04-19 10:56:42 +02:00
#ifndef CONCRETESTATE_H
#define CONCRETESTATE_H
2022-04-20 13:36:41 +02:00
// Currently Unused.
2022-04-19 10:56:42 +02:00
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <sstream>
#include <string>
#include "Address.h"
// Forward declarations
namespace cacheAnaPass {
class ConcreteState;
} // namespace cacheAnaPass
class ConcreteState {
public: // everything is public, because IDGAF
struct Entry {
unsigned int Block;
unsigned int Age;
};
struct Set {
std::map<unsigned int, unsigned int> Entries;
};
std::map<unsigned int, Set> Sets;
2022-04-20 13:36:41 +02:00
ConcreteState(Address Addr) { Sets[Addr.Index].Entries[0] = Addr.Tag; }
2022-04-19 10:56:42 +02:00
}; // namespace
#endif // CONCRETESTATE_H