Example #1
0
class Std_Package:
    # Use .value
    Std_Location = c_int32.in_dll(libghdl, "std_package__std_location")

    # Use .value
    Standard_Package = c_int32.in_dll(libghdl, "std_package__standard_package")

    # Use .value
    Character_Type_Definition = c_int32.in_dll(
        libghdl, "std_package__character_type_definition")
Example #2
0
class Libraries:
    Get_Libraries_Chain = libghdl.libraries__get_libraries_chain

    Add_Design_Unit_Into_Library = \
        libghdl.libraries__add_design_unit_into_library

    Finish_Compilation = libghdl.sem_lib__finish_compilation

    # Use .value
    Library_Location = c_int32.in_dll(libghdl, "libraries__library_location")

    # Use .value
    Work_Library = c_int32.in_dll(libghdl, "libraries__work_library")

    Purge_Design_File = libghdl.libraries__purge_design_file

    Find_Entity_For_Component = libghdl.libraries__find_entity_for_component
Example #3
0
from libghdl import libghdl
from ctypes import c_int32

Get_Libraries_Chain = libghdl.libraries__get_libraries_chain

Add_Design_Unit_Into_Library = \
    libghdl.libraries__add_design_unit_into_library

# Use .value
Library_Location = c_int32.in_dll(libghdl, "libraries__library_location")

# Use .value
Work_Library = c_int32.in_dll(libghdl, "libraries__work_library")

Purge_Design_File = libghdl.libraries__purge_design_file

Find_Entity_For_Component = libghdl.libraries__find_entity_for_component

Get_Library_No_Create = libghdl.libraries__get_library_no_create

Find_Primary_Unit = libghdl.libraries__find_primary_unit
Example #4
0
def num_realizations():
    """Number of realizations of global tallies."""
    return c_int32.in_dll(_dll, 'n_realizations').value
Example #5
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_materials').value
Example #6
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_tallies').value
Example #7
0
def num_realizations():
    """Number of realizations of global tallies."""
    return c_int32.in_dll(_dll, 'n_realizations').value
Example #8
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_cells').value
Example #9
0
Get_Name_Length = libghdl.name_table__get_name_length

Get_Name_Ptr = libghdl.name_table__get_name_ptr
Get_Name_Ptr.restype = c_char_p

_Get_Identifier_With_Len = libghdl.name_table__get_identifier_with_len


def Get_Identifier(s):
    return _Get_Identifier_With_Len(c_char_p(s), len(s))


# std.standard

Standard_Package = c_int32.in_dll(libghdl, "std_package__standard_package")

# libraries

Get_Libraries_Chain = libghdl.libraries__get_libraries_chain

Null_Iir = 0
Null_Iir_List = 0


def _build_enum_image(cls):
    d = [e for e in dir(cls) if e[0] != '_']
    res = [None] * len(d)
    for e in d:
        res[getattr(cls, e)] = e
    return res
Example #10
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_cells').value
Example #11
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_materials').value
Example #12
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_tallies').value
Example #13
0
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <gnu.org/licenses>.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ============================================================================

from ctypes import c_int32

from pyGHDL.libghdl import libghdl
from pyGHDL.libghdl._types import (
    LocationType,
    Iir_Package_Declaration,
    Iir_Enumeration_Type_Definition,
)


__all__ = ["Std_Location", "Standard_Package", "Character_Type_Definition"]


Std_Location: LocationType = c_int32.in_dll(libghdl, "vhdl__std_package__std_location")
"""Virtual location for the ``std.standard`` package. Use ``.value`` to access this variable inside libghdl."""

Standard_Package: Iir_Package_Declaration = c_int32.in_dll(libghdl, "vhdl__std_package__standard_package")
"""Virtual package ``std.package``. Use ``.value`` to access this variable inside libghdl."""

Character_Type_Definition: Iir_Enumeration_Type_Definition = c_int32.in_dll(
    libghdl, "vhdl__std_package__character_type_definition"
)
"""Predefined character. Use ``.value`` to access this variable inside libghdl."""
Example #14
0
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <gnu.org/licenses>.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ============================================================================

from ctypes import c_int32

from pyGHDL.libghdl import libghdl

__all__ = ["Std_Location", "Standard_Package", "Character_Type_Definition"]

Std_Location = c_int32.in_dll(
    libghdl, "vhdl__std_package__std_location"
)  #: Virtual location for the ``std.standard`` package. Type ``Location_Type``. Use ``.value`` to access this variable inside libghdl.
Standard_Package = c_int32.in_dll(
    libghdl, "vhdl__std_package__standard_package"
)  #: Virtual package ``std.package``. Type ``Iir_Package_Declaration``. Use ``.value`` to access this variable inside libghdl.
Character_Type_Definition = c_int32.in_dll(
    libghdl, "vhdl__std_package__character_type_definition"
)  #: Predefined character. Type ``Iir_Enumeration_Type_Definition``. Use ``.value`` to access this variable inside libghdl.
Example #15
0
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ============================================================================

from ctypes import c_int32

from pydecor import export

from pyGHDL.libghdl import libghdl

__all__ = ["Library_Location", "Work_Library"]

from pyGHDL.libghdl._types import NameId

Library_Location = c_int32.in_dll(
    libghdl, "libraries__library_location"
)  #: A location for library declarations (such as library WORK). Type ``Location_Type``. Use ``.value`` to access this variable inside libghdl
Work_Library = c_int32.in_dll(
    libghdl, "libraries__work_library"
)  #: Library declaration for the work library. Note: the identifier of the work_library is ``work_library_name``, which may be different from 'WORK'. Type: ``Iir_Library_Declaration``. Use ``.value`` to access this variable inside libghdl


@export
def Get_Libraries_Chain():
    """
    Get the chain of libraries.  Can be used only to read (it mustn't be modified).

    :return: Type ``Iir_Library_Declaration``
    """
    return libghdl.libraries__get_libraries_chain()
Example #16
0
File: thin.py Project: qicny/ghdl
        libghdl, "canon__canon_flag_concurrent_stmts")

    Flag_Configurations = c_bool.in_dll(libghdl,
                                        "canon__canon_flag_configurations")

    Flag_Associations = c_bool.in_dll(libghdl,
                                      "canon__canon_flag_associations")

    Extract_Sequential_Statement_Chain_Sensitivity = \
        libghdl.canon__canon_extract_sequential_statement_chain_sensitivity


# std.standard

# Use .value
Standard_Package = c_int32.in_dll(libghdl, "std_package__standard_package")

# Use .value
Character_Type_Definition = c_int32.in_dll(
    libghdl, "std_package__character_type_definition")

# libraries

Get_Libraries_Chain = libghdl.libraries__get_libraries_chain

Add_Design_Unit_Into_Library = libghdl.libraries__add_design_unit_into_library

Finish_Compilation = libghdl.libraries__finish_compilation

# Use .value
Library_Location = c_int32.in_dll(libghdl, "libraries__library_location")
Example #17
0
from libghdl import libghdl
from ctypes import c_int32

# Use .value
Std_Location = c_int32.in_dll(libghdl, "vhdl__std_package__std_location")

# Use .value
Standard_Package = c_int32.in_dll(libghdl,
                                  "vhdl__std_package__standard_package")

# Use .value
Character_Type_Definition = c_int32.in_dll(
    libghdl, "vhdl__std_package__character_type_definition")
Example #18
0
from pydecor import export

from pyGHDL.libghdl import libghdl
from pyGHDL.libghdl._types import (
    NameId,
    Iir_Library_Declaration,
    Iir_Design_Unit,
    Iir_Design_File,
    LocationType,
)
from pyGHDL.libghdl._decorator import BindToLibGHDL

__all__ = ["Library_Location", "Work_Library"]

Library_Location: LocationType = c_int32.in_dll(libghdl,
                                                "libraries__library_location")
"""
A location for library declarations (such as library WORK). Use ``.value`` to
access this variable inside libghdl.
"""

Work_Library: Iir_Library_Declaration = c_int32.in_dll(
    libghdl, "libraries__work_library")
"""
Library declaration for the work library. Note: the identifier of the work_library
is ``work_library_name``, which may be different from 'WORK'. Use ``.value`` to
access this variable inside libghdl.
"""


@export
Example #19
0
 def __len__(self):
     return c_int32.in_dll(_dll, 'n_filters').value