diff options
-rw-r--r-- | src/synth/synth-vhdl_oper.adb | 4 | ||||
-rw-r--r-- | testsuite/synth/issue2126/test.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/synth/issue2126/testsuite.sh | 9 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_oper.adb b/src/synth/synth-vhdl_oper.adb index 919d1f64e..4a2f4d71e 100644 --- a/src/synth/synth-vhdl_oper.adb +++ b/src/synth/synth-vhdl_oper.adb @@ -1969,7 +1969,8 @@ package body Synth.Vhdl_Oper is | Iir_Predefined_Ieee_1164_To_Stdulogicvector_Bv | Iir_Predefined_Ieee_Numeric_Std_To_01_Uns | Iir_Predefined_Ieee_Numeric_Std_To_01_Sgn - | Iir_Predefined_Ieee_1164_To_X01_Slv => + | Iir_Predefined_Ieee_1164_To_X01_Slv + | Iir_Predefined_Ieee_1164_To_UX01_Slv => if Is_Static (L.Val) then raise Internal_Error; end if; @@ -1977,6 +1978,7 @@ package body Synth.Vhdl_Oper is return Create_Value_Net (Get_Net (Ctxt, L), Create_Res_Bound (L)); when Iir_Predefined_Ieee_1164_To_Bit | Iir_Predefined_Ieee_1164_To_X01_Log + | Iir_Predefined_Ieee_1164_To_UX01_Log | Iir_Predefined_Ieee_1164_To_Stdulogic => -- A no-op. return Create_Value_Net (Get_Net (Ctxt, L), Res_Typ); diff --git a/testsuite/synth/issue2126/test.vhdl b/testsuite/synth/issue2126/test.vhdl new file mode 100644 index 000000000..63de3d0df --- /dev/null +++ b/testsuite/synth/issue2126/test.vhdl @@ -0,0 +1,19 @@ +-- Title : Testcase for to_ux01 on a std_logic +------------------------------------------------------------------------------- + +library ieee; +use ieee.std_logic_1164.all; +entity test is + + port ( + sig_in : in std_logic_vector(1 downto 0); + sig_out : out std_logic; + sig_out_vec : out std_logic_vector(1 downto 0)); +end entity test; + +architecture str of test is + +begin -- architecture str + sig_out <= to_ux01(sig_in(0)) and to_ux01(sig_in(1)); + sig_out_vec <= to_ux01(sig_in); +end architecture str; diff --git a/testsuite/synth/issue2126/testsuite.sh b/testsuite/synth/issue2126/testsuite.sh new file mode 100755 index 000000000..75ca5f68d --- /dev/null +++ b/testsuite/synth/issue2126/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 + +synth_only test + +echo "Test successful" |