Paul_P1


Subject: Paul_P1
From: Paul J. Menchini (mench@mench.com)
Date: Fri Dec 20 2002 - 11:38:15 PST


Ladies and Gentlemen,

A proposal herewith, for your edification and discussion.

Happy holidays to all!

Paul

-----------------------------------------------------------------------------

ID: CP:Paul_P1

Proposer: Paul Menchini

Status: Proposed (12/19/02)
        Seconded (Rob Anderson)
        To be analyzed
        To be resolved

Summary:
        Migrate the functions IEEE.numeric_std.std_match to the
        package IEEE.std_logic_1164 and provide for backwards
        compatibility.

Detail:
        Since the results of the various IEEE.numeric_std.std_match
        functions do not depend on the specific numeric
        interpretations of the arguments being compared, there's
        little to be gained by having the std_match functions for the
        std_logic_1164 types in the numeric_std package. In
        particular, this functionality is useful to people using the
        std_logic_1164 and other packages. Rather the either forcing
        the function to be replicated throughout the hierarchy of VHDL
        packages rooted at std_logic_1164 or requiring people to write
        their own, it makes sense to provide std_match at the lowest
        possible level in the hierarchy of packages. Care must be
        taken to provide backwards compatibility if possible, so that
        existing models remain legal.

        This proposal suggests three modifications:

        1. Move the functions IEEE.numeric_std.std_match having
            std_logic_1164 arguments to the package std_logic_1164 and
            call them IEEE.std_logic_1164.match. In particular,
            provide the following functions in std_logic_1164:

            function match( L, R: std_ulogic ) return Boolean;
            function match( L, R: std_ulogic_vector ) return Boolean;
            function match( L, R: std_logic_vector ) return Boolean;

            Also move the table IEEE.numeric_std.MATCH_TABLE, which
            implements these functions.

        2. Remove these corresponding std_match functions from the
            numeric_std package and instead provide aliases of
            IEEE.std_logic_1164.match as appropriate:

            alias std_match is
                  ieee.std_logic_1164.match [
                                 ieee.std_logic_1164.std_ulogic,
                                 ieee.std_logic_1164.std_ulogic
                        ] return std.standard.boolean;
            alias std_match is
                  ieee.std_logic_1164.match [
                                 ieee.std_logic_1164.std_ulogic_vector,
                                 ieee.std_logic_1164.std_ulogic_vector,
                        ] return std.standard.boolean;
            alias std_match is
                  ieee.std_logic_1164.match [
                                 ieee.std_logic_1164.std_logic_vector,
                                 ieee.std_logic_1164.std_logic_vector,
                        ] return std.standard.boolean;

        3. Reimplement the two remaining std_match functions in
            numeric_std as follows:

            function std_match (L, R: signed) return boolean is
            begin
              return ieee.std_logic_1164.match(
                        std_logic_vector(L),
                        std_logic_vector(R));
            end function std_match;

            function std_match (L, R: unsigned) return boolean is
            begin
              return ieee.std_logic_1164.match(
                        std_logic_vector(L),
                        std_logic_vector(R));
            end function std_match;

Analysis:
        [To be performed by the P1076.3 and P1164 Working Groups.]

Resolution:
        [To be determined by the P1076.3 and P1164 Working Groups.]



This archive was generated by hypermail 2b28 : Fri Dec 20 2002 - 11:42:19 PST