Re: [vhdl-200x] Modular types

From: Brent Hayhoe <Brent.Hayhoe@Aftonroy.com>
Date: Thu Jul 10 2014 - 16:01:20 PDT
On 09/07/2014 21:08, whygee@f-cpu.org wrote:
> Le 2014-07-09 21:44, Brian Drummond a écrit :
>> On Wed, 2014-06-25 at 14:17 +0000, Martin.J Thompson wrote:
>>> So, are there any features you would like which are not mentioned?
>>> Constraints which do not make sense?
>>
>> I would agree but I would suggest (as Whygee suggested following his
>> experiments) adding shift and rotate operators.
>>
>> The meaning of these is easy to understand for the modulo-2**n case. but
>> may require some thought in the more general case (I would suggest shift
>> on a bit position basis, followed by a modulo operation like the and/or
>> operations.
>>
>> - Brian
>
> Hello,
>
> In a Galois field, shifts are equivalent to multiplies and divides.
>
> They make sense in Z(2^n) and may have applications in other fields
> but I still fail to see the need for non-binary fields.
> I have not seen anyone here mention their use of modular arithmetic,
> beyond the obvious cryptography and ECC fields, which by the way
> do not require language support and already deal with binary numbers well.
>
> So, beyond the obvious case of binary numbers,
> why are we spending time on other bases, since they
> don't bring speed or ease advantages ?
> CPUs support booleans mod 2^(2^n)) but not mod n^m...
>
> yg
>
I mentioned earlier in these threads that my most obvious use would be in 
defining counters in RTL.

Now the synthesis engine will generate a 2**n bit counter but that does not mean 
that it it is a 0 to 2**n-1 count.

For instance, in telecommunication applications I may want to count octets in an 
ATM container, a modulo 48 count.

Regards,

Brent.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jul 10 16:01:56 2014

This archive was generated by hypermail 2.1.8 : Thu Jul 10 2014 - 16:02:00 PDT