diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-11 18:42:01 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-11 18:42:01 +0100 |
commit | cae204093418e82299b93af809007aadd4cde36d (patch) | |
tree | 7370a644f30f66ce7a94df0b49c4ede8d9e1f578 /src/vhdl | |
parent | 4c9651dfbb4aeb4bd22b1b6eb5436119f599f8e4 (diff) | |
download | ghdl-cae204093418e82299b93af809007aadd4cde36d.tar.gz ghdl-cae204093418e82299b93af809007aadd4cde36d.tar.bz2 ghdl-cae204093418e82299b93af809007aadd4cde36d.zip |
vhdl-ieee-std_logic_arith: recognize more conversions.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-ieee-std_logic_arith.adb | 8 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 7 |
2 files changed, 14 insertions, 1 deletions
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. |