summaryrefslogtreecommitdiff
path: root/tb/top/decode_test.cpp
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-09 00:10:50 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-09 00:10:50 -0600
commit9965c5ef7abfbafebeb1afaed6d20cd0f38e0200 (patch)
tree8e8668fafde7cc27a3a3ff7f9be97a5deeb9c6fc /tb/top/decode_test.cpp
parent1ea0519a2b6b81e0ba324cd69f8785735e7cbef5 (diff)
Update fetch, decode testbenches
Diffstat (limited to 'tb/top/decode_test.cpp')
-rw-r--r--tb/top/decode_test.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tb/top/decode_test.cpp b/tb/top/decode_test.cpp
index 09f973e..4b78535 100644
--- a/tb/top/decode_test.cpp
+++ b/tb/top/decode_test.cpp
@@ -77,11 +77,6 @@ int main(int argc, char** argv) {
0x20000000,
};
- top.n = 0;
- top.z = 0;
- top.c = 0;
- top.v = 0;
-
int clk_tick = 0;
int time = 0;
@@ -92,9 +87,13 @@ int main(int argc, char** argv) {
top.eval();
trace.dump(time++);
- std::printf("insn=0x%08x, ctrl=0x%08x\n",
- rom[i], top.ctrl);
-
+ std::printf("insn=0x%08x, dec=0x", top.insn);
+ for(std::size_t j = 0; j < sizeof(top.dec) / sizeof(top.dec[0]); ++j)
+ {
+ std::printf("%08x", top.dec[j]);
+ }
+
+ std::puts("");
}
trace.close();