diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-28 20:07:46 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-28 20:07:46 +0100 |
commit | fce8f04ce5aef77c597ea3f97f84ec5ffb08a3da (patch) | |
tree | 33d971a255b7bb533e5316fd4460cc70b01ed405 /src/synth/netlists-expands.adb | |
parent | 13a28fa63e8dca2b31e09c2b393a6440b64d05b8 (diff) | |
download | ghdl-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.adb | 4 |
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; |