Skip to content

Commit

Permalink
Refined attribute specification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jun 30, 2021
1 parent b1159dc commit eaf1979
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
10 changes: 9 additions & 1 deletion pyVHDLModel/PSLModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 20 additions & 2 deletions pyVHDLModel/VHDLModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eaf1979

Please sign in to comment.