yield
-def test_dcache(mem, test_fn, test_name):
+def tst_dcache(mem, test_fn, test_name):
dut = DCache()
memory = Memory(width=64, depth=len(mem), init=mem, simulate=True)
for i in range(memsize):
mem.append(i)
- test_dcache(mem, dcache_regression_sim, "simpleregression")
+ tst_dcache(mem, dcache_regression_sim, "simpleregression")
mem = []
memsize = 256
for i in range(memsize):
mem.append(i)
- test_dcache(mem, dcache_random_sim, "random")
+ tst_dcache(mem, dcache_random_sim, "random")
mem = []
for i in range(1024):
mem.append((i*2)| ((i*2+1)<<32))
- test_dcache(mem, dcache_sim, "")
+ tst_dcache(mem, dcache_sim, "")
yield
-def test_dcache(mem, test_fn, test_name):
+def tst_dcache(mem, test_fn, test_name):
dut = DCache()
memory = Memory(width=64, depth=len(mem), init=mem, simulate=True)
for i in range(memsize):
mem.append(i)
- test_dcache(mem, dcache_regression_sim, "simpleregression")
+ tst_dcache(mem, dcache_regression_sim, "simpleregression")
mem = []
memsize = 256
for i in range(memsize):
mem.append(i)
- test_dcache(mem, dcache_random_sim, "random")
+ tst_dcache(mem, dcache_random_sim, "random")
mem = []
for i in range(1024):
mem.append((i*2)| ((i*2+1)<<32))
- test_dcache(mem, dcache_sim, "")
+ tst_dcache(mem, dcache_sim, "")
# TODO: memory ports
-def test_cache_single_run(dut):
+def tst_cache_single_run(dut):
#test single byte
addr = 0
data = 0xfeedface
dut = TestCachedMemoryPortInterface()
#LDSTSplitter(8, 48, 4) #data leng in bytes, address bits, select bits
- run_simulation(dut, test_cache_single_run(dut),
+ run_simulation(dut, tst_cache_single_run(dut),
vcd_name='test_cache_single.vcd')