]> Joshua Wise's Git repositories - firearm.git/commitdiff
Add testbench
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 28 Dec 2008 08:23:34 +0000 (03:23 -0500)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 28 Dec 2008 08:23:34 +0000 (03:23 -0500)
ram.hex [new file with mode: 0644]
testbench.cpp [new file with mode: 0644]

diff --git a/ram.hex b/ram.hex
new file mode 100644 (file)
index 0000000..937ce99
--- /dev/null
+++ b/ram.hex
@@ -0,0 +1,44 @@
+e180f081
+e180f081
+e180f081
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+E0000000
+
diff --git a/testbench.cpp b/testbench.cpp
new file mode 100644 (file)
index 0000000..4188d71
--- /dev/null
@@ -0,0 +1,28 @@
+#include "Vsystem.h"
+#include <stdio.h>
+
+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++;
+       }
+}
This page took 0.027667 seconds and 4 git commands to generate.