Giter Site home page Giter Site logo

vhdl / pyvhdlmodel Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 9.0 4.34 MB

An abstract language model of VHDL written in Python.

Home Page: https://vhdl.github.io/pyVHDLModel/

License: Other

Python 99.78% VHDL 0.22%
abstract dom language-model python vhdl

pyvhdlmodel's People

Contributors

c-thaler avatar dependabot[bot] avatar paebbels avatar umarcor avatar xiretza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyvhdlmodel's Issues

Constant in pkg files cause issues in AnalyzeObjects due to _identifiers vs _identifier

/python3.11/site-packages/pyVHDLModel/init.py", line 705, in _ImportObjects
package._namespace._elements[declaredItem._identifier] = declaredItem
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Constant' object has no attribute '_identifier'. Did you mean: '_identifiers'?

I assume this may also cause issues with other elements which use _identifiers. I am not sure how to solve this correctly. I have a local workaround to access the zeroth element of _identifiers for now (when declaredItem has the attr _identifiers).

Subtype resolution is not finding subtype when defined in another pkg file in another library

/python3.11/site-packages/pyVHDLModel/init.py", line 845, in _LinkItems
subtype = package._namespace.FindSubtype(element._subtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.11/site-packages/pyVHDLModel/Namespace.py", line 116, in FindSubtype
raise KeyError(f"Subtype '{subtypeSymbol._name._identifier}' not found in '{self._name}'.")
KeyError: "Subtype 'Subtype_Name' not found in 'pkg_file1'."

Subtype_Name is used in pkg_file1 but is defined in pkg_file2. I am still working through on how it searches for the subtype and why _parentNamespace might be None. Any suggestions on if this is expected to work? Or if not any thoughts on how it could work/be implemented?

[Bug] Error when importing `pyGHDL` packages

I tried to run this code:

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

but the second import crashes:

(common) C:\Work\Scripts\Python\PyGHDL>python test.py        
Traceback (most recent call last):
  File "C:\Work\MEGA\Scripts\Python\PyGHDL\test.py", line 2, in <module>
    from pyGHDL.dom.NonStandard import Design, Document
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyGHDL\dom\NonStandard.py", line 43, in <module>
    from pyGHDL.dom.Names import SimpleName
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyGHDL\dom\Names.py", line 37, in <module>
    from pyVHDLModel.Name import Name
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyVHDLModel\__init__.py", line 60, in <module>
    from pyTooling.Graph           import Graph, Vertex, Edge
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyTooling\Graph\__init__.py", line 63, in <module>
    from pyTooling.Tree        import Node
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyTooling\Tree\__init__.py", line 100, in <module>
    class Node(Generic[IDType, ValueType, DictKeyType, DictValueType], metaclass=ExtendedType, useSlots=True):
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyTooling\MetaClasses\__init__.py", line 250, in __new__
    members['__slots__'] = self.__getSlots(baseClasses, members)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<USERNAME>\scoop\apps\miniconda3\current\envs\common\Lib\site-packages\pyTooling\MetaClasses\__init__.py", line 431, in __getSlots
    raise AttributeError(f"Base-class '{base.__name__}' has no '__slots__'.")
AttributeError: Base-class 'Generic' has no '__slots__'.

I will provide any additional information if needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.