diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-13 20:03:24 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-13 20:03:24 +0100 |
commit | 559c6166f3c639330502f714babddb0bd6d986b4 (patch) | |
tree | bc3b083ad90257af9b7d16d4948586a1028fec7d /src/synth/synth-stmts.adb | |
parent | 320a18c681edd29d8f58bd7f3109ae6ee1faffca (diff) | |
download | ghdl-559c6166f3c639330502f714babddb0bd6d986b4.tar.gz ghdl-559c6166f3c639330502f714babddb0bd6d986b4.tar.bz2 ghdl-559c6166f3c639330502f714babddb0bd6d986b4.zip |
synth: add some support for access types.
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r-- | src/synth/synth-stmts.adb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index a510d1765..e969cf11a 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -1339,16 +1339,22 @@ package body Synth.Stmts is raise Internal_Error; when Iir_Kind_Interface_Variable_Declaration => -- Always pass by value. - Val := Synth_Read_Memory - (Caller_Inst, Info.Obj, Info.Off, No_Net, - Info.Targ_Type, Assoc); + if Is_Static (Info.Obj) then + if Info.Off /= 0 then + raise Internal_Error; + end if; + Val := Info.Obj; + else + Val := Synth_Read_Memory + (Caller_Inst, Info.Obj, Info.Off, No_Net, + Info.Targ_Type, Assoc); + end if; when Iir_Kind_Interface_Signal_Declaration => -- Always pass by reference (use an alias). Val := Create_Value_Alias (Info.Obj, Info.Off, Info.Targ_Type); when Iir_Kind_Interface_File_Declaration => - Val := Create_Value_File - (Info.Targ_Type, Info.Obj.File); + Val := Info.Obj; end case; end; end case; |