RE: [vhdl-200x] Modular types

From: <ryan.w.hinton@L-3com.com>
Date: Mon Jul 14 2014 - 12:20:14 PDT
I guess I'm still thinking of them as "just integers," particularly when evaluating expressions.  So we could define shl, shr, and, xor, etc. for integers, and expressions involving modular types would have access to them just like all the other integer operations.

- Ryan

-----Original Message-----
From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On Behalf Of whygee@f-cpu.org
Sent: Monday, July 14, 2014 12:46 PM
To: vhdl-200x@eda.org
Subject: RE: [vhdl-200x] Modular types

Le 2014-07-14 20:35, ryan.w.hinton@L-3com.com a écrit :
> Can someone help me understand why the modulus affects the definition 
> of logical and shift operations?  I imagine logical and shift 
> operations applying to the twos-complement representation of the 
> integer.  I don't see how the modulus affects this definition.

Just to be explicit and clear, the operators
  - could be named shl2, sha2, shr2, rol2, ror2, and2, or2, ...
       (BTW, the boolean case for modulars is quite easy to manage,
       just mask the MSB, but the rotations are the trickiest of the lot)
  - would trigger a warning when used on non-binary modulars

or any combination of these possibilities.

Any other suggestion ?

yg

--
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 Mon Jul 14 12:20:33 2014

This archive was generated by hypermail 2.1.8 : Mon Jul 14 2014 - 12:20:43 PDT