Skip to content

Commit

Permalink
v0.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Jun 25, 2021
2 parents a93ad17 + 48af71c commit f61060f
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 53 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,41 @@ frontends.
* Created a (re)formatted output of VHDL.


## Examples
### List all Entities with Generics and Ports

The following tiny example is based on GHDL's [`pyGHDL.dom`](https://github.com/ghdl/ghdl/tree/master/pyGHDL/dom) package implementing
pyVHDLModel.

```python
from pathlib import Path
from pyGHDL.dom.NonStandard import Design, Document

sourceFile = Path("example.vhdl")

design = Design()
library = Design.GetLibrary("lib")
document = Document(sourceFile)
design.AddDocument(document, library)

for entity in document.Entities:
print("{}".format(entity.Name))
print(" generics:")
for generic in entity.Generics:
print(" - {} : {!s} {}".format(
generic.Name, generic.Mode, generic.SubTypeIndication)
)
print(" ports:")
for port in entity.Ports:
print(" - {} : {!s} {}".format(
port.Name, port.Mode, port.SubTypeIndication)
)
```





## Contributors
* [Patrick Lehmann](https://github.com/Paebbels) (Maintainer)
* [Unai Martinez-Corral](https://github.com/umarcor)
Expand Down
8 changes: 4 additions & 4 deletions doc/LanguageModel/DesignUnits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ types). An entity's list of statements is called body items.
def LibraryReferences(self) -> List[Library]:
@property
def PackageReferences(self) -> List[UseStatement]:
def PackageReferences(self) -> List[UseClause]:
@property
def ContextReferences(self) -> List[Context]:
Expand Down Expand Up @@ -131,7 +131,7 @@ Package
def LibraryReferences(self) -> List[Library]:
@property
def PackageReferences(self) -> List[UseStatement]:
def PackageReferences(self) -> List[UseClause]:
@property
def ContextReferences(self) -> List[Context]:
Expand Down Expand Up @@ -178,7 +178,7 @@ Architeture
def LibraryReferences(self) -> List[Library]:
@property
def PackageReferences(self) -> List[UseStatement]:
def PackageReferences(self) -> List[UseClause]:
@property
def ContextReferences(self) -> List[Context]:
Expand Down Expand Up @@ -223,7 +223,7 @@ Package Body
def LibraryReferences(self) -> List[Library]:
@property
def PackageReferences(self) -> List[UseStatement]:
def PackageReferences(self) -> List[UseClause]:
@property
def ContextReferences(self) -> List[Context]:
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _LatestTagName():

# The full version, including alpha/beta/rc tags
version = "0.9" # The short X.Y version.
release = "0.10.3" # The full version, including alpha/beta/rc tags.
release = "0.10.4" # The full version, including alpha/beta/rc tags.
try:
if _IsUnderGitControl:
latestTagName = _LatestTagName()[1:] # remove prefix "v"
Expand Down
Loading

0 comments on commit f61060f

Please sign in to comment.