⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fixed_pkg_c.vhdl

📁 something i got you may find this useful
💻 VHDL
📖 第 1 页 / 共 5 页
字号:
    return UNRESOLVED_ufixed;  function "sla" (ARG : UNRESOLVED_ufixed; COUNT : INTEGER)    return UNRESOLVED_ufixed;  function "sra" (ARG : UNRESOLVED_ufixed; COUNT : INTEGER)    return UNRESOLVED_ufixed;  function "sll" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function "srl" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function "rol" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function "ror" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function "sla" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function "sra" (ARG : UNRESOLVED_sfixed; COUNT : INTEGER)    return UNRESOLVED_sfixed;  function SHIFT_LEFT  (ARG : UNRESOLVED_ufixed; COUNT : NATURAL)    return UNRESOLVED_ufixed;  function SHIFT_RIGHT (ARG : UNRESOLVED_ufixed; COUNT : NATURAL)    return UNRESOLVED_ufixed;  function SHIFT_LEFT  (ARG : UNRESOLVED_sfixed; COUNT : NATURAL)    return UNRESOLVED_sfixed;  function SHIFT_RIGHT (ARG : UNRESOLVED_sfixed; COUNT : NATURAL)    return UNRESOLVED_sfixed;  ----------------------------------------------------------------------------  -- logical functions  ----------------------------------------------------------------------------  function "not"  (l    : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "and"  (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "or"   (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "nand" (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "nor"  (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "xor"  (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "xnor" (l, r : UNRESOLVED_ufixed) return UNRESOLVED_ufixed;  function "not"  (l    : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "and"  (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "or"   (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "nand" (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "nor"  (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "xor"  (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  function "xnor" (l, r : UNRESOLVED_sfixed) return UNRESOLVED_sfixed;  -- Vector and std_ulogic functions, same as functions in numeric_std  function "and"  (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "and"  (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "or"   (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "or"   (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "nand" (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "nand" (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "nor"  (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "nor"  (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "xor"  (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "xor"  (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "xnor" (l : STD_ULOGIC; r : UNRESOLVED_ufixed)    return UNRESOLVED_ufixed;  function "xnor" (l : UNRESOLVED_ufixed; r : STD_ULOGIC)    return UNRESOLVED_ufixed;  function "and"  (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "and"  (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  function "or"   (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "or"   (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  function "nand" (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "nand" (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  function "nor"  (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "nor"  (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  function "xor"  (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "xor"  (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  function "xnor" (l : STD_ULOGIC; r : UNRESOLVED_sfixed)    return UNRESOLVED_sfixed;  function "xnor" (l : UNRESOLVED_sfixed; r : STD_ULOGIC)    return UNRESOLVED_sfixed;  -- Reduction operators, same as numeric_std functions  function and_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function nand_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function or_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function nor_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function xor_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function xnor_reduce (l : UNRESOLVED_ufixed) return STD_ULOGIC;  function and_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  function nand_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  function or_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  function nor_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  function xor_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  function xnor_reduce (l : UNRESOLVED_sfixed) return STD_ULOGIC;  -- returns arg'low-1 if not found  function find_leftmost (arg : UNRESOLVED_ufixed; y : STD_ULOGIC)    return INTEGER;  function find_leftmost (arg : UNRESOLVED_sfixed; y : STD_ULOGIC)    return INTEGER;  -- returns arg'high+1 if not found  function find_rightmost (arg : UNRESOLVED_ufixed; y : STD_ULOGIC)    return INTEGER;  function find_rightmost (arg : UNRESOLVED_sfixed; y : STD_ULOGIC)    return INTEGER;  --===========================================================================  --   RESIZE Functions  --===========================================================================  -- resizes the number (larger or smaller)  -- The returned result will be ufixed (left_index downto right_index)  -- If "round_style" is fixed_round, then the result will be rounded.  -- If the MSB of the remainder is a "1" AND the LSB of the unrounded result  -- is a '1' or the lower bits of the remainder include a '1' then the result  -- will be increased by the smallest representable number for that type.  -- "overflow_style" can be fixed_saturate or fixed_wrap.  -- In saturate mode, if the number overflows then the largest possible  -- representable number is returned.  If wrap mode, then the upper bits  -- of the number are truncated.    function resize (    arg                     : UNRESOLVED_ufixed;  -- input    constant left_index     : INTEGER;  -- integer portion    constant right_index    : INTEGER;  -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  -- "size_res" functions create the size of the output from the length  -- of the "size_res" input.  The actual value of "size_res" is not used.  function resize (    arg                     : UNRESOLVED_ufixed;  -- input    size_res                : UNRESOLVED_ufixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  -- Note that in "wrap" mode the sign bit is not replicated.  Thus the  -- resize of a negative number can have a positive result in wrap mode.  function resize (    arg                     : UNRESOLVED_sfixed;  -- input    constant left_index     : INTEGER;            -- integer portion    constant right_index    : INTEGER;            -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_sfixed;  function resize (    arg                     : UNRESOLVED_sfixed;  -- input    size_res                : UNRESOLVED_sfixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_sfixed;  --===========================================================================  -- Conversion Functions  --===========================================================================  -- integer (natural) to unsigned fixed point.  -- arguments are the upper and lower bounds of the number, thus  -- ufixed (7 downto -3) <= to_ufixed (int, 7, -3);  function to_ufixed (    arg                     : NATURAL;  -- integer    constant left_index     : INTEGER;  -- size of integer portion    constant right_index    : INTEGER                   := 0;  -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  function to_ufixed (    arg                     : NATURAL;            -- integer    size_res                : UNRESOLVED_ufixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  -- real to unsigned fixed point  function to_ufixed (    arg                     : REAL;     -- real    constant left_index     : INTEGER;  -- size of integer portion    constant right_index    : INTEGER;  -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style;    constant guard_bits     : NATURAL                   := fixed_guard_bits)    return UNRESOLVED_ufixed;  function to_ufixed (    arg                     : REAL;     -- real    size_res                : UNRESOLVED_ufixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style;    constant guard_bits     : NATURAL                   := fixed_guard_bits)    return UNRESOLVED_ufixed;  -- unsigned to unsigned fixed point  function to_ufixed (    arg                     : UNSIGNED;                        -- unsigned    constant left_index     : INTEGER;  -- size of integer portion    constant right_index    : INTEGER                   := 0;  -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  function to_ufixed (    arg                     : UNSIGNED;           -- unsigned    size_res                : UNRESOLVED_ufixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_ufixed;  -- Performs a conversion.  ufixed (arg'range) is returned  function to_ufixed (    arg : UNSIGNED)          -- unsigned    return UNRESOLVED_ufixed;  -- Conversion from sfixed to ufixed (performs an "abs" function)  function to_ufixed (    arg : UNRESOLVED_sfixed)    return UNRESOLVED_ufixed;  -- unsigned fixed point to unsigned  function to_unsigned (    arg                     : UNRESOLVED_ufixed;  -- fixed point input    constant size           : NATURAL;            -- length of output    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNSIGNED;  -- unsigned fixed point to unsigned  function to_unsigned (    arg                     : UNRESOLVED_ufixed;    -- fixed point input    size_res                : UNSIGNED;  -- used for length of output    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNSIGNED;  -- unsigned fixed point to real  function to_real (    arg : UNRESOLVED_ufixed)            -- fixed point input    return REAL;  -- unsigned fixed point to integer  function to_integer (    arg                     : UNRESOLVED_ufixed;  -- fixed point input    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return NATURAL;  -- Integer to UNRESOLVED_sfixed  function to_sfixed (    arg                     : INTEGER;  -- integer    constant left_index     : INTEGER;  -- size of integer portion    constant right_index    : INTEGER                   := 0;  -- size of fraction    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_sfixed;  function to_sfixed (    arg                     : INTEGER;            -- integer    size_res                : UNRESOLVED_sfixed;  -- for size only    constant overflow_style : fixed_overflow_style_type := fixed_overflow_style;    constant round_style    : fixed_round_style_type    := fixed_round_style)    return UNRESOLVED_sfixed;  -- Real to sfixed  function to_sfixed (    arg                     : REAL;     -- real    constant left_index     : INTEGER;  -- size of integer portion

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -