aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-expands.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-28 20:07:46 +0100
committerTristan Gingold <tgingold@free.fr>2019-10-28 20:07:46 +0100
commitfce8f04ce5aef77c597ea3f97f84ec5ffb08a3da (patch)
tree33d971a255b7bb533e5316fd4460cc70b01ed405 /src/synth/netlists-expands.adb
parent13a28fa63e8dca2b31e09c2b393a6440b64d05b8 (diff)
downloadghdl-fce8f04ce5aef77c597ea3f97f84ec5ffb08a3da.tar.gz
ghdl-fce8f04ce5aef77c597ea3f97f84ec5ffb08a3da.tar.bz2
ghdl-fce8f04ce5aef77c597ea3f97f84ec5ffb08a3da.zip
synth: adjust computation of max for dyn_extract.
Diffstat (limited to 'src/synth/netlists-expands.adb')
-rw-r--r--src/synth/netlists-expands.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/netlists-expands.adb b/src/synth/netlists-expands.adb
index ebc51670d..3438ee132 100644
--- a/src/synth/netlists-expands.adb
+++ b/src/synth/netlists-expands.adb
@@ -52,7 +52,7 @@ package body Netlists.Expands is
Max := Get_Param_Uns32 (Inst1, 1);
pragma Assert (Max /= 0);
- Res := Res * Natural (Max);
+ Res := Res * Natural (Max + 1);
exit when Inst1 = Inst;
end loop;
@@ -99,7 +99,7 @@ package body Netlists.Expands is
begin
pragma Assert (Max /= 0);
- for I in 0 .. Max - 1 loop
+ for I in 0 .. Max loop
if Sub_Inst /= No_Instance then
-- recurse.
raise Internal_Error;