Re: [vhdl-200x] Modular types, alternative solutions

From: Ray Andraka, Andraka Consulting Group, Inc <ray@andraka.com>
Date: Fri Oct 24 2014 - 04:26:05 PDT
On 10/23/2014 11:52 PM, tgingold@free.fr wrote:
>> Frankly, before we go supporting modular types, I'd like to see
>> longer integers than 32 bit signed integers. That limitation is more
>> of a pain to work around than working with modular arithmetic using
>> the language as-is.
>>      
> Nothing in the language prevents from having integer types longer than
> 32 bits.  That's a implementation issue; you should ask your vendor to
> support them.
>
> What you may want to is have the Std.Standard.Integer longer than
> 32 bits.  I am not sure that this is a good idea.  One of VHDL issue
> is that Integer is used at many places (and more places that needed).
>
> What is wrong with numeric_bit or numeric_std ?  They provide all the
> needs of integer/modular types, but cannot be used easily to index
> arrays or as the type of iterator.  Maybe we should concentrate on
> that point.
>
> Tristan.
>
>    
Nothing is wrong with numeric_x.  The place where this crops up most 
annoyingly for me is
passing tables into/out of VHDL via files (e.g. Matlab generated memory 
table initialization, filter
coefficients, test vectors) and passing tables of constants into an 
entity through a generic, which I
typically do with an array of integers (array of numeric_std is awkward 
for large tables, and is
not supported for passing through generics by many vendors). While I 
agree the long integer
issue  is mostly a vendor issue, the fact that there is not an explicit 
long integer type in the standard
makes longer than 32 bit integers risky due to sporadic and not required 
support for them.

I generally do use numeric_std for description of the logic, and usually 
in my test benches.  You do
have to convert to/from integer to get access to the ieee.math_real 
library in order to get to the
trig and other math functions for use in a testbench, and there the 32 
bits can become an issue as
well.




-- 
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930     Fax 401/884-7950
email ray@andraka.com
http://www.andraka.com

   "They that give up essential liberty to obtain a little
    temporary safety deserve neither liberty nor safety."
                                            -Benjamin Franklin, 1759
  


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Oct 24 04:26:48 2014

This archive was generated by hypermail 2.1.8 : Fri Oct 24 2014 - 04:28:00 PDT