aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-ieee-numeric.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-07 17:41:00 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-11 06:37:26 +0200
commit2b3a1bb316317453d4e40bc3a650b4ed07eee7a8 (patch)
tree2d4446502e2ab262c6a3fcf03b2d912bfad2944d /src/vhdl/vhdl-ieee-numeric.adb
parent89969411e5d6ecb5efd89172a9462a92878f093b (diff)
downloadghdl-2b3a1bb316317453d4e40bc3a650b4ed07eee7a8.tar.gz
ghdl-2b3a1bb316317453d4e40bc3a650b4ed07eee7a8.tar.bz2
ghdl-2b3a1bb316317453d4e40bc3a650b4ed07eee7a8.zip
vhdl: recognize numeric_std shift_left.
Diffstat (limited to 'src/vhdl/vhdl-ieee-numeric.adb')
-rw-r--r--src/vhdl/vhdl-ieee-numeric.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-ieee-numeric.adb b/src/vhdl/vhdl-ieee-numeric.adb
index 4d5c0d5e3..500c0a260 100644
--- a/src/vhdl/vhdl-ieee-numeric.adb
+++ b/src/vhdl/vhdl-ieee-numeric.adb
@@ -477,6 +477,8 @@ package body Vhdl.Ieee.Numeric is
Set_Implicit_Definition (Decl, Predefined);
end Handle_Std_Match;
+
+ Res : Iir_Predefined_Functions;
begin
Decl := Get_Declaration_Chain (Pkg_Decl);
@@ -589,6 +591,23 @@ package body Vhdl.Ieee.Numeric is
Handle_Resize;
when Name_Std_Match =>
Handle_Std_Match;
+ when Name_Shift_Left =>
+ if Arg1_Kind = Arg_Vect
+ and then Arg2_Kind = Arg_Scal
+ and then Arg2_Sign = Type_Unsigned
+ then
+ case Arg1_Sign is
+ when Type_Signed =>
+ Res :=
+ Iir_Predefined_Ieee_Numeric_Std_Shl_Sgn_Nat;
+ when Type_Unsigned =>
+ Res :=
+ Iir_Predefined_Ieee_Numeric_Std_Shl_Uns_Nat;
+ when others =>
+ Res := Iir_Predefined_None;
+ end case;
+ Set_Implicit_Definition (Decl, Res);
+ end if;
when others =>
null;
end case;