aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-expr.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-expr.adb
parent419d542accc0a0bd5f3daa833f202043ce6f480c (diff)
downloadghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.tar.gz
ghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.tar.bz2
ghdl-42c6c8b8d96d781dbe9173a647d17b3f25da32c2.zip
synth: introduce slice type.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r--src/synth/synth-expr.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index b68637498..8c58adafc 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -920,6 +920,9 @@ package body Synth.Expr is
when Type_Vector =>
-- TODO: check width
return Val;
+ when Type_Slice =>
+ -- TODO: check width
+ return Val;
when Type_Array =>
-- TODO: check bounds, handle elements
return Val;
@@ -1914,7 +1917,8 @@ package body Synth.Expr is
Inp, Step, Off, Wd);
Set_Location (N, Name);
-- TODO: the bounds cannot be created as they are not known.
- return Create_Value_Net (N, null);
+ Res_Type := Create_Slice_Type (Wd, Pfx.Typ.Vec_El);
+ return Create_Value_Net (N, Res_Type);
else
N := Build_Extract (Build_Context, Get_Net (Pfx), Uns32 (Off), Wd);
Set_Location (N, Name);