diff options
Diffstat (limited to 'libraries/ieee2008/numeric_std.vhdl')
-rw-r--r-- | libraries/ieee2008/numeric_std.vhdl | 146 |
1 files changed, 74 insertions, 72 deletions
diff --git a/libraries/ieee2008/numeric_std.vhdl b/libraries/ieee2008/numeric_std.vhdl index 3ce4357d2..67dca1288 100644 --- a/libraries/ieee2008/numeric_std.vhdl +++ b/libraries/ieee2008/numeric_std.vhdl @@ -1,17 +1,20 @@ --- -------------------------------------------------------------------- --- --- Copyright © 2008 by IEEE. All rights reserved. --- --- This source file is an essential part of IEEE Std 1076-2008, --- IEEE Standard VHDL Language Reference Manual. This source file may not be --- copied, sold, or included with software that is sold without written --- permission from the IEEE Standards Department. This source file may be --- copied for individual use between licensed users. This source file is --- provided on an AS IS basis. The IEEE disclaims ANY WARRANTY EXPRESS OR --- IMPLIED INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR USE --- FOR A PARTICULAR PURPOSE. The user of the source file shall indemnify --- and hold IEEE harmless from any damages or liability arising out of the --- use thereof. +-- ----------------------------------------------------------------- +-- +-- Copyright 2019 IEEE P1076 WG Authors +-- +-- See the LICENSE file distributed with this work for copyright and +-- licensing information and the AUTHORS file. +-- +-- This file to you under the Apache License, Version 2.0 (the "License"). +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +-- implied. See the License for the specific language governing +-- permissions and limitations under the License. -- -- Title : Standard VHDL Synthesis Packages -- : (NUMERIC_STD package declaration) @@ -75,7 +78,6 @@ package NUMERIC_STD is type UNRESOLVED_UNSIGNED is array (NATURAL range <>) of STD_ULOGIC; type UNRESOLVED_SIGNED is array (NATURAL range <>) of STD_ULOGIC; - -- FIXME: was alias subtype U_UNSIGNED is UNRESOLVED_UNSIGNED; subtype U_SIGNED is UNRESOLVED_SIGNED; @@ -1235,52 +1237,52 @@ package NUMERIC_STD is -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector XNOR operation - -- Id: L.15 + -- Id: L.15 function "and" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation - -- Id: L.16 + -- Id: L.16 function "and" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation - -- Id: L.17 + -- Id: L.17 function "or" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation - -- Id: L.18 + -- Id: L.18 function "or" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation - -- Id: L.19 + -- Id: L.19 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation - -- Id: L.20 + -- Id: L.20 function "nand" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation - -- Id: L.21 + -- Id: L.21 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation - -- Id: L.22 + -- Id: L.22 function "nor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation - -- Id: L.23 + -- Id: L.23 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation - -- Id: L.24 + -- Id: L.24 function "xor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation @@ -1289,7 +1291,7 @@ package NUMERIC_STD is -- Note: Function L.25 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ - -- Id: L.25 + -- Id: L.25 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_UNSIGNED) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation @@ -1298,57 +1300,57 @@ package NUMERIC_STD is -- Note: Function L.26 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ - -- Id: L.26 + -- Id: L.26 function "xnor" (L : UNRESOLVED_UNSIGNED; R : STD_ULOGIC) return UNRESOLVED_UNSIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation - -- Id: L.27 + -- Id: L.27 function "and" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector AND operation - -- Id: L.28 + -- Id: L.28 function "and" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar AND operation - -- Id: L.29 + -- Id: L.29 function "or" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector OR operation - -- Id: L.30 + -- Id: L.30 function "or" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar OR operation - -- Id: L.31 + -- Id: L.31 function "nand" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NAND operation - -- Id: L.32 + -- Id: L.32 function "nand" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NAND operation - -- Id: L.33 + -- Id: L.33 function "nor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector NOR operation - -- Id: L.34 + -- Id: L.34 function "nor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar NOR operation - -- Id: L.35 + -- Id: L.35 function "xor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XOR operation - -- Id: L.36 + -- Id: L.36 function "xor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XOR operation @@ -1357,7 +1359,7 @@ package NUMERIC_STD is -- Note: Function L.37 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ - -- Id: L.37 + -- Id: L.37 function "xnor" (L : STD_ULOGIC; R : UNRESOLVED_SIGNED) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(R'LENGTH-1 downto 0) -- Result: Scalar/Vector XNOR operation @@ -1366,7 +1368,7 @@ package NUMERIC_STD is -- Note: Function L.38 is not compatible with IEEE Std 1076-1987. Comment -- out the function (declaration and body) for IEEE Std 1076-1987 compatibility. ------------------------------------------------------------------------------ - -- Id: L.38 + -- Id: L.38 function "xnor" (L : UNRESOLVED_SIGNED; R : STD_ULOGIC) return UNRESOLVED_SIGNED; -- Result subtype: UNRESOLVED_SIGNED(L'LENGTH-1 downto 0) -- Result: Vector/Scalar XNOR operation @@ -1378,8 +1380,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.39 function "and" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of and'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.40 is not compatible with editions of IEEE Std 1076 from @@ -1388,8 +1390,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.40 function "nand" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of nand'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.41 is not compatible with editions of IEEE Std 1076 from @@ -1398,8 +1400,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.41 function "or" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of or'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.42 is not compatible with editions of IEEE Std 1076 from @@ -1408,8 +1410,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.42 function "nor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of nor'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.43 is not compatible with editions of IEEE Std 1076 from @@ -1418,8 +1420,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.43 function "xor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of xor'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.44 is not compatible with editions of IEEE Std 1076 from @@ -1428,8 +1430,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.44 function "xnor" (L : UNRESOLVED_SIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of xnor'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of xnor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.45 is not compatible with editions of IEEE Std 1076 from @@ -1438,8 +1440,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.45 function "and" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of and'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of and'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.46 is not compatible with editions of IEEE Std 1076 from @@ -1448,8 +1450,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.46 function "nand" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of nand'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of nand'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.47 is not compatible with editions of IEEE Std 1076 from @@ -1458,8 +1460,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.47 function "or" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of or'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of or'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.48 is not compatible with editions of IEEE Std 1076 from @@ -1468,8 +1470,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.48 function "nor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of nor'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of nor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.49 is not compatible with editions of IEEE Std 1076 from @@ -1478,8 +1480,8 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.49 function "xor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. - -- Result: Result of xor'ing all of the bits of the vector. + -- Result subtype: STD_ULOGIC. + -- Result: Result of xor'ing all of the bits of the vector. ------------------------------------------------------------------------------ -- Note: Function L.50 is not compatible with editions of IEEE Std 1076 from @@ -1488,7 +1490,7 @@ package NUMERIC_STD is ------------------------------------------------------------------------------ -- Id: L.50 function "xnor" (L : UNRESOLVED_UNSIGNED) return STD_ULOGIC; - -- Result subtype: STD_ULOGIC. + -- Result subtype: STD_ULOGIC. -- Result: Result of xnor'ing all of the bits of the vector. --============================================================================ @@ -1586,20 +1588,20 @@ package NUMERIC_STD is --============================================================================ -- the following operations are predefined - -- function to_string (value : UNRESOLVED_UNSIGNED) return STRING; - -- function to_string (value : UNRESOLVED_SIGNED) return STRING; + -- function TO_STRING (value : UNRESOLVED_UNSIGNED) return STRING; + -- function TO_STRING (value : UNRESOLVED_SIGNED) return STRING; -- explicitly defined operations - alias to_bstring is to_string [UNRESOLVED_UNSIGNED return STRING]; - alias to_bstring is to_string [UNRESOLVED_SIGNED return STRING]; - alias to_binary_string is to_string [UNRESOLVED_UNSIGNED return STRING]; - alias to_binary_string is to_string [UNRESOLVED_SIGNED return STRING]; + alias TO_BSTRING is TO_STRING [UNRESOLVED_UNSIGNED return STRING]; + alias TO_BSTRING is TO_STRING [UNRESOLVED_SIGNED return STRING]; + alias to_binary_string is TO_STRING [UNRESOLVED_UNSIGNED return STRING]; + alias to_binary_string is TO_STRING [UNRESOLVED_SIGNED return STRING]; - function to_ostring (value : UNRESOLVED_UNSIGNED) return STRING; - function to_ostring (value : UNRESOLVED_SIGNED) return STRING; - alias to_octal_string is to_ostring [UNRESOLVED_UNSIGNED return STRING]; - alias to_octal_string is to_ostring [UNRESOLVED_SIGNED return STRING]; + function TO_OSTRING (value : UNRESOLVED_UNSIGNED) return STRING; + function TO_OSTRING (value : UNRESOLVED_SIGNED) return STRING; + alias to_octal_string is TO_OSTRING [UNRESOLVED_UNSIGNED return STRING]; + alias to_octal_string is TO_OSTRING [UNRESOLVED_SIGNED return STRING]; function to_hstring (value : UNRESOLVED_UNSIGNED) return STRING; function to_hstring (value : UNRESOLVED_SIGNED) return STRING; |