|
47 | 47 | from pyVHDLModel import ModelEntity, NamedEntityMixin, MultipleNamedEntityMixin, LabeledEntityMixin, DocumentedEntityMixin, PossibleReference |
48 | 48 | from pyVHDLModel import Name, Symbol, NewSymbol, LibraryClause, UseClause, ContextReference, DesignUnit |
49 | 49 | from pyVHDLModel import PrimaryUnit, SecondaryUnit |
50 | | -from pyVHDLModel import ExpressionUnion, ConstraintUnion, ContextUnion, SubtypeOrSymbol, DesignUnitWithContextMixin, PackageOrSymbol |
| 50 | +from pyVHDLModel import ExpressionUnion, ConstraintUnion, ContextUnion, SubtypeOrSymbol, DesignUnitWithContextMixin |
51 | 51 | from pyVHDLModel.PSLModel import VerificationUnit, VerificationProperty, VerificationMode |
52 | 52 |
|
53 | 53 | try: |
@@ -290,44 +290,57 @@ def Package(self, value: 'Package') -> None: |
290 | 290 |
|
291 | 291 |
|
292 | 292 | @export |
293 | | -class ComponentSymbol(Symbol): |
294 | | - def __init__(self, symbolName: Name): |
295 | | - super().__init__(symbolName, PossibleReference.Component) |
| 293 | +class EntityInstantiationSymbol(SelectedName, NewSymbol): |
| 294 | + """An entity reference in a direct entity instantiation.""" |
| 295 | + |
| 296 | + def __init__(self, identifier: str, prefix: LibraryReferenceSymbol): |
| 297 | + super().__init__(identifier, prefix) |
| 298 | + NewSymbol.__init__(self, PossibleReference.Entity) |
296 | 299 |
|
297 | 300 | @property |
298 | | - def Component(self) -> 'Component': |
| 301 | + def Prefix(self) -> LibraryReferenceSymbol: |
| 302 | + return cast(LibraryReferenceSymbol, self._prefix) |
| 303 | + |
| 304 | + @property |
| 305 | + def Entity(self) -> 'Entity': |
299 | 306 | return self._reference |
300 | 307 |
|
301 | | - @Component.setter |
302 | | - def Component(self, value: 'Component') -> None: |
| 308 | + @Entity.setter |
| 309 | + def Entity(self, value: 'Entity') -> None: |
303 | 310 | self._reference = value |
304 | 311 |
|
305 | 312 |
|
306 | 313 | @export |
307 | | -class ConfigurationSymbol(Symbol): |
308 | | - def __init__(self, symbolName: Name): |
309 | | - super().__init__(symbolName, PossibleReference.Configuration) |
| 314 | +class ComponentInstantiationSymbol(SimpleName, NewSymbol): |
| 315 | + """A component reference in a component instantiation.""" |
| 316 | + |
| 317 | + def __init__(self, identifier: str): |
| 318 | + super().__init__(identifier) |
| 319 | + NewSymbol.__init__(self, PossibleReference.Component) |
310 | 320 |
|
311 | 321 | @property |
312 | | - def Configuration(self) -> 'Configuration': |
| 322 | + def Component(self) -> 'Component': |
313 | 323 | return self._reference |
314 | 324 |
|
315 | | - @Configuration.setter |
316 | | - def Configuration(self, value: 'Configuration') -> None: |
| 325 | + @Component.setter |
| 326 | + def Component(self, value: 'Component') -> None: |
317 | 327 | self._reference = value |
318 | 328 |
|
319 | 329 |
|
320 | 330 | @export |
321 | | -class ContextSymbol(Symbol): |
322 | | - def __init__(self, symbolName: Name): |
323 | | - super().__init__(symbolName, PossibleReference.Context) |
| 331 | +class ConfigurationInstantiationSymbol(SimpleName, NewSymbol): |
| 332 | + """A configuration reference in a configuration instantiation.""" |
| 333 | + |
| 334 | + def __init__(self, identifier: str): |
| 335 | + super().__init__(identifier) |
| 336 | + NewSymbol.__init__(self, PossibleReference.Configuration) |
324 | 337 |
|
325 | 338 | @property |
326 | | - def Context(self) -> 'Context': |
| 339 | + def Configuration(self) -> 'Configuration': |
327 | 340 | return self._reference |
328 | 341 |
|
329 | | - @Context.setter |
330 | | - def Context(self, value: 'Context') -> None: |
| 342 | + @Configuration.setter |
| 343 | + def Configuration(self, value: 'Configuration') -> None: |
331 | 344 | self._reference = value |
332 | 345 |
|
333 | 346 |
|
|
0 commit comments