You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fixed_float_types.vhdl 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. -- -----------------------------------------------------------------
  2. --
  3. -- Copyright 2019 IEEE P1076 WG Authors
  4. --
  5. -- See the LICENSE file distributed with this work for copyright and
  6. -- licensing information and the AUTHORS file.
  7. --
  8. -- This file to you under the Apache License, Version 2.0 (the "License").
  9. -- You may obtain a copy of the License at
  10. --
  11. -- http://www.apache.org/licenses/LICENSE-2.0
  12. --
  13. -- Unless required by applicable law or agreed to in writing, software
  14. -- distributed under the License is distributed on an "AS IS" BASIS,
  15. -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  16. -- implied. See the License for the specific language governing
  17. -- permissions and limitations under the License.
  18. --
  19. -- Title : Fixed Point and Floating Point types package
  20. --
  21. -- Library : This package shall be compiled into a library
  22. -- symbolically named IEEE.
  23. --
  24. -- Developers: Accellera VHDL-TC and IEEE P1076 Working Group
  25. --
  26. -- Purpose : Definitions for use in fixed point and floating point
  27. -- arithmetic packages
  28. --
  29. -- Note : This package may be modified to include additional data
  30. -- : required by tools, but it must in no way change the
  31. -- : external interfaces or simulation behavior of the
  32. -- : description. It is permissible to add comments and/or
  33. -- : attributes to the package declarations, but not to change
  34. -- : or delete any original lines of the package declaration.
  35. -- : The package body may be changed only in accordance with
  36. -- : the terms of Clause 16 of this standard.
  37. -- :
  38. -- --------------------------------------------------------------------
  39. -- $Revision: 1220 $
  40. -- $Date: 2008-04-10 17:16:09 +0930 (Thu, 10 Apr 2008) $
  41. -- --------------------------------------------------------------------
  42. package fixed_float_types is
  43. -- Types used for generics of fixed_generic_pkg
  44. type fixed_round_style_type is (fixed_round, fixed_truncate);
  45. type fixed_overflow_style_type is (fixed_saturate, fixed_wrap);
  46. -- Type used for generics of float_generic_pkg
  47. -- These are the same as the C FE_TONEAREST, FE_UPWARD, FE_DOWNWARD,
  48. -- and FE_TOWARDZERO floating point rounding macros.
  49. type round_type is (round_nearest, -- Default, nearest LSB '0'
  50. round_inf, -- Round toward positive infinity
  51. round_neginf, -- Round toward negative infinity
  52. round_zero); -- Round toward zero (truncate)
  53. end package fixed_float_types;