Subject: RE: CP-007 - comments on Jim's suggestions
From: Jayaram Bhasker (JBhasker@esilicon.com)
Date: Wed Jul 30 2003 - 07:09:42 PDT
I agree with Peter's rationale. We should not assume any decimal interpretation
for std_logic vectors.
- bhasker
-----Original Message-----
From: Peter Ashenden [mailto:peter@ashenden.com.au]
Sent: Wednesday, July 09, 2003 4:45 PM
To: vhdl-std-logic@eda.org
Subject: CP-007 - comments on Jim's suggestions
Folks,
When I posted CP-007 proposing std_logic_textio, Jim suggested some
extensions. To summarize, he suggested
(1) adding decimal read and write procedures (DREAD, DWRITE);
(2) for write procedures, allowing vector lengths other than multiple of 4
for HWRITE and multiple of 3 for OWRITE, assuming zero padding on the left;
(3) for read procedures, allowing reading characters denoting extra bits
beyond the length of the vector, and ignoring extra bits on the left if they
are all zeros.
The rational for (1) is completeness and utility. The rationale for (2) and
(3) is to provide for vectors that aren't multiples of 4 (hex) or 3 (octal)
in length.
Jim, please correct me if I have mangled your proposal and rationale.
Seems to me, however, that there is an implicit assumption in these
extensions, namely, that the vectors represent binary-coded integers. If
that assumption is true, then doing decimal I/O, padding with zeros and
ignoring leading zeros makes sense. If the assumption is false, doing these
things doesn't make sense.
Since 1164 doesn't make assumptions about what bit vectors represent,
perhaps we should rethink Jim's extensions. I might be more appropriate to
roll them into textio for numeric_bit and numeric_std, where numeric
interpretation of vectors is assumed. In that case, sensible behavior for
zero/sign extension can be provided.
Comments?
Cheers,
PA
-- Dr. Peter J. Ashenden peter@ashenden.com.au Ashenden Designs Pty. Ltd. www.ashenden.com.au PO Box 640 Ph: +61 8 8339 7532 Stirling, SA 5152 Fax: +61 8 8339 2616 Australia Mobile: +61 414 70 9106
This archive was generated by hypermail 2b28 : Wed Jul 30 2003 - 07:15:18 PDT