Re: [vhdl-200x] Backwards incompatibility with std_logic_vector

From: Jerry Kaczynski <jarekk@aldec.com>
Date: Thu Aug 22 2013 - 11:25:12 PDT
Paul,

This change was intentional and its main purpose was to reduce code bloat
in standard and user packages.
Typically, both implementations of function 'f' you have mentioned would be
almost identical, the only difference being resolved/unresolved argument
and/or result types. There are numerous examples in standard packages
providing arithmetic operators and conversion functions where 2008 versions
are less than half the size of previous versions.
The best practical (although not exactly standard) solution to your problem
would be to use pragmas to exclude offending definitions from compilation
in 2008 mode. I'm talking about something like this:
  --vhdl_comp_off -2008
    function f(x : std_logic_vector) return integer;
  --vhdl_comp_on
    function f(x : std_ulogic_vector) return integer;
Otherwise, separate code base must be maintained for older versions of the
standard.

Thank you,

Jerry Kaczynski,
Aldec Research Engineer,
jerry.kaczynski@aldec.com
j.kaczynski@ieee.org


On Thu, Aug 22, 2013 at 10:34 AM, Paul Graham <pgraham@oasys-ds.com> wrote:

> The vhdl-2008 std_logic_1164 package changes the definition of
> std_logic_vector.  Previously it was a distinct type from
> std_ulogic_vector.  In vhdl-2008 it is a subtype of std_ulogic_vector.
>  This change is not backwards compatible as it can result in homograph
> conflicts.  For instance:
>
>     function f(x : std_logic_vector) return integer;
>     function f(x : std_ulogic_vector) return integer;
>
> Pre-2008 these functions could coexist.  In vhdl-2008 they are homographs
> and cannot coexist.
>
> Is this a known and expected incompatibility?
>
> Paul
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Aug 22 11:25:25 2013

This archive was generated by hypermail 2.1.8 : Thu Aug 22 2013 - 11:25:36 PDT