missing simX changes from OPAE

This commit is contained in:
Blaise Tine
2020-03-27 22:44:16 -04:00
parent 8bb1f66220
commit f3889f8744
11 changed files with 552 additions and 425 deletions

View File

@@ -16,15 +16,16 @@ namespace Harp {
public:
struct Undefined {};
ArchDef(const std::string &s) {
ArchDef(const std::string &s, bool cpu_mode = false, int num_warps =32, int num_threads = 32)
: cpu_mode_(cpu_mode) {
std::istringstream iss(s.c_str());
wordSize = 4;
encChar = 'w';
nRegs = 32;
nPRegs = 0;
nThds = 32;
nWarps = 32;
nThds = num_warps;
nWarps = num_threads;
extent = EXT_WARPS;
@@ -98,6 +99,10 @@ namespace Harp {
ThdNum getNWarps() const {
if (extent < EXT_WARPS) throw Undefined(); else return nWarps;
}
bool is_cpu_mode() const {
return cpu_mode_;
}
private:
enum Extent {
@@ -110,6 +115,7 @@ namespace Harp {
ThdNum nThds, nWarps;
RegNum nRegs, nPRegs;
char encChar;
bool cpu_mode_;
};
}