aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-objtypes.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-12-12 08:18:05 +0100
committerTristan Gingold <tgingold@free.fr>2020-12-12 11:24:17 +0100
commit6eab3c3c5da3ee3df019370389a6ee2a0b4d04c2 (patch)
treec085e07fc3cba61778e0713fc9c5fa88bd4b31bd /src/synth/synth-objtypes.ads
parent42ad61bf1d5c570ed395013bd83e8fb7d54137c2 (diff)
downloadghdl-6eab3c3c5da3ee3df019370389a6ee2a0b4d04c2.tar.gz
ghdl-6eab3c3c5da3ee3df019370389a6ee2a0b4d04c2.tar.bz2
ghdl-6eab3c3c5da3ee3df019370389a6ee2a0b4d04c2.zip
synth: improve handling of null-range nets.
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);