1 """Self-contained unit test for the Load/Store CompUnit
5 from nmigen
import Module
6 from nmigen
.sim
import Simulator
7 from soc
.experiment
.compldst_multi
import LDSTCompUnit
8 from soc
.experiment
.pimem
import PortInterface
9 from soc
.fu
.ldst
.pipe_data
import LDSTPipeSpec
12 class TestLDSTCompUnit(unittest
.TestCase
):
14 def test_ldst_compunit(self
):
16 pi
= PortInterface(name
="pi")
17 regspec
= LDSTPipeSpec
.regspec
18 dut
= LDSTCompUnit(pi
, regspec
)
19 m
.submodules
.dut
= dut
26 sim
.add_sync_process(process
)
27 sim_writer
= sim
.write_vcd("test_ldst_compunit.vcd")
32 if __name__
== '__main__':