Extended register file to 64 bits

This commit is contained in:
Santosh Raghav Srivatsan 2021-11-08 17:54:16 -05:00
parent 8a550b625c
commit 9cd8dec397
6 changed files with 10 additions and 5 deletions

View file

@ -21,7 +21,9 @@ VPATH := $(sort $(dir $(SRCS)))
# Debugigng
ifdef DEBUG
CXXFLAGS += -g -O0 -DDEBUG_LEVEL=$(DEBUG)
# CXXFLAGS += -g -O0 -DDEBUG_LEVEL=$(DEBUG)
# simx64
CXXFLAGS += -g -O0 -DDEBUG_LEVEL=4
else
CXXFLAGS += -O2 -DNDEBUG
endif

View file

@ -1,7 +1,7 @@
#pragma once
#ifndef DEBUG_LEVEL
#define DEBUG_LEVEL 3
#define DEBUG_LEVEL 4
#endif
#define DEBUG_HEADER << "DEBUG "

View file

@ -16,7 +16,7 @@
using namespace vortex;
static bool HasDivergentThreads(const ThreadMask &thread_mask,
const std::vector<std::vector<Word>> &reg_file,
const std::vector<std::vector<DoubleWord>> &reg_file,
unsigned reg) {
bool cond;
size_t thread_idx = 0;

View file

@ -9,6 +9,8 @@ namespace vortex {
typedef uint8_t Byte;
typedef uint32_t Word;
typedef int32_t WordI;
// simx64
typedef uint64_t DoubleWord;
typedef uint32_t Addr;
typedef uint32_t Size;

View file

@ -13,7 +13,7 @@ using namespace vortex;
Warp::Warp(Core *core, Word id)
: id_(id)
, core_(core) {
iRegFile_.resize(core_->arch().num_threads(), std::vector<Word>(core_->arch().num_regs(), 0));
iRegFile_.resize(core_->arch().num_threads(), std::vector<DoubleWord>(core_->arch().num_regs(), 0));
fRegFile_.resize(core_->arch().num_threads(), std::vector<Word>(core_->arch().num_regs(), 0));
vRegFile_.resize(core_->arch().num_regs(), std::vector<Byte>(core_->arch().vsize(), 0));
this->clear();

View file

@ -98,7 +98,8 @@ private:
Word PC_;
ThreadMask tmask_;
std::vector<std::vector<Word>> iRegFile_;
// simx64
std::vector<std::vector<DoubleWord>> iRegFile_;
std::vector<std::vector<Word>> fRegFile_;
std::vector<std::vector<Byte>> vRegFile_;
std::stack<DomStackEntry> domStack_;