From cae204093418e82299b93af809007aadd4cde36d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 11 Mar 2020 18:42:01 +0100 Subject: vhdl-ieee-std_logic_arith: recognize more conversions. --- src/vhdl/vhdl-ieee-std_logic_arith.adb | 8 ++++++++ src/vhdl/vhdl-nodes.ads | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/vhdl') diff --git a/src/vhdl/vhdl-ieee-std_logic_arith.adb b/src/vhdl/vhdl-ieee-std_logic_arith.adb index 28bf913a1..e8a7fbd1b 100644 --- a/src/vhdl/vhdl-ieee-std_logic_arith.adb +++ b/src/vhdl/vhdl-ieee-std_logic_arith.adb @@ -45,6 +45,12 @@ package body Vhdl.Ieee.Std_Logic_Arith is Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Int, Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Log); + Conv_Vec_Patterns : constant Conv_Pattern_Type := + (Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Sgn, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Uns, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Int, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Log); + Error : exception; procedure Extract_Declarations (Pkg : Iir_Package_Declaration) @@ -152,6 +158,8 @@ package body Vhdl.Ieee.Std_Logic_Arith is case Get_Identifier (Decl) is when Name_Conv_Unsigned => Def := Handle_Conv (Conv_Uns_Patterns); + when Name_Conv_Std_Logic_Vector => + Def := Handle_Conv (Conv_Vec_Patterns); when others => null; end case; diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 54fba3db2..ed83cd157 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -5746,7 +5746,12 @@ package Vhdl.Nodes is Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Int, Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Uns, Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Sgn, - Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Log + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Integer_Log, + + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Int, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Uns, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Sgn, + Iir_Predefined_Ieee_Std_Logic_Arith_Conv_Vector_Log ); -- Return TRUE iff FUNC is a short-cut predefined function. -- cgit v1.2.3