vhdl / pyvhdlmodel Goto Github PK
View Code? Open in Web Editor NEWAn abstract language model of VHDL written in Python.
Home Page: https://vhdl.github.io/pyVHDLModel/
License: Other
An abstract language model of VHDL written in Python.
Home Page: https://vhdl.github.io/pyVHDLModel/
License: Other
Even though instantiation objects contain port/generic associations information, it's not accessible via public members, only via private.
For me it seem that it's reasonable to have public access to this members. Is it planned to be supported or am I missing something?
pyVHDLModel 0.12.0, installed as dependency for pyGHDL 2.0.0.dev0 (version hash 15b84d1fbcfb26b2fb4a4467727eec691c5b73a4)
Descending Range should be 'downto' and not 'to'
pyVHDLModel/pyVHDLModel/VHDLModel.py
Line 1315 in 24d7919
/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).
As done in pySVModel: edaa-org/pySVModel@a647a8a.
In a direct entity instantiation, you can also use a simple name as entity_name, without the library prefix (seledted_name). However, EntityInstantiationSymbol
uses a SelectedName
in its constructor.
pyVHDLModel/pyVHDLModel/Symbol.py
Line 276 in 7590a6c
What's the best way to fix this? Simply set the prefix to work
in the simple name case?
/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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.