X-Git-Url: http://git.joshuawise.com/firearm.git/blobdiff_plain/5b3daee2fb720393ea9afbbf8647f912701b6fed..3a57f3e5cbccf519c546eebed9fa9db7c328d72c:/testbench.cpp diff --git a/testbench.cpp b/testbench.cpp new file mode 100644 index 0000000..4188d71 --- /dev/null +++ b/testbench.cpp @@ -0,0 +1,28 @@ +#include "Vsystem.h" +#include + +Vsystem *top; + +unsigned int main_time = 0; + +double sc_time_stamp () +{ + return main_time; +} + +int main() +{ + top = new Vsystem; + + top->clk = 0; + while (!Verilated::gotFinish()) + { + top->clk = !top->clk; + + top->eval(); +// if (top->clk == 1) +// printf("%d: Bubble: %d. PC: %08x. Ins'n: %08x\n", main_time/2, top->bubbleshield, top->pc, top->insn); + + main_time++; + } +}