aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-objtypes.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-13 18:15:39 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-13 18:15:39 +0200
commit347b9930c5a65d8cf96a6f7f5d92c37bfee7c21a (patch)
tree147aa92eaa0867eae11891cec458b6bdf4f3e264 /src/synth/synth-objtypes.ads
parent547d31b8d955325cbad13e47211d4e4049bf03d0 (diff)
downloadghdl-347b9930c5a65d8cf96a6f7f5d92c37bfee7c21a.tar.gz
ghdl-347b9930c5a65d8cf96a6f7f5d92c37bfee7c21a.tar.bz2
ghdl-347b9930c5a65d8cf96a6f7f5d92c37bfee7c21a.zip
synth: move memtyp handling to synth.objtypes.
Diffstat (limited to 'src/synth/synth-objtypes.ads')
-rw-r--r--src/synth/synth-objtypes.ads37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/synth/synth-objtypes.ads b/src/synth/synth-objtypes.ads
index d481d5623..ad9a740ce 100644
--- a/src/synth/synth-objtypes.ads
+++ b/src/synth/synth-objtypes.ads
@@ -23,6 +23,8 @@ with Areapools; use Areapools;
with Netlists; use Netlists;
+with Grt.Types; use Grt.Types;
+
with Vhdl.Nodes; use Vhdl.Nodes;
package Synth.Objtypes is
@@ -237,6 +239,41 @@ package Synth.Objtypes is
function Get_Type_Width (Atype : Type_Acc) return Width;
+ -- Low-level functions.
+
+ function "+" (Base : Memory_Ptr; Off : Size_Type) return Memory_Ptr;
+
+ procedure Write_U8 (Mem : Memory_Ptr; Val : Ghdl_U8);
+ function Read_U8 (Mem : Memory_Ptr) return Ghdl_U8;
+ function Read_U8 (Mt : Memtyp) return Ghdl_U8;
+
+ procedure Write_U32 (Mem : Memory_Ptr; Val : Ghdl_U32);
+ function Read_U32 (Mem : Memory_Ptr) return Ghdl_U32;
+
+ procedure Write_I32 (Mem : Memory_Ptr; Val : Ghdl_I32);
+ function Read_I32 (Mem : Memory_Ptr) return Ghdl_I32;
+
+ procedure Write_I64 (Mem : Memory_Ptr; Val : Ghdl_I64);
+ function Read_I64 (Mem : Memory_Ptr) return Ghdl_I64;
+
+ procedure Write_Fp64 (Mem : Memory_Ptr; Val : Fp64);
+ function Read_Fp64 (Mem : Memory_Ptr) return Fp64;
+ function Read_Fp64 (Mt : Memtyp) return Fp64;
+
+ procedure Write_Discrete (Mem : Memory_Ptr; Typ : Type_Acc; Val : Int64);
+ function Read_Discrete (Mt : Memtyp) return Int64;
+
+ -- Memory allocation.
+
+ function Create_Memory_U8 (Val : Ghdl_U8; Vtype : Type_Acc)
+ return Memtyp;
+ function Create_Memory_Fp64 (Val : Fp64; Vtype : Type_Acc)
+ return Memtyp;
+ function Create_Memory_Discrete (Val : Int64; Vtype : Type_Acc)
+ return Memtyp;
+
+ function Create_Memory (Vtype : Type_Acc) return Memtyp;
+
procedure Init;
-- Set by Init.