TWiki
>
P1076 Web
>
Vhdl2019CollectedRequirements
>
WriteBoolean
(2020-02-17,
JimLewis
)
(raw view)
E
dit
A
ttach
---+!! Textio Boolean Write %TOC% ---++ Proposal Information * Who Updates: Main.JimLewis, <Add YourName>, ... * Date Proposed: 2013-11-13 * Date Last Updated: 2013-11-13 * Priority: * Complexity: * Focus: Testbench ---++ Requirement Summary VHDL-2008 LRM requires that identifier based literals, including boolean, are printed as lower case. Prior to this they were printed as upper case. ---++ Related and/or Competing Issues: NONE ---++ Issue Summary: Bugzilla 285 [[https://bugzilla.mentor.com/show_bug.cgi?id=285][Bugzilla 285]] VHDL-2002 LRM describes the semantics of textio read and write procedures in clause 14.3 with: "The definition of the string representation of the value for each data type are as follows: ... The representation of a BOOLEAN value is formed by an identifier, either FALSE or TRUE." However, in VHDL-2008 the expanded semantics of string representations in clause 5.7 state: "When forming the string representation for a WRITE procedure in STD.TEXTIO (see Clause 16) or for an implicitly defined TO_STRING operation, except where otherwise specified for an overloaded TO_STRING operation: ... Letters in a basic identifier are in lowercase." Together, these statements imply that the write procedure will produce "TRUE" and "FALSE" for earlier language versions and "true" and "false" for the same procedure called from VHDL-2008 code. Because of the vast amount of legacy code in existence, if the semantics of WRITE for VHDL-2008 are not changed I suspect that vendors will be forced to add a switch/mode/etc to allow the older behavior. There are several ways to solve this problem, non of them ideal. Until this issue is resolved we will keep the older implementation of WRITE, but use the newer interpretation of to_string. ---++ Possible Solutions ---+++ Solution 1: Follow VHDL-2008 Rules VHDL-2008 specifies lower case, so use lower case. ---+++ Solution 2: Support case sensitive identifiers Write identifiers in the same case they are specified in. ---+++ Solution 3: Make Boolean a Special Case Rewrite the rules so that writing boolean is consistent with language revisions prior to 2008 and is always upper case for both write and to_string. ---++ Recommendations This is not the only inconsistency between language revisions. If someone needs consistency with an older version, they can use the switches provided by tool vendors. Going forward, consistency between vendors is important. The easiest way to do this is for vendors to implement the standard as written. ---++ General Comments ---++ Supporters _Add your signature here to indicate your support for the proposal_
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2020-02-17 - 15:34:49 -
JimLewis
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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback