David,
Updated JIM_P1 subprograms (untested). Changed:
* Added initialization to 0 to the XR, XL variables.
* Used XR/XL as appropriate in the +/- expression.
I will provide some test vectors later.
If you feel you are doing enough editing on the
floating and fixed point packages, I am willing
to do the editing on numeric_std/numeric_bit.
I already have access to eda.org for VHDL-200X work.
Cheers,
Jim
--==============================================================================
--============================= New subprograms ================================
--==============================================================================
-- Id: A.3R
function "+"(L: UNSIGNED; R: STD_ULOGIC) return UNSIGNED is
variable XR: UNSIGNED(L'LENGTH-1 downto 0) := (others=>'0');
begin
XR(0) := R;
return (L + XR);
end "+";
-- Id: A.3L
function "+"(L: STD_ULOGIC; R: UNSIGNED) return UNSIGNED is
variable XL: UNSIGNED(R'LENGTH-1 downto 0) := (others=>'0');
begin
XL(0) := L;
return (XL + R);
end "+";
-- Id: A.4R
function "+"(L: SIGNED; R: STD_ULOGIC) return SIGNED is
variable XR: SIGNED(L'LENGTH-1 downto 0) := (others=>'0');
begin
XR(0) := R;
return (L + XR);
end "+";
-- Id: A.4L
function "+"(L: STD_ULOGIC; R: SIGNED) return SIGNED is
variable XL: SIGNED(R'LENGTH-1 downto 0) := (others=>'0');
begin
XL(0) := L;
return (XL + R);
end "+";
-- Id: A.9R
function "-"(L: UNSIGNED; R: STD_ULOGIC) return UNSIGNED is
variable XR: UNSIGNED(L'LENGTH-1 downto 0) := (others=>'0');
begin
XR(0) := R;
return (L - XR);
end "-";
-- Id: A.9L
function "-"(L: STD_ULOGIC; R: UNSIGNED) return UNSIGNED is
variable XL: UNSIGNED(R'LENGTH-1 downto 0) := (others=>'0');
begin
XL(0) := L;
return (XL - R);
end "-";
-- Id: A.10R
function "-"(L: SIGNED; R: STD_ULOGIC) return SIGNED is
variable XR: SIGNED(L'LENGTH-1 downto 0) := (others=>'0');
begin
XR(0) := R;
return (L - XR);
end "-";
-- Id: A.10L
function "-"(L: STD_ULOGIC; R: SIGNED) return SIGNED is
variable XL: SIGNED(R'LENGTH-1 downto 0) := (others=>'0');
begin
XL(0) := L;
return (XL - R);
end "-";
Received on Mon Apr 12 14:26:44 2004
This archive was generated by hypermail 2.1.8 : Mon Apr 12 2004 - 14:26:45 PDT