@@ -426,6 +426,7 @@ class Package(PrimaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarationRegi
426426 end package;
427427 """
428428
429+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
429430 _packageBody : Nullable ["PackageBody" ]
430431
431432 _genericItems : List [GenericInterfaceItemMixin ]
@@ -440,12 +441,25 @@ def __init__(
440441 genericItems : Nullable [Iterable [GenericInterfaceItemMixin ]] = None ,
441442 declaredItems : Nullable [Iterable ] = None ,
442443 documentation : Nullable [str ] = None ,
444+ allowBlackbox : Nullable [bool ] = None ,
443445 parent : ModelEntity = None
444446 ) -> None :
447+ """
448+ Initialize a package.
449+
450+ :param identifier: Name of the VHDL package.
451+ :param contextItems:
452+ :param genericItems:
453+ :param declaredItems:
454+ :param documentation:
455+ :param allowBlackbox: Specify if blackboxes are allowed in this design.
456+ :param parent: The parent model entity (library) of this VHDL package.
457+ """
445458 super ().__init__ (identifier , contextItems , documentation , parent )
446459 DesignUnitWithContextMixin .__init__ (self )
447460 ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
448461
462+ self ._allowBlackbox = allowBlackbox
449463 self ._packageBody = None
450464
451465 # TODO: extract to mixin
@@ -458,6 +472,22 @@ def __init__(
458472 self ._deferredConstants = {}
459473 self ._components = {}
460474
475+ @property
476+ def AllowBlackbox (self ) -> bool :
477+ """
478+ Read-only property to check if a design supports blackboxes (:attr:`_allowBlackbox`).
479+
480+ :returns: If blackboxes are allowed.
481+ """
482+ if self ._allowBlackbox is None :
483+ return self ._parent .AllowBlackbox
484+ else :
485+ return self ._allowBlackbox
486+
487+ @AllowBlackbox .setter
488+ def AllowBlackbox (self , value : Nullable [bool ]) -> None :
489+ self ._allowBlackbox = value
490+
461491 @property
462492 def PackageBody (self ) -> Nullable ["PackageBody" ]:
463493 return self ._packageBody
@@ -565,6 +595,8 @@ class Entity(PrimaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarationRegio
565595 end entity;
566596 """
567597
598+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
599+
568600 _genericItems : List [GenericInterfaceItemMixin ]
569601 _portItems : List [PortInterfaceItemMixin ]
570602
@@ -579,13 +611,16 @@ def __init__(
579611 declaredItems : Nullable [Iterable ] = None ,
580612 statements : Nullable [Iterable [ConcurrentStatement ]] = None ,
581613 documentation : Nullable [str ] = None ,
614+ allowBlackbox : Nullable [bool ] = None ,
582615 parent : ModelEntity = None
583616 ) -> None :
584617 super ().__init__ (identifier , contextItems , documentation , parent )
585618 DesignUnitWithContextMixin .__init__ (self )
586619 ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
587620 ConcurrentStatementsMixin .__init__ (self , statements )
588621
622+ self ._allowBlackbox = allowBlackbox
623+
589624 # TODO: extract to mixin
590625 self ._genericItems = []
591626 if genericItems is not None :
@@ -602,6 +637,22 @@ def __init__(
602637
603638 self ._architectures = {}
604639
640+ @property
641+ def AllowBlackbox (self ) -> bool :
642+ """
643+ Read-only property to check if a design supports blackboxes (:attr:`_allowBlackbox`).
644+
645+ :returns: If blackboxes are allowed.
646+ """
647+ if self ._allowBlackbox is None :
648+ return self ._parent .AllowBlackbox
649+ else :
650+ return self ._allowBlackbox
651+
652+ @AllowBlackbox .setter
653+ def AllowBlackbox (self , value : Nullable [bool ]) -> None :
654+ self ._allowBlackbox = value
655+
605656 # TODO: extract to mixin for generics
606657 @property
607658 def GenericItems (self ) -> List [GenericInterfaceItemMixin ]:
@@ -645,7 +696,8 @@ class Architecture(SecondaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarat
645696 end architecture;
646697 """
647698
648- _entity : EntitySymbol
699+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
700+ _entity : EntitySymbol
649701
650702 def __init__ (
651703 self ,
@@ -655,20 +707,39 @@ def __init__(
655707 declaredItems : Nullable [Iterable ] = None ,
656708 statements : Iterable ['ConcurrentStatement' ] = None ,
657709 documentation : Nullable [str ] = None ,
710+ allowBlackbox : Nullable [bool ] = None ,
658711 parent : ModelEntity = None
659712 ) -> None :
660713 super ().__init__ (identifier , contextItems , documentation , parent )
661714 DesignUnitWithContextMixin .__init__ (self )
662715 ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
663716 ConcurrentStatementsMixin .__init__ (self , statements )
664717
718+ self ._allowBlackbox = allowBlackbox
719+
665720 self ._entity = entity
666721 entity ._parent = self
667722
668723 @property
669724 def Entity (self ) -> EntitySymbol :
670725 return self ._entity
671726
727+ @property
728+ def AllowBlackbox (self ) -> bool :
729+ """
730+ Read-only property to check if a design supports blackboxes (:attr:`_allowBlackbox`).
731+
732+ :returns: If blackboxes are allowed.
733+ """
734+ if self ._allowBlackbox is None :
735+ return self ._parent .AllowBlackbox
736+ else :
737+ return self ._allowBlackbox
738+
739+ @AllowBlackbox .setter
740+ def AllowBlackbox (self , value : Nullable [bool ]) -> None :
741+ self ._allowBlackbox = value
742+
672743 def __str__ (self ) -> str :
673744 lib = self ._parent ._identifier if self ._parent is not None else "%"
674745 ent = self ._entity ._name ._identifier if self ._entity is not None else "%"
@@ -696,6 +767,9 @@ class Component(ModelEntity, NamedEntityMixin, DocumentedEntityMixin):
696767 end component;
697768 """
698769
770+ _allowBlackbox : Nullable [bool ] #: Allow component to be a blackbox.
771+ _isBlackBox : Nullable [bool ] #: Component is a blackbox.
772+
699773 _genericItems : List [GenericInterfaceItemMixin ]
700774 _portItems : List [PortInterfaceItemMixin ]
701775
@@ -707,12 +781,17 @@ def __init__(
707781 genericItems : Nullable [Iterable [GenericInterfaceItemMixin ]] = None ,
708782 portItems : Nullable [Iterable [PortInterfaceItemMixin ]] = None ,
709783 documentation : Nullable [str ] = None ,
784+ allowBlackbox : Nullable [bool ] = None ,
710785 parent : ModelEntity = None
711786 ) -> None :
712787 super ().__init__ (parent )
713788 NamedEntityMixin .__init__ (self , identifier )
714789 DocumentedEntityMixin .__init__ (self , documentation )
715790
791+ self ._allowBlackbox = allowBlackbox
792+ self ._isBlackBox = None
793+ self ._entity = None
794+
716795 # TODO: extract to mixin
717796 self ._genericItems = []
718797 if genericItems is not None :
@@ -727,6 +806,31 @@ def __init__(
727806 self ._portItems .append (item )
728807 item ._parent = self
729808
809+ @property
810+ def AllowBlackbox (self ) -> bool :
811+ """
812+ Read-only property to check if a design supports blackboxes (:attr:`_allowBlackbox`).
813+
814+ :returns: If blackboxes are allowed.
815+ """
816+ if self ._allowBlackbox is None :
817+ return self ._parent .AllowBlackbox
818+ else :
819+ return self ._allowBlackbox
820+
821+ @AllowBlackbox .setter
822+ def AllowBlackbox (self , value : Nullable [bool ]) -> None :
823+ self ._allowBlackbox = value
824+
825+ @property
826+ def IsBlackbox (self ) -> bool :
827+ """
828+ Read-only property returning true, if this component is a blackbox (:attr:`_isBlackbox`).
829+
830+ :returns: If this component is a blackbox.
831+ """
832+ return self ._isBlackBox
833+
730834 @property
731835 def GenericItems (self ) -> List [GenericInterfaceItemMixin ]:
732836 return self ._genericItems
@@ -742,6 +846,7 @@ def Entity(self) -> Nullable[Entity]:
742846 @Entity .setter
743847 def Entity (self , value : Entity ) -> None :
744848 self ._entity = value
849+ self ._isBlackBox = False
745850
746851
747852@export
0 commit comments