Passes all tests - SRAI

This commit is contained in:
felsabbagh3
2019-02-11 00:41:07 -05:00
parent d9138a1493
commit 2c1f61196a
10 changed files with 589 additions and 139 deletions

View File

@@ -241,6 +241,7 @@ int emu_main(int argc, char **argv) {
// std::cout << "TESTING: " << tests[t] << "\n";
MemoryUnit mu(4096, arch.getWordSize(), basicMachine);
Core core(arch, *dec, mu/*, ID in multicore implementations*/);
@@ -248,13 +249,12 @@ int emu_main(int argc, char **argv) {
RAM old_ram;
old_ram.loadHexImpl(imgFileName.c_str());
// old_ram.loadHexImpl(tests[t]);
// MemDevice * memory = &old_ram;
ConsoleMemDevice console(arch.getWordSize(), cout, core, batch);
mu.attach(old_ram, 0);
mu.attach(console, 1ll<<(arch.getWordSize()*8 - 1));
// mu.attach(console, 0xf0000000);
while (core.running()) { console.poll(); core.step(); }