-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added headers to ProcessStateChange.hh and moved Register struct to new Register.hh. * Added memory directory and namespace.
- Loading branch information
1 parent
e17ad08
commit f4bd1ef
Showing
63 changed files
with
801 additions
and
858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <vector> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
#include <iostream> | ||
|
||
namespace simeng { | ||
|
||
/** A generic register identifier. */ | ||
struct Register { | ||
/** An identifier representing the type of register - e.g. 0 = general, 1 = | ||
* vector. Used to determine which register file to access. */ | ||
uint8_t type; | ||
|
||
/** A tag identifying the register. May correspond to either physical or | ||
* architectural register, depending on point of usage. */ | ||
uint16_t tag; | ||
|
||
/** A boolean identifier for whether the creation of this register has been a | ||
* result of a register renaming scheme. */ | ||
bool renamed = false; | ||
|
||
/** Check for equality of two register identifiers. */ | ||
bool operator==(const Register& other) const { | ||
return (other.type == type && other.tag == tag); | ||
} | ||
|
||
/** Check for inequality of two register identifiers. */ | ||
bool operator!=(const Register& other) const { return !(other == *this); } | ||
}; | ||
|
||
} // namespace simeng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
|
||
#include "simeng/Register.hh" | ||
#include "simeng/RegisterValue.hh" | ||
#include "simeng/memory/MemoryAccessTarget.hh" | ||
|
||
namespace simeng { | ||
|
||
namespace arch { | ||
|
||
/** The types of changes that can be made to values within the process state. */ | ||
enum class ChangeType { REPLACEMENT, INCREMENT, DECREMENT }; | ||
|
||
/** A structure describing a set of changes to the process state. */ | ||
struct ProcessStateChange { | ||
/** Type of changes to be made */ | ||
ChangeType type; | ||
/** Registers to modify */ | ||
std::vector<Register> modifiedRegisters; | ||
/** Values to set modified registers to */ | ||
std::vector<RegisterValue> modifiedRegisterValues; | ||
/** Memory address/width pairs to modify */ | ||
std::vector<memory::MemoryAccessTarget> memoryAddresses; | ||
/** Values to write to memory */ | ||
std::vector<RegisterValue> memoryAddressValues; | ||
}; | ||
|
||
} // namespace arch | ||
} // namespace simeng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.