1 """simple core test, runs instructions from a TestMemory
5 * https://bugs.libre-soc.org/show_bug.cgi?id=363
8 # NOTE: to use cxxsim, export NMIGEN_SIM_MODE=cxxsim from the shell
9 # Also, check out the cxxsim nmigen branch, and latest yosys from git
13 from soc
.simple
.test
.test_runner
import TestRunner
15 # test with ALU data and Logical data
16 from soc
.fu
.alu
.test
.test_pipe_caller
import ALUTestCase
17 from soc
.fu
.div
.test
.test_pipe_caller
import DivTestCases
18 from soc
.fu
.logical
.test
.test_pipe_caller
import LogicalTestCase
19 from soc
.fu
.shift_rot
.test
.test_pipe_caller
import ShiftRotTestCase
20 from soc
.fu
.cr
.test
.test_pipe_caller
import CRTestCase
21 # from soc.fu.branch.test.test_pipe_caller import BranchTestCase
22 # from soc.fu.spr.test.test_pipe_caller import SPRTestCase
23 from soc
.fu
.ldst
.test
.test_pipe_caller
import LDSTTestCase
24 from openpower
.simulator
.test_sim
import (GeneralTestCases
, AttnTestCase
)
25 # from openpower.simulator.test_helloworld_sim import HelloTestCases
28 if __name__
== "__main__":
30 if len(sys
.argv
) == 2:
31 if sys
.argv
[1] == 'nosvp64':
35 print ("SVP64 test mode enabled", svp64
)
37 unittest
.main(exit
=False)
38 suite
= unittest
.TestSuite()
39 # suite.addTest(TestRunner(HelloTestCases.test_data, svp64=svp64))
40 suite
.addTest(TestRunner(DivTestCases().test_data
, svp64
=svp64
))
41 # suite.addTest(TestRunner(AttnTestCase.test_data, svp64=svp64))
42 suite
.addTest(TestRunner(GeneralTestCases
.test_data
, svp64
=svp64
))
43 suite
.addTest(TestRunner(LDSTTestCase().test_data
, svp64
=svp64
))
44 suite
.addTest(TestRunner(CRTestCase().test_data
, svp64
=svp64
))
45 suite
.addTest(TestRunner(ShiftRotTestCase().test_data
, svp64
=svp64
))
46 suite
.addTest(TestRunner(LogicalTestCase().test_data
, svp64
=svp64
))
47 suite
.addTest(TestRunner(ALUTestCase().test_data
, svp64
=svp64
))
48 # suite.addTest(TestRunner(BranchTestCase.test_data, svp64=svp64))
49 # suite.addTest(TestRunner(SPRTestCase.test_data, svp64=svp64))
51 runner
= unittest
.TextTestRunner()