Skip to content

Commit

Permalink
Added doc-strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed May 22, 2023
1 parent cb8150c commit 7f566d3
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 4 deletions.
37 changes: 37 additions & 0 deletions pyVHDLModel/IEEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,43 @@

@export
class Ieee(PredefinedLibrary):
"""
Predefined VHDL library ``ieee``.
The following predefined packages are in this library:
* Math
* :class:`~pyVHDLModel.IEEE.Math_Real`
* :class:`~pyVHDLModel.IEEE.Math_Complex`
* Std_logic
* :class:`~pyVHDLModel.IEEE.Std_Logic_1164`
* :class:`~pyVHDLModel.IEEE.Std_Logic_TextIO`
* :class:`~pyVHDLModel.IEEE.Std_Logic_Misc`
* Numeric
* :class:`~pyVHDLModel.IEEE.Numeric_Bit`
* :class:`~pyVHDLModel.IEEE.Numeric_Bit_Unsigned`
* :class:`~pyVHDLModel.IEEE.Numeric_Std`
* :class:`~pyVHDLModel.IEEE.Numeric_Std_Unsigned`
* Fixed/floating point
* :class:`~pyVHDLModel.IEEE.Fixed_Float_Types`
* :class:`~pyVHDLModel.IEEE.Fixed_Generic_Pkg`
* :class:`~pyVHDLModel.IEEE.Fixed_Pkg`
* :class:`~pyVHDLModel.IEEE.Float_Generic_Pkg`
* :class:`~pyVHDLModel.IEEE.Float_Pkg`
.. seealso::
Other predefined libraries:
* Library :class:`~pyVHDLModel.STD.Std`
"""

def __init__(self):
super().__init__(PACKAGES)

Expand Down
74 changes: 70 additions & 4 deletions pyVHDLModel/STD.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,46 @@

@export
class Std(PredefinedLibrary):
"""
Predefined VHDL library ``std``.
The following predefined packages are in this library:
* :class:`~pyVHDLModel.STD.Standard`
* :class:`~pyVHDLModel.STD.Env`
* :class:`~pyVHDLModel.STD.TextIO`
.. seealso::
Other predefined libraries:
* Library :class:`~pyVHDLModel.IEEE.Ieee`
"""

def __init__(self):
super().__init__(PACKAGES)


@export
class Standard(PredefinedPackage):
"""
Predefined package ``std.standard``.
Predefined types:
* ``boolean``, ``boolean_vector``
* ``bit``, ``bit_vector``
* ``character``, ``string``
* ``integer``, ``integer_vector``
* ``natural``, ``positive``
* ``real``, ``real_vector``
* ``time``, ``time_vector``
* ``open_file_kind``, ``open_file_status``
.. seealso::
Matching :class:`Package Body <pyVHDLModel.STD.Standard_Body>` declaration.
"""

def __init__(self):
super().__init__()

Expand Down Expand Up @@ -159,21 +193,47 @@ def __init__(self):

@export
class Standard_Body(PredefinedPackageBody):
pass
"""
Predefined package body of package ``std.standard``.
.. seealso::
Matching :class:`Package <pyVHDLModel.STD.Standard>` declaration.
"""


@export
class TextIO(PredefinedPackage):
pass
"""
Predefined package ``std.textio``.
.. seealso::
Matching :class:`Package Body <pyVHDLModel.STD.TextIO_Body>` declaration.
"""


@export
class TextIO_Body(PredefinedPackageBody):
pass
"""
Predefined package body of package ``std.textio``.
.. seealso::
Matching :class:`Package <pyVHDLModel.STD.TextIO>` declaration.
"""


@export
class Env(PredefinedPackage):
"""
Predefined package ``std.env``.
.. seealso::
Matching :class:`Package Body <pyVHDLModel.STD.Env_Body>` declaration.
"""

def __init__(self):
super().__init__()

Expand All @@ -182,7 +242,13 @@ def __init__(self):

@export
class Env_Body(PredefinedPackageBody):
pass
"""
Predefined package body of package ``std.env``.
.. seealso::
Matching :class:`Package <pyVHDLModel.STD.Env>` declaration.
"""


PACKAGES = (
Expand Down

0 comments on commit 7f566d3

Please sign in to comment.