### Configuration Instantiation Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing a configuration instantiation in VHDL. ```VHDL inst : configuration Counter; -- ^^^^^^^ ``` -------------------------------- ### Install pyVHDLModel using setup.py (legacy) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Legacy installation method using setup.py. ```bash setup.py install ``` -------------------------------- ### Install pyVHDLModel with documentation dependencies (Windows) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Installs pyVHDLModel with the 'doc' extra on Windows. ```bash # Install with dependencies to generate documentation pip install pyVHDLModel[doc] ``` -------------------------------- ### ComponentInstantiationSymbol VHDL Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing a component instantiation reference in VHDL code. ```VHDL inst : component Counter; -- ^^^^^^^ ``` -------------------------------- ### AllPackageMembersReferenceSymbol VHDL Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing a reference to all members of a package in VHDL code. ```VHDL use ieee.numeric_std.all; -- ^^^^^^^^^^^^^^^^^^^^ ``` -------------------------------- ### Install pyVHDLModel with documentation dependencies (Linux/macOS) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Installs pyVHDLModel with the 'doc' extra to generate documentation. ```bash # Install with dependencies to generate documentation pip3 install pyVHDLModel[doc] ``` -------------------------------- ### ContextReferenceSymbol VHDL Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing a context reference in VHDL code. ```VHDL context ieee.ieee_std_context; -- ^^^^^^^^^^^^^^^^^^^^^ ``` -------------------------------- ### Install pyVHDLModel with unit testing dependencies (Windows) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Installs pyVHDLModel with the 'test' extra on Windows. ```bash # Install with dependencies to run unit tests pip install pyVHDLModel[test] ``` -------------------------------- ### Install packaging dependencies with pip3 Source: https://vhdl.github.io/pyVHDLModel/Dependency.html Install all packaging dependencies for the pyVHDLModel project. Use this command when preparing to publish the installation package to PyPI or equivalent services. The dist/requirements.txt file recursively installs mandatory dependencies. ```bash pip3 install -U -r dist/requirements.txt ``` -------------------------------- ### Install pyGHDL with pip on Windows Source: https://vhdl.github.io/pyVHDLModel/GettingStarted.html Run in PowerShell from the GHDL sources directory to install pyGHDL via pip. The dependencies of pyGHDL, such as pyVHDLModel, are installed automatically. ```powershell cd C:\Tools\GHDL\sources pip install . ``` -------------------------------- ### Local wheel packaging and installation (Windows) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Creates a local wheel, uninstalls the old package, and installs the wheel on Windows. ```bash cd # Package the code in a wheel (*.whl) py -m build --wheel # Uninstall the old package py -m pip uninstall -y pyVHDLModel # Install from wheel py -m pip install .\dist\pyVHDLModel-0.31.0-py3-none-any.whl ``` -------------------------------- ### Attribute Specification Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Declaration_py.html Example of a VHDL attribute specification. ```VHDL attribute TotalBits of BusType : subtype is 32; ``` -------------------------------- ### Document.__init__(path, documentation=None, vhdlVersion=2008, library=None, parent=None) Source: https://vhdl.github.io/pyVHDLModel/pyVHDLModel/pyVHDLModel.html Initializes a VHDL document. ```APIDOC ## Document.__init__(path, documentation=None, vhdlVersion=2008, library=None, parent=None) ### Description Initializes a VHDL document. ### Method __init__(path, documentation=None, vhdlVersion=2008, library=None, parent=None) ### Parameters - **path** (readonly) - Required - Path to the document. `None` if in-memory document. - **documentation** (str | None) - Optional - The documentation comment associated with this declaration. - **vhdlVersion** (readonly) - Optional - VHDL version used for analyzing this source file. - **library** (readonly | None) - Optional - VHDL library used for analyzing the source file’s content into. - **parent** (ModelEntity | None) - Optional - The parent model entity of this entity. ### Returns None ``` -------------------------------- ### RangedGenerateChoice VHDL Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of a range-based choice in a case-generate statement. ```VHDL when 0 to 3 => -- ^^^^^^ <- Range ``` -------------------------------- ### Install Documentation Requirements Source: https://vhdl.github.io/pyVHDLModel/_sources/Dependency.rst.txt Use this command to install all necessary packages for documentation generation using the provided requirements file. ```shell pip3 install -U -r doc/requirements.txt ``` -------------------------------- ### VHDL ElseGenerateBranch Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of an else-generate branch structure in VHDL. ```VHDL gen: if condition generate -- ... elsif condition generate -- ... else generate -- concurrent declarations begin -- concurrent statements end generate; ``` -------------------------------- ### VHDL ElsifGenerateBranch Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of an elsif-generate branch structure in VHDL. ```VHDL gen: if condition generate -- ... elsif condition generate -- concurrent declarations begin -- concurrent statements else generate -- ... end generate; ``` -------------------------------- ### Build and install GHDL from source on Windows Source: https://vhdl.github.io/pyVHDLModel/GettingStarted.html Clones the GHDL repository, configures it with a prefix of /c/Tools/GHDL/3.0.0-dev, builds, runs the testsuite, and installs the binaries. The resulting directory structure places the installation under Tools/GHDL/3.0.0-dev with bin, include, lib/ghdl, and sources subdirectories. ```bash # Clone GHDL repository mkdir -p /c/Tools/GHDL cd /c/Tools/GHDL git clone https://github.com/ghdl/ghdl.git sources # Create build directory and configure GHDL mkdir -p sources/build cd sources/build ../configure --prefix=/c/Tools/GHDL/3.0.0-dev # Build GHDL, run testsuite and install to ``prefix`` make make install ``` -------------------------------- ### VHDL IfGenerateBranch Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of an if-generate branch structure in VHDL. ```VHDL gen: if condition generate -- concurrent declarations begin -- concurrent statements elsif condition generate -- ... else generate -- ... end generate; ``` -------------------------------- ### VHDL example: for U1 : comp use configuration work.cfg; Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Shows a VHDL configuration specification, with a comment indicating the name part. ```VHDL for U1 : comp use configuration work.cfg; -- ^^^^^^^^ <- Name ``` -------------------------------- ### Local wheel packaging and installation (Linux/macOS) Source: https://vhdl.github.io/pyVHDLModel/Installation.html Creates a local wheel, uninstalls the old package, and installs the wheel on Linux/macOS. ```bash cd # Package the code in a wheel (*.whl) python -m build --wheel # Uninstall the old package python -m pip uninstall -y pyVHDLModel # Install from wheel python -m pip install ./dist/pyVHDLModel-0.31.0-py3-none-any.whl ``` -------------------------------- ### Install GHDL and pyGHDL on Windows MSYS2 Source: https://vhdl.github.io/pyVHDLModel/GettingStarted.html Install GHDL and pyGHDL on Windows MSYS2 (UCRT64). The first block updates MSYS2, searches for GHDL packages, and installs the UCRT64 LLVM backend. The second block installs pyGHDL via PIP using the current GHDL version hash. ```bash # Update MSYS2 to latest package releases pacman -Suyy # If the core system was updated, a second run might be required. pacman -Suyy # Search for available GHDL packages pacman -Ss ghdl # mingw32/mingw-w64-i686-ghdl-mcode 2.0.0.r870.g1cc85c578-1 (mingw-w64-i686-eda) [Installiert] # GHDL: the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL (mcode backend) (mingw-w64) # mingw64/mingw-w64-x86_64-ghdl-llvm 2.0.0.r870.g1cc85c578-1 (mingw-w64-x86_64-eda) [Installiert] # GHDL: the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL (LLVM backend) (mingw-w64) # ucrt64/mingw-w64-ucrt-x86_64-ghdl-llvm 2.0.0.r870.g1cc85c578-1 (mingw-w64-ucrt-x86_64-eda) [Installiert] # GHDL: the open-source analyzer, compiler, simulator and (experimental) synthesizer for VHDL (LLVM backend) (mingw-w64) # Note: The GHDL version is 870 commits after 2.0.0 release and has Git hash "1cc85c578" (without prefix 'g') # Install GHDL for UCRT64 pacman -S ucrt64/mingw-w64-ucrt-x86_64-ghdl-llvm ``` ```powershell # Install pyGHDL pip install git+https://github.com/ghdl/ghdl.git@$(ghdl version hash). ``` -------------------------------- ### VHDL component configuration example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Configuration.html Shows the VHDL syntax for a component configuration, with annotations identifying the instantiation list and the component name. ```VHDL for U1 : comp use entity work.sub(behav); -- ^^ ^^^^ -- | Component name -- Instantiation list ``` -------------------------------- ### Install Test Requirements via pip3 Source: https://vhdl.github.io/pyVHDLModel/_sources/Dependency.rst.txt Use the tests/requirements.txt file to install all necessary dependencies for testing, coverage, and type checking. This command recursively installs mandatory dependencies as well. ```shell pip3 install -U -r tests/requirements.txt ``` -------------------------------- ### ConfigurationInstantiation.__getstate__ Source: https://vhdl.github.io/pyVHDLModel/pyVHDLModel/pyVHDLModel.Concurrent.html Helper for pickle. ```APIDOC ## ConfigurationInstantiation.__getstate__ ### Description Helper for pickle. ### Method __getstate__() -> Dict[str, Any] ### Returns Dict[str, Any] ``` -------------------------------- ### Instantiation.__init__ Source: https://vhdl.github.io/pyVHDLModel/pyVHDLModel/pyVHDLModel.Concurrent.html Initializes an Instantiation instance with a label and optional generic and port association items. ```APIDOC ## Instantiation.__init__ ### Description Initializes an instantiation with a label and optional generic and port association items. ### Method Constructor ### Parameters - **label** (str) - Required - The label of a model entity. - **genericAssociationItems** (Iterable[GenericAssociationItem] | None) - Optional - List of all generic associations in the generic map aspect. - **portAssociationItems** (Iterable[PortAssociationItem] | None) - Optional - List of all port associations in the port map aspect. - **parent** (ModelEntity | None) - Optional - The parent model entity of this entity. ### Returns None ``` -------------------------------- ### RotateLeftExpression VHDL Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Expression.html Example usage of the left rotate (rol) expression. ```VHDL res := lhs rol rhs; -- ^^^^^^^^^^^ -- ^^^ -- ^^^ ``` -------------------------------- ### RotateRightExpression VHDL Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Expression.html Example usage of the right rotate (ror) expression. ```VHDL res := lhs ror rhs; -- ^^^^^^^^^^^ -- ^^^ -- ^^^ ``` -------------------------------- ### VHDL GenerateCase Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of a specific choice in a VHDL case-generate statement. ```VHDL when 8 => -- ^ <- Choices ``` -------------------------------- ### IndexedGenerateChoice VHDL Example Source: https://vhdl.github.io/pyVHDLModel/coverage/z_4d3173c4f8a9037b_Concurrent_py.html Example of a single value choice in a case-generate statement. ```VHDL when 8 => -- ^ <- Expression ``` -------------------------------- ### ConfigurationInstantiation.__init__ Source: https://vhdl.github.io/pyVHDLModel/pyVHDLModel/pyVHDLModel.Concurrent.html Initializes a configuration instantiation with a label, configuration symbol, and optional association items and parent. ```APIDOC ## ConfigurationInstantiation.__init__ ### Description Initializes a configuration instantiation. ### Method Constructor ### Signature __init__(label: str, configurationSymbol: ConfigurationInstantiationSymbol, genericAssociationItems: Iterable[AssociationItem] | None = None, portAssociationItems: Iterable[AssociationItem] | None = None, parent: ModelEntity | None = None) -> None ### Parameters - **label** (str) - Required - The label of a model entity. - **configurationSymbol** (ConfigurationInstantiationSymbol) - Required - Reference to the instantiated configuration. - **genericAssociationItems** (Iterable[AssociationItem] | None) - Optional - List of all generic associations in the generic map aspect. - **portAssociationItems** (Iterable[AssociationItem] | None) - Optional - List of all port associations in the port map aspect. - **parent** (ModelEntity | None) - Optional - The parent model entity of this entity. ### Returns None ``` -------------------------------- ### RecordElementSymbol Reference Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing a reference to a record element in VHDL. ```VHDL r := (a => '1', b => '0'); -- ^ <- Name ``` -------------------------------- ### Install Publishing Dependencies Source: https://vhdl.github.io/pyVHDLModel/_sources/Dependency.rst.txt Use pip3 to install all required publishing dependencies defined in the dist/requirements.txt file. ```shell pip3 install -U -r dist/requirements.txt ``` -------------------------------- ### EntitySymbol Architecture Example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Symbol.html Example showing an entity reference in an architecture declaration. ```VHDL architecture rtl of Counter is -- ^^^^^^^ begin end architecture; ``` -------------------------------- ### VHDL all instantiation list example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Configuration.html Shows the VHDL syntax for an all instantiation list, which names all instances of a component in a configuration. The caret annotation marks the instantiation list portion. ```VHDL for all : comp use entity work.sub(behav); -- ^^^ <- the instantiation list ``` -------------------------------- ### Install documentation dependencies with pip3 Source: https://vhdl.github.io/pyVHDLModel/Dependency.html Install all documentation generation dependencies for the pyVHDLModel project. Use this command when setting up a documentation build environment. The doc/requirements.txt file recursively installs mandatory dependencies. ```bash pip3 install -U -r doc/requirements.txt ``` -------------------------------- ### __init__(_identifier_, _documentation=None_, _parent=None_) Source: https://vhdl.github.io/pyVHDLModel/pyVHDLModel/pyVHDLModel.Type.html Initializes underlying BaseType. ```APIDOC ## __init__(_identifier_, _documentation=None_, _parent=None_) ### Description Initializes underlying BaseType. ### Parameters - **identifier** (str) - Required - Name of the type. - **documentation** (str | None) - Optional - The documentation comment associated with this declaration. - **parent** (ModelEntity | None) - Optional - Reference to the logical parent in the model hierarchy. ### Returns - **None** ``` -------------------------------- ### VHDL entity instantiation example Source: https://vhdl.github.io/pyVHDLModel/_modules/pyVHDLModel/Concurrent.html Shows the syntax of a direct entity instantiation in VHDL, with comments indicating the label, entity, and optional architecture parts. ```VHDL inst : entity work.Counter(rtl); --^^^^ <- Label -- ^^^^^^^^^^^^ <- Entity -- ^^^ <- optional Architecture ```