I'm trying to define a string in VHDL with a pair of double quotes in the string itself. However I am unable to do so because the IDE (Xilinx ISE 14.7) only recognizes what's in-between the first pair of double quotes as the string. Is there some kind of delimiter or escape character I can use?
Here's the string definition:
constant AT_WKMOD : string(1 to 15):="AT+WKMOD="SMS""&CR;
If I try:
constant AT_WKMOD : string(1 to 15):="AT+WKMOD=/"SMS/""&CR;
It does the same thing. The last thing I tried was:
constant AT_WKMOD : string(1 to 15):="AT+WKMOD=\"SMS\""&CR;
Which gives the following error upon synthesis:
Non-printing character is not allowed in extended identifier.
Best Answer
Since answers should be written as answers and not comments, I'll summarize here:
IEEE Std 1076-2008, section 15.7 - String literals
For example:
As an alternative, you can always create a string by concatenation,
"AT+WKMOD=" & '"' & "SMS" & '"' & CR;
as you are already doing with CR. Note'"'
is a character literal, i.e. a " enclosed in a pair of 's.