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

VPI: add support for detecting ports and their directions #753

Merged
merged 3 commits into from
Feb 14, 2019

Conversation

kammoh
Copy link
Contributor

@kammoh kammoh commented Feb 11, 2019

Description
The changes enable vpi_get(vpiType, handle_to_port) to return vpiPort if the signal is a port. It also enables vpi_get(vpiDirection, handle_to_port) to return correct port directions(vpiInput, vpiOutput, or vpiInout).
The changes does not change behavior for other types of signals.

🚨 Before submitting your PR, please read contribute in the Docs, and review the following checklist:

When contributing to the GHDL codebase...

  • DO make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • DO make sure you are making a pull request against the master branch (left side). Also you should start your branch off our master.
  • DO make sure that GHDL can be successfully built. See Building GHDL.
  • CONSIDER adding a unit test if your PR resolves an issue.
  • CONSIDER modifying the docs, at least in the TODO, if your contribution is relevant to any of the content.
  • AVOID breaking the continuous integration build.
  • AVOID breaking the testsuite.

When contributing to the docs...

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did, what alternatives you considered, etc.

❤️ Thank you!

@tgingold
Copy link
Member

This is OK, but some builds are failing due to trailing spaces. Can you remove them ?
You can also consider 'buffer' ports to be outputs.

@kammoh
Copy link
Contributor Author

kammoh commented Feb 13, 2019

@tgingold should ports with VhpiBufferMode be treated as vpiOutput or vpiInout instead of vpiNoDirection?

@kammoh
Copy link
Contributor Author

kammoh commented Feb 13, 2019

@tgingold I fixed the indentation issue but travis is still failing and I can't tell the reason

@eine
Copy link
Collaborator

eine commented Feb 13, 2019

@xnorme it is failing because of gna/issue450. It expects the output in disptree.ref. Instead, this is generated. As you can see, three lines are missing after Simple module name (vpiName): disptree. Does it make sense to you?

@kammoh
Copy link
Contributor Author

kammoh commented Feb 13, 2019

Thanks @1138-4eb. I had missed the point that a vpiPort is (or could be?) a vpiNet as well. Will try to push a fix.

@tgingold tgingold merged commit 4b9a513 into ghdl:master Feb 14, 2019
@tgingold
Copy link
Member

Thanks!

Bonus point if buffer ports are also considered as vpiOutput.

kammoh added a commit to kammoh/ghdl that referenced this pull request Feb 22, 2019
kammoh added a commit to kammoh/ghdl that referenced this pull request Feb 22, 2019
@kammoh kammoh mentioned this pull request Feb 22, 2019
kammoh added a commit to kammoh/ghdl that referenced this pull request Feb 22, 2019
kammoh added a commit to kammoh/ghdl that referenced this pull request Feb 22, 2019
tgingold added a commit that referenced this pull request Feb 23, 2019
@eine eine mentioned this pull request Sep 4, 2019
gatk555 pushed a commit to gatk555/ghdl that referenced this pull request Apr 15, 2024
…rts3,

the source for PR ghdl#762:
  "VPI: Adding vpiPort detection (Corrects regression introduced by ghdl#753)".
This seems the only part of the PR that addresses the title issue and
even then mostly seems to be an unrelated improvement to vpi_get_string().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants