

|
 |
| Electronic Equipment > VHDL > Re: Signed, Uns... |
|
| << Topic |
< Post |
Post 49 of 49 Topic 6057 of 6417
|
Post > |
Topic >> |
Re: Signed, Unsigned syntax issues. Please help, I'm stumped
by KJ <kkjennings@[EMAIL PROTECTED]
>
Jun 16, 2008 at 07:16 AM
| On Jun 15, 1:06=A0pm, Jim Lewis <j...@[EMAIL PROTECTED]
> wrote:
> KJ,
>
> > A: CTPBitCnt <=3D 1;
> > B: CTPBitCnt <=3D to_unsigned(1);
> > C: CTPBitCnt <=3D to_unsigned(1, CTPBitCnt'length);
> > D: set(CTPBitCnt, "<=3D", 1);
> > E: CTPBitCnt <=3D 15D"1"
> > F: CTPBitCnt <=3D CTPBitCnt'length D"1";??
>
> A couple of comments.
> Which of these solutions work for numbers larger than 31 bits?
>
Trick question...VHDL does not guarantee sup****t for 'numbers' beyond
+/- 2**31 (or thereabouts) so 'A-D' do not, they do work over the
entire range of input parameters, which is what you would expect of a
good function. Once the Accelera folks see fit to either extend
integers (or create a new type) that can even represent 'numbers' with
more than 32 bits of precision these functions would still work.
'E' and 'F' do not work with 'numbers' they work with a pair of
literal text strings.
> Beyond strong typing, I think the array sizing rules are im****tant.
Definitely.
>
> For details about signed, unsigned, meaning of D or X, see my
presentation=
s.
> Since I have been posting links to the presentation, I am surprised you
> waited to reflect such negative comments.
>
Negative only in the sense that it is not a solution for converting an
integer into a (un)signed except in the most constrained case (i.e.
the constant will never have a need to change or be parameterized, and
the target length will never a need to change or be parameterized).
Once you get outside of that boundary that notation won't help. Over
the years, I've found that 'never' happens quite frequently.
The fact that it is useful in those constrained cases may make it
useful to some and I won't begrudge them the op****tunity to make the
language easier for them if they think it helps even if I see no
benefit to me. For me, I rarely come across an unsigned that I won't
want to have a parameterized length.
> If you want to have an opinion in what is done, I suggest that you
> PARTICIPATE in the standards.
>
I've submitted a couple enhancements that I believe were accepted.
KJ


|
49 Posts in Topic:
|
nitrogenocide@[EMAIL PROT |
2008-05-31 11:58:04 |
|
Mike Treseler <mtresel |
2008-05-31 12:41:27 |
|
Mike Treseler <mtresel |
2008-05-31 12:43:10 |
|
"KJ" <kkjenn |
2008-05-31 15:41:06 |
|
Jonathan Bromley <jona |
2008-05-31 20:43:17 |
|
"KJ" <kkjenn |
2008-05-31 19:53:08 |
|
Andy Peters <google@[E |
2008-06-02 15:04:56 |
|
rickman <gnuarm@[EMAIL |
2008-06-09 11:06:36 |
|
Mike Treseler <mike_tr |
2008-06-09 11:28:44 |
|
Andy <jonesandy@[EMAIL |
2008-06-09 12:42:54 |
|
rickman <gnuarm@[EMAIL |
2008-06-09 16:55:47 |
|
Jim Lewis <jim@[EMAIL |
2008-06-09 17:14:34 |
|
Mike Treseler <mike_tr |
2008-06-09 17:26:13 |
|
Andy <jonesandy@[EMAIL |
2008-06-10 14:59:39 |
|
rickman <gnuarm@[EMAIL |
2008-06-11 08:52:56 |
|
Mike Treseler <mike_tr |
2008-06-11 11:14:07 |
|
Brian Drummond <brian_ |
2008-06-12 14:02:55 |
|
Brian Drummond <brian_ |
2008-06-16 11:43:24 |
|
Jonathan Bromley <jona |
2008-06-16 12:45:30 |
|
Brian Drummond <brian_ |
2008-06-17 12:18:49 |
|
Jim Lewis <jim@[EMAIL |
2008-06-12 11:42:18 |
|
"KJ" <kkjenn |
2008-06-12 21:41:42 |
|
Jim Lewis <jim@[EMAIL |
2008-06-15 10:38:11 |
|
"KJ" <kkjenn |
2008-06-15 20:25:41 |
|
Jim Lewis <jim@[EMAIL |
2008-06-16 09:22:19 |
|
KJ <kkjennings@[EMAIL |
2008-06-16 07:35:46 |
|
KJ <kkjennings@[EMAIL |
2008-06-11 09:17:20 |
|
KJ <kkjennings@[EMAIL |
2008-06-11 11:41:59 |
|
rickman <gnuarm@[EMAIL |
2008-06-12 00:11:48 |
|
Mike Treseler <mike_tr |
2008-06-12 09:51:58 |
|
KJ <kkjennings@[EMAIL |
2008-06-12 04:58:01 |
|
rickman <gnuarm@[EMAIL |
2008-06-12 21:02:00 |
|
Mike Treseler <mike_tr |
2008-06-13 10:31:24 |
|
rickman <gnuarm@[EMAIL |
2008-06-12 21:10:12 |
|
KJ <kkjennings@[EMAIL |
2008-06-13 05:24:59 |
|
Jim Lewis <jim@[EMAIL |
2008-06-15 10:06:35 |
|
rickman <gnuarm@[EMAIL |
2008-06-13 17:05:12 |
|
rickman <gnuarm@[EMAIL |
2008-06-13 17:25:08 |
|
"KJ" <kkjenn |
2008-06-13 22:35:18 |
|
rickman <gnuarm@[EMAIL |
2008-06-13 20:58:54 |
|
"MikeWhy" <b |
2008-06-14 02:30:44 |
|
Jonathan Bromley <jona |
2008-06-14 11:27:40 |
|
Jim Lewis <jim@[EMAIL |
2008-06-15 10:32:43 |
|
Jonathan Bromley <jona |
2008-06-15 21:25:43 |
|
"KJ" <kkjenn |
2008-06-15 20:43:25 |
|
"KJ" <kkjenn |
2008-06-14 12:52:42 |
|
"KJ" <kkjenn |
2008-06-14 12:47:00 |
|
Andy <jonesandy@[EMAIL |
2008-06-16 06:08:33 |
|
KJ <kkjennings@[EMAIL |
2008-06-16 07:16:43 |
|
Post A Reply:

|
|
|
|