aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-values.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-08 08:54:41 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-11 06:37:27 +0200
commit42c6c8b8d96d781dbe9173a647d17b3f25da32c2 (patch)
tree7c7c5e29b6fabd59d16723f190e1337dfa148bb8 /src/synth/synth-values.adb
parent419d542accc0a0bd5f3daa833f202043ce6f480c (diff)
downloadghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.tar.gz
ghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.tar.bz2
ghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.zip
synth: introduce slice type.
Diffstat (limited to 'src/synth/synth-values.adb')
-rw-r--r--src/synth/synth-values.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb
index e199d8698..b7179e695 100644
--- a/src/synth/synth-values.adb
+++ b/src/synth/synth-values.adb
@@ -129,6 +129,16 @@ package body Synth.Values is
Vec_El => El_Type)));
end Create_Vector_Type;
+ function Create_Slice_Type (W : Width; El_Type : Type_Acc) return Type_Acc
+ is
+ subtype Slice_Type_Type is Type_Type (Type_Slice);
+ function Alloc is new Areapools.Alloc_On_Pool_Addr (Slice_Type_Type);
+ begin
+ return To_Type_Acc (Alloc (Current_Pool, (Kind => Type_Slice,
+ W => W,
+ Slice_El => El_Type)));
+ end Create_Slice_Type;
+
function Create_Vec_Type_By_Length (Len : Width; El : Type_Acc)
return Type_Acc
is