[libre-riscv-dev] ModuleNotFoundError in soc.git

Tobias Platen hacks2019 at platen-software.de
Sun Jun 16 14:18:00 BST 2019


I've begun reading the PDFs and other RISC-V documentation,
and in the next few days I will read the source code of the
soc and the ieee754fpu. I tried to run the tests included
in the soc, but I got multiple ModuleNotFoundError errors.
All other test pass without any errors.

This is my test environment:

Debian Buster (testing)
Python 3.7.3
git version 2.20.1
migen git
Yosys 0.8+531 (git sha1 d4f77d40, clang 7.0.1-8 -fPIC -Os)

-------------- next part --------------
python3 setup.py test # could just run nosetest3...
running test
running egg_info
writing src/soc.egg-info/PKG-INFO
writing dependency_links to src/soc.egg-info/dependency_links.txt
writing requirements to src/soc.egg-info/requires.txt
writing top-level names to src/soc.egg-info/top_level.txt
reading manifest file 'src/soc.egg-info/SOURCES.txt'
writing manifest file 'src/soc.egg-info/SOURCES.txt'
running build_ext
Failure: ModuleNotFoundError (No module named 'plru') ... ERROR
Failure: ModuleNotFoundError (No module named 'ptw') ... ERROR
Failure: ModuleNotFoundError (No module named 'tlb') ... ERROR
test_lfsr_3 (TLB.test.test_LFSR2.TestLFSR) ... ok
test_poly (TLB.test.test_LFSR2.TestLFSR) ... ok
TLB.test.test_address_encoder.test_addr ... ok
TLB.test.test_cam.test_cam ... ok
TLB.test.test_cam_entry.test_camentry ... ok
TLB.test.test_permission_validator.test_permv ... ok
TLB.test.test_pte_entry.test_pteentry ... ok
TLB.test.test_set_associative_cache.test_assoc_cache ... /usr/local/lib/python3.7/dist-packages/nmigen-1a3101-py3.7.egg/nmigen/hdl/dsl.py:390: RuntimeWarning: Class <class 'nmigen.hdl.mem.Memory'> is an elaboratable that does not explicitly inherit from Elaboratable; doing so would improve diagnostics
  fragment.add_subfragment(Fragment.get(submodule, platform), name)
/usr/local/lib/python3.7/dist-packages/nmigen-1a3101-py3.7.egg/nmigen/hdl/ir.py:64: DeprecationWarning: it is not necessary or permitted to add Memory as a special or submodule
  obj = obj.elaborate(platform)
ok
scoreboard.test_iq.test_iq ... ok
scoreboard.test_mem2_fu_matrix.test_scoreboard ... ERROR
scoreboard.test_mem2_fu_matrix.test_mem_fus ... ok
Failure: ModuleNotFoundError (No module named 'ldst_dep_cell') ... ERROR

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'plru')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/frozen/LRV/soc/src/TLB/ariane/test/test_plru.py", line 5, in <module>
    from plru import PLRU
ModuleNotFoundError: No module named 'plru'

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'ptw')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/frozen/LRV/soc/src/TLB/ariane/test/test_ptw.py", line 7, in <module>
    from ptw import PTW, PTE
ModuleNotFoundError: No module named 'ptw'

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'tlb')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/frozen/LRV/soc/src/TLB/ariane/test/test_tlb.py", line 7, in <module>
    from tlb import TLB
ModuleNotFoundError: No module named 'tlb'

======================================================================
ERROR: scoreboard.test_mem2_fu_matrix.test_scoreboard
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/frozen/LRV/soc/src/scoreboard/test_mem2_fu_matrix.py", line 532, in test_scoreboard
    dut = IssueToScoreboard(2, 1, 1, 16, 8, 8)
NameError: name 'IssueToScoreboard' is not defined

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'ldst_dep_cell')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/frozen/LRV/soc/src/scoreboard/test_mem_fu_matrix.py", line 6, in <module>
    from scoreboard.ldst_matrix import LDSTDepMatrix
  File "/home/frozen/LRV/soc/src/scoreboard/ldst_matrix.py", line 37, in <module>
    from ldst_dep_cell import LDSTDepCell
ModuleNotFoundError: No module named 'ldst_dep_cell'

----------------------------------------------------------------------
Ran 15 tests in 3.866s

FAILED (errors=5)
Test failed: <unittest.runner.TextTestResult run=15 errors=5 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=15 errors=5 failures=0>
make: *** [Makefile:9: test] Fehler 1


More information about the libre-riscv-dev mailing list