diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-09-13 21:11:00 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-09-13 21:11:00 +0200 |
commit | e6acce83994a1a00fe148f70f29a61f646422826 (patch) | |
tree | e61d1ea17fd57c99f6e3fe7bc1a14ab46bfcbe30 /src/synth/synth-context.adb | |
parent | 3b5ec33830c238b9cd510c98be9dc65a9274df9a (diff) | |
download | ghdl-e6acce83994a1a00fe148f70f29a61f646422826.tar.gz ghdl-e6acce83994a1a00fe148f70f29a61f646422826.tar.bz2 ghdl-e6acce83994a1a00fe148f70f29a61f646422826.zip |
synth: improve support of interface package. For #1460
Diffstat (limited to 'src/synth/synth-context.adb')
-rw-r--r-- | src/synth/synth-context.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/synth/synth-context.adb b/src/synth/synth-context.adb index 309fa1dd7..fadbdfd13 100644 --- a/src/synth/synth-context.adb +++ b/src/synth/synth-context.adb @@ -257,6 +257,18 @@ package body Synth.Context is I_Inst => Inst); end Create_Package_Object; + procedure Create_Package_Interface (Syn_Inst : Synth_Instance_Acc; + Decl : Node; + Inst : Synth_Instance_Acc) + is + Info : constant Sim_Info_Acc := Get_Info (Decl); + begin + pragma Assert (Syn_Inst.Up_Block /= null); + Create_Object (Syn_Inst, Info.Pkg_Slot, 1); + Syn_Inst.Objects (Info.Pkg_Slot) := (Kind => Obj_Instance, + I_Inst => Inst); + end Create_Package_Interface; + function Get_Package_Object (Syn_Inst : Synth_Instance_Acc; Info : Sim_Info_Acc) return Synth_Instance_Acc |