0641b556e9b77406fdaafa5d409e1950ca355b34
1 from nmigen
.compat
.sim
import run_simulation
3 from TLB
.SetAssociativeCache
import SetAssociativeCache
5 from TestUtil
.test_helper
import assert_eq
, assert_ne
, assert_op
7 def set_sac(dut
, e
, c
, s
, t
, d
):
9 yield dut
.command
.eq(c
)
12 yield dut
.data_i
.eq(d
)
21 yield from set_sac(dut
, enable
, command
, cset
, tag
, data
)
29 yield from set_sac(dut
, enable
, command
, cset
, tag
, data
)
32 def test_assoc_cache():
33 dut
= SetAssociativeCache(4, 4, 4, 4)
34 run_simulation(dut
, tbench(dut
), vcd_name
="Waveforms/test_set_associative_cache.vcd")
35 print("Set Associative Cache Unit Test Success")
37 if __name__
== "__main__":