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

get_implementation_subset dependency fail on components #286

Closed
gsorrenti opened this issue Nov 7, 2017 · 9 comments
Closed

get_implementation_subset dependency fail on components #286

gsorrenti opened this issue Nov 7, 2017 · 9 comments

Comments

@gsorrenti
Copy link

In some particular situation get_implementation_subset fail to detect correctly the dependency tree. It seems to be related to instantiation by components.
Please find bug test on my forch.

The conditions are:

  1. circular_dependency
    The same entity is defined in two different libraries and inside each library it is instantiated by component in others entities. Vunit raise an error of circular dependency.
  2. multiple_library_dep
    The same entity is compiled in two different libraries. The dependency is propagated to all libraries even if only one should be involved.
  3. separated_architecture
    In case of entity and architecture definition located in different files, the dependency is not propagated to architecture files.
  4. verilog_component
    In case of verilog entities instantiated by components, the dependency is not propagated.
@kraigher
Copy link
Collaborator

kraigher commented Nov 7, 2017

It would be helpful if you could formulate your reproducing cases as test cases in this file: https://github.com/VUnit/vunit/blob/master/vunit/test/unit/test_project.py

If you want to also try to fix the implementation that is also welcome.

@gsorrenti
Copy link
Author

Ok @kraigher, I'll add test cases as soon as possible.

@gsorrenti
Copy link
Author

Sorry @kraigher I cannot figure how to use a project defined in test_project.py. Sure it's my python competence lack.

@gsorrenti
Copy link
Author

Ok, one step ahead. I understood I have to run tox.

@gsorrenti
Copy link
Author

I pushed on my fork the four new tests. Do you prefer a pull request?

@kraigher
Copy link
Collaborator

A pull request is convenient.

BTW: You do not need to use tox to run tests. Just do:

python -m pytest vunit/test/unit/

Maybe need to install pytest first:

python -m pip install pytest mock

@kraigher
Copy link
Collaborator

@gsorrenti I made fixes such that your tests pass now. Also fixed such that architecture files are added for component instantiations as well as entity instantiations. Thank you for contributing the test cases.

@gsorrenti
Copy link
Author

gsorrenti commented Dec 27, 2017 via email

@gsorrenti
Copy link
Author

I experimented some other problem related to component packages. As soon as possible I will provide new tests.

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

No branches or pull requests

2 participants