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

Using pyVHDLModel to aid in analyzing mixed language or projects with missing files. #83

Open
Tcenova opened this issue Aug 8, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Tcenova
Copy link
Contributor

Tcenova commented Aug 8, 2024

I am curious on your thoughts in allowing pyVHDLModel to be used in analyzing partial (missing files) or mixed language projects. Currently, the Analyze function in __init__.py will raise an exception if a package, library, or entity is missing and full analysis cannot be performed. As a local test, I removed raising some of the exceptions, and instead just printed them to know what is missing. I am using these changes with success in my use case.

Is this something which you would be open to being added to pyVHDLModel? I would need to think on a better long term way to allow for disabling the hard checks in analysis. I see value in doing so, especially in mixed language projects, or projects which use vendor provided libraries or entities which may not have plaintext source, or source that is only in Verilog.

@Paebbels
Copy link
Member

I'm not sure I fully got your thoughts.

You can add files step by step and each file is transformed into the model representation. Only higher level features like jumping from port to it's type require name resolutions etc. This can only (successfully) be done if all parts of the design exist.

For mixed language use cases, I hope for 2 things:

  1. GHDL goes on with it's Verilog parser (there have been commits in the past).
  2. Someone writes a pySVModel (currently an empty repository with only a VerilogVersion enum).

On VHDL side, we would have components for analysis. If the Verilog code is also loaded, pyVHDLModel could reference to Verilog entities. And vise versa.

For vendor libraries: Usually they provide components as an interface. For encrypted IPs, they need to provide the public interface as not encrypted. (see *.h files vs. *.a or *.so files)


For exception vs. no exception:
I think we could have a strikt mode vs. a relaxed mode or so. The question is then, how and where to collect these problems (exceptions). And if it could be continued afterwards.

Having such an error/warning collector, is somehow on my list. I'm faced this problem multiple times, were you want to relax parsing, so no exception and go on, but also provide a list of problematic zones in the code/file for users to improve.

I don't like the stop on first error behavior (most strikt), but everything else needs a clever implementation.

@Paebbels Paebbels added the question Further information is requested label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants