aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/netlists-builders.adb1
-rw-r--r--src/synth/synth-expr.adb10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb
index c205ef318..c591c38a8 100644
--- a/src/synth/netlists-builders.adb
+++ b/src/synth/netlists-builders.adb
@@ -1343,7 +1343,6 @@ package body Netlists.Builders is
is
Wd : constant Width := Get_Width (I);
pragma Assert (Wd /= No_Width);
- pragma Assert (W > 0);
pragma Assert (W + Off <= Wd);
Inst : Instance;
O : Net;
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 1b3e05df7..8e334cc2a 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -1323,6 +1323,11 @@ package body Synth.Expr is
Error_Msg_Synth (+Name, "direction mismatch in slice");
Off := 0;
Wd := 0;
+ if Dir = Iir_To then
+ Res_Bnd := (Dir => Iir_To, Left => 1, Right => 0, Len => 0);
+ else
+ Res_Bnd := (Dir => Iir_Downto, Left => 0, Right => 1, Len => 0);
+ end if;
return;
end if;
@@ -1418,6 +1423,11 @@ package body Synth.Expr is
Inp := No_Net;
Off := 0;
Wd := 0;
+ if Dir = Iir_To then
+ Res_Bnd := (Dir => Iir_To, Left => 1, Right => 0, Len => 0);
+ else
+ Res_Bnd := (Dir => Iir_Downto, Left => 0, Right => 1, Len => 0);
+ end if;
return;
end if;