Is the type of protected type VHDL-2008?

I need a generic variable like "boolean" in VHDL-2008.

I cannot use the standard BOOLEAN type because it is not a protected type, which is required for common new-style variables.

I saw many quick implementations of the standard type as a protected type, and I could write my own set of bools, ints, pos, nats, ... but is this necessary?

Does VHDL-2008 have a set of such types in a common package?

So far, I just saw custom protected types.

Here is a protected BOOLEAN example from OSVVM .

type LocalBooleanPType is protected 
  procedure Set (A : boolean) ; 
  impure function get return boolean ; 
end protected LocalBooleanPType ; 

type LocalBooleanPType is protected body
  variable GlobalVar : boolean := FALSE ; 
  procedure Set (A : boolean) is
  begin
     GlobalVar := A ; 
  end procedure Set ; 
  impure function get return boolean is
  begin
    return GlobalVar ; 
  end function get ; 
end protected body LocalBooleanPType ; 
+4
source share
1 answer

user1155120 , . :

IEEE Std 1076-2008 Annex D Potentially nonportable constructs, " ". (6.4.2.4, . 3). 5.6.1 :

... , . , .

? (5.6.2, 4). ( - .)

, 5.6.2:

, , , , .

, , . , . .

user155120

-1

Source: https://habr.com/ru/post/1627886/


All Articles