[vhdl-200x] Logical (and shift) operations on Integers

From: Martin.J Thompson <Martin.J.Thompson@trw.com>
Date: Fri Aug 29 2014 - 03:20:01 PDT
Hi all,

There was some discussion on yesterday's telecon of allowing logical operations on integers.  There is also quite a lot of previous discussion here:

http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/IntegerOperators

Shift operators could also be considered.

One of the implications of doing this is that it would define a definite representation for integers which have these operations applied to them (ie 2-s complement binary).

So in terms of gathering requirements, what would people like to use these operators for?  Some examples which occur to me off the top of my head:

*         Masking bits

*         Shift registers (should simulate faster than vectors, but whether this is significant I don't know!)

*         Xoring in crc generators

*         What else?

Things it probably shouldn't be used for (in future) could be:

*         Power-of-2 Wraparound counters - we'll have modular types for this

*         Others?


Is this a proposal worth further consideration or not?  I see three options at this stage, but am of course open to others!


*         Don't allow it, it's too constraining on the implementation - use a modular type if you want bit operations.

*         Allow it, but only on integers which have a range covering a 'full power-of-2'

*         Allow it on all integer ranges - in which case how to treat things like integers ranged 157 to 160 - should the compiler normalise that to 0 to 3 for logical and shifting purposes or treat them as effectively full-width 2s complement vectors

Thanks,
Martin


--
Martin Thompson BEng(Hons) MIET CEng
martin.j.thompson@trw.com<mailto:martin.j.thompson@trw.com>  +44 121 627 3569
TRW Conekt, Stratford Road, Solihull, B90 4GW
http://www.conekt.co.uk/

This message, together with any of its attachments, is strictly confidential and intended solely for the addressee(s).  It may contain information which is covered by legal, professional or other privilege.  If you are not the intended recipient, you must not disclose, copy or take any action in reliance of this transmission.  If you have received this message in error, please notify us as soon as possible.

TRW Limited, Registered in England, No. 872948, Registered Office Address: Stratford Road, Solihull B90 4AX


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Aug 29 03:20:35 2014

This archive was generated by hypermail 2.1.8 : Fri Aug 29 2014 - 03:21:45 PDT