Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified to inherit Incisive from Xcelium #1

Draft
wants to merge 1 commit into
base: add/xcelium-support
Choose a base branch
from

Conversation

rodrigomelo9
Copy link
Owner

@umarcor I need help here

I tried to inherit Incisive from Xcelium. It was relatively simple, but I am not sure about how to solve a lot of pytests issues.

Before changes, the following was ok:

pytest tests/lint/
pytest tests/unit/

After changes, there are a lot of issues, where maybe you can help (after all, you suggested this change 😃)

With pytest tests/lint/ there are a lot of

tests/lint/test_pylint.py:16: in <module>
    from tests.lint.test_pycodestyle import get_files_and_folders
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
/usr/local/lib/python3.8/dist-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
tests/lint/test_pycodestyle.py:16: in <module>
    from vunit import ROOT as RSTR
vunit/__init__.py:13: in <module>
    from vunit.ui import VUnit
vunit/ui/__init__.py:24: in <module>
    from ..vunit_cli import VUnitCLI
vunit/vunit_cli.py:40: in <module>
    from vunit.sim_if.factory import SIMULATOR_FACTORY
vunit/sim_if/factory.py:175: in <module>
    SIMULATOR_FACTORY = SimulatorFactory()
vunit/sim_if/factory.py:157: in __init__
    self._compile_options = self._extract_compile_options()
vunit/sim_if/factory.py:49: in _extract_compile_options
    assert opt.name.startswith(sim_class.name + ".")
E   AssertionError

With pytest tests/unit/ there a lot of

tests/unit/test_xcelium_interface.py:20: in <module>
    from vunit.project import Project
vunit/__init__.py:13: in <module>
    from vunit.ui import VUnit
vunit/ui/__init__.py:24: in <module>
    from ..vunit_cli import VUnitCLI
vunit/vunit_cli.py:40: in <module>
    from vunit.sim_if.factory import SIMULATOR_FACTORY
vunit/sim_if/factory.py:175: in <module>
    SIMULATOR_FACTORY = SimulatorFactory()
vunit/sim_if/factory.py:157: in __init__
    self._compile_options = self._extract_compile_options()
vunit/sim_if/factory.py:49: in _extract_compile_options
    assert opt.name.startswith(sim_class.name + ".")
E   AssertionError

As you can see, in both cases related to assert opt.name.startswith(sim_class.name + ".")

@rodrigomelo9
Copy link
Owner Author

Solved :-D (this particular problem, I am dealing with others :P)

@rodrigomelo9 rodrigomelo9 force-pushed the incisive-inherited-from-xcelium branch 4 times, most recently from 4eb92b8 to a187660 Compare September 18, 2021 17:38
@rodrigomelo9
Copy link
Owner Author

@umarcor @cmarqu could you review this PR? tests/unit/test_incisive_interface.py is completely broken after these changes. I solved some complaints with:

$ git diff vunit/sim_if/incisive.py
diff --git a/vunit/sim_if/incisive.py b/vunit/sim_if/incisive.py
index b651bffb..8e832cb6 100644
--- a/vunit/sim_if/incisive.py
+++ b/vunit/sim_if/incisive.py
@@ -9,7 +9,7 @@ Interface for the Cadence Incisive simulator
 """
 
 from ..vhdl_standard import VHDL
-from . import ListOfStringOption
+from . import run_command, ListOfStringOption
 from .xcelium import XceliumInterface

And then, renaming irun by xrun in several parts of tests/unit/test_incisive_interface.py, but not sure if the path to go. I am open to suggestions :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant