Skip to content

Commit eaf1979

Browse files
committed
Refined attribute specification.
1 parent b1159dc commit eaf1979

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

pyVHDLModel/PSLModel.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,12 @@ def __init__(self, identifier: str):
7878

7979
@export
8080
class DefaultClock(PSLEntity):
81-
pass
81+
_identifier: str
82+
83+
def __init__(self, identifier: str):
84+
super().__init__()
85+
self._identifier = identifier
86+
87+
@property
88+
def Identifier(self) -> str:
89+
return self._identifier

pyVHDLModel/VHDLModel.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,17 +1982,35 @@ def Subtype(self):
19821982

19831983
@export
19841984
class AttributeSpecification(ModelEntity):
1985+
_identifiers: List[Name]
19851986
_attribute: Name
1987+
_entityClass: EntityClass
1988+
_expression: Expression
19861989

1987-
def __init__(self, attribute: Name):
1990+
def __init__(self, identifiers: List[Name], attribute: Name, entityClass: EntityClass, expression: Expression):
19881991
super().__init__()
19891992

1993+
self._identifiers = identifiers
19901994
self._attribute = attribute
1995+
self._entityClass = entityClass
1996+
self._expression = expression
19911997

19921998
@property
1993-
def Attribute(self) -> Attribute:
1999+
def Identifiers(self) -> List[Name]:
2000+
return self._identifiers
2001+
2002+
@property
2003+
def Attribute(self) -> Name:
19942004
return self._attribute
19952005

2006+
@property
2007+
def EntityClass(self) -> EntityClass:
2008+
return self._entityClass
2009+
2010+
@property
2011+
def Expression(self) -> Expression:
2012+
return self._expression
2013+
19962014

19972015
@export
19982016
class InterfaceItem:

0 commit comments

Comments
 (0)