aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_values.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/elab-vhdl_values.adb')
-rw-r--r--src/synth/elab-vhdl_values.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/synth/elab-vhdl_values.adb b/src/synth/elab-vhdl_values.adb
index 7adf69030..f86f4739a 100644
--- a/src/synth/elab-vhdl_values.adb
+++ b/src/synth/elab-vhdl_values.adb
@@ -349,6 +349,29 @@ package body Elab.Vhdl_Values is
return Read_Access (Mt.Mem);
end Read_Access;
+ procedure Write_Protected (Mem : Memory_Ptr; Idx : Protected_Index)
+ is
+ V : Protected_Index;
+ for V'Address use Mem.all'Address;
+ pragma Import (Ada, V);
+ begin
+ V := Idx;
+ end Write_Protected;
+
+ function Read_Protected (Mem : Memory_Ptr) return Protected_Index
+ is
+ V : Protected_Index;
+ for V'Address use Mem.all'Address;
+ pragma Import (Ada, V);
+ begin
+ return V;
+ end Read_Protected;
+
+ function Read_Protected (Mt : Memtyp) return Protected_Index is
+ begin
+ return Read_Protected (Mt.Mem);
+ end Read_Protected;
+
procedure Write_Discrete (Vt : Valtyp; Val : Int64) is
begin
Write_Discrete (Vt.Val.Mem, Vt.Typ, Val);