Allow signals inside protected types, allow waiting in protected types.
Currently, it is illegal to declare signals inside protected types, and it is illegal to put waiting inside protected type procedures. In VHDL 2008, with generic packages, packages could be instantiated in any region where it was legal to do so eg. a package with a signal could not be instantiated inside a process declarative region. Why couldnt the same be done with protected types?
This would allow the creation of blocking set/get methods on a protected type, that would allow some easier synchronisation between processes in a verification environment (similar to mailboxes in SV).
An example:
entity setget is
end entity;
architecture test of setget is
type blocking_t is protected
procedure set(i : integer);
procedure get(variable i : out integer);
end protected blocking_t;
type blocking_t is protected body
variable d : integer;
signal s : boolean;
procedure set(i : integer) is
begin
d := i;
s <= true;
end procedure;
procedure get(variable i : out integer) is
begin
wait on s'transaction;
i := d
end procedure;
end protected body;
shared variable blocking : blocking_t;
begin
process
begin
wait for 20 ns;
blocking.set(20);
wait;
end process;
process
variable i : integer;
begin
blocking.get(i);
report to_string(i);
wait;
end process;
end architecture test;
Edited by Patrick Lehmann