add unittest for tlb_content.py
authorTobias Platen <tplaten@posteo.de>
Mon, 9 Sep 2019 18:31:06 +0000 (20:31 +0200)
committerTobias Platen <tplaten@posteo.de>
Mon, 9 Sep 2019 18:31:06 +0000 (20:31 +0200)
src/TLB/ariane/test/test_tlb_content.py [new file with mode: 0644]

diff --git a/src/TLB/ariane/test/test_tlb_content.py b/src/TLB/ariane/test/test_tlb_content.py
new file mode 100644 (file)
index 0000000..2261329
--- /dev/null
@@ -0,0 +1,22 @@
+import sys
+sys.path.append("../src")
+sys.path.append("../../../TestUtil")
+
+from nmigen.compat.sim import run_simulation
+
+from TLB.ariane.tlb_content import TLBContent
+
+#def set_vaddr(addr):
+#    yield dut.lu_vaddr_i.eq(addr)
+#    yield dut.update_i.vpn.eq(addr>>12)
+
+def tbench(dut):
+    yield
+    yield
+    yield
+
+if __name__ == "__main__":
+    dut = TLBContent(4,4)
+    #
+    run_simulation(dut, tbench(dut), vcd_name="test_tlb_content.vcd")
+    print("TLBContent Unit Test Success")