From eaf1979f8e4093d0934b386c4d16a9712edac51c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 30 Jun 2021 13:48:42 +0200 Subject: [PATCH] Refined attribute specification. --- pyVHDLModel/PSLModel.py | 10 +++++++++- pyVHDLModel/VHDLModel.py | 22 ++++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/pyVHDLModel/PSLModel.py b/pyVHDLModel/PSLModel.py index 14cef8037..0412384ba 100644 --- a/pyVHDLModel/PSLModel.py +++ b/pyVHDLModel/PSLModel.py @@ -78,4 +78,12 @@ def __init__(self, identifier: str): @export class DefaultClock(PSLEntity): - pass + _identifier: str + + def __init__(self, identifier: str): + super().__init__() + self._identifier = identifier + + @property + def Identifier(self) -> str: + return self._identifier diff --git a/pyVHDLModel/VHDLModel.py b/pyVHDLModel/VHDLModel.py index 13692d71a..19cacf1c5 100644 --- a/pyVHDLModel/VHDLModel.py +++ b/pyVHDLModel/VHDLModel.py @@ -1982,17 +1982,35 @@ def Subtype(self): @export class AttributeSpecification(ModelEntity): + _identifiers: List[Name] _attribute: Name + _entityClass: EntityClass + _expression: Expression - def __init__(self, attribute: Name): + def __init__(self, identifiers: List[Name], attribute: Name, entityClass: EntityClass, expression: Expression): super().__init__() + self._identifiers = identifiers self._attribute = attribute + self._entityClass = entityClass + self._expression = expression @property - def Attribute(self) -> Attribute: + def Identifiers(self) -> List[Name]: + return self._identifiers + + @property + def Attribute(self) -> Name: return self._attribute + @property + def EntityClass(self) -> EntityClass: + return self._entityClass + + @property + def Expression(self) -> Expression: + return self._expression + @export class InterfaceItem: