From bc64b96b31c0fb591c1775fffba1ada37f1914db Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 26 May 2021 18:59:32 +0200 Subject: ieee2008: backport fixed_generic_pkg-body changes from opensource.ieee.org --- libraries/ieee2008/fixed_generic_pkg-body.vhdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libraries/ieee2008/fixed_generic_pkg-body.vhdl') diff --git a/libraries/ieee2008/fixed_generic_pkg-body.vhdl b/libraries/ieee2008/fixed_generic_pkg-body.vhdl index 6c18fcb9f..37222eb06 100644 --- a/libraries/ieee2008/fixed_generic_pkg-body.vhdl +++ b/libraries/ieee2008/fixed_generic_pkg-body.vhdl @@ -919,7 +919,7 @@ package body fixed_generic_pkg is lslv := to_uns (lresize); rslv := to_uns (rresize); result_slv := lslv + rslv + cx; - c_out := result_slv(left_index); + c_out := result_slv(left_index-right_index); result := to_fixed(result_slv (left_index-right_index-1 downto 0), left_index-1, right_index); end if; @@ -950,7 +950,7 @@ package body fixed_generic_pkg is lslv := to_s (lresize); rslv := to_s (rresize); result_slv := lslv + rslv + cx; - c_out := result_slv(left_index); + c_out := result_slv(left_index-right_index); result := to_fixed(result_slv (left_index-right_index-1 downto 0), left_index-1, right_index); end if; -- cgit v1.2.3