Files
jens 2415e4c78b - added patch
git-svn-id: http://moon:8086/svn/vhdl/trunk@1454 cc03376c-175c-47c8-b038-4cd826a8556b
2021-03-22 17:44:08 +00:00

37 lines
1.1 KiB
Diff

Index: fixed_pkg_c.vhdl
===================================================================
--- fixed_pkg_c.vhdl (Revision 1446)
+++ fixed_pkg_c.vhdl (Arbeitskopie)
@@ -2266,12 +2266,13 @@
function to_sulv (
arg : UNRESOLVED_ufixed) -- fixed point vector
return STD_ULOGIC_VECTOR is
- variable result : STD_ULOGIC_VECTOR (arg'length-1 downto 0);
+ subtype t is STD_ULOGIC_VECTOR(arg'length-1 downto 0);
+ variable result : t;
begin
if arg'length < 1 then
return NSLV;
end if;
- result := STD_ULOGIC_VECTOR (arg);
+ result := To_X01(t(arg));
return result;
end function to_sulv;
@@ -2278,12 +2279,13 @@
function to_sulv (
arg : UNRESOLVED_sfixed) -- fixed point vector
return STD_ULOGIC_VECTOR is
- variable result : STD_ULOGIC_VECTOR (arg'length-1 downto 0);
+ subtype t is STD_ULOGIC_VECTOR(arg'length-1 downto 0);
+ variable result : t;
begin
if arg'length < 1 then
return NSLV;
end if;
- result := STD_ULOGIC_VECTOR (arg);
+ result := To_X01(t(arg));
return result;
end function to_sulv;