Allow cross architecture subprogram calls

Consider the following package:

package mypackage is
  type mytype is protected
    procedure someproc(...);
    ...
  end type mytype;

And the following architecture:

architecture arch of someentity is
  shared variable myvar : mytype;

  procedure someotherproc(...) is
  begin
    ...
  end procedure someotherproc;
begin
  ...
end architecture arch;

Allow calls to myfar.someproc from outside of the arch architecture. For example:

architecture arch of someotherentity is
begin
  someentity_inst : someentity
  ...;

  -- Call the someproc on the myvar instance in someentity.
  somentity_inst.myvar.someproc(...);

  -- Or call someotherproc.
  someentity_inst.someotherproc(...);
end architecture arch;

Alternately/Also perhaps leverage the entity declarative region:

entity someentity is
  ...
begin
  procedure someproc(...) is
  begin
    ...
  end procedure someproc;
end entity someentity;

The problem here, though, is that subprograms in entity declarative regions are required to be passive (no signal assignments or wait statement). Perhaps extend the entity declarative region to allow forward declarations. For example:

entity someentity is
  ...
begin
  procedure someproc(...) is
end entity someentity;

architecture arch of someentity is
  procedure someproc(...) is
  begin
    ...
  end procedure someproc;
begin
  ...
end architecture arch;
Edited by Peter LaDow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information