Subject: J1 through J8, or...
From: Rob Anderson (rob@reawebtech.com)
Date: Fri Aug 16 2002 - 18:21:06 PDT
Pilot group:
I am looking at numeric_std and how to fit Jim's functions,
I will write them up and put them in the package, hopefully
with concensus and when Alex (chair) indicates. Then I will
pass the package to David to put on the web as the revised
package.
I assume numeric_bit needs the same treatment.
Two issues:
1) These are addition and subtraction, and we would expect them in
the package header as ~A.9 through A.12 for the addition ones, but these
overlap the original subtraction operators. So, do we bump the
function numbers, or is there a clever way to interject something:
A.8
A.8a
A.8b
A.8c
Other Ideas?
Argument for bumping: If you go to the header to look things up, and they
are not with the other "+" operators, you won't think they exist.
Argument against bumping: this kind of upsets anything referring to that
A.nn number. It would be nice if we did not have to do that.
2) Jim was suggesting before that all the std_logic elements be
changed to std_ulogic, a fundamental change in the package that
was not proposed yet and would be a big change.
The initial new headers per Jim have std_ulogic, eg.
function "+"(L:unsigned; R:std_ulogic) return unsigned;
I assume this was accidental, and these
should be std_logic unless we do go to the trouble to change
the base element type.
Here is a sample coding of that function:
function "+"(L:unsigned; R:std_logic) return unsigned;
constant SIZE: NATURAL := L'LENGTH;
variable L01 : UNSIGNED(SIZE-1 downto 0);
variable R01 : UNSIGNED(SIZE-1 downto 0):=(others=>'0');
begin
if (L'LENGTH < 1) then return NAU;
end if;
if (L01(L01'LEFT)='X') then return L01;
end if;
if (R='X') then return r01:=(others=>'X');
end if;
R01(0)=R;
return ADD_UNSIGNED(L01, R01, '0');
end "+";
Does this look ok, pilot?
Cheers, Rob
This archive was generated by hypermail 2b28 : Fri Aug 16 2002 - 18:19:13 PDT