forked from nils.hoelscher/RTSA-lab01-CacheAnalysis
formatting
This commit is contained in:
parent
384be83c13
commit
e0fd75ff1c
|
@ -71,9 +71,9 @@ public: // everything is public, because IDGAF
|
||||||
|
|
||||||
AbstractState(unsigned int AddressIn) { Addr = AddressIn; }
|
AbstractState(unsigned int AddressIn) { Addr = AddressIn; }
|
||||||
|
|
||||||
AbstractState(Address Addr) { Sets[Addr.Index].Associativity[0] = {{Addr.Tag}}; }
|
AbstractState(Address Addr) {
|
||||||
|
Sets[Addr.Index].Associativity[0] = {{Addr.Tag}};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Executes an Must LRU Join on the AbstractCacheState
|
* @brief Executes an Must LRU Join on the AbstractCacheState
|
||||||
|
@ -81,13 +81,13 @@ public: // everything is public, because IDGAF
|
||||||
* @param In, AbstractState that gets joined into the State.
|
* @param In, AbstractState that gets joined into the State.
|
||||||
*/
|
*/
|
||||||
void mustJoin(AbstractState In) {
|
void mustJoin(AbstractState In) {
|
||||||
/**
|
/**
|
||||||
* The exercise is to Fill this function with an LRU must Join.
|
* The exercise is to Fill this function with an LRU must Join.
|
||||||
* For this you need to use Sets. Associativity and Blocks.
|
* For this you need to use Sets. Associativity and Blocks.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if Address Addr is in Cache
|
* @brief Checks if Address Addr is in Cache
|
||||||
*
|
*
|
||||||
* @param Addr Address to check.
|
* @param Addr Address to check.
|
||||||
|
|
|
@ -11,7 +11,7 @@ class CacheType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Class to Check if Set Associate Cache is valid.
|
* @brief Class to Check if Set Associate Cache is valid.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class CacheType {
|
class CacheType {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CONCRETESTATE_H
|
#ifndef CONCRETESTATE_H
|
||||||
#define CONCRETESTATE_H
|
#define CONCRETESTATE_H
|
||||||
|
|
||||||
//Currently Unused.
|
// Currently Unused.
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
@ -33,9 +33,7 @@ public: // everything is public, because IDGAF
|
||||||
|
|
||||||
std::map<unsigned int, Set> Sets;
|
std::map<unsigned int, Set> Sets;
|
||||||
|
|
||||||
ConcreteState(Address Addr) {
|
ConcreteState(Address Addr) { Sets[Addr.Index].Entries[0] = Addr.Tag; }
|
||||||
Sets[Addr.Index].Entries[0]= Addr.Tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
}; // namespace
|
}; // namespace
|
||||||
#endif // CONCRETESTATE_H
|
#endif // CONCRETESTATE_H
|
Reference in New Issue