diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2023-04-13 23:44:29 +0200 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2023-04-13 23:44:29 +0200 |
commit | e95d45e41d32c0d73179cea22c8b3ea812eafb41 (patch) | |
tree | 3eb2158353af41195a8a614bea84207e21b922f1 /pyGHDL/dom/Concurrent.py | |
parent | f11446e1cfaf0ed4db2d43ec3b9b421de313b6ae (diff) | |
download | ghdl-e95d45e41d32c0d73179cea22c8b3ea812eafb41.tar.gz ghdl-e95d45e41d32c0d73179cea22c8b3ea812eafb41.tar.bz2 ghdl-e95d45e41d32c0d73179cea22c8b3ea812eafb41.zip |
Reworking symbols.
Diffstat (limited to 'pyGHDL/dom/Concurrent.py')
-rw-r--r-- | pyGHDL/dom/Concurrent.py | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/pyGHDL/dom/Concurrent.py b/pyGHDL/dom/Concurrent.py index 3b3c06f2e..71ee634cc 100644 --- a/pyGHDL/dom/Concurrent.py +++ b/pyGHDL/dom/Concurrent.py @@ -70,12 +70,6 @@ from pyVHDLModel.Concurrent import ( from pyGHDL.libghdl import Iir, utils from pyGHDL.libghdl.vhdl import nodes from pyGHDL.dom import DOMMixin, DOMException, Position -from pyGHDL.dom._Utils import ( - GetNameOfNode, - GetEntityInstantiationSymbol, - GetComponentInstantiationSymbol, - GetConfigurationInstantiationSymbol, -) from pyGHDL.dom.Range import Range from pyGHDL.dom.Symbol import ( ArchitectureSymbol, @@ -146,7 +140,7 @@ class EntityInstantiation(VHDLModel_EntityInstantiation, DOMMixin): @classmethod def parse(cls, instantiationNode: Iir, instantiatedUnit: Iir, label: str) -> "EntityInstantiation": - from pyGHDL.dom._Translate import GetGenericMapAspect, GetPortMapAspect + from pyGHDL.dom._Translate import GetName, GetGenericMapAspect, GetPortMapAspect entityId = nodes.Get_Entity_Name(instantiatedUnit) entitySymbol = GetEntityInstantiationSymbol(entityId) @@ -154,7 +148,7 @@ class EntityInstantiation(VHDLModel_EntityInstantiation, DOMMixin): architectureSymbol = None architectureId = nodes.Get_Architecture(instantiatedUnit) if architectureId != nodes.Null_Iir: - architectureSymbol = ArchitectureSymbol(GetNameOfNode(architectureId), entitySymbol) + architectureSymbol = ArchitectureSymbol(GetName(architectureId), entitySymbol) genericAssociations = GetGenericMapAspect(nodes.Get_Generic_Map_Aspect_Chain(instantiationNode)) portAssociations = GetPortMapAspect(nodes.Get_Port_Map_Aspect_Chain(instantiationNode)) @@ -230,13 +224,13 @@ class ProcessStatement(VHDLModel_ProcessStatement, DOMMixin): @classmethod def parse(cls, processNode: Iir, label: str, hasSensitivityList: bool) -> "ProcessStatement": - from pyGHDL.dom._Translate import GetDeclaredItemsFromChainedNodes, GetSequentialStatementsFromChainedNodes + from pyGHDL.dom._Translate import GetName, GetDeclaredItemsFromChainedNodes, GetSequentialStatementsFromChainedNodes sensitivityList = None if hasSensitivityList: sensitivityList = [] for item in utils.list_iter(nodes.Get_Sensitivity_List(processNode)): - sensitivityList.append(GetNameOfNode(item)) + sensitivityList.append(GetName(item)) declaredItems = GetDeclaredItemsFromChainedNodes(nodes.Get_Declaration_Chain(processNode), "process", label) statements = GetSequentialStatementsFromChainedNodes( @@ -490,7 +484,7 @@ class CaseGenerateStatement(VHDLModel_CaseGenerateStatement, DOMMixin): from pyGHDL.dom._Translate import ( GetExpressionFromNode, GetRangeFromNode, - GetNameFromNode, + GetName, ) expression = GetExpressionFromNode(nodes.Get_Expression(generateNode)) @@ -524,7 +518,7 @@ class CaseGenerateStatement(VHDLModel_CaseGenerateStatement, DOMMixin): nodes.Iir_Kind.Attribute_Name, nodes.Iir_Kind.Parenthesis_Name, ): - rng = GetNameFromNode(choiceRange) + rng = GetName(choiceRange) else: pos = Position.parse(alternative) raise DOMException( @@ -585,11 +579,11 @@ class ForGenerateStatement(VHDLModel_ForGenerateStatement, DOMMixin): GetDeclaredItemsFromChainedNodes, GetConcurrentStatementsFromChainedNodes, GetRangeFromNode, - GetNameFromNode, + GetName, ) spec = nodes.Get_Parameter_Specification(generateNode) - loopIndex = GetNameOfNode(spec) + loopIndex = GetName(spec) discreteRange = nodes.Get_Discrete_Range(spec) rangeKind = GetIirKindOfNode(discreteRange) @@ -599,7 +593,7 @@ class ForGenerateStatement(VHDLModel_ForGenerateStatement, DOMMixin): nodes.Iir_Kind.Attribute_Name, nodes.Iir_Kind.Parenthesis_Name, ): - rng = GetNameFromNode(discreteRange) + rng = GetName(discreteRange) else: pos = Position.parse(generateNode) raise DOMException( @@ -651,10 +645,10 @@ class ConcurrentSimpleSignalAssignment(VHDLModel_ConcurrentSimpleSignalAssignmen @classmethod def parse(cls, assignmentNode: Iir, label: str) -> "ConcurrentSimpleSignalAssignment": - from pyGHDL.dom._Translate import GetNameFromNode + from pyGHDL.dom._Translate import GetName target = nodes.Get_Target(assignmentNode) - targetName = GetNameFromNode(target) + targetName = GetName(target) waveform = [] for wave in utils.chain_iter(nodes.Get_Waveform_Chain(assignmentNode)): @@ -677,12 +671,12 @@ class ConcurrentProcedureCall(VHDLModel_ConcurrentProcedureCall, DOMMixin): @classmethod def parse(cls, concurrentCallNode: Iir, label: str) -> "ConcurrentProcedureCall": - from pyGHDL.dom._Translate import GetNameFromNode, GetParameterMapAspect + from pyGHDL.dom._Translate import GetName, GetParameterMapAspect callNode = nodes.Get_Procedure_Call(concurrentCallNode) prefix = nodes.Get_Prefix(callNode) - procedureName = GetNameFromNode(prefix) + procedureName = GetName(prefix) parameterAssociations = GetParameterMapAspect(nodes.Get_Parameter_Association_Chain(callNode)) return cls(concurrentCallNode, label, procedureName, parameterAssociations) |