RE: EXTERNAL: Re: [vhdl-200x] Modular types

From: <ryan.w.hinton@L-3com.com>
Date: Tue Jul 01 2014 - 10:21:35 PDT
It should be a little longer than that.

(2**31) ** (2**31)

is over 20 billion digits base 10.  (Notice the larger exponent.)  Python has been working on this for 10 minutes now -- and it's up to about 100GB of memory.

The idea of arbitrary-precision integers is not necessarily to describe a particular piece of hardware.  It's to provide a programming language with infrastructure that makes it convenient to describe arbitrary hardware.  I regularly use ~100-bit intermediate accumulators (CIC filter), and 500- to 4000-bit pseudo-random number generators, and 2000 to 64k bit LDPC error correcting codes.  And I haven't yet been asked to work on a crypto problem!  So why should my programming language be limited by the "32 bits is big enough for anyone" idea?  

I'm not expecting arbitrary-range integers to be synthesizable any more than FILE or ACCESS types.  (Although a friend had some interesting ideas on synthesizable pointers....)  I use numeric_std types for synthesis, or sometimes a range-restricted integer.  But it would be great for the simulator to support it.

- Ryan

-----Original Message-----
From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On Behalf Of Martin.J Thompson
Sent: Tuesday, July 01, 2014 2:36 AM
To: vhdl-200x@eda.org
Subject: RE: EXTERNAL: Re: [vhdl-200x] Modular types

> Assuming we accept this proposal in some form, if you ask for 
> integer'high ** integer'high you will be waiting quite a long time for the answer.

No need for it to be that long - python does arbitrary integer arithmetic, and it takes negligible time to perform (10**31)**31 and print 3-and-a-bit lines of digits :) I don't see why a simulator should have worse performance.

Cheers,
Martin



--
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 Tue Jul 1 10:21:50 2014

This archive was generated by hypermail 2.1.8 : Tue Jul 01 2014 - 10:22:20 PDT