@@ -426,6 +426,7 @@ class Package(PrimaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarationRegi
426
426
end package;
427
427
"""
428
428
429
+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
429
430
_packageBody : Nullable ["PackageBody" ]
430
431
431
432
_genericItems : List [GenericInterfaceItemMixin ]
@@ -440,12 +441,25 @@ def __init__(
440
441
genericItems : Nullable [Iterable [GenericInterfaceItemMixin ]] = None ,
441
442
declaredItems : Nullable [Iterable ] = None ,
442
443
documentation : Nullable [str ] = None ,
444
+ allowBlackbox : Nullable [bool ] = None ,
443
445
parent : ModelEntity = None
444
446
) -> 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
+ """
445
458
super ().__init__ (identifier , contextItems , documentation , parent )
446
459
DesignUnitWithContextMixin .__init__ (self )
447
460
ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
448
461
462
+ self ._allowBlackbox = allowBlackbox
449
463
self ._packageBody = None
450
464
451
465
# TODO: extract to mixin
@@ -458,6 +472,22 @@ def __init__(
458
472
self ._deferredConstants = {}
459
473
self ._components = {}
460
474
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
+
461
491
@property
462
492
def PackageBody (self ) -> Nullable ["PackageBody" ]:
463
493
return self ._packageBody
@@ -565,6 +595,8 @@ class Entity(PrimaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarationRegio
565
595
end entity;
566
596
"""
567
597
598
+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
599
+
568
600
_genericItems : List [GenericInterfaceItemMixin ]
569
601
_portItems : List [PortInterfaceItemMixin ]
570
602
@@ -579,13 +611,16 @@ def __init__(
579
611
declaredItems : Nullable [Iterable ] = None ,
580
612
statements : Nullable [Iterable [ConcurrentStatement ]] = None ,
581
613
documentation : Nullable [str ] = None ,
614
+ allowBlackbox : Nullable [bool ] = None ,
582
615
parent : ModelEntity = None
583
616
) -> None :
584
617
super ().__init__ (identifier , contextItems , documentation , parent )
585
618
DesignUnitWithContextMixin .__init__ (self )
586
619
ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
587
620
ConcurrentStatementsMixin .__init__ (self , statements )
588
621
622
+ self ._allowBlackbox = allowBlackbox
623
+
589
624
# TODO: extract to mixin
590
625
self ._genericItems = []
591
626
if genericItems is not None :
@@ -602,6 +637,22 @@ def __init__(
602
637
603
638
self ._architectures = {}
604
639
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
+
605
656
# TODO: extract to mixin for generics
606
657
@property
607
658
def GenericItems (self ) -> List [GenericInterfaceItemMixin ]:
@@ -645,7 +696,8 @@ class Architecture(SecondaryUnit, DesignUnitWithContextMixin, ConcurrentDeclarat
645
696
end architecture;
646
697
"""
647
698
648
- _entity : EntitySymbol
699
+ _allowBlackbox : Nullable [bool ] #: Allow blackboxes for components in this package.
700
+ _entity : EntitySymbol
649
701
650
702
def __init__ (
651
703
self ,
@@ -655,20 +707,39 @@ def __init__(
655
707
declaredItems : Nullable [Iterable ] = None ,
656
708
statements : Iterable ['ConcurrentStatement' ] = None ,
657
709
documentation : Nullable [str ] = None ,
710
+ allowBlackbox : Nullable [bool ] = None ,
658
711
parent : ModelEntity = None
659
712
) -> None :
660
713
super ().__init__ (identifier , contextItems , documentation , parent )
661
714
DesignUnitWithContextMixin .__init__ (self )
662
715
ConcurrentDeclarationRegionMixin .__init__ (self , declaredItems )
663
716
ConcurrentStatementsMixin .__init__ (self , statements )
664
717
718
+ self ._allowBlackbox = allowBlackbox
719
+
665
720
self ._entity = entity
666
721
entity ._parent = self
667
722
668
723
@property
669
724
def Entity (self ) -> EntitySymbol :
670
725
return self ._entity
671
726
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
+
672
743
def __str__ (self ) -> str :
673
744
lib = self ._parent ._identifier if self ._parent is not None else "%"
674
745
ent = self ._entity ._name ._identifier if self ._entity is not None else "%"
@@ -696,6 +767,9 @@ class Component(ModelEntity, NamedEntityMixin, DocumentedEntityMixin):
696
767
end component;
697
768
"""
698
769
770
+ _allowBlackbox : Nullable [bool ] #: Allow component to be a blackbox.
771
+ _isBlackBox : Nullable [bool ] #: Component is a blackbox.
772
+
699
773
_genericItems : List [GenericInterfaceItemMixin ]
700
774
_portItems : List [PortInterfaceItemMixin ]
701
775
@@ -707,12 +781,17 @@ def __init__(
707
781
genericItems : Nullable [Iterable [GenericInterfaceItemMixin ]] = None ,
708
782
portItems : Nullable [Iterable [PortInterfaceItemMixin ]] = None ,
709
783
documentation : Nullable [str ] = None ,
784
+ allowBlackbox : Nullable [bool ] = None ,
710
785
parent : ModelEntity = None
711
786
) -> None :
712
787
super ().__init__ (parent )
713
788
NamedEntityMixin .__init__ (self , identifier )
714
789
DocumentedEntityMixin .__init__ (self , documentation )
715
790
791
+ self ._allowBlackbox = allowBlackbox
792
+ self ._isBlackBox = None
793
+ self ._entity = None
794
+
716
795
# TODO: extract to mixin
717
796
self ._genericItems = []
718
797
if genericItems is not None :
@@ -727,6 +806,31 @@ def __init__(
727
806
self ._portItems .append (item )
728
807
item ._parent = self
729
808
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
+
730
834
@property
731
835
def GenericItems (self ) -> List [GenericInterfaceItemMixin ]:
732
836
return self ._genericItems
@@ -742,6 +846,7 @@ def Entity(self) -> Nullable[Entity]:
742
846
@Entity .setter
743
847
def Entity (self , value : Entity ) -> None :
744
848
self ._entity = value
849
+ self ._isBlackBox = False
745
850
746
851
747
852
@export
0 commit comments