diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-08-05 07:37:38 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-08-05 07:37:38 +0200 |
commit | 714e8f8fa56a1abd238e6a9d97e7f6a4eb8e82ac (patch) | |
tree | 35882f01a048fa889988ffc7397ab0a9439956fb /src/synth | |
parent | b6afd4243cf510c27e896ba806e81b466145bb17 (diff) | |
download | ghdl-714e8f8fa56a1abd238e6a9d97e7f6a4eb8e82ac.tar.gz ghdl-714e8f8fa56a1abd238e6a9d97e7f6a4eb8e82ac.tar.bz2 ghdl-714e8f8fa56a1abd238e6a9d97e7f6a4eb8e82ac.zip |
synth: add asserts in synth-values
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-values.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb index c6b0b1ae5..fe0785023 100644 --- a/src/synth/synth-values.adb +++ b/src/synth/synth-values.adb @@ -166,6 +166,7 @@ package body Synth.Values is subtype Value_Type_Wire is Value_Type (Values.Value_Wire); function Alloc is new Areapools.Alloc_On_Pool_Addr (Value_Type_Wire); begin + pragma Assert (Wtype /= null); return To_Value_Acc (Alloc (Current_Pool, (Kind => Value_Wire, W => W, @@ -177,6 +178,7 @@ package body Synth.Values is subtype Value_Type_Net is Value_Type (Value_Net); function Alloc is new Areapools.Alloc_On_Pool_Addr (Value_Type_Net); begin + pragma Assert (Ntype /= null); return To_Value_Acc (Alloc (Current_Pool, Value_Type_Net'(Kind => Value_Net, N => N, Typ => Ntype))); @@ -202,6 +204,7 @@ package body Synth.Values is subtype Value_Type_Discrete is Value_Type (Value_Discrete); function Alloc is new Areapools.Alloc_On_Pool_Addr (Value_Type_Discrete); begin + pragma Assert (Vtype /= null); return To_Value_Acc (Alloc (Current_Pool, (Kind => Value_Discrete, Scal => Val, Typ => Vtype))); @@ -212,6 +215,7 @@ package body Synth.Values is subtype Value_Type_Float is Value_Type (Value_Float); function Alloc is new Areapools.Alloc_On_Pool_Addr (Value_Type_Float); begin + pragma Assert (Vtype /= null); return To_Value_Acc (Alloc (Current_Pool, (Kind => Value_Float, Typ => Vtype, @@ -253,6 +257,7 @@ package body Synth.Values is Res : Value_Acc; begin + pragma Assert (Bounds /= null); Res := To_Value_Acc (Alloc (Current_Pool, (Kind => Value_Array, Arr => Arr, Typ => Bounds))); |