Re: [vhdl-200x] Standard Package enhancements

From: <schav9035@mypacks.net>
Date: Thu Apr 16 2015 - 13:46:52 PDT
-----Original Message-----
From: Daniel Kho
Sent: Apr 16, 2015 7:06 AM
To: "vhdl-200x@eda.org"
Subject: [vhdl-200x] Standard Package enhancements

Hi all,
There are a few enhancements I would like to propose for some of our standard packages. Do let me know what you think.

standard.vhd:
    type BOOLEAN_VECTOR is array (INTEGER range <>) of BOOLEAN;
    type BIT_VECTOR is array (INTEGER range <>) of BIT;
    type INTEGER_VECTOR is array (INTEGER range <>) of INTEGER;
    type REAL_VECTOR is array (INTEGER range <>) of REAL;
    type TIME_VECTOR is array (INTEGER range <>) of TIME;
...snip...
Because boolean_vector can't support negative ranges, I had to change this to std_ulogic_vector or unsigned instead.
Supporting a negative range makes sense to me.
Have type conversion functions, or better, make conversions implicit between the following types:
    boolean <-> bit
    boolean <-> std_ulogic
    boolean_vector <-> std_ulogic_vector
    boolean_vector <-> bit_vector
    boolean_vector <-> unsigned
...snip...
Implicit conversions doesn't make sense to me given VHDL's strong typing.  Possibly bit and boolean could be considered similar types such that casting would be allowed.  Having standardized TO_xxx() functions holds some appeal to me.

...snip...
The rest didn't appeal to me, but I don't have anything constructive to add

 - Woody

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Thu Apr 16 13:47:08 2015

This archive was generated by hypermail 2.1.8 : Thu Apr 16 2015 - 13:47:11 PDT