From 9965c5ef7abfbafebeb1afaed6d20cd0f38e0200 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 9 Nov 2022 00:10:50 -0600 Subject: Update fetch, decode testbenches --- tb/top/decode_test.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tb/top/decode_test.cpp') 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(); -- cgit v1.2.3