From 56dc0a430681fd5745587907fd0fa117e563e8bb Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 5 Jun 2022 17:50:32 +0200 Subject: vhdl-ieee-numeric: recognize vector/scalar operations --- src/vhdl/vhdl-ieee-numeric.adb | 24 ++++++++++++++++++++++++ src/vhdl/vhdl-nodes.ads | 30 +++++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/vhdl/vhdl-ieee-numeric.adb b/src/vhdl/vhdl-ieee-numeric.adb index 73f3010ac..b165eb7e9 100644 --- a/src/vhdl/vhdl-ieee-numeric.adb +++ b/src/vhdl/vhdl-ieee-numeric.adb @@ -466,9 +466,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_And_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_And_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_And_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_And_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => @@ -478,9 +482,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Or_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Or_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => @@ -490,9 +498,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Nand_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Nand_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Nand_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Nand_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => @@ -502,9 +514,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Nor_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Nor_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Nor_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Nor_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => @@ -514,9 +530,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Xor_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Xor_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Xor_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Xor_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => @@ -526,9 +546,13 @@ package body Vhdl.Ieee.Numeric is (Pkg_Std => (Type_Unsigned => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns_Uns, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Xnor_Log_Uns, others => Iir_Predefined_None), Type_Signed => (Arg_Vect_Vect => Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Sgn, + Arg_Vect_Log => Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Log, + Arg_Log_Vect => Iir_Predefined_Ieee_Numeric_Std_Xnor_Log_Sgn, others => Iir_Predefined_None)), Pkg_Bit => (others => diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index f4bc84dd7..9bf8d137d 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -5873,22 +5873,46 @@ package Vhdl.Nodes is Iir_Predefined_Ieee_Numeric_Std_Ror_Sgn_Int, Iir_Predefined_Ieee_Numeric_Std_And_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_And_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_And_Log_Uns, Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Sgn, - - Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Uns, - Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_And_Log_Sgn, Iir_Predefined_Ieee_Numeric_Std_Nand_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_Nand_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_Nand_Log_Uns, Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Nand_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_Nand_Log_Sgn, + + Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_Or_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_Or_Log_Uns, + Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Or_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_Or_Log_Sgn, Iir_Predefined_Ieee_Numeric_Std_Nor_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_Nor_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_Nor_Log_Uns, Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Nor_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_Nor_Log_Sgn, Iir_Predefined_Ieee_Numeric_Std_Xor_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_Xor_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_Xor_Log_Uns, Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Xor_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_Xor_Log_Sgn, Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns_Uns, + Iir_Predefined_Ieee_Numeric_Std_Xnor_Uns_Log, + Iir_Predefined_Ieee_Numeric_Std_Xnor_Log_Uns, Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Xnor_Sgn_Log, + Iir_Predefined_Ieee_Numeric_Std_Xnor_Log_Sgn, -- Numeric_Std binary operators (end) -- Unary functions for numeric_std -- cgit v1.2.3