diff options
author | bd <bdunaisky@umass.edu> | 2025-04-28 03:44:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-28 03:44:42 +0000 |
commit | 013a79547aa465872d0262b2f5c24e73f9556869 (patch) | |
tree | 28cc8f2ea6e5aa1a74f328de8594b0ad5995fa66 /src/controller.cc | |
parent | 5653b2a033e7a4173d2f178b5ce52384666d3d7b (diff) | |
parent | 336faf3fd701aaf962613abd1ff0a69cbdf021ce (diff) |
Merge pull request #69 from bdunahu/vector_ext
Vector ext
Diffstat (limited to 'src/controller.cc')
-rw-r--r-- | src/controller.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/controller.cc b/src/controller.cc index 8df4b97..a5c6691 100644 --- a/src/controller.cc +++ b/src/controller.cc @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. +#include "definitions.h" #include "controller.h" #include "ex.h" #include "response.h" @@ -30,6 +31,7 @@ Controller::Controller(Stage *stage, Storage *storage, bool is_pipelined) this->pc = 0x0; this->checked_out = {}; this->gprs = {0}; + this->vrs.fill({0}); this->gprs.at(2) = MEM_WORDS; // set the stack pointer } @@ -47,7 +49,12 @@ void Controller::run_for(int number) int Controller::get_clock_cycle() { return this->clock_cycle; } -std::array<int, GPR_NUM> Controller::get_gprs() { return this->gprs; } +std::array<signed int, GPR_NUM> Controller::get_gprs() { return this->gprs; } + +std::array<std::array<signed int, V_R_LIMIT>, V_NUM> Controller::get_vrs() +{ + return this->vrs; +} int Controller::get_pc() { return this->pc; } |