aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-objtypes.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-objtypes.ads')
-rw-r--r--src/synth/synth-objtypes.ads8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/synth/synth-objtypes.ads b/src/synth/synth-objtypes.ads
index dfc0f732b..ff456d35f 100644
--- a/src/synth/synth-objtypes.ads
+++ b/src/synth/synth-objtypes.ads
@@ -125,6 +125,10 @@ package Synth.Objtypes is
Sz : Size_Type;
-- Number of bits (when in a net) for this type.
+ -- Can be zero only if the type has only 0 or 1 value (like a discrete
+ -- type with 1 element, a null vector, or a null array).
+ -- For non synthesizable types (like files or protected type), just
+ -- use 32.
W : Width;
case Kind is
@@ -292,6 +296,10 @@ package Synth.Objtypes is
function Alloc_Memory (Vtype : Type_Acc) return Memory_Ptr;
function Create_Memory (Vtype : Type_Acc) return Memtyp;
+ -- Like Create_Memory but initialize to 0. To be used only for types
+ -- of width 0.
+ function Create_Memory_Zero (Vtype : Type_Acc) return Memtyp;
+
function Is_Equal (L, R : Memtyp) return Boolean;
procedure Copy_Memory (Dest : Memory_Ptr; Src : Memory_Ptr; Sz : Size_Type);