TWiki
>
P1076 Web
>
VHDL_2017
>
LCS2016_099
(revision 14) (raw view)
Edit
Attach
---+ Language Change Specification for Extended Ranges / Operations on Ranges <noautolink> <sticky> ---++ | <sticky><b>LCS Number:</b></sticky> | LCS-2016-099 | | <sticky><b>Version:</b> </sticky> | 7 | | <sticky><b>Date:</b> </sticky> | 21-Mar-2017 | | <sticky><b>Status:</b> </sticky> | Approved | | <sticky><b>Author:</b> </sticky> | [[Main.PatrickLehmann][Patrick Lehmann]] %BR% [[Main.LievenLemiengre][Lieven Lemiengre]] | | <sticky><b>%RED%<del>Source Doc:</del>%ENDCOLOR%</b></sticky> | <del> [[ExtendedRanges][Extended Ranges]] %BR% [[RangeOperations][Operations on Ranges]] </del> | | <sticky><b>More:</b> </sticky> | [[LCS2016_099.Proposal][Proposal]] %BR% [[LCS2016_099_Examples][Examples]] %BR% [[LCS2016_099_History][LCS History]] | | <sticky><b>Summary:</b> </sticky> | Allow operations on ranges by introducing a =range_record=. | ---++ Style Notes Changes are shown in %RED%red font%ENDCOLOR%.%BR% Deletions are %RED%<del>crossed out</del>%ENDCOLOR%.%BR% Editing or reviewing notes in %GREEN%green font%ENDCOLOR%. ---++ Details of Language Change ---+++ 5.2.1 General Scalar types consist of enumeration types, integer types, physical types, and floating-point types. Enumeration types and integer %BR% types are called discrete types. Integer types, floating-point types, and physical types are called numeric types. All scalar types %BR% are ordered; that is, all relational operators are predefined for their values. Each value of a discrete or physical type has a position %BR% number that is an integer value. <pre> %GREEN%[...]%ENDCOLOR% range_constraint ::= <b>range</b> range range ::= <i>range</i>_attribute_name | %RED%simple_range <del>simple_expression direction simple_expression</del>%ENDCOLOR% %RED%| <i>range</i>_expression%ENDCOLOR% %RED%simple_range ::= simple_expression direction simple_expression%ENDCOLOR% direction ::= <b>to</b> | <b>downto</b> </pre> %GREEN%[...]%ENDCOLOR% For values of discrete or physical types, a value V1 is said to be to the left of a value V2 within a given range if both V1 and V2 belong %BR% to the range and either the range is an ascending range and V2 is the successor of V1, or the range is a descending range and V2 is the %BR% predecessor of V1. A list of values of a given range is in left to right order if each value in the list is to the left of the next value in %BR% the list within that range, except for the last value in the list. %RED%Any scalar type defines an implicit record type, called _range record_, which represents the range of that scalar type (see 5.3.3.2). %BR% A range record is said to correspond to a type or subtype T and vise versa, if the type of the range record bounds matches T.%ENDCOLOR% %RED%For a range expression, it's an error if the expression result type is not a range record.%ENDCOLOR% If a range constraint is used in a subtype indication, the type of the expressions (likewise, of the bounds of a range attribute) shall be the %BR% same as the base type of the type mark of the subtype indication. A range constraint is compatible with a subtype if each bound of the range %BR% belongs to the subtype or if the range constraint defines a null range. Otherwise, the range constraint is not compatible with the subtype. %GREEN%[...]%ENDCOLOR% ---+++ 5.2.2.2 Predefined enumeration types The predefined enumeration types are CHARACTER, BIT, BOOLEAN, SEVERITY_LEVEL, %RED%DIRECTION,%ENDCOLOR% and FILE_OPEN_STATUS. The predefined type CHARACTER is a character type whose values are the 256 characters of the ISO/IEC 8859-1 character set. Each of the 191 graphic %BR% characters of this character set is denoted by the corresponding character literal. The declarations of the predefined types CHARACTER, BIT, BOOLEAN, SEVERITY_LEVEL, %RED%DIRECTION,%ENDCOLOR% and FILE_OPEN_STATUS appear %BR% in package STANDARD in Clause 16. %GREEN%[...]%ENDCOLOR% ---+++ 5.3.2.1 General %GREEN%[Editor note: EBNF style fixes]%ENDCOLOR% %GREEN%[Review note: To follow the chain of EBNF rules]%ENDCOLOR% %GREEN%[...]%ENDCOLOR% <pre> array_type_definition ::= unbounded_array_definition %RED%<del>| constrained_array_definition</del> | constrained_array_definition%ENDCOLOR% unbounded_array_definition ::= <b>array</b> ( index_subtype_definition { <b>,</b> index_subtype_definition } ) <b>of</b> element_subtype_indication constrained_array_definition ::= <b>array</b> index_constraint %RED%<del>of element_subtype_indication</del> <b>of</b> element_subtype_indication%ENDCOLOR% index_subtype_definition ::= type_mark <b>range <></b> array_constraint ::= index_constraint [ array_element_constraint ] | <b>( open )</b> [ array_element_constraint ] array_element_constraint ::= element_constraint index_constraint ::= <b>(</b> discrete_range { <b>,</b> discrete_range } <b>)</b> discrete_range ::= %RED%<del>discrete_subtype_indication | range</del> <i>discrete</i>_subtype_indication | range%ENDCOLOR% </pre> ---+++ 5.3.2.2 Index constraints and discrete ranges %GREEN%[Reviewer note: to understand discrete ranges]%ENDCOLOR% An index constraint determines the index range for every index of an array type and, thereby, the corresponding array bounds. %GREEN%<u>For a discrete range used in a constrained array definition and defined by a range, an implicit conversion to the predefined type INTEGER is assumed %BR% if the type of both bounds (prior to the implicit conversion) is the type universal_integer. Otherwise, the type of the range shall be determined by %BR% applying the rules of 12.5 to the range, considered as a complete context, using the rules that the type shall be discrete and that both bounds shall %BR% have the same type.</u>%ENDCOLOR% These rules apply also to a discrete range used in a loop parameter specification (see 10.10) or a generate parameter specification %BR% (see 11.8). %GREEN%[...]%ENDCOLOR% ---+++ 5.3.3.1 General %GREEN%[NEW; Insert this new section headline between "5.3.3 Record types" and "A record type ..."]%ENDCOLOR% %GREEN%[...]%ENDCOLOR% ---+++ 5.3.3.2 Predefined record types %GREEN%[NEW]%ENDCOLOR% %RED%Any scalar type T defines an implicit record type consisting of three elements: Left, Right and Direction. This record is called %BR% a _range record_. The elements Left and Right are of type T. The element Direction is of enumeration type DIRECTION. %ENDCOLOR% %RED%The following incomplete record declaration shall be the template for each predefined range record:%ENDCOLOR% <pre>%RED% type <unnamed_range_record> is record Left : <scalar_type>; Right : <scalar_type>; Direction : DIRECTION; end record; %ENDCOLOR%</pre> ---+++ 14.4.2.4 Subtype declarations Elaboration of a subtype declaration consists of the elaboration of the subtype indication. The elaboration of a subtype indication creates a subtype. If the %BR% subtype does not include a constraint, then the subtype is the same as that denoted by the type mark. The elaboration of a subtype indication that includes a %BR% constraint proceeds as follows: a. The constraint is first elaborated. a. A check is then made that the constraint is compatible with the type or subtype denoted by the type mark (see 5.2.1, 5.3.2.2, and 5.3.3). Elaboration of a range constraint consists of the evaluation of the range. %RED%The evaluation of a range consists either of the elaboration of a simple range or %BR% of a range expression.%ENDCOLOR% The evaluation of a %RED%simple%ENDCOLOR% range defines the bounds and direction of the range. %RED%The evaluation of a range expression %BR% consists of the evaluation of the expression. The elements of a range record define the bounds and direction of a range.%ENDCOLOR% Elaboration of an index constraint %BR% consists of the elaboration of each of the discrete ranges in the index constraint in some order that is not defined by the language. Elaboration of an array constraint consists %BR% of the elaboration of the index constraint, if present, and the elaboration of the array element constraint, if present. The order of elaboration of the index constraint and the %BR% array element constraint, if both are present, is not defined by the language. Elaboration of a record constraint consists of the elaboration of each of the record element constraints %BR% in the record constraint in some order that is not defined by the language. %GREEN%[...]%ENDCOLOR% ---+++ 16.2.6 Predefined attributes of ranges %GREEN%[NEW]%ENDCOLOR% | %RED%R'RECORD%ENDCOLOR% \ | %RED%Kind:%ENDCOLOR% | %RED%Type%ENDCOLOR% | | | %RED%Prefix:%ENDCOLOR% | %RED%Any prefix R that is an attribute name and denotes a range.%ENDCOLOR% | | | %RED%Result:%ENDCOLOR% | %RED%The implicitly declared record type of the corresponding range record for the %BR% \ type of range R.%ENDCOLOR% | | ||| | %RED%R'VALUE%ENDCOLOR% \ | %RED%Kind:%ENDCOLOR% | %RED%Value%ENDCOLOR% | | | %RED%Prefix:%ENDCOLOR% | %RED%Any prefix R that is an attribute name and denotes a range.%ENDCOLOR% | | | %RED%Result type:%ENDCOLOR% | %RED%R'RECORD.%ENDCOLOR% | | | %RED%Result:%ENDCOLOR% | %RED%A range record instance of type R'RECORD, wherein each record element is %BR% \ initialized by the corresponding bounds of R and the element Direction set to %BR% \ ASCENDING, if R is an ascending range, otherwise to DESCENDING.%ENDCOLOR% | ---+++ 16.3 Package STANDARD <pre> package STANDARD is -- Predefined enumeration types: %RED%type DIRECTION is ( ASCENDING, -- The range is ascending. DESCENDING -- the range is descending. ); -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function "/="(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function "<"(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function "<="(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function ">"(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function ">="(anonymous, anonymous: DIRECTION) return BOOLEAN; -- function MINIMUM (L, R: DIRECTION) return DIRECTION; -- function MAXIMUM (L, R: DIRECTION) return DIRECTION;%ENDCOLOR%%RED% -- Implicit defined range record for DIRECTION'RANGE_RECORD: -- type DIRECTION_range_record is record -- Left : DIRECTION; -- Right : DIRECTION; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type BOOLEAN is (FALSE, TRUE); -- The predefined operations for this type are as follows: -- function "and"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "or"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "nand"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "nor"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "xor"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "xnor"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "not"(anonymous: BOOLEAN) return BOOLEAN; -- function "="(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "/="(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "<"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function "<="(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function ">"(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function ">="(anonymous, anonymous: BOOLEAN) return BOOLEAN; -- function MINIMUM(L, R: BOOLEAN) return BOOLEAN; -- function MAXIMUM(L, R: BOOLEAN) return BOOLEAN; -- function RISING_EDGE(signal S: BOOLEAN) return BOOLEAN; -- function FALLING_EDGE(signal S: BOOLEAN) return BOOLEAN;%RED% -- Implicit defined range record for BOOLEAN'RANGE_RECORD: -- type BOOLEAN_range_record is record -- Left : BOOLEAN; -- Right : BOOLEAN; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type BIT is ('0', '1'); -- The predefined operations for this type are as follows: -- function "and"(anonymous, anonymous: BIT) return BIT; -- function "or"(anonymous, anonymous: BIT) return BIT; -- function "nand"(anonymous, anonymous: BIT) return BIT; -- function "nor"(anonymous, anonymous: BIT) return BIT; -- function "xor"(anonymous, anonymous: BIT) return BIT; -- function "xnor"(anonymous, anonymous: BIT) return BIT; -- function "not"(anonymous: BIT) return BIT; -- function "="(anonymous, anonymous: BIT) return BOOLEAN; -- function "/="(anonymous, anonymous: BIT) return BOOLEAN; -- function "<"(anonymous, anonymous: BIT) return BOOLEAN; -- function "<="(anonymous, anonymous: BIT) return BOOLEAN; -- function ">"(anonymous, anonymous: BIT) return BOOLEAN; -- function ">="(anonymous, anonymous: BIT) return BOOLEAN; -- function "?="(anonymous, anonymous: BIT) return BIT; -- function "?/="(anonymous, anonymous: BIT) return BIT; -- function "?<"(anonymous, anonymous: BIT) return BIT; -- function "?<="(anonymous, anonymous: BIT) return BIT; -- function "?>"(anonymous, anonymous: BIT) return BIT; -- function "?>="(anonymous, anonymous: BIT) return BIT; -- function MINIMUM (L, R: BIT) return BIT; -- function MAXIMUM (L, R: BIT) return BIT; -- function "??"(anonymous: BIT) return BOOLEAN; -- function RISING_EDGE (signal S: BIT) return BOOLEAN; -- function FALLING_EDGE (signal S: BIT) return BOOLEAN;%RED% -- Implicit defined range record for BIT'RANGE_RECORD: -- type BIT_range_record is record -- Left : BIT; -- Right : BIT; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type CHARACTER is ( NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FSP, GSP, RSP, USP, ' ', '!', '"', '#', '$', '%', '&', ''', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', DEL, C128, C129, C130, C131, C132, C133, C134, C135, C136, C137, C138, C139, C140, C141, C142, C143, C144, C145, C146, C147, C148, C149, C150, C151, C152, C153, C154, C155, C156, C157, C158, C159, ' ', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '-', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ' ); -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function "/="(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function "<"(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function "<="(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function ">"(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function ">="(anonymous, anonymous: CHARACTER) return BOOLEAN; -- function MINIMUM (L, R: CHARACTER) return CHARACTER; -- function MAXIMUM (L, R: CHARACTER) return CHARACTER;%RED% -- Implicit defined range record for CHARACTER'RANGE_RECORD: -- type CHARACTER_range_record is record -- Left : CHARACTER; -- Right : CHARACTER; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type SEVERITY_LEVEL is (NOTE, WARNING, ERROR, FAILURE); -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function "/="(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function "<"(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function "<="(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function ">"(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function ">="(anonymous, anonymous: SEVERITY_LEVEL) return BOOLEAN; -- function MINIMUM (L, R: SEVERITY_LEVEL) return SEVERITY_LEVEL; -- function MAXIMUM (L, R: SEVERITY_LEVEL) return SEVERITY_LEVEL;%RED% -- Implicit defined range record for SEVERITY_LEVEL'RANGE_RECORD: -- type SEVERITY_LEVEL_range_record is record -- Left : SEVERITY_LEVEL; -- Right : SEVERITY_LEVEL; -- Direction : DIRECTION; -- end record;%ENDCOLOR% -- type universal_integer is range implementation_defined; -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: universal_integer) return BOOLEAN; -- function "/="(anonymous, anonymous: universal_integer) return BOOLEAN; -- function "<"(anonymous, anonymous: universal_integer) return BOOLEAN; -- function "<="(anonymous, anonymous: universal_integer) return BOOLEAN; -- function ">"(anonymous, anonymous: universal_integer) return BOOLEAN; -- function ">="(anonymous, anonymous: universal_integer) return BOOLEAN; -- function "+"(anonymous: universal_integer) return universal_integer; -- function "-"(anonymous: universal_integer) return universal_integer; -- function "abs"(anonymous: universal_integer) return universal_integer; -- function "+"(anonymous, anonymous: universal_integer) return universal_integer; -- function "-"(anonymous, anonymous: universal_integer) return universal_integer; -- function "*"(anonymous, anonymous: universal_integer) return universal_integer; -- function "/"(anonymous, anonymous: universal_integer) return universal_integer; -- function "mod"(anonymous, anonymous: universal_integer) return universal_integer; -- function "rem"(anonymous, anonymous: universal_integer) return universal_integer; -- function MINIMUM (L, R: universal_integer) return universal_integer; -- function MAXIMUM (L, R: universal_integer) return universal_integer;%RED% -- Implicit defined range record for universal_integer'RANGE_RECORD: -- type universal_integer_range_record is record -- Left : universal_integer; -- Right : universal_integer; -- Direction : DIRECTION; -- end record;%ENDCOLOR% -- type universal_real is range implementation_defined; -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: universal_real) return BOOLEAN; -- function "/="(anonymous, anonymous: universal_real) return BOOLEAN; -- function "<"(anonymous, anonymous: universal_real) return BOOLEAN; -- function "<="(anonymous, anonymous: universal_real) return BOOLEAN; -- function ">"(anonymous, anonymous: universal_real) return BOOLEAN; -- function ">="(anonymous, anonymous: universal_real) return BOOLEAN; -- function "+"(anonymous: universal_real) return universal_real; -- function "-"(anonymous: universal_real) return universal_real; -- function "abs"(anonymous: universal_real) return universal_real; -- function "+"(anonymous, anonymous: universal_real) return universal_real; -- function "-"(anonymous, anonymous: universal_real) return universal_real; -- function "*"(anonymous, anonymous: universal_real) return universal_real; -- function "/"(anonymous, anonymous: universal_real) return universal_real; -- function "*"(anonymous: universal_real; anonymous: universal_integer) return universal_real; -- function "*"(anonymous: universal_integer; anonymous: universal_real) return universal_real; -- function "/"(anonymous: universal_real; anonymous: universal_integer) return universal_real; -- function MINIMUM (L, R: universal_real) return universal_real; -- function MAXIMUM (L, R: universal_real) return universal_real;%RED% -- Implicit defined range record for universal_real'RANGE_RECORD: -- type universal_real_range_record is record -- Left : universal_real; -- Right : universal_real; -- Direction : DIRECTION; -- end record;%ENDCOLOR% -- Predefined numeric types: type INTEGER is range implementation_defined; -- The predefined operations for this type are as follows: -- function "**"(anonymous: universal_integer; anonymous: INTEGER) return universal_integer; -- function "**"(anonymous: universal_real; anonymous: INTEGER) return universal_real; -- function "="(anonymous, anonymous: INTEGER) return BOOLEAN; -- function "/="(anonymous, anonymous: INTEGER) return BOOLEAN; -- function "<"(anonymous, anonymous: INTEGER) return BOOLEAN; -- function "<="(anonymous, anonymous: INTEGER) return BOOLEAN; -- function ">"(anonymous, anonymous: INTEGER) return BOOLEAN; -- function ">="(anonymous, anonymous: INTEGER) return BOOLEAN; -- function "+"(anonymous: INTEGER) return INTEGER; -- function "-"(anonymous: INTEGER) return INTEGER; -- function "abs"(anonymous: INTEGER) return INTEGER; -- function "+"(anonymous, anonymous: INTEGER) return INTEGER; -- function "-"(anonymous, anonymous: INTEGER) return INTEGER; -- function "*"(anonymous, anonymous: INTEGER) return INTEGER; -- function "/"(anonymous, anonymous: INTEGER) return INTEGER; -- function "mod"(anonymous, anonymous: INTEGER) return INTEGER; -- function "rem"(anonymous, anonymous: INTEGER) return INTEGER; -- function "**"(anonymous: INTEGER; anonymous: INTEGER) return INTEGER; -- function MINIMUM (L, R: INTEGER) return INTEGER; -- function MAXIMUM (L, R: INTEGER) return INTEGER;%RED% -- Implicit defined range record for INTEGER'RANGE_RECORD: -- type INTEGER_range_record is record -- Left : INTEGER; -- Right : INTEGER; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type REAL is range implementation_defined; -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: REAL) return BOOLEAN; -- function "/="(anonymous, anonymous: REAL) return BOOLEAN; -- function "<"(anonymous, anonymous: REAL) return BOOLEAN; -- function "<="(anonymous, anonymous: REAL) return BOOLEAN; -- function ">"(anonymous, anonymous: REAL) return BOOLEAN; -- function ">="(anonymous, anonymous: REAL) return BOOLEAN; -- function "+"(anonymous: REAL) return REAL; -- function "-"(anonymous: REAL) return REAL; -- function "abs"(anonymous: REAL) return REAL; -- function "+"(anonymous, anonymous: REAL) return REAL; -- function "-"(anonymous, anonymous: REAL) return REAL; -- function "*"(anonymous, anonymous: REAL) return REAL; -- function "/"(anonymous, anonymous: REAL) return REAL; -- function "**"(anonymous: REAL; anonymous: INTEGER) return REAL; -- function MINIMUM (L, R: REAL) return REAL; -- function MAXIMUM (L, R: REAL) return REAL;%RED% -- Implicit defined range record for REAL'RANGE_RECORD: -- type REAL_range_record is record -- Left : REAL; -- Right : REAL; -- Direction : DIRECTION; -- end record;%ENDCOLOR% -- Predefined type TIME: type TIME is range implementation_defined units fs; -- femtosecond ps = 1000 fs; -- picosecond ns = 1000 ps; -- nanosecond us = 1000 ns; -- microsecond ms = 1000 us; -- millisecond sec = 1000 ms; -- second min = 60 sec; -- minute hr = 60 min; -- hour end units; -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: TIME) return BOOLEAN; -- function "/="(anonymous, anonymous: TIME) return BOOLEAN; -- function "<"(anonymous, anonymous: TIME) return BOOLEAN; -- function "<="(anonymous, anonymous: TIME) return BOOLEAN; -- function ">"(anonymous, anonymous: TIME) return BOOLEAN; -- function ">="(anonymous, anonymous: TIME) return BOOLEAN; -- function "+"(anonymous: TIME) return TIME; -- function "- (anonymous: TIME) return TIME; -- function "abs"(anonymous: TIME) return TIME; -- function "+"(anonymous, anonymous: TIME) return TIME; -- function "-"(anonymous, anonymous: TIME) return TIME; -- function "*"(anonymous: TIME; anonymous: INTEGER) return TIME; -- function "*"(anonymous: TIME; anonymous: REAL) return TIME; -- function "*"(anonymous: INTEGER; anonymous: TIME) return TIME; -- function "*"(anonymous: REAL; anonymous: TIME) return TIME; -- function "/"(anonymous: TIME; anonymous: INTEGER) return TIME; -- function "/"(anonymous: TIME; anonymous: REAL) return TIME; -- function "/"(anonymous, anonymous: TIME) return universal_integer; -- function "mod"(anonymous, anonymous: TIME) return TIME; -- function "rem"(anonymous, anonymous: TIME) return TIME; -- function MINIMUM (L, R: TIME) return TIME; -- function MAXIMUM (L, R: TIME) return TIME;%RED% -- Implicit defined range record for TIME'RANGE_RECORD: -- type TIME_range_record is record -- Left : TIME; -- Right : TIME; -- Direction : DIRECTION; -- end record;%ENDCOLOR% %GREEN%[...]%ENDCOLOR% -- The predefined types for opening files: type FILE_OPEN_KIND is ( READ_MODE, -- Resulting access mode is read-only. WRITE_MODE, -- Resulting access mode is write-only. APPEND_MODE -- Resulting access mode is write-only; ); -- information is appended to the end of the existing file. -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function "/="(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function "<"(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function "<="(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function ">"(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function ">="(anonymous, anonymous: FILE_OPEN_KIND) return BOOLEAN; -- function MINIMUM (L, R: FILE_OPEN_KIND) return FILE_OPEN_KIND; -- function MAXIMUM (L, R: FILE_OPEN_KIND) return FILE_OPEN_KIND;%RED% -- Implicit defined range record for FILE_OPEN_KIND'RANGE_RECORD: -- type FILE_OPEN_KIND_range_record is record -- Left : FILE_OPEN_KIND; -- Right : FILE_OPEN_KIND; -- Direction : DIRECTION; -- end record;%ENDCOLOR% type FILE_OPEN_STATUS is ( OPEN_OK, -- File open was successful. STATUS_ERROR, -- File object was already open. NAME_ERROR, -- External file not found or inaccessible. MODE_ERROR -- Could not open file with requested access mode. ); -- The predefined operations for this type are as follows: -- function "="(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function "/="(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function "<"(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function "<="(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function ">"(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function ">="(anonymous, anonymous: FILE_OPEN_STATUS) return BOOLEAN; -- function MINIMUM (L, R: FILE_OPEN_STATUS) return FILE_OPEN_STATUS; -- function MAXIMUM (L, R: FILE_OPEN_STATUS) return FILE_OPEN_STATUS;%RED% -- Implicit defined range record for FILE_OPEN_STATUS'RANGE_RECORD: -- type FILE_OPEN_STATUS_range_record is record -- Left : FILE_OPEN_STATUS; -- Right : FILE_OPEN_STATUS; -- Direction : DIRECTION; -- end record;%ENDCOLOR% %GREEN%[...]%ENDCOLOR% end package STANDARD; </pre> ---+++ Annex C <pre> range ::= <i>range</i>_attribute_name | %RED%simple_range <del>simple_expression direction simple_expression</del>%ENDCOLOR% %RED%| <i>range</i>_expression%ENDCOLOR% %RED%simple_range ::= simple_expression direction simple_expression%ENDCOLOR% array_type_definition ::= unbounded_array_definition %RED%<del>| constrained_array_definition</del> | constrained_array_definition%ENDCOLOR% constrained_array_definition ::= <b>array</b> index_constraint %RED%<del>of element_subtype_indication</del> <b>of</b> element_subtype_indication%ENDCOLOR% discrete_range ::= %RED%<del>discrete_subtype_indication | range</del> <i>discrete</i>_subtype_indication | range%ENDCOLOR% </pre> </sticky> </noautolink>
Edit
|
Attach
|
P
rint version
|
H
istory
:
r29
|
r16
<
r15
<
r14
<
r13
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2017-04-06 - 16:08:59 -
TWikiGuest
P1076
Log In
or
Register
P1076 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
P1076
Ballots
LCS2016_080
P10761
P1647
P16661
P1685
P1734
P1735
P1778
P1800
P1801
Sandbox
TWiki
VIP
VerilogAMS
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback