Added initial register content needed by runtime.

git-svn-id: http://www.cdkersey.com/harp/harptool@10 0246edb2-e076-4747-b392-db732a341fa2
This commit is contained in:
chad
2011-07-23 12:22:43 +00:00
parent 269fe72f2d
commit e3ab8a71ee
3 changed files with 6 additions and 6 deletions

View File

@@ -14,13 +14,13 @@
using namespace Harp;
using namespace std;
Core::Core(const ArchDef &a, Decoder &d, MemoryUnit &mem) :
Core::Core(const ArchDef &a, Decoder &d, MemoryUnit &mem, Word id) :
a(a), iDec(d), mem(mem), pc(0), interruptEnable(false), supervisorMode(true),
activeThreads(1),
reg(a.getNThds(), vector<Word>(a.getNRegs())),
pred(a.getNPRegs(), vector<bool>(a.getNPRegs())),
shadowReg(), shadowPReg(), interruptEntry(0)
{ }
shadowReg(), shadowPReg(), interruptEntry(0), id(id)
{ reg[0][0] = (a.getNThds()<<(a.getWordSize()*8 / 2)) | id; }
void Core::step() {
Size fetchPos(0), decPos, wordSize(a.getWordSize());