TWiki
>
P1076 Web
>
Vhdl2019CollectedRequirements
>
RangeOperations
(revision 1) (raw view)
Edit
Attach
---+ Operations on Ranges %TOC% ---++ Proposal Editing Information * Who Updates: <Add YourName >, ... * Date Proposed: * Date Last Updated: * Priority: * Complexity: * Focus: ---++ Requirement Summary Allow static operations on "ranges". ---++ Related Issues: [[http://www.eda-twiki.org/isac/IRs-VHDL-2002/IR2072.txt][ISAC IR-2072]] <pre>-------------BEGINNING OF IR---------------- VHDL Issue Number: 2072 Language_Version VHDL-93 Classification Language Modeling Enhancement or Deficiency Summary Allow static operations on "ranges" Relevant_LRM_Sections <unknown> Related_Issues <unknown> Key_Words_and_Phrases range, operator Authors_Name Stewart Cobb Authors_Phone_Number 650-644-1418 Authors_Fax_Number Authors_Email_Address stu@novariant.com Authors_Affiliation Novariant Corporation Authors_Address1 1350 Willow Road Authors_Address2 Menlo Park, CA Authors_Address3 94025 Current Status: Forwarded Superseded By: ------------------------ Date Submitted: 18 August 2005 Date Analyzed: 02 December 2005 Author of Analysis: Chuck Swart Revision Number: 1 Date Last Revised: 02 December 2005 Description of Problem ---------------------- This is a change proposal for the syntax of the VHDL language regarding "ranges" of array types. It would have the effect of allowing simple arithmetic to be used in array range references, so that the following example would work as intended: --> Types and signals for example: type WORD is array (31 downto 0) of std_logic; type HALFWORD is array (15 downto 0) of std_logic; signal my_word : WORD; signal my_half_lo : HALFWORD; signal my_half_hi : HALFWORD; --> Proposed change would allow: my_half_lo <: my_word(my_half_lo'range); my_half_hi <= my_word(my_half_hi'range + my_half_lo'length); --> Currently legal code is much less clear: my_half_lo <= my_word(my_half_lo'range); my_half_hi <= my_word( (my_half_hi'high + my_half_lo'length) downto (my_half_hi'low + my_half_lo'length) ); --> It is possible to write a "currently legal" example --> that does not require knowledge of the range --> directions, but that's even less clear: my_half_lo <= my_word(my_half_lo'range); if my_half_hi'ascending then my_half_hi <= my_word( (my_half_hi'low + my_half_lo'length) to (my_half_hi'high + my_half_lo'length) ); else my_half_hi <= my_word( (my_half_hi'high + my_half_lo'length) downto (my_half_hi'low + my_half_lo'length) ); end if; --> This change should also allow expressions like this: subtype SIGNED_BYTE is integer range -128 to 127; subtype UNSIGNED_BYTE is integer range (SIGNED_BYTE'range - SIGNED_BYTE'low); --> Expressions like the second one are useful inside --> library functions which cannot assume the size, range, --> or direction of their arguments. Proposed Resolution ------------------- If the endpoints of a range are a certain type, then operators which can be applied to that type should be legal when applied to the "range", and should be interpreted as applying to both endpoints of the range simultaneously. VASG-ISAC Analysis & Rationale ------------------------------ Some of the problems that the author mentions can be solved by using aliases to normalize ranges and directions of array objects.However, this proposal goes farther and permits some form of arithmetic on ranges. VASG-ISAC Recommendation for IEEE Std 1076-2002 ----------------------------------------------- No change. VASG-ISAC Recommendation for Future Revisions --------------------------------------------- Consider this enhancement request. -------------END OF IR----------------</pre> ---++ Current Problems / Issues ---++ Use Model / Code Examples ---++ Questions ---++ Proposal ---++ General Comments ---++ Supporters _Add your signature here to indicate your support for the proposal -- Main.PatrickLehmann - 2016-02-19
Edit
|
Attach
|
P
rint version
|
H
istory
:
r5
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2020-02-17 - 15:34:37 -
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