move unused directory out of src, to indicate "ignore completely"
[soc.git] / src / soc / simple / test / test_issuer.py
1 """simple core test, runs instructions from a TestMemory
2
3 related bugs:
4
5 * https://bugs.libre-soc.org/show_bug.cgi?id=363
6 """
7
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
10
11 import unittest
12 import sys
13
14 # here is the logic which takes test cases and "executes" them.
15 # in this instance (TestRunner) its job is to instantiate both
16 # a Libre-SOC nmigen-based HDL instance and an ISACaller python
17 # simulator. it's also responsible for performing the single
18 # step and comparison.
19 from soc.simple.test.test_runner import TestRunner
20
21 # test with ALU data and Logical data
22 from openpower.test.alu.alu_cases import ALUTestCase
23 from openpower.test.div.div_cases import DivTestCases
24 from openpower.test.logical.logical_cases import LogicalTestCase
25 from openpower.test.shift_rot.shift_rot_cases import ShiftRotTestCase
26 from openpower.test.cr.cr_cases import CRTestCase
27 from openpower.test.branch.branch_cases import BranchTestCase
28 # from soc.fu.spr.test.test_pipe_caller import SPRTestCase
29 from openpower.test.ldst.ldst_cases import LDSTTestCase
30 from openpower.simulator.test_sim import (GeneralTestCases, AttnTestCase)
31 # from openpower.simulator.test_helloworld_sim import HelloTestCases
32
33
34 if __name__ == "__main__":
35 svp64 = True
36 if len(sys.argv) == 2:
37 if sys.argv[1] == 'nosvp64':
38 svp64 = False
39 sys.argv.pop()
40
41 print ("SVP64 test mode enabled", svp64)
42
43 unittest.main(exit=False)
44 suite = unittest.TestSuite()
45 # suite.addTest(TestRunner(HelloTestCases.test_data, svp64=svp64))
46 suite.addTest(TestRunner(DivTestCases().test_data, svp64=svp64))
47 # suite.addTest(TestRunner(AttnTestCase.test_data, svp64=svp64))
48 suite.addTest(TestRunner(GeneralTestCases.test_data, svp64=svp64))
49 suite.addTest(TestRunner(LDSTTestCase().test_data, svp64=svp64))
50 suite.addTest(TestRunner(CRTestCase().test_data, svp64=svp64))
51 suite.addTest(TestRunner(ShiftRotTestCase().test_data, svp64=svp64))
52 suite.addTest(TestRunner(LogicalTestCase().test_data, svp64=svp64))
53 suite.addTest(TestRunner(ALUTestCase().test_data, svp64=svp64))
54 suite.addTest(TestRunner(BranchTestCase().test_data, svp64=svp64))
55 # suite.addTest(TestRunner(SPRTestCase.test_data, svp64=svp64))
56
57 runner = unittest.TextTestRunner()
58 runner.run(suite)