diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-05 07:44:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-05 07:44:17 +0200 |
commit | 0c71b4ee8844742426f96f0dc0b7c09a197c57dd (patch) | |
tree | e3b1501c49b50bb2c6360ab4311e8dc497020a62 /src/synth/synth-values.ads | |
parent | d1bcab86c7bb8e6d115a9fb5e9da08cd789f34d1 (diff) | |
download | ghdl-0c71b4ee8844742426f96f0dc0b7c09a197c57dd.tar.gz ghdl-0c71b4ee8844742426f96f0dc0b7c09a197c57dd.tar.bz2 ghdl-0c71b4ee8844742426f96f0dc0b7c09a197c57dd.zip |
synth: add value_const_array.
Diffstat (limited to 'src/synth/synth-values.ads')
-rw-r--r-- | src/synth/synth-values.ads | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/synth/synth-values.ads b/src/synth/synth-values.ads index 09718bd80..744791a29 100644 --- a/src/synth/synth-values.ads +++ b/src/synth/synth-values.ads @@ -138,6 +138,7 @@ package Synth.Values is -- An array. Value_Array, + Value_Const_Array, -- A record. Value_Record, @@ -181,7 +182,8 @@ package Synth.Values is Fp : Fp64; when Value_Subtype => null; - when Value_Array => + when Value_Array + | Value_Const_Array => Arr : Value_Array_Acc; when Value_Record => Rec : Value_Array_Acc; @@ -242,6 +244,8 @@ package Synth.Values is -- Create a Value_Array. function Create_Value_Array (Bounds : Type_Acc; Arr : Value_Array_Acc) return Value_Acc; + function Create_Value_Const_Array (Bounds : Type_Acc; Arr : Value_Array_Acc) + return Value_Acc; -- Like the previous one but automatically build the array. function Create_Value_Array (Bounds : Type_Acc) return Value_Acc; @@ -256,6 +260,10 @@ package Synth.Values is function Unshare (Src : Value_Acc; Pool : Areapool_Acc) return Value_Acc; + -- Get the number of indexes in array type TYP without counting + -- sub-elements. + function Get_Array_Flat_Length (Typ : Type_Acc) return Width; + function Get_Type_Width (Atype : Type_Acc) return Width; procedure Init; |