Skip to content

Commit

Permalink
Merge pull request #11 from VHDL/dev
Browse files Browse the repository at this point in the history
More documentation
  • Loading branch information
Paebbels authored Jun 9, 2021
2 parents 353b307 + b2accde commit a54aefa
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 78 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
env:
PYTHON: ${{ github.event.client_payload.PYTHON }}
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
env:
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand All @@ -38,7 +39,8 @@ jobs:
env:
PYTHON: 3.9
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Python ${{ env.PYTHON }}
uses: actions/setup-python@v2
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
__pycache__/
*.py[cod]

# Python installation packages
dist/

# Coverage.py
.coverage
.cov
coverage.xml

# setuptools
/build
/dist
/*.egg-info

# Sphinx
doc/_build/
doc/pyVHDLModel/**/*.*
Expand Down
2 changes: 1 addition & 1 deletion .idea/pyVHDLModel.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 44 additions & 19 deletions doc/LanguageModel/DesignUnits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,58 @@
Design Units
############

* Primary Units
A VHDL design (see :ref:`vhdlmodel-design`) is assembled from *design units*. VHDL distinguishes
between *primary* and *secondary* design units.

* Context
* Configuration
* Entity
* Package
.. rubric:: Table of Content

* Secondary Units
* :ref:`vhdlmodel-primary`

* Architeture
* Package Body
* :ref:`vhdlmodel-context`
* :ref:`vhdlmodel-configuration`
* :ref:`vhdlmodel-entity`
* :ref:`vhdlmodel-package`

* :ref:`vhdlmodel-secondary`

* :ref:`vhdlmodel-architeture`
* :ref:`vhdlmodel-packagebody`


.. _vhdlmodel-primary:

Primary Units
=============

.. _vhdlmodel-context:

Context
-------

.. todo::

Write documentation.



.. _vhdlmodel-configuration:

Configuration
-------------

.. todo::

Write documentation.



.. _vhdlmodel-entity:

Entity
------

.. todo::

Write documentation.
An ``Entity`` represents a VHDL entity declaration. It has a list of generic and
port items. It can contain a list of declared and body items.

**Condensed definition of class** :class:`~pyVHDLModel.VHDLModel.Entity`:

Expand All @@ -46,7 +63,7 @@ Entity
@export
class Entity(PrimaryUnit):
_libraryReferences: List[LibraryReference]
_uses: List[Use]
_packageReferences: List[PackageReference]
_genericItems: List[GenericInterfaceItem]
_portItems: List[PortInterfaceItem]
_declaredItems: List # FIXME: define liste element type e.g. via Union
Expand All @@ -58,7 +75,7 @@ Entity
def LibraryReferences(self) -> List[LibraryReference]:
@property
def Uses(self) -> List[Use]:
def PackageReferences(self) -> List[PackageReference]:
@property
def GenericItems(self) -> List[GenericInterfaceItem]:
Expand All @@ -74,6 +91,8 @@ Entity
.. _vhdlmodel-package:

Package
-------

Expand All @@ -88,7 +107,7 @@ Package
@export
class Package(PrimaryUnit):
_libraryReferences: List[Library]
_uses: List[Use]
_packageReferences: List[PackageReference]
_genericItems: List[GenericInterfaceItem]
_declaredItems: List
Expand All @@ -98,7 +117,7 @@ Package
def LibraryReferences(self) -> List[Library]:
@property
def Uses(self) -> List[Use]:
def PackageReferences(self) -> List[PackageReference]:
@property
def GenericItems(self) -> List[GenericInterfaceItem]:
Expand All @@ -108,9 +127,13 @@ Package
.. _vhdlmodel-secondary:

Secondary Units
===============

.. _vhdlmodel-architeture:

Architeture
-----------

Expand All @@ -126,7 +149,7 @@ Architeture
class Architecture(SecondaryUnit):
_entity: Entity
_libraryReferences: List[Library]
_uses: List[Use]
_packageReferences: List[PackageReference]
_declaredItems: List # FIXME: define liste element type e.g. via Union
_bodyItems: List['ConcurrentStatement']
Expand All @@ -139,7 +162,7 @@ Architeture
def LibraryReferences(self) -> List[Library]:
@property
def Uses(self) -> List[Use]:
def PackageReferences(self) -> List[PackageReference]:
@property
def DeclaredItems(self) -> List:
Expand All @@ -149,6 +172,8 @@ Architeture
.. _vhdlmodel-packagebody:

Package Body
------------

Expand All @@ -164,7 +189,7 @@ Package Body
class PackageBody(SecondaryUnit):
_package: Package
_libraryReferences: List[Library]
_uses: List[Use]
_packageReferences: List[PackageReference]
_declaredItems: List
def __init__(self, name: str):
Expand All @@ -176,7 +201,7 @@ Package Body
def LibraryReferences(self) -> List[Library]:
@property
def Uses(self) -> List[Use]:
def PackageReferences(self) -> List[PackageReference]:
@property
def DeclaredItems(self) -> List:
22 changes: 18 additions & 4 deletions doc/LanguageModel/Enumerations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,30 @@
Enumerations
############

The language model contains some enumerations to express a *kind* of a models entity.

Modes
=====
.. rubric:: Table of Content

* :ref:`vhdlmodel-mode`
* :ref:`vhdlmodel-objclass`



.. _vhdlmodel-mode:

Mode
====

.. todo::

Write documentation.

Object Classes
==============


.. _vhdlmodel-objclass:

Object Class
============

.. todo::

Expand Down
32 changes: 20 additions & 12 deletions doc/LanguageModel/Miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
Concepts not defined by VHDL
############################

Some features required for a holistic language model are not defined in
the VHDL :term:`LRM` (IEEE Std. 1076) or made explicitly implementation
Some features required for a holistic language model are not defined in the VHDL
:term:`LRM` (IEEE Std. 1076). Other features made explicitly implementation
specific to the implementer.

.. rubric:: Table of Content

* :ref:`vhdlmodel-design`
* :ref:`vhdlmodel-library`
* :ref:`vhdlmodel-document`


.. _vhdlmodel-design:

Design
Expand Down Expand Up @@ -72,20 +79,21 @@ is a *primary* design unit like: ``configuration``, ``entity``, ``package`` or
.. _vhdlmodel-sourcefile:
.. _vhdlmodel-document:

Sourcecode File
===============
Document
========

A source file contains multiple *design units*. Each design unit listed in a
sourcecode file is a *primary* or `secondary`design unit like: ``configuration``,
``entity``, ``architecture``, ``package``, ``package body`` or ``context``.
A source file (document) contains multiple *design units*. Each design unit
listed in a sourcecode file is a *primary* or *secondary* design unit like:
``configuration``, ``entity``, ``architecture``, ``package``, ``package body``
or ``context``.

Design unit may be preceded by a context made of ``library``, ``use`` and
``context`` statements. These statements are not directly visible in the ``Document``
object, because design unit contexts are consumed by the design units. See the
``Libraries`` and ``Uses`` fields of each design unit to investigate the consumed
contexts.
``context`` statements. These statements are not directly visible in the
``Document`` object, because design unit contexts are consumed by the design
units. See the ``Libraries`` and ``Uses`` fields of each design unit to
investigate the consumed contexts.

**Condensed definition of class** :class:`~pyVHDLModel.VHDLModel.Document`:

Expand Down
14 changes: 12 additions & 2 deletions doc/LanguageModel/SubprogramDefinitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
Subprogram Declarations
########################

* Procedure
* Function
.. rubric:: Table of Content

* :ref:`vhdlmodel-procedure`
* :ref:`vhdlmodel-function`



.. _vhdlmodel-procedure:

Procedure
=========
Expand All @@ -13,6 +19,10 @@ Procedure

Write documentation.



.. _vhdlmodel-function:

Function
========

Expand Down
13 changes: 13 additions & 0 deletions doc/LanguageModel/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
VHDL Language Model
###################

.. topic:: Design Goal

* Clearly named classes that model the semantics of VHDL.
* All language constructs (statements, declarations, specifications, …) have
their own classes. |br| These classes are arranged in a logical hierarchy,
with a single common base-class.
* Child objects shall have a reference to their parent.
* Comments will be associated with a particular code object.
* Easy modifications of the object tree.

.. rubric:: Elements of the Language Model

.. toctree::
:maxdepth: 1

Miscellaneous
Enumerations
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.8" # The short X.Y version.
release = "0.8.0" # The full version, including alpha/beta/rc tags.
release = "0.8.1" # The full version, including alpha/beta/rc tags.
try:
if _IsUnderGitControl:
latestTagName = _LatestTagName()[1:] # remove prefix "v"
Expand Down
Loading

0 comments on commit a54aefa

Please sign in to comment.