Re: [myhdl-list] essay about integer arithmetic
Brought to you by:
jandecaluwe
From: Michael B. <ma...@cr...> - 2009-03-06 14:27:03
|
Yes, but I intend for integers to represent fields of bits, and to do numerous other things that are not constrained by intervals. In fact, some of those things (involving plural, concurrent bitfields) can be done purely with conventional arithmetic operations. Normal integers, but not being used normally. A 32-bit microprocessor (comprised of hardware) can have 32-bit registers that represent integers that are not signed, or that are signed, both at the same time. It all depends on what software does to interpret the meaning of those 32-bit register bits. What's the correct interval representation for the design of the registers in that hardware? Another case I neglected is also salient. In some very useful encoding systems, collections of bits can also mean [-1,1] values, which has a wonderful representation in bit-form, but not as integers, nor as intervals. Best, M On Fri, 6 Mar 2009 08:14:39 -0600, Felton Christopher wrote > > > > > > A collection of bits can well more than a single range in > > representation. A > > 32-bit register can represent 32 bit flags, each having a range > > [0,1]. Or it > > could represent (4) 8-bit values, each having a range [0,255], > > [-128,127] or a > > mix. Or it could represent two fields, (6) 1-bit flag values > > concatenated to a > > 26-bit ordinal. Or, or, or... any number of alternative > > representations > > involving bit-level concurrency that cannot be represented with a > > single > > interval specification. This kind of thing is done all the time in > > hardware. > > > > Think this topic is only discussing when a collection of bits is > acting as a number, integer, and not some other "data type" such as > flags, logic, etc. You wouldn't use the min, max when defining a > collection of bits that are not used for integer arithmetic. > > I think there will be some different opinions in the design approach > but if you wanted an 8 bit register that was used as simple flags, > you could do that the conventional way without min and max. > > As the essay states in the beginning "essay about elementary > arithmetic with integers". This topic is about representing > integers > (when the designer intends integers) and not removing basic bit > vectors for other uses. > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA -OSBC tackles the biggest issue in open source: Open > Sourcing the Enterprise -Strategies to boost innovation and cut > costs with open source participation -Receive a $600 discount off > the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |